简体   繁体   中英

Conditional jump out of range in 8086 assembly

I'm coding in assembly for Intel 8086 under TASM in DosBox and the problem I frequently stumble upon is getting the compilation error of "Relative jump out of range by some bytes" where my conditional jumps are.

Now, I know that conditional jumps are short jumps but is there any way to somehow... "stretch" them? :) I know I can place intermediate jumps or try to assemble the code so that the jumps are in reach but as my program grows larger, I think the latter option may prove to be less valid than now.

Can I somehow tell the compiler to make something with it or can I somehow tweak my jumps?

自从我完成任何汇编编码以来已经有很长时间了,但是正如我回想的那样,“拉伸”条件跳转的通常方法是反转测试的逻辑,并放置一个绝对跳转来表示您要采用的分支有条件的跳跃之后。

Another way was to put a "table" of jumps within reach, then you relative jumped to to the jump you wanted to jump to. :)

You could get clever with that and change the jump in the table. Course debugging such code was 'erm "fun"..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM