NASM Forum > Programming with NASM
Procedure not requiring automatic register saves
(1/1)
TemPiQ:
Please forgive me if this question has been asked already.
I have sought in the forum for some time now without success.
I need a procedure that does not require automatic register saves or will not access the register spill area.
That means no need to use the EBP register
However if I code somthing like this:
--- Code: ---proc Sample1
RDTSC
MOV DWORD[EDI],EAX
MOV EAX,EDI
RETN
endproc
--- End code ---
nasm will compile as follows:
--- Code: ---Sample1:
PUSH EBP
MOV EBP,ESP
RDTSC
MOV DWORD[EDI],EAX
MOV EAX,EDI
RETN
--- End code ---
Thanks
@Frank Kotler:
Sorry I forgot the "endproc" which I have included now in the edited post
Frank Kotler:
"proc"? What is "proc"? Not Nasm. Whatever it is, you probably want to get rid of it, since it is apparently generating code you don't want.
Best,
Frank
Navigation
[0] Message Index
Go to full version