Marie z=x+1 until it reaches 20

43 Views Asked by At

Here I have a loop in Marie. The loop goes from 1 to 20 and it's supposed to stop on 20. My problem is that I want to print in a individual memory address each value from 1 to 20 consecutively but in individual memory adresses.

Load One
Load Z
Store X 
Loop, Load X 
Subt Twenty 
SkipCond 000   
Jump Endloop 
Load X 
Add One 
Store X 
Jump Loop 
Endloop, Halt 



X, Dec 0 
One, Dec 1 
Twenty, Dec 20 
Z, DEC 0 

I've tried to make use of Indirect storage but I just can't solve this, please help

0

There are 0 best solutions below