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 / ENTERPRS / CPM / UTILS / S / ZPM3N10.ARK / CLRHIST.Z80 < prev    next >
Text File  |  1993-02-01  |  2KB  |  49 lines

  1.  
  2. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3. ;            C L R H I S T
  4. ;              for ZPM3
  5. ;            by Simeon Cran
  6. ;               26/4/92
  7. ;
  8. ; This program clears the ZPM3 function 10 history buffer. It is presented in
  9. ; source code form to inform users about how the facility is manipulated.
  10.  
  11. ; The only real use for clearing the history buffer is as a security feature
  12. ; on RZPM3 systems (remote ZPM3 systems (such as BBSes)). Note that individual
  13. ; commands may be cleared from the history buffer with control-V.
  14. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  15.  
  16. ; SYNTAX:
  17. ;  CLRHIST    Clears the history buffer
  18.  
  19. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  20. ;
  21. ; The history buffer is cleared by setting bit 7 of offset 85h of the SCB page.
  22. ; This offset can not be directly accessed by the SCB function (31h). Instead
  23. ; we get the SCB base page with function 31h, and then find the offset from
  24. ; there. No other bits in the byte may be touched.
  25. ;===============================================================================
  26.  
  27. BDOS    equ    5
  28. deffcb    equ    5ch
  29. SCBfunc    equ    31h    ; Get/Set SCB function number
  30. SCBoff    equ    3bh    ; Offset in SCB to get SCB base page
  31. CLHoff    equ    85h    ; Offset in SCB base page of Clear History buffer bit.
  32.  
  33.     jp    start    ; Jump over general data
  34.  
  35. start:    ; Get the address of the bit which controls History buffer clearing
  36.     ld    c,SCBfunc
  37.     ld    de,SCBPB
  38.     call    bdos        ; Get base page of SCB
  39.     ld    h,a
  40.     ld    l,CLHoff    ; HL is now the address of the byte
  41.  
  42.     set    7,(hl)        ; All to do
  43.     rst    0
  44.  
  45. SCBPB:    ; System control block function parameter block.
  46.     db    03bh
  47.     db    0        ; Get operation
  48.  
  49.