flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > A bit weird "jmp word .label". |
Author |
|
Tomasz Grysztar 06 Jun 2005, 18:23
This happens because in case of jump the size operator applies not to address itself, but to the relative address, since immediate in jumps is the relative offset. In this case the relative offset is both absolute value and fits in the 16 bits, therefore fasm doesn't show any error. Well, you may be right that this can be considered a bit strange, but it actually follows some logic - if size operator was interpreted as applying to address instead, the "jmp byte" wouldn't be accepted by fasm, too.
|
|||
06 Jun 2005, 18:23 |
|
S.T.A.S. 06 Jun 2005, 19:13
I see fasm does its job right. I'd rather say it's a CPU bug , beacuse such relative jump (or call) modifies EIP far away from -8000h/+7FFF range. I never thinked about such thing as a problem before this topic. May be when 'format pe' (or similar) option is set some warning (or error, however both of them may violate fasm philosophy) should appear for every 'jmp/call word' instruction? Anyway 0-FFFF rande isn't addressable under windos.
Added: Oh, no, this shouldn't stop compilation - I imagine some nice anti-debugging trick wiht SEH which can be easily implemented with this feature |
|||
06 Jun 2005, 19:13 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.