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 / 22RSX / 22RSX-20.ARK / CONSTAT.ASM < prev    next >
Assembly Source File  |  1984-10-13  |  2KB  |  77 lines

  1. ;
  2. ;Program name : CONSTAT.ASM
  3. ;Author       : James Whorton
  4. ;Date written : 09/29/84
  5. ;
  6. ;This is the display driver for the CONSOLE RSX module.
  7. ;To use it, install CONSOLE, then run this program for a
  8. ;display of console call statistics.
  9. ;
  10. ;equates
  11. ;
  12. warm:    equ    0
  13. bdos:    equ    5
  14. fcb:    equ    05Ch        ;FCB address
  15. cin:    equ    1
  16. cout:    equ    2
  17. cr:    equ    13
  18. lf:    equ    10
  19. request:equ    255        ;This is the request character that
  20.                 ;triggers the CONSOLE RSX and produces
  21.                 ;a display. It must be set to the same
  22.                 ;value as CONSOLE to work properly.
  23. ;
  24. ;Program starts here
  25. ;
  26.     org    0100h
  27. ;
  28.     lxi    h,signon    ;identify self
  29.     call    ilprt
  30.     lxi    h,header    ;set up table heading
  31.     call    ilprt
  32.     mvi    a,request    ;load value into FCB to
  33.     sta    fcb        ;trigger CONSOLE RSX upon calling
  34.     mvi    c,cout        ;console out function
  35.     mvi    e,0
  36.     call    bdos
  37.     lxi    h,endlin    ;finish and exit
  38.     call    ilprt
  39.     jmp    warm
  40. ;
  41. ;inline print routine
  42. ;
  43. ilprt:    equ    $
  44.     push    psw
  45.     push    h
  46.     push    d
  47.     push    b
  48. ;
  49. ilplp:    mov    e,m
  50.     mvi    c,cout
  51.     push    h
  52. ilplp1:    call    bdos
  53.     pop    h
  54.     inx    h
  55.     mov    a,m
  56.     ora    a
  57.     jnz    ilplp
  58.     pop    b
  59.     pop    d
  60.     pop    h
  61.     pop    psw
  62.     ret
  63. ;
  64. ; Data area
  65. ;
  66. signon:    db    cr,lf,'CONSTAT v1.0        James Whorton        09/29/84'
  67.     db    cr,lf,'Table of frequency of console BDOS requests since'
  68.     db    cr,lf,'installation or last check.'
  69.     db    cr,lf,0
  70. header:    db    cr,lf,lf,'Function #   Description    # of requests'
  71.     db    cr,lf,'_________________________________________',0
  72. ;
  73. endlin:    db    cr,lf,lf,0
  74. ;
  75.     end
  76. #   Description    # of requests'
  77.     db    cr,lf,'________________