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 / TLRS.MAC < prev    next >
Text File  |  2000-06-30  |  1KB  |  91 lines

  1.     title    "Last System Reset Display"
  2. ;
  3. ;    (c) 1985 S. Kluger. All Rights Reserved.
  4. ;
  5. ;    Displays date/time of last system reset
  6. ;
  7. cr    equ    0dh
  8. lf    equ    0ah
  9. tfunc    equ    50h
  10. jconv    equ    10958
  11. ;
  12. .z80
  13. .request syslib
  14. ;
  15.     dseg
  16. ;
  17. @dcfld:: db    '00/00/00 at ',0
  18. id:    db    '.tShell.'
  19. offset:    db    0
  20. ;
  21. ;
  22.     cseg
  23. ;
  24. start:    ld    de,80h
  25.     ld    hl,id
  26.     ld    bc,8
  27.     ldir
  28.     ld    bc,0fe29h
  29.     ld    de,0
  30.     ld    l,0
  31.     call    tfunc
  32.     or    a
  33.     jp    z,fatal
  34.     ld    bc,0fe29h
  35.     ld    de,0
  36.     add    a,14
  37.     ld    l,a
  38.     call    tfunc
  39.     call    print##
  40.     cr,lf,lf
  41.     'Last system reset occurred on ',0
  42.     call    time
  43.     call    print##
  44.     cr,lf
  45.     'Last slave reset occurred on  ',0
  46.     ld    bc,41
  47.     ld    l,0
  48.     call    tfunc
  49.     or    a
  50.     jp    z,fatal
  51.     ld    bc,41
  52.     add    a,14
  53.     ld    l,a
  54.     call    tfunc
  55.     call    time
  56.     call    print##
  57.     cr,lf,lf,0
  58.     rst    0
  59. ;
  60. time:    push    bc
  61.     push    de
  62.     ld    de,-jconv
  63.     add    hl,de
  64.     call    @dcvrt##
  65.     ld    hl,@dcfld
  66.     call    pstr##
  67.     pop    de
  68.     ld    a,d
  69.     call    ..10
  70.     ld    a,':'
  71.     call    cout##
  72.     ld    a,e
  73.     call    ..10
  74.     ld    a,':'
  75.     call    cout##
  76.     pop    bc
  77.     ld    a,b
  78. ..10:    cp    10
  79.     jr    nc,..10.
  80.     push    af
  81.     ld    a,'0'
  82.     call    cout##
  83.     pop    af
  84. ..10.:    jp    pafdc##
  85. ;
  86. fatal:    call    print##
  87.     cr,lf,lf,7
  88.     'ERROR: tShell not installed',cr,lf,lf,0
  89.     rst    0
  90.     end
  91.