I m having a problem with my loop, the code contained in it is long and it gives me error "short jump out of range", so i want to know if there is a way to make the loop work by not reducing the amount of code in it ?
example1:
label:
my code
LOOP label
; It work fine but when I add more code in it
example2:
label:
my code
more code added
LOOP label
; It does not work and error appears "short jump out of range"
The LOOP
instruction can't jump to a distance of more than 127 bytes. You'll need to change your code to use DEC ECX
with JNZ
instructions.
For example:
MOV ECX, 10
label:
;some codes
LOOP label
Become:
MOV ECX, 10
label:
;some codes
DEC ECX
JNZ label
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With