home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / z3util / for-nxt3.lbr / CLRCST.ZZ0 / CLRCST.Z80
Encoding:
Text File  |  1993-06-07  |  1.3 KB  |  59 lines

  1. ; CLRCST.Z80
  2. ;
  3. ; ZCPR3 Utility.
  4. ; Clears the Console Status Flag so that custom shells installed with
  5. ; SHSET can use flow control
  6. ;
  7. ; Syntax:
  8. ;    CLRCST
  9. ;
  10. ; Usage:
  11. ;    To be used inside an alias that is installed as a shell with
  12. ; SHSET.  This program must be run before any flow control commands
  13. ; are encountered within the alias.  For example:
  14. ;        CLRCST
  15. ;        NEXT VAR
  16. ;        RESOLVE IF -%VAR=-
  17. ;        SHCTRL P
  18. ;        ELSE
  19. ;        RESOLVE ECHO %VAR
  20. ;        FI
  21. ; will print the contents of FORFILES.SYS (created by FOR.COM).
  22. ;
  23. ; Author: Dreas Nielsen
  24. ; History: Created 6/5/87
  25. ;
  26.  
  27. VERS    EQU    10
  28. CR    EQU    0DH
  29. LF    EQU    0AH
  30. FCB    EQU    05CH
  31.  
  32.     EXT    Z3INIT,PUTCST,PRINT,QPRINT
  33. ;
  34.     DB    'Z3ENV'        ;This is a ZCPR3 Utility
  35.     DB    1        ;External Environment Descriptor
  36. Z3EADR:
  37.     DW    00
  38. START:
  39.     LD    HL,(Z3EADR)    ;pt to ZCPR3 environment
  40.     CALL    Z3INIT        ;initialize the ZCPR3 Environment
  41.     CALL    QPRINT
  42.     DB    'CLRCST v.',[VERS / 10]+'0','.',[VERS mod 10]+'0',CR,LF,0
  43.     LD    A,(FCB+1)
  44.     CP    ' '
  45.     JR    NZ,HELP
  46.     XOR    A
  47.     CALL    PUTCST
  48.     RET
  49. ;
  50. HELP:    CALL    PRINT
  51.     DB    'Clears the ZCPR3 Console Status Flag.',CR,LF
  52.     DB    'For use in aliases installed as shells with SHSET.',CR,LF
  53.     DB    'Syntax:',CR,LF,'     CLRCST',CR,LF
  54.     DB    0
  55.     RET
  56.  
  57.     END    START
  58.  
  59.