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