flat assembler
Message board for the users of flat assembler.
Index
> Main > Mixing x86 and x64 code |
Author |
|
Bargest 10 Jun 2012, 21:05
If I understand you:
Code: use64 ; any x64 code here use32 ; any x32 code here use64 ; any x64 code here use32 ; any x32 code here use64 ; any x64 code here ... |
|||
10 Jun 2012, 21:05 |
|
nts94 10 Jun 2012, 22:19
Thank you, that's exactly what i was looking for!
|
|||
10 Jun 2012, 22:19 |
|
Feryno 11 Jun 2012, 07:30
and here you have ready samples for win
http://board.flatassembler.net/topic.php?p=140791#140791 |
|||
11 Jun 2012, 07:30 |
|
nts94 11 Jun 2012, 19:18
Thanks for the examples, but i was faster (hehe) and i coded it before reading them (even so, they were useful, thanks)
Now my question is: i've coded the seh handler, and if anything goes wrong, it redirects me to the x86 mode. Anyway, i need to return from both functions (x64 and x86 mode) with a 32 bits retf (it doesn't make much sense to me, but it works), so i can't declare them with proc and endp, but i need to declare some locals in both of them, so, is there any way to declare local vars in an ebp-frame-less function? Is there any ready-made macro for this? (in general, it would be useful to have this kind of macro, because there is no need for an EBP-frame, and this wastes a valuable register) Note: i've read the documentation, and it states that there is a macro that is called whenever fasm has to make a prologue, but i'm looking for a reusable solution (i'm still learning about the preprocessor, i'm very amazed about things like load and store; it is very powerful!) |
|||
11 Jun 2012, 19:18 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.