Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

AsembSim

8-Bit Assembly Code Simulator · By Ali107

Multiplication Script

A topic by Ali107 created 59 days ago Views: 29
Viewing posts 1 to 1
(2 edits)

This script multiplies 2 with 2 and at the end will output the result. (tbh this is just to show off as you can multiply using the 'mul' instruction)

The first 2 lines controls what gets multiplied with what, you can change the values to whatever value you want, though it requires some changes to the first two lines if you want to put in a number greater than 127.

mov 2 r0
mov 2 r1
jmp_eq r2 r1 24
    add r3 r0 r3
    add r2 1 r2
jmp 8
mov r3 rout
hlt