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 / SYSTAT.MAC < prev    next >
Text File  |  2000-06-30  |  3KB  |  256 lines

  1. ; SYSTAT ver 1.00 by ESKAY
  2. ; Created (big bang) 13 Jul 85
  3. ;
  4. cr    equ    0dh
  5. lf    equ    0ah
  6. cfunc    equ    5
  7. tfunc    equ    50h
  8. ;
  9. .z80
  10. .request syslib
  11. ;
  12. start:    ld    sp,stack
  13.     call    print##
  14.     cr,lf,lf
  15.     'SYSTAT v1.00 by ESKAY',cr,lf,lf
  16.     'TurboDOS Version ',0
  17.     ld    c,12
  18.     call    tfunc
  19.     ld    a,c
  20.     and    0f0h
  21.     rra
  22.     rra
  23.     rra
  24.     rra
  25.     or    30h
  26.     call    cout##
  27.     ld    a,'.'
  28.     call    cout##
  29.     ld    a,c
  30.     and    0fh
  31.     or    30h
  32.     call    cout##
  33.     call    print##
  34.     ', TurboDOS Serial Number ',0
  35.     call    phlfdc##
  36.     ld    a,'/'
  37.     call    cout##
  38.     ex    de,hl
  39.     call    phlfdc##
  40.     call    print##
  41.     ', ',0
  42.     ld    a,b
  43.     or    a
  44.     jr    nz,..pri
  45.     call    print##
  46.     'Non-',0
  47. ..pri:    call    print##
  48.     'Privileged logon.',cr,lf,0
  49.     ld    c,43
  50.     ld    e,0ffh
  51.     call    tfunc            ; get current bank
  52.     push    af            ; save it
  53.     ld    c,43
  54.     ld    e,1
  55.     call    tfunc            ; set to bank 1
  56.     ld    c,43
  57.     ld    e,0ffh
  58.     call    tfunc            ; check bank
  59.     or    a            ; bank 1 active?
  60.     jr    nz,..bnk
  61.     call    print##
  62.     'Non-',0
  63. ..bnk:    call    print##
  64.     'Banked system (current bank = ',0
  65.     pop    af            ; get original bank
  66.     call    pafdc##
  67.     ld    e,a
  68.     ld    c,43
  69.     call    tfunc            ; if changed, set back
  70.     call    print##
  71.     ') on circuit ',0
  72.     ld    c,12
  73.     call    cfunc
  74.     ld    a,d
  75.     call    pafdc##
  76.     call    print##
  77.     ', node ',0
  78.     ld    a,e
  79.     call    pafdc##
  80.     call    print##
  81.     '. CP/M version ',0
  82.     ld    a,l
  83.     and    0f0h
  84.     rra
  85.     rra
  86.     rra
  87.     rra
  88.     or    30h
  89.     call    cout##
  90.     ld    a,'.'
  91.     call    cout##
  92.     ld    a,l
  93.     and    0fh
  94.     or    30h
  95.     call    cout##
  96.     call    print##
  97.     cr,lf
  98.     'Memory free in current bank: ',0
  99.     ld    hl,(6)
  100.     dec    h
  101.     call    phlfdc##
  102.     call    print##
  103.     ' bytes (top of TPA = ',0
  104.     inc    h
  105.     dec    hl
  106.     call    phl4hc##
  107.     call    print##
  108.     'H).',cr,lf,'Default drive is ',0
  109.     ld    c,25
  110.     call    cfunc
  111.     ld    e,a
  112.     ld    c,19
  113.     call    tfunc
  114.     bit    7,a
  115.     jr    z,..rem
  116.     call    print##
  117.     'fixed',0
  118.     jr    ..rfd
  119. ;
  120. ..rem:    call    print##
  121.     'removable',0
  122. ..rfd:    and    7
  123.     ld    b,a
  124.     ld    a,1
  125.     dec    b
  126.     dec    b
  127. cbls:    dec    b
  128.     jr    z,cble
  129.     add    a,a
  130.     jr    cbls
  131. ;
  132. cble:    call    print##
  133.     ', block size = ',0
  134.     call    pafdc##
  135.     ld    b,a            ; save block size
  136.     call    print##
  137.     'k. Disk has ',0
  138.     ex    de,hl
  139.     call    phlfdc##
  140.     call    print##
  141.     ' free blocks.',cr,lf
  142.     'Accessible drives are : ',0
  143.     ld    c,24
  144.     call    cfunc
  145.     ld    a,'A'
  146.     ld    b,8
  147.     call    ..rh
  148.     ld    l,h
  149.     ld    b,8
  150.     call    ..rh
  151.     call    print##
  152.     cr,lf
  153.     'Number of buffers: ',0
  154.     ld    c,24
  155.     call    tfunc
  156.     ld    a,h
  157.     call    pafdc##
  158.     call    print##
  159.     '. Buffer size: ',0
  160.     ld    b,l
  161.     ld    hl,64
  162.     inc    b
  163. ..bfs:    add    hl,hl
  164.     djnz    ..bfs
  165.     call    phlfdc##
  166.     call    print##
  167.     ' bytes.',cr,lf
  168.     'Current printing set to ',0
  169.     ld    c,27
  170.     ld    de,0ffffh
  171.     ld    b,d
  172.     call    tfunc
  173.     inc    l
  174.     dec    l
  175.     jr    z,prdir
  176.     dec    l
  177.     jr    z,prspl
  178.     call    print##
  179.     'CONSOLE',cr,lf,0
  180.     jr    prend
  181. ;
  182. prdir:    call    print##
  183.     'DIRECT TO PRINTER ',0
  184.     ld    a,h
  185.     add    a,'@'
  186.     call    cout##
  187.     call    crlf##
  188.     jr    prend
  189. ;
  190. prspl:    call    print##
  191.     'SPOOLER ON DRIVE ',0
  192.     add    a,'A'
  193.     call    cout##
  194.     ld    a,h
  195.     or    a
  196.     jr    z,pren0
  197.     call    print##
  198.     ' TO QUEUE ',0
  199.     add    a,'@'
  200.     call    cout##
  201. pren0:    call    crlf##
  202. prend:    call    print##
  203.     'System printer assignments : ',cr,lf,0
  204.     ld    b,0
  205. syspl:    push    bc
  206.     ld    de,0ffffh
  207.     ld    c,29
  208.     call    tfunc
  209.     inc    a            ; valid?
  210.     jr    z,invp1
  211.     call    print##
  212.     9,9,'Printer ',0
  213.     pop    bc
  214.     push    bc
  215.     ld    a,'A'
  216.     add    a,b
  217.     call    cout##
  218.     dec    l            ; check mode
  219.     jp    z,sstop            ; stopped
  220.     ld    a,h            ; get queue assignment
  221.     or    a            ; check offline
  222.     jp    z,soffl
  223.     call    print##
  224.     ': Queue ',0
  225.     add    a,'@'
  226.     call    cout##
  227.     call    crlf##
  228.     jr    invp1
  229. ;
  230. soffl:    call    print##
  231.     ': Offline',cr,lf,0
  232.     jr    invp1
  233. ;
  234. sstop:    call    print##
  235.     ': Stopped',cr,lf,0
  236. invp1:    pop    bc            ; get printer
  237.     inc    b
  238.     ld    a,b
  239.     cp    16
  240.     jp    nz,syspl        ; continue till done
  241.     call    crlf##
  242.     rst    0
  243. ;
  244. ..rh:    rr    l
  245.     call    c,cout##
  246.     inc    a
  247.     djnz    ..rh
  248.     ret
  249. ;
  250.     dseg
  251. ;
  252.  
  253.     ds    100
  254. stack    equ    $
  255.     end
  256.