Theo wrote
Guys, can someone please provide me with a working .asm file so that I can see how it works please?
Thank you so much.
Forum etiquette is not to post solutions.
Here's a snippet of code (not related to Fill.asm) that shows some useful concepts, basically an if-then-else:
// if q is even, r = q+3; else r = q-1
@q
D=M
@1
D=D&A
@ODD
D;JNE
// even number
@q
D=M
@3
D=D+A
@STORE
0;JMP
(ODD)
@q
D=M-1
(STORE)
@r
M=D
--Mark