; TIMEPR - time addition to command line in TurboDOS ; this is the RTDS version of TIMECL ; ; Written : 08-23-84 by S. Kluger ; Updated : 08-25-84 (added station display, made version independent) ; Changed : 01-19-85 (converted for RTDS) ; .z80 ; ; unserialized for general distribution ; ; The following effect is achieved by integrating TIMECL ; into the SYS file: ; ; Before: ; 0A} ; After: ; [17:23 A] 0A} (if nobody logged) ; ^station number ; [17:23 A] |9|0:05: 0A} (with elapsed time if logged) ; use CMDINT + 0C = TIMECL in .PAR file ; cseg ; extrn ocntry ;C-funtion entry point extrn otntry ;T-function entry point extrn clblen ;a pointer public timecl ; timecl: ld a,(clblen+9) or a ;if prompt inhibit... jp nz,skip ;...then don't display time ld c,105 ;time call ld de,time ;work area call ocntry ld hl,timst+1 ld a,(time+2) ;get hours call bytout ;output hours inc hl ld a,(time+3) ;get minutes call bytout ;output minutes ld c,12 call ocntry ld a,e add a,'@' ld (sta),a ld c,9 ld de,timst call ocntry ld a,(ulog##) cp 77h jr nz,skip ;nobody logged on ld a,(uacl##) add a,30h ld (acc),a ld a,(uintm##+2) ld hl,sttim4 call bytout inc hl ld a,(uintm##+3) call bytout call timdf4## ld a,'|' ld (elatm4),a ld c,9 ld de,pel call ocntry ld hl,elatm4+1 call eval10## ld hl,0 ld b,60 ..m60: add hl,de djnz ..m60 ld b,l ;minutes 0..255 into b ld hl,elatm4+3 call eval10## add a,b push af ld a,(uacl##) cp 9 ;if sysop... jr nz,..nskp ;...then never time out pop af jr skip ; ..nskp: ld e,a pop af ld hl,timtbl## add hl,de cp (hl) jr nc,..ot ld hl,(srhdrv##+1) inc hl inc hl ld (hl),0 skip: ld c,32 ;get user code ld e,0ffh jp ocntry ;continue ; bytout: push af rra rra rra rra call nybout pop af nybout: and 0fh add a,'0' ld (hl),a inc hl ret ; ..ot: ld c,9 ld de,otmsg call ocntry ld de,200 ld c,2 call otntry di halt ; dseg ; otmsg: db '<<>>',7,0dh,0ah,'$' time: db 0,0,0,0,0 timst: db '[' entim4::db '00:00 ' sta: db 'A] $' sttim4::db '00:00' pel: db '|' acc: db '0' elatm4::db '00:00| $' end