Ad
  • Custom User Avatar

    jnz just jumps to instruction, if value != 0 and after that program continues.

    1. mov a 5 # a = 5
    2. mov b 3 # b = 3
    3. inc b # b = 4
    4. dec a # a = 4
    5. jnz a -2 # continue program from 3 step of program, while a != 0
    6. dec a # a = 1

    in result we should return {"a": 1, "b": 8}