flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 25 Jan 2015, 16:35
Your code for n=9 is not a nop "mov [ss:esp-4],dword 0" alters the stack.
To detect 16/32 bit mode you can use something like this: Code: virtual at 0 xchg eax,eax detected_16bit = $-1 end virtual if detected_16bit ;... end if |
|||
![]() |
|
l4m2 26 Jan 2015, 03:28
revolution wrote: Your code for n=9 is not a nop "mov [ss:esp-4],dword 0" alters the stack. Yes it did modified [esp-4] but that's out of the stack. Anytime it gets changed. |
|||
![]() |
|
revolution 26 Jan 2015, 03:39
l4m2 wrote: Yes it did modified [esp-4] but that's out of the stack. Anytime it gets changed. |
|||
![]() |
|
revolution 17 Feb 2023, 10:33
In a similar way it is possible to determine the current 16/32/64 bit mode with this:
Code: virtual at 0 inc ax native_size = 1 shl $ end virtual It works because of the different encodings. Code: use16 inc ax ;0x40 use32 inc ax ;0x66, 0x40 use64 inc ax ;0x66, 0xff, 0xc0 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.