Author Topic: Push a string onto the stack  (Read 1025 times)

Vortex

  • Member
  • *****
  • Posts: 2583
Re: Push a string onto the stack
« Reply #15 on: July 09, 2021, 08:42:02 PM »
Hi Timo,

Here is another example :

Passing strings to the stack

jj2007

  • Member
  • *****
  • Posts: 11551
  • Assembler is fun ;-)
    • MasmBasic
Re: Push a string onto the stack
« Reply #16 on: July 09, 2021, 09:48:27 PM »
And one more :biggrin:

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