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 / CPM3 / CCP105P.ARK / CCPHDR.MAC < prev    next >
Text File  |  1986-10-17  |  6KB  |  151 lines

  1. ; Modified CCP for CP/M version 3.1
  2. ;
  3. ; This CCP is intended to overcome some of the shortfalls of the CCP supplied
  4. ; with CP/M Plus.  It is especially useful in an RCP/M environment. See the
  5. ; accompanying CCP+.DOC DOCfile for more details.
  6. ;
  7. ; This is the modified dissasembled version of the CCP.
  8. ;
  9. ; Jim Lopushinsky,  Edmonton, Alberta, Canada
  10. ; (403) 435-6579 @ 300/1200 bps
  11. ;
  12. ;Feb 3/85    Released to public domain
  13. ;Feb 8/85    Incorporated DRI CCP patch #2
  14. ;Feb 20/85    Fixed ZCPR maxdrv compare variable
  15. ;Feb 20/85    Init MAXDRV,MAXUSR, and WHEEL bytes on cold boot.
  16. ;May 21/85    Converted Select drive to BDOS calls
  17. ;Sep 8/85    Added Library Command run facility (Thanks to Richard Saeks)
  18. ;Nov 4/85    Added EXPAND equate for expanding universe, flag bit mnemonic
  19. ;        equates, WHLLBR equate which will only allow running of the
  20. ;        library processor (ie: CMDRUN.COM) if the wheel byte is set,
  21. ;        boot equates for MAXDRV, WHEEL and MAXUSR, and PRINT0 equate
  22. ;        for printing user number in prompt if the user number is zero.
  23. ;                            - Stuart Rose
  24. ;Nov 6/85    Removed PRINT0 equate.  User number is always displayed if
  25. ;        user 0. Changed WHLLBR and EXPAND as option bits to eliminate
  26. ;        the need for reassembly to change options.
  27. ;
  28. ;Sep 1986    Put in print0 equate so that I can optionally not display
  29. ;        the user number when it is zero. Put in makecolon flag
  30. ;        to modify program return code to be useable with a
  31. ;        "make" program. Added ccphistory flag that will add a
  32. ;        Unix (tm of AT&T) -style "history" mechanism.
  33. ;                            - Mike Kersenbrock
  34. ;
  35. ;
  36. ;
  37.     .z80
  38.     aseg
  39.  
  40. no    equ    0
  41. yes    equ    0ffffh
  42.  
  43. drvoff    equ    'A'        ; drive offset
  44. usroff    equ    1        ; user offset
  45.  
  46. ;------------------------------------------------------------------------------
  47. ;The following equate determines whether the CCP or CMDRUN library processor
  48. ;is assembled.
  49.  
  50. ccp    equ    yes        ;yes=CCP, no=CMDRUN
  51.  
  52. ;------------------------------------------------------------------------------
  53. ;The following equate determines whether the CCP has UNIX (tm of AT&T) csh-like
  54. ;history handling enabled.
  55.  
  56. ccphistory      equ    yes        ;yes=history, no=plain-jane ccp
  57.  
  58.  
  59. ;------------------------------------------------------------------------------
  60. ;When enabled, this option will make colon'd commands NOT execute when the
  61. ;return code is ff00-ffff.  Also, the code will NOT be reset unless it is
  62. ;a cold boot.
  63.  
  64. makecolon      equ    yes        ;yes="make" will work, no=orig version
  65.  
  66.  
  67. ;------------------------------------------------------------------------------
  68. ;When yes, the user number is ALWAYS printed in a prompt.  When no, user number
  69. ;is not printed when it is zero.
  70.  
  71. print0         equ    no        ;yes=always print user nr
  72.  
  73.  
  74. ;------------------------------------------------------------------------------
  75. ; The following option determines whether or not the library command processor
  76. ; should be invoked when a command is not found, depending on the status of
  77. ; the WHEEL byte. By including with the flag byte, the CCP will check the
  78. ; WHEEL byte and only invoke the library command processor if set. If not set
  79. ; then the WHEEL byte is ingored and only the "yeslbr" bit is checked (Note:
  80. ; for this equate to have any affect, you must set the "yeslbr" bit in the
  81. ; "flags" byte).
  82.  
  83. whllbr    equ    NO        ; Yes, check wheel byte before running
  84.                 ; library command processor
  85.  
  86. ;------------------------------------------------------------------------------
  87. ; The following option determines whether or not your user-area universe
  88. ; should expand. Generally, your universe is set by the MAXDRV and MAXUSR
  89. ; bytes in the system page (page 0). However, if you are a wheel user (the
  90. ; WHEEL byte set), you may  be able to gain access to user-areas outside this
  91. ; universe. If this occurs, your universe can be expanded to include these
  92. ; new user-areas (these new values are written back to MAXDRV and MAXUSR).
  93.  
  94. expand    equ    NO        ; Yes, change MAXDRV & MAXUSR
  95.  
  96. ;------------------------------------------------------------------------------
  97. ; The following are the value that MAXDRV, WHEEL and MAXUSR are set to upon a
  98. ; bootstrap.
  99.  
  100. mydrv    equ    'P' - drvoff    ; maximum drive
  101. mywhl    equ    0ffh        ; 0=NO WHEEL, 0FFH=WHEEL
  102. myusr    equ    15 + usroff    ; maximun user number
  103.  
  104. ;------------------------------------------------------------------------------
  105. ; These are mnemonic for the flag byte
  106.  
  107. time    equ    NO        ; Yes, display time in prompt
  108. byechk    equ    NO        ; Yes, check for BYE RSX
  109. noxoff    equ    NO        ; Yes, disable flow control XON/XOFF (^Q/^S)
  110. yesprl    equ    NO        ; Yes, allow PRL files
  111. yeslbr    equ    YES        ; Yes, allow library command processor
  112. timeon    equ    NO        ; Yes, display time-on-system instead of
  113.                 ;   current time if BYE active.
  114.  
  115. ;------------------------------------------------------------------------------
  116.  
  117. tpa     equ    0100H        ; transient program area starts here
  118. ccporg    equ    03E0H        ; start of ccp
  119.  
  120. ;------------------------------------------------------------------------------
  121.     if    not ccp
  122. ccphistory    equ    no
  123.     endif
  124. ;------------------------------------------------------------------------------
  125.  
  126.     org    tpa        ; start at tpa
  127.  
  128.     jp    start        ;go past loader
  129. ;
  130.     db    0        ;Dummy byte
  131.  
  132. loadlen:
  133.     ds    2        ;Length of Loader module
  134.  
  135. ;.......
  136. ;
  137. ;Library command processor FCB.  The FCB can be modified using SID or EDFILE
  138. ;(starting at CCPORG)
  139.  
  140.     org    ccporg        ;Room for loader module
  141.  
  142. crname:
  143.     db    0        ;User number + 1 (0 = Default)        CCPORG
  144.     db    0        ;Drive + 1 (0 = use drive search chain)    CCPORG+1
  145.     db    'CMDRUN  COM'    ;Library processor file name        CCPORG+2
  146. ;         ^^^^^^^^^^^     Must be 11 bytes long
  147.  
  148.     include    CCP105.MAC
  149.     
  150.     end
  151. ry command proc