*Error: value xxx is out of range, valid values are between -128 and 127.
I've been having this error in all my code.
The instruction jr cc, label
explains this:
Note that the relative jump has a limited range of [-128, 127] from the address of the first byte of the instruction following the JR instruction.
I tried putting the instruction nop
after jr
but still got this error.
Maybe it is that I don't understand well how this works. If someone could explain me more (or give examples) it would be great. Thanks