flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > converting 64-bit registers into 32-bit registers |
Author |
|
bitRAKE 09 Mar 2013, 01:49
One option would be to reverse the following macro:
http://board.flatassembler.net/topic.php?p=98098#98098 |
|||
09 Mar 2013, 01:49 |
|
baldr 09 Mar 2013, 08:01
Hugh Aguilar,
There are several methods, I've thought about somewhat indirect one: Code: macro clr reg* { irps suffix, ax cx dx bx sp bp si di \{ r\#suffix equ e\#suffix \} xor reg, reg restore rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi } |
|||
09 Mar 2013, 08:01 |
|
Hugh Aguilar 13 Mar 2013, 04:50
baldr wrote: Hugh Aguilar, I will give that a try. This won't work for the upper registers as they have a different syntax (R13 vs R13D rather than RBP vs EBP), but I may be able to upgrade it. If not, I may be able to get by with only the lower registers. I thought I remembered a simple way to do this, but I searched the FASM manual and couldn't find it. I may have been remembering NASM or HLA --- learning more than one assembler at a time has resulted in a mismatched jumble of information in my head! For the most part, FASM is working out well for me --- I haven't run into much that it couldn't do. |
|||
13 Mar 2013, 04:50 |
|
baldr 13 Mar 2013, 05:11
Hugh Aguilar,
There's no reason to use it for r8d…r15d — their usage requires REX prefix too (though slightly different one). |
|||
13 Mar 2013, 05:11 |
|
Hugh Aguilar 13 Mar 2013, 06:55
baldr wrote: Hugh Aguilar, Good point. I'll go with what you provided. Thanks. |
|||
13 Mar 2013, 06:55 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.