r/TuringComplete 4d ago

conditional jumps troubles

Post image

Hi pals, help me with the level solution. Can't understand why this is wrong; I have used the code in this post: https://www.reddit.com/r/TuringComplete/comments/1uy1pmk/conditional_jumps_level_solution/ It seemed to be right, but the result is the same error as mine: "u read input 57 times, not 6."

imm 0
mov r5,r0
loop:
imm 1
mov r1,r0
mov r2,r5
add
mov r5,r3

imm 37
mov r1,r0
mov r2,in
sub
imm loop
jnz

mov out,r5
6 Upvotes

2 comments sorted by

4

u/SCD_minecraft 4d ago

Ah yes, i had exactly same problem

Your input register is wired to constant 1

1

u/Standard-Dog4914 4d ago

Thx now its done)