News:

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

Main Menu

Push a string onto the stack

Started by Timofeyka, July 09, 2021, 06:30:02 PM

Previous topic - Next topic

Vortex


jj2007

And one more :biggrin:

include \masm32\MasmBasic\MasmBasic.inc
.code
MyTest proc uses edi esi ebx arg1:DWORD, arg2, TheString
LOCAL v1, v2, rc:RECT, buffer[100]:BYTE ; ordinary Locals first
_Local v3=123, v4:REAL4=123.456
_Local x$="Hello World", y$=TheString ; strings can be initialised, too
  ClearLocals ; first line after the LOCALs
  deb 1, "Perfect:", v1, v2, v3, v4, $x$, $TheString
  ret
MyTest endp
Init
  invoke MyTest, 123, 456, Chr$("String passed")
EndOfCode