.TITLE TIME .IDENT /V1.02/ .NLIST TOC,SYM .ENABL LC ; TIME for Whitesmith's C and Pascal. ; ; Author: C.J. Doran, Sira Institute Ltd., ; South Hill, Chislehurst, Kent, BR7 5EH, England. ; ; Assemble as: ; >MAC TIME=TIME ;+ ; Return up to 10-character string containing time in form hh:mm:ss.t, to ; area addressed by entry parameter. String is terminated by a null, so ; the area must actually be 11 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. .MCALL GTIM$S .PSECT C$TEXT TIME:: JSR %5,C$SAV ; Save %0-%5 SUB #16.,SP ; Make room on stack MOV SP,%1 GTIM$S %1 ; for binary date/time ADD #G.TIHR,%1 ; Point to time MOV 4(%5),%0 ; and output area MOV #4,%2 ; Code 4 to give hh:mm:ss.t JSR PC,$TIM ; 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