.TITLE TIME .IDENT /V1.03/ .ENABL DBG ; TIME for Whitesmith's C and Pascal. VAX/VMS version. ; ; Author: C.J. Doran, Sira Ltd., South Hill, Chislehurst, Kent, BR7 5EH, England. ; Tel: +44 1 467 2636, Telex: 896649, Fax: +44 1 467 6515 ; ; Assemble as: ; >MACRO TIME ;+ ; Return 11-character string containing time in form hh:mm:ss.tt, to ; area addressed by entry parameter. String is terminated by a null, so ; the area must actually be 12 bytes long. ;- ; MODIFICATIONS RECORD ; ==================== ; V1.02 11-Nov-82 CJD ; Compute string length, rather than assuming it to be 11 bytes, in ; case of zero suppression. ; ; V1.03 7-Aug-85 CJD ; VAX/VMS version. Note that "ticks" become 1/100 sec, and are 2 digits. .PSECT C$TEXT,SHR,NOWRT,QUAD .ENTRY TIME,^M<> PUSHL 4(AP) ; Form a string descriptor PUSHL #11 ; For 11-char string MOVL SP,R1 ; Load pointer to it PUSHL #1 ; CVTFLG=0 PUSHL #0 ; TIMADR=0 -- fetch TIME now PUSHR #^M ; TIMBUF-> string descriptor PUSHL #0 ; TIMLEN=0 -- not needed CALLS #4,G^SYS$ASCTIM ; Get ASCII TIME MOVL #11,R0 ; Always 11 chars CLRB @4(AP)[R0] ; Terminate string with null RET ; Done .END