flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Compiler Internals > All that jumping | 
| Author | 
 | 
| revolution 07 Nov 2010, 14:57 "size of target address" means the usage of either IP (16-bit), EIP (32-bit) or RIP (64-bit). The final size of the assembled jump instruction can still be short or long regardless of the size of (R|E)IP. | |||
|  07 Nov 2010, 14:57 | 
 | 
| revolution 07 Nov 2010, 15:27 Maybe this can help to clear it up:     Code: jmp x ;default is EIP in use32, short or near auto-selected jmp short x ;default is EIP in use32, one byte signed offset jmp near x ;default is EIP in use32, four byte signed offset jmp dword x ;force EIP, short or near auto-selected jmp short dword x ;force EIP, one byte signed offset jmp near dword x ;force EIP, four byte signed offset jmp word x ;force IP, short or near auto-selected jmp short word x ;force IP, one byte signed offset jmp near word x ;force IP, two byte signed offset | |||
|  07 Nov 2010, 15:27 | 
 | 
| SeproMan 07 Nov 2010, 15:28 revolution,
 It then depends solely on the use of the directive USE16/USE32/USE64 Does that mean that in the case of "jmp near" the addition of "WORD/DWORD/QWORD" is pointless? | |||
|  07 Nov 2010, 15:28 | 
 | 
| revolution 07 Nov 2010, 15:34 'word' and 'dword' overrides will control the generation of 0x66 prefix to change the target address size.
 'near' and 'short' overrides will control the generation of 1 byte or 2/4 byte signed offsets. | |||
|  07 Nov 2010, 15:34 | 
 | 
| SeproMan 07 Nov 2010, 15:40 Thanks revolution.
 Perhaps it would not have been so confusing for me, had Thomas not changed the behaviour of the size operator way back in 2006! | |||
|  07 Nov 2010, 15:40 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.