Message board for the users of flat assembler.
> Compiler Internals > minor problems
format binary use16 org 0 head: jmp byte tail rb 65536-4 ;gap tail: jmp byte head
In 16-bit mode, these jmps can be coded as 'EB,FC' and 'EB,00'.
Fasm can't assemble them, though x86 processors execute them
just as expected.
Yes, they look something weird, but there is 'mov es,eax' too.
format binary use16 org 0 top: ret rb 65536-4 ;gap call top
Internally, fasm dose '0-65536' to get the call's operand, I think.
That means fasm accepts -65536 to 65535 as IP-relatives in 16-bit mode.
Displacements are kind of register-relatvies, but fasm rejects them
in the range of -65536 to -32769 like [bx-60000].
Of cource, displacements in the range of -65536 to -65409
and 65408 to 65535 can be optimized by 8-bit values in 16-bit mode.
There are same ploblems in 32-bit mode, though the 'gap' is 4GB.
|11 Nov 2004, 05:21||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar.
Powered by rwasa.