Closed Ianyourgod closed 1 week ago
You're doing 1 - 230, not 230 - 1
You're doing 1 - 230, not 230 - 1
yes, but it should still be the same result... right?
yeah just checked, 1-230 with 8 bits should still be 229 wait i did it wrong one sec gonna try again
1-230 = -229 == 27 mod 256
damn i did it wrong, thanks yall
Hello. I ran this code:
ldi r1 230 ldi r2 1 sub r2 r1 r3
(1-230) this should result in 229, but i got 27. I'm guessing this has to do with the vm trying to make this not negative, but failing (-27 is the same as 229 in 8 bits)