* * $ tm-cli-go solution-v1.tm * OUT instruction prints: 2147483647 * HALT: 0,0,0 * Number of instructions executed = 1 * 0: LDC 1,1(0) now R0 and R1 are constants 1: LDC 3,1(0) now R2 = 0 and R3 = 1 are counters 2: JLE 3,3(7) if R3 is <= 0, then break 3: ADD 2,2,1 else increment 4: ADD 3,3,1 counters 5: LDA 7,-4(7) and loop 6: OUT 2,0,0 print the last positive value 7: HALT 0,0,0 *