.TITLE DATE .IDENT /V1.02/ .NLIST TOC,SYM .ENABL LC ; DATE for Whitesmith's C and Pascal. ; ; Author: C.J. Doran, Sira Institute Ltd., ; South Hill, Chislehurst, Kent, BR7 5EH, England. ; ; Assemble as: ; >MAC DATE=DATE ;+ ; Return up to 9-character string containing date in form dd:mmm:yy, to ; area addressed by entry parameter. String is terminated by a null, so ; the area must actually be 10 bytes long. ;- ; MODIFICATIONS RECORD ; ==================== ; V1.02 11-Nov-82 CJD ; Compute string length, rather than assume it to be 9 chars, in case ; day is in range 1-9 and zero-suppressed. .MCALL GTIM$S .PSECT C$TEXT DATE:: JSR %5,C$SAV ; Save %0-%5 SUB #16.,SP ; Make room on stack MOV SP,%1 GTIM$S %1 ; for binary date/time MOV 4(%5),%0 ; Point to output area JSR PC,$DAT ; Use Syslib routine for conversion CLRB @%0 ; Terminate string with null SUB 4(%5),%0 ; Return no of chars in string JMP C$RET ; Restore %2-%6, and return .END