format elf
section '.text'
use32
public foo
foo:
mov al,[var]
mov al,[ebx+var]
ret
use16
public foo16
foo16:
mov al,[var];usesaddressprefixand32-bitdisplacement;moval,[bx+var];error:addresssizesdonotagree.
ret
section '.data'
var db 0
FASM seems to only support 32-bit relocations in the ELF format:
#define R_386_32 1
#define R_386_PC32 2
NASM and GNU as support 16-bit ones as well:
#define R_386_16 20
#define R_386_PC16 21
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum