jump destination too far : by 3 byte(s)

前端 未结 1 1014
天涯浪人
天涯浪人 2021-01-29 08:23

I m having a problem with my loop, the code contained in it is long and it gives me error jump destination too far : by 3 byte(s). When ı remove:

mo         


        
相关标签:
1条回答
  • 2021-01-29 09:00

    loop has limited range. It can only jump up to 127 bytes ahead or 128 back in the instruction stream measured from the start of the following instruction.

    To get around that, you can do something like the following.

    Instead of

    label1:
    
    <lots of code>
    
    loop label1 
    

    if the label is out of reach you can do something like this:

    label1:
    
    <lots of code>
    
    loop tmp1
    jmp tmp2
    tmp1:
      jmp label1
    tmp2:
    

    or else use a different construct based on conditional jumps that don't have the range limitation.

    0 讨论(0)
提交回复
热议问题