在以下代码段中,EB F2指令使执行跳回到箭头指示的行。考虑到没有地址提供给EB并且jmp的地址距离小于F2,这种情况怎么办? 这两个位置彼此为0xC。

#1 楼

来自google starmans realm的

引用相关信息

These are also known as SHORT Relative Jumps. Programs using only Relative    
Jump  instructions can be relocated anywhere in memory without having to     
change the    machine code for the Jumps. The first byte of a SHORT Jump is    
always EB and the    second is a relative offset from 00h to 7Fh for Forward    
jumps, and from 80h to    FFh for Reverse (or Backward) jumps. [Note: The    
offset count always begins at    the byte immediately after the JMP    
instruction for any type of Relative Jump!] 


因此eb 01到eb 7f向前跳跃eb fe到eb 80向前跳跃eb

当前指令在0x172b066处加上操作码长度2,当前指令在xxxx68处结束,或者下一条指令在0xxxxx68处开始
0xf2 == -0xe(了解二进制补码) /> 0xxxxx68-0xe = 0xxxxx5A