Has I said, (64bits), linux, unix, machos, defaults to SYSTEMV or the 64bits syscall wai. (cdecl or c call or syscall or fastcall) ignored in 64 bits (windows, unix, linux, machos).
UASM defaults to generic rsp thing, wen using other convention than systemv. The thing breaks with miss stack convention.
So this is the same as using systemv with proc proto thing.
OPTION PROC:DEFAULT
;; ***************************************
;; *** @main argc,argv ***
;; *** Source: Main64.txt Line: 1 ***
;; ***************************************
.DATA
ALIGN 1
DynamicString_Main64_1 BYTE "Hello World",0
.CODE
;; MST generated alignment code.
IFDEF MST_PROCALIGN
ALIGN MST_PROCALIGN
ENDIF
main PROC argc:QWORD,argv:QWORD ;; here not specifiing the call later can be change above or force the call including SYSTEMV
SUB RSP,16
PUSH RBX
PUSH R12
PUSH R13
PUSH R14
PUSH R15
MOV R15,[RBP]
MOV [RBP-16],R15
MOV R15,[RBP+8]
MOV [RBP-16+8],R15
SUB RBP,16
mov [rbp+16],rdi
mov [rbp+24],rsi
;; ***Code: (2) @C.printf{"Hello World"}
printf PROTO :PTR, :VARARG ;; were force the correct call
PUSH RSI
PUSH RDI
MOV R12,RSI
MOV R13,RDI
PUSH RSP
PUSH QWORD PTR [RSP]
AND SPL,0F0h
LEA RDI,DynamicString_Main64_1
XOR RAX,RAX
CALL printf
ADD RSP,8
POP RSP
POP RDI
POP RSI
POP R15
POP R14
POP R13
POP R12
POP RBX
ADD RSP,16 ;; restore stack alignment
ret 16
main ENDP
END
And with all this, o got it all my code cleaned-up, systemv de facto a standard for all 64bits unix distros.