Struggle with MARIE Assembly.
Needing to write a code that has x=3 and y=5, is x>y then it needs to output 1, if x<y it needs to output one,
I have the start but don't know how to do if else statements in MARIE

LOAD X
SUBT Y
SKIPCOND 800
JUMP ELSE
OUTPUT
HALT

First, what you have above is incomplete yet it is, at the assembly level an if else construct.

Now if you wanted to you could add another jump after line 4 to mimic an if statement in another way. Only one of the two jumps would execute but this is just for the instance where it fits to do so.

So line 3 is essentially the IF statement.
Line 4 is the ELSE.
Line 5 is what happens IF line 3 was true.
But I don't see the line label for ELSE so the code is incomplete.

Remember I only see this little section of your code so I may be missing the big picture but hey, worked with assembler on over a dozen architectures over the decades and more. Maybe you have a different question but I'll try to work with what you give so far.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.