Hi
I playing a little with Visual studio and have found an example it build infos date and time at compile the project
this is define in the source
SetDlgItemText(hDlg, IDC_BUILD, "Built on "__DATE__ " at " __TIME__"");
is this possible for Masm?
i think there is a masm32 macro that allows inline text ("inv", maybe or "rv")
or - you can define the string in the .DATA section and pass a pointer
Plain Masm32:
tmp$ CATSTR <chr$("Built on >, @Date, < at >, @Time, <")>
invoke SendMessage, hEdit, WM_SETTEXT, 0, tmp$
MasmBasic:
SetWin$ (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1092) hEdit="Built on "+CrtDate$ (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1168)+" at "+CrtTime$ (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1169)
Slightly more ambitious:
SetWin$ (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1092) hEdit="Launched on "+Date$ (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1168)+" at "+Time$ (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1169)
Quote from: ragdog on January 11, 2014, 07:38:09 AM
Hi
I playing a little with Visual studio and have found an example it build infos date and time at compile the project
this is define in the source
SetDlgItemText(hDlg, IDC_BUILD, "Built on "__DATE__ " at " __TIME__"");
is this possible for Masm?
This works.
Andy
.data
%Date db " &@Date " ; Compile date
%time db " &@Time"
Thank you it works
Quotetmp$ CATSTR <chr$("Built on >, @Date, < at >, @Time, <")>
invoke SendMessage, hEdit, WM_SETTEXT, 0, tmp$
@Date or @Time is this a macro or define in the linker oder ml?
Quote from: ragdog on January 12, 2014, 03:35:13 AM
@Date or @Time is this a macro or define in the linker oder ml?
They are Masm/JWasm "built-in" macros (@CatStr, @code, @CodeSize, @Cpu, @CurSeg, @data, @DataSize, @Date, @Environ, @fardata, @fardata?, @FileCur, @FileName, @InStr, @Interface, @Line, @Model, @SizeStr, @stack, @SubStr, @Time, @Version, @WordSize).