Translation from high-level to PIPPIN

Step 7: Make substitution for assignment (x++) within the for loop body
 
            LOD #0
            STO W
            LOD #1
            STO X	
    loop:   LOD #10             ; result in ACC:  1=true, 0=false          
            STO T1  
            LOD X
            SUB T1
            STO T1             ; T1 = expr1 - expr2
            CPZ T1             ; ACC = 1, if expr1==expr2 otherwise ACC = 0
            JMZ notEq       	; 0 in ACC means (expr != 0)
            JMP done          	; this instruction executes when (expr == 0)
    notEq:  CPL T1           	; now test to see if expr1 <expr2
     done:  NOP               
            JMZ end		       ; if test becomes false - then time to end
            LOD #5		       ; w=w+5
STO T1
LOD W ADD T1
STO W

LOD #1
ADD X
STO X

JMP loop end: NOP