forked from MirrorRepos/RomWBW
committed by
GitHub
78 changed files with 12742 additions and 39 deletions
Binary file not shown.
@ -0,0 +1,11 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
set PATH=%PATH%;..\..\..\Tools\zx;..\..\..\Tools\cpmtools; |
|||
|
|||
set ZXBINDIR=../../../tools/cpm/bin/ |
|||
set ZXLIBDIR=../../../tools/cpm/lib/ |
|||
set ZXINCDIR=../../../tools/cpm/include/ |
|||
|
|||
zx Z80ASM -nzfcp13/MF |
|||
rem zx ZMAC -nzfcp13.z80 -/P |
|||
@ -0,0 +1,7 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
if exist *.prn del *.prn |
|||
if exist *.lst del *.lst |
|||
if exist *.err del *.err |
|||
if exist *.rel del *.rel |
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,89 @@ |
|||
Z-Relocatable Flow Control Packages |
|||
11 October 89 by Carson Wilson |
|||
|
|||
The seven pre-compiled Flow Control Packages (FCP's) in this library may be |
|||
loaded directly to Z System with NZ-COM, Z3PLUS, or JetLDR, provided |
|||
sufficient space has been allocated to the FCP segment. The FCP's come in two |
|||
flavors. Files named FCP-nT.ZRL implement extended flow control processing |
|||
when needed using a program named IF.COM at the root of your path, or at |
|||
directory A0 if there is no path. Files named simply FCP-n.ZRL rely |
|||
exclusively on memory-based processing. The "n" in the filename indicates the |
|||
total number of records required by each package. The standard number of |
|||
records for both NZ-COM and Z3PLUS is currently 5, so if you wish to load a |
|||
larger FCP you must reconfigure your system with MKZCM or by editing your .Z3P |
|||
file. For general help with flow control commands, see the file IF.HLP, or |
|||
section 3.2.2 of your NZ-COM or Z3PLUS manual. |
|||
|
|||
While IF.COM allows options not available in memory-resident flow-control |
|||
processing, fully resident versions free the user from the requirement that |
|||
IF.COM be present during flow control processing. Resident processing is also |
|||
somewhat faster due to the need to load IF.COM from disk for each flow control |
|||
command. Finally, the ability to locate and load the transient IF.COM |
|||
requires considerable code space in the resident code itself. Generally, |
|||
IF.COM is best used on fixed-disk systems, while resident processing is more |
|||
suited to floppy-based systems. |
|||
|
|||
The options included in fully resident versions were selected somewhat |
|||
differently than those of those using IF.COM. Criteria, in order of |
|||
precedence, were as follows: |
|||
|
|||
Transient Versions Resident Versions |
|||
------------------ ----------------- |
|||
1. Is the feature available in 1. How useful is the feature? |
|||
IF.COM? 2. How much memory does the feature |
|||
2. Does the feature require disk require? |
|||
access? |
|||
3. How useful is the feature? |
|||
4. How much memory does the feature |
|||
require? |
|||
|
|||
The tables below summarize the size and features of each flavor of FCP. Each |
|||
package includes only the features appearing above it. For example, |
|||
FCP-5T.ZRL (the default FCP for both NZ-COM and Z3PLUS) contains only ZIF, |
|||
IFQ, OR, AND, negation, ERROR, and NULL. Size is expressed as records plus |
|||
remaining bytes required by the FCP. As FCP space is allocated in record |
|||
units only, I have attempted to include only combinations which leave as |
|||
little remaining space possible. Sizes without corresponding filenames are |
|||
included for reference purposes only. |
|||
|
|||
FEATURES OF TRANSIENT (IF.COM) FCPS SIZE(RECS+BYTES) FILE NAME |
|||
----------------------------------------------------------------------------- |
|||
ZIF - unconditionally clear IF states? |
|||
IFQ - show current if status? 3+124 FCP-4T.ZRL |
|||
OR - set state at current level? 4+25 |
|||
AND - reset state at current level? |
|||
Allow negation of conditions? |
|||
ERROR - test program error flag? |
|||
NULL - test for no file name? 4+84 FCP-5T.ZRL |
|||
REG - test register values? 5+16 |
|||
AMBIG - test for "?" in file spec? |
|||
COMPR - test for compressed filespec? |
|||
= - test tokens for equality? 5+92 FCP-6T.ZRL |
|||
INPUT - test user input? 6+25 |
|||
Allow "IF T" and "IF F" forms? |
|||
WHEEL - test wheel byte? |
|||
TCAP - test whether TCAP loaded? |
|||
EXIST - test for file existence? 6+106 FCP-7T.ZRL |
|||
EMPTY - test files for contents? 7+10 |
|||
|
|||
|
|||
FEATURES OF RESIDENT FCPS SIZE(RECS+BYTES) FILE NAME |
|||
----------------------------------------------------------------------------- |
|||
ZIF - unconditionally clear IF states? |
|||
IFQ - show current if status? |
|||
OR - set state at current level? |
|||
AND - reset state at current level? |
|||
Allow negation of conditions? |
|||
NULL - test for no file name? |
|||
INPUT - test user input? |
|||
= - test tokens for equality? |
|||
ERROR - test program error flag? |
|||
Allow "IF T" and "IF F" forms? |
|||
EXIST - test for file existence? 3+123 FCP-4.ZRL |
|||
AMBIG - test for "?" in file spec? |
|||
COMPR - test for compressed filespec? |
|||
REG - test register values? |
|||
WHEEL - test wheel byte? |
|||
TCAP - test whether TCAP loaded? 4+113 FCP-5.ZRL |
|||
EMPTY - test files for contents? 5+17 FCP-6.ZRL |
|||
|
|||
@ -0,0 +1,161 @@ |
|||
; Module: NZFCP.LIB |
|||
; Author: Carson Wilson |
|||
; Version: 1.3 |
|||
; Date: 9 Oct 89 |
|||
; Changes: Prompts for options if SLR true. |
|||
|
|||
; This module is a set of configuration options for the flow control package |
|||
; code in NZFCP.Z80. The options are not fully commented here; see |
|||
; "ZCPR3, The Manual" for a detailed discussion of most of them. |
|||
|
|||
|
|||
; * * * * * * N O T I C E * * * * * * |
|||
; |
|||
; The main code in Z33FCP.Z80 has been written with relative jump instructions |
|||
; for minimum code size. If the options below are changed, then some of the |
|||
; jumps may become out-of-range. You will then have to change the code based |
|||
; on the error messages you get from your assembler. I cannot think of any |
|||
; way to handle the jumps automatically (macros fail because the jump distances |
|||
; cannot be resolved fully even in two passes of the assembler). If you want |
|||
; to play things really safe, you can do a global search and replace to change |
|||
; all occurrences of the JR instruction to JP (but note that this change is |
|||
; irreversible). I prefer to live with this nuisance so that I can get the |
|||
; most out of the code. |
|||
; |
|||
; Another possible way to clear up a problem with a relative jump that is out |
|||
; of range is to take the block of code with the labels IFCTRUE and IFCFALSE |
|||
; and move it up or down in the code. It is placed somewhere in the middle of |
|||
; the resident options, so that the options can reach those entry points with |
|||
; a relative jump. You should try to place that code near the middle of the |
|||
; options which you have enabled. |
|||
; |
|||
; Jay Sage (May 17, 1987) |
|||
|
|||
;============================================================================= |
|||
; |
|||
; M A C R O S |
|||
; |
|||
;============================================================================= |
|||
|
|||
; SLR assemblers allow selection of options during assembly. |
|||
|
|||
SLR equ no |
|||
|
|||
if SLR |
|||
|
|||
y equ yes |
|||
n equ no |
|||
|
|||
select macro option default comment |
|||
.accept comment,option ; Prompt user for selection |
|||
endm |
|||
|
|||
.printx |
|||
.printx Answer "Y" to include, "N" to exclude commands: |
|||
.printx |
|||
|
|||
else |
|||
|
|||
select macro option default comment |
|||
option equ default ; Use selections from file |
|||
endm |
|||
endif ; SLR |
|||
|
|||
; ------------------------------------------------------------------------- |
|||
|
|||
; Command names |
|||
|
|||
; The CTABLE macro, which constructs the command dispatch table, includes a |
|||
; line for each command, the first parameter of which is the name of the |
|||
; command. These names may be changed if you wish. But make sure that you |
|||
; do not use a name that is longer than the maximum allowed length. If you |
|||
; do, the name will be truncated and a nonfatal error will occur during |
|||
; assembly. DO NOT CHANGE ANY PARAMETER OTHER THAN THE COMMAND NAME. Lower |
|||
; case letters will be converted to upper case. The macro COMMAND is defined |
|||
; in Z34MAC.LIB. |
|||
|
|||
cmdsize equ 4 ; Maximum length of command names |
|||
|
|||
; Command table name, enable, wheel, jump_addr |
|||
; [ DO NOT CHANGE THESE PARAMETERS ] |
|||
ctable macro |
|||
ifcmd: command if, yes, no, ifstart |
|||
command and, andopt, no, andstart |
|||
command or, oropt, no, orstart |
|||
command else, yes, no, ifelse |
|||
command fi, yes, no, ifend |
|||
command ifq, ifqopt, no, ifstat0 |
|||
command xif, yes, no, ifexit |
|||
command zif, zifopt, no, ifzero |
|||
endm |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; General configuration options |
|||
|
|||
NOISE equ no ; Don't display if-state messages |
|||
|
|||
select COMIF no 'Enable transient IF processing? ' |
|||
|
|||
PATHROOT equ yes ; Find transient IF in root of path |
|||
|
|||
ifdrv equ 'A' ; Drive to use if PATHROOT is off or |
|||
; ..if the path is empty |
|||
ifusr equ 0 ; User to use if PATHROOT is off or |
|||
; ..if the path is empty |
|||
|
|||
; --------------------------------------------------------------------- |
|||
|
|||
; Command inclusion options |
|||
|
|||
select ZIFOPT yes 'ZIF - unconditionally clear IF states? ' |
|||
select IFQOPT yes 'IFQ - show current if status? ' |
|||
select OROPT yes 'OR - set state at current level? ' |
|||
select ANDOPT yes 'AND - reset state at current level? ' |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; If Condition Options |
|||
|
|||
if COMIF ; Different precedence if transient IF available. |
|||
select IFONEG yes 'Allow negation of conditions? ' |
|||
negchar equ '~' ; Character to use if negation allowed |
|||
select IFOERROR yes 'ERROR - test program error flag? ' |
|||
select IFONULL yes 'NULL - test for no file name? ' |
|||
select IFOREG yes 'REG - test register values? ' |
|||
select IFAMBIG yes 'AMBIG - test for "?" in file spec? ' |
|||
select IFCOMPR yes 'COMPR - test for compressed filespec? ' |
|||
select IFOEQ yes '= - test tokens for equality? ' |
|||
select IFOINPUT yes 'INPUT - test user input? ' |
|||
XEQOPT equ yes ; Test only first token for equal sign |
|||
select IFOTRUE yes 'Allow "IF T" and "IF F" forms? ' |
|||
select IFOWHEEL no 'WHEEL - test wheel byte? ' |
|||
select IFOTCAP no 'TCAP - test whether TCAP loaded? ' |
|||
select IFOEXIST yes 'EXIST - test for file existence? ' |
|||
select IFOEMPTY yes 'EMPTY - test files for contents? ' |
|||
else |
|||
select IFONEG yes 'Allow negation of conditions? ' |
|||
negchar equ '~' ; Character to use if negation allowed |
|||
select IFONULL yes 'NULL - test for no file name? ' |
|||
select IFOINPUT yes 'INPUT - test user input? ' |
|||
select IFOEQ yes '= - test tokens for equality? ' |
|||
XEQOPT equ yes ; Test only first token for equal sign |
|||
select IFOERROR yes 'ERROR - test program error flag? ' |
|||
select IFOTRUE yes 'Allow "IF T" and "IF F" forms? ' |
|||
select IFOEXIST yes 'EXIST - test for file existence? ' |
|||
select IFAMBIG no 'AMBIG - test for "?" in file spec? ' |
|||
select IFCOMPR no 'COMPR - test for compressed filespec? ' |
|||
select IFOREG no 'REG - test register values? ' |
|||
select IFOWHEEL no 'WHEEL - test wheel byte? ' |
|||
select IFOTCAP no 'TCAP - test whether TCAP loaded? ' |
|||
select IFOEMPTY no 'EMPTY - test files for contents? ' |
|||
endif ; COMIF |
|||
|
|||
; Miscellaneous configuration information |
|||
|
|||
curusr equ z3msg+2eh ; Current logged user address |
|||
curdr equ z3msg+2fh ; Current logged drive address |
|||
curint equ '$' ; Path symbol for current drive/user |
|||
|
|||
; END of NZFCP.LIB |
|||
|
|||
@ -0,0 +1,161 @@ |
|||
; Module: NZFCP.LIB |
|||
; Author: Carson Wilson |
|||
; Version: 1.3 |
|||
; Date: 9 Oct 89 |
|||
; Changes: Prompts for options if SLR true. |
|||
|
|||
; This module is a set of configuration options for the flow control package |
|||
; code in NZFCP.Z80. The options are not fully commented here; see |
|||
; "ZCPR3, The Manual" for a detailed discussion of most of them. |
|||
|
|||
|
|||
; * * * * * * N O T I C E * * * * * * |
|||
; |
|||
; The main code in Z33FCP.Z80 has been written with relative jump instructions |
|||
; for minimum code size. If the options below are changed, then some of the |
|||
; jumps may become out-of-range. You will then have to change the code based |
|||
; on the error messages you get from your assembler. I cannot think of any |
|||
; way to handle the jumps automatically (macros fail because the jump distances |
|||
; cannot be resolved fully even in two passes of the assembler). If you want |
|||
; to play things really safe, you can do a global search and replace to change |
|||
; all occurrences of the JR instruction to JP (but note that this change is |
|||
; irreversible). I prefer to live with this nuisance so that I can get the |
|||
; most out of the code. |
|||
; |
|||
; Another possible way to clear up a problem with a relative jump that is out |
|||
; of range is to take the block of code with the labels IFCTRUE and IFCFALSE |
|||
; and move it up or down in the code. It is placed somewhere in the middle of |
|||
; the resident options, so that the options can reach those entry points with |
|||
; a relative jump. You should try to place that code near the middle of the |
|||
; options which you have enabled. |
|||
; |
|||
; Jay Sage (May 17, 1987) |
|||
|
|||
;============================================================================= |
|||
; |
|||
; M A C R O S |
|||
; |
|||
;============================================================================= |
|||
|
|||
; SLR assemblers allow selection of options during assembly. |
|||
|
|||
SLR equ yes |
|||
|
|||
if SLR |
|||
|
|||
y equ yes |
|||
n equ no |
|||
|
|||
select macro option default comment |
|||
.accept comment,option ; Prompt user for selection |
|||
endm |
|||
|
|||
.printx |
|||
.printx Answer "Y" to include, "N" to exclude commands: |
|||
.printx |
|||
|
|||
else |
|||
|
|||
select macro option default comment |
|||
option equ default ; Use selections from file |
|||
endm |
|||
endif ; SLR |
|||
|
|||
; ------------------------------------------------------------------------- |
|||
|
|||
; Command names |
|||
|
|||
; The CTABLE macro, which constructs the command dispatch table, includes a |
|||
; line for each command, the first parameter of which is the name of the |
|||
; command. These names may be changed if you wish. But make sure that you |
|||
; do not use a name that is longer than the maximum allowed length. If you |
|||
; do, the name will be truncated and a nonfatal error will occur during |
|||
; assembly. DO NOT CHANGE ANY PARAMETER OTHER THAN THE COMMAND NAME. Lower |
|||
; case letters will be converted to upper case. The macro COMMAND is defined |
|||
; in Z34MAC.LIB. |
|||
|
|||
cmdsize equ 4 ; Maximum length of command names |
|||
|
|||
; Command table name, enable, wheel, jump_addr |
|||
; [ DO NOT CHANGE THESE PARAMETERS ] |
|||
ctable macro |
|||
ifcmd: command if, yes, no, ifstart |
|||
command and, andopt, no, andstart |
|||
command or, oropt, no, orstart |
|||
command else, yes, no, ifelse |
|||
command fi, yes, no, ifend |
|||
command ifq, ifqopt, no, ifstat0 |
|||
command xif, yes, no, ifexit |
|||
command zif, zifopt, no, ifzero |
|||
endm |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; General configuration options |
|||
|
|||
NOISE equ no ; Don't display if-state messages |
|||
|
|||
select COMIF no 'Enable transient IF processing? ' |
|||
|
|||
PATHROOT equ yes ; Find transient IF in root of path |
|||
|
|||
ifdrv equ 'A' ; Drive to use if PATHROOT is off or |
|||
; ..if the path is empty |
|||
ifusr equ 0 ; User to use if PATHROOT is off or |
|||
; ..if the path is empty |
|||
|
|||
; --------------------------------------------------------------------- |
|||
|
|||
; Command inclusion options |
|||
|
|||
select ZIFOPT yes 'ZIF - unconditionally clear IF states? ' |
|||
select IFQOPT yes 'IFQ - show current if status? ' |
|||
select OROPT yes 'OR - set state at current level? ' |
|||
select ANDOPT yes 'AND - reset state at current level? ' |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; If Condition Options |
|||
|
|||
if COMIF ; Different precedence if transient IF available. |
|||
select IFONEG yes 'Allow negation of conditions? ' |
|||
negchar equ '~' ; Character to use if negation allowed |
|||
select IFOERROR yes 'ERROR - test program error flag? ' |
|||
select IFONULL yes 'NULL - test for no file name? ' |
|||
select IFOREG yes 'REG - test register values? ' |
|||
select IFAMBIG yes 'AMBIG - test for "?" in file spec? ' |
|||
select IFCOMPR yes 'COMPR - test for compressed filespec? ' |
|||
select IFOEQ yes '= - test tokens for equality? ' |
|||
select IFOINPUT yes 'INPUT - test user input? ' |
|||
XEQOPT equ yes ; Test only first token for equal sign |
|||
select IFOTRUE yes 'Allow "IF T" and "IF F" forms? ' |
|||
select IFOWHEEL no 'WHEEL - test wheel byte? ' |
|||
select IFOTCAP no 'TCAP - test whether TCAP loaded? ' |
|||
select IFOEXIST yes 'EXIST - test for file existence? ' |
|||
select IFOEMPTY yes 'EMPTY - test files for contents? ' |
|||
else |
|||
select IFONEG yes 'Allow negation of conditions? ' |
|||
negchar equ '~' ; Character to use if negation allowed |
|||
select IFONULL yes 'NULL - test for no file name? ' |
|||
select IFOINPUT yes 'INPUT - test user input? ' |
|||
select IFOEQ yes '= - test tokens for equality? ' |
|||
XEQOPT equ yes ; Test only first token for equal sign |
|||
select IFOERROR yes 'ERROR - test program error flag? ' |
|||
select IFOTRUE yes 'Allow "IF T" and "IF F" forms? ' |
|||
select IFOEXIST yes 'EXIST - test for file existence? ' |
|||
select IFAMBIG yes 'AMBIG - test for "?" in file spec? ' |
|||
select IFCOMPR yes 'COMPR - test for compressed filespec? ' |
|||
select IFOREG yes 'REG - test register values? ' |
|||
select IFOWHEEL no 'WHEEL - test wheel byte? ' |
|||
select IFOTCAP no 'TCAP - test whether TCAP loaded? ' |
|||
select IFOEMPTY yes 'EMPTY - test files for contents? ' |
|||
endif ; COMIF |
|||
|
|||
; Miscellaneous configuration information |
|||
|
|||
curusr equ z3msg+2eh ; Current logged user address |
|||
curdr equ z3msg+2fh ; Current logged drive address |
|||
curint equ '$' ; Path symbol for current drive/user |
|||
|
|||
; END of NZFCP.LIB |
|||
|
|||
@ -0,0 +1,9 @@ |
|||
Source code plus the compiled Flow Control Packages (FCP's) |
|||
distributed in FCP.LBR as part of the Z System. The precompiled |
|||
modules are in Z-Relocatable form, and must be loaded with JetLDR, |
|||
NZCOM, or Z3PLUS. Now features interactive assembly of code |
|||
a-la-Z34RCP11 under the SLR or ZMAC assemblers. Macro now reports |
|||
length of resulting FCP in records and bytes following assembly. |
|||
JetLDR signons also automatically generated. 9/15/90 Carson Wilson |
|||
|
|||
|
|||
File diff suppressed because it is too large
@ -0,0 +1,105 @@ |
|||
; |
|||
; Library: Z34CMN.LIB |
|||
; Author: Carson Wilson <crw> |
|||
; Version: 1.2 |
|||
; Date: 16 June 1988 |
|||
; Changes: Renamed CRT0 to LINS for NZCOM compatibility. |
|||
; Added CUSR " " " |
|||
|
|||
; Author: Carson Wilson <crw> |
|||
; Version: 1.1 |
|||
; Date: 12 June 1988 |
|||
; Changes: Added CDRV for various Z34RCP commands. |
|||
; Added CRT0 for Z34RCP TYPE command. |
|||
; Added Z3TCAP and CLRSCR for Z34RCP CLS command. |
|||
; Added QUIET for ZCPR34 time in prompt. |
|||
; Added RSDMSG for ZCPR34 time in prompt. |
|||
|
|||
; Library: Z34CMN.LIB |
|||
; Author: Joe Wright |
|||
; Date: 23 March 1988 |
|||
|
|||
; As a replacement for Z3BASE.LIB, some usual equates. |
|||
|
|||
base equ 0 ; Base Page |
|||
|
|||
false equ 0 |
|||
true equ not false |
|||
|
|||
no equ false |
|||
yes equ true |
|||
|
|||
off equ false |
|||
on equ true |
|||
|
|||
; Named COMMON declarations start here. For compatibility, these |
|||
; are the same names used by Bridger Mitchell's JetLDR. |
|||
|
|||
common /_ENV_/ |
|||
z3env: ; Z3 Environment descriptor |
|||
z3envs equ yes ; There is one |
|||
|
|||
expath equ z3env+9 ; Address of External Path |
|||
expaths equ 10 ; Maximum 10 elements for MPATH |
|||
|
|||
rcp equ z3env+0ch ; Address of RCP |
|||
rcps equ yes ; Used as existence test, not size |
|||
|
|||
fcp equ z3env+12h ; Address of FCB |
|||
fcps equ yes ; Used as existence test, not size |
|||
|
|||
z3ndir equ z3env+15h ; Address of NDR |
|||
z3ndirs equ yes ; Used as existence test, not size |
|||
|
|||
quiet equ z3env+28h ; Quiet flag address <crw> |
|||
|
|||
z3whl equ z3env+29h ; Wheel byte address |
|||
z3whls equ yes ; There is a wheel |
|||
|
|||
lins equ z3env+33h ; CRT text lines address <crw> |
|||
|
|||
ccp equ z3env+3fh ; CCP entry |
|||
ccps equ z3env+41h ; Size |
|||
|
|||
dos equ z3env+42h ; DOS entry (+6) |
|||
doss equ z3env+44h ; Size |
|||
|
|||
bio equ z3env+45h ; BIO entry |
|||
|
|||
z3tcap equ z3env+80h ; TCAP address <crw> |
|||
|
|||
clrscr equ z3env+97h ; Clear screen string address <crw> |
|||
|
|||
common /_SSTK_/ |
|||
shstk: ; Top of Shell stack |
|||
shstks equ yes ; There is a shell stack |
|||
|
|||
common /_MSG_/ |
|||
z3msg: ; Message buffer |
|||
z3msgs equ yes ; There is one |
|||
|
|||
cusr equ z3msg+2eh ; Current user |
|||
cdrv equ z3msg+2fh ; Current drive <crw> |
|||
|
|||
rsdmsg equ z3msg+3ah ; Reserved bytes <crw> |
|||
|
|||
common /_FCB_/ |
|||
extfcb: ; External file control block |
|||
extfcbs equ yes ; There is one |
|||
|
|||
common /_MCL_/ |
|||
z3cl: ; Multiple command line |
|||
z3cls equ yes ; There is one |
|||
|
|||
common /_XSTK_/ |
|||
extstk: ; External stack |
|||
extstks equ yes ; There is one |
|||
|
|||
common /_BIOS_/ |
|||
bios: |
|||
|
|||
cseg ; Select Code Segment |
|||
|
|||
; End of Z34CMN.LIB |
|||
|
|||
|
|||
@ -0,0 +1,122 @@ |
|||
|
|||
; Z33MAC.LIB : Macros for use with ZCPR33 |
|||
|
|||
; General purpose macros |
|||
|
|||
putreg macro |
|||
push hl ; Save registers in order |
|||
push de |
|||
push bc |
|||
endm |
|||
|
|||
getreg macro |
|||
pop bc ; Restore registers in order |
|||
pop de |
|||
pop hl |
|||
endm |
|||
|
|||
swap macro |
|||
rrca ; Exchange nibbles |
|||
rrca |
|||
rrca |
|||
rrca |
|||
endm |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; Macro for forming option bytes |
|||
|
|||
; This macro generates a byte with bits corresponding to up to 8 option |
|||
; flags. The bits are filled in the order of the parameters and are right |
|||
; justified in the byte. |
|||
|
|||
optflag macro f1,f2,f3,f4,f5,f6,f7,f8 |
|||
|
|||
flag defl 0 ;; initial value |
|||
|
|||
irp temp,<f1,f2,f3,f4,f5,f6,f7,f8> |
|||
|
|||
if not nul temp |
|||
flag defl flag shl 1 |
|||
if temp |
|||
flag defl flag or 1 |
|||
endif ;;temp |
|||
endif ;;not nul temp |
|||
|
|||
endm ;; irp |
|||
|
|||
defb low flag |
|||
|
|||
endm ;; optflag |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; Command table entry definition macro |
|||
|
|||
; Macro to form an entry for one command in the table. The first parameter is |
|||
; the name to be used for the command (no quotes); the second parameter is the |
|||
; flag that indicates whether or not the command is to be enabled; the third |
|||
; parameter is the wheel control flag; and the last parameter is the jump |
|||
; address to the code that carries out the command. The command names are |
|||
; automatically padded out to the correct length (they will be truncated and |
|||
; an error message will result if a command name is too long). The characters |
|||
; in the command name are automatically converted to upper case. |
|||
|
|||
command macro cmdname,enableflag,wheelflag,address |
|||
|
|||
if enableflag ;; Generate command only if enabled |
|||
|
|||
whlmask defl wheelflag ;; Initialize variables |
|||
count defl cmdsize ;; Initialize to size of each command name |
|||
|
|||
irpc char,cmdname ;; Repeat over letters in command name |
|||
|
|||
count defl count - 1 ;; Count down characters in name |
|||
|
|||
if [ count lt cmdsize ] |
|||
|
|||
;; If character is lower case, convert to upper case |
|||
|
|||
if [ '&char' ge 'a' ] and [ '&char' le 'z' ] |
|||
|
|||
if whlmask |
|||
defb [ '&char' and 5fh ] + 80h |
|||
else ;;not whlmask |
|||
defb [ '&char' and 5fh ] |
|||
endif ;;whlmask |
|||
|
|||
else ;;not lower case |
|||
|
|||
if whlmask |
|||
defb '&char' + 80h ;; If controlled by wheel, set high bit |
|||
else ;;not whlmask |
|||
defb '&char' ;; If not restricted, leave high bit clear |
|||
endif ;;whlmask |
|||
|
|||
endif ;;lower case |
|||
|
|||
endif ;;[ count lt cmdsize ] |
|||
|
|||
whlmask defl false ;; Turn off high-bit setting after first char |
|||
|
|||
endm ;irpc |
|||
|
|||
;; Pad command name with blanks |
|||
|
|||
if [ count gt cmdsize ] ;; If we underflowed |
|||
*** Command name "&cmdname" is too long / truncated *** |
|||
else |
|||
rept count |
|||
defb ' ' |
|||
endm |
|||
endif ;[ count gt cmdsize ] |
|||
|
|||
dw address ;; Dispatch address for command |
|||
|
|||
endif ;enable |
|||
|
|||
endm ;command |
|||
|
|||
; End Z33MAC.LIB |
|||
|
|||
|
|||
Binary file not shown.
@ -0,0 +1,11 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
set PATH=%PATH%;..\..\..\Tools\zx;..\..\..\Tools\cpmtools; |
|||
|
|||
set ZXBINDIR=../../../tools/cpm/bin/ |
|||
set ZXLIBDIR=../../../tools/cpm/lib/ |
|||
set ZXINCDIR=../../../tools/cpm/include/ |
|||
|
|||
rem zx Z80ASM -z34rcp11/MF |
|||
zx ZMAC -z34rcp11.z80 -/P |
|||
@ -0,0 +1,7 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
if exist *.prn del *.prn |
|||
if exist *.lst del *.lst |
|||
if exist *.err del *.err |
|||
if exist *.rel del *.rel |
|||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
@ -0,0 +1,33 @@ |
|||
page |
|||
; |
|||
; Library: RCPBASE for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
|
|||
; Comments: Use instead of Z34CMN.LIB to produce absolute RCP's. |
|||
; An absolute RCP will only load to one address, and requires |
|||
; that the message buffer and the environment descriptor |
|||
; remain constant within the environment. |
|||
|
|||
; You must modify the next three addresses to match your system: |
|||
|
|||
z3rcp equ 0ee80h ; RCP address |
|||
z3env equ 0fd00h ; Environment descriptor address |
|||
z3msg equ 0fe30h ; Message buffer address |
|||
|
|||
; The rest of this file should not be changed. |
|||
|
|||
fcp equ z3env+18 ; Address of FCB |
|||
quiet equ z3env+28h ; Quiet flag address |
|||
z3whl equ z3env+29h ; Wheel byte address |
|||
crt0 equ z3env+33h ; CRT 0 text lines address |
|||
ccp equ z3env+63 ; CCP entry |
|||
z3tcap equ z3env+80h ; TCAP address |
|||
clrscr equ z3env+97h ; Clear screen string address |
|||
|
|||
cdrv equ z3msg+2fh ; Current drive |
|||
|
|||
; End RCPBASE.LIB |
|||
|
|||
|
|||
@ -0,0 +1,62 @@ |
|||
RCPCLED - Command Line Editing and History Shell for Z34RCP11 |
|||
Author: Rob Friefeld |
|||
Version: 1.3 |
|||
Date: October 2, 1989 |
|||
|
|||
Command: CLED |
|||
Syntax: CLED [/] |
|||
If "/", run once only (e.g. from a shell such as ZFILER) |
|||
|
|||
Features: |
|||
|
|||
CLED is a memory resident command line editor which extends the minimal |
|||
features of the CCP to include cursor movement, insert/delete, and |
|||
record/recall of command lines. Though part of the RCP, CLED is also a ZCPR |
|||
"shell" which automatically reinvokes itself following any ZCPR command. It |
|||
thus uses up one shell stack entry (normally there are four, which is plenty). |
|||
If a ZS/ZDDOS, DateStamper, or Z3PLUS clock is implemented, the command prompt |
|||
shows the system time. To disable time display under Z3PLUS (if you have no |
|||
clock), set the system date to 01/01/78. |
|||
|
|||
The default control key set includes these important commands: |
|||
|
|||
CR - execute command line |
|||
ESC Q - pop the shell |
|||
ESC S - toggle recording on/off (prompt shows >/>> to indicate state) |
|||
^W - recall command lines from history stack |
|||
^E - recall history in reverse direction |
|||
|
|||
|
|||
Installation: |
|||
|
|||
The installation program, CLEDINST, allows you to set up the editor |
|||
to your preference. The RCP can be installed directly in memory or in a disk |
|||
file -- RCPxxx.ZRL or a system configuration saved with SNAP or NZBLITZ. |
|||
CLEDINST also serves as a "help" utility by displaying the current command |
|||
bindings. Type "CLEDINST //" for help with CLEDINST.COM. |
|||
|
|||
|
|||
History Tool: |
|||
|
|||
CLEDSAVE writes the contents of the history stack to a text file on disk. |
|||
The file can be reloaded later (CLEDSAVE <file> L), or composed in advance |
|||
with a text editor, then loaded. If the file is too large for the history |
|||
stack, as many commmand lines as fit are loaded. |
|||
|
|||
CLEDSAVE is useful as in a startup alias to load frequently used command |
|||
lines from an easily altered file. For example: |
|||
|
|||
Alias: START |
|||
|
|||
A15: |
|||
CLEDSYS <- load SNAP image of ENV,TCAP,RCP,FCP,NDR,QUIET,&PATH |
|||
CLEDSAVE CLED.VAR L <- load precomposed command lines into CLED |
|||
CLED <- turn the shell on |
|||
... <- rest of startup line runs before CLED gets control |
|||
|
|||
For help with CLEDSAVE.COM, type "CLEDSAVE //". |
|||
|
|||
You may also use SNAP or NZBLITZ to save the system segment image with |
|||
command lines already loaded (turn SAVE OFF first.) |
|||
|
|||
|
|||
File diff suppressed because it is too large
@ -0,0 +1,35 @@ |
|||
page |
|||
|
|||
; Library: RCPCLS for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: CLS |
|||
; Function: To clear the CRT screen |
|||
; Comments: The setting of the CLSTCAP equate determines whether this |
|||
; command uses the TCAP information or not. If not, it uses the |
|||
; clear-screen string passed in macro CLSSTR. That string should |
|||
; end with the high bit set. |
|||
|
|||
cls: |
|||
if clstcap ; If using TCAP for clear screen string |
|||
ld a,(z3tcap) ; TCAP address from Z34CMN.LIB |
|||
cp ' '+1 ; See if blank |
|||
jr nc,cls1 ; If not, go to clear screen code |
|||
jp crlf ; If blank, just do CRLF |
|||
cls1: |
|||
ld hl,clrscr ; Address from Z34CMN.LIB |
|||
jp printhl ; Display it |
|||
|
|||
else ; Not using tcap |
|||
|
|||
call print |
|||
clsstr ; String from Z34RCP.LIB |
|||
ret |
|||
|
|||
endif ;clstcap |
|||
|
|||
; End RCPCLS.LIB |
|||
|
|||
|
|||
@ -0,0 +1,56 @@ |
|||
page |
|||
|
|||
; Library: RCPCMD for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; Description: Command Table and Custom Commands for Z34-RCP |
|||
|
|||
; This is the customization file for the ZCPR Version 3.4 resident command |
|||
; package. Use it to add your own custom commands to the RCP. |
|||
|
|||
; Give each of your custom commands a unique label and command name. Then |
|||
; add the command name(s) to the macro CUSTTBL, below, and append the code |
|||
; for the commands to the end of this file. |
|||
|
|||
; CUSTTBL - Custom commands table. |
|||
; |
|||
; Add one line to CUSTTBL for each of your custom commands. Each line |
|||
; must be of the form: |
|||
; |
|||
; COMMAND name, TRUE, wheel, label |
|||
; |
|||
; Where COMMAND and TRUE appear as-is, and "name", "wheel", and "label" |
|||
; are created by the user. "Name" is a name of four characters or less used |
|||
; to invoke the command, in upper case. "Wheel" is "true" to protect the |
|||
; command from non-wheel users, "false" otherwise. "Label" marks the |
|||
; beginning of the custom code. For example, to create a wheel- |
|||
; protected command named "DIR" which calls the code at label "directory", |
|||
; CUSTTBL appears as follows: |
|||
; |
|||
;custtbl macro |
|||
; command DIR, true, true, directory |
|||
; endm |
|||
|
|||
custtbl macro |
|||
;; command ____, true, ____, _______ ; Template for custom commands |
|||
endm |
|||
|
|||
; ------------------------------ |
|||
|
|||
; RCP command dispatch table |
|||
|
|||
db cmdsize ; Length of each command name |
|||
cmdtbl ; Dispatch table from Z34RCP.LIB |
|||
custtbl ; Optional custom commands |
|||
db 0 ; Marks end of command jump table |
|||
|
|||
; -------------------------------------------------- |
|||
|
|||
; Insert label(s) and code for custom RCP commands here: |
|||
|
|||
; |
|||
|
|||
; END RCPCMD.LIB |
|||
|
|||
|
|||
@ -0,0 +1,245 @@ |
|||
page |
|||
|
|||
; Library: RCPCP for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.3 |
|||
; Date: August 11, 1989 |
|||
; Changes: Responds dynamically to QUIET flag, eliminating "noise." |
|||
|
|||
; Version: 1.2 |
|||
; Date: December 30, 1988 |
|||
; Changes: Now works properly with CP/M Plus. |
|||
; Moved SETDMA to common routines. |
|||
|
|||
; Author: Carson Wilson |
|||
; Version: 1.1 |
|||
; Date: August 4, 1988 |
|||
; Changes: Now initializes FCB1 before calling SetFStp, allowing |
|||
; stamp setting of multiple-extent files. |
|||
; |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: CP |
|||
; Function: Copy a file from one place to another |
|||
; Syntax: If FCBSWAP false: |
|||
; CP destfile=srcfile, CP =srcfile |
|||
; If FCBSWAP true: |
|||
; CP srcfile destfile, CP srcfile |
|||
; If TESTEQ and FCBSWAP true: |
|||
; Both of the above forms work |
|||
; |
|||
; Comments: Both file specifications can include a directory specification. |
|||
; If only one file name is given, then the current directory and |
|||
; the source file name are assumed for the destination. |
|||
|
|||
; |
|||
; New ZSDOS/DosDisk BDOS standard functions: |
|||
; |
|||
GetFStp equ 102 ; Get file stamp function |
|||
SetFStp equ 103 ; Set file stamp function |
|||
|
|||
copy: |
|||
call retsave |
|||
call dirchek ; Test bad directory |
|||
|
|||
if leftright |
|||
call fcbswap ; Exchange fcb1 with fcb2 |
|||
endif |
|||
|
|||
; If new is blank, make it the same name and type as old |
|||
|
|||
ld de,fcb1+1 ; Point to destination file name |
|||
ld a,(de) ; Get first character |
|||
cp ' ' ; If not blank (no name) |
|||
jr nz,copy0 ; ..then branch to copy |
|||
ld hl,fcb2+1 ; Copy source name into destination FCB |
|||
ld b,11 ; Name and type are 11 bytes |
|||
call blkmov |
|||
|
|||
; See if destination is same as source, and abort if so |
|||
|
|||
copy0: |
|||
ld hl,fcb1 ; Set up pointers to two files |
|||
ld de,fcb2 |
|||
push hl |
|||
push de |
|||
inc hl ; Point to names of files |
|||
inc de |
|||
ld b,13 ; Compare 13 bytes (name, type, and user #) |
|||
copy1: call comp |
|||
jr nz,copy2 ; If they differ, go on with copy |
|||
ld a,(cdrv) ; ZCPR current drive |
|||
inc a ; Shift to range 1..16 |
|||
ld b,a ; ..and keep value in B |
|||
pop de ; Restore pointers to FCBs |
|||
pop hl |
|||
ld a,(de) ; Get drive of source file |
|||
ld c,a ; ..and save it in C |
|||
or a ; Is it default drive? |
|||
jr nz,copy1a ; Branch if drive made explicit |
|||
ld c,b ; Otherwise, copy default drive into C |
|||
copy1a: ld a,(hl) ; Get drive of destination file |
|||
or a ; Is it default drive? |
|||
jr nz,copy1b ; Branch if drive made explicit |
|||
ld a,b ; Otherwise, get current drive |
|||
copy1b: cp c ; Compare the two drives specified |
|||
jr nz,copy3 ; Branch if they are different |
|||
jp duperr ; Tell EH duplicate filespecs |
|||
copy2: |
|||
pop de ; Clean up the stack |
|||
pop hl |
|||
|
|||
; Make note of the user numbers of the two files |
|||
|
|||
copy3: |
|||
ld a,(fcb1+13) ; Get destination user number |
|||
ld (usrdest),a |
|||
ld a,(fcb2+13) ; Get source user number |
|||
ld (usrsrc),a |
|||
|
|||
; Set up new FCB for source file and open the source |
|||
|
|||
call define ; Define buffer addresses dynamically |
|||
srcfcb equ $+1 |
|||
ld hl,0 ; Get address to use for new source FCB |
|||
push hl |
|||
ex de,hl ; Copy file data to new FCB |
|||
ld b,12 |
|||
call blkmov |
|||
call logsrc ; Log in user number of source file |
|||
pop hl ; Initialize the source file FCB |
|||
call initfcb2 |
|||
ld c,15 ; Open source file |
|||
call bdos |
|||
inc a ; Check for error |
|||
jp z,noflerr ; File not found error handler |
|||
|
|||
if StpCall |
|||
call cpmver |
|||
jr nc,copy4 ; Don't do this if CP/M Plus |
|||
stpbuf equ $+1 |
|||
ld de,0 |
|||
call setdma ; Set DMA to date buffer |
|||
ld de,(srcfcb) |
|||
ld c,GetFStp ; Get stamp (if any) to DMA |
|||
call bdos |
|||
ld (gotstp),a ; Store result |
|||
ld de,tbuff ; Restore DMA |
|||
call setdma ; ..for search |
|||
copy4: |
|||
endif ; StpCall |
|||
|
|||
; Make sure destination file does not already exist |
|||
|
|||
call logdest ; Log into destination user area |
|||
call extest ; Test for existence of file in fcb1 |
|||
jp z,exit ; Branch if it exists and user says no |
|||
|
|||
; Create destination file |
|||
|
|||
ld de,fcb1 ; Point to destination FCB |
|||
ld c,22 ; BDOS make-file function |
|||
call bdos |
|||
inc a ; Test for error (no directory space) |
|||
jp z,fulerr ; Invoke EH if not OK |
|||
|
|||
; Copy source to destination |
|||
|
|||
copy5: call logsrc ; Log in source user area |
|||
ld b,0 ; Initialize counter |
|||
ld de,(cbuff) ; Initialize buffer pointer |
|||
copy5a: push de ; Save address and counter |
|||
push bc |
|||
call setdma ; Set DMA to cbuff+(b*128) |
|||
ld de,(srcfcb) ; Point to source file FCB |
|||
ld c,20 ; BDOS read-sequential function |
|||
call bdos |
|||
pop bc ; Get counter and address |
|||
pop de |
|||
or a ; Read Ok? |
|||
jr nz,copy5b ; Branch if end of file |
|||
ld hl,128 ; Point DE to next buffer address |
|||
add hl,de |
|||
ex de,hl |
|||
inc b ; Increment counter |
|||
ld a,b ; See if buffer full |
|||
cp cpblocks |
|||
jr nz,copy5a ; If not, go back for more |
|||
copy5b: ld a,b ; Get count of blocks loaded into buffer |
|||
or a ; Are there any? |
|||
jr z,copy6 ; Branch if not (we are done) |
|||
push bc ; Save count |
|||
call logdest ; Log into destination user number |
|||
cbuff equ $+1 ; Pointer for in-the-code modification |
|||
ld de,0 ; Point to beginning of copy buffer |
|||
copy5c: push de ; Save buffer address |
|||
call setdma ; Set dma to buffer |
|||
ld de,fcb1 ; Point to destination file FCB |
|||
ld c,21 ; Sequential write the block |
|||
call bdos |
|||
or a ; Get result |
|||
jp nz,fulerr ; Invoke EH (disk full or write error) |
|||
pop de ; Get buffer address & balance stack |
|||
pop bc ; Get count |
|||
dec b ; Buffer empty? |
|||
jr z,copy5 ; Yes. Back for refill |
|||
push bc ; No. Save count |
|||
ld hl,128 |
|||
add hl,de |
|||
ex de,hl ; DE points to next buffer address |
|||
jr copy5c ; Back for another sector to write |
|||
|
|||
; Close the destination file |
|||
|
|||
copy6: call logdest ; Log into destination user number |
|||
ld de,fcb1 ; Point to destination FCB |
|||
ld c,16 ; Close file |
|||
call bdos |
|||
inc a ; 0ffh --> 0 if error |
|||
jp z,fulerr ; Invoke EH |
|||
|
|||
if StpCall |
|||
gotstp equ $+1 |
|||
ld a,0 ; File had stamp? |
|||
dec a ; 1 --> 0 = yes |
|||
jr nz,noset ; No |
|||
ld de,(stpbuf) ; Point to buffer |
|||
call setdma ; Set DMA |
|||
call initfcb1 ; Init. for SetFStp, point to dest. |
|||
ld c,SetFStp ; Set file's stamp |
|||
call bdos ; CCP restores DMA |
|||
noset: |
|||
endif ; StpCall |
|||
|
|||
ld a,(quiet) |
|||
or a |
|||
jr nz,qcpdone |
|||
call print |
|||
db ' Don','e'+80h |
|||
qcpdone: |
|||
if cpsp and spaceon |
|||
jp spaexit ; Report space remaining on destination drive |
|||
else |
|||
jp exit |
|||
endif ;cpsp and spaceon |
|||
|
|||
; Log into user number of source file |
|||
|
|||
logsrc: |
|||
usrsrc equ $+1 ; Pointer for in-the-code modification |
|||
ld a,0 ; Get user number |
|||
jr setusrrel ; Local jump to save code |
|||
|
|||
; Log into user number of destination file |
|||
|
|||
logdest: |
|||
usrdest equ $+1 ; Pointer for in-the-code modification |
|||
ld a,0 ; Get user number |
|||
setusrrel: |
|||
jp setusr |
|||
|
|||
; End RCPCP.LIB |
|||
|
|||
|
|||
@ -0,0 +1,137 @@ |
|||
page |
|||
|
|||
; Library: RCPDIR for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: August 6, 1989 |
|||
; Changes: Now allows "DIR [dir:].aft" as well as "DIR [dir:]*.aft" |
|||
; to show all files of a given file extentsion, |
|||
; e.g., "d .?80" gives all .Z80 and .180 files. |
|||
; |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: DIR |
|||
; Function: Display a directory of the files on disk |
|||
; Syntax: DIR [dir:afn] Displays the DIR files |
|||
; DIR [dir:afn] S Displays the SYS files |
|||
; DIR [dir:afn] A Display both DIR and SYS files |
|||
; |
|||
; If slashchk is true: |
|||
; |
|||
; DIR [dir:]/S Equivalent to DIR [dir:]*.* S |
|||
; DIR [dir:]/A Equivalent to DIR [dir:]*.* A |
|||
|
|||
dir: |
|||
call retsave ; Save return address and set stack |
|||
|
|||
; See if FCB should be made wild (all '?') |
|||
|
|||
ld hl,fcb1+1 ; Point to file name in FCP |
|||
ld a,(hl) ; Get first character of filename |
|||
|
|||
if slashchk ; Allow "DIR /S" and "DIR /A" formats |
|||
cp '/' ; If name does not start with '/' |
|||
jr nz,dir01 ; ..branch and process normally |
|||
inc hl ; Point to second character |
|||
ld a,(hl) ; Get option character after slash |
|||
ld (fcb2+1),a ; ..and put it into second FCB |
|||
dec hl ; Back to first character |
|||
ld a,' ' ; Simulate empty FCB |
|||
endif ;slashchk |
|||
|
|||
dir01: |
|||
cp ' ' ; See if no file spec given |
|||
jr nz,dir02 ; Spec given |
|||
|
|||
ld b,8 ; Wildcard name |
|||
ld a,(fcb1+9) |
|||
cp ' ' ; Wildcard type? |
|||
jr nz,dir01a ; No |
|||
ld b,11 ; Yes. Fill name and type. |
|||
dir01a: ld a,'?' ; Get ready to fill with '?' |
|||
call fillp ; ..carry out fill |
|||
dir02: |
|||
if nosys ; Suppress-SYS-file-if-no-wheel option |
|||
call getwhl ; Get wheel status |
|||
jr z,dirnly ; If wheel off, ignore options |
|||
endif |
|||
|
|||
ld a,(fcb2+1) ; Get first char of 2nd file name |
|||
ld b,1 ; Set for both dir and sys files |
|||
cp allflag ; SYS and DIR flag specifier? |
|||
jr z,dirpr ; Got system specifier |
|||
dec b ; B=0 for sys files only |
|||
cp sysflag ; SYS only? |
|||
jr z,dirpr |
|||
|
|||
dirnly: ld b,80h ; Must be dir-only selection |
|||
|
|||
; DIRECTORY PRINT ROUTINE |
|||
; On entry, B reg is set as follows: |
|||
; 0 for only system files, 80h for only dir files, 1 for both |
|||
; |
|||
dirpr: |
|||
ld a,b ; Get systst flag |
|||
call getdir ; Load and sort directory |
|||
jp z,prfnf ; Print no file message |
|||
if wide |
|||
ld e,5 |
|||
else |
|||
ld e,4 ; Count down to 0 |
|||
endif ; wide |
|||
; |
|||
; ENTRY PRINT LOOP |
|||
; On entry, HL pts to files selected (terminated by 0) |
|||
; and E is entry counter |
|||
; |
|||
dir3: |
|||
ld a,(hl) ; Check for done |
|||
or a |
|||
if dirsp and spaceon |
|||
jp z,spaexit ; Show space when done |
|||
else |
|||
jp z,exit ; Exit if done |
|||
endif ; Dirsp and spaceon |
|||
ld a,e ; Get entry counter |
|||
or a ; Output CRLF if 4 or 5 entries printed in line |
|||
jr nz,dir3a ; Continue |
|||
call crlf ; New line |
|||
if wide |
|||
ld e,5 |
|||
else |
|||
ld e,4 ; Reset entry count |
|||
endif ; wide |
|||
|
|||
ld a,e ; Get entry count |
|||
dir3a: |
|||
if wide |
|||
cp 5 |
|||
else |
|||
cp 4 ; First entry? |
|||
endif ; wide |
|||
|
|||
jr z,dir4 |
|||
call print |
|||
; |
|||
if wide |
|||
; |
|||
db ' ' ; 2 spaces |
|||
db ' '+80h ; Then 1 more space |
|||
; |
|||
else |
|||
; |
|||
db ' ' ; Space |
|||
db fence+80h ; Then fence char |
|||
; |
|||
endif ; Wide |
|||
; |
|||
dir4: |
|||
call prfn ; Print file name |
|||
call break ; Check for abort |
|||
dec e ; Decrement entry counter |
|||
jr dir3 |
|||
|
|||
; End RCPDIR.LIB |
|||
|
|||
|
|||
@ -0,0 +1,162 @@ |
|||
page |
|||
|
|||
; Library: RCPECHO for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: ECHO |
|||
; Function: Echo text to console or printer |
|||
|
|||
echo: |
|||
xor a ; Lower case/printer off flag setting |
|||
ld (crtfl),a ; Printer off by default |
|||
|
|||
if upcase ; If upper case default |
|||
dec a |
|||
endif ;upcase |
|||
|
|||
ld (casefl),a ; Store flag in code below |
|||
ld hl,tbuff+1 ; Point to first character |
|||
call getchar ; Get first character (should be blank) |
|||
; If none, exit from routine |
|||
|
|||
; Loop to echo chars |
|||
|
|||
echo2: call getchar |
|||
|
|||
if echolst |
|||
cp ff ; Form feed? |
|||
jr z,echo3 |
|||
endif ;echolst |
|||
|
|||
cp '^' |
|||
jr nz,echo2a ; Not control character prefix |
|||
call getchar ; Get next character |
|||
and 1fh ; Convert to control character |
|||
jr echo2e ; Echo it |
|||
echo2a: |
|||
cp cmdchar ; Case shift prefix? |
|||
jr nz,echo2e ; No, normal echo |
|||
call getchar ; Get next character |
|||
|
|||
if echolst |
|||
cp prtchar ; Turn printer on? |
|||
jr z,echo2b ; Store non-zero in crt flag |
|||
cp crtchar ; Turn printer off? |
|||
jr nz,echo2c ; No, test for shift characters |
|||
xor a ; Yes, clear crt flag |
|||
echo2b: ld (crtfl),a |
|||
jr echo2 ; On to next character |
|||
echo2c: |
|||
endif ; echolst |
|||
|
|||
cp ucasechar ; Up-shift character? |
|||
jr z,echo2d ; Store non-zero value in case flag |
|||
cp lcasechar ; Lower-case character? |
|||
jr nz,echo2e ; No, echo the character as is |
|||
xor a ; Else, clear case flag |
|||
echo2d: ld (casefl),a |
|||
jr echo2 ; On to next character |
|||
echo2e: |
|||
call echout ; Send char |
|||
jr echo2 |
|||
|
|||
; Form feed - send new line followed by form feed if printer output |
|||
|
|||
if echolst |
|||
echo3: |
|||
ld a,(crtfl) ; Check for printer output |
|||
or a ; Non-zero? |
|||
jr z,echoff ; No, send form feed normally |
|||
call echonl ; Send new line |
|||
ld a,ff ; Send form feed |
|||
jr echout |
|||
|
|||
; Send form feed char to console |
|||
|
|||
echoff: |
|||
ld a,ff ; Get char |
|||
jr echo2e |
|||
endif ;echolst |
|||
|
|||
; End of print loop - check for printer termination |
|||
|
|||
echo4: |
|||
if not echolst |
|||
ret |
|||
|
|||
else |
|||
ld a,(crtfl) ; Get list mode flag |
|||
or a |
|||
ret z ; Done if no printer output |
|||
|
|||
; Output a new line |
|||
|
|||
echonl: |
|||
ld a,cr ; Output new line on printer |
|||
call echout |
|||
ld a,lf ; Fall thru to echout |
|||
endif ; not echolst |
|||
|
|||
; Output char to printer or console |
|||
|
|||
echout: |
|||
ld c,a ; Char in c |
|||
cp 'A' ; If less than 'A' |
|||
jr c,echouta ; Leave as is |
|||
cp 'Z'+1 ; If greater than 'Z' |
|||
jr nc,echouta ; Leave as is |
|||
add 20h ; Else convert to lower case |
|||
echouta: |
|||
ld d,a ; Save lower case version in d |
|||
casefl equ $+1 ; Pointer for in-the-code modification |
|||
ld a,0 |
|||
or a ; Upper case? |
|||
jr nz,echoutb ; If upper case selected, go on as is |
|||
ld c,d ; Else substitute lower case version |
|||
echoutb: |
|||
|
|||
push hl ; Save hl |
|||
push bc ; Save bc |
|||
ld de,0ch-3 ; Offset for BIOS console output |
|||
|
|||
if echolst |
|||
|
|||
crtfl equ $+1 |
|||
ld a,0 |
|||
or a ; Printer? |
|||
jr z,echout1 ; No |
|||
inc de ; Offset for BIOS printer output |
|||
inc de |
|||
inc de |
|||
endif ;echolst |
|||
|
|||
; Output char in C with BIOS offset in DE |
|||
|
|||
echout1: |
|||
call biout ; Bios output |
|||
pop bc ; Restore bc,hl |
|||
pop hl |
|||
ret |
|||
|
|||
; Get a character from the command tail buffer |
|||
|
|||
getchar: |
|||
ld a,(hl) ; Get character |
|||
inc hl ; Point to next one |
|||
or a ; Check for end of string |
|||
ret nz ; If not end, return |
|||
pop hl ; Else, clean up stack |
|||
jr echo4 ; And exit from routine |
|||
|
|||
; Output char in C to BIOS with offset in DE |
|||
|
|||
biout: |
|||
ld hl,(wboot+1) ; Get address of warm boot |
|||
add hl,de ; Pt to routine |
|||
jp (hl) ; Jump to it |
|||
|
|||
; End RCPECHO.LIB |
|||
|
|||
|
|||
@ -0,0 +1,76 @@ |
|||
page |
|||
|
|||
; Library: RCPERA for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.2 |
|||
; Date: Sept. 15, 1989 |
|||
; Changes: Chains to error handler with flag set to invoke transient ERA |
|||
; if a read only file is encountered. Propose error code |
|||
; 17 decimal for "file read only" error. |
|||
; |
|||
; Version: 1.1 |
|||
; Date: August 12, 1989 |
|||
; Changes: Now responds dynamically to QUIET flag, eliminating "noise". |
|||
; NOTE: if QUIET is active, using the inspect option or trying |
|||
; to erase R/O files will give meaningless messages. Use |
|||
; the PROT command to set R/O files to R/W first in order to |
|||
; erase them quietly. |
|||
; |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: ERA |
|||
; Function: Erase files |
|||
; Forms: |
|||
; ERA <afn> Erase Specified files and print their names |
|||
; ERA <afn> o Erase Specified files and print their names, but ask |
|||
; for verification before Erase is done |
|||
|
|||
era: |
|||
call retsave |
|||
ld a,(fcb2+1) ; Get eraflg if it's there |
|||
ld (eraflg),a ; Save it as a flag |
|||
ld a,1 ; Dir files only |
|||
call getdir ; Load directory of files |
|||
jp z,prfnf ; Abort if no files |
|||
; |
|||
; Main erase loop |
|||
; |
|||
era1: call break ; See if user wants to stop |
|||
call qplug ; Turn of output if quiet |
|||
push hl ; Save ptr to file |
|||
call prfn ; Print its name |
|||
ld (nxtfile),hl ; Save ptr to next file |
|||
pop hl ; Get ptr to this file |
|||
call unplug ; Turn output on |
|||
call rotest ; Test file pted to by hl for r/o |
|||
ld a,17 ; Proposed file R/O error code |
|||
ld b,00010000b ; EH flag to invoke transient |
|||
jp nz,errex1 ; Chain to transient if R/O |
|||
eraflg equ $+1 ; Address of flag |
|||
ld a,0 ; 2nd byte is flag |
|||
cp ' ' ; Is it an inspect option? |
|||
jr z,era2 ; Skip prompt if it is not |
|||
call eraq ; Erase? |
|||
jr nz,era3 ; Skip if not |
|||
era2: ld de,fcb1+1 ; Copy into fcb1 |
|||
ld b,11 ; 11 bytes |
|||
call blkmov |
|||
call initfcb1 ; Init fcb |
|||
ld c,19 ; Delete file |
|||
call bdos |
|||
era3: ld hl,(nxtfile) ; Hl pts to next file |
|||
ld a,(hl) ; Get char |
|||
or a ; Done? |
|||
if erasp and spaceon |
|||
jp z,spaexit |
|||
else |
|||
jp z,exit |
|||
endif ; Erasp and spaceon |
|||
call crlf ; New line |
|||
jr era1 |
|||
|
|||
; End RCPERA.LIB |
|||
|
|||
|
|||
@ -0,0 +1,119 @@ |
|||
page |
|||
|
|||
; Library: RCPH for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: HELP |
|||
; Function: This command displays a list of all resident commands that |
|||
; are supported, including those in the CPR (command processor), |
|||
; RCP, and FCP. |
|||
; |
|||
; Syntax: H |
|||
|
|||
clist: |
|||
|
|||
; Print the FCP-resident command names |
|||
|
|||
if listfcp |
|||
call print ; Print header for FCP |
|||
db lf |
|||
db 'FC','P'+80h |
|||
ld hl,(fcp) ; Get FCP address dynamically from ENV |
|||
ld a,h ; See if still there |
|||
or l |
|||
jr z,nofcp ; FCP has been removed |
|||
ld bc,5 ; Calculate address of FCP command table |
|||
add hl,bc |
|||
call cmdlist ; Display list of commands |
|||
nofcp: |
|||
endif ;listfcp |
|||
|
|||
; Print the CPR-resident command names |
|||
|
|||
if listcpr |
|||
call print ; Print "CPR" |
|||
db cr,lf ; Need CR if no FCP |
|||
db 'CP','R'+80h |
|||
ld hl,(ccp) ; Get CCP address from ENV |
|||
ld bc,offcmd ; Point to command table in CPR |
|||
add hl,bc |
|||
call cmdlist ; Display the list of commands |
|||
endif ;listcpr |
|||
|
|||
; Print the RCP-resident command names |
|||
|
|||
call crlf ; Skip a line |
|||
ld hl,rcpname ; Print RCP name |
|||
call printhl |
|||
ld hl,RCPbegin+5 ; Point to RCP command table |
|||
; Fall through to CMDLIST |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; Subroutine to display list of commands in a command table (code above |
|||
; falls through to this routine -- do not move it). The commands are |
|||
; displayed 5 per line with 8 character spaces allowed for each command |
|||
; (subject to equates below). |
|||
|
|||
cmdlist: |
|||
call crlf ; Start with new line |
|||
ld e,(hl) ; Get size of each command name into DE |
|||
ld d,0 |
|||
inc hl ; Point to name of first command |
|||
ld c,cmdsline ; Set names-per-line value |
|||
cmdlist1: |
|||
ld a,(hl) ; Get first character of the command name |
|||
or a ; See if it is null |
|||
jr nz,cmdlist1a ; If not, continue |
|||
ld a,cmdsline ; See if we are already on a new line |
|||
cp c |
|||
call nz,crlf ; If not, skip a line |
|||
ret |
|||
|
|||
cmdlist1a: |
|||
if noshow ; Option to suppress wheel-limited cmds |
|||
rla ; Shift high bit of name into carry bit |
|||
jr nc,cmdlist2 ; If not restricted, go on |
|||
call getwhl ; Otherwise, check wheel byte |
|||
or a |
|||
jr nz,cmdlist2 ; If wheel set, continue as usual |
|||
add hl,de ; Otherwise skip this command |
|||
jr cmdlist5 |
|||
endif |
|||
|
|||
; Print leading spaces between names |
|||
|
|||
cmdlist2: |
|||
ld a,cmdspace ; Spacing between command names |
|||
sub e ; Less length of each command name |
|||
ld b,a |
|||
cmdlist3: |
|||
call spac |
|||
djnz cmdlist3 |
|||
|
|||
; Print name of command |
|||
|
|||
ld b,e ; Length of each name into B |
|||
cmdlist4: |
|||
ld a,(hl) ; Get command name character |
|||
call conout |
|||
inc hl ; Point to next |
|||
djnz cmdlist4 |
|||
|
|||
dec c ; Decrement count of names on this line |
|||
jr nz,cmdlist5 ; Branch if room for more names |
|||
call crlf ; Otherwise, end this line and |
|||
ld c,cmdsline ; ..reset count for another line of commands |
|||
|
|||
; Skip to next command name |
|||
|
|||
cmdlist5: |
|||
inc hl ; Skip jump vector |
|||
inc hl |
|||
jr cmdlist1 ; Back to process next name |
|||
|
|||
; End RCPH.LIB |
|||
|
|||
|
|||
@ -0,0 +1,64 @@ |
|||
page |
|||
|
|||
; Library: RCPID for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: September 29, 1989 |
|||
; Changes: ID appended with 'C' if CLED is present |
|||
; |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: September 14, 1988 |
|||
; |
|||
; Function: Build the name of the RCP and append it at the end of the |
|||
; file at label RCPID. This serves two purposes: first it |
|||
; allows the 'H' command to describe which RCP is active, |
|||
; second, the string identifies the actual end of the RCP |
|||
; in memory. |
|||
; |
|||
; ------------------------------------------------------------------------ |
|||
|
|||
; Macros to build RCP ID for Help command |
|||
|
|||
; Under SLR and compatible assemblers, the RCP name reflects the |
|||
; RCP size, e.g., "RCP-21F" means the RCP occupies 21 records. |
|||
|
|||
if SLR |
|||
rcpid macro |
|||
rcplen defl RCPend - RCPbegin |
|||
fulrecs equ rcplen / 128 ; Full records |
|||
lastr equ [rcplen mod 128 + 127]/128 ; Last record, if any |
|||
ttlrecs equ fulrecs + lastr |
|||
|
|||
db 'RCP-' |
|||
db ttlrecs / 10 + '0' ; Tens of records |
|||
db ttlrecs mod 10 + '0' ; Ones |
|||
db rcptype ; 'F', 'H', etc. from RCP.LIB |
|||
if cledon |
|||
db 'C' ; Distinguish CLED versions |
|||
endif |
|||
db 0 ; ID string terminator |
|||
endm |
|||
|
|||
else ; Non-SLR |
|||
rcpid macro |
|||
db 'RCP-' |
|||
db rcptype |
|||
db 0 |
|||
endm |
|||
endif ; SLR |
|||
|
|||
; ----------------------------------------------------------------------- |
|||
|
|||
; Name of RCP |
|||
|
|||
; This block allows the 'H' command and/or the SHOW utility to display a name |
|||
; and version number for this RCP as well as the commands that are supported. |
|||
; It also generates a unique string marking the end of the RCP module. |
|||
|
|||
rcpname: |
|||
rcpid |
|||
|
|||
; End of RCPID.LIB |
|||
|
|||
|
|||
@ -0,0 +1,296 @@ |
|||
page |
|||
|
|||
; Library: RCPIOM for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.1 |
|||
; Date: August 12, 1989 |
|||
; Changes: POKE and PORT now respond dynamically to QUIET flag, |
|||
; eliminating "noise." |
|||
|
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Commands: PEEK, POKE, and PORT |
|||
|
|||
; ------------------------------------------------------------------ |
|||
; |
|||
; Command: PEEK |
|||
; Function: Display memory contents |
|||
; |
|||
; Form: |
|||
; PEEK startadr 128 bytes displayed |
|||
; PEEK startadr endadr Range of bytes displayed |
|||
|
|||
if peekon |
|||
peek: |
|||
call retsave |
|||
ld hl,tbuff+1 ; Find first number |
|||
nxtpeek equ $+1 ; Pointer for in-the-code modification |
|||
ld de,100h ; Default peek address if none |
|||
call sksp ; Skip to first token (if any) |
|||
call nz,hexnum ; Get start address if any |
|||
push de ; Save starting address |
|||
ld bc,peeklen ; Compute default ending address |
|||
ex de,hl |
|||
add hl,bc |
|||
|
|||
if peekchk ; Check for overflow |
|||
jr nc,peek0 ; If no overflow past FFFF, go on |
|||
ld hl,0ffffh ; Else use FFFF as ending address |
|||
peek0: |
|||
endif ;peekchk |
|||
|
|||
ex de,hl ; End address in DE |
|||
call sksp ; Skip to next token (if any) |
|||
call nz,hexnum ; Get 2nd number in DE (else default) |
|||
peek1: pop hl ; HL is start address, DE is end address |
|||
|
|||
if peekhdr |
|||
push hl ; Save starting address again |
|||
ld b,8 ; Output leading spaces |
|||
peek0a: call spac |
|||
djnz peek0a |
|||
ld b,16 ; Display 16 column headers |
|||
peek0b: ld a,l ; Get low byte of address |
|||
and 0fh ; Display low hex digit |
|||
call pashc |
|||
inc hl |
|||
djnz peek0b |
|||
; |
|||
; Display header for ASCII area |
|||
; |
|||
call print |
|||
db ' ',' '+80H ; Space over to ASCII area |
|||
pop hl ; Get address |
|||
push hl |
|||
ld b,16 ; Display 16 chars. ASCII header |
|||
peek0b1:ld a,l ; Get byte |
|||
and 0fh ; Mask |
|||
call pah ; Print ASCII char. |
|||
inc hl ; Next byte |
|||
djnz peek0b1 |
|||
|
|||
if peekbdr |
|||
call crlf |
|||
ld b,8 |
|||
peek0c: call spac ; Print leading spaces |
|||
djnz peek0c |
|||
ld b,16 |
|||
peek0d: call print |
|||
db ' -','-'+80h |
|||
djnz peek0d |
|||
|
|||
; Print border at ASCII area |
|||
|
|||
call print |
|||
db ' ',' '+80h ; Space to ASCII border |
|||
ld b,16 ; 16 dashes |
|||
peek0e: call print |
|||
db '-'+80h |
|||
djnz peek0e |
|||
endif ;peekbdr |
|||
|
|||
pop hl ; Restore starting address |
|||
endif ;peekhdr |
|||
|
|||
ld c,0ffh ; Use C as continue flag |
|||
call peek2 ; Do peek |
|||
ld (nxtpeek),hl ; Set continued peek address |
|||
jp exit |
|||
peek2: |
|||
ld a,c ; Check continuation flag |
|||
or a |
|||
ret z |
|||
|
|||
; Print line header |
|||
|
|||
peek2a: call crlf ; New line |
|||
ld a,h ; Print address |
|||
call pashc |
|||
ld a,l |
|||
call pahc |
|||
call dash ; Print leader |
|||
ld b,16 ; 16 bytes to display |
|||
push hl ; Save start address |
|||
|
|||
; Print hex values for 16 bytes |
|||
|
|||
peek3: ld a,(hl) ; Get next byte |
|||
call pashc ; Print with leading space |
|||
|
|||
; Check for last address. If C is already 0, leave it that way. |
|||
; Otherwise check for end address and if so set C to zero. |
|||
|
|||
ld a,c ; See if continue flag already cleared |
|||
or a |
|||
jr z,peek3a ; If so, skip test |
|||
ld a,h |
|||
sub a,d ; See if h = d |
|||
ld c,a |
|||
ld a,l |
|||
sub a,e ; See if l = e |
|||
or c ; Combine two tests |
|||
ld c,a |
|||
peek3a: inc hl ; Pt to next |
|||
djnz peek3 |
|||
|
|||
; Print ASCII equivalents for 16 bytes |
|||
|
|||
pop hl ; Pt to first address again |
|||
ld b,16 ; 16 bytes |
|||
call print ; Space and fence |
|||
db ' ' |
|||
db fence+80h |
|||
push bc ; Save flag in c |
|||
peek4: ld a,(hl) ; Get next byte |
|||
ld c,'.' ; Assume dot |
|||
and 7fh ; Mask it |
|||
cp ' ' ; Dot if less than space |
|||
jr c,peek5 |
|||
cp 7fh ; Don't print del |
|||
jr z,peek5 |
|||
ld c,a ; Char in c |
|||
peek5: ld a,c ; Get char |
|||
call conout ; Send it |
|||
inc hl ; Pt to next |
|||
djnz peek4 |
|||
call print ; Closing fence |
|||
db fence+80h |
|||
pop bc ; Get flag in c back |
|||
call break ; Allow abort |
|||
jr peek2 |
|||
endif ; Peekon |
|||
|
|||
; PAHC - Print A as 2 hex chars |
|||
; PASHC - With leading space |
|||
|
|||
if peekon or pokeon or porton |
|||
pashc: |
|||
push af ; Save A |
|||
call spac |
|||
pop af |
|||
pahc: push bc ; Save bc |
|||
ld c,a ; Byte in c |
|||
rrca ; Exchange nybbles |
|||
rrca |
|||
rrca |
|||
rrca |
|||
call pah ; Print hex char |
|||
ld a,c ; Get low |
|||
pop bc ; Restore bc and fall thru to pah |
|||
pah: and 0fh ; Mask |
|||
add '0' ; Convert to ascii |
|||
cp '9'+1 ; Letter? |
|||
jr c,pah1 |
|||
add 7 ; Adjust to letter |
|||
pah1: jp conout |
|||
endif ; Peekon or pokeon or porton |
|||
|
|||
; -------------------------------------------------------------------- |
|||
; |
|||
; Command: POKE |
|||
; Function: Place Values into Memory |
|||
; |
|||
; Form: |
|||
; POKE startadr val1 val2 ... |
|||
; |
|||
if pokeon |
|||
poke: |
|||
call retsave |
|||
ld hl,tbuff+1 ; Pt to first char |
|||
call sksp ; Skip to non-blank |
|||
jp z,numerr ; Numerical error |
|||
call hexnum ; Convert to number |
|||
call qplug ; Shut off output if quiet |
|||
call print |
|||
db ' Pok','e'+80h |
|||
call adrat ; Print at message (quiet sensitive) |
|||
call unplug ; Turn on output |
|||
|
|||
; Loop for storing hex values sequentially via POKE |
|||
|
|||
poke1: push de ; Save address |
|||
call sksp ; Skip to non-blank |
|||
jp z,exit ; Done |
|||
cp '"' ; Quoted text? |
|||
jr z,poke2 |
|||
call hexnum ; Get number |
|||
ld a,e ; Get low |
|||
pop de ; Get address |
|||
ld (de),a ; Store number |
|||
inc de ; Pt to next |
|||
jr poke1 |
|||
|
|||
; Store ASCII chars. |
|||
|
|||
poke2: pop de ; Get next address |
|||
inc hl ; Pt to next char |
|||
poke3: ld a,(hl) ; Get next char |
|||
or a ; Done? |
|||
jp z,exit |
|||
ld (de),a ; Put char |
|||
inc hl ; Pt to next |
|||
inc de |
|||
jr poke3 |
|||
|
|||
endif ; Pokeon |
|||
|
|||
; ------------------------------------------------------------------- |
|||
; |
|||
; Command: PORT |
|||
; Function: Display or Set I/O Port Data |
|||
; |
|||
; Forms: |
|||
; PORT addr - Read port and display value |
|||
; PORT addr value - Output value to port |
|||
; |
|||
if porton |
|||
port: |
|||
call retsave |
|||
ld hl,tbuff+1 ; Find first number |
|||
call sksp ; Skip to first command-line token |
|||
jp z,numerr ; Numerical error |
|||
call hexnum ; Get start address into de |
|||
push hl ; Save pointer to command tail |
|||
ld hl,portadl ; Modify code |
|||
ld (hl),e ; Move specified port addr into place |
|||
dec hl ; Point to opcode position |
|||
ld (hl),0dbh ; Poke 'in' opcode |
|||
dec hl |
|||
ld (hl),d ; Save MSB for port address |
|||
inc hl |
|||
ex (sp),hl ; Get tail pointer back while saving this one |
|||
call qplug ; Shut off output if quiet |
|||
call print ; Print header |
|||
db ' Por','t'+80h |
|||
ld a,e |
|||
call pashc ; Print port address |
|||
call sksp ; Skip to possible second value |
|||
jr z,portin ; Proceed with port input |
|||
call hexnum ; Get 2nd number in de |
|||
ex (sp),hl ; Get pointer to opcode back |
|||
ld (hl),0d3h ; Poke 'out' opcode |
|||
call print |
|||
db ': OU','T'+80h |
|||
ld a,e ; Get value to output |
|||
jr paddr |
|||
portin: |
|||
call print |
|||
db ': I','N'+80h |
|||
xor a ; Make sure high port address = 0 (for hd64180) |
|||
portadh equ $+1 |
|||
paddr: ld b,0 ; ..for both in and out instructions |
|||
opcode: |
|||
db 0 ; Opcode for in or out inserted by code above |
|||
portadl: |
|||
db 0 ; Port address inserted by code above |
|||
call pashc |
|||
call unplug ; Turn on output |
|||
pop hl ; Clean up stack |
|||
jp exit |
|||
|
|||
endif ; Porton |
|||
|
|||
; End RCPIOM.Z80 |
|||
|
|||
@ -0,0 +1,256 @@ |
|||
page |
|||
|
|||
; Library: RCPLT for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.1 |
|||
; Date: August 26, 1989 |
|||
; Changes: Some WordStar characters caused garbage to appear on the |
|||
; screen. Now filters control characters other than CR, |
|||
; TAB, and LF. Thanks to Gene Pizzetta for this suggestion. |
|||
; |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Commands: LIST and TYPE |
|||
|
|||
; ---------------------------------------------------------------- |
|||
; |
|||
; Command: LIST |
|||
; Function: Print out specified file on the LST: Device |
|||
; Forms: |
|||
; LIST Do form feed |
|||
; LIST <afn> Print file(s) (NO Paging) |
|||
; Notes: |
|||
; The flags which apply to TYPE do not take effect with LIST |
|||
; The tab expansion code is required for LST: output. |
|||
|
|||
if liston |
|||
list: |
|||
ld a,(fcb1+1) ; Get filename or ' ' from command |
|||
ld (prflg),a ; List flag (A can't be 0) |
|||
cp ' ' ; Null command? |
|||
jp z,lstff ; Yes, do form feed and return |
|||
jr type0 ; No, send file to LST: |
|||
endif ;liston |
|||
|
|||
; -------------------------------------------------------------------- |
|||
; |
|||
; Command: TYPE |
|||
; Function: Print out specified file on the CON: Device |
|||
; Forms: |
|||
; TYPE <afn> Print file |
|||
; TYPE <afn> P Print file with paging flag |
|||
; Notes: |
|||
; The flag PGDFLG defines the letter which toggles the paging |
|||
; facility (P in the forms section above) |
|||
; The flag PGDFLT determines if TYPE is to page by default |
|||
; (PGDFLT=TRUE if TYPE pages by default); combined with |
|||
; PGDFLG, the following events occur -- |
|||
; If PGDFLT = TRUE, PGDFLG turns OFF paging |
|||
; If PGDFLT = FALSE, PGDFLG turns ON paging |
|||
|
|||
type: |
|||
if liston |
|||
xor a ; Turn off printer flag |
|||
ld (prflg),a ; Set flag |
|||
endif ; Liston |
|||
|
|||
; Entry point for list function (LIST) |
|||
|
|||
type0: call retsave ; Save return address |
|||
ld a,(fcb2+1) ; Get page flag from command |
|||
ld (pgflg),a ; Store it |
|||
ld a,1 ; Select dir files |
|||
call getdir ; Allow ambiguous files (HL points to buffer) |
|||
jp z,noflerr ; EH no files error |
|||
ld a,(lins) ; Set line count |
|||
ld (pagcnt),a |
|||
jr typex1 |
|||
|
|||
; Entry point for successive files |
|||
|
|||
typex0: pop hl ; Balance stack for skip |
|||
pop hl ; ..to next file command (^X) |
|||
typex: ld hl,(nxtfile) ; Get ptr to next file |
|||
ld a,(hl) ; Any files? |
|||
or a |
|||
jp z,exit |
|||
|
|||
if liston |
|||
ld a,(prflg) ; Check for lst: output |
|||
or a ; 0=type |
|||
jr z,typex1 |
|||
ld a,cr ; Bol on printer |
|||
call lcout |
|||
call lstff ; Form feed the printer |
|||
; fall thru |
|||
endif ; Liston |
|||
|
|||
; Entry point for 1st file |
|||
typex1: ld de,fcb1+1 ; Copy into fcb1 |
|||
ld b,11 ; 11 bytes |
|||
call blkmov |
|||
ld (nxtfile),hl ; Set ptr to next file |
|||
call initfcb1 ; Init fcb1 |
|||
ld c,15 ; Open file |
|||
call bdos |
|||
inc a ; Set error flag |
|||
jp z,noflerr ; EH no files error |
|||
ld a,cr ; New line |
|||
call lcout |
|||
ld a,lf |
|||
call lcout |
|||
ld bc,080h ; Set char position and tab count |
|||
; (b=0=tab, c=080h=char position) |
|||
|
|||
; Main loop for loading next block |
|||
|
|||
type2: ld a,c ; Get char count |
|||
cp 80h |
|||
jr c,type3 |
|||
call break |
|||
push bc ; Read next block |
|||
ld de,fcb1 ; Pt to fcb |
|||
ld c,20 ; Read record |
|||
call bdos |
|||
or a ; Set flags |
|||
pop bc |
|||
jr nz,typex ; End of file? |
|||
ld c,0 ; Set char count |
|||
ld hl,tbuff ; Pt to first char |
|||
|
|||
; Main loop for printing chars in tbuff |
|||
|
|||
type3: ld a,(hl) ; Get next char |
|||
and 7fh ; Mask out msb |
|||
cp 1ah ; End of file (^z)? |
|||
jr z,typex ; Next file if so |
|||
|
|||
; Output char to CON: or LST: device with tabulation |
|||
|
|||
cp cr ; Reset tab count? |
|||
jr z,type4 |
|||
cp lf ; Reset tab count? |
|||
jr z,type4 |
|||
cp tab ; Tab? |
|||
jr z,type5 |
|||
cp ' ' ; Skip other ctls. |
|||
jr c,type6 |
|||
|
|||
; Output char and increment char count |
|||
|
|||
call lcout ; Output char |
|||
inc b ; Increment tab count |
|||
jr type6 |
|||
|
|||
; Output <CR> or <LF> and reset tab count |
|||
|
|||
type4: call lcout ; Output <cr> or <lf> |
|||
ld b,0 ; Reset tab counter |
|||
jr type6 |
|||
|
|||
; Tabulate |
|||
|
|||
type5: ld a,' ' ; <sp> |
|||
call lcout |
|||
inc b ; Incr pos count |
|||
ld a,b |
|||
and 7 |
|||
jr nz,type5 |
|||
|
|||
; Continue processing |
|||
|
|||
type6: |
|||
inc c ; Increment char count |
|||
inc hl ; Pt to next char |
|||
jr type2 |
|||
|
|||
; Send a formfeed to LST:. Assumes PRFLG <> 0. |
|||
|
|||
lstff: |
|||
ld a,ff ; formfeed |
|||
; fall thru |
|||
|
|||
; Send output to LST: or CON:, as per the flag |
|||
; Return with Z if abort |
|||
|
|||
lcout: push hl ; Save regs |
|||
push bc |
|||
ld e,a ; Char in e |
|||
ld c,2 ; Output to con: |
|||
|
|||
if liston |
|||
prflg equ $+1 ; Pointer for in-the-code modification |
|||
ld a,0 ; 2nd byte is the print flag |
|||
or a ; 0=type |
|||
jr z,lc1 |
|||
ld c,5 ; Output to lst: |
|||
endif ; Liston |
|||
|
|||
lc1: push de ; Save char |
|||
call bdos ; Output char in e |
|||
pop de ; Get char |
|||
ld a,e |
|||
cp lf ; New line? |
|||
jr nz,lc2 ; No, return |
|||
call break ; Check for abort |
|||
jp z,typex0 ; Skip if ^X |
|||
|
|||
if liston |
|||
ld a,(prflg) ; Output to lst:? |
|||
or a ; Nz = yes |
|||
jr nz,lc2 |
|||
endif ; Liston |
|||
|
|||
; New line, so check for paging |
|||
|
|||
ld hl,pagcnt |
|||
dec (hl) |
|||
jr nz,lc2 ; Jump if not end of page |
|||
ld a,(lins) |
|||
ld (hl),a ; Reset counter |
|||
pgflg equ $+1 ; Pointer to in-the-code buffer |
|||
ld a,0 ; 2nd byte is the paging flag |
|||
cp pgdflg ; Page default override option wanted? |
|||
|
|||
if pgdflt ; If paging is default |
|||
jr z,lc2 ; Pgdflg means no paging |
|||
else |
|||
jr nz,lc2 ; Pgdflg means page |
|||
endif ; Pgdflt |
|||
|
|||
push hl ; Save hl |
|||
call print |
|||
db cr,lf,' Typing',' '+80h |
|||
ld hl,fcb1+1 ; Print file name |
|||
call prfn |
|||
call dash ; Print dash |
|||
call conin ; Get input |
|||
pop hl ; Restore hl |
|||
call break1 ; Set Z flag or abort |
|||
push af ; Save results |
|||
|
|||
if typecls and clson |
|||
call cls ; Clear between screens |
|||
else |
|||
call crlf |
|||
endif |
|||
|
|||
pop af ; Get results |
|||
jp z,typex0 ; Control-X, so skip to next file |
|||
cp ctrlz ; If Control-Z, |
|||
jr nz,lc2 |
|||
ld a,pgdflg ; Switch to non-default |
|||
ld (pgflg),a ; ..paging mode |
|||
lc2: pop bc ; Restore regs |
|||
pop hl |
|||
ret |
|||
|
|||
; Storage for line counter |
|||
|
|||
pagcnt: |
|||
ds 1 |
|||
|
|||
; End RCPLT.LIB |
|||
|
|||
@ -0,0 +1,130 @@ |
|||
page |
|||
|
|||
; Library: RCPPROT for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.1 |
|||
; Date: August 12, 1989 |
|||
; Changes: Now responds dynamically to QUIET flag, eliminating "noise." |
|||
|
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: PROT |
|||
; Function: To set the attributes of a file (R/O, SYS, and ARC) |
|||
; Form: PROT afn RSAI |
|||
; Comments: If R, S, or A are omitted, the file is made R/W, DIR, or |
|||
; modified, respectively. R, S, A, and I may be in any order. |
|||
; If I is present, Inspection is enabled. |
|||
|
|||
att: |
|||
call retsave |
|||
call dirchek ; Test bad directory |
|||
xor a ; Set no inspect |
|||
ld (inspect),a |
|||
ld hl,0 ; Set r/o and sys attributes off |
|||
ld c,0 ; Set Arc attribute off |
|||
ld de,fcb2+1 ; Pt to attributes |
|||
ld b,4 ; 4 chars max |
|||
att1: |
|||
ld a,(de) ; Get char |
|||
inc de ; Pt to next |
|||
cp 'I' ; Inspect? |
|||
jr z,atti |
|||
cp 'R' ; Set r/o? |
|||
jr z,attr |
|||
cp 'S' ; Set sys? |
|||
jr z,atts |
|||
cp 'A' |
|||
jr z,atta |
|||
att2: |
|||
djnz att1 |
|||
jr att3 |
|||
atti: |
|||
ld (inspect),a ; Set flag |
|||
jr att2 |
|||
attr: |
|||
ld h,a ; Save R/O flag |
|||
jr att2 |
|||
atts: |
|||
ld l,a ; Save SYS flag |
|||
jr att2 |
|||
atta: |
|||
ld c,a ; Save ARC |
|||
jr att2 |
|||
att3: |
|||
ld (fatt2),hl ; Save file attributes |
|||
ld a,c |
|||
ld (fatt1),a ; Save Arc attribute |
|||
ld a,1 ; Select dir and sys files |
|||
call getdir ; Load directory |
|||
jp z,noflerr ; Tell error handler no file |
|||
jr att5 |
|||
att4: |
|||
ld hl,(nxtfile) ; Pt to next file |
|||
ld a,(hl) ; End of list? |
|||
or a |
|||
jp z,exit |
|||
call crlf ; New line |
|||
att5: call break ; Check for possible abort |
|||
call qplug ; Turn off output if quiet |
|||
push hl ; Save ptr to current file |
|||
call prfn ; Print its name |
|||
ld (nxtfile),hl ; Save ptr to next file |
|||
call print |
|||
db ' Set to R','/'+80h |
|||
ld hl,(fatt2) ; Get attributes |
|||
ld c,'W' ; Assume r/w |
|||
ld a,h ; Get r/o bit |
|||
or a |
|||
jr z,att6 |
|||
ld c,'O' ; Set r/o |
|||
att6: ld a,c ; Get char |
|||
call conout |
|||
ld a,l ; Get sys flag |
|||
or a ; Set flag |
|||
jr z,att7 |
|||
call print |
|||
db ', SY','S'+80h |
|||
att7: ld a,(fatt1) |
|||
or a |
|||
jr z,att7a |
|||
call print |
|||
db ', AR','C'+80h |
|||
att7a: call unplug ; Turn output on |
|||
inspect equ $+1 ; Ptr for in-the-code modification |
|||
ld a,0 ; Get inspect flag |
|||
or a ; Z=no |
|||
pop hl ; Get ptr to current file |
|||
jr z,att8 |
|||
call eraq1 ; Ask for y/n |
|||
jr nz,att4 ; Advance to next file if not y |
|||
att8: ld de,fcb1+1 ; Copy into fcb1 |
|||
ld b,11 ; 11 bytes |
|||
call blkmov |
|||
ex de,hl |
|||
dec hl ; Pt to archive byte |
|||
fatt1 equ $+1 |
|||
ld a,0 |
|||
call attset |
|||
dec hl ; Pt to sys byte |
|||
fatt2 equ $+1 ; Ptr for in-the-code modification |
|||
ld de,0 ; Get attributes |
|||
ld a,e ; Get sys flag |
|||
call attset ; Set attribute correctly |
|||
dec hl ; Pt to r/o byte |
|||
ld a,d ; Get r/o flag |
|||
call attset |
|||
ld de,fcb1 ; Pt to fcb |
|||
ld c,30 ; Set attributes |
|||
call bdos |
|||
jp att4 |
|||
attset: |
|||
res 7,(hl) ; Clear attribute |
|||
or a |
|||
ret z ; 0=clear attribute |
|||
set 7,(hl) ; Set attribute |
|||
ret |
|||
|
|||
; End RCPPROT.LIB |
|||
|
|||
@ -0,0 +1,49 @@ |
|||
page |
|||
|
|||
; Library: RCPQUIET for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.1 |
|||
; Date: August 6, 1989 |
|||
; Changes: Now "Q R[eset]" and "Q S[et]" just reset and set quiet status |
|||
; without showing it, and Q alone (or with any other character, |
|||
; e.g., "Q ?") always just shows status. |
|||
; Forms: |
|||
; Q - Display quiet flag (always) |
|||
; Q s - Set quiet flag ON |
|||
; Q r - Set quiet flag OFF |
|||
; |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: Q |
|||
; Function: Set the Quiet flag on or off |
|||
; Comments: If QQUIET equate is true, then RCP does not report |
|||
; quiet status with the Q command. |
|||
; Forms: |
|||
; Q - Display quiet flag (if QQUIET false) |
|||
; Q s - Set quiet flag ON |
|||
; Q r - Set quiet flag OFF |
|||
|
|||
quset: |
|||
ld a,(fcb1+1) ; Get first char |
|||
ld b,1 ; Prepare to turn on |
|||
cp 'S' ; S-et quiet (ON) |
|||
jr z,quset1 |
|||
ld b,0 ; Prepare to turn off |
|||
cp 'R' ; R-eset quiet (OFF) |
|||
jr nz,qmsg ; Neither S nor R, so display |
|||
quset1: |
|||
ld a,b |
|||
ld (quiet),a |
|||
ret |
|||
|
|||
qmsg: |
|||
; Print Quiet Flag Message |
|||
|
|||
ld a,(quiet) |
|||
jp tella ; Say " On" or " Off" and return |
|||
|
|||
; End RCPQUIET.LIB |
|||
|
|||
|
|||
@ -0,0 +1,108 @@ |
|||
page |
|||
|
|||
; Library: RCPR for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.5 |
|||
; Date: August 30, 1989 |
|||
; Changes: Minor bug fix as suggested by Howard Goldstein. |
|||
; |
|||
; Version: 1.4 |
|||
; Date: August 26, 1989 |
|||
; Changes: Now performs reset 37 for ALL drives under CP/M 2.2 or ZRDOS |
|||
; to ensure that fast fixed disks are reset under ZRDOS, then |
|||
; exits with reset 13 to compensate for bugs in ZRDOS/CP/M 2.2 |
|||
; reset 37. Still resets individual drives selectively under |
|||
; CP/M Plus and ZS/ZDDOS. |
|||
|
|||
; Version: 1.3 |
|||
; Date: August 11, 1989 |
|||
; Changes: Now responds dynamically to QUIET flag, eliminating "noise." |
|||
; Now performs reset 37 in ALL cases, reset 13 as well if not |
|||
; CP/M Plus or ZSDOS (per suggestion by Howard Goldstein). |
|||
|
|||
; Version: 1.2 |
|||
; Date: December 30, 1988 |
|||
; Changes: Now resets single drives under Z3PLUS. |
|||
|
|||
; Version: 1.1 |
|||
; Date: September 11, 1988 |
|||
; Changes: Fixed bug which failed to detect ZRDOS. ZRDOS' function |
|||
; 37, like CP/M's, is not reliable. |
|||
|
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: RESET |
|||
; Function: Reset the disk system |
|||
; Forms: R [d: or dir:] - ZSDOS or CP/M Plus |
|||
; R - CP/M 2.2 or ZRDOS |
|||
; Comments: ZRDOS does not require a disk system reset when disks are |
|||
; changed, but directory programs will not show the correct |
|||
; size if this is not done. It is also good practice. Since |
|||
; no warm boot is performed, the disk in drive A need not have |
|||
; the operating system on it. |
|||
; |
|||
; Under ZSDOS or CP/M Plus, individual drives may be reset, and |
|||
; if RESETSP is true, space remaining is also given. If |
|||
; the fast hard disk reset capability is enabled under ZSDOS, |
|||
; any "fast" fixed disks are also reset at this time. |
|||
; |
|||
; NOTE: It is necessary to reset a legal directory or DU when there are |
|||
; protected directories. |
|||
|
|||
reset: ld a,(quiet) |
|||
or a ; Skip message if quiet |
|||
jr nz,QReset |
|||
call print ; Report action |
|||
db ' Rese','t'+80h |
|||
QReset: call cpmver ; CP/M Plus? |
|||
jr nc,reset0 ; Yes |
|||
ld c,48 |
|||
call bdos ; ZRDOS or CP/M? |
|||
ld a,h |
|||
or a |
|||
jr nz,reset0 ; No, assume bug-free F37 |
|||
ld de,0ffffh ; Yes, reset ALL drives, both ways |
|||
ld c,37 |
|||
call bdos |
|||
ld c,13 |
|||
jp bdos ; Yes, do regular reset |
|||
|
|||
; Reset individual drive(s) |
|||
|
|||
reset0: call dirchek ; Abort with error if illegal drivespec |
|||
ld a,(fcb1) ; Use default drive? |
|||
or a |
|||
jr nz,reset1 ; No, use drive from FCB1 |
|||
ld a,(cdrv) ; Yes, get ZCPR 3.3 current drive byte |
|||
inc a ; Shift range to 1..16 |
|||
reset1: ld hl,1 ; Map drive "A:" |
|||
reset2: dec a ; Done yet? |
|||
jr z,reset3 ; Yes |
|||
add hl,hl ; No, shift vector to next drive |
|||
jr reset2 |
|||
|
|||
; Check for fixed disks |
|||
|
|||
reset3: push hl ; Save current or specified vector |
|||
ld c,39 |
|||
call bdos ; ZSDOS return fixed disks in HL |
|||
pop de ; Restore vector |
|||
ld a,d |
|||
or h ; Add any fixed disks |
|||
ld d,a |
|||
ld a,e |
|||
or l |
|||
ld e,a |
|||
ld c,37 ; Reset individual drive(s) |
|||
|
|||
if spaceon and resetsp |
|||
call bdos |
|||
jp crspace ; Show space remaining (QUIET sensitive) |
|||
else |
|||
jp bdos ; Do reset and return |
|||
endif |
|||
|
|||
; End RCPR.LIB |
|||
|
|||
@ -0,0 +1,165 @@ |
|||
page |
|||
|
|||
; Library: RCPREG for Z34RCP |
|||
; Version: 1.1 |
|||
; Date: August 11, 1989 |
|||
; Changes: Register Set, Decrement, and Increment commands now respond |
|||
; dynamically to QUIET flag, eliminating "noise." |
|||
|
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: REG |
|||
; Function: Manipulate Memory Registers |
|||
; |
|||
; Forms: |
|||
; REG D or REG <-- Display 10 Register Values |
|||
; REG Mreg <-- Decrement Register Value |
|||
; REG Preg <-- Increment Register Value |
|||
; REG Sreg value <-- Set Register Value |
|||
; |
|||
; Vers 2.1 Joe Wright |
|||
; |
|||
; REG reg <-- Display a single register value |
|||
; |
|||
; REG numbers now range from 0 to 31, although only the first ten are |
|||
; displayed with REG D. |
|||
; |
|||
; REG now treats the program error byte as register E. |
|||
; |
|||
register: |
|||
ld de,fcb1+2 ; Pt to first arg |
|||
ld a,(de) ; Get possible digit |
|||
call regptr ; Pt hl to potential register |
|||
dec de ; Point to command |
|||
ld a,(de) |
|||
cp 'S' ; Set? |
|||
jr z,rset |
|||
cp 'P' ; Plus? |
|||
jr z,rinc |
|||
cp 'M' ; Minus? |
|||
jr z,rdec |
|||
cp ' ' |
|||
jr z,rshow |
|||
cp 'D' |
|||
jr z,rshow |
|||
call regptr |
|||
jp regout |
|||
|
|||
; Increment register value |
|||
; HL pts to memory register on input |
|||
|
|||
rinc: inc (hl) ; Increment it |
|||
jr Qregout ; Print result |
|||
|
|||
; Decrement register value |
|||
; HL pts to memory register on input |
|||
|
|||
rdec: dec (hl) ; Decrement value |
|||
jr Qregout ; Print result |
|||
|
|||
; Show first ten registers and Program Error byte |
|||
|
|||
rshow: call rshow10 |
|||
ld hl,z3msg+6 |
|||
jp regout |
|||
|
|||
rshow10:xor a ; Select register 0 |
|||
ld b,a ; Counter set to 0 in b |
|||
call regp1 ; Hl pts to register 0 |
|||
rshow1: ld a,b ; Get counter value |
|||
cp 10 ; First ten registers |
|||
ret z ; Exit if done |
|||
push bc ; Save counter |
|||
push hl ; Save pointer |
|||
call regout ; Print register value |
|||
pop hl ; Get pointer |
|||
pop bc ; Get counter |
|||
inc b ; Increment counter |
|||
ld a,b ; Check for new line |
|||
and 3 |
|||
call z,crlf ; Newline after fourth display |
|||
inc hl ; Pt to next register |
|||
jr rshow1 |
|||
|
|||
; Set register value |
|||
; HL pts to register on input |
|||
|
|||
rset: |
|||
ld de,fcb2+1 ; Pt to value |
|||
call de2bin ; Eval string at de to binary in b |
|||
ld (hl),b ; Set value |
|||
|
|||
; Enter with HL pointing to the register. HL is maintained. |
|||
; |
|||
qregout:ld a,(quiet) |
|||
or a |
|||
ret nz |
|||
regout: call print |
|||
db ' Reg',' '+80h |
|||
ld de,z3msg+30h ; Register 0 |
|||
sbc hl,de ; Register number in hl |
|||
ld a,l |
|||
cp 32 ; A numbered register? |
|||
jr c,rego0 ; Yep |
|||
call print |
|||
db ' ','E'+80h |
|||
jr rego1 ; Report |
|||
|
|||
rego0: push hl |
|||
push de |
|||
ld b,0 ; Suppress zeros |
|||
call decdsp2 ; Report register number |
|||
pop de |
|||
pop hl |
|||
rego1: add hl,de ; Hl points to register again |
|||
call print |
|||
db ' =',' '+80h |
|||
ld l,(hl) |
|||
xor a |
|||
ld h,a |
|||
ld b,a ; Suppress leading zeros |
|||
jp decdsp3 ; Display value |
|||
|
|||
; Evaluate decimal string at DE to binary in B |
|||
|
|||
de2bin: ld b,0 ; Init value to zero |
|||
de2b: ld a,(de) ; Get this digit |
|||
inc de ; Pt to next |
|||
sub '0' ; Convert to binary |
|||
ret c ; A space, finished |
|||
cp 10 ; Range? |
|||
ret nc ; Not decimal, finished |
|||
ld c,a ; Digit in c |
|||
ld a,b ; Multiply old by 10 |
|||
add a,a ; *2 |
|||
add a,a ; *4 |
|||
add a,b ; *5 |
|||
add a,a ; *10 |
|||
add a,c ; Add in new digit |
|||
ld b,a ; Result in b |
|||
jr de2b ; Again |
|||
|
|||
; Set HL to point to memory register whose index is pted to by HL |
|||
; On input, A contains register char |
|||
; On output, HL = address of memory register (reg 0 assumed if error) |
|||
|
|||
regptr: ld hl,z3msg+6 ; The e register |
|||
cp 'E' |
|||
ret z |
|||
push de |
|||
call de2bin ; Get register number in b |
|||
pop de |
|||
ld a,b |
|||
cp 32 ; Range 0-31 |
|||
ld a,0 |
|||
jr nc,regp1 ; Out of range, use 0 |
|||
ld a,b ; Value in a |
|||
regp1: ld hl,z3msg+30h ; Pt to memory registers |
|||
add a,l ; Pt to proper register |
|||
ld l,a |
|||
ret ; No chance of crossing page boundary |
|||
|
|||
; End RCPREG.LIB |
|||
|
|||
@ -0,0 +1,100 @@ |
|||
page |
|||
|
|||
; Library: RCPREN for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: REN |
|||
; Function: To change the name of an existing file |
|||
; Forms: |
|||
; LEFTRIGHT false: |
|||
; REN <New [du: or dir:]ufn>=<Old [du: or dir:]ufn> |
|||
; LEFTRIGHT true: |
|||
; REN <Old [du: or dir:]ufn> <New [du: or dir:]ufn> |
|||
; LEFTRIGHT and TESTEQ both true: |
|||
; Either of the above forms may be used. |
|||
|
|||
ren: |
|||
call retsave |
|||
call dirchek ; Test bad dirspec |
|||
|
|||
if leftright |
|||
call fcbswap ; Exchange command line fcb's |
|||
endif |
|||
; |
|||
; STEP 1: See if old name is ambiguous |
|||
; |
|||
ld hl,fcb2+1 ; Can't be ambiguous |
|||
call ambchk1 |
|||
; |
|||
; STEP 2: Log into user area |
|||
; |
|||
; If dirspec given at old name, use it |
|||
; else use dirspec (or default) given at new name. |
|||
|
|||
ld hl,fcb1 ; Pt to new name |
|||
push hl |
|||
ld de,fcb2 ; Pt to old name |
|||
push de ; Save ptr |
|||
ld a,(de) ; Test if dirspec issued |
|||
or a ; ..at old name |
|||
jr z,ren1 ; No, use user at new name |
|||
ld (hl),a ; Stuff drive into new file |
|||
ld a,(fcb2+13) ; Yes, log to user area |
|||
call setusr ; ..of old name |
|||
jr ren2 |
|||
; |
|||
; Use dirspec at new name (none given at old name) |
|||
; |
|||
ren1: |
|||
ld a,(hl) ; Stuff drive of new name |
|||
ld (de),a ; ..into old name |
|||
call logusr ; Log to user at new name |
|||
ren2: |
|||
; |
|||
; STEP 3: See if old file is R/O |
|||
; |
|||
pop de ; Restore ptr to old FCB |
|||
push de ; Save it again |
|||
ld c,17 ; Look for old file |
|||
call bdos |
|||
inc a |
|||
jr z,rnxit |
|||
call getsbit ; Match found, get ptr to entry in tbuff |
|||
ex de,hl ; Hl pts to entry |
|||
inc hl ; Pt to fn |
|||
call rotest ; See if file is r/o |
|||
jr nz,rnxit1 ; Abort if so |
|||
; |
|||
; STEP 4: See if new file already exists |
|||
; EXTEST performs a number of checks: |
|||
; 1) Ambiguity |
|||
; 2) R/O |
|||
; 3) If file exists and not R/O, permission to delete |
|||
; |
|||
call extest |
|||
jr z,rnxit1 ; R/o or no permission |
|||
; |
|||
; STEP 5: Exchange file name fields for rename |
|||
; |
|||
pop de ; Pt to old |
|||
pop hl ; Pt to new |
|||
push hl ; Save ptr |
|||
ld b,12 ; 12 bytes |
|||
call iswap1 |
|||
; |
|||
; STEP 6: Rename the file |
|||
; |
|||
pop de ; Get ptr to FCB |
|||
ld c,23 ; Rename |
|||
call bdos |
|||
inc a ; Set zero flag if error |
|||
rnxit: |
|||
jp z,noflerr ; EH print no source file message |
|||
rnxit1: |
|||
jp exit |
|||
|
|||
; End RCPREN.LIB |
|||
|
|||
|
|||
@ -0,0 +1,163 @@ |
|||
page |
|||
|
|||
; Library: RCPSP for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.2 |
|||
; Date: August 11, 1989 |
|||
; Changes: CRSPACE does nothing if QUIET is true. |
|||
; |
|||
; Author: Carson Wilson |
|||
; Version: 1.1 |
|||
; Date: December 30, 1988 |
|||
; Changes: Calls CPMVER common routine. |
|||
; Sets DMA to TBUFF for CP/M Plus in case we chained to SP. |
|||
|
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: SP |
|||
; Function: Shows space remaining on designated drive |
|||
; Syntax: SP [DIR:|DU:] |
|||
; Comments: This code can be called by several other RCP commands so that |
|||
; they can show the space remaining on the disk after their |
|||
; operation. |
|||
|
|||
; Now works with CP/M Plus. |
|||
|
|||
if [erasp or cpsp or dirsp] |
|||
crspace: ; Used to call space after other subroutines |
|||
ld a,(quiet) |
|||
or a ; Skip if we're being quiet |
|||
ret nz |
|||
call crlf ; Start new line |
|||
jr space0 ; Skip directory check |
|||
endif ;[erasp or cpsp or dirsp] |
|||
space: |
|||
call dirchek ; Abort to EH on bad dirspec |
|||
space0: ld a,(fcb1) ; Determine requested drive |
|||
or a ; If drive explicitly selected |
|||
jr nz,space1 ; ..then skip |
|||
ld a,(cdrv) ; Get current drive from ZCPR 3.4 |
|||
inc a ; Shift to range 1..16 |
|||
|
|||
space1: |
|||
dec a ; Shift to range 0..15 |
|||
ld e,a ; Save in E for selecting disk below |
|||
add a,'A' ; Convert to letter and |
|||
ld (seldrv),a ; save in message string below |
|||
ld c,14 ; BDOS select disk function |
|||
call bdos ; Not needed if no drive selected, but smallest |
|||
; ..possible code size this way. |
|||
|
|||
; Here we extract the following disk parameter information from the disk |
|||
; parameter block (DPB): |
|||
; BLKSHF: block shift factor (1 byte) |
|||
; BLKMAX: max number of blocks on disk (2 bytes) |
|||
|
|||
call cpmver ; What BDOS is running? |
|||
jr nc,isplus |
|||
ld c,31 ; BDOS get disk parameters function |
|||
call bdos |
|||
inc hl ; Advance to block shift factor byte |
|||
inc hl |
|||
ld a,(hl) ; Get value and |
|||
ld (blkshf),a ; ..save it in code below |
|||
inc hl ; Advance to max block number word |
|||
inc hl |
|||
inc hl |
|||
ld e,(hl) ; Get value into HL |
|||
inc hl |
|||
ld d,(hl) |
|||
inc de ; Add 1 for max number of blocks |
|||
|
|||
; Compute amount of free space left on disk |
|||
|
|||
dfree: |
|||
ld c,27 ; BDOS get allocation vector function |
|||
push de ; Save BLKMAX value |
|||
call bdos ; Get allocation vector into HL |
|||
ld b,h ; Copy allocation vector to BC |
|||
ld c,l |
|||
pop hl ; Restore BLKMAX value to HL |
|||
ld de,0 ; Inititialize count of free blocks |
|||
|
|||
; At this point we have |
|||
; BC = allocation vector address |
|||
; DE = free block count |
|||
; HL = number of blocks on disk |
|||
|
|||
free1: push bc ; Save allocation address |
|||
ld a,(bc) ; Get bit pattern of allocation byte |
|||
ld b,8 ; Set to process 8 blocks |
|||
free2: rla ; Rotate allocated block bit into carry flag |
|||
jr c,free3 ; If set (bit=1), block is allocated |
|||
inc de ; If not set, block is not allocated, so |
|||
; ..increment free block count |
|||
free3: ld c,a ; Save remaining allocation bits in C |
|||
dec hl ; Count down number of blocks on disk |
|||
ld a,l ; See if we are down to zero |
|||
or h |
|||
jr z,free4 ; Branch if no more blocks to check |
|||
ld a,c ; Get back current allocation bit pattern |
|||
djnz free2 ; Loop through 8 bits |
|||
pop bc ; Get pointer to allocation vector |
|||
inc bc ; Point to next allocation byte |
|||
jr free1 ; Continue by processing next allocation byte |
|||
|
|||
free4: pop bc ; Clean up stack |
|||
ex de,hl ; Free block count to HL |
|||
blkshf equ $+1 ; Pointer for in-the-code modification |
|||
ld a,0 ; Get block shift factor |
|||
sub 3 ; Convert to log base 2 of K per block |
|||
jr z,free6 ; Done if single density (1k per block) |
|||
|
|||
; Convert for blocks of more than 1K each |
|||
|
|||
free5: add hl,hl |
|||
dec a |
|||
jr nz,free5 |
|||
|
|||
; At this point HL = amount of free space on disk in K |
|||
|
|||
; Display decimal value of HL |
|||
|
|||
free6: ld b,0 ; Initialize count of digits already printed |
|||
ld de,10000 ; Divisor in DE |
|||
call decdsp ; Print digit (or space if leading '0') |
|||
ld de,1000 |
|||
call decdsp |
|||
call decdsp3 ; Display hundreds, tens, and units |
|||
|
|||
call print |
|||
db 'k free on ' |
|||
seldrv: db 0 ; Modified above to contain drive letter |
|||
db ':'+80h |
|||
ret |
|||
|
|||
; CP/M Plus free space calculation |
|||
|
|||
isplus: ld de,tbuff ; We may have chained to SP |
|||
call setdma |
|||
ld a,(seldrv) ; Get drive letter |
|||
sub 'A' ; Convert to BDOS call value |
|||
ld e,a |
|||
ld c,2eh ; Get free space call |
|||
call bdos |
|||
|
|||
; Convert 3 byte count of records to K |
|||
|
|||
ld b,3 ; Total amount to shift |
|||
c3fre1: ld hl,tbuff+2 ; Point to buffer start |
|||
rr (hl) |
|||
dec hl |
|||
rr (hl) |
|||
dec hl |
|||
rr (hl) |
|||
djnz c3fre1 |
|||
ld hl,(tbuff) ; Get free mod 65536k |
|||
jr free6 |
|||
|
|||
; End RCPSP.LIB |
|||
|
|||
|
|||
File diff suppressed because it is too large
@ -0,0 +1,54 @@ |
|||
page |
|||
|
|||
; Library: RCPWHL for Z34RCP |
|||
; Author: Carson Wilson |
|||
; Version: 1.0 |
|||
; Date: June 15, 1988 |
|||
; |
|||
; Command: WHL |
|||
; Function: Set the Wheel Byte on or off |
|||
; Comments: |
|||
; |
|||
; If WHLQUIET equate is true, then RCP does not report wheel status with WHL |
|||
; command. |
|||
; |
|||
; Forms: |
|||
; WHL -- Report Wheel Status |
|||
; WHL password -- Set Wheel ON if password is correct |
|||
; -- Set Wheel OFF if password incorrect |
|||
whl: ld hl,fcb1+1 ; Pt to first char |
|||
ld a,(hl) ; Get it |
|||
cp ' ' |
|||
jr z,whlmsg ; Report wheel status if no password |
|||
ld de,whlpass |
|||
ld b,8 ; Check 8 chars |
|||
call comp ; Compare |
|||
jr nz,whloff ; Set wheel off if incorrect password |
|||
|
|||
; Turn ON wheel byte |
|||
|
|||
ld a,0ffh ; Turn on wheel byte |
|||
jr whlset |
|||
|
|||
; Turn OFF wheel byte |
|||
|
|||
whloff: xor a ; Turn off wheel byte |
|||
whlset: ld hl,(z3whl) ; Get wheel address from ENV |
|||
ld (hl),a ; Set wheel byte |
|||
|
|||
if whlquiet |
|||
ret ; No report if WHLQUIET |
|||
endif |
|||
|
|||
; Print Wheel Byte Message |
|||
|
|||
whlmsg: call getwhl |
|||
jp tella ; Say " On" or " Off" |
|||
|
|||
; Wheel password defined from SYSRCP.LIB file |
|||
|
|||
db 'Z'-'@' ; Leading ^Z to block attempt to type RCP file |
|||
whlpass:wpass ; Use macro |
|||
|
|||
; End RCPWHL.LIB |
|||
|
|||
Binary file not shown.
@ -0,0 +1,105 @@ |
|||
; |
|||
; Library: Z34CMN.LIB |
|||
; Author: Carson Wilson <crw> |
|||
; Version: 1.2 |
|||
; Date: 16 June 1988 |
|||
; Changes: Renamed CRT0 to LINS for NZCOM compatibility. |
|||
; Added CUSR " " " |
|||
|
|||
; Author: Carson Wilson <crw> |
|||
; Version: 1.1 |
|||
; Date: 12 June 1988 |
|||
; Changes: Added CDRV for various Z34RCP commands. |
|||
; Added CRT0 for Z34RCP TYPE command. |
|||
; Added Z3TCAP and CLRSCR for Z34RCP CLS command. |
|||
; Added QUIET for ZCPR34 time in prompt. |
|||
; Added RSDMSG for ZCPR34 time in prompt. |
|||
|
|||
; Library: Z34CMN.LIB |
|||
; Author: Joe Wright |
|||
; Date: 23 March 1988 |
|||
|
|||
; As a replacement for Z3BASE.LIB, some usual equates. |
|||
|
|||
base equ 0 ; Base Page |
|||
|
|||
false equ 0 |
|||
true equ not false |
|||
|
|||
no equ false |
|||
yes equ true |
|||
|
|||
off equ false |
|||
on equ true |
|||
|
|||
; Named COMMON declarations start here. For compatibility, these |
|||
; are the same names used by Bridger Mitchell's JetLDR. |
|||
|
|||
common /_ENV_/ |
|||
z3env: ; Z3 Environment descriptor |
|||
z3envs equ yes ; There is one |
|||
|
|||
expath equ z3env+9 ; Address of External Path |
|||
expaths equ 10 ; Maximum 10 elements for MPATH |
|||
|
|||
rcp equ z3env+0ch ; Address of RCP |
|||
rcps equ yes ; Used as existence test, not size |
|||
|
|||
fcp equ z3env+12h ; Address of FCB |
|||
fcps equ yes ; Used as existence test, not size |
|||
|
|||
z3ndir equ z3env+15h ; Address of NDR |
|||
z3ndirs equ yes ; Used as existence test, not size |
|||
|
|||
quiet equ z3env+28h ; Quiet flag address <crw> |
|||
|
|||
z3whl equ z3env+29h ; Wheel byte address |
|||
z3whls equ yes ; There is a wheel |
|||
|
|||
lins equ z3env+33h ; CRT text lines address <crw> |
|||
|
|||
ccp equ z3env+3fh ; CCP entry |
|||
ccps equ z3env+41h ; Size |
|||
|
|||
dos equ z3env+42h ; DOS entry (+6) |
|||
doss equ z3env+44h ; Size |
|||
|
|||
bio equ z3env+45h ; BIO entry |
|||
|
|||
z3tcap equ z3env+80h ; TCAP address <crw> |
|||
|
|||
clrscr equ z3env+97h ; Clear screen string address <crw> |
|||
|
|||
common /_SSTK_/ |
|||
shstk: ; Top of Shell stack |
|||
shstks equ yes ; There is a shell stack |
|||
|
|||
common /_MSG_/ |
|||
z3msg: ; Message buffer |
|||
z3msgs equ yes ; There is one |
|||
|
|||
cusr equ z3msg+2eh ; Current user |
|||
cdrv equ z3msg+2fh ; Current drive <crw> |
|||
|
|||
rsdmsg equ z3msg+3ah ; Reserved bytes <crw> |
|||
|
|||
common /_FCB_/ |
|||
extfcb: ; External file control block |
|||
extfcbs equ yes ; There is one |
|||
|
|||
common /_MCL_/ |
|||
z3cl: ; Multiple command line |
|||
z3cls equ yes ; There is one |
|||
|
|||
common /_XSTK_/ |
|||
extstk: ; External stack |
|||
extstks equ yes ; There is one |
|||
|
|||
common /_BIOS_/ |
|||
bios: |
|||
|
|||
cseg ; Select Code Segment |
|||
|
|||
; End of Z34CMN.LIB |
|||
|
|||
|
|||
Binary file not shown.
@ -0,0 +1,122 @@ |
|||
|
|||
; Z33MAC.LIB : Macros for use with ZCPR33 |
|||
|
|||
; General purpose macros |
|||
|
|||
putreg macro |
|||
push hl ; Save registers in order |
|||
push de |
|||
push bc |
|||
endm |
|||
|
|||
getreg macro |
|||
pop bc ; Restore registers in order |
|||
pop de |
|||
pop hl |
|||
endm |
|||
|
|||
swap macro |
|||
rrca ; Exchange nibbles |
|||
rrca |
|||
rrca |
|||
rrca |
|||
endm |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; Macro for forming option bytes |
|||
|
|||
; This macro generates a byte with bits corresponding to up to 8 option |
|||
; flags. The bits are filled in the order of the parameters and are right |
|||
; justified in the byte. |
|||
|
|||
optflag macro f1,f2,f3,f4,f5,f6,f7,f8 |
|||
|
|||
flag defl 0 ;; initial value |
|||
|
|||
irp temp,<f1,f2,f3,f4,f5,f6,f7,f8> |
|||
|
|||
if not nul temp |
|||
flag defl flag shl 1 |
|||
if temp |
|||
flag defl flag or 1 |
|||
endif ;;temp |
|||
endif ;;not nul temp |
|||
|
|||
endm ;; irp |
|||
|
|||
defb low flag |
|||
|
|||
endm ;; optflag |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; Command table entry definition macro |
|||
|
|||
; Macro to form an entry for one command in the table. The first parameter is |
|||
; the name to be used for the command (no quotes); the second parameter is the |
|||
; flag that indicates whether or not the command is to be enabled; the third |
|||
; parameter is the wheel control flag; and the last parameter is the jump |
|||
; address to the code that carries out the command. The command names are |
|||
; automatically padded out to the correct length (they will be truncated and |
|||
; an error message will result if a command name is too long). The characters |
|||
; in the command name are automatically converted to upper case. |
|||
|
|||
command macro cmdname,enableflag,wheelflag,address |
|||
|
|||
if enableflag ;; Generate command only if enabled |
|||
|
|||
whlmask defl wheelflag ;; Initialize variables |
|||
count defl cmdsize ;; Initialize to size of each command name |
|||
|
|||
irpc char,cmdname ;; Repeat over letters in command name |
|||
|
|||
count defl count - 1 ;; Count down characters in name |
|||
|
|||
if [ count lt cmdsize ] |
|||
|
|||
;; If character is lower case, convert to upper case |
|||
|
|||
if [ '&char' ge 'a' ] and [ '&char' le 'z' ] |
|||
|
|||
if whlmask |
|||
defb [ '&char' and 5fh ] + 80h |
|||
else ;;not whlmask |
|||
defb [ '&char' and 5fh ] |
|||
endif ;;whlmask |
|||
|
|||
else ;;not lower case |
|||
|
|||
if whlmask |
|||
defb '&char' + 80h ;; If controlled by wheel, set high bit |
|||
else ;;not whlmask |
|||
defb '&char' ;; If not restricted, leave high bit clear |
|||
endif ;;whlmask |
|||
|
|||
endif ;;lower case |
|||
|
|||
endif ;;[ count lt cmdsize ] |
|||
|
|||
whlmask defl false ;; Turn off high-bit setting after first char |
|||
|
|||
endm ;irpc |
|||
|
|||
;; Pad command name with blanks |
|||
|
|||
if [ count gt cmdsize ] ;; If we underflowed |
|||
*** Command name "&cmdname" is too long / truncated *** |
|||
else |
|||
rept count |
|||
defb ' ' |
|||
endm |
|||
endif ;[ count gt cmdsize ] |
|||
|
|||
dw address ;; Dispatch address for command |
|||
|
|||
endif ;enable |
|||
|
|||
endm ;command |
|||
|
|||
; End Z33MAC.LIB |
|||
|
|||
|
|||
@ -0,0 +1,515 @@ |
|||
|
|||
; File: Z34RCP.LIB |
|||
; Description: Resident Command Package (RCP) for ZCPR34 |
|||
; Version: 1.4 |
|||
; Author: Carson Wilson |
|||
; Date: October 4, 1989 |
|||
; Changes: Added PUSER0 equate suggested by Rob Friefeld. |
|||
; |
|||
; Version: 1.3 |
|||
; Author: Carson Wilson |
|||
; Date: September 29, 1989 |
|||
; Changes: Added CLED (Command Line Editor Shell) command options |
|||
; and equates. |
|||
; |
|||
; Version: 1.2 |
|||
; Author: Carson Wilson |
|||
; Date: August 11, 1989 |
|||
; Changes: Removed several "quiet" conditional assembly equates as |
|||
; we are now sensing the QUIET flag instead. |
|||
; Changed default of WHLQUIET to false. |
|||
; |
|||
; Version: 1.1 |
|||
; Author: Carson Wilson |
|||
; Date: July 10, 1989 |
|||
; Changes: Changed 'S' command name to 'SP'. |
|||
; Removed wheel protection from 'Q' command and set QQUIET |
|||
; on by default. |
|||
; Changed command order. |
|||
|
|||
; Version: 1.0 |
|||
; Author: Carson Wilson |
|||
; Date: June 15, 1988 |
|||
|
|||
; This is the configuration file for the ZCPR Version 3.4 resident command |
|||
; package. You should read through this file and set the equates according |
|||
; to the features you want to implement. Since most systems have a limited |
|||
; amount of space for the resident command package, it will probably be |
|||
; impossible to include all features. |
|||
|
|||
; If you are using an SLR or equivalent assembler, you will be prompted |
|||
; at assembly time for which commands to include in the RCP. |
|||
|
|||
;============================================================================= |
|||
; |
|||
; A S S E M B L Y O P T I O N S |
|||
; |
|||
;============================================================================= |
|||
|
|||
; SLR controls whether special pseudo-ops such as ".printx" and ".accept", |
|||
; and complex macros are used at assembly time. For SLR Systems or compatible |
|||
; macro assemblers, set this equate to true. |
|||
|
|||
SLR equ false |
|||
|
|||
; RCPTYPE is the final character of the RCP name in the H(elp) command, |
|||
; and determines the order in which commands are added. |
|||
|
|||
if SLR |
|||
Y equ true |
|||
N equ false |
|||
H equ 'H' |
|||
F equ 'F' |
|||
|
|||
.accept 'Enter "F" for floppy, "H" for fixed disk version: ',rcptype |
|||
else |
|||
rcptype equ 'H' ; Floppy disk version |
|||
endif ; SLR |
|||
|
|||
; ZRL controls whether named common labels are used in the code. To create |
|||
; absolute code, modify RCPBASE.LIB to reflect your system's addresses, set |
|||
; ZRL to false and instruct your assembler to generate absolute code (either |
|||
; a .COM or .HEX file). |
|||
; |
|||
; To create a relocatable file for use with Bridger Mitchell's JetLDR or |
|||
; Joe Wright's NZCOM, you must use an assembler which recognizes named |
|||
; common blocks. If your assembler has this capability, set ZRL to true |
|||
; and instruct the assembler to generate relocatable (.REL) code. |
|||
|
|||
ZRL equ true |
|||
|
|||
;============================================================================= |
|||
; |
|||
; M A C R O S |
|||
; |
|||
;============================================================================= |
|||
|
|||
; SLR assemblers allow selection of options during assembly. |
|||
|
|||
if SLR |
|||
|
|||
select macro option default comment |
|||
.accept comment,option ; Prompt user for selection |
|||
endm |
|||
|
|||
.printx |
|||
.printx Answer "Y" to include, "N" to exclude commands: |
|||
.printx |
|||
|
|||
else |
|||
|
|||
select macro option default comment |
|||
option equ default ; Use selections from file |
|||
endm |
|||
endif ; SLR |
|||
|
|||
;============================================================================= |
|||
; |
|||
; R E S I D E N T C O M M A N D S S E L E C T I O N |
|||
; |
|||
;============================================================================= |
|||
|
|||
; Commands to include in the resident command package |
|||
|
|||
; There are some interrelations between a number of the possible resident |
|||
; commands. Some are so close (LIST and TYPE) that a single equate controls |
|||
; both functions. Others like DIR and ERA share code (both display file |
|||
; listings). It is efficient to select or deselect them together. |
|||
|
|||
; If you are using an SLR or compatible assembler, you will be prompted |
|||
; at assembly time for command selections. Otherwise, select commands to |
|||
; be included by setting each SELECT macro below to yes or no. |
|||
|
|||
select CLEDON no 'CLED - command line editor shell? ' |
|||
select CLSON yes 'CLS - clear screen? ' |
|||
select RESON yes 'R - reset disk system? ' |
|||
select SPACEON yes 'SP - show space remaining on disk? ' |
|||
|
|||
if RCPTYPE='F' ; Assemble in floppy order |
|||
select DIRON yes 'D - disk directory? ' |
|||
select ERAON yes 'ERA - erase files? ' |
|||
select ECHOON yes 'ECHO - send text to screen or printer? ' |
|||
select RENON yes 'REN - rename files? ' |
|||
select CPON yes 'CP - copy file? ' |
|||
select LTON yes 'TYPE - display file on console? ' |
|||
select POKEON yes 'POKE - set memory? ' |
|||
select PEEKON yes 'PEEK - view memory? ' |
|||
else ; Assemble in fixed-disk order |
|||
select ECHOON yes 'ECHO - send text to screen or printer? ' |
|||
select POKEON yes 'POKE - set memory? ' |
|||
select PEEKON yes 'PEEK - view memory? ' |
|||
select QUIETON yes 'Q - set or clear quiet status? ' |
|||
select DIRON yes 'D - disk directory? ' |
|||
select ERAON no 'ERA - erase files? ' |
|||
select RENON no 'REN - rename files? ' |
|||
select CPON no 'CP - copy file? ' |
|||
select LTON yes 'TYPE - display file on console? ' |
|||
endif ; RCPTYPE='F' |
|||
|
|||
if LTON |
|||
select LISTON no 'LIST - list to printer? ' |
|||
else ; allowed only if TYPE is enabled |
|||
LISTON equ no |
|||
endif |
|||
|
|||
if RCPTYPE='F' ; Assemble in floppy order |
|||
select QUIETON yes 'Q - set or clear quiet status? ' |
|||
endif |
|||
|
|||
select PROTON no 'PROT - set file attributes? ' |
|||
select NOTEON no 'NOTE - command-line comment? ' |
|||
select REGON no 'REG - set and display user registers? ' |
|||
select WHLON no 'WHL - set or clear wheel status? ' |
|||
select PORTON no 'PORT - view and set I/O ports? ' |
|||
|
|||
;============================================================================= |
|||
; |
|||
; W H E E L P R O T E C T I O N |
|||
; |
|||
;============================================================================= |
|||
|
|||
; To prevent unauthorized users from performing certain dangerous or sensitive |
|||
; operations on the computer, ZCPR34 provides the capability of disabling the |
|||
; operation of certain commands when the wheel byte is off. In ZCPR30, an |
|||
; attempt to use one of these wheel-protected commands when the wheel byte was |
|||
; off resulted in an error message. In ZCPR34 things work differently. In the |
|||
; same situation, the command simply disappears. In this way a transient |
|||
; program or extended command processor function can take over and deal with |
|||
; the attempt to use the command in a much more flexible way. |
|||
; |
|||
; Wheel-protected commands in ZCPR30 had extra code to intercept the function |
|||
; and disable it. In ZCPR34, wheel protection is enabled and disabled in a |
|||
; different way. To wheel-protect a command the high bit of the first |
|||
; character in the command name is set. The command table scanner in ZCPR34 |
|||
; will not recognize these commands when the wheel byte is off. Since the same |
|||
; command scanner is used to scan the commands in the RCP and FCP (flow control |
|||
; package), commands there can be wheel protected in the same way. For skilled |
|||
; computer operators it is very easy to use a debugger, file patcher, or disk |
|||
; utility to enable and disable wheel protection without having to reassemble |
|||
; the CPR, RCP, or FCP. |
|||
; |
|||
; Because of the way the command scanner works, once wheel protection is |
|||
; implemented in the CCP, there is no further code penalty in protecting RCP |
|||
; commands. Therefore, we recommend protecting all possibly sensitive |
|||
; commands or none. |
|||
|
|||
wcled equ no ; CLED |
|||
wcp equ yes ; CP |
|||
wdir equ no ; DIR |
|||
wera equ yes ; ERA |
|||
wlist equ yes ; LIST |
|||
wpeek equ yes ; PEEK |
|||
wpoke equ yes ; POKE |
|||
wport equ yes ; PORT |
|||
wprot equ yes ; PROT |
|||
wquiet equ no ; QUIET |
|||
wreg equ yes ; REG |
|||
wren equ yes ; REN |
|||
wspop equ yes ; SPOP |
|||
wtype equ yes ; TYPE |
|||
whrc equ no ; H |
|||
|
|||
wheel defl wcp or wdir or wera or wlist or wpeek or wpoke or wport |
|||
wheel defl wheel or wprot or wreg or wren or wtype or whrc |
|||
|
|||
;============================================================================= |
|||
; |
|||
; C O M M A N D O P T I O N S |
|||
; |
|||
;============================================================================= |
|||
|
|||
; Options affecting several commands |
|||
|
|||
; DSORT includes code to sort file entries for the D, TYPE, LIST, ERA, |
|||
; and PROT commands. |
|||
|
|||
dsort equ yes |
|||
|
|||
; LEFTRIGHT affects the COPY and RENAME commands. If yes, add code to allow |
|||
; CP and REN operations work from left to right, and CP to accept a |
|||
; single filespec as its source. |
|||
; Examples: |
|||
; B0>ren b1:old.nam new.nam Renames B1:old.nam to B1:new.nam |
|||
; B0>cp a15:that.fil Copies A15:that.fil to B0: |
|||
; B0>cp source.fil dest.fil Copies source.fil to dest.fil |
|||
|
|||
leftright equ yes |
|||
|
|||
; If LEFTRIGHT is yes, setting TESTEQ to yes also allows CP and REN commands |
|||
; to be processed from right to left if they contain an equal sign ("="). |
|||
; Costs 11 bytes. |
|||
; Example: |
|||
; B0>cp dest.fil=source.fil Copies source.fil to dest.fil |
|||
|
|||
testeq equ yes |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'CLS' command |
|||
|
|||
; This command clears the console screen. It can either use a fixed string |
|||
; (for shorter code if the same terminal is always used) or use the TCAP |
|||
; entry for automatic adaptation to any terminal. |
|||
|
|||
clstcap equ true ; Use TCAP for clear-screen string |
|||
|
|||
; If CLSTCAP is not enabled, then the string below must be provided and |
|||
; it must end with a character with the high bit set |
|||
|
|||
if not clstcap |
|||
clsstr macro |
|||
db 'Z'-'@'+80h ; Control-Z to clear screen |
|||
endm |
|||
endif ;not clstcap |
|||
|
|||
typecls equ true ; Clear between screens when typing files |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'CP' command |
|||
|
|||
; This command copies a single file. The destination file can have a different |
|||
; name from the source file. Set the size of the memory buffer in K below (do |
|||
; not change the second definition). The copy buffer is placed at the top of |
|||
; the TPA, where it will generally not interfere with subsequent use of the GO |
|||
; command to rerun a program loaded in the TPA. |
|||
|
|||
cpblocks defl 16 ; Size of copy buffer in K |
|||
|
|||
cpblocks defl cpblocks * 8 ; Convert to number of records |
|||
|
|||
; If you will be using a BDOS or RSX which supports new functions 102 (Get |
|||
; Stamp) and 103 (Set Stamp), set STPCALL to true, and datestamps of files |
|||
; will be preserved across copies. The "last access" stamps of both copies |
|||
; are set to the time the copy took place if access stamping is enabled. |
|||
|
|||
stpcall equ true ; Copy file stamps with functions 102/3 |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'DIR' command |
|||
|
|||
; This command displays a sorted listing of the files in a directory. The |
|||
; file name buffer is allocated at the top of the TPA so as not to modify |
|||
; any program loaded in low memory. Consequently, the size of the buffer |
|||
; must be set in advance. |
|||
|
|||
|
|||
maxdirs equ 256 ; Maximum number of names in directory buffer |
|||
|
|||
nosys equ yes ; suppress 'A' and 'S' options if wheel off |
|||
|
|||
slashchk equ yes ; allow "DIR /S" or "DIR /A" formats (costs |
|||
; about 12 bytes) |
|||
|
|||
allflag equ 'A' ; Option character for showing |
|||
; all file (both SYS and DIR) |
|||
sysflag equ 'S' ; Option character for showing |
|||
; SYS files only |
|||
sortnt equ yes ; Sort file by name then type |
|||
wide equ yes ; Make display for 80-column screen |
|||
fence equ '|' ; Character to use as fence between columns |
|||
; ..if WIDE is false. |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'ECHO' command |
|||
|
|||
; This command sends characters to the console or list device. If ECHOLST is |
|||
; enabled, then code is included for sending characters to the LST device. |
|||
; Characters normally go the the console device and are normally upper or lower |
|||
; case depending on the setting of UPCASE. The command line can have special |
|||
; command sequences to toggle the case of the output and to change the |
|||
; destination between the console and printer. Any other character following |
|||
; the command character will be sent as is. For the normal setting of the |
|||
; equates below (upcase/yes, cmdchar/%, prtchar/P, crtchar/C, lcasech/>, |
|||
; and ucasech/<) an example command line would be: |
|||
; A0:ROOT>ECHO T%>HIS IS A TEST^M^J^IDONE%PONE, TWO, %<THREE |
|||
; The following text would be echoed to the console (inlcuding carriage return, |
|||
; linefeed, and tab characters, '|' indicates the left margin): |
|||
; |This is a test |
|||
; | done |
|||
; The string "one, two, THREE" would be sent to the printer. |
|||
|
|||
echolst equ yes ; Allow ECHO to LST device |
|||
|
|||
upcase equ yes ; Initial case of output |
|||
|
|||
cmdchar equ '%' ; Character to flag case change |
|||
|
|||
prtchar equ 'P' ; Character to start sending output to |
|||
; the printer (must be upper case) |
|||
crtchar equ 'C' ; Character to start sending output to |
|||
; the CRT (must be upper case) |
|||
ucasechar equ '<' ; Character after CASECHAR that toggles |
|||
; subsequent output to upper case |
|||
lcasechar equ '>' ; Character after CASECHAR that toggles |
|||
; subsequent output to lower case |
|||
|
|||
; ---------------------------------------------------------------------------- |
|||
|
|||
; 'H' command |
|||
|
|||
; This command displays a list of the resident commands implemented in the |
|||
; system. FCP, CPR, and RCP commands can be displayed. The basic command is |
|||
; not optional; it is always included. |
|||
|
|||
listcpr equ yes ; Include list of CPR-resident commands in |
|||
; display (highly recommended) |
|||
|
|||
listfcp equ yes ; Include list of FCP-resident commands in |
|||
; display (recommended if there is room) |
|||
|
|||
noshow equ yes ; Suppress listing commands that are wheel- |
|||
; restricted unless wheel byte is set (i.e., |
|||
; don't show commands that won't run) |
|||
|
|||
cmdsline equ 5 ; Number of commands on each line of display |
|||
|
|||
cmdspace equ 8 ; Space in display for each command name |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'LIST' and 'TYPE' commands |
|||
|
|||
pgdflt equ yes ; Default to paging of console output |
|||
|
|||
pgdflg equ 'P' ; Character to toggle paging status |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; 'PEEK' command |
|||
|
|||
peekhdr equ yes ; Label columns in PEEK display |
|||
|
|||
peekbdr equ yes ; Include line of hyphens under labels |
|||
|
|||
peekchk equ yes ; If yes, the ending address will be tested to |
|||
; prevent overflow past FFFF (costs 5 bytes) |
|||
|
|||
peeklen equ 127 ; Display 1 record (128 bytes) as default. |
|||
; PEEK displays in increments of 16 bytes. |
|||
; You may set PEEKLEN for 0 to 65525. |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; 'S' command |
|||
|
|||
; Print disk space with other commands (recommended) |
|||
|
|||
dirsp equ true ; Show space after DIR |
|||
erasp equ true ; Show space after ERA |
|||
cpsp equ true ; Show space after CP |
|||
resetsp equ true ; Show space after R |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; 'WHL' command |
|||
|
|||
whlquiet equ false ; If true, don't report wheel state with |
|||
; .."WHL password" command (costs 1 byte) |
|||
|
|||
wpass macro |
|||
db 'SYSTEM ' |
|||
endm |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; 'CLED' command |
|||
; |
|||
; Command line editing takes place in the line buffer. It does not take up |
|||
; room in the RCP. The editor will handle a 255 byte line. Although that |
|||
; is larger than the maximum command line size, it allows you to edit a long |
|||
; line without deleting something first. The history is kept inside the RCP, |
|||
; so its size will depend upon how many other RCP commands are enabled. |
|||
; HISTSIZE should be at least as large as the multiple command line buffer |
|||
; (204 bytes). |
|||
|
|||
lbufwid equ 255 ; Line buffer size, byte |
|||
histsize equ 204 ; History buffer size, word |
|||
|
|||
; CLERA controls whether to null the internal history when CLED is exited, or |
|||
; to leave it for the next run. Secure systems will want to set it to YES. |
|||
|
|||
clera equ no ; Erase history on terminating shell |
|||
|
|||
; CLMIN sets the cutoff for discarding short lines from history recording. |
|||
; A setting of 3 would discard a command such as DIR. |
|||
|
|||
clmin equ 5 ; Discard lines which do not exceed this |
|||
|
|||
clins equ yes ; Initial insert state ON |
|||
clsav equ yes ; Initial history recording ON |
|||
|
|||
; The appearance of the command line prompt may include the system time if a |
|||
; DateStamper or ZS/ZDDOS clock is implemented. The DU:DIR separator character |
|||
; can be changed to indicate that CLED is running. |
|||
|
|||
dudir_sep equ '/' ; DU:DIR separator char |
|||
puser0 equ no ; Print user #0 in prompt |
|||
systime equ yes ; Include system time in prompt |
|||
|
|||
if systime |
|||
civtim equ yes ; Yes for 12-hr civil time vs. 24-hr military |
|||
timesep equ '.' ; Separator between hours and minutes |
|||
endif |
|||
|
|||
; The editor must use EREOL. The VLIB routine to send the EREOL sequence |
|||
; to the terminal needs to test for a video delay and the presence of the "/" |
|||
; quote character. Most terminals can just print the TCAP sequence as is. If |
|||
; that doesn't work, set ERLQUICK to NO. If you are using only one terminal, |
|||
; it will be most efficient to set ERLTCAP to NO and use the CLR_EOL macro. |
|||
|
|||
erltcap equ yes ; Use TCAP routine vs macro |
|||
|
|||
if erltcap |
|||
erlquick equ yes ; Use simplified TCAP routine |
|||
else |
|||
|
|||
clr_eol macro ; Define terminal specific string |
|||
dc 1bh,'T' ; ...set high bit on last character |
|||
endm |
|||
|
|||
endif ;erltcap |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; Command names |
|||
|
|||
; The CTABLE macro, which constructs the command dispatch table, includes a |
|||
; line for each command, the first parameter of which is the name of the |
|||
; command. These names may be changed if you wish. But make sure that you |
|||
; do not use a name that is longer than the maximum allowed length. If you |
|||
; do, the name will be truncated and a nonfatal error will occur during |
|||
; assembly. DO NOT CHANGE ANY PARAMETER OTHER THAN THE COMMAND NAME. Lower |
|||
; case letters will be converted to upper case. The macro COMMAND is defined |
|||
; in Z34MAC.LIB. |
|||
|
|||
cmdsize equ 4 ; Length of each command name |
|||
|
|||
cmdtbl macro |
|||
command CLED, cledon, wcled, cled |
|||
command CLS, clson, false, cls |
|||
command CP, cpon, wcp, copy |
|||
command D, diron, wdir, dir |
|||
command ECHO, echoon, false, echo |
|||
command ERA, eraon, wera, era |
|||
command H, true, whrc, clist |
|||
command LIST, liston, wlist, list |
|||
command NOTE, noteon, false, note |
|||
command P, peekon, wpeek, peek |
|||
command POKE, pokeon, wpoke, poke |
|||
command PORT, porton, wport, port |
|||
command PROT, proton, wprot, att |
|||
command Q, quieton,wquiet, quset |
|||
command R, reson, false, reset |
|||
command REG, regon, wreg, register |
|||
command REN, renon, wren, ren |
|||
command SP, spaceon,false, space |
|||
command SPOP, cledon, wspop, shpop |
|||
command TYPE, lton, wtype, type |
|||
command WHL, whlon, false, whl |
|||
endm |
|||
|
|||
; END Z34RCP.LIB |
|||
|
|||
@ -0,0 +1,515 @@ |
|||
|
|||
; File: Z34RCP.LIB |
|||
; Description: Resident Command Package (RCP) for ZCPR34 |
|||
; Version: 1.4 |
|||
; Author: Carson Wilson |
|||
; Date: October 4, 1989 |
|||
; Changes: Added PUSER0 equate suggested by Rob Friefeld. |
|||
; |
|||
; Version: 1.3 |
|||
; Author: Carson Wilson |
|||
; Date: September 29, 1989 |
|||
; Changes: Added CLED (Command Line Editor Shell) command options |
|||
; and equates. |
|||
; |
|||
; Version: 1.2 |
|||
; Author: Carson Wilson |
|||
; Date: August 11, 1989 |
|||
; Changes: Removed several "quiet" conditional assembly equates as |
|||
; we are now sensing the QUIET flag instead. |
|||
; Changed default of WHLQUIET to false. |
|||
; |
|||
; Version: 1.1 |
|||
; Author: Carson Wilson |
|||
; Date: July 10, 1989 |
|||
; Changes: Changed 'S' command name to 'SP'. |
|||
; Removed wheel protection from 'Q' command and set QQUIET |
|||
; on by default. |
|||
; Changed command order. |
|||
|
|||
; Version: 1.0 |
|||
; Author: Carson Wilson |
|||
; Date: June 15, 1988 |
|||
|
|||
; This is the configuration file for the ZCPR Version 3.4 resident command |
|||
; package. You should read through this file and set the equates according |
|||
; to the features you want to implement. Since most systems have a limited |
|||
; amount of space for the resident command package, it will probably be |
|||
; impossible to include all features. |
|||
|
|||
; If you are using an SLR or equivalent assembler, you will be prompted |
|||
; at assembly time for which commands to include in the RCP. |
|||
|
|||
;============================================================================= |
|||
; |
|||
; A S S E M B L Y O P T I O N S |
|||
; |
|||
;============================================================================= |
|||
|
|||
; SLR controls whether special pseudo-ops such as ".printx" and ".accept", |
|||
; and complex macros are used at assembly time. For SLR Systems or compatible |
|||
; macro assemblers, set this equate to true. |
|||
|
|||
SLR equ true |
|||
|
|||
; RCPTYPE is the final character of the RCP name in the H(elp) command, |
|||
; and determines the order in which commands are added. |
|||
|
|||
if SLR |
|||
Y equ true |
|||
N equ false |
|||
H equ 'H' |
|||
F equ 'F' |
|||
|
|||
.accept 'Enter "F" for floppy, "H" for fixed disk version: ',rcptype |
|||
else |
|||
rcptype equ 'F' ; Floppy disk version |
|||
endif ; SLR |
|||
|
|||
; ZRL controls whether named common labels are used in the code. To create |
|||
; absolute code, modify RCPBASE.LIB to reflect your system's addresses, set |
|||
; ZRL to false and instruct your assembler to generate absolute code (either |
|||
; a .COM or .HEX file). |
|||
; |
|||
; To create a relocatable file for use with Bridger Mitchell's JetLDR or |
|||
; Joe Wright's NZCOM, you must use an assembler which recognizes named |
|||
; common blocks. If your assembler has this capability, set ZRL to true |
|||
; and instruct the assembler to generate relocatable (.REL) code. |
|||
|
|||
ZRL equ true |
|||
|
|||
;============================================================================= |
|||
; |
|||
; M A C R O S |
|||
; |
|||
;============================================================================= |
|||
|
|||
; SLR assemblers allow selection of options during assembly. |
|||
|
|||
if SLR |
|||
|
|||
select macro option default comment |
|||
.accept comment,option ; Prompt user for selection |
|||
endm |
|||
|
|||
.printx |
|||
.printx Answer "Y" to include, "N" to exclude commands: |
|||
.printx |
|||
|
|||
else |
|||
|
|||
select macro option default comment |
|||
option equ default ; Use selections from file |
|||
endm |
|||
endif ; SLR |
|||
|
|||
;============================================================================= |
|||
; |
|||
; R E S I D E N T C O M M A N D S S E L E C T I O N |
|||
; |
|||
;============================================================================= |
|||
|
|||
; Commands to include in the resident command package |
|||
|
|||
; There are some interrelations between a number of the possible resident |
|||
; commands. Some are so close (LIST and TYPE) that a single equate controls |
|||
; both functions. Others like DIR and ERA share code (both display file |
|||
; listings). It is efficient to select or deselect them together. |
|||
|
|||
; If you are using an SLR or compatible assembler, you will be prompted |
|||
; at assembly time for command selections. Otherwise, select commands to |
|||
; be included by setting each SELECT macro below to yes or no. |
|||
|
|||
select CLEDON no 'CLED - command line editor shell? ' |
|||
select CLSON yes 'CLS - clear screen? ' |
|||
select RESON yes 'R - reset disk system? ' |
|||
select SPACEON yes 'SP - show space remaining on disk? ' |
|||
|
|||
if RCPTYPE='F' ; Assemble in floppy order |
|||
select DIRON yes 'D - disk directory? ' |
|||
select ERAON yes 'ERA - erase files? ' |
|||
select ECHOON yes 'ECHO - send text to screen or printer? ' |
|||
select RENON yes 'REN - rename files? ' |
|||
select CPON yes 'CP - copy file? ' |
|||
select LTON yes 'TYPE - display file on console? ' |
|||
select POKEON yes 'POKE - set memory? ' |
|||
select PEEKON yes 'PEEK - view memory? ' |
|||
else ; Assemble in fixed-disk order |
|||
select ECHOON yes 'ECHO - send text to screen or printer? ' |
|||
select POKEON yes 'POKE - set memory? ' |
|||
select PEEKON yes 'PEEK - view memory? ' |
|||
select QUIETON yes 'Q - set or clear quiet status? ' |
|||
select DIRON yes 'D - disk directory? ' |
|||
select ERAON yes 'ERA - erase files? ' |
|||
select RENON yes 'REN - rename files? ' |
|||
select CPON yes 'CP - copy file? ' |
|||
select LTON yes 'TYPE - display file on console? ' |
|||
endif ; RCPTYPE='F' |
|||
|
|||
if LTON |
|||
select LISTON no 'LIST - list to printer? ' |
|||
else ; allowed only if TYPE is enabled |
|||
LISTON equ no |
|||
endif |
|||
|
|||
if RCPTYPE='F' ; Assemble in floppy order |
|||
select QUIETON yes 'Q - set or clear quiet status? ' |
|||
endif |
|||
|
|||
select PROTON no 'PROT - set file attributes? ' |
|||
select NOTEON no 'NOTE - command-line comment? ' |
|||
select REGON no 'REG - set and display user registers? ' |
|||
select WHLON no 'WHL - set or clear wheel status? ' |
|||
select PORTON no 'PORT - view and set I/O ports? ' |
|||
|
|||
;============================================================================= |
|||
; |
|||
; W H E E L P R O T E C T I O N |
|||
; |
|||
;============================================================================= |
|||
|
|||
; To prevent unauthorized users from performing certain dangerous or sensitive |
|||
; operations on the computer, ZCPR34 provides the capability of disabling the |
|||
; operation of certain commands when the wheel byte is off. In ZCPR30, an |
|||
; attempt to use one of these wheel-protected commands when the wheel byte was |
|||
; off resulted in an error message. In ZCPR34 things work differently. In the |
|||
; same situation, the command simply disappears. In this way a transient |
|||
; program or extended command processor function can take over and deal with |
|||
; the attempt to use the command in a much more flexible way. |
|||
; |
|||
; Wheel-protected commands in ZCPR30 had extra code to intercept the function |
|||
; and disable it. In ZCPR34, wheel protection is enabled and disabled in a |
|||
; different way. To wheel-protect a command the high bit of the first |
|||
; character in the command name is set. The command table scanner in ZCPR34 |
|||
; will not recognize these commands when the wheel byte is off. Since the same |
|||
; command scanner is used to scan the commands in the RCP and FCP (flow control |
|||
; package), commands there can be wheel protected in the same way. For skilled |
|||
; computer operators it is very easy to use a debugger, file patcher, or disk |
|||
; utility to enable and disable wheel protection without having to reassemble |
|||
; the CPR, RCP, or FCP. |
|||
; |
|||
; Because of the way the command scanner works, once wheel protection is |
|||
; implemented in the CCP, there is no further code penalty in protecting RCP |
|||
; commands. Therefore, we recommend protecting all possibly sensitive |
|||
; commands or none. |
|||
|
|||
wcled equ no ; CLED |
|||
wcp equ yes ; CP |
|||
wdir equ no ; DIR |
|||
wera equ yes ; ERA |
|||
wlist equ yes ; LIST |
|||
wpeek equ yes ; PEEK |
|||
wpoke equ yes ; POKE |
|||
wport equ yes ; PORT |
|||
wprot equ yes ; PROT |
|||
wquiet equ no ; QUIET |
|||
wreg equ yes ; REG |
|||
wren equ yes ; REN |
|||
wspop equ yes ; SPOP |
|||
wtype equ yes ; TYPE |
|||
whrc equ no ; H |
|||
|
|||
wheel defl wcp or wdir or wera or wlist or wpeek or wpoke or wport |
|||
wheel defl wheel or wprot or wreg or wren or wtype or whrc |
|||
|
|||
;============================================================================= |
|||
; |
|||
; C O M M A N D O P T I O N S |
|||
; |
|||
;============================================================================= |
|||
|
|||
; Options affecting several commands |
|||
|
|||
; DSORT includes code to sort file entries for the D, TYPE, LIST, ERA, |
|||
; and PROT commands. |
|||
|
|||
dsort equ yes |
|||
|
|||
; LEFTRIGHT affects the COPY and RENAME commands. If yes, add code to allow |
|||
; CP and REN operations work from left to right, and CP to accept a |
|||
; single filespec as its source. |
|||
; Examples: |
|||
; B0>ren b1:old.nam new.nam Renames B1:old.nam to B1:new.nam |
|||
; B0>cp a15:that.fil Copies A15:that.fil to B0: |
|||
; B0>cp source.fil dest.fil Copies source.fil to dest.fil |
|||
|
|||
leftright equ yes |
|||
|
|||
; If LEFTRIGHT is yes, setting TESTEQ to yes also allows CP and REN commands |
|||
; to be processed from right to left if they contain an equal sign ("="). |
|||
; Costs 11 bytes. |
|||
; Example: |
|||
; B0>cp dest.fil=source.fil Copies source.fil to dest.fil |
|||
|
|||
testeq equ yes |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'CLS' command |
|||
|
|||
; This command clears the console screen. It can either use a fixed string |
|||
; (for shorter code if the same terminal is always used) or use the TCAP |
|||
; entry for automatic adaptation to any terminal. |
|||
|
|||
clstcap equ true ; Use TCAP for clear-screen string |
|||
|
|||
; If CLSTCAP is not enabled, then the string below must be provided and |
|||
; it must end with a character with the high bit set |
|||
|
|||
if not clstcap |
|||
clsstr macro |
|||
db 'Z'-'@'+80h ; Control-Z to clear screen |
|||
endm |
|||
endif ;not clstcap |
|||
|
|||
typecls equ true ; Clear between screens when typing files |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'CP' command |
|||
|
|||
; This command copies a single file. The destination file can have a different |
|||
; name from the source file. Set the size of the memory buffer in K below (do |
|||
; not change the second definition). The copy buffer is placed at the top of |
|||
; the TPA, where it will generally not interfere with subsequent use of the GO |
|||
; command to rerun a program loaded in the TPA. |
|||
|
|||
cpblocks defl 16 ; Size of copy buffer in K |
|||
|
|||
cpblocks defl cpblocks * 8 ; Convert to number of records |
|||
|
|||
; If you will be using a BDOS or RSX which supports new functions 102 (Get |
|||
; Stamp) and 103 (Set Stamp), set STPCALL to true, and datestamps of files |
|||
; will be preserved across copies. The "last access" stamps of both copies |
|||
; are set to the time the copy took place if access stamping is enabled. |
|||
|
|||
stpcall equ true ; Copy file stamps with functions 102/3 |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'DIR' command |
|||
|
|||
; This command displays a sorted listing of the files in a directory. The |
|||
; file name buffer is allocated at the top of the TPA so as not to modify |
|||
; any program loaded in low memory. Consequently, the size of the buffer |
|||
; must be set in advance. |
|||
|
|||
|
|||
maxdirs equ 256 ; Maximum number of names in directory buffer |
|||
|
|||
nosys equ yes ; suppress 'A' and 'S' options if wheel off |
|||
|
|||
slashchk equ yes ; allow "DIR /S" or "DIR /A" formats (costs |
|||
; about 12 bytes) |
|||
|
|||
allflag equ 'A' ; Option character for showing |
|||
; all file (both SYS and DIR) |
|||
sysflag equ 'S' ; Option character for showing |
|||
; SYS files only |
|||
sortnt equ yes ; Sort file by name then type |
|||
wide equ yes ; Make display for 80-column screen |
|||
fence equ '|' ; Character to use as fence between columns |
|||
; ..if WIDE is false. |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'ECHO' command |
|||
|
|||
; This command sends characters to the console or list device. If ECHOLST is |
|||
; enabled, then code is included for sending characters to the LST device. |
|||
; Characters normally go the the console device and are normally upper or lower |
|||
; case depending on the setting of UPCASE. The command line can have special |
|||
; command sequences to toggle the case of the output and to change the |
|||
; destination between the console and printer. Any other character following |
|||
; the command character will be sent as is. For the normal setting of the |
|||
; equates below (upcase/yes, cmdchar/%, prtchar/P, crtchar/C, lcasech/>, |
|||
; and ucasech/<) an example command line would be: |
|||
; A0:ROOT>ECHO T%>HIS IS A TEST^M^J^IDONE%PONE, TWO, %<THREE |
|||
; The following text would be echoed to the console (inlcuding carriage return, |
|||
; linefeed, and tab characters, '|' indicates the left margin): |
|||
; |This is a test |
|||
; | done |
|||
; The string "one, two, THREE" would be sent to the printer. |
|||
|
|||
echolst equ yes ; Allow ECHO to LST device |
|||
|
|||
upcase equ yes ; Initial case of output |
|||
|
|||
cmdchar equ '%' ; Character to flag case change |
|||
|
|||
prtchar equ 'P' ; Character to start sending output to |
|||
; the printer (must be upper case) |
|||
crtchar equ 'C' ; Character to start sending output to |
|||
; the CRT (must be upper case) |
|||
ucasechar equ '<' ; Character after CASECHAR that toggles |
|||
; subsequent output to upper case |
|||
lcasechar equ '>' ; Character after CASECHAR that toggles |
|||
; subsequent output to lower case |
|||
|
|||
; ---------------------------------------------------------------------------- |
|||
|
|||
; 'H' command |
|||
|
|||
; This command displays a list of the resident commands implemented in the |
|||
; system. FCP, CPR, and RCP commands can be displayed. The basic command is |
|||
; not optional; it is always included. |
|||
|
|||
listcpr equ yes ; Include list of CPR-resident commands in |
|||
; display (highly recommended) |
|||
|
|||
listfcp equ yes ; Include list of FCP-resident commands in |
|||
; display (recommended if there is room) |
|||
|
|||
noshow equ yes ; Suppress listing commands that are wheel- |
|||
; restricted unless wheel byte is set (i.e., |
|||
; don't show commands that won't run) |
|||
|
|||
cmdsline equ 5 ; Number of commands on each line of display |
|||
|
|||
cmdspace equ 8 ; Space in display for each command name |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; 'LIST' and 'TYPE' commands |
|||
|
|||
pgdflt equ yes ; Default to paging of console output |
|||
|
|||
pgdflg equ 'P' ; Character to toggle paging status |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; 'PEEK' command |
|||
|
|||
peekhdr equ yes ; Label columns in PEEK display |
|||
|
|||
peekbdr equ yes ; Include line of hyphens under labels |
|||
|
|||
peekchk equ yes ; If yes, the ending address will be tested to |
|||
; prevent overflow past FFFF (costs 5 bytes) |
|||
|
|||
peeklen equ 127 ; Display 1 record (128 bytes) as default. |
|||
; PEEK displays in increments of 16 bytes. |
|||
; You may set PEEKLEN for 0 to 65525. |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; 'S' command |
|||
|
|||
; Print disk space with other commands (recommended) |
|||
|
|||
dirsp equ true ; Show space after DIR |
|||
erasp equ true ; Show space after ERA |
|||
cpsp equ true ; Show space after CP |
|||
resetsp equ true ; Show space after R |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; 'WHL' command |
|||
|
|||
whlquiet equ false ; If true, don't report wheel state with |
|||
; .."WHL password" command (costs 1 byte) |
|||
|
|||
wpass macro |
|||
db 'SYSTEM ' |
|||
endm |
|||
|
|||
;---------------------------------------- |
|||
|
|||
; 'CLED' command |
|||
; |
|||
; Command line editing takes place in the line buffer. It does not take up |
|||
; room in the RCP. The editor will handle a 255 byte line. Although that |
|||
; is larger than the maximum command line size, it allows you to edit a long |
|||
; line without deleting something first. The history is kept inside the RCP, |
|||
; so its size will depend upon how many other RCP commands are enabled. |
|||
; HISTSIZE should be at least as large as the multiple command line buffer |
|||
; (204 bytes). |
|||
|
|||
lbufwid equ 255 ; Line buffer size, byte |
|||
histsize equ 204 ; History buffer size, word |
|||
|
|||
; CLERA controls whether to null the internal history when CLED is exited, or |
|||
; to leave it for the next run. Secure systems will want to set it to YES. |
|||
|
|||
clera equ no ; Erase history on terminating shell |
|||
|
|||
; CLMIN sets the cutoff for discarding short lines from history recording. |
|||
; A setting of 3 would discard a command such as DIR. |
|||
|
|||
clmin equ 5 ; Discard lines which do not exceed this |
|||
|
|||
clins equ yes ; Initial insert state ON |
|||
clsav equ yes ; Initial history recording ON |
|||
|
|||
; The appearance of the command line prompt may include the system time if a |
|||
; DateStamper or ZS/ZDDOS clock is implemented. The DU:DIR separator character |
|||
; can be changed to indicate that CLED is running. |
|||
|
|||
dudir_sep equ '/' ; DU:DIR separator char |
|||
puser0 equ no ; Print user #0 in prompt |
|||
systime equ yes ; Include system time in prompt |
|||
|
|||
if systime |
|||
civtim equ yes ; Yes for 12-hr civil time vs. 24-hr military |
|||
timesep equ '.' ; Separator between hours and minutes |
|||
endif |
|||
|
|||
; The editor must use EREOL. The VLIB routine to send the EREOL sequence |
|||
; to the terminal needs to test for a video delay and the presence of the "/" |
|||
; quote character. Most terminals can just print the TCAP sequence as is. If |
|||
; that doesn't work, set ERLQUICK to NO. If you are using only one terminal, |
|||
; it will be most efficient to set ERLTCAP to NO and use the CLR_EOL macro. |
|||
|
|||
erltcap equ yes ; Use TCAP routine vs macro |
|||
|
|||
if erltcap |
|||
erlquick equ yes ; Use simplified TCAP routine |
|||
else |
|||
|
|||
clr_eol macro ; Define terminal specific string |
|||
dc 1bh,'T' ; ...set high bit on last character |
|||
endm |
|||
|
|||
endif ;erltcap |
|||
|
|||
;----------------------------------------------------------------------------- |
|||
|
|||
; Command names |
|||
|
|||
; The CTABLE macro, which constructs the command dispatch table, includes a |
|||
; line for each command, the first parameter of which is the name of the |
|||
; command. These names may be changed if you wish. But make sure that you |
|||
; do not use a name that is longer than the maximum allowed length. If you |
|||
; do, the name will be truncated and a nonfatal error will occur during |
|||
; assembly. DO NOT CHANGE ANY PARAMETER OTHER THAN THE COMMAND NAME. Lower |
|||
; case letters will be converted to upper case. The macro COMMAND is defined |
|||
; in Z34MAC.LIB. |
|||
|
|||
cmdsize equ 4 ; Length of each command name |
|||
|
|||
cmdtbl macro |
|||
command CLED, cledon, wcled, cled |
|||
command CLS, clson, false, cls |
|||
command CP, cpon, wcp, copy |
|||
command D, diron, wdir, dir |
|||
command ECHO, echoon, false, echo |
|||
command ERA, eraon, wera, era |
|||
command H, true, whrc, clist |
|||
command LIST, liston, wlist, list |
|||
command NOTE, noteon, false, note |
|||
command P, peekon, wpeek, peek |
|||
command POKE, pokeon, wpoke, poke |
|||
command PORT, porton, wport, port |
|||
command PROT, proton, wprot, att |
|||
command Q, quieton,wquiet, quset |
|||
command R, reson, false, reset |
|||
command REG, regon, wreg, register |
|||
command REN, renon, wren, ren |
|||
command SP, spaceon,false, space |
|||
command SPOP, cledon, wspop, shpop |
|||
command TYPE, lton, wtype, type |
|||
command WHL, whlon, false, whl |
|||
endm |
|||
|
|||
; END Z34RCP.LIB |
|||
|
|||
@ -0,0 +1,429 @@ |
|||
|
|||
ZCPR Version 3.4 Resident Command Package |
|||
Source Code |
|||
|
|||
Revised Documentation for Version 1.1 |
|||
October 7, 1989 by Carson Wilson |
|||
|
|||
Version 1.0 Documentation |
|||
June 17, 1988 by Carson Wilson |
|||
|
|||
|
|||
Contents |
|||
-------- |
|||
|
|||
1. Files in this Library. |
|||
|
|||
2. Purpose of the Resident Command Package. |
|||
|
|||
2.1. "Resident" vs. "Transient" Commands. |
|||
|
|||
2.2. The Z-System Resident Command Package. |
|||
|
|||
2.2.1. Design Philosophy of the Z34 RCP. |
|||
|
|||
3. Structure and Operation of the RCP Segment. |
|||
|
|||
4. Generating an RCP for your System. |
|||
|
|||
4.1. The Z-Relocatable Approach. |
|||
|
|||
4.1.1. NZCOM and JetLDR. |
|||
4.1.2. Z-Relocatable (ZRL) Code |
|||
|
|||
4.2. The Assembly Approach. |
|||
|
|||
4.2.1. Note on Assemblers. |
|||
4.2.2. Assembly to Absolute Code. |
|||
4.2.3. Assembly to Z-Relocatable Code. |
|||
4.2.4. Adding Custom Commands to Z34RCP. |
|||
|
|||
5. Legal Use of These Files. |
|||
|
|||
|
|||
|
|||
1. Files in this Library. |
|||
|
|||
This library of files contains the assembler source code and |
|||
accompanying documentation for the Z-System Resident Command |
|||
Package (RCP). To use Z34RCP you must be running ZCPR versions |
|||
3.3 or above. For pre-assembled Z-Relocatable (ZRL) RCPs, see |
|||
RCPZRL11.LBR. Z34RCP11.LBR consists of the following files |
|||
(uncompress with UNCR.COM, QL.COM or LBRE.COM): |
|||
|
|||
CLEDINST.CZM - Installer for CLED command. |
|||
CLEDSAVE.CZM - Command file utility for CLED. |
|||
RCPCLED .DZC - Documentation on CLED. |
|||
RCPBASE .LZB - Used to assemble an absolute address RCP. |
|||
RCPCMD .LZB - Used to include custom commands in the RCP. |
|||
RCP?????.LZB - Code modules for the standard RCP commands. |
|||
SYSDEF .LZB - Commonly used equates. |
|||
Z34CMN .LZB - Used to assemble Z-Relocatable RCP's. |
|||
Z34DEFN .LZB - Offsets in the ZCPR 3.4 code. |
|||
Z34MAC .LZB - Assembler macros. |
|||
Z34RCP11.DZC - This file. |
|||
Z34RCP11.FOR - Short description of the library. |
|||
Z34RCP11.HZP - Help file for the RCP, gives command syntax and |
|||
examples. |
|||
Z34RCP .LZB - Used to select features when assembling the RCP. |
|||
Z34RCP11.NZW - Changes since Z34RCP10.LBR. Intended for former |
|||
RCP users, this will be only of passing interest |
|||
to new users. |
|||
Z34RCP11.ZZ0 - Main file for assembling the RCP. |
|||
ZSYSTEM .AZ - General information about Z System. |
|||
|
|||
|
|||
2. Purpose of the Resident Command Package. |
|||
|
|||
2.1. "Resident" vs. "Transient" Commands. |
|||
|
|||
Most of the commands used under CP/M and Z-System are "transient" |
|||
commands. The machine code for these commands (or "programs") is |
|||
stored in "command files," whose file type is normally .COM. |
|||
Thus, the machine code for WordStar is stored in a file called |
|||
"WS.COM". |
|||
|
|||
To run WordStar, the user issues the command "WS" at the command |
|||
line, the operating system loads WS.COM from the disk drive to |
|||
memory, and WS.COM takes over control of the computer. If the |
|||
user then exits WordStar and issues another command, the |
|||
operating system can load another command file from the disk, |
|||
reusing the area of memory previously occupied by WordStar. |
|||
|
|||
Recycling memory in this way makes personal computers quite |
|||
versatile, as the number of commands available to the user is |
|||
only limited to the number of command files stored on disk. |
|||
There are some drawbacks to this approach, however. Although |
|||
disk-based commands conserve memory by recycling it, they must be |
|||
loaded from disk each time they operate. This creates its own |
|||
costs in terms of speed of execution, disk storage space, and |
|||
memory reallocation. |
|||
|
|||
The most obvious disadvantage of loading a file from disk each |
|||
time a command is issued is that it takes time to find and load |
|||
disk files. Especially with floppy diskettes, the amount of time |
|||
which elapses after the command is issued and before the command |
|||
executes is significant. A second drawback to disk-based |
|||
commands is that commands will not execute unless their machine |
|||
code is available on the disk system. This means that the user |
|||
must know what command files are available on disk before issuing |
|||
commands. The final disadvantage of disk file based commands is |
|||
that some commands (e.g., SAVE) require that the area of memory |
|||
normally overwritten by command files (known as the "Transient |
|||
Program Area" or TPA) be preserved. |
|||
|
|||
In answer to these difficulties, the creators of CP/M designed |
|||
some of its commands as "built-in" commands. The DIR, REN, SAVE, |
|||
ERA, USER, and TYPE commands of CP/M 2.2 remain in memory and can |
|||
be issued without loading machine code files from disk. Thus, |
|||
the DIR command provides a disk directory regardless of whether |
|||
the command file "DIR.COM" is present on disk, and the SAVE |
|||
command saves the contents of memory at 100 hex to a disk file. |
|||
Residing permanently in memory, these commands are simple in |
|||
order to leave memory for disk-based commands to load in. |
|||
|
|||
2.2. The Z-System Resident Command Package. |
|||
|
|||
The creators of Z-System have followed the resident command |
|||
philosophy of CP/M, extending and enhancing the capabilities of |
|||
resident commands with the Z-System Resident Command Package. |
|||
Under CP/M 2.2, resident commands are tightly integrated with the |
|||
operating system. The user is therefore limited to a fixed set |
|||
of resident commands. The code in the Z-System Resident Command |
|||
Package is much more loosely linked with the operating system. |
|||
|
|||
The RCP occupies a section of protected memory, but how that |
|||
memory is used is only very loosely constrained. The Z-System |
|||
resident command package may be tailored for a wide variety of |
|||
installations, and easily altered within a single installation. |
|||
|
|||
2.2.1. Design Philosophy of the Z34 RCP. |
|||
|
|||
Though any set of commands which will fit in the RCP memory area |
|||
can be loaded as an RCP, a standard set of Z-System RCP commands |
|||
have evolved over the years. Distributed as the standard |
|||
Z-System RCP, this set of commands consists of universal, |
|||
single-purpose commands modeled after the resident command set of |
|||
CP/M 2.2, such as DIR, REN, and ERA. |
|||
|
|||
Keeping these commands simple both conserves memory and allows |
|||
their use in custom command scripts. None of the standard RCP |
|||
commands require interaction on the part of the user--they |
|||
perform a single function and quit. Aliases or other command |
|||
scripts which build complex commands from simple RCP commands |
|||
therefore retain complete control over the user interface. |
|||
|
|||
However, the standard RCP forms only one of many alternative uses |
|||
to which the Z-System RCP memory segment may be put. Since the |
|||
RCP memory is protected, it can be used by background programs |
|||
which continue to function even while other applications have |
|||
been loaded into the transient program area. Several such |
|||
programs, including key-redefiners, screen-trapping programs, |
|||
background numeric calculators, program assembly environments, |
|||
and memory utilities have been developed. |
|||
|
|||
Until Z34RCP, all but the most advanced users had to surrender |
|||
their entire RCP to use the custom commands, even if the commands |
|||
needed far less than the available RCP space. Thus, to use a |
|||
key-redefinition RCP, one was forced to give up all of his other |
|||
RCP commands. Z34RCP solves this problem by acting as a base to |
|||
which programmers may easily add code. By modifying the standard |
|||
file RCPCMD.LIB, programmers can implement and distribute custom |
|||
RCP commands which may be installed by those with only basic |
|||
knowledge of assembly language. See "Adding Custom Commands," |
|||
below, for details. |
|||
|
|||
|
|||
3. Structure and Operation of the RCP Segment. |
|||
|
|||
Typically, the Resident Command Package occupies 2 kilobytes of |
|||
memory, protected above the system's Basic Input Output System |
|||
(BIOS). Its internal structure is very simple, consisting of the |
|||
five byte string "Z3RCP", a table of command names and their |
|||
addresses within the RCP, and the machine code of the commands |
|||
themselves. This means that an RCP of a given length can contain |
|||
any number of resident commands which will fit in 2k, from one |
|||
large program to many shorter programs. |
|||
|
|||
Further, since the RCP is independent of the rest of the |
|||
operating system, the resident commands may be changed at will. |
|||
On system startup, a default RCP is loaded into memory. |
|||
Thereafter the RCP's commands remain active until the system is |
|||
turned off or another RCP is loaded. |
|||
|
|||
Using loader programs to load the RCP to memory allows another |
|||
important ability--it can exchange RCPs during a single session. |
|||
By allowing users to change their RCPs "on-the-fly," loader |
|||
programs provide some of the benefits of transient commands even |
|||
while preserving the benefits of resident commands. In fact, |
|||
even what portion of memory is allocated to the RCP can be |
|||
altered in this way by advanced users! (see the Z-System User's |
|||
Manual for more on this). |
|||
|
|||
|
|||
4. Generating an RCP for your System. |
|||
|
|||
Since Z80 computers come with a wide variety of operating system |
|||
environments, it is impossible for a single segment of machine |
|||
code function as a universal RCP. Due to differences in |
|||
operating system and hardware design, the size and location of |
|||
memory available to the Z-System RCP vary widely. Until |
|||
Z34RCP, this meant that each type of Z80 computer required an RCP |
|||
segment assembled specifically for that computer. |
|||
|
|||
Now, however, there are two basic means by which you may generate |
|||
an RCP for your system. The simplest route is to load already- |
|||
assembled Z-Relocatable code modules. This technique is |
|||
recommended for beginners and those with little experience in |
|||
assembly language. See RCPZRL11.LBR for pre-assembled RCP |
|||
modules. For more experienced users with an interest in |
|||
customizing or their RCPs or adding their own commands, custom |
|||
assembly of the files in this library is also an option. |
|||
|
|||
4.1. The Z-Relocatable Approach. |
|||
|
|||
4.1.1. NZCOM and JetLDR. |
|||
|
|||
LDR.COM, the familiar Z-System segment loader first introduced by |
|||
Rick Conn as a means of loading the various segments of the ZCPR |
|||
environment from disk to memory, required that system segments be |
|||
assembled to run only at system-specific addresses. For example, |
|||
if the system's RCP started at FA00 hex, only an RCP assembled to |
|||
run at that starting address would function on the system. |
|||
Therefore, separate SYS.RCP files were needed for each computer |
|||
installation. |
|||
|
|||
Thanks to several advanced loader utilities, namely NZCOM by Joe |
|||
Wright and JetLDR and Z3PLUS by Bridger Mitchell, custom- |
|||
assembling an RCP for a given target machine is no longer |
|||
necessary. These three programs can load specially assembled RCP |
|||
segments (known as Z-ReLocatable or "ZRL" segments) to any area |
|||
of memory. Z-System users now need only obtain previously |
|||
assembled RCP segments, much as they need only obtain assembled |
|||
.COM or .OBJ files to run transient programs. |
|||
|
|||
Using information in the system's environmental descriptor, |
|||
advanced loaders load pre-assembled segments to the proper |
|||
addresses in any system. The only remaining constraint is the |
|||
amount of memory allocated to the RCP. While the standard RCP |
|||
size is 2 kilobytes, many Z-System installations vary |
|||
considerably from this standard, so it is still necessary to |
|||
ensure that a ZRL segment does not exceed available RCP memory. |
|||
Fortunately, this is taken care of automatically by the advanced |
|||
loader programs. |
|||
|
|||
Using NZCOM or JetLDR, it is possible to load an RCP directly |
|||
from RCPZRL11.LBR. See NZCOM or JetLDR documentation for full |
|||
instructions on how to load Z-Relocatable RCPs with these |
|||
programs. |
|||
|
|||
4.1.2. Z-Relocatable (ZRL) Code |
|||
|
|||
The technique used by NZCOM and JetLDR to load a single RCP to |
|||
any address in memory involves relocatable code. Relocatable |
|||
code has been used for years by the "linker" programs available |
|||
to assembly language programmers. Since only portions of a given |
|||
Z80 machine code routine are specific to one memory address, it |
|||
is possible to create "relocatable" files of Z80 routines (known |
|||
by their file type .REL) containing all but the address-specific |
|||
codes. These files can then be very quickly relocated (or |
|||
"linked") by a linker program to operate at any memory address. |
|||
|
|||
Z-Relocatable code is simply a more sophisticated form of |
|||
relocatable code. ZRL files contain separately labeled segments, |
|||
known as "named common blocks." Where normal relocatable code is |
|||
all linked to operate at one address at a time by the linker |
|||
program, named common blocks allow the linker to distinguish |
|||
between different sections of the file and to link each "block" |
|||
to operate at a different address. |
|||
|
|||
This represents a major step forwards in user convenience, and |
|||
will certainly lead to more innovative work using the ZCPR system |
|||
segments. There is a minor drawback, however, inherent in the |
|||
form of assembly required by NZCOM and JetLDR. Before the advent |
|||
of these two programs, system segments were equivalent to .COM |
|||
files which were assembled to operate at addresses other than the |
|||
standard 100 hex. The ability to load a single system segment to |
|||
any address depends partially on the form of the assembled system |
|||
segment itself. |
|||
|
|||
While public domain assemblers will produce absolute object |
|||
files, more sophisticated assemblers, such as SLR's Z80ASM (a |
|||
bargain at $50) are required to assemble code with named common |
|||
addresses. NZCOM and JetLDR thus greatly reduce the time needed |
|||
by most users to install Z-System segments, but those wishing to |
|||
assemble Z-Relocatable segments will probably need a commercial |
|||
assembler. |
|||
|
|||
4.2. The Assembly Approach. |
|||
|
|||
Those with knowledge of assembly language may opt to assemble |
|||
their own custom RCPs, including only the commands and options |
|||
which match their exact requirements. Z34RCP.LBR contains the |
|||
complete source to the ZCPR 3.4 RCP. The file Z34RCP.Z80 |
|||
contains include statements to combine the various library files |
|||
during assembly. The file Z34RCP.LIB contains all of the equates |
|||
controlling assembly time options, and should be edited before |
|||
assembling Z34RCP.Z80. |
|||
|
|||
4.2.1. Note on Assemblers. |
|||
|
|||
The development work on Z34RCP was done exclusively with the SLR |
|||
Systems line of Z80 assemblers. Hence, some of the source code |
|||
is unavoidably specific to SLR and compatible assemblers. Those |
|||
using incompatible assemblers such as public-domain Z80 |
|||
assemblers should set the SLR equate in Z34RCP.LIB to FALSE. |
|||
This removes most SLR-specific pseudo-ops, but some additional |
|||
editing of the source files may be required for error-free |
|||
assembly. Unless your assembler can handle named common blocks, |
|||
you will also want to set the ZRL equate in Z34RCP.LIB to FALSE. |
|||
|
|||
4.2.2. Assembly to Absolute Code. |
|||
|
|||
If you are assembling a custom RCP for use at one memory address |
|||
only, or if your assembler can't handle named common blocks, you |
|||
can set the ZRL equate in Z34RCP.LIB to FALSE, and instruct your |
|||
assembler to produce absolute code (either a .HEX or a .COM file). |
|||
|
|||
Before generating absolute code you must set addresses in the |
|||
file RCPBASE.LIB for the particular installation. Once you have |
|||
set these addresses, you may proceed to assemble Z34RCP.Z80 to |
|||
either Z34RCP.COM or Z34RCP.HEX. If your assembler generated a |
|||
.HEX file, use LOAD.COM to convert Z34RCP.HEX to Z34RCP.COM. |
|||
|
|||
If you are running a version of ZCPR prior to 3.4, you must now |
|||
alter two bytes in your Z-System environment segment to point to |
|||
your system's CCP address. The bytes at offset 39 and 40 hex |
|||
(formerly containing "width of printer 2" and "lines on printer |
|||
2") should contain a 2-byte address of your system's CCP, most |
|||
significant byte last. |
|||
|
|||
Z34RCP.COM may now be renamed to SYS.RCP and loaded with the Z- |
|||
System loader program LDR.COM or Bridger Mitchell's JetLDR. |
|||
|
|||
4.2.3. Assembly to Z-Relocatable Code. |
|||
|
|||
Unlike absolute RCP segments, Z-Relocatable segments may be |
|||
loaded to ANY address, provided enough RCP space to contain them |
|||
is available. To assemble a Z-Relocatable RCP, you will need an |
|||
assembler which can handle named common blocks (see 4.2.1 above). |
|||
Set the ZRL equate in Z34RCP.LIB to TRUE, and instruct your |
|||
assembler to produce a relocatable (.REL) file. The resulting |
|||
Z34RCP.REL may then be renamed to Z34RCP.ZRL and loaded with |
|||
NZCOM, Z3PLUS, JetLDR. |
|||
|
|||
4.2.4. Adding Custom Commands to Z34RCP. |
|||
|
|||
As mentioned above, I have designed Z34RCP as a base to which |
|||
custom RCP commands may readily be added. All code and command |
|||
names for custom commands may be included in RCPCMD.LIB. |
|||
Thereafter, whenever the RCP is assembled the commands added to |
|||
RCPCMD.LIB will be included automatically. To remove the custom |
|||
commands, just replace the modified RCPCMD.LIB with an unmodified |
|||
copy. See RCPCMD.LIB for detailed instructions on how to add |
|||
code and command names. |
|||
|
|||
RCPCMD.LIB also facilitates distribution of custom commands to be |
|||
included by others in their RCPs. Simply distribute a copy of |
|||
your modified RCPCMD.LIB along with instructions on how to use |
|||
your custom commands. Users may then easily include the new |
|||
commands by substituting your modified RCPCMD.LIB for their |
|||
original copy and reassembling their RCPs. |
|||
|
|||
Of course, users of NZCOM, Z3PLUS, or JetLDR may simply trade |
|||
custom RCPs in Z-Relocatable form and dispense with the need for |
|||
any assembly work on the part of the user. All three of these |
|||
advanced loaders are available from Z Systems Associates (see |
|||
below). |
|||
|
|||
|
|||
5. Legal Use of These Files. |
|||
|
|||
Z34RCP is copyright 1989 by Z Systems Associates (ZSA), all |
|||
rights reserved. Any commercial use of Z34RCP, defined as any |
|||
situation where the duplicator recieves revenue by duplicating or |
|||
distributing Z34RCP by itself or in conjunction with any hardware |
|||
or software product, is expressly prohibited unless authorized in |
|||
writing by ZSA. |
|||
|
|||
Except for the file RCPCMD.LIB (see 4.2.4 above), you may |
|||
redistribute Z34RCP.LBR in its present form only. I encourage |
|||
you to explore the source code, suggest improvements, and |
|||
document errors. However, please obtain permission from Z |
|||
Systems Associates before redistributing any of these files in |
|||
altered form. This will prevent confusion by allowing your work |
|||
to be coordinated with the efforts of others. |
|||
|
|||
The Z Systems Associates are: |
|||
|
|||
Sage Microsystems East |
|||
Selling & Supporting the Best in 8-Bit Software |
|||
1435 Centre St., Newton Centre, MA 02159-2469 |
|||
Voice: 617/965-3552 (9:00am - 11:30pm) |
|||
Modem: 617/965-7259 (password = DDT)(MABOS on PC-Pursuit) |
|||
|
|||
and: |
|||
|
|||
Plu*Perfect Systems |
|||
"==World-Class Software" |
|||
410 23rd Street, Santa Monica, CA 90402 |
|||
Voice: 213/393-6105 (evenings) |
|||
Modem: 213/670-9465 (leave message for "Bridger Mitchell") |
|||
|
|||
For more information on Z System, check at the above bulletin |
|||
board systems, or consult The Computer Journal for excellent |
|||
articles on ZCPR and CP/M. The Computer Journal is published six |
|||
times a year by Publishing Consultants, 190 Sullivan Crossroad, |
|||
Columbia Falls, MT 59912, phone 406/257-9119. An issue averages |
|||
forty pages with few ads. Subscription rates are $16 for one |
|||
year (6 issues), or $28 for two years (12 issues) in the U.S., |
|||
$22 for one year Canada and Mexico, and $24 (surface) for one |
|||
year in other countries. |
|||
|
|||
|
|||
Carson Wilson is the operator of: |
|||
|
|||
Antelope Freeway Remote Access System |
|||
Chicago, 312-764-5162 |
|||
300-1200-2400 Baud, 24 Hours |
|||
|
|||
@ -0,0 +1,7 @@ |
|||
Z-System Resident Command Package (RCP) in source code form, version |
|||
1.1. Complete Z80 source code to the RCP plus documentation, for |
|||
ZCPR versions 3.3 and above. Adds several exciting new commands and |
|||
features and fixes various bugs in the previous release. See |
|||
companion file RCPZRL11.LBR for pre-compiled RCP modules which may |
|||
be loaded with NZ-COM, Z3PLUS, or JetLDR. |
|||
|
|||
@ -0,0 +1,390 @@ |
|||
The RCP Commands |
|||
CLED/SPOP Command Line Editor |
|||
CLS Clear the CRT screen |
|||
CP Copy a File |
|||
D Display Directory |
|||
ECHO Echo Command Tail |
|||
ERA Erase Files |
|||
H Display Available Commands |
|||
LIST/TYPE Display a File on Printer/CRT |
|||
NOTE Comment |
|||
P/POKE Display/Alter Memory |
|||
PORT Input/Output to system ports |
|||
PROT Protect Files |
|||
Q Alter or Query the Quiet Flag |
|||
R Reset Disk |
|||
REG ZCPR3 Register Display/Alter |
|||
REN Rename a File |
|||
SP Display Disk Space Remaining |
|||
WHL Alter or Query Wheel Byte � |
|||
:Thå RCÐ Commands |
|||
|
|||
|
|||
Thå standarä ZCPR³ Systeí Residenô Commanä Packagå (RCP© � |
|||
distributeä witè thå ZCPR³ systeí containó á numbeò oæ residenô � |
|||
commandó whicè maù bå enableä (dependinç oî systeí memorù anä � |
|||
securitù characteristics© aô thå discretioî oæ thå installer® � |
|||
Usagå oæ thå RCÐ commandó ió describeä iî thió HELÐ file. |
|||
|
|||
Thå RCÐ commandó residå iî memorù ratheò thaî beinç loadeä � |
|||
froí disk¬ anä thereforå operatå verù efficientlù anä arå disë � |
|||
independent® Oî thå otheò hand¬ duå tï memorù constraints¬ thå � |
|||
RCÐ commandó arå ofteî lesó powerfuì thaî theiò transienô prograí � |
|||
counterparts® |
|||
|
|||
|
|||
|
|||
Iæ aî erroò occurs¬ thå RCÐ commandó generallù chaiî tï thå � |
|||
installeä erroò handler¬ providinç á detaileä reporô oæ thå erroò � |
|||
anä allowinç thå commanä tï bå editeä oò aborted® Iæ nï erroò � |
|||
handleò ió installed¬ thå commanä whicè causeä thå erroò ió � |
|||
echoeä tï thå screen¬ followeä bù á questioî mark. |
|||
|
|||
Alì RCÐ commandó arå installatioî-dependent¬ anä manù maù bå � |
|||
configureä aô assemblù timå tï perforí iî slightlù differenô � |
|||
ways® Thå exampleó giveî iî thió HELÐ filå arå baseä oî thå � |
|||
distributeä seô oæ options® Seå sourcå codå filå Z34RCP.LIÂ foò � |
|||
morå detailó oî commanä anä optioî selection. |
|||
|
|||
:CLED anä SPOÐ Commands |
|||
Transient Counterparts: LSÈ anä SPOP |
|||
|
|||
Thå CLEÄ commanä invokeó á speciaì prograí whicè provideó � |
|||
WordStaò-likå editinç oæ commandó aô thå systeí prompt® Iô alsï � |
|||
allowó yoõ tï recalì thå lasô severaì commandó invokeä witè onlù � |
|||
onå keystroke® Finally¬ iæ available¬ CLEÄ displayó thå currenô � |
|||
systeí timå tï thå lefô oæ youò prompt® Thå syntaø is: |
|||
|
|||
CLED - invoke as shell |
|||
CLED / - invoke for next command only |
|||
|
|||
|
|||
|
|||
Thå SPOÐ commanä "pops¢ thå toð shelì froí thå shelì stack¬ � |
|||
sï thaô iô nï longeò loadó afteò everù command® Thió commanä ió � |
|||
rarelù needed¬ anä ió includeä onlù witè versionó oæ thå RCÐ � |
|||
includinç CLEÄ (seå above)® Thå syntaø ió simply: |
|||
|
|||
SPOP |
|||
:CLS Command |
|||
Transient Counterpart: None |
|||
|
|||
Thå CLÓ commanä clearó thå terminaì screen¬ removinç � |
|||
displayó whicè mighô havå beeî lefô bù previouó commandó oò � |
|||
programs® Thå syntaø is: |
|||
|
|||
CLS |
|||
|
|||
:CP Command |
|||
Transient Counterpart: MCOPY |
|||
|
|||
Thå CÐ commanä copieó onå filå froí onå DÕ tï anotheò oò � |
|||
intï thå samå DÕ undeò á differenô name® Iæ functionó 10² (geô � |
|||
stamp© anä 10³ (seô stamp© arå supporteä bù aî RSØ oò DOS¬ filå � |
|||
datestampó arå preserveä acrosó copies® Thå syntaø is: |
|||
|
|||
CP dir:ufn1 dir:ufn2 -- ufn1 to ufn2 |
|||
CP dir:ufn1 -- ufn1 to current dir: |
|||
CP dir:ufn2=dir:ufn1 -- ufn1 to ufn2 |
|||
|
|||
Examples: |
|||
|
|||
CP f1.txt f2.txt |
|||
CP b0:f1.txt a15: |
|||
CP root:f1.txt |
|||
|
|||
:D Command |
|||
Transient Counterpart: DIR, XD, XDIR |
|||
|
|||
Thå Ä commanä displayó thå directorù oæ fileó iî � |
|||
alphabeticaì ordeò acrosó thå lineó tï thå user® Thå syntaø is: |
|||
|
|||
D dir:afn.aft o |
|||
D .aft o |
|||
D /o |
|||
|
|||
Options (wheel only) are: |
|||
|
|||
S - Display System Files Only |
|||
A - Display Both Non-System and System Files |
|||
|
|||
Examples: |
|||
|
|||
D /a |
|||
D root:myfile.txt
Š D .com |
|||
|
|||
:ECHO Command |
|||
Transient Counterpart: ECHO |
|||
|
|||
ECHÏ ió usefuì iî issuinç botè messageó (tï thå user¬ � |
|||
saù withiî á commanä filå durinç execution© anä escapå sequences® � |
|||
Bù uså oæ thå %¾ anä %¼ parameters¬ ECHÏ caî senä itó outpuô iî � |
|||
combinationó oæ uppeò anä loweò case® Bù uså oæ thå %Ð anä %Ã � |
|||
parameters¬ ECHÏ outpuô caî bå toggleä betweeî screeî anä � |
|||
printer® ECHÏ useó BIOÓ calls¬ sï alì controì characteró � |
|||
(entereä aó ^character© arå passeä exactly® Hence¬ consolå-leveì � |
|||
programminç oæ sucè deviceó (CRTó anä printers© ió possible. |
|||
|
|||
Examples: |
|||
ECHO %Pthis is a test%Cof echo%P |
|||
-- "THIS IS A TEST" goes to the printer |
|||
"OF ECHO" goes to the console |
|||
(trailing %P flushes printer buffer) |
|||
|
|||
ECHO t%>his is a %<test^j |
|||
-- "This is a TEST", followed by Control-J, |
|||
goes to the console� |
|||
:ERA Command |
|||
Transient Counterpart: ERASE |
|||
|
|||
Thå ERÁ commanä eraseó files® Iæ anù characteò ió entereä � |
|||
afteò thå filespec¬ thå useò ió prompteä beforå eacè erasure® � |
|||
Thå syntaø is: |
|||
|
|||
ERA dir:afn |
|||
or: |
|||
ERA dir:afn o -- Inspect files first |
|||
|
|||
Examples: |
|||
|
|||
ERA b7:*.bak |
|||
ERA text:*.tmp i |
|||
|
|||
:H Command |
|||
Transient Counterpart: SHOW |
|||
|
|||
Thå È (help© commanä displayó tï thå consolå alì oæ thå � |
|||
builô-iî commandó currentlù availablå oî thå system¬ includinç � |
|||
RCP¬ FCP¬ anä CCÐ commands® Iæ á commanä ió wheeì-protected¬ iô � |
|||
ió noô displayeä whilå thå wheeì bytå ió off. |
|||
|
|||
The syntax is simply: |
|||
|
|||
H |
|||
|
|||
:LIST and TYPE Commands |
|||
Transient Counterparts: PRINT and PAGE |
|||
|
|||
Thå TYPÅ commanä displayó á grouð oæ fileó oî thå CRÔ whilå �Šthå LISÔ commanä printó á grouð oæ fileó oî thå printer® Whilå � |
|||
thå fileó arå beinç displayeä oò printed¬ controì-Ø entereä aô � |
|||
thå consolå skipó tï thå nexô filå anä controì-Ã cancels® Whilå � |
|||
TYPEinç á filå oò files¬ paginç maù bå switcheä ofæ witè controì � |
|||
Z® Iæ LISÔ ió giveî withouô parameters¬ á forí feeä ió senô tï � |
|||
thå printer® Thå syntaø is: |
|||
|
|||
TYPE dir:afn o -or- LIST dir:afn -or- LIST |
|||
|
|||
Option to TYPE: |
|||
|
|||
P - Do NOT Page Output to CRT |
|||
|
|||
Examples: |
|||
|
|||
TYPE b7:*.asm p |
|||
LIST text:*.txt� |
|||
:NOTE Command |
|||
Transient Counterpart: NOTE |
|||
|
|||
NOTÅ ió simplù á "dï nothing¢ commanä whicè caî bå useä tï � |
|||
placå commentó intï multiplå commanä lines® Foò instance¬ iî thå � |
|||
followinç line: |
|||
|
|||
d *.com;note this is a dir display;era *.bak |
|||
|
|||
thå Ä anä ERÁ commandó perforí normally¬ anä thå NOTÅ commanä � |
|||
simplù doeó nothinç verù efficiently. |
|||
|
|||
:P and POKE Commands |
|||
Transient Counterparts: None (Subset of DDT) |
|||
|
|||
Thå Ð commanä allowó thå useò tï examinå á chunë oæ memory® � |
|||
Iæ thå useò simplù typeó "P¢ witè nï address¬ thå nexô 12¸ byteó � |
|||
oæ memorù arå displayed® Iæ thå useò typeó "Ð address"¬ 12¸ � |
|||
byteó oæ memorù startinç aô thå indicateä addresó arå displayed® � |
|||
Iæ thå useò typeó "Ð address± address2"¬ memorù iî thió addresó � |
|||
rangå ió displayed® Thå syntax: |
|||
|
|||
P |
|||
or: |
|||
P address |
|||
or: |
|||
P address1 address2� |
|||
|
|||
|
|||
|
|||
Thå POKÅ commanä allowó thå useò tï changå thå contenô oæ � |
|||
memory® Thå useò musô specifù aî addresó tï POKE¬ anä twï basiã � |
|||
formó arå allowed: |
|||
|
|||
POKE address val1 val2 ... valn |
|||
and: |
|||
POKE address "character string |
|||
|
|||
Thå twï formó maù bå intermixeä witè leadinç valueó anä á � |
|||
trailinç characteò string: |
|||
|
|||
POKE address val1 val2 ... valn "character string� |
|||
|
|||
|
|||
|
|||
Examples: |
|||
P |
|||
P f400 |
|||
P f400 f425 |
|||
POKE f400 0 1 2 |
|||
POKE f400 "this is a test |
|||
POKE f400 1 2 3 "hello, world |
|||
|
|||
:PORT Command |
|||
Transient Counterpart: None |
|||
|
|||
Thå PORÔ commanä allowó thå useò tï inpuô anä outpuô valueó � |
|||
tï thå computer'ó input/outpuô ports® Thå syntaø is: |
|||
|
|||
PORT addr -- Read and display value |
|||
PORT addr value -- Send value to port |
|||
|
|||
Examples: |
|||
|
|||
PORT fc |
|||
PORT fd 21 |
|||
|
|||
:PROT Command |
|||
Transient Counterpart: PROTECÔ |
|||
|
|||
Thå PROÔ commanä setó thå filå protectioî attributeó foò á � |
|||
grouð oæ files® Thå R/O¬ System¬ anä Archivå attributeó maù bå � |
|||
seô witè thå R¬ S¬ anä Á options¬ respectively¬ giveî iî anù � |
|||
ordeò aó "RSA¢ oò "ASR"® Omissioî oæ onå oæ theså optionó � |
|||
toggleó thå oppositå (ie¬ omissioî oæ Ò makeó thå fileó R/W)® � |
|||
Thå É optioî allowó onå tï inspecô eacè filenamå beforå settinç � |
|||
itó filå attributes® Thå syntax: |
|||
|
|||
PROT dir:afn - set to read write, directory, modified |
|||
PROT dir:afn R - set to read only, directory, modified |
|||
PROT dir:afn RA - set to read only, directory, archived |
|||
PROT dir:afn RASI - set to read only, system, archived, |
|||
with inspection |
|||
Examples: |
|||
PROT b7:*.com rai |
|||
PROT this.doc� |
|||
:Q Command |
|||
Transient Counterpart: QUIET |
|||
|
|||
Thå Ñ commanä turnó thå ZCPÒ quieô flaç oî oò off® Thå � |
|||
quieô flaç ió useä bù somå programó anä partó oæ thå operatinç � |
|||
systeí tï determinå ho÷ mucè informatioî theù shoulä displaù tï � |
|||
thå screen® Aó á rule¬ wheî thå quieô flaç ió on¬ programó � |
|||
displaù onlù erroò messageó tï thå screen® Thå syntaø is: |
|||
|
|||
"Q" or "Q Dis" -- display quiet flag |
|||
"Q S" or "Q Set" -- turn quiet flag ON
Š "Q R" or "Q Reset" -- turn quiet flag OFF |
|||
|
|||
:R Command |
|||
Transient Counterpart: None |
|||
|
|||
Thå Ò (reset© commanä resetó á floppù disë anä displayó thå � |
|||
amounô oæ spacå remaining® ZSDOÓ doeó noô requirå diskó tï bå � |
|||
reseô witè controì-C¬ buô programó wilì reporô disë spacå � |
|||
properlù untiì á disë ió reset¬ anä iô ió á gooä practice® Ò � |
|||
alsï forceó á reseô oæ alì diskó usinç thå "fasô fixeä disë � |
|||
relog¢ featurå oæ ZSDOS. |
|||
|
|||
Examples: |
|||
|
|||
R -- Reset current disk |
|||
R b: -- Reset disk B |
|||
|
|||
|
|||
:REG Command |
|||
Transient Counterpart: REG |
|||
|
|||
Á registeò ió á ZCPR³ buffer¬ indicateä bù á digiô froí ° tï � |
|||
31¬ oò thå letteò Å foò prograí Erroò byte® Thå registeró arå � |
|||
useä tï pasó informatioî betweeî programó oò portionó oæ thå � |
|||
operatinç system. |
|||
|
|||
The REG command forms are: |
|||
REG D or REG = display values of first 10 registers |
|||
REG Mreg = subtract 1 from a register (Minus) |
|||
REG Preg = add 1 to a register (Plus) |
|||
REG Sreg value = set value of indicated register |
|||
REG reg = display a single register value� |
|||
|
|||
|
|||
|
|||
Examples: |
|||
REG S0 4 -- reg 0 = 4 |
|||
REG S12 -- reg 12 = 0 |
|||
REG P -- reg 0 = reg 0 + 1 |
|||
REG P5 -- reg 5 = reg 5 + 1 |
|||
REG M9 -- reg 9 = reg 9 - 1 |
|||
REG -- show first ten values |
|||
REG SE 0 -- zero program error byte |
|||
|
|||
:REN Command |
|||
Transient Counterpart: RENAME |
|||
|
|||
Thå REÎ commanä changeó thå namå oæ onå filå tï another® � |
|||
Thå filå nameä oî thå lefô wilì bå renameä witè thå namå tï thå � |
|||
right® Iæ aî equaì sigî ("="© ió used¬ thå oldeò CP/Í syntaø ió � |
|||
used¬ anä thå filå nameä oî thå righô ió renameä tï thå namå oî � |
|||
thå left® Iæ anotheò filå alreadù haó thió name¬ thå useò ió � |
|||
askeä whetheò oò noô tï eraså thå olä file® Thå syntaø is: |
|||
|
|||
REN dir:ufn1 ufn2 |
|||
REN ufn1 dir:ufn2 |
|||
REN ufn2=ufn1 |
|||
|
|||
Examples: |
|||
|
|||
REN oldfile.txt newfile.txt |
|||
REN root:sys.rcp sys1.rcp |
|||
REN oldname work:newname |
|||
REN work:newname=oldname� |
|||
:SP Command |
|||
Transient Counterpart: None (Subset of STAT) |
|||
|
|||
Thå Ó commanä displayó spacå remaininç oî thå currenô oò � |
|||
specifieä disk. |
|||
|
|||
Examples: |
|||
|
|||
SP -- Display space on current disk |
|||
SP a: -- Display space on disk A |
|||
:WHL Command |
|||
Transient Counterpart: WHEEL |
|||
|
|||
Thå WHÌ commanä ió useä tï turî ofæ thå Wheeì Bytå (makå � |
|||
thå useò noî-privileged)¬ tï turî oî thå Wheeì Bytå (makå thå � |
|||
useò privileged)¬ oò tï displaù thå Wheeì state® Thå syntaø is: |
|||
|
|||
WHL password - Turn wheel ON if password correct, |
|||
turn wheel OFF if not. |
|||
|
|||
WHL - Display wheel state |
|||
|
|||
Examples:
Š |
|||
WHL |
|||
WHL mypass� |
|||
|
|||
|
|||
|
|||
Bù default¬ thå followinç RCÐ commandó arå noô availablå � |
|||
whilå thå wheeì bytå ió off: |
|||
|
|||
CP Copy a File |
|||
ERA Erase Files |
|||
LIST/TYPE Display a File on Printer/CRT |
|||
P/POKE Display/Alter Memory |
|||
PORT Input/Output to system ports |
|||
PROT Protect Files |
|||
SPOP Pop Shell Stack |
|||
REG ZCPR3 Register Display/Alter |
|||
REN Rename a File |
|||
|
|||
Thå commandó dï noô appeaò iî thå È (help© display¬ anä � |
|||
attemptó tï uså theí invokå thå erroò handleò (iæ present© oò � |
|||
echï thå baä commanä bacë tï thå screeî followeä bù á questioî � |
|||
mark® |
|||
|
|||
@ -0,0 +1,136 @@ |
|||
|
|||
Enhancements to the ZCPR 3.4 Resident Command Package |
|||
October 8, 1989 by Carson Wilson |
|||
|
|||
The following is a description of the functional enhancements I have made |
|||
since Z34RCP10.LBR. Most of the changes are relatively minor, but several |
|||
exciting new capabilities have been added, and a few important bugs have been |
|||
fixed. |
|||
|
|||
New CLED (Command Line EDitor) Command: |
|||
-------------------------------------- |
|||
Rob Friefeld, author of LSH and many other excellent Z System tools, has |
|||
outdone himself with a new RCP command line editor. CLED is different from |
|||
other RCP commands, in that it is the first RCP command which also works as a |
|||
shell. By combining the memory-resident characteristics of the RCP with the |
|||
shell concept, Rob has created a command which significantly transforms the Z |
|||
System environment. CLED greatly expands the user's ability to edit and |
|||
correct command lines with such features as insert and move and delete word |
|||
left and right, but that isn't all--it also stores a queue of previous |
|||
commands (up to 203 bytes total) which can then be recalled (and edited). And |
|||
since CLED is memory-resident, there are NO time disk access penalties |
|||
involved! Please see RCPCLED.DOC for details on this exciting enhancement. |
|||
|
|||
Enhancements Pertaining to Several Commands: |
|||
------------------------------------------- |
|||
1. Dynamic Quiet Flag Sensing. |
|||
|
|||
I have added dynamic QUIET flag sensing to the CP, DIR, ERA, POKE, PORT, PROT, |
|||
REG, and Reset commands. These commands should now only display error |
|||
messages if QUIET is active. Otherwise they should just go about their |
|||
business with as little screen activity as possible. The only change to DIR |
|||
is that it doesn't show SPace remaining if QUIET is on (this is actually just |
|||
a side effect from ERA and CP). Note the anomaly that if QUIET is on, Reset |
|||
now operates somewhat differently on non-default drives: since SPace is no |
|||
longer called, the drive doesn't actually log back (no physical activity) |
|||
until accessed by another command. Also note that using the "Inspect" option |
|||
of ERA will produce odd results if Quiet is on: you will be prompted for each |
|||
file, but no filenames will be displayed. I don't really know an ideal |
|||
solution for this, but in general I think someone who gives their computer |
|||
contradictory instructions should expect contradictory results! |
|||
|
|||
Some confusion has arisen as to the purpose of the Quiet flag. It is not, nor |
|||
was it ever intended to be, a security feature. As Richard Conn, original |
|||
author of ZCPR states on page 77 of _ZCPR3: The Manual_, if the Quiet flag is |
|||
on, certain informative messages are suppressed "in order to cut down on the |
|||
'noise' created by the command." I feel that it is far better in a security |
|||
sensitive situation to simply turn off the remote terminal using the remote |
|||
terminal software than to rely on the QUIET flag. BYE supports two system |
|||
calls which can turn off the remote console altogether (both input AND |
|||
output), and I think this a better solution where sensitive commands are |
|||
concerned than use of QUIET. For one thing, QUIET wasn't designed to disable |
|||
interruption by the remote terminal of commands such as ERA or PROT. |
|||
Additionally, control of console I/O through BYE allows ANY CP/M program to be |
|||
used "quietly." Finally, Z System programs vary somewhat in their treatment |
|||
of QUIET. |
|||
|
|||
For these reasons I now consider QUIET purely a display control flag, rather |
|||
than a security device. For similar reasons, I have changed the default of |
|||
WHLQUIET to FALSE, causing WHL to display the new setting. I realize this is |
|||
a departure from recent practice, but I think the advantages in terms of |
|||
clarity, uniformity, and safety outweigh any disadvantages that may result. |
|||
|
|||
2. Intelligent Error Handling |
|||
|
|||
The CP, ERA, and REN commands now allow an intelligent error handler to act |
|||
differently when certain errors occur. The main idea is to allow larger, more |
|||
powerful transient equivalents of the resident commands to take over when more |
|||
features are required (much the same as CP/M Plus), but the interface also |
|||
allows other actions to be taken if desired. If the CP or REN commands detect |
|||
an ambiguous file specification, or if the ERA command detects a read-only |
|||
file, bit 4 of ZCPR's command status flag (CST) is set before chaining to the |
|||
error handler (if installed). Newer error handlers will bypass normal error |
|||
handling when this bit is set, instead prepending a user-installable string to |
|||
the original command and re-executing the new command. Typically, the new |
|||
string will be a single colon, or a drive, user, or directory name. |
|||
|
|||
For example, in order to save memory, the RCP CP command will not copy |
|||
multiple files, and the command |
|||
|
|||
CP *.* B: |
|||
|
|||
normally results in an error. However, if the error handler is configured to |
|||
recognize CST bit 4, it prepends a ":" to the original command, resulting in |
|||
|
|||
:CP *.* B: |
|||
|
|||
Because a leading colon (or directory specification) causes ZCPR to skip |
|||
resident command processing, a search is now made for a command file named |
|||
"CP". By storing a more powerful copy program under this name at the current |
|||
directory (or along the path if available), you can use this feature to invoke |
|||
the transient program only when needed, using the faster resident command for |
|||
single files. |
|||
|
|||
A similar approach can be used with the ERA and REN commands. |
|||
|
|||
Since any string of up to 9 characters can be installed to prepend the errant |
|||
commands, you can also gain even greater control by prepending the command |
|||
with "/" (or "ARUNZ ") to invoke ARUNZ with an arbitrary command (or no |
|||
command at all) for each CP, ERA, and/or REN. See ZERRxx.LBR for details on |
|||
how to install the error handler. |
|||
|
|||
|
|||
Enhancements Pertaining to Specific Commands: |
|||
-------------------------------------------- |
|||
(Selectable = may be deselected at assembly time) |
|||
|
|||
Cmnd Selectable Enhancement(s): |
|||
---- ---------- -------------------------------------------------------------- |
|||
CLED - New command. |
|||
|
|||
CP - Now works properly with Z3PLUS. |
|||
- Now properly sets destination datestamps of multiple-extent |
|||
files. |
|||
|
|||
D - Now allows the syntax "DIR [dir:].aft" to display all files |
|||
matching a filetype (e.g., "D .COM now the same as "D *.COM"). |
|||
|
|||
H - RCP name now appended with 'C' if CLED is included. |
|||
|
|||
Q - Now "Q R[eset]" and "Q S[et]" just reset and set quiet |
|||
status without showing it, and Q alone (or with any other |
|||
character, e.g., "Q ?") always just shows status. |
|||
* - No longer wheel protected. |
|||
|
|||
R - Revised to work properly with ZRDOS. |
|||
- Now properly resets individual drives under Z3PLUS. |
|||
|
|||
SP * - Command name changed from 'S'. |
|||
|
|||
SPOP - New command. |
|||
|
|||
TYPE - Control characters other than ^I, ^M, and ^J are filtered out, |
|||
allowing legible display of WordStar files. |
|||
|
|||
WHL * - Now always reports Wheel status. |
|||
|
|||
@ -0,0 +1,268 @@ |
|||
|
|||
; Program: Z34RCP |
|||
; Description: Resident Command Package (RCP) for ZCPR34 |
|||
; Version: 1.3 |
|||
; Author: Carson Wilson |
|||
; Date: September 13, 1989 |
|||
; Changes: Added CLED (command line editor shell) command. |
|||
; To save space, JetLDR ID section no longer pads end of each |
|||
; line. (JetLDR allows only 256 bytes maximum in its |
|||
; description field). |
|||
|
|||
; Version: 1.2 |
|||
; Author: Carson Wilson |
|||
; Date: July 9, 1989 |
|||
; Changes: Uses spaces instead of tabs in JetLDR displays. |
|||
; Copyright now ZSA. |
|||
|
|||
; Version: 1.1 |
|||
; Author: Carson Wilson |
|||
; Date: September 14, 1988 |
|||
; Changes: RCPID macro called from RCPID.LIB so that the final INCLUDE |
|||
; macro call gives total size of the RCP, including the ID |
|||
; string, with SLR assemblers. |
|||
; Label WHLQ changed to WHLQUIET in Option macro to match |
|||
; Z34HDR.LIB equate. |
|||
|
|||
; Version: 1.0 |
|||
; Author: Carson Wilson |
|||
; Date: June 15, 1988 |
|||
|
|||
; Derivation: SYSRCP (Richard Conn) |
|||
|
|||
; Z34RCP is copyright 1989 by Z Systems Associates. All rights reserved. |
|||
; End-user distribution and duplication permitted for non-commercial purposes |
|||
; only. Any commercial use of Z34RCP, defined as any situation where the |
|||
; duplicator recieves revenue by duplicating or distributing Z34RCP by itself |
|||
; or in conjunction with any hardware or software product, is expressly |
|||
; prohibited unless authorized in writing by Z Systems Associates. |
|||
|
|||
;============================================================================= |
|||
; |
|||
; D E F I N I T I O N S S E C T I O N |
|||
; |
|||
;============================================================================= |
|||
|
|||
maclib sysdef.lib ; Common logic, sys, ascii defines |
|||
maclib z34defn.lib ; Defines offsets in Z34 command processor |
|||
maclib z34mac.lib ; Macros |
|||
maclib z34rcp.lib ; Defines command options |
|||
|
|||
if ZRL |
|||
maclib z34cmn.lib ; Defines universal ZCPR named common blocks |
|||
else |
|||
maclib rcpbase.lib ; Defines addresses for one system |
|||
endif |
|||
|
|||
name RCP11 ; Declare module name |
|||
|
|||
; ============================================================================ |
|||
|
|||
; M A C R O S S E C T I O N |
|||
|
|||
; ============================================================================ |
|||
|
|||
; Macros to include module file and print module length. |
|||
; Under SLR and compatible assemblers, a running account of current RCP |
|||
; size and bytes added will be given for each module. |
|||
; |
|||
; For other assemblers you may have to either modify the non-SLR include |
|||
; macro or use a text editor to read in the actual contents of each file |
|||
; in place of the include statement. |
|||
|
|||
if SLR |
|||
; |
|||
; General purpose macro to display decimal values and messages |
|||
; |
|||
prtdec macro m1,m2,m3,m4,m5 |
|||
.radix 10 ; Decimal output |
|||
.printx m1 m2 m3 m4 m5 ; Print to screen |
|||
endm |
|||
; |
|||
; Macro to include modules and display lengths. |
|||
; |
|||
include macro filename |
|||
before defl $ |
|||
$include filename&.lib |
|||
after defl $ |
|||
modlen defl after - before ; Module length |
|||
rcplen defl after - RCPbegin ; RCP length |
|||
recs defl rcplen / 128 ; ..in records |
|||
bytes defl rcplen mod 128 ; ..and additional bytes |
|||
prtdec %modlen,<bytes added by filename&> |
|||
prtdec <Current length is>,%recs,<records>,%bytes,<bytes.> |
|||
prtdec ; Trailing CRLF |
|||
endm |
|||
|
|||
else ; Non-SLR assemblers |
|||
include macro filename |
|||
$include filename&.lib |
|||
endm |
|||
endif ; SLR |
|||
|
|||
|
|||
if ZRL |
|||
|
|||
; ============================================================================= |
|||
|
|||
; J e t L D R I D S E C T I O N |
|||
|
|||
; ============================================================================= |
|||
|
|||
; Macro to build ID block message for JetLDR. Max. length is ~256 chars. |
|||
|
|||
optcnt defl 0 ; Options counter |
|||
|
|||
option macro string1,enable1,string2,enable2 |
|||
|
|||
if enable1 ;; Skip if command not present |
|||
if [optcnt mod 4] eq 0 |
|||
db cr,lf ;; New line every four options |
|||
endif |
|||
optcnt defl optcnt + 1 ;; Increment options counter |
|||
count defl 0 ;; Initialize character count |
|||
|
|||
irpc char,string1 ;; Count and define characters |
|||
count defl count + 1 |
|||
db '&char' |
|||
endm ; irpc |
|||
|
|||
if not nul enable2 ;; Sub-option label present |
|||
if enable2 ;; Sub-option enabled |
|||
db ' (' ;; Begin sub-opt description |
|||
irpc char,string2 ;; Count and define characters |
|||
count defl count + 1 |
|||
db '&char' |
|||
endm ; irpc |
|||
db ')' ;; End sub-opt description |
|||
count defl count + 3 ;; For ' ()' |
|||
endif ; enable2 |
|||
endif ; not nul enable2 |
|||
|
|||
if [optcnt mod 4] ne 0 |
|||
count defl 11 - count |
|||
rept count |
|||
db ' ' ;; Pad to 11 spaces |
|||
endm ; rept |
|||
endif ; [optcnt mod 4] ne 0 |
|||
|
|||
endif ; enable1 |
|||
endm ; option macro |
|||
|
|||
; --------------------------------------------------------- |
|||
|
|||
COM /_ID_/ ; JetLDR ID block |
|||
db 'Copr. 1989 ZSA. Enabled Commands:' |
|||
option Cled,cledon |
|||
option Cls,clson,TC,clstcap |
|||
option Cp,cpon,stp,stpcall |
|||
option Dir,diron,sp,<spaceon and dirsp> |
|||
option Echo,echoon,lst,echolst |
|||
option Era,eraon,sp,<spaceon and erasp> |
|||
option Help,true |
|||
option List,liston |
|||
option Note,noteon |
|||
option Peek,peekon,hdr,peekhdr |
|||
; option Poke,pokeon,q,pokeq |
|||
option Poke,pokeon |
|||
option Port,porton |
|||
option Protect,proton |
|||
option Quiet,quieton |
|||
option Register,regon |
|||
option Rename,renon |
|||
option Reset,reson,sp,<spaceon and resetsp> |
|||
option Space,spaceon |
|||
option Spop,cledon |
|||
option Type,lton,cls,<clson and typecls> |
|||
option Wheel,whlon,q,whlquiet |
|||
db 0 ; ID string terminator |
|||
|
|||
;============================================================================= |
|||
; |
|||
; E N T R Y C O D E S E C T I O N |
|||
; |
|||
;============================================================================= |
|||
|
|||
cseg |
|||
else |
|||
org z3rcp |
|||
endif ; ZRL |
|||
|
|||
RCPbegin: |
|||
db 'Z3RCP' ; Package ID |
|||
|
|||
include RCPcmd ; Command table and custom commands |
|||
|
|||
include RCPsubs ; File of subroutines |
|||
|
|||
include RCPh ; 'H' help (command list) command |
|||
|
|||
; Include only selected code sections. |
|||
|
|||
if cledon ; 'CLED' and 'SPOP' commands |
|||
include RCPcled |
|||
endif ;cledon |
|||
|
|||
if clson |
|||
include RCPcls ; 'CLS' clear screen command |
|||
endif ;clson |
|||
|
|||
if reson |
|||
include RCPr ; 'R' disk reset command |
|||
endif ;reson |
|||
|
|||
if spaceon |
|||
include RCPsp ; 'SP' space on disk command |
|||
endif ;spaceon |
|||
|
|||
if diron |
|||
include RCPdir ; 'DIR' directory command |
|||
endif ;diron |
|||
|
|||
if eraon |
|||
include RCPera ; 'ERA' erase command |
|||
endif ;eraon |
|||
|
|||
if renon |
|||
include RCPren ; 'REN' rename command |
|||
endif ;renon |
|||
|
|||
if cpon |
|||
include RCPcp ; 'CP' file copying command |
|||
endif ;cpon |
|||
|
|||
if echoon |
|||
include RCPecho ; 'ECHO' command |
|||
endif ;echoon |
|||
|
|||
if quieton |
|||
include RCPquiet ; 'Q' quiet flag |
|||
endif ;quieton |
|||
|
|||
if lton |
|||
include RCPlt ; 'LIST' and 'TYPE' commands |
|||
endif ;lton |
|||
|
|||
if proton |
|||
include RCPprot ; 'PROT' file attribute setting command |
|||
endif ;proton |
|||
|
|||
if peekon or pokeon or porton |
|||
include RCPiom ; 'PEEK', 'POKE', 'PORT' commands |
|||
endif ;peekon or pokeon or porton |
|||
|
|||
if regon |
|||
include RCPreg ; 'REG' register operation commands |
|||
endif ;regon |
|||
|
|||
if whlon |
|||
include RCPwhl ; 'WHL' command |
|||
endif ;whlon |
|||
|
|||
include RCPid ; Add ID string (must come last) |
|||
|
|||
RCPend: ; Used to calculate length |
|||
end |
|||
|
|||
; End of Z34RCP.Z80 |
|||
|
|||
@ -0,0 +1,267 @@ |
|||
|
|||
; Program: Z34RCP |
|||
; Description: Resident Command Package (RCP) for ZCPR34 |
|||
; Version: 1.3 |
|||
; Author: Carson Wilson |
|||
; Date: September 13, 1989 |
|||
; Changes: Added CLED (command line editor shell) command. |
|||
; To save space, JetLDR ID section no longer pads end of each |
|||
; line. (JetLDR allows only 256 bytes maximum in its |
|||
; description field). |
|||
|
|||
; Version: 1.2 |
|||
; Author: Carson Wilson |
|||
; Date: July 9, 1989 |
|||
; Changes: Uses spaces instead of tabs in JetLDR displays. |
|||
; Copyright now ZSA. |
|||
|
|||
; Version: 1.1 |
|||
; Author: Carson Wilson |
|||
; Date: September 14, 1988 |
|||
; Changes: RCPID macro called from RCPID.LIB so that the final INCLUDE |
|||
; macro call gives total size of the RCP, including the ID |
|||
; string, with SLR assemblers. |
|||
; Label WHLQ changed to WHLQUIET in Option macro to match |
|||
; Z34HDR.LIB equate. |
|||
|
|||
; Version: 1.0 |
|||
; Author: Carson Wilson |
|||
; Date: June 15, 1988 |
|||
|
|||
; Derivation: SYSRCP (Richard Conn) |
|||
|
|||
; Z34RCP is copyright 1989 by Z Systems Associates. All rights reserved. |
|||
; End-user distribution and duplication permitted for non-commercial purposes |
|||
; only. Any commercial use of Z34RCP, defined as any situation where the |
|||
; duplicator recieves revenue by duplicating or distributing Z34RCP by itself |
|||
; or in conjunction with any hardware or software product, is expressly |
|||
; prohibited unless authorized in writing by Z Systems Associates. |
|||
|
|||
;============================================================================= |
|||
; |
|||
; D E F I N I T I O N S S E C T I O N |
|||
; |
|||
;============================================================================= |
|||
|
|||
maclib sysdef.lib ; Common logic, sys, ascii defines |
|||
maclib z34defn.lib ; Defines offsets in Z34 command processor |
|||
maclib z34mac.lib ; Macros |
|||
maclib z34rcp.lib ; Defines command options |
|||
|
|||
if ZRL |
|||
maclib z34cmn.lib ; Defines universal ZCPR named common blocks |
|||
else |
|||
maclib rcpbase.lib ; Defines addresses for one system |
|||
endif |
|||
|
|||
name RCP11 ; Declare module name |
|||
|
|||
; ============================================================================ |
|||
|
|||
; M A C R O S S E C T I O N |
|||
|
|||
; ============================================================================ |
|||
|
|||
; Macros to include module file and print module length. |
|||
; Under SLR and compatible assemblers, a running account of current RCP |
|||
; size and bytes added will be given for each module. |
|||
; |
|||
; For other assemblers you may have to either modify the non-SLR include |
|||
; macro or use a text editor to read in the actual contents of each file |
|||
; in place of the include statement. |
|||
|
|||
if SLR |
|||
; |
|||
; General purpose macro to display decimal values and messages |
|||
; |
|||
prtdec macro m1,m2,m3,m4,m5 |
|||
.radix 10 ; Decimal output |
|||
.printx m1 m2 m3 m4 m5 ; Print to screen |
|||
endm |
|||
; |
|||
; Macro to include modules and display lengths. |
|||
; |
|||
include macro filename |
|||
before defl $ |
|||
$include filename&.lib |
|||
after defl $ |
|||
modlen defl after - before ; Module length |
|||
rcplen defl after - RCPbegin ; RCP length |
|||
recs defl rcplen / 128 ; ..in records |
|||
bytes defl rcplen mod 128 ; ..and additional bytes |
|||
prtdec %modlen,<bytes added by filename&> |
|||
prtdec <Current length is>,%recs,<records>,%bytes,<bytes.> |
|||
prtdec ; Trailing CRLF |
|||
endm |
|||
|
|||
else ; Non-SLR assemblers |
|||
include macro filename |
|||
$include filename&.lib |
|||
endm |
|||
endif ; SLR |
|||
|
|||
|
|||
if ZRL |
|||
|
|||
; ============================================================================= |
|||
|
|||
; J e t L D R I D S E C T I O N |
|||
|
|||
; ============================================================================= |
|||
|
|||
; Macro to build ID block message for JetLDR. Max. length is ~256 chars. |
|||
|
|||
optcnt defl 0 ; Options counter |
|||
|
|||
option macro string1,enable1,string2,enable2 |
|||
|
|||
if enable1 ;; Skip if command not present |
|||
if [optcnt mod 4] eq 0 |
|||
db cr,lf ;; New line every four options |
|||
endif |
|||
optcnt defl optcnt + 1 ;; Increment options counter |
|||
count defl 0 ;; Initialize character count |
|||
|
|||
irpc char,string1 ;; Count and define characters |
|||
count defl count + 1 |
|||
db '&char' |
|||
endm ; irpc |
|||
|
|||
if not nul enable2 ;; Sub-option label present |
|||
if enable2 ;; Sub-option enabled |
|||
db ' (' ;; Begin sub-opt description |
|||
irpc char,string2 ;; Count and define characters |
|||
count defl count + 1 |
|||
db '&char' |
|||
endm ; irpc |
|||
db ')' ;; End sub-opt description |
|||
count defl count + 3 ;; For ' ()' |
|||
endif ; enable2 |
|||
endif ; not nul enable2 |
|||
|
|||
if [optcnt mod 4] ne 0 |
|||
count defl 11 - count |
|||
rept count |
|||
db ' ' ;; Pad to 11 spaces |
|||
endm ; rept |
|||
endif ; [optcnt mod 4] ne 0 |
|||
|
|||
endif ; enable1 |
|||
endm ; option macro |
|||
|
|||
; --------------------------------------------------------- |
|||
|
|||
COM /_ID_/ ; JetLDR ID block |
|||
db 'Copr. 1989 ZSA. Enabled Commands:' |
|||
option Cled,cledon |
|||
option Cls,clson,TC,clstcap |
|||
option Cp,cpon,stp,stpcall |
|||
option Dir,diron,sp,<spaceon and dirsp> |
|||
option Echo,echoon,lst,echolst |
|||
option Era,eraon,sp,<spaceon and erasp> |
|||
option Help,true |
|||
option List,liston |
|||
option Note,noteon |
|||
option Peek,peekon,hdr,peekhdr |
|||
option Poke,pokeon,q,pokeq |
|||
option Port,porton |
|||
option Protect,proton |
|||
option Quiet,quieton |
|||
option Register,regon |
|||
option Rename,renon |
|||
option Reset,reson,sp,<spaceon and resetsp> |
|||
option Space,spaceon |
|||
option Spop,cledon |
|||
option Type,lton,cls,<clson and typecls> |
|||
option Wheel,whlon,q,whlquiet |
|||
db 0 ; ID string terminator |
|||
|
|||
;============================================================================= |
|||
; |
|||
; E N T R Y C O D E S E C T I O N |
|||
; |
|||
;============================================================================= |
|||
|
|||
cseg |
|||
else |
|||
org z3rcp |
|||
endif ; ZRL |
|||
|
|||
RCPbegin: |
|||
db 'Z3RCP' ; Package ID |
|||
|
|||
include RCPcmd ; Command table and custom commands |
|||
|
|||
include RCPsubs ; File of subroutines |
|||
|
|||
include RCPh ; 'H' help (command list) command |
|||
|
|||
; Include only selected code sections. |
|||
|
|||
if cledon ; 'CLED' and 'SPOP' commands |
|||
include RCPcled |
|||
endif ;cledon |
|||
|
|||
if clson |
|||
include RCPcls ; 'CLS' clear screen command |
|||
endif ;clson |
|||
|
|||
if reson |
|||
include RCPr ; 'R' disk reset command |
|||
endif ;reson |
|||
|
|||
if spaceon |
|||
include RCPsp ; 'SP' space on disk command |
|||
endif ;spaceon |
|||
|
|||
if diron |
|||
include RCPdir ; 'DIR' directory command |
|||
endif ;diron |
|||
|
|||
if eraon |
|||
include RCPera ; 'ERA' erase command |
|||
endif ;eraon |
|||
|
|||
if renon |
|||
include RCPren ; 'REN' rename command |
|||
endif ;renon |
|||
|
|||
if cpon |
|||
include RCPcp ; 'CP' file copying command |
|||
endif ;cpon |
|||
|
|||
if echoon |
|||
include RCPecho ; 'ECHO' command |
|||
endif ;echoon |
|||
|
|||
if quieton |
|||
include RCPquiet ; 'Q' quiet flag |
|||
endif ;quieton |
|||
|
|||
if lton |
|||
include RCPlt ; 'LIST' and 'TYPE' commands |
|||
endif ;lton |
|||
|
|||
if proton |
|||
include RCPprot ; 'PROT' file attribute setting command |
|||
endif ;proton |
|||
|
|||
if peekon or pokeon or porton |
|||
include RCPiom ; 'PEEK', 'POKE', 'PORT' commands |
|||
endif ;peekon or pokeon or porton |
|||
|
|||
if regon |
|||
include RCPreg ; 'REG' register operation commands |
|||
endif ;regon |
|||
|
|||
if whlon |
|||
include RCPwhl ; 'WHL' command |
|||
endif ;whlon |
|||
|
|||
include RCPid ; Add ID string (must come last) |
|||
|
|||
RCPend: ; Used to calculate length |
|||
end |
|||
|
|||
; End of Z34RCP.Z80 |
|||
|
|||
@ -0,0 +1,97 @@ |
|||
|
|||
Z System Upgrades CP/M |
|||
|
|||
Z System is first-rate, state-of-the-art software for your CP/M machine. |
|||
ZCPR has been with us for over five years now, and has enhanced computer |
|||
productivity for thousands of CP/M users. Z System is now a mature |
|||
replacement for CP/M 2.2 or CP/M Plus, yet is "backward compatible" with |
|||
almost all programs written for CP/M. This means that you can still run |
|||
the CP/M programs you now use, yet take advantage of greatly increased |
|||
power and performance at the same time. |
|||
|
|||
NZ-COM and Z3PLUS form the heart of Z System. They replace the most |
|||
visible parts of CP/M 2.2 and CP/M Plus respectively, adding enhanced |
|||
command processing, named directories, vastly improved resident |
|||
commands, flow control processing, error handling, and much more. But |
|||
it isn't necessary to master all of these (at least at first!) to take |
|||
advantage of NZ-COM and Z3PLUS. In fact, though both packages come with |
|||
several disks of software and excellent manuals, almost anyone can |
|||
install either of these packages on their CP/M computer in just a few |
|||
minutes' time. The price for either NZ-COM or Z3PLUS is $69.95 plus $3 |
|||
shipping. |
|||
|
|||
The next step up in sophistication for CP/M 2.2 users is ZSDOS. ZSDOS |
|||
replaces the less visible portion of CP/M 2.2 which controls program |
|||
input and output. Through clever coding and exhaustive testing, the |
|||
authors of ZSDOS offer significant improvements in performance, safety, |
|||
and versatility for CP/M 2.2, including file time and date stamping, |
|||
file archiving for faster backups, public files (accessable from all |
|||
user areas), path access to files, and improved error messages and |
|||
handling. As with NZ-COM and Z3PLUS, ZSDOS installation is completely |
|||
menu-driven. ZSDOS comes with a collection of state-of-the-art utility |
|||
programs and a 140 page manual to help you make the most of the extended |
|||
features. ZSDOS costs $75 ($60 when purchased with NZ-COM) plus $3 |
|||
shipping. |
|||
|
|||
Another path to system enhancement for CP/M 2.2 users with hard or RAM |
|||
disks is available in the form of BackGrounder ii (BGii). BGii allows |
|||
you to "suspend" any program at the touch of a button and use a wide |
|||
range of resident commands such as DIR, REN, ERA, CALC, or TYPE. Then |
|||
hit the button again and BGii quickly returns you to the program you |
|||
suspended, right where you left off. Or use BGii's SWAP command and |
|||
you're back at the CP/M prompt, ready to run any other CP/M program. |
|||
When you're through, SWAP again and BGii returns you to your original |
|||
program, exactly as you left it! Advanced "Cut" and "Paste" commands |
|||
are also available for many terminals, allowing you to transfer sections |
|||
of screen directly from one program to another. Print spooling, |
|||
advanced key redefinition and recording capabilities, and a beautifully |
|||
designed 140-page user's manual are included. Installation is |
|||
menu-driven and easy. BGii is compatible with either ZCPR or CP/M 2.2, |
|||
and costs $75.00 plus $3 shipping. |
|||
|
|||
Last but not least is DosDisk, a small but powerful program which allows |
|||
you to read or write DIRECTLY to MS-DOS disks with your CP/M computer. |
|||
No more file transfers--simply insert a standard MS-DOS DSDD diskette in |
|||
your CP/M machine, type "DosDisk <drive>:", and away you go--all files |
|||
on the diskette are now accessable by all of your CP/M programs--even |
|||
files in MS-DOS subdirectories! DosDisk comes with a handsome 38-page |
|||
user's manual, and is available preconfigured for most machines at just |
|||
$30.00 plus $3 shipping. DosDisk is compatible with either ZCPR or |
|||
CP/M 2.2. |
|||
|
|||
These and other fine products for CP/M and CP/M Plus are available from |
|||
users groups around the country, or directly from Z Systems Associates. |
|||
Sizeable discounts for users' groups are also available from Z Systems |
|||
Associates through the Z Plan. The Z Systems Associates are: |
|||
|
|||
Sage Microsystems East |
|||
Selling & Supporting the Best in 8-Bit Software |
|||
1435 Centre St., Newton Centre, MA 02159-2469 |
|||
Voice: 617/965-3552 (9:00am - 11:30pm) |
|||
Modem: 617/965-7259 (password = DDT)(MABOS on PC-Pursuit) |
|||
|
|||
Same-day shipping of most products with modem download and support |
|||
available. Order by phone, mail, or modem. Shipping and handling $4 |
|||
per order (USA). Check, VISA, or MasterCard. Specify exact disk format. |
|||
|
|||
and: |
|||
|
|||
Plu*Perfect Systems |
|||
"==World-Class Software" |
|||
410 23rd Street, Santa Monica, CA 90402 |
|||
Voice: 213/393-6105 (evenings) |
|||
Modem: 213/670-9465 (leave message for "Bridger Mitchell") |
|||
|
|||
To order: Specify product, operating system, computer, 5 1/4" disk |
|||
format. Enclose check, adding $3 shipping ($5 foreign) + 6.5% tax in |
|||
California. Enclose invoice if upgrading BGii or ZRDOS. |
|||
|
|||
For more information on Z System, check at the above bulletin board |
|||
systems, or consult The Computer Journal for excellent articles on ZCPR |
|||
and CP/M. The Computer Journal is published six times a year by |
|||
Publishing Consultants, 190 Sullivan Crossroad, Columbia Falls, MT |
|||
59912, phone 406/257-9119. An issue averages forty pages with few ads. |
|||
Subscription rates are $16 for one year (6 issues), or $28 for two years |
|||
(12 issues) in the U.S., $22 for one year Canada and Mexico, and $24 |
|||
(surface) for one year in other countries. |
|||
|
|||
@ -1,3 +1,3 @@ |
|||
IOPINIT |
|||
LDR SYS.RCP,SYS.NDR,SYS.FCP,WW.Z3T |
|||
JETLDR RCP.ZRL,SYS.NDR,FCP.ZRL,MYTERM.Z3T |
|||
|
|||
@ -1,3 +1,3 @@ |
|||
IOPINIT |
|||
LDR SYS.RCP,SYS.NDR,SYS.FCP,WW.Z3T |
|||
JETLDR RCP.ZRL,SYS.NDR,FCP.ZRL,MYTERM.Z3T |
|||
|
|||
@ -1,4 +1,4 @@ |
|||
IOPINIT |
|||
LDR SYS.NDR,SYS.FCP,WW.Z3T |
|||
JETLDR SYS.NDR,FCP.ZRL,MYTERM.Z3T |
|||
ZSCFG2 CB |
|||
|
|||
@ -0,0 +1,31 @@ |
|||
# |
|||
# Add RomWBW utilities |
|||
# |
|||
../../Binary/Apps/assign.com 0: |
|||
../../Binary/Apps/fat.com 0: |
|||
../../Binary/Apps/fdu.com 0: |
|||
../../Binary/Apps/format.com 0: |
|||
../../Binary/Apps/mode.com 0: |
|||
../../Binary/Apps/osldr.com 0: |
|||
../../Binary/Apps/rtc.com 0: |
|||
../../Binary/Apps/survey.com 0: |
|||
../../Binary/Apps/syscopy.com 0: |
|||
../../Binary/Apps/sysgen.com 0: |
|||
../../Binary/Apps/talk.com 0: |
|||
../../Binary/Apps/timer.com 0: |
|||
../../Binary/Apps/xm.com 0: |
|||
../../Binary/Apps/inttest.com 0: |
|||
# |
|||
# Add Tune application and sample files |
|||
# |
|||
../../Binary/Apps/tune.com 3: |
|||
../../Binary/Apps/Tunes/*.* 3: |
|||
# |
|||
# Add ZSystem images |
|||
# |
|||
../BPBIOS/*.img 0: |
|||
../BPBIOS/*.rel 0: |
|||
../BPBIOS/*.zex 0: |
|||
../BPBIOS/myterm.z3t 0: |
|||
../BPBIOS/Z34RCP11/z34rcp11.rel 0:rcp.zrl |
|||
../BPBIOS/NZFCP13/nzfcp13.rel 0:fcp.zrl |
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue