Author Topic: "Arguments"?  (Read 1092 times)

bobl

  • Member
  • **
  • Posts: 70
"Arguments"?
« on: May 17, 2013, 12:09:04 AM »
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.
Code: [Select]
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

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
Re: "Arguments"?
« Reply #1 on: May 17, 2013, 12:27:06 AM »
that syntax looks like it's for some assembler other than masm

Code: [Select]
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

  • Member
  • **
  • Posts: 70
Re: "Arguments"?
« Reply #2 on: May 17, 2013, 12:29:37 AM »
that certainly explains my difficulty...
I'll look into prologue and epilogue...
thank you very much for your explanation