In the absence of just a simple list of how to do labels, memory accesses, imports, exports etc, I'm just trying trial and error. I tried this program:
CODE SECTION
main:
sub RSP,8
sub RSP,32
mov RCX,addr KK1
call puts
add RSP,32
mov EAX,0
sub RSP,32
call exit
DATA SECTION
;string table:
KK1: db 'Hello World!',10,0
It was compiled with:
goasm /x64 hello.asm64
And linked with:
golink /entry main hello.obj \windows\system32\msvcrt.dll
It produces a 2KB file hello.exe which runs, but doesn't show any output. Anyone know what's wrong my the code?
Also, I understand that the label KK1 is automatically exported, so might clash with the same label used in another module. How to define a label that is local to this file?
Thanks.