home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / TURBODSG / TIMECL1.MAC < prev    next >
Text File  |  2000-06-30  |  1KB  |  77 lines

  1. ; TIMECL - time addition to command line in TurboDOS
  2. ; This is version 1.2
  3. ;
  4. ; Written : 08-23-84 by S. Kluger
  5. ; Updated : 08-25-84 (added station display, made version independent)
  6. ;
  7. .z80
  8. ;
  9. ; unserialized for general distribution
  10. ;
  11. ; The following effect is achieved by integrating TIMECL
  12. ; into the SYS file:
  13. ;
  14. ; Before:
  15. ; 0A}
  16. ; After:
  17. ; [17:23 A] 0A}
  18. ;     ^station number
  19. ; use CMDINT + 0C = TIMECL in .PAR file
  20. ;
  21.     cseg
  22. ;
  23.     extrn    cintry        ;C-funtion entry point
  24.     extrn    otntry        ;T-function entry point
  25.     extrn    clblen        ;a pointer
  26.     public    timecl
  27. ;
  28. timecl:    ld    c,12        ;TD version call
  29.     call    otntry
  30.     ld    a,c
  31.     cp    14h        ;if not 1.4...
  32.     jr    nz,dotime    ;...then do it no matter what
  33.     ld    a,(clblen+9)
  34.     or    a        ;if prompt inhibit...
  35.     jr    nz,skip        ;...then don't display time
  36. dotime:    ld    c,105        ;time call
  37.     ld    de,time        ;work area
  38.     call    cfcn
  39.     ld    hl,timst+1
  40.     ld    a,(time+2)    ;get hours
  41.     call    bytout        ;output hours
  42.     inc    hl
  43.     ld    a,(time+3)    ;get minutes
  44.     call    bytout        ;output minutes
  45.     ld    c,12
  46.     call    cfcn
  47.     ld    a,e
  48.     add    a,'@'
  49.     ld    (sta),a
  50.     ld    c,9
  51.     ld    de,timst
  52.     call    cfcn
  53. skip:    ld    c,32        ;get user code
  54.     ld    e,0ffh
  55. cfcn:    ld    a,0ffh
  56.     jp    cintry
  57. ;
  58. bytout:    push    af
  59.     rra
  60.     rra
  61.     rra
  62.     rra
  63.     call    nybout
  64.     pop    af
  65. nybout:    and    0fh
  66.     add    a,'0'
  67.     ld    (hl),a
  68.     inc    hl
  69.     ret
  70. ;
  71.     dseg
  72. ;
  73. time:    db    0,0,0,0,0
  74. timst:    db    '[00:00 '
  75. sta:    db    'A] $'
  76.     end
  77.