Simple-12 Simulator
Christopher Stoll
Registers:
PC
=
0
ACC
=
0
Console:
Program Code:
# # Paste your code here # Click "Assemble", then click "Run" (you'll see it) # # # Take input, push to stack, print reversed # Christopher Stoll, 2001 # .data one: word 1 # constant = 1 decr1: word 5 # loop decrementor in decr2: word 5 # loop decrementor out apoint: word @array1 # memory location of array array1: word 0 # array to store input .code main: read # get user input si apoint # store input to array ld decr1 # load decrementor sub one # decrement jz done # decrementor is zero, goto print st decr1 # store decrementor ld apoint # load the array pointer add one # next array position st apoint # store the array pointer j main # loop done: li apoint # load the value print # print the value ld decr2 # load decrementor sub one # decrement jz end # decrementor is zero, exit st decr2 # store decrementor ld apoint # load the array pointer sub one # subtract one st apoint # store the array pointer j done # loop end: exit # exit program
"A camel is a horse designed by committee."
You are ridding a camel (Internet Explorer), pony up to a real web browser (anything else).
It works, just not as well as many other choices.
Debuger: