Hi,
I am coding a masm32 project and I like to indicate when there is an error the line number and the source file name where it occurs.
In C this is accomplished with the __FILE__ and __LINE__ macros.
I am thinking if there is an equivalent in masm32.
Thanks in advance for your answer.
This is line 5 of tmp_file.asm
Like this?
include \masm32\include\masm32rt.inc
.code
start:
tmp$ CATSTR <print chr$("This is line >, %@Line, < of >, @FileCur, <", 13, 10)>
tmp$
inkey "Press any key"
exit ; short form of invoke ExitProcess, 0
; to add a proc, put the cursor here and click on AutoCode, Procedure
end start
Hi,
A big thank you to jj2007.
Your answer works fine.
Best regards.