Is it possible to add a directive for setting the timestamp of the generated binary file?

Something like:

timestamp year,month,day,hour,minute,second


timestamp integer32

FWIW, it could be implemented something like this:

;set up our variable on the stack
virtual at esp
end virtual
sizeof.ft = FILETIME
sub esp,sizeof.ft
cmp [timestamp_set_in_source],TRUE
jne .auto_timestamp
;timestamp was set in the source code so use it now
mov [systime.wYear],sourcecode.year
mov [systime.wMonth],sourcecode.month
mov [systime.wDay],
mov [systime.wHour],sourcecode.hour
mov [systime.wMinute],sourcecode.minute
mov [systime.wSecond],sourcecode.second
mov [systime.wMilliseconds],0
mov eax,esp
invoke SystemTimeToFileTime,systime,eax
mov ecx,[ft.dwLowDateTime]
mov eax,[ft.dwHighDateTime]
jmp .set_the_timestamp
;get the current system time and use that
mov eax,esp
invoke GetSystemTimeAsFileTime,eax
mov ecx,[ft.dwLowDateTime]
mov eax,[ft.dwHighDateTime]
;subtract the count up to 1970-01-01
sub ecx,0D53E8000h
sbb eax,0019DB1DEh
;divide out the 100ns resolution
mov ebx,10000000 ;1/100ns
xor edx,edx
div ebx
xchg eax,ecx
div ebx
;the high order result in ECX will be zero until FEB-7-2003
;otherwise the value in EAX is what we want
add esp,sizeof.ft

Posted on 2003-05-18 07:39:25 by revolution
;the high order result in ECX will be zero until FEB-7-2003

Oops, that date should be FEB-7-2106
Posted on 2003-05-28 10:06:22 by revolution