jump destination too far : by 3 byte(s)

前端 未结 1 1015
天涯浪人
天涯浪人 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:
    
    
    
    loop label1 
    

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

    label1:
    
    
    
    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)
提交回复
热议问题