Thanks, Mark. I reframed the R2 incrementing better, and syntactically,
the program passes. Next - overcoming the logic error(s). I'm getting
comparison failure at "line 3", and I need a hint about what to do. Here
is the entire program:
//Set up the variables
@R2 //Sum
M=0
@7
D=A
@R0
M=D //R0 = 7 - one factor of 42
@6
D=A
@R1
M=D //R1 = 6, the counter limit factor
@i //the counter
M=0
(LOOP)
@LOOP
@i
D=M //counter
M=D+1 //increment counter
@R1
D=M-D
(END)
@END
D;JEQ
@R0
D=M
@R2
M=M+D
@LOOP
0;JMP
> -------- Original Message --------
> Subject: Re: Which "jump" do I use?
> From: "cadet1620 [via Nand2Tetris Questions and Answers Forum]"
> <
[hidden email]>
> Date: Thu, September 29, 2016 3:03 pm
> To: nathan613 <
[hidden email]>
>
>
> nathan613 wrote
> > Thanks - I re-read the page and I got more insight, but I am still getting
> > "destination expected".
>
> "Destination expected" has nothing to do with jumps.
> That message means that a command has something on the left side of the "="
> that is not understood. It is expecting a destination register: A, D or M,
> or a combination of those.
>
> In you code sample, the error is
>
> To add the variable R0 to the variable R2, you need several instructions,
> just like you needed several instructions to do i=i+1 for the counter.
>
> Hint: start with
>
>
> --Mark
>
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
>
http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Which-jump-do-I-use-tp4030316p4030319.html>
> To unsubscribe from Which "jump" do I use?, visit