I am currently trying to finish off the project found in Chapter 4 of the Nand to Tetris course (Fill.asm). However, Assembler is giving me the following error:
"In line 3, Expression Expected"
I'm not sure what I'm doing wrong... but below is the snippet of code I have:
@i
M=1
@sum
M=8192
(END)
@END
0,JMP
Can anyone tell me why I'm getting this error on Line 3 (@sum)?
I don't know why an error is showing up on line 3, but you can't directly set a value to a memory address on line 4. You can force a "1" out of the ALU like on line 2, but there is no way of forcing an "8192" out of it without first inputting it. You must first assign the value of "8192" to the A-register, then store the A-register to the D-register, then select the memory address, then store the D-register there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With