Source: Coprocessor Conflagration
Part 1: Create a variation of the previous DuetVM with only the following four instructions:
set X Y
sets registerX
toY
sub X Y
set registerX
toX - Y
mul X Y
sets registerX
toX * Y
jnz X Y
jumps with an offset of the value ofY
, iffX
is not equal to zero
If you run the given program, how many times is
mul
invoked?