News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

"Arguments"?

Started by bobl, May 17, 2013, 12:09:04 AM

Previous topic - Next topic

bobl

I'm just picking up the stuff I started some days ago and need to compare each string in a char**.
I saw this example re string comparison...thanks for it.

http://masm32.com/board/index.php?topic=1375.15
Proc FastStringCompare:
    Arguments @String1, @String2
    Uses esi, ecx, ebx, edx

    mov esi D@String1
    mov ebx D@String2

I've seen "Uses" in help but can't find "Arguments"
Also, I don't know what "@" as in "@String1" or "D@" as in "mov esi D@String1" means.
Any advice much appreciated.

dedndave

that syntax looks like it's for some assembler other than masm

MyFunc  PROC USES EBX ESI EDI arg1:LPSTR,arg2:LPSTR

        mov     esi,arg1
        mov     edi,arg2
;
;
;
        ret

MyFunc  ENDP


masm generates a prologue and epilogue that sets up the stack frame and balances the stack on exit
with USES, it also preserves the registers in the list (no commas)
although, i am not fond of the order it does things
i sometimes write my own stack frame prologue and epilogue to get the order i prefer   :P

bobl

that certainly explains my difficulty...
I'll look into prologue and epilogue...
thank you very much for your explanation