flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 16 Nov 2011, 23:17
You can do this sort of thing with macros:
Code: macro jmp dest { local .x virtual jmp near dest load .x dword from $-4 end virtual if .x >= 0xffffff80 | .x <= 0x0000007f jmp short dest else if dest and not 0xffff = 0 jmp word dest else jmp dest end if } use32 org 0 jmp 0 jmp 128 jmp 150 jmp 0xffff jmp 0x1000f org 0x10000 jmp 0 jmp 128 jmp 150 jmp 0xffff jmp 0x1000f |
|||
![]() |
|
CandyMan 17 Nov 2011, 15:26
This macro is in conflict with far jmp
|
|||
![]() |
|
revolution 17 Nov 2011, 15:33
The macro is just an example. You can extend to whatever your needs require.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.