I have written a very simple MARIE assembly language program that does not work.
ID: 3566568 • Letter: I
Question
I have written a very simple MARIE assembly language program that does not work. Please check my work and correct it. Please tell me what I did wrong. Instructions are in bold and my code is below it.... Here is the link to MARIE assembly compiler (it is free and safe). http://computerscience.jbpub.com/ecoa/3e/ (make sure you have latest java installed on your pc)
define a decimal variable X and set X = 0
define a decimal variable Y and set Y = 0
code the following:
Input a number in decimal from the keyboard
store the number in location X
Input a number in decimal from the keyboard
store the number in location Y
If X > 0 then
X = X + 5
Else
X = Y - 2
Endif
Display X using the output instruction
MYCODE:
Org 100
Input
Store Y
Skipcond 800
Jump Else
Store Y
Jump Endif
Else, Load Minus2
Store Y
Endif, Halt
X, Dec 0
Y, Dec 0
Minus2, Dec -2
Explanation / Answer
Hi chris do you still need this or did you find the answer?