Can anybody explain exactly what the following gas macro is doing, so I can convert it to a masm macro?
macro PUSHRSP reg
lea -4(%ebp),%ebp
movl \reg,(%ebp)
.emdm
Thanks.
The conversion part is easy:
PUSHRSP macro reg
lea ebp, [ebp-4]
mov [ebp], reg
ENDM
The question is if it does something useful ::)
Ahh - thanks. Now I know what it does.
Jochen,
Quote from: jj2007 on August 14, 2014, 11:22:50 AM
The conversion part is easy:
PUSHRSP macro reg
lea ebp, [ebp-4]
mov [ebp], reg
ENDM
The question is if it does something useful ::)
that should be useful? I've my doubts. Anyway, you're now a specialist for AT&T syntax. :t
Gunther
That AT&T syntax looks always ugly. Not an easily readable notation.
I bet jj2007 loves it :biggrin:
Quote from: Vortex on August 15, 2014, 04:04:57 AM
That AT&T syntax looks always ugly. Not an easily readable notation.
not surprisingly for a back-end assembler that was never intended for human usage, even if there are some geniuses who claims the opposite 8)
There is a directive you can use to switch as to the familiar Intel syntax:
.intel_syntax noprefix
In recent times even gcc supports Intel syntax, for inline assembly and the back-end assembler.
Michael,
Quote from: MichaelW on August 15, 2014, 08:01:07 PM
There is a directive you can use to switch as to the familiar Intel syntax:
.intel_syntax noprefix
In recent times even gcc supports Intel syntax, for inline assembly and the back-end assembler.
and with that directive, as performs good.
Gunther