hello GoneFishing;
I was not able to use invoke on printf function, so I hand coded that.
;--- "hello world" for 64-bit Linux, using SYSCALL and SYSVCALL convention.
;--- assemble: HJWasm -elf64 -Fo=Lin64_2.o Lin64_2.asm
;--- link: gcc Lin64_2.o -o Lin64_2
;--- ld -o Lin64_2 -dynamic-linker /lib64/l4.so.2 /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o -lc Lin64_2.o /usr/lib/x86_64-linux-gnu/crtn.o
.x64
puts proto systemv pchar:ptr
exit proto systemv status:dword
printf proto systemv ;;;:ptr VARARG
.data
format db "%s %d",0
number db 42,0
string db "string",0
.code
main PROC SYSTEMV
invoke puts, addr string
; invoke printf, addr format, addr string, addr number
lea rdx,number
lea rsi,string
lea rdi,format
mov rax,0 ;<-printf function, 0 members on xmm registers
call printf
invoke exit,0
main ENDP
endPrintf function on linux look to register rax with how many xmm registers are being used, so I setup that with zero.