AoC19/test/intcode/cmp8.asm

20 lines
178 B
NASM

in res
clt $res, 8, cmpRes
jnz $(res + 1), lessThan
ceq $res, 8, cmpRes
jnz $cmpRes, equal
out 1001
hlt
lessThan:
out 999
hlt
equal:
out 1000
hlt
res: 0
cmpRes: 0