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 / TCHECK.MAC < prev    next >
Text File  |  2000-06-30  |  873b  |  65 lines

  1.     title    "tShell check utility"
  2. ;
  3. ;    (c) 1985 S. Kluger. All Rights Reserved.
  4. ;
  5. ;    This program displays the contents of TSHELL.LOG
  6. ;
  7. .z80
  8. .request syslib
  9. ;
  10. cr    equ    0dh
  11. lf    equ    0ah
  12. cfunc    equ    5
  13. tfunc    equ    50h
  14. ;
  15.     dseg
  16. ;
  17.     include    TSHELL.DEF
  18. ;
  19. logfcb:    db    1,'TSHELL  LOG',0,0,0,0
  20.     ds    100
  21. stack    equ    $
  22. ;
  23.     cseg
  24. ;
  25. start:    ld    sp,stack
  26.     ld    c,26
  27.     ld    de,LCLID
  28.     call    cfunc
  29.     ld    bc,41
  30.     ld    h,0
  31.     call    tfunc
  32.     ld    a,(LCLLV)    ; get access level
  33.     cp    12h        ; sysadmin, full?
  34.     jr    z,admin        ;   yes, skip
  35.     call    print##
  36.     cr,lf
  37.     'Cannot execute',cr,lf,7,0
  38.     rst    0
  39. ;
  40. admin:    ld    c,32
  41.     ld    e,31
  42.     call    cfunc        ; log into 31:
  43.     ld    de,80h
  44.     ld    c,26
  45.     call    cfunc
  46.     ld    de,logfcb
  47.     call    f$open##    ; open log
  48.     jp    nz,nolog    ;   failed to open log
  49. rdlp:    call    f$read##    ; read a block
  50.     jr    nz,endlog    ; quit if done
  51.     ld    hl,80h
  52. dsplp:    ld    a,(hl)        ; get tag byte
  53.     cp    1ah        ; tag?
  54.     jr    nz,endlog    ;   no, must be done
  55.     
  56.  
  57.  
  58. endlog:
  59.  
  60.  
  61. nolog:
  62.  
  63.  
  64.     end
  65.