Hi johnsa.
I am not familiar with asm x64. This is my first program, so I don’t know it’s my mistake or hjwasm bug or maybe it fixed in 2.23 version, because i test all in 2.22 version.
Simple source:
.686P
.x64
option casemap :none
option win64 : 11
option frame : auto
option stackbase : rsp
include WINDOWS.INC
includelib user32.lib
includelib Kernel32.Lib
.data
Text db '0123456789',0
.code
ShowMessage proc FRAME
LOCAL TxtBuff[11]:byte
LOCAL Flag:BOOL
invoke ZeroMemory,addr TxtBuff,sizeof(TxtBuff)
invoke lstrcpy,addr TxtBuff,addr Text
invoke MessageBox,0,addr TxtBuff,"Info",MB_OK
; ---------------------------
; "Info" < Why double quote added to the text ???
; ---------------------------
; 0123456789 < Text is ok.
; ---------------------------
; OK
; ---------------------------
mov Flag,TRUE
invoke MessageBox,0,addr TxtBuff,"Info",MB_OK
; ---------------------------
; "Info" < Why double quote added to the text ???
; ---------------------------
; 01234567 < "89" was rewritten by "mov Flag,TRUE"
; ---------------------------
; OK
; ---------------------------
ret
ShowMessage endp
start proc FRAME
invoke ShowMessage
invoke ExitProcess,0
start endp
end start
Besides, could you explain when I need to add “FRAME” after the “proc”? I can’t find any info about it.