Hello.
Here is short piece of code, which compiles Ok, but might be considered as a bug:
format pe
jmp word @f
@@: nop
Fasm emits the 66h prefix, so JMP instruction with E9h opcode has a word-sized relative displacement. This is allright, of cource. When CPU executes such command, the ESP register becomes 00001004h (this is right as well).
The problem is: the @@ label has addres equal to 00401004h. May be it would be better to indicate an error in such situation? Some compile-time check might be done to be sure the jump address fits the 0000XXXXh limit. This should also help when one really want to use JMP with 66 E9 opcode to 0000XXXXh address from some 'out of range' address.
Regards.