Hello everyone,
I admit to being pretty bad with masm64, but I'm trying. Anyway, the following silly program is throwing errors from ml.exe that I don't understand. Here it is:
include \masm32\include64\masm64rt.inc
printf PROTO :QWORD, VARARG
.data
frmt1 BYTE "%s",0
msg1 BYTE "rax is not 0",0
msg2 BYTE "rax is equal to 0",0
.code
main PROC
mov rax, 100
IF rax GT 0
invoke printf, ADDR frmt1, ADDR msg1
ELSE invoke printf, ADDR frmt1, ADDR msg2
ENDIF
ret
main ENDP
END
The IF statement causes this error: "error a2095: constant or relocatable label expected"
The ELSE statement causes this error: "error a2008:syntax error: invoke printf, addr frmt1, addr msg2"
I'm particularly puzzled by the reference to "relocatable label". Maybe "rax" is not relocatable, but what would be? How would I make one? But, I also don't see what's wrong with the invoke call.
BTW, perhaps this post belongs more on The Campus forum. If so, my apologies