I am getting the "In line 1, expression expected" error and I am not sure why.
I am using the CPU Emulator from nand2tetris. I tried changing line 1 to 5, but it did not solve the problem. I just do not get what is the problem in the first place.
@j
D=5;
@i;
M=1;
@5
@i
D=M
D=D-A;
@END
D;JGT
@j
@1
M=M-A
@i
@1
M=M+A
@LOOP
0;JMP
What I am trying to recreate is this loop: J=5 for(i=1; i<5; i++) { j-- }