Microsoft KB Archive/79844

= Embedding the Assembly Date and Time in a MASM 6.0 Object =

Article ID: 79844

Article Last Modified on 10/16/2003

-

APPLIES TO


 * Microsoft Macro Assembler 6.0 Standard Edition
 * Microsoft Macro Assembler 6.0a
 * Microsoft Macro Assembler 6.0b

-



This article was previously published under Q79844



SUMMARY
In the Microsoft Macro Assembler (MASM) version 6.0, predefined symbols for the date and time of assembly were introduced. They are:

@Date

@Time

These symbols can be used to construct strings that contain the date and time.



MORE INFORMATION
The following sample code demonstrates two methods of embedding the information in a string in the object. Date1 and Time1 are constructed using one method, Date2 and Time2 using the other. Assemble with /Fl to get a listing that shows the expansion.

Sample Code
/* Assemble options needed: none

.MODEL small .STACK .DATA

tmp        equ <> tmp        CatStr <&quot;>, @Date, <&quot;> Date1      byte tmp

tmp        equ <> tmp        CatStr <&quot;>, @Time, <&quot;> Time1      byte tmp

%Date2     byte &quot;&@Date&quot;

%Time2     byte &quot;&@Time&quot;

.CODE

start: mov ax, @data mov ds, ax

mov ah, 4ch int 21h

END start

Additional query words: kbinf 6.00 6.00a 6.00b

Keywords: KB79844

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.