mirror of https://github.com/wwarthen/RomWBW.git
524 changed files with 2373 additions and 105325 deletions
@ -1,11 +0,0 @@ |
|||
@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 || exit /b |
|||
rem zx ZMAC -nzfcp13.z80 -/P || exit /b |
|||
@ -1,7 +0,0 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
if exist *.prn del *.prn |
|||
if exist *.lst del *.lst |
|||
if exist *.err del *.err |
|||
if exist *.rel del *.rel |
|||
@ -1,5 +0,0 @@ |
|||
OBJECTS = nzfcp13.rel |
|||
OTHERS = |
|||
TOOLS = ../../../Tools |
|||
|
|||
include $(TOOLS)/Makefile.inc |
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,89 +0,0 @@ |
|||
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 |
|||
|
|||
@ -1,161 +0,0 @@ |
|||
; 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 |
|||
|
|||
@ -1,161 +0,0 @@ |
|||
; 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 |
|||
|
|||
@ -1,9 +0,0 @@ |
|||
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
@ -1,105 +0,0 @@ |
|||
; |
|||
; 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 |
|||
|
|||
|
|||
@ -1,122 +0,0 @@ |
|||
|
|||
; 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.
@ -1,11 +0,0 @@ |
|||
@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 || exit /b |
|||
zx ZMAC -z34rcp11.z80 -/P || exit /b |
|||
@ -1,7 +0,0 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
if exist *.prn del *.prn |
|||
if exist *.lst del *.lst |
|||
if exist *.err del *.err |
|||
if exist *.rel del *.rel |
|||
@ -1,5 +0,0 @@ |
|||
OBJECTS = z34rcp11.rel |
|||
TOOLS = ../../../Tools |
|||
DEST = |
|||
|
|||
include $(TOOLS)/Makefile.inc |
|||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
@ -1,33 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,62 +0,0 @@ |
|||
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
@ -1,35 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,56 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,245 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,137 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,162 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,76 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,119 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,64 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,296 +0,0 @@ |
|||
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 |
|||
|
|||
@ -1,256 +0,0 @@ |
|||
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 |
|||
|
|||
@ -1,130 +0,0 @@ |
|||
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 |
|||
|
|||
@ -1,49 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,108 +0,0 @@ |
|||
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 |
|||
|
|||
@ -1,165 +0,0 @@ |
|||
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 |
|||
|
|||
@ -1,100 +0,0 @@ |
|||
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 |
|||
|
|||
|
|||
@ -1,163 +0,0 @@ |
|||
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
@ -1,54 +0,0 @@ |
|||
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.
@ -1,105 +0,0 @@ |
|||
; |
|||
; 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.
@ -1,122 +0,0 @@ |
|||
|
|||
; 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 |
|||
|
|||
|
|||
@ -1,515 +0,0 @@ |
|||
|
|||
; 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 |
|||
|
|||
@ -1,515 +0,0 @@ |
|||
|
|||
; 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 |
|||
|
|||
@ -1,429 +0,0 @@ |
|||
|
|||
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 |
|||
|
|||
@ -1,7 +0,0 @@ |
|||
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. |
|||
|
|||
@ -1,390 +0,0 @@ |
|||
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® |
|||
|
|||
@ -1,136 +0,0 @@ |
|||
|
|||
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. |
|||
|
|||
@ -1,268 +0,0 @@ |
|||
|
|||
; 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 |
|||
|
|||
@ -1,267 +0,0 @@ |
|||
|
|||
; 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 |
|||
|
|||
@ -1,97 +0,0 @@ |
|||
|
|||
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,129 +0,0 @@ |
|||
; BPCNFG Configuration script for D-X Designs' P112, 256/512k RAM, 16/18 MHz |
|||
; <Banked B/P Bios System> |
|||
|
|||
;-- Submenu 1 allows changes to be made in miscellaneous system parameters |
|||
|
|||
1[ ; Start w/Base Menu, go to Submenu 1 |
|||
2 START01, ; Use START01.COM alias file. Comma ends string. |
|||
;; NOTE: While the original P112 plans call for a 16.000 MHz Crystal, |
|||
;; more precise baud rate generation, plus a little extra speed |
|||
;; is obtained by using a 18.432 MHz Crystal. |
|||
;; Select one of the two following pairs, comment out the other |
|||
;; 4 18,, ; Set 18 MHz, Scale divisor (18.432 MHz recommended) |
|||
;; 3 46080, ; Explicitly set for 18*2560 |
|||
4 16,, ; Set 16 MHz, Scale divisor (Crystal per Dave's plan) |
|||
3 40000, ; Explicitly set for 16*2500 |
|||
5 1, 2, ; Set Wait States: 9 MHz --> Memory = 0, IO = 1 |
|||
; 18 MHz --> Memory = 1, IO = 2 |
|||
;; The following configures the contiguous system RAM size and allocation. |
|||
;; NOTE: This assumes 'bank' 0 occupied by image of Boot Flash ROM. |
|||
6 Y ; "Hidden" Menu, "Y" acknowledging danger |
|||
1 1, ; Base Bank of TPA |
|||
2 3, ; First System Bank |
|||
3 4, ; First User Bank |
|||
4 5, ; First Bank of RAM Disk (Runs to Last) |
|||
5 15,, ; Last RAM Bank (7=256k,15=512k, 31=1MB) |
|||
] ; and back to main menu |
|||
|
|||
;-- Submenu 2 allows changes to be made to Character IO and IOByte Devices |
|||
; Insure that the Console (COM1) Baud rate is set to that of your terminal |
|||
|
|||
2[ ; Start w/Base Menu, go to Submenu 2 |
|||
2 10,,,,,,,, ; Set COM1 (Console) to 9600 bps, default settings |
|||
3 10,,,,,,,, ; Set COM2 to 9600 bps, default settings |
|||
] ; and back to main menu |
|||
|
|||
;-- Submenu 3 allows changes to be made in the Floppy Drive physical parameters |
|||
|
|||
3[ ; Start w/Base Menu, go to Submenu 3 |
|||
1 0 3, ; Set Drive, Unit 0 (3.5" Teac FDD 235-4xxx) |
|||
D Y H ; Double-Sided, Motor Needed, "High-Density" |
|||
80, 3, 4, 240, ; 80 Trks, 3 mS Step, 4 mS Head Load, 240 mS Unload |
|||
1 1 2, ; Set Drive, Unit 1, (5.25" Teac FD-55FGV) |
|||
D Y H ; Double-Sided, Motor Needed, "High-Density" |
|||
80, 3, 4, 240, ; 80 Trks, 3 mS Step, 4 mS Head Load, 240 mS Unload |
|||
1 3 2, ; Set Drive, Unit 3, (5.25" Teac FD-55B) |
|||
D Y S ; Double-Sided, Motor Needed, Standard Double-Density |
|||
40, 4, 24, 240, ; 40 Trks, 4 mS Step, 24 mS Head Load, 240 mS Unload |
|||
] |
|||
|
|||
;-- Submenu 4 allows changes to be made in Physical Hard Drive parameters |
|||
|
|||
4[ ; Start w/Base Menu, go to Submenu 4 |
|||
; Set SCSI Controller Type for this configuration as: |
|||
; 0 = Owl |
|||
; 1 = Adaptec ACB-4000A |
|||
; 2 = Xebec 1410a/Shugart 1610-3 |
|||
; 3 = Seagate SCSI |
|||
; 4 = Shugart 1610-4 (Minimal SCSI) |
|||
; 5 - Conner SCSI |
|||
; 6 - Quantum SCSI |
|||
; 7 - Maxtor SCSI |
|||
; 8 - Syquest SCSI |
|||
; 9 - GIDE (Generic IDE/ATA) |
|||
|
|||
; Sample SCSI config. (Values of Trk/Hd/etc irrelevant) |
|||
1 5 ; Configure Controller to Type #5 (Conner SCSI) |
|||
2 Y 0, 0, ; Set Unit 0 Params, Activate, Unit 0, LUN 0 |
|||
615, 4, 615, 615, ; Generic SCSI, 615 Trks, 4 Hds, RedWrt & Precomp @615 |
|||
; Sample IDE config. NECESSARY if using GIDE. |
|||
; 1 9 ; Configure Controller to Type (9 = GIDE) |
|||
; 2 Y 0, ; Set Unit 0 Params, Activate, Device 0 (IDE Master) |
|||
; 988, 10, 17, ; Toshiba 2.5" MK1422 Emulates 988 Trks,10 Hds,17 SPT |
|||
] |
|||
|
|||
;-- Submenu 5 allows changes to be made to Hard and RAM Disk Logical |
|||
;-- parameters, and exchanging of logical drives. |
|||
|
|||
5[ ; Starting w/Base menu, go to Submenu 5 |
|||
; Since the initial assembly places Floppies in A-D, |
|||
; swap them with the first four Hard Drive partitions. |
|||
; NOTE Comment these out if you have no Hard Drive, or are |
|||
; re-configuring an image that has them already swapped! |
|||
1 A E ; swap floppies |
|||
1 B F ; A-D with |
|||
1 C G ; Hard Partitions |
|||
1 D H ; E-H |
|||
|
|||
; Configure the Hard Drive partitions. |
|||
2 A ; Configure Partition A: |
|||
4,1024, 2, 498,0, ; 4k Allocs, 1024 Dirs, Start @ 2, 498 Trks, Unit 0 |
|||
2 B ; Partition B: |
|||
4,1024, 500,750,0, ; 4k Allocs, 1024 Dirs, Start @ 500, 750 Trks, U 0 |
|||
2 C ; Partition C: |
|||
4,1024,1250, 750,0, ; 4k Allocs, 1024 Dirs, Start @ 1250, 750 Trks, U 0 |
|||
2 D ; Partition D: |
|||
4,1024,2000, 3206,0, ; 4k Allocs, 1024 Dirs, Start @ 2000, 3206 Trks, U 0 |
|||
|
|||
; A second drive is often useful. Configure allocations here. |
|||
; NOTE: the Bios must be assembled to activate these drives, or |
|||
; BPCNFG will abort. |
|||
2 O ; Partition O: (Backup Drive) |
|||
4,1024, 2, 998,1, ; 4k Allocs, 1024 Dirs, Start @ 2, 1000 Trks, U 1 |
|||
2 P ; Partition P: (Backup Drive) |
|||
4,1024,1000,1620,1, ; 4k Allocs, 1024 Dirs, Start @ 1000, 1635 Trks, U 1 |
|||
|
|||
; SUGGESTION: If you use the ZSDOS2 Hashed Directory feature, one way |
|||
; is to build a primary partition with needed executables, then swap |
|||
; it with the main A: drive, gaining the significantly faster access |
|||
; and response. For example, if the hashed drive is the partition |
|||
; at D:, to use it as A: simply uncomment the following. |
|||
|
|||
; 1 A D ; Swap Logical drives A: and D:. |
|||
|
|||
; Configure the RAM Drive. |
|||
; Each "Track" is a 4k increment, 8 "Tracks" per 32k memory bank. |
|||
; Common memory complements for the P112 are 2-128k memory chips (256k), |
|||
; 1-512k chip (512k), and 2-512k chips (1024k). If a User Bank is |
|||
; defined, the space for RAM drive is reduced by 32k (8 'tracks). |
|||
2 M ; Drive M: (RAM Disk) |
|||
2, 128, 0, 88,0, ; 2k Allocs, 128 Dirs, Start @ 0, 88 Trks (352k), U 0 |
|||
;------ Alternatives for 2x128k, 1x512k and 2x512k RAM Chips ------ |
|||
; Alc #Dirs Start #Trks Unit Cap w/User Bank |
|||
; 256k RAM : 2, 64, 0, 32, 0, (128k, 24= 96k) |
|||
;NOTE: For 512k or More RAM, the Flash is copied to RAM |
|||
; causing one 32k block to be unusable. |
|||
; 512k RAM : 2, 128, 0, 96, 0, (384k, 88=352k) |
|||
; Max w/1 MB RAM : 2, 256, 0, 224, 0, (896k, 216=864k) |
|||
] |
|||
|
|||
@ -1,86 +0,0 @@ |
|||
; BPCNFG Configuration script for D-X Designs' P112 |
|||
; <--BOOT TRACK Version--> |
|||
;-- Submenu 1 allows changes to be made in miscellaneous system parameters |
|||
|
|||
1[ ; Start w/Base Menu, go to Submenu 1 |
|||
; 2 STARTUP, ; Uncomment and change name for custom startup script. |
|||
; Comma ends string. |
|||
;; NOTE: While the original P112 plans call for a 16.000 MHz Crystal, |
|||
;; more precise baud rate generation, plus a little extra speed |
|||
;; is obtained by using a 18.432 MHz Crystal. |
|||
;; Select one of the two following pairs, comment out the other |
|||
;; 4 18,, ; Set 18 MHz, Scale divisor (18.432 MHz recommended) |
|||
;; 3 46080, ; Explicitly set for 18*2560 |
|||
4 16,, ; Set 16 MHz, Scale divisor (Crystal per Dave's plan) |
|||
3 40000, ; Explicitly set for 16*2500 |
|||
5 1, 2, ; Set Wait States: 9 MHz --> Memory = 0, IO = 1 |
|||
; 18 MHz --> Memory = 1, IO = 2 |
|||
;; The following configures the contiguous system RAM size and allocation. |
|||
;; NOTE: Memory configuration not needed in Boot version, commented out |
|||
;; This layout assumes 'Bank' 0 occupied by image of Flash Boot ROM. |
|||
; 6 Y ; "Hidden" Menu, "Y" acknowledging danger |
|||
; 1 1, ; Base Bank of TPA |
|||
; 2 3, ; First System Bank |
|||
; 3 4, ; First User Bank |
|||
; 4 5, ; First Bank of RAM Disk (Extends to Last) |
|||
; 5 15,, ; Last RAM Bank (7=256k,15=512k, 31=1MB) |
|||
] ; and back to main menu |
|||
|
|||
;-- Submenu 2 allows changes to be made to Character IO and IOByte Devices |
|||
; Insure that the Console (COM1) Baud rate is set to that of your terminal |
|||
|
|||
2[ ; Start w/Base Menu, go to Submenu 2 |
|||
2 10,,,,,,,, ; Set COM1 (Console) to 9600 bps, default settings |
|||
3 10,,,,,,,, ; Set COM2 to 9600 bps, default settings |
|||
] ; and back to main menu |
|||
|
|||
;-- Submenu 3 allows changes to be made in the Floppy Drive physical parameters |
|||
|
|||
3[ ; Start w/Base Menu, go to Submenu 3 |
|||
1 0 3, ; Set Drive, Unit 0 (3.5" Teac FDD 235-4xxx) |
|||
D Y H ; Double-Sided, Motor Needed, "High-Density" |
|||
80, 4, 4, 240, ; 80 Trks, 4 mS Step, 4 mS Head Load, 240 mS Unload |
|||
1 1 2, ; Set Drive, Unit 1 (5.25" Teac FDD 55FGV) |
|||
D Y H ; Double-Sided, Motor Needed, "High-Density" |
|||
80, 4, 4, 240, ; 80 Trks, 4 mS Step, 4 mS Head Load, 240 mS Unload |
|||
] |
|||
|
|||
;-- Submenu 4 allows changes to be made in Physical Hard Drive parameters |
|||
|
|||
4[ ; Start w/Base Menu, go to Submenu 4 |
|||
; Set SCSI Controller Type for this configuration as: |
|||
; 0 = Owl |
|||
; 1 = Adaptec ACB-4000A |
|||
; 2 = Xebec 1410a/Shugart 1610-3 |
|||
; 3 = Seagate SCSI |
|||
; 4 = Shugart 1610-4 (Minimal SCSI) |
|||
; 5 - Conner SCSI |
|||
; 6 - Quantum SCSI |
|||
; 7 - Maxtor SCSI |
|||
; 8 - Syquest SCSI |
|||
; 9 - GIDE (Generic IDE/ATA) |
|||
; Sample SCSI config. (Values of Trk/Hd/etc irrelevant) |
|||
1 5 ; Configure Controller to Type #5 (Conner SCSI) |
|||
2 Y 0, 0, ; Set Unit 0 Params, Activate, Unit 0, LUN 0 |
|||
615, 4, 615, 615, ; Generic SCSI, 615 Trks, 4 Hds, RedWrt & Precomp @615 |
|||
; Sample IDE config. (All values NECESSARY if using GIDE). |
|||
; 1 9 ; Configure Controller to Type (9 = GIDE) |
|||
; 2 Y 0, ; Set Unit 0 Params, Activate, Device 0 (IDE Master) |
|||
; 988, 10, 17, ; Toshiba 2.5" MK1422 Emulates 988 Trks,10 Hds,17 SPT |
|||
] |
|||
|
|||
;-- Submenu 5 allows changes to be made to Hard and RAM Disk Logical |
|||
;-- parameters, and exchanging of logical drives. |
|||
|
|||
5[ ; Starting w/Base menu, go to Submenu 5 |
|||
; Configure the Hard Drive partitions. (Generally, Only two on Boot Disks) |
|||
2 E ; Configure Partition E: |
|||
4,1024, 2, 498,0, ; 4k Allocs, 1024 Dirs, Start @ 2, 498 Trks, Unit 0 |
|||
2 F ; Partition F: |
|||
4,1024, 500, 750,0, ; 4k Allocs, 1024 Dirs, Start @ 500, 750 Trks, U 0 |
|||
; Swap first HD partitions with Floppies only if going to Hard on boot |
|||
; (Comment out swaps for Floppy-only operation) |
|||
; 1 A E |
|||
; 1 B F |
|||
] |
|||
|
|||
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.
@ -1,577 +0,0 @@ |
|||
;***************************************************************************** |
|||
; BP-BIOS. Banked, Portable BIOS. |
|||
; Copyright (c) 1989-93 by Cameron W. Cotrill and Harold F. Bower |
|||
; |
|||
; This program is free software; you can redistribute it and/or modify |
|||
; it under the terms of the GNU General Public License as published by |
|||
; the Free Software Foundation; either version 2 of the License, or (at |
|||
; your option) any later version. |
|||
; |
|||
; This program is distributed in the hope that it will be useful, but |
|||
; WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
; General Public License for more details. |
|||
; |
|||
; You should have received a copy of the GNU General Public License |
|||
; along with this program; if not, write to the Free Software |
|||
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|||
; |
|||
;---------------------------------------------------------------------------- |
|||
; This BIOS is broken into modules that allow it to be ported across a |
|||
; wide variety of Z80 compatible systems. All hardware specific drivers |
|||
; are isolated to separate modules. All hardware independent modules (such |
|||
; as deblocking and IO redirection) are similarly broken out. |
|||
; |
|||
; The BP BIOS supports IOBYTE, but in a unique manner. Four physical devices |
|||
; are defined - COM1, COM2, PIO, and NULL. These are assigned to the CON, |
|||
; AUXIN, AUXOUT, and LST logical devices by the I/O byte. The NULL device is |
|||
; a bit bucket for output, and returns nulls for input. |
|||
; |
|||
; IOBYTE DESCRIPTION: LIST AUXOUT AUXIN CON |
|||
; D7->D0 XX XX XX XX |
|||
; |
|||
; XX: 00=COM1 01=COM2 10=PIO 11=NULL |
|||
; |
|||
;+++++++++++++++++ D-X Designs Pty Ltd P112 Version ++++++++++++++++++ |
|||
; |
|||
; This configuration of the B/P Bios is for Dave Brooks' Project 112 Single |
|||
; board computer. Multifunction chips on the board provide the services |
|||
; needed by a CP/M BIOS. The primary chips and the functions provided are: |
|||
; |
|||
; Zilog Z80182 Z180 Core CPU, MMU, DMA |
|||
; ESCC #1 COM1 Serial Port w/handshake signals, RS-232 |
|||
; ESCC #2 (available on header, coded as expansion) |
|||
; ASCI0, ASCI1 (Serial async, available on header, expansion) |
|||
; CTC1 Optional 'heartbeat' clock, GP timer |
|||
; |
|||
; SMC FDC37C665 Enhanced 765-derivative Floppy Disk Controller |
|||
; COM2 - 16550-compatible Serial, RS-232 |
|||
; PAR1 - Centronics Parallel port (Printer) |
|||
; |
|||
; Dallas DS-1202 Primary Realtime clock |
|||
; Non-volatile battery-backed RAM (config data) |
|||
; |
|||
; 28F256 Flash ROM Boot code, device initialization |
|||
; (onboard programmable) |
|||
; 32/128/512 KB Static RAM |
|||
; |
|||
; Ver Date Revision Description |
|||
; --- --------- ------------------------ |
|||
; 1.3 28 Aug 01 - Scrubbed for GPL Release. HFB |
|||
; 1.2 - 30 Aug 97 - Expanded SCSI CDB length to 12 bytes for CDROM. HFB |
|||
; 1.1 - 11 May 97 - Added IDE Hard Drive instead of Normal SCSI, updated |
|||
; files to latest version. HFB |
|||
; 1.0 - 13 Aug 96 - Initial Release for P112 from YASBEC release. HFB |
|||
;***************************************************************************** |
|||
|
|||
NAME BPBIO |
|||
|
|||
FALSE EQU 0 |
|||
TRUE EQU NOT FALSE |
|||
NO EQU FALSE |
|||
YES EQU TRUE |
|||
; << ****** SYSTEM SPECIFIC ****** >> |
|||
; << Insert DEF-xxxx.LIB definition >> |
|||
INCLUDE DEF-DX.LIB ; << file for your configuration. >> |
|||
|
|||
CSEG |
|||
;..... |
|||
; Ascii Character Equates |
|||
|
|||
ETX EQU 03H ; End-of-Text |
|||
ACK EQU 06H ; Acknowledge |
|||
BELL EQU 07H ; Bell Character |
|||
CR EQU 0DH |
|||
LF EQU 0AH |
|||
XON EQU 11H ; X-On (Control-Q) |
|||
XOFF EQU 13H ; X-Off (Control-S) |
|||
ESC EQU 1BH |
|||
|
|||
; Miscellaneous Equates |
|||
|
|||
WRUAL EQU 2 ; DOS code for unallocated write |
|||
|
|||
LOCKF EQU LOW [NOT AUTOSL] ;Lock flag for format default |
|||
ALONE EQU FALSE ; Boot code equate |
|||
IF Z3 |
|||
MACLIB Z3BASE ; Include ENV definitions |
|||
ENDIF |
|||
PAGE |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
; BIOS Entry Jump Table - This MUST be in Common Memory |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
|
|||
CSEG |
|||
|
|||
BIOSJT: JP CBOOT ; 00 Cold Boot |
|||
JP WBOOT ; 01 Warm Boot |
|||
JP CONST ; 02 console input status * (IOP+12) |
|||
JP CONIN ; 03 console input * (IOP+15) |
|||
JP CONOUT ; 04 console output * (IOP+18) |
|||
JP LIST ; 05 list output * (IOP+21) |
|||
JP AUXOUT ; 06 aux out (punch) * (IOP+24) |
|||
JP AUXIN ; 07 aux in (reader) * (IOP+27) |
|||
JP HOME ; 08 seek track 0 |
|||
JP SELDSK ; 09 select logical drive |
|||
JP SETTRK ; 10 select track |
|||
JP SETSEC ; 11 select sector |
|||
JP SETDMA ; 12 set dma address for disk xfer |
|||
JP READ ; 13 disk read |
|||
JP WRITE ; 14 disk write |
|||
JP LISTST ; 15 list output status * (IOP+30) |
|||
JP SECTRN ; 16 logical -> physical sector xlate |
|||
|
|||
; --- <<< End of CP/M 2.2 Vectors >>> |
|||
|
|||
JP CONOST ; 17 Console Output Status |
|||
JP AUXIST ; 18 Aux Input Status |
|||
JP AUXOST ; 19 Aux Output Status |
|||
JP DEVTBL ; 20 CP/M 3 Device Table |
|||
JP DEVINI ; 21 Character Device Init (Near CP/M 3) |
|||
JP DRVTBL ; 22 DPH Pointer Table for A-P |
|||
JP 0 ; 23 RESERVED FOR MULTIO |
|||
JP FLUSH ; 24 Flush Deblocker |
|||
JP MOVE ; 25 Perform possible Inter-Bank Move |
|||
IF CLOCK |
|||
JP TIME ; 26 Get/Set RTC (Zsdos params) |
|||
ELSE |
|||
JP ISTRUE ; 26..return 0FFH (No Clock) if No code |
|||
ENDIF ;clock |
|||
JP SELMEM ; 27 Select Alternate Memory Bank |
|||
JP SETBNK ; 28 Select DMA Memory bank |
|||
JP XMOVE ; 29 Set Source/Destination Banks for Move |
|||
|
|||
; --- <<< End of CP/M 3 Vectors >>> |
|||
|
|||
JP RETBIO ; 30 Return BIOS Addresses |
|||
JP DIRDIO ; 31 Direct Disk I/O |
|||
JP STFARC ; 32 Set Bank for FRJP and FRCALL |
|||
JP FRJP ; 33 Jump to (HL) in Alternate Bank |
|||
JP FRCLR ; 34 Clear Stack switcher from Alt Bank Jumps |
|||
; (used for error exits) |
|||
JP FRGETB ; 35 Load A,(HL) from Alternate Bank |
|||
JP FRGETW ; 36 Load DE,(HL) from Alternate Bank |
|||
JP FRPUTB ; 37 Load (HL),A to Alternate Bank |
|||
JP FRPUTW ; 38 Load (HL),DE to Alternate Bank |
|||
JP RETMEM ; 39 Return Current Active Memory Bank |
|||
|
|||
CPR EQU BIOSJT-800H-0E00H |
|||
DOS EQU BIOSJT-0E00H |
|||
|
|||
; End of BIOS Jump Table |
|||
PAGE |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
; Boot / Banked Routine Linkage |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
|
|||
IF BANKED |
|||
COMMON /BANK2/ |
|||
ROMJT: |
|||
IF INROM |
|||
JP INSYNC |
|||
INSYNC: JP BOOTER ; Cold start loader |
|||
ELSE |
|||
JP 0 ; Reserved |
|||
JP 0 |
|||
ENDIF ; Inrom |
|||
JDIRIO: JP DIRIO ; Low Level HDC/FDC Functions |
|||
JHDCIO: JP DIRIO ; Low Level HDC Functions (combined w/FDCIO) |
|||
JBREAD: JP BREAD ; BIOS Read |
|||
JBWRT: JP BWRT ; BIOS Write |
|||
JBSTRN: JP BSTRN ; BIOS Sectran |
|||
IF INROM |
|||
INCLUDE BOOTROM.Z80 ; Boot Routines |
|||
ENDIF ; Inrom |
|||
ENDIF ; Banked |
|||
PAGE |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
; C o n f i g u r a t i o n A r e a |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
; << ****** HARDWARE SPECIFIC ****** >> |
|||
; << Insert ICFG-xxx to initialize >> |
|||
INCLUDE ICFG-DX.Z80 ; << your computer's IO system >> |
|||
PAGE |
|||
; << ****** Hardware Specific ****** >> |
|||
; << Enter Low level Byte I/O driver >> |
|||
INCLUDE IIO-DX.Z80 ; << routines in file IIO-xxxx.Z80 >> |
|||
PAGE |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
; Cold Start Code |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
|
|||
DSEG |
|||
; << ***** Hardware Specific ***** >> |
|||
; << Insert the Cold boot routines >> |
|||
INCLUDE CBOOT-DX.Z80 ; << in file CBOOT-xx.Z80 >> |
|||
|
|||
; Deblocking Buffer Allocation |
|||
|
|||
IF [BANKED OR INROM] |
|||
COMMON /B2RAM/ |
|||
IF INROM |
|||
HSTBUF: DEFS INITCS ; Use a 1k buffer w/below |
|||
ELSE |
|||
HSTBUF EQU CBOOT0 ; Use CBOOT0 code for part of buffer w/below |
|||
ENDIF ;inrom |
|||
ELSE |
|||
DSEG |
|||
HSTBUF EQU CBOOT |
|||
ENDIF ;not banked |
|||
DEFS 1024-(INITCS) ; Use a 1 k buffer |
|||
|
|||
HSTSIZ EQU HSTBUF+1024 ; Added label for Hard Drive ext. interface |
|||
PAGE |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
; Disk Data Structures |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
|
|||
MXFDIR EQU 255 ; Max number of dir entries-1 for floppy |
|||
|
|||
MXFALC EQU 880 ; If High Density or 8" drives can be handled, |
|||
; set this for 880 (1.76 MB), otherwise the |
|||
; value can be reduced to 400 (800 KB), the |
|||
; maximum for 80 track, Double-Sided formats. |
|||
CSEG |
|||
IF BANKED |
|||
COMMON /BANK2/ |
|||
ENDIF |
|||
DPB: ; Marker for DPB start |
|||
.XLIST ; Don't print these due to size |
|||
IF AUTOSL |
|||
INCLUDE DPB.LIB ; Default selection of common DD formats |
|||
IF FLOPYH |
|||
INCLUDE DPB-H.LIB ; If "High-Density" Disk formats desired, |
|||
ENDIF |
|||
IF FLOPY8 |
|||
INCLUDE DPB-8.LIB ; If 8" or HD Floppy Disks can be handled, |
|||
ENDIF ; add default Autoselect DPB's |
|||
IF MORDPB |
|||
INCLUDE DPB2.LIB ; Additional assignable DPB's (4+4 unused) |
|||
ENDIF ;mordpb |
|||
|
|||
ELSE ;Not autosl |
|||
INCLUDE DPBRAM.LIB ; RAM-based DPB's, 1 per physical Format |
|||
ENDIF |
|||
|
|||
NRDPB EQU [$-DPB]/DPBSIZ ; Calc number of DPB's |
|||
|
|||
CSEG ; Hard & Ramdisk DPBs and DPHs go in Code Seg |
|||
.xlist |
|||
IF HARDDSK |
|||
; << ****** Hardware Specific ****** >> |
|||
; << Insert DPB Info for Hard Disk >> |
|||
INCLUDE DPBHD-DX.LIB ; << Drives as DPBHD-xx.LIB >> |
|||
ENDIF |
|||
.list |
|||
IF RAMDSK |
|||
; << ****** Hardware Specific ****** >> |
|||
; << Insert DPB Info for RAM Disk >> |
|||
INCLUDE DPBM-DX.LIB ; << in file DPBM-xxx.LIB >> |
|||
ENDIF |
|||
PAGE |
|||
INCLUDE DPH.LIB ; Disk parameter headers |
|||
.xlist |
|||
IF HARDDSK |
|||
INCLUDE DPHHD.LIB ; Insert DPH Info for Hard Disk Partitions |
|||
ENDIF |
|||
.list |
|||
IF RAMDSK |
|||
INCLUDE DPHM.LIB ; Insert DPH Info for RAM Disk |
|||
ENDIF |
|||
.LIST |
|||
PAGE |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
; Disk Driver Low - Level Function Links |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
; Direct Disk I / O |
|||
; Call with: Function Number in C, Driver number in B, |
|||
; Args in A, DE, HL |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
CSEG |
|||
DIRDIO: |
|||
IF BANKED |
|||
CALL BIOSTK |
|||
CALL GOSYSB ; Bank in the system bank |
|||
JP JDIRIO ; And jump to Banked-BIOS function |
|||
|
|||
COMMON /BANK2/ |
|||
ENDIF |
|||
|
|||
DIRIO: PUSH HL ; Save user's HL |
|||
PUSH AF ; ..and A reg for range checks |
|||
LD A,B |
|||
CP MAXDDA ; Legal Driver #? |
|||
JR NC,DIRIOX ; ..jump Error Exit if Not |
|||
PUSH BC |
|||
LD HL,DDIOTB |
|||
LD C,B ; Driver number |
|||
LD B,0 |
|||
ADD HL,BC |
|||
ADD HL,BC ; Index into table |
|||
ADD HL,BC |
|||
LD A,(HL) ; Max call number |
|||
INC HL |
|||
LD C,(HL) |
|||
INC HL |
|||
LD H,(HL) |
|||
LD L,C ; Service vector table address in HL |
|||
POP BC ; Requested call |
|||
DEC A ; Correct Max Call # for Testing |
|||
JP M,DIRIOX ; ..jump Error exit if 0 --> FF (No Calls) |
|||
CP C ; Greater than Maximum Function? |
|||
JR C,DIRIOX ; ..jump Error exit if so |
|||
PUSH BC ; Else Save BC |
|||
LD B,0 |
|||
ADD HL,BC |
|||
ADD HL,BC ; Add twice for Word index |
|||
LD B,(HL) |
|||
INC HL |
|||
LD H,(HL) |
|||
LD L,B ; Put vector in HL |
|||
POP BC ; Restore User's BC register |
|||
POP AF ; .Restore A and Flags |
|||
EX (SP),HL ; ..restore HL, Vector to TOS |
|||
RET ; Jump to Routine |
|||
|
|||
DIRIOX: POP AF ; Clear stack |
|||
POP HL |
|||
OR 0FFH ; Set Error return |
|||
RET ; ..and quit |
|||
|
|||
; Direct Disk Access Table Pointer Table |
|||
|
|||
DDIOTB: DEFB 0 |
|||
DEFW 00 ; No Driver 0 |
|||
DEFB MAXFFN |
|||
DEFW FDFUNC ; 1 is Primary Floppy Driver |
|||
IF HARDDSK |
|||
DEFB MAXHFN |
|||
DEFW HDFUNC ; 2 is Primary Hard Disk Driver |
|||
ENDIF ;harddsk |
|||
IF [RAMDSK AND NOT HARDDSK] |
|||
DEFB 0 |
|||
DEFW 00 ; (Dummy 2 if not installed) |
|||
ENDIF ;ramdsk and not harddsk |
|||
IF RAMDSK |
|||
DEFB 0 |
|||
DEFW 00 ; 3 is Primary RAM Disk Driver (No Functions) |
|||
ENDIF ;ramdsk |
|||
|
|||
MAXDDA EQU ($-DDIOTB)/3 ; Number of entries in pointer table |
|||
|
|||
; Floppy Drive Function Table and Numbers |
|||
|
|||
FDFUNC: DEFW STMODE ; 00 set mode |
|||
DEFW STSIZE ; 01 set drive size |
|||
DEFW STHDRV ; 02 set head and drive |
|||
DEFW STSECT ; 03 set sector #, size and eot |
|||
DEFW SPEC ; 04 specify srt, hlt, hut |
|||
DEFW RECAL ; 05 home the floppy |
|||
DEFW SEEK ; 06 seek track |
|||
DEFW SREAD ; 07 read |
|||
DEFW SWRITE ; 08 write |
|||
DEFW READID ; 09 read id |
|||
DEFW RETDST ; 10 return drive status & result ptr |
|||
DEFW FMTTRK ; 11 format a track |
|||
MAXFFN EQU [$-FDFUNC]/2 |
|||
|
|||
; Hard Disk Function Table and Numbers |
|||
|
|||
IF HARDDSK |
|||
HDFUNC: DEFW HDVALS ; 00 Set Xfer Address, Return Interface Parms |
|||
DEFW HDSLCT ; 01 Select Device (& Logical Unit w/SCSI) |
|||
DEFW HD_RW ; 02 Direct Hard Disk Driver |
|||
MAXHFN EQU [$-HDFUNC]/2 |
|||
ENDIF ;harddsk |
|||
PAGE |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
; Banked Memory Support Routines |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
; Bank Control Routines. Used only in Banked Systems |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
|
|||
IF BANKED ; << ****** HARDWARE SPECIFIC ****** >> |
|||
; << Enter the Inter-Bank Movement >> |
|||
INCLUDE IBMV-DX.Z80 ; << routines in IBMV-xxx.Z80 >> |
|||
|
|||
ELSE ; If Not Banked, Use these hooks |
|||
|
|||
MOVE: LDIR |
|||
RET |
|||
|
|||
SETBNK: |
|||
SELMEM: |
|||
RETMEM: |
|||
XMOVE: |
|||
GOSYSB: |
|||
FRCLR: |
|||
STFARC: RET |
|||
|
|||
FRJP: JP (HL) |
|||
|
|||
FRGETB: LD A,(HL) |
|||
RET |
|||
|
|||
FRGETW: LD E,(HL) |
|||
INC HL |
|||
LD D,(HL) |
|||
DEC HL |
|||
RET |
|||
|
|||
FRPUTB: LD (HL),A |
|||
RET |
|||
|
|||
FRPUTW: LD (HL),E |
|||
INC HL |
|||
LD (HL),D |
|||
DEC HL |
|||
RET |
|||
|
|||
ENDIF ;(not) banked |
|||
PAGE |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
; Core BIOS Code |
|||
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
; Return BIOS Addresses |
|||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
|
|||
CSEG |
|||
|
|||
RETBIO: LD BC,BIOSJT ; Get address of bios base |
|||
LD DE,CONFIG ; Point to configuration area |
|||
LD HL,DEVCFG ; Point to Char IO Device Table |
|||
LD A,VERS ; Return BIOS Version |
|||
RET |
|||
|
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
; Return DPH Table Address |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
|
|||
DRVTBL: LD HL,DPHTBL ; Point to DPH table |
|||
RET |
|||
|
|||
PAGE |
|||
INCLUDE BYTEIO.Z80 ; Con:, aux:, lst: redirection |
|||
PAGE |
|||
INCLUDE SELRWD.Z80 ; Physical driver link for disks |
|||
PAGE |
|||
INCLUDE DEBLOCK.Z80 ; Hstbuf deblocker |
|||
PAGE |
|||
INCLUDE SECTRAN.Z80 ; Sector translation |
|||
PAGE |
|||
IF AUTOSL |
|||
INCLUDE SELFLP2.Z80 ; Floppy disk select |
|||
ELSE |
|||
INCLUDE SELFLP1.Z80 |
|||
ENDIF |
|||
PAGE |
|||
INCLUDE FLOPPY.Z80 ; Hardware independent floppy routines |
|||
PAGE |
|||
; << ****** Hardware Specific ****** >> |
|||
; << This Driver is for the Standard >> |
|||
INCLUDE FDC-DX.Z80 ; << MicroSystems (SMC) FDC37C665 >> |
|||
PAGE |
|||
; << ****** Hardware Specific ****** >> |
|||
; << Enter routines for your timer >> |
|||
INCLUDE TIM-DX.Z80 ; << and clock in TIM-xxxx.Z80 >> |
|||
PAGE |
|||
|
|||
IF HARDDSK ; << ****** Hardware Specific ****** >> |
|||
IF IDE ; << Enter driver routines for your >> |
|||
INCLUDE HARDIDE.Z80 ; << Hard Disk in HARD-xxx.Z80 >> |
|||
ELSE |
|||
INCLUDE HARD-DX.Z80 |
|||
ENDIF |
|||
PAGE |
|||
ENDIF |
|||
|
|||
IF RAMDSK ; << ****** Hardware Specific ****** >> |
|||
INCLUDE RAMD-DX.Z80 ; << Enter driver routines for RAM >> |
|||
PAGE ; << Disk in RAMD-xxx.Z80 >> |
|||
ENDIF |
|||
; << ****** Hardware Specific ****** >> |
|||
; << Enter Warm Boot routines in >> |
|||
INCLUDE WBOOT-DX.Z80 ; << WBOOT-xx.Z80 >> |
|||
;..... |
|||
; Status bytes of general use placed at end of Data area |
|||
|
|||
DSEG |
|||
|
|||
HDONE: DEFS 1 ; HDC Flag 0=Ready, 1=Busy, 0FFH=Done |
|||
ERFLAG: DEFS 1 ; Disk Operation Error Code |
|||
DEFS 3 ; Reserved |
|||
|
|||
; Add Character IO buffers here to insure they are at end of DSEG |
|||
|
|||
IF BUFFA0 AND MORDEV AND NOT MOVCPM |
|||
COM4Q: DEFS 1 ; Char count in Queue |
|||
DEFS QSIZE ; 1 to 255 character type-ahead buffer |
|||
ENDIF |
|||
|
|||
IF BUFFA1 AND MORDEV AND NOT MOVCPM |
|||
COM5Q: DEFS 1 ; Char count in Queue |
|||
DEFS QSIZE ; 1 to 255 character type-ahead buffer |
|||
ENDIF |
|||
|
|||
IF (BUFFA0 OR BUFFA1) AND MORDEV AND NOT MOVCPM |
|||
DEFS 12 ; Stack for Buffered char IO routines |
|||
INTSP: DEFS 2 ; Storage for entry Stack Ptr |
|||
ENDIF |
|||
|
|||
; Flags Bytes for Com1/Com2 Flow Control |
|||
IF XONOFF |
|||
COM1WT: DEFS 1 ; B7=0 - Output Ok, B7=1 - Output Stopped |
|||
COM2WT: DEFS 1 ; B0=0 - Input Ok, B0=1 - Input Halted |
|||
IF ESCC_B AND MORDEV AND NOT MOVCPM |
|||
COM3WT: DEFS 1 ; Flags for Expansion devices |
|||
ENDIF |
|||
IF ASCI_0 AND MORDEV AND NOT MOVCPM |
|||
COM4WT: DEFS 1 |
|||
ENDIF |
|||
IF ASCI_1 AND MORDEV AND NOT MOVCPM |
|||
COM5WT: DEFS 1 |
|||
ENDIF |
|||
ENDIF ;XonOff |
|||
|
|||
PAOR: DEFS 1 ; Parallel Output Ready Flag |
|||
|
|||
IF [BANKED AND ZSDOS2] |
|||
COMMON /B2RAM/ ; Put this label in Banked Memory |
|||
ENDIF ; ..else in Dseg |
|||
BRAME: DEFS 2 ; Use as dynamic sizing label for Hard Drive |
|||
; ALV buffers, and storage area for sizing. |
|||
; ALV Buffers build up from here in memory |
|||
CSEG |
|||
|
|||
; Display warning if we are assembling for MOVCPM integration and the |
|||
; combined CSEG/Initialized DSEG size exceeds 1 or 2 Boot Records |
|||
|
|||
PRINTX MACRO %NN |
|||
.printx %NN |
|||
ENDM |
|||
|
|||
LIMIT EQU $-BIOSJT+INITCS |
|||
|
|||
IF MOVCPM AND LIMIT > 4480 |
|||
.printx |
|||
.printx **** BIOS too big (>4480) for Boot Tracks! **** |
|||
PRINTX %LIMIT |
|||
.printx |
|||
ELSE |
|||
IF MOVCPM AND LIMIT > 4352 |
|||
.printx |
|||
.printx ++++ BIOS exceeds (>4352) 2-Sector Boot Record ++++ |
|||
PRINTX %LIMIT |
|||
.printx |
|||
ENDIF |
|||
ENDIF |
|||
|
|||
NSECTS EQU ($+INITCS-BIOSJT)/128+1 |
|||
IF INROM |
|||
INCLUDE BOOTRAM.Z80 |
|||
ENDIF |
|||
END |
|||
|
|||
@ -1,718 +0,0 @@ |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::*********************** |
|||
; CBOOT. B/P BIOS Cold Boot Module. ** Hardware Specific ** |
|||
; This MUST be the Last Module in the BIOS because ** for prompts, Env ** |
|||
; it is overwritten by RAM Data. No Dflt Termcap. ** and Termcap Dflts ** |
|||
; - D-X Designs Pty Ltd P112 - *********************** |
|||
; |
|||
; 1.2 - 30 Aug 01 - Cleaned up for GPL release, Set Bank Numbers on boot |
|||
; (TPABNK only if MOVCPM) by reading Regs set by ROM. HFB |
|||
; 1.1 - 8 May 97 - Added code to activate ASCI channels. HFB |
|||
; 1.0 - 13 Aug 96 - Initial Release for P112. HFB |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
|
|||
DSEG |
|||
;..... |
|||
; Cold boot entry. This code is executed only once and so may be |
|||
; overwritten subsequently by the BIOS. In Non-banked systems, this code |
|||
; is placed in the Host Buffer, HSTBUF, allowing up to 1024 bytes in the |
|||
; section, although much less will fit on the boot tracks. In Banked |
|||
; systems, a small resident part (up to 128 bytes) occupies the Directory |
|||
; Sector Buffer, DIRBUF, while the remainder is placed in the banked |
|||
; HSTBUF, allowing both sectors to be overwritten without penalty. |
|||
; To insure minimum disruption in assembling and linking the BIOS, this |
|||
; module must be one of the first linked to place HSTBUF/DIRBUF at the |
|||
; beginning of B2RAM and DSEG. |
|||
|
|||
CBOOT: DI ; Disable interrupt system |
|||
|
|||
IN0 A,(DDRA) ; Get Data Definition of Port A |
|||
SET 4,A ; Bit 4 is Input for SCSI "Int" input |
|||
OUT0 (DDRA),A ; and reset bits |
|||
|
|||
LD A,(HICOMM) ; Set Common Bank start to Header locn |
|||
OUT0 (CBAR),A |
|||
|
|||
CALL FDRst ; Reset FDC Controller, Re-Initialize |
|||
; (Needed in case ROM Timed out for HD Boot) |
|||
CALL MOTOFF ; Turn Floppy motors Off, clear timer |
|||
|
|||
XOR A ; Get a Byte of Zeros |
|||
OUT0 (SCR),A ; and activate ASCI0/ASCI1 vs MIMIC |
|||
|
|||
LD HL,(IOBYT) ; Get IOBYTE, Default Drive & User |
|||
LD (3),HL ; Set values in TPA bank |
|||
|
|||
; Set BIOS Bank Numbers to the RAM base Number as set by Boot ROM. In-context |
|||
; RAM will be reflected in CBR which is base. We adjust other bank numbers |
|||
; based on configured differences, except for MaxBnk which remains as config'd. |
|||
; Since the bootable systems (MOVCPM set to YES) are not banked, the Fast Boot |
|||
; option should be OFF, and only the TPABNK will necessarily be Accurate. |
|||
|
|||
IN0 C,(CBR) ; Read Current 4k base of RAM |
|||
RR C ; divide |
|||
RR C ; by |
|||
RR C ; 8 for 32k Bank base |
|||
LD HL,TPABNK |
|||
LD B,(HL) ; Get configured TPA Bank # |
|||
LD (HL),C ; (Store actual) |
|||
IF NOT MOVCPM |
|||
DEC HL |
|||
LD A,(HL) ; Get Any User Bank |
|||
SUB B ; (compute difference from TPA) |
|||
JR C,NoUsrB ; ..jump if None |
|||
ADD A,C ; Else Compute new User Bank # |
|||
LD (HL),A ; (save) |
|||
NoUsrB: INC HL ; advance to System Bank # |
|||
INC HL |
|||
LD A,(HL) ; fetch |
|||
SUB B ; Compute diff from System Bnk to TPA Bnk |
|||
ADD A,C ; add new base |
|||
LD (HL),A ; (save) |
|||
INC HL ; Advance to RAM Drive Start Bank # |
|||
LD A,(HL) |
|||
SUB B ; compute difference |
|||
ADD A,C ; Add true base |
|||
LD (HL),A ; (save) |
|||
ENDIF ;~Movcpm. Max Bank # Stays as configured |
|||
|
|||
IF BANKED |
|||
LD SP,USP ; Set to User Stack in High memory |
|||
|
|||
CALL GOSYSB ; Turn on the System bank |
|||
XOR A |
|||
LD (BIOSTK),A ; Init bank switcher |
|||
LD (3),HL ; Set IOBYTE and Default DU in System bank |
|||
|
|||
CALL CBOOT0 ; Execute main part of Cold Setup |
|||
|
|||
LD A,(TPABNK) |
|||
CALL SELBNK ; Insure TPA is in context |
|||
ELSE |
|||
LD SP,80H ; Set stack in Low memory |
|||
|
|||
CALL CBOOT0 ; Execute main part of Cold Setup |
|||
ENDIF |
|||
|
|||
IF NOT MOVCPM |
|||
LD HL,003CH ; Point to ZMP Flag |
|||
LD (HL),0E5H ; say this is first time run |
|||
ENDIF |
|||
|
|||
IF FASTWB |
|||
LD HL,BTTBL ; Point to DMA block moving to Alt Bank |
|||
JP WBOOTV ; move it and commence execution |
|||
ELSE |
|||
JP GOZSYS ; Otherwise just go to Command Processor |
|||
ENDIF |
|||
|
|||
IF BANKED |
|||
COMMON /B2RAM/ |
|||
ENDIF |
|||
|
|||
;..... |
|||
; If this system is Banked and set for Zsdos2, then ALV Buffers are in the |
|||
; system bank and will be dynamically sized during Cold Boot. This permits |
|||
; BPCNFG to configure a generic IMG file for specific Hard Drive Partitions. |
|||
|
|||
CBOOT0: LD HL,BRAME ; Get end of banked RAM |
|||
LD (HISAV),HL ; and save for later use |
|||
IF HARDDSK |
|||
LD HL,DPHTBL ; Point to start of DPH Table |
|||
LD B,16 ; do all DPHs |
|||
DYNLP: LD E,(HL) |
|||
INC HL |
|||
LD D,(HL) ; Get the pointer for this one |
|||
INC HL ; advance to next |
|||
LD A,D ; Anything there? |
|||
OR E |
|||
JR Z,DYNCHK ; jump to end if Nothing |
|||
DEC DE ; Else back up Ptr to Driver |
|||
DEC DE |
|||
LD A,(DE) ; Get driver # |
|||
IF RAMDSK |
|||
DEC A |
|||
DEC A ; Hard Disk (Driver 2)? |
|||
JR Z,ADDSIZ ; ..jump if so |
|||
DEC A ; RAM Disk (Driver 3)? |
|||
ELSE |
|||
CP 2 ; Hard Disk (Driver 2)? |
|||
ENDIF ; Ramdsk |
|||
JR NZ,DYNCHK ; ..jump to end if Not |
|||
ADDSIZ: PUSH BC ; Save loop counter |
|||
PUSH HL ; and ptr to DPH |
|||
EX DE,HL |
|||
LD DE,12 ; Offset to DPB Ptr (+2 for Decs) |
|||
ADD HL,DE |
|||
LD E,(HL) |
|||
INC HL |
|||
LD D,(HL) ; Get Addr of this DPB |
|||
INC HL |
|||
INC HL |
|||
INC HL ; Advance to ALV Addr location |
|||
LD BC,(HISAV) ; get end of used RAM |
|||
LD (HL),C ; and save |
|||
INC HL |
|||
LD (HL),B ; in DPH |
|||
LD HL,5 |
|||
ADD HL,DE ; Advance to Size in DPB |
|||
LD E,(HL) |
|||
INC HL |
|||
LD D,(HL) ; and fetch Size-1 |
|||
INC DE ; Make = Size in Block |
|||
PUSH BC ; (save End Addr in BC) |
|||
LD B,3 |
|||
DVRAME: SRL D ; Divide by 2 |
|||
RR E |
|||
DJNZ DVRAME ; *3 = Div 8 |
|||
INC DE ; +1 |
|||
EX DE,HL |
|||
POP BC ; Restore Ram End |
|||
ADD HL,BC ; Add size to Starting Location |
|||
LD (HISAV),HL ; save for next drive/overflow check |
|||
POP HL ; Restore DPH ptr |
|||
POP BC ; and loop ctr |
|||
DYNCHK: DJNZ DYNLP ; Loop til all 16 tested |
|||
ENDIF ;harddsk |
|||
IF BANKED |
|||
LD DE,USP ; Point above critical Bios Ram storage |
|||
ELSE |
|||
LD DE,DIRBUF |
|||
ENDIF |
|||
IF Z3 |
|||
LD HL,(ENVADR) ; And top of memory |
|||
ELSE |
|||
LD HL,0FFFFH |
|||
ENDIF |
|||
SBC HL,DE ; Calculate # bytes to clear (CF already clr) |
|||
EX DE,HL ; Ptr to HL, Cnt to DE |
|||
Clr0: LD (HL),0 |
|||
INC HL |
|||
DEC DE |
|||
LD A,D |
|||
OR E |
|||
JR NZ,Clr0 ; ..loop til all cleared |
|||
|
|||
; In systems where we have enough space, we clear unused High Memory too |
|||
|
|||
IF NOT MOVCPM |
|||
LD HL,(ENVADR) ; Clear above the ENV as well |
|||
LD DE,100H ; Assuming a 2-record ENV |
|||
ADD HL,DE ; Are we already at the top of memory? |
|||
JR C,ATTOP ; ..bypass clearing if so |
|||
EX DE,HL ; Else we must calculate how much to clear |
|||
LD HL,0FFFFH ; From the TOP |
|||
SBC HL,DE ; subtract the start |
|||
LD C,L |
|||
LD B,H ; and use for count |
|||
LD L,E ; Copy Start to Source |
|||
LD H,D |
|||
INC DE ; dest is same + 1 |
|||
LD (HL),0 ; we fill with Zeros |
|||
LDIR ; Do it! |
|||
ATTOP: |
|||
ENDIF ; ~Movcpm |
|||
|
|||
; Initialize the ZCPR3 buffers |
|||
|
|||
IF NOT MOVCPM |
|||
LD HL,(ENVADR) ; Should we move our local ENV block? |
|||
LD A,H |
|||
OR L |
|||
JR NZ,BMOVE ; ..jump if we already have one |
|||
ENDIF ; (Always move Env if using MOVCPM type load) |
|||
LD HL,Z3ENV ; Else set up pointers |
|||
LD (ENVADR),HL |
|||
LD DE,ENV |
|||
EX DE,HL |
|||
LD BC,ENVEND-ENV ; count |
|||
LDIR ; and move |
|||
IF MOVCPM ; Instead of storing Termcap bytes, Zeroize |
|||
LD H,D |
|||
LD L,E ; Dupe dest addr |
|||
LD (HL),0 ; Clear current byte |
|||
LD BC,37-1 ; Set count to remaining Termcap area |
|||
INC DE ; Dest is next byte |
|||
LDIR ; move Zero along |
|||
ENDIF ;Movcpm |
|||
BMOVE: |
|||
IF NOT MOVCPM ; No need to set values on Boot Track System |
|||
LD DE,(ENVADR) ; Get pointer to ENV |
|||
IF HAVIOP |
|||
LD HL,0FH ; Set offset to IOP Addr in ENV |
|||
CALL CALCOF ; get the addr and size |
|||
LD (IOPPTR),HL ; and set addr |
|||
ENDIF ;haviop |
|||
LD HL,18H ; Set offset to Mult Comnd Line in ENV |
|||
CALL CALCOF ; get addr and size |
|||
LD (CLPTR),HL ; set addr |
|||
INC HL |
|||
INC HL |
|||
INC HL ; Advance to CL+3 |
|||
LD (CL3PTR),HL ; and set |
|||
INC HL ; Advance to CL+4 |
|||
LD (CMDSET),HL ; set addr in Command Line ptr |
|||
LD (CMDSET+2),A ; and CL Size byte |
|||
LD HL,09H ; Set offset to Path addr in ENV |
|||
CALL CALCOF ; get addr |
|||
LD (PTHPTR),HL ; and set |
|||
ENDIF ;Movcpm |
|||
IF FASTWB ; Do we restore CPR from Bank? |
|||
IF MOVCPM |
|||
LD DE,BIOSJT-1600H ; Get CPR Starting Addr |
|||
LD HL,0800H ; and Default Length |
|||
ELSE |
|||
LD HL,(ENVADR) ; Get pointer to ENV start |
|||
LD DE,3FH ; offset to CPR start |
|||
ADD HL,DE |
|||
LD E,(HL) ; and get CPR starting address |
|||
INC HL |
|||
LD D,(HL) |
|||
INC HL ; (advance to length) |
|||
LD H,(HL) ; Get length in blocks (*2 at this point) |
|||
LD L,0 ; convert to Word |
|||
SRL H ; Compute Blks * 128 |
|||
RR L ; to give HL = CPR length in bytes |
|||
ENDIF ;~Movcpm |
|||
LD (BTTBL+6),HL ; Save length in boot block |
|||
LD (SARL+6),HL ; and DMA WB block |
|||
LD HL,(TPABNK) ; Get TPA (L) and System (H) Banks |
|||
LD A,L ; Load TPA Bank # |
|||
RL D ; Move MSB of Address to Carry |
|||
ADC A,0 ; Add Carry to Bank # (in case cross banks) |
|||
RRA ; shift for DMA Bank # |
|||
LD (SARL+5),A ; save in Warm Boot DMA Block |
|||
LD (BTTBL+2),A ; and initial move to bank |
|||
RR D ; Move Bank # LSB (Carry) to MSB of Address |
|||
LD (SARL+3),DE ; Save CPR logical address in WB DMA block |
|||
LD (BTTBL),DE ; and initial move to bank |
|||
LD A,H ; Load System Bank # |
|||
LD HL,100H ; Load Bank Address of CPR Image Start |
|||
RL H ; get rid of MSB |
|||
; Since we know the MSB=0, bypass adc 0 |
|||
RRA ; Shift for DMA Bank # |
|||
LD (BTTBL+5),A ; save as initial dest bank byte |
|||
LD (SARL+2),A ; and DMA Source Bank byte |
|||
RR H ; Rotate Carry (Bank LSB) to MSB of Address |
|||
LD (SARL),HL ; Save Source Addr in WB DMA block |
|||
LD (BTTBL+3),HL ; and initial move block |
|||
ENDIF ;fastwb |
|||
|
|||
IF BANKED |
|||
LD HL,0000 ; If we are banked, set to copy Page 0 |
|||
LD A,(TPABNK) ; of TPA to System Bank |
|||
OR A |
|||
RRA ; Shift TPA Bank # |
|||
LD (CPYVEC+2),A ; store in DMA Block |
|||
RR H ; adjust Address by Bank LSB (Carry) |
|||
LD (CPYVEC),HL ; and store |
|||
LD H,0 |
|||
LD A,(SYSBNK) |
|||
RRA ; Shift System Bank # |
|||
LD (CPYVEC+5),A ; store in DMA Block |
|||
RR H ; adjust Address by Bank LSB (Carry) |
|||
LD (CPYVEC+3),HL ; and store |
|||
LD HL,40H ; Set length of move |
|||
LD (CPYVEC+6),HL ; and store in DMA Block |
|||
ENDIF ;banked |
|||
|
|||
LD (STKSAV),SP ; Save entry stack since we alter it here |
|||
LD A,(BLOCKE-BLOCK)/6 |
|||
LD SP,BLOCK |
|||
BLKMV: POP BC ; And number of bytes to move |
|||
POP HL ; Source |
|||
POP DE ; Get destination |
|||
LDIR |
|||
DEC A ; Another block moved |
|||
JR NZ,BLKMV ; Do more as required |
|||
|
|||
LD SP,(STKSAV) ; Get entry Stack Pointer back so we can return |
|||
|
|||
; All Buffers above BIOS have been cleared already at this point |
|||
|
|||
DEC A ; 0 --> FF |
|||
LD (Z3WHL),A ; Set the Wheel Byte |
|||
|
|||
IF HAVIOP |
|||
LD HL,IOPRET |
|||
LD (BIOSJT+1),HL |
|||
ENDIF ;haviop |
|||
|
|||
LD HL,INTTBL ; Set the Interrupt Vector |
|||
LD A,H ; first the page |
|||
LD I,A ; to CPU Register |
|||
OUT0 (IL),L ; then the segment addr |
|||
|
|||
IF BANKED |
|||
CALL JDVINI ; Call directly because we are in High Stack |
|||
ELSE |
|||
CALL DEVINI ; Initialize the I/O system |
|||
ENDIF ; And any device specific ram |
|||
|
|||
IF [BANKED AND ZSDOS2] |
|||
LD DE,8000H ; If ALVs in Bank, size against Bank2 Top |
|||
ELSE |
|||
LD DE,(USRSP) ; else against base of User Space |
|||
ENDIF |
|||
LD HL,(HISAV) ; Load Highest RAM Address used |
|||
OR A |
|||
SBC HL,DE ; Is Needed Space > Limit? |
|||
JR C,MEMOK ; ..jump if So |
|||
|
|||
CALL PRINT ; Else Warn user |
|||
DEFB CR,LF,7,'++ Mem Ovfl +','+'+80H |
|||
|
|||
; Sign on the system |
|||
|
|||
MEMOK: CALL PRINT |
|||
IF MOVCPM ; Space is critical for boot tracks |
|||
DEFB CR,LF,'P112 - ' ; Save all bytes possible |
|||
ELSE ; Otherwise sign on with complete name |
|||
DEFB CR,LF,'D-X Designs P112 - ' |
|||
ENDIF |
|||
DEFB 'B/P 50.00k Bios' ;**** Do NOT alter this string **** |
|||
|
|||
DEFB ' V',VERS/16+'0','.',VERS MOD 16+'0',' ' ; Vers in BCD |
|||
DATE |
|||
IF BANKED |
|||
DEFB ' (Banked) ' |
|||
ELSE |
|||
IF NOT MOVCPM |
|||
DEFB ' (Non-Banked) ' ; Nothing for boot track system |
|||
ENDIF |
|||
ENDIF |
|||
IF BANKED |
|||
DEFB ' with:',CR,LF,LF |
|||
DEFB ' ZCPR3+ Env' |
|||
IF CLOCK |
|||
IF DS1202 |
|||
DEFB CR,LF,' Dallas DS-1202 Clock, ' |
|||
IF CLKSET |
|||
DEFB 'with ' |
|||
ELSE |
|||
DEFB 'NO ' |
|||
ENDIF |
|||
DEFB 'Set' |
|||
ELSE |
|||
DEFB CR,LF,' ZSDOS Interrupt Clock' |
|||
ENDIF |
|||
ENDIF |
|||
DEFB CR,LF,' High-Density Floppy' |
|||
IF FDDMA |
|||
DEFB ' (DMA-driven IO)' |
|||
ELSE |
|||
DEFB ' (Polled IO)' |
|||
ENDIF |
|||
IF HARDDSK |
|||
IF IDE |
|||
DEFB CR,LF,' GIDE Hard Disk Driver' |
|||
ELSE |
|||
DEFB CR,LF,' SCSI Hard Disk Driver' |
|||
IF HDDMA |
|||
DEFB ' (DMA-driven IO)' |
|||
ELSE |
|||
DEFB ' (Polled IO)' |
|||
ENDIF |
|||
ENDIF |
|||
ENDIF |
|||
IF FASTWB |
|||
DEFB CR,LF,' Warm Boot from RAM' |
|||
ENDIF |
|||
IF RAMDSK |
|||
DEFB CR,LF,' RAM Disk (M:)' |
|||
ENDIF |
|||
IF BIOERM |
|||
DEFB CR,LF,' Full Error Messages' |
|||
ENDIF |
|||
ENDIF ;Banked |
|||
DEFB CR,LF+80H |
|||
|
|||
EI ; Turn Interrupts back on |
|||
RET ; ..and return |
|||
|
|||
;..... |
|||
; Offset to and get ENV Address and respective element size |
|||
|
|||
CALCOF: ADD HL,DE ; Add offset to Base ENV Addr |
|||
LD C,(HL) ; get low byte |
|||
INC HL |
|||
INC HL ; advance to size byte |
|||
LD A,(HL) ; get size |
|||
DEC HL ; Back down to Addr hi byte |
|||
LD H,(HL) ; and grab |
|||
LD L,C ; Ptr to Segment now in HL |
|||
RET ; return to caller |
|||
|
|||
; Block Move Parameters |
|||
|
|||
BLOCK: DEFW PATH-CMDSET ; # to move |
|||
DEFW CMDSET ; Source |
|||
CLPTR: DEFW Z3CL ; Destination |
|||
|
|||
DEFW 10 |
|||
DEFW AUTOCMD |
|||
CL3PTR: DEFW Z3CL+3 |
|||
|
|||
DEFW PATHE-PATH |
|||
DEFW PATH |
|||
PTHPTR: DEFW EXPATH |
|||
|
|||
IF HAVIOP |
|||
DEFW IOPLEN+2 |
|||
DEFW IOPENT |
|||
IOPPTR: DEFW IOP |
|||
ENDIF |
|||
|
|||
IF HARDDSK AND HDDMA AND (NOT IDE) |
|||
DEFW DMALEN |
|||
DEFW DMADAT |
|||
DEFW DMATBL |
|||
ENDIF |
|||
|
|||
BLOCKE EQU $ |
|||
|
|||
;..... |
|||
; Initial HD DMA Control Block data |
|||
|
|||
IF HARDDSK AND HDDMA |
|||
DMADAT: DEFW HSTBUF ; Physical sector address |
|||
DEFB 00 ; BNK2 SHR 1 if banked, BNK0 SHR 1 If not |
|||
DEFW DMAACK ; Dack port address |
|||
DEFB 0 |
|||
DEFW 400H ; Number of bytes to transfer (1Sct+slop=2Scts) |
|||
DMALEN EQU $-DMADAT |
|||
ENDIF |
|||
|
|||
CMDSET: DEFW Z3CL+4 ; Point to first character in command buffer |
|||
DEFB Z3CLS ; Command buffer size |
|||
DEFW 0 ; Clear the command line |
|||
|
|||
PATH: DEFB '$','$',1,15 ; Current, A15: |
|||
DEFB 0 ; End of initial path |
|||
PATHE EQU $ |
|||
|
|||
; Environment Descriptor for ZCPR34 |
|||
|
|||
ENV: JP 0 ; Leading jump (address is CBIOS when NZCOM) |
|||
ENV1: ; ZCPR3 enviornment descriptor ... |
|||
DEFB 'Z3ENV' ; Environment id |
|||
DEFB 90H ; Env type (=>80H means extended ENV). YASBEC |
|||
; uses 90H to show User Area instead of Prt2 |
|||
DEFW EXPATH ; External path (path) |
|||
DEFB EXPATHS ; |
|||
DEFW RCP ; Resident command package (rcp) |
|||
DEFB RCPS ; |
|||
DEFW IOP ; Input/output package (iop) |
|||
DEFB IOPS ; |
|||
DEFW FCP ; Flow command package (fcp) |
|||
DEFB FCPS ; |
|||
DEFW Z3NDIR ; Named directories (ndr) |
|||
DEFB Z3NDIRS ; |
|||
DEFW Z3CL ; Command line (cl) |
|||
DEFB Z3CLS ; |
|||
DEFW Z3ENV ; Environment (env) |
|||
DEFB Z3ENVS ; |
|||
DEFW SHSTK ; Shell stack (sh) |
|||
DEFB SHSTKS ; |
|||
DEFB SHSIZE ; |
|||
DEFW Z3MSG ; Message buffer (msg) |
|||
DEFW EXTFCB ; External fcb (fcb) |
|||
DEFW EXTSTK ; External stack (stk) |
|||
DEFB 0 ; Quiet flag (1=quiet, 0=not quiet) |
|||
DEFW Z3WHL ; Wheel byte (whl) |
|||
DEFB 16 ; Processor speed (mhz) |
|||
DEFB 'P'-'@' ; Max disk letter |
|||
DEFB 31 ; Max user number |
|||
DEFB 1 ; 1 = Ok to accept DU:, 0 = Not Ok |
|||
DEFB 0 ; Crt selection () |
|||
DEFB 0 ; Printer selection () |
|||
DEFB 80 ; Crt 0: width |
|||
DEFB 24 ; # of lines |
|||
DEFB 22 ; # of text lines |
|||
|
|||
; In Extended ENV, CRT 1 is replaced by System Info |
|||
|
|||
;; DEFB 132 ; . CRT 1: Width |
|||
;; DEFB 24 ; # of lines |
|||
;; DEFB 22 ; # of text lines |
|||
|
|||
; The Drive Vector is a 16-bit word in which a "1" bit indicates that a drive |
|||
; is active in the system. The bits are arranged as: PONMLKJIHGFEDCBA. When |
|||
; stored in memory, it is in normal form with the Low byte stored first. |
|||
|
|||
E_DRVL DEFL [DRV_A & 1] + [DRV_B & 2] + [DRV_C & 4] + [DRV_D & 8] |
|||
E_DRVL DEFL E_DRVL + [DRV_E & 16] + [DRV_F & 32] + [DRV_G & 64] |
|||
E_DRVL DEFL E_DRVL + [DRV_H & 128] ; Low Byte Formed |
|||
E_DRVH DEFL [DRV_I & 1] + [DRV_J & 2] + [DRV_K & 4] + [DRV_L & 8] |
|||
E_DRVH DEFL E_DRVH + [DRV_M & 16] + [DRV_N & 32] + [DRV_O & 64] |
|||
E_DRVH DEFL E_DRVH + [DRV_P & 128] ; High Byte Formed |
|||
|
|||
DEFW E_DRVH * 256 + E_DRVL |
|||
DEFB 0 ; (Reserved) |
|||
|
|||
DEFB 80 ; Prt 0: width |
|||
DEFB 66 ; # of lines |
|||
DEFB 58 ; # of text lines |
|||
DEFB 1 ; Ff flag (1=can form feed) |
|||
|
|||
;========= Usurped Prt1 storage for Resident User Space Vectors ========= |
|||
;; DEFB 96 ; Prt 1: width |
|||
;; DEFB 66 ; # of lines |
|||
;; DEFB 58 ; # of text lines |
|||
;; DEFB 1 ; Ff flag (1=can form feed) |
|||
|
|||
DEFB USPCS ; Remaining Free User Space (recs) |
|||
USRSP: DEFW USPC ; Res. User Space base Address (xx00h/xx80h) |
|||
DEFB USPCS ; Size of Res. User Space in 128-byte recs |
|||
|
|||
;======================================================================== |
|||
; In Extended ENV, Printers 2 and 3 are gone, replaced by System Info |
|||
|
|||
;; DEFB 132 ; . PRT 2: Width |
|||
;; DEFB 66 ; # of lines |
|||
;; DEFB 58 ; # of text lines |
|||
;; DEFB 1 ; FF flag (1=can form feed) |
|||
;; DEFB 132 ; . PRT 3: Width |
|||
;; DEFB 88 ; # of lines |
|||
;; DEFB 82 ; # of text lines |
|||
;; DEFB 1 ; FF flag (1=can form feed) |
|||
DEFW CPR ; Ccp base address |
|||
DEFB [DOS-CPR]/128 ; Size of ccp in 128 byte records |
|||
DEFW DOS ; Bdos base address (xx00h or xx80h) |
|||
DEFB [BIOSJT-DOS]/128 ; Bdos buffer size in 128 byte records |
|||
DEFW BIOSJT ; Bios base address (nzbio if nzcom running) |
|||
DEFB 'SH ' ; Shell variable filename |
|||
DEFB 'VAR' ; Shell variable filetype |
|||
DEFB ' ' ; File 1 |
|||
DEFB ' ' ; |
|||
DEFB ' ' ; File 2 |
|||
DEFB ' ' ; |
|||
DEFB ' ' ; File 3 |
|||
DEFB ' ' ; |
|||
DEFB ' ' ; File 4 |
|||
DEFB ' ' ; |
|||
DEFB 0 ; Public drive area (zrdos +) |
|||
DEFB 0 ; Public user area (zrdos +) |
|||
; Env 128 bytes long |
|||
;*************************************************************************** |
|||
; This TermCap Data for the New Z-System complies with VLIB4D specs and more |
|||
; fully describes the terminal and its capabilities. Edit the fields with |
|||
; values for your terminal characteristics, or use it as a template for an |
|||
; outboard definition loaded from the Startup file. |
|||
|
|||
ENV2: DEFB ' ' ; Terminal Name (13 bytes, space terminated) |
|||
|
|||
IF MOVCPM ; Dummies for boot track systems |
|||
B13: DEFB 0 |
|||
B14: DEFB 0 ; Bit 7 = Normal TCAP |
|||
ELSE |
|||
B13: DEFB GOELD-ENV2 ; Offset to GOELD in graphics section |
|||
B14: DEFB 10000000B ; Bit 7 = Extended TCAP, remainder undefined |
|||
ENDIF ;~Movcpm |
|||
|
|||
; B15 b0 Standout 0 = Half-Intensity, 1 = Reverse Video |
|||
; B15 b1 Power Up Delay 0 = None, 1 = 10-second delay |
|||
; B15 b2 No Wrap 0 = Line Wrap, 1 = No Wrap if char written |
|||
; to last character in line |
|||
; B15 b3 No Scroll 0 = Scroll, 1 = No Scroll if char written |
|||
; to last char in last line of diplay |
|||
; B15 b4 ANSI 0 = ASCII, 1 = ANSI |
|||
|
|||
B15: DEFB 00000000B ; Reverse Vid, Wrap, Scroll, ASCII |
|||
; Additional single character cursor motion bytes |
|||
DEFB 'E'-'@' ; Cursor Up |
|||
DEFB 'X'-'@' ; Cursor Down |
|||
DEFB 'D'-'@' ; Cursor Right |
|||
DEFB 'S'-'@' ; Cursor Left |
|||
|
|||
IF NOT MOVCPM ; Omit in boot systems to save space |
|||
; Instead, we simply zero remainder. |
|||
DEFB 0 ; CL Delay for Screen Clear |
|||
DEFB 0 ; CM Delay for Cursor Motion |
|||
DEFB 0 ; CE Delay for Clear to End-of-Line |
|||
; Strings start here |
|||
DEFB 0 ; (CL) Home Cursor and Clear Screen |
|||
DEFB 0 ; (CM) Cursor Motion |
|||
DEFB 0 ; (CE) Clear to End-of-Line |
|||
DEFB 0 ; (SO) Reverse On |
|||
DEFB 0 ; (SE) Reverse Off |
|||
DEFB 0 ; (TO) Terminal Init |
|||
DEFB 0 ; (TE) Terminal De-init |
|||
; Extensions to Standard Z3TCAP |
|||
DEFB 0 ; (LD) Delete Line |
|||
DEFB 0 ; (LI) Insert Line |
|||
DEFB 0 ; (CD) Clear from Cursor to End-of-Scr |
|||
; Attributes setting parameters |
|||
DEFB 0 ; Set Attributes |
|||
DEFB 0 ; Attributes String |
|||
; Read items from screen |
|||
DEFB 0 ; Report Cursor Pos'n (ESC Y Pn Pn) |
|||
DEFB 0 ; Read Line Under Cursor |
|||
|
|||
GOELD: DEFB 0 ; On/Off Delay |
|||
; Graphics strings offset from Delay value. |
|||
DEFB 0 ; Graphics On |
|||
DEFB 0 ; Graphics Off |
|||
DEFB 0 ; Cursor Off |
|||
DEFB 0 ; Cursor On |
|||
; Graphics Characters |
|||
DEFB '*' ; Upper-Left corner [*] |
|||
DEFB '*' ; Upper-right corner [*] |
|||
DEFB '*' ; Lower-Left corner [*] |
|||
DEFB '*' ; Lower-right corner [*] |
|||
DEFB '-' ; Horizontal Line [-] |
|||
DEFB '|' ; Vertical Line [|] |
|||
DEFB '#' ; Full Block (hashed block) [*] |
|||
DEFB 'X' ; Hashed Block (big X) [#] |
|||
DEFB '+' ; Upper Intersect (Upside down "T") [+] |
|||
DEFB '+' ; Lower Intersect ("T") [+] |
|||
DEFB '+' ; Mid Intersect (Crossing Lines) [+] |
|||
DEFB '+' ; Right Intersect ("T" rotated left) [+] |
|||
DEFB '+' ; Left Intersect ("T" rotated right) [+] |
|||
DEFB 0 |
|||
DEFB 0 |
|||
ENDIF ;~Movcpm |
|||
ENVEND: |
|||
|
|||
; IOP initial data |
|||
|
|||
IF HAVIOP |
|||
IOPENT: JP IOPEND |
|||
JP IOPEND |
|||
JP IOPEND |
|||
JP IOPEND |
|||
JP CONST |
|||
JP CONIN |
|||
JP CONOUT |
|||
JP LIST |
|||
JP AUXOUT |
|||
JP AUXIN |
|||
JP LISTST |
|||
JP IOPEND |
|||
JP IOPEND |
|||
JP IOPEND |
|||
JP IOPEND |
|||
JP IOPEND |
|||
DEFB 'Z3IOP' |
|||
DEFB 'DUMMY ' |
|||
IOPLEN EQU $-IOPENT |
|||
IOPEND EQU IOP+IOPLEN |
|||
XOR A |
|||
RET |
|||
ENDIF ;haviop |
|||
|
|||
BCODEE EQU $ |
|||
IF BANKED |
|||
INITCS EQU BCODEE-CBOOT0 ; Size of Banked (B2RAM) part of Init Code |
|||
ELSE |
|||
INITCS EQU BCODEE-CBOOT ; Size of Complete Init Code in DSEG |
|||
ENDIF |
|||
|
|||
STKSAV: DEFS 2 ; Storage for Pointer while moving |
|||
HISAV: DEFS 2 ; Storage for Hi-ALV address |
|||
|
|||
IF FASTWB |
|||
DSEG |
|||
BTTBL: DEFS 8 ; Initial WB DMA Block |
|||
ENDIF |
|||
;======================== End of CBOOT ============================= |
|||
|
|||
@ -1,317 +0,0 @@ |
|||
;************************************************************************** |
|||
; DEBLOCK - Disk Deblocking Buffer Routines. (Based on CP/M Example code) |
|||
; |
|||
; 1.0 - 3 Jul 92 - First General Release. HFB |
|||
; 0.0 - 8 Jul 91 - Initial Test Release. HFB |
|||
;************************************************************************** |
|||
|
|||
CSEG |
|||
;..... |
|||
; Set DMA address given by registers B and C |
|||
|
|||
SETDMA: LD (DMAADR),BC ; Save the address |
|||
RET |
|||
|
|||
;..... |
|||
; Set track given by BC. While the entire word is saved here, only the |
|||
; lower byte is used in Floppy, SCSI and RAM Drivers. |
|||
|
|||
SETTRK: LD (SEKTRK),BC |
|||
RET |
|||
|
|||
;..... |
|||
; Set sector given by register C. This Sector number is the physical number |
|||
; of the desired sector and assumes that SECTRAN has been called. This value |
|||
; should reflect the Sector Number returned from SECTRAN. While the entire |
|||
; word is saved here, only the lower byte is used in Floppy, SCSI and RAM. |
|||
|
|||
SETSEC: LD (SEKSEC),BC |
|||
;..fall thru to Return.. |
|||
;..... |
|||
; Home the selected drive |
|||
|
|||
HOME: RET ; Done by SELDSK |
|||
|
|||
;..... |
|||
; Flush the host buffer to disk if any writes pending |
|||
|
|||
FLUSH: LD A,(HSTWRT) ; Write pending? |
|||
OR A |
|||
RET Z ; ..quit if nothing pending |
|||
IF BANKED |
|||
CALL BIOSTK |
|||
CALL GOSYSB |
|||
ENDIF |
|||
JP WRITEHST ; Write host buffer to disk if so |
|||
|
|||
;..... |
|||
; Sector blocking and de-blocking routines. Drive numbers used in these |
|||
; routines are logical drives. |
|||
|
|||
READ: |
|||
IF BANKED |
|||
CALL BIOSTK |
|||
CALL GOSYSB |
|||
JP JBREAD |
|||
|
|||
COMMON /BANK2/ |
|||
ENDIF |
|||
|
|||
BREAD: LD A,1 ; Non-zero |
|||
LD (READOP),A ; Read operation |
|||
INC A ; Treat as un-allocated (=wrual) |
|||
LD (WRTYPE),A ; Save it |
|||
JR ALLOC ; Go to common code |
|||
|
|||
|
|||
CSEG |
|||
WRITE: |
|||
IF BANKED |
|||
CALL BIOSTK |
|||
CALL GOSYSB |
|||
JP JBWRT |
|||
|
|||
COMMON /BANK2/ |
|||
ENDIF |
|||
|
|||
BWRT: XOR A |
|||
LD (READOP),A ; Write operation |
|||
LD A,C ; Get write type from dos |
|||
LD (WRTYPE),A ; Save it |
|||
CP WRUAL ; Unallocated write? |
|||
JR NZ,CHKUNA ; ..jump if Not. check for unallocated sector |
|||
|
|||
; Write to un-allocated sector, set parameters |
|||
|
|||
LD A,(UCOUNT) ; Records/allocation group |
|||
LD (UNACNT),A ; Unallocated count |
|||
LD HL,SEKDSK ; Selcted disk, track & sector for us |
|||
LD DE,UNADSK ; (unadsk=sekdsk) |
|||
LD BC,4 ; (unatrk=sektrk) |
|||
LDIR ; (unasec=cpmsec) |
|||
|
|||
CHKUNA: LD A,(UNACNT) ; Any unallocated records remaining? |
|||
OR A |
|||
JR Z,ALLOC ; ..jump if none remain |
|||
|
|||
; More unallocated records remain. Check for any change. |
|||
|
|||
DEC A ; Decrement unallocated count |
|||
LD (UNACNT),A ; And save it |
|||
LD B,4 ; Compare four bytes |
|||
LD HL,UNADSK ; Compare Old Disk, Track & Sector |
|||
LD DE,SEKDSK ; .to New Disk, Track & Sector |
|||
SLP0: LD A,(DE) |
|||
CP (HL) ; Same? |
|||
JR NZ,ALLOC ; ..jump if not |
|||
INC HL ; Else advance to next |
|||
INC DE |
|||
DJNZ SLP0 ; ..and loop til done |
|||
|
|||
; Everything matches, anticipate the next sector |
|||
|
|||
INC (HL) ; Unasec+1 |
|||
LD A,(CPMSPT) ; Max sectors per track |
|||
CP (HL) ; Compare them |
|||
JR NZ,NOOVF ; ..jump if not ready for new track yet |
|||
|
|||
; Overflow to next track |
|||
|
|||
LD (HL),0 ; Unasec = 0 |
|||
LD HL,(UNATRK) |
|||
INC HL |
|||
LD (UNATRK),HL ; Unatrk+1 |
|||
|
|||
; Match found. Pre-read not necessary. |
|||
|
|||
NOOVF: XOR A ; Indicate no pre-read required |
|||
JR ALLOC1 ; ..and jump to common code |
|||
|
|||
; Not an unallocated record. Requires pre-read |
|||
|
|||
ALLOC: XOR A ; Clear acc |
|||
LD (UNACNT),A ; Start over |
|||
INC A |
|||
ALLOC1: LD (RSFLAG),A ; Force pre-read if a=1 |
|||
|
|||
; Read/Write common code |
|||
|
|||
XOR A ; Clear acc |
|||
LD (ERFLAG),A ; Start with no errors |
|||
LD A,(SEKSEC) ; Get logical sector number |
|||
CALL PHYSEC ; Get physical sector |
|||
LD (SEKHST),A ; Physical sector (rel 0) |
|||
|
|||
; Check host active |
|||
|
|||
LD HL,HSTACT ; Host active flag |
|||
LD A,(HL) ; Get it |
|||
LD (HL),1 ; Set it in any case |
|||
OR A ; Set flags |
|||
JR Z,FILHST ; Flush Host Buffer if needed, then Read |
|||
|
|||
; Host buffer is active. Same as seek buffer? |
|||
|
|||
LD B,3 ; Loop compare of Disk and Track |
|||
LD HL,HSTDSK ; Compare Old Logical Disk & Trk |
|||
LD DE,SEKDSK ; .to New Logical Disk & Trk |
|||
SLP1: LD A,(DE) |
|||
CP (HL) ; Same? |
|||
JR NZ,FILHST ; ..jump if not same |
|||
INC HL ; Else advance to next |
|||
INC DE |
|||
DJNZ SLP1 ; ..loop til done |
|||
|
|||
; Same track. Same host sector? |
|||
|
|||
LD A,(SEKHST) ; New physical sector |
|||
CP (HL) |
|||
JR Z,MATCH ; The same |
|||
|
|||
; Not a match. |
|||
|
|||
FILHST: CALL FLUSH ; Empty hstbuf if write pending |
|||
|
|||
; Fill the host buffer if necessary. |
|||
|
|||
LD HL,SEKDSK ; Hstdsk=sekdsk |
|||
LD DE,HSTDSK ; Hsttrk=sektrk |
|||
LD BC,3 |
|||
LDIR ; Move it |
|||
LD A,(SEKHST) ; Move the Sector too |
|||
LD (DE),A |
|||
INC DE |
|||
INC HL |
|||
INC HL ; Skip over logical sector |
|||
LD C,4 ; B=0 from above |
|||
LDIR ; Set Host DPH and DPB, physical sector |
|||
|
|||
LD A,(RSFLAG) ; Pre-read necessary? |
|||
OR A |
|||
CALL NZ,READHST ; Read a sector if so. |
|||
XOR A ; Clear acc |
|||
LD (HSTWRT),A ; Clear write pending flag |
|||
|
|||
; We have a match. |
|||
|
|||
MATCH: LD A,(SECMSK) ; Get the sector mask |
|||
LD B,A ; Save it |
|||
LD A,(SEKSEC) ; Get new sector |
|||
AND B ; Mask off the high bits |
|||
RRA |
|||
LD H,A ; *128 MSB |
|||
LD L,0 |
|||
RR L ; And LSB |
|||
|
|||
; HL now has relative host buffer address of seksec |
|||
|
|||
IF BANKED |
|||
IF INROM |
|||
LD A,(TPABNK) ; If bank in ROM, HSTBUF is in TPA |
|||
LD C,A |
|||
ELSE |
|||
LD A,(SYSBNK) ; If bank in RAM, HSTBUF is in System Bank |
|||
LD C,A |
|||
ENDIF |
|||
LD A,(DMABNK) ; Set Read Destination Bank |
|||
LD B,A |
|||
LD A,(READOP) ; Direction? |
|||
OR A |
|||
JR NZ,OKBNKS ; ..jump if read |
|||
LD A,B ; Else reverse banks |
|||
LD B,C |
|||
LD C,A |
|||
OKBNKS: CALL XMOVE ; Set source & destination banks |
|||
ENDIF |
|||
LD DE,HSTBUF ; Host buffer address |
|||
ADD HL,DE ; Point to the sector |
|||
LD DE,(DMAADR) ; User's buffer |
|||
LD BC,128 ; Number of bytes to transfer |
|||
LD A,(READOP) ; Direction? |
|||
OR A ; Set flags |
|||
JR NZ,RWMOVE ; ..jump if Read |
|||
|
|||
; Must be Write. Mark and change direction. |
|||
|
|||
INC A ; A = 1 |
|||
LD (HSTWRT),A ; Set write pending flag |
|||
EX DE,HL ; Swap source and destination |
|||
|
|||
; Move the data |
|||
|
|||
RWMOVE: CALL MOVE ; Handle possible inter-bank move |
|||
|
|||
; Data has been moved |
|||
|
|||
LD A,(WRTYPE) |
|||
DEC A ; Directory write? set zero flag |
|||
LD A,(ERFLAG) ; In case of error |
|||
RET NZ ; ..go home if not a directory write |
|||
|
|||
; This was a Directory Write. Write it now! |
|||
|
|||
OR A ; Check error flag |
|||
RET NZ ; ..exit here if any error |
|||
LD (HSTWRT),A ; Clear write pending flag |
|||
CALL WRITEHST ; Write to disk |
|||
LD A,(ERFLAG) ; .Load resulting status |
|||
RET ; ..return it to caller |
|||
|
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
; Blocking/De-blocking variables |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
|
|||
DSEG ; These variables must ALWAYS be visable, so put here |
|||
;..... |
|||
; Parameters relating to what we need in the Buffer Next |
|||
|
|||
SEKSEC: DEFS 2 ; New skewed logical sector to seek |
|||
|
|||
; --- The Following Variables MUST be kept in this order --- |
|||
SEKDSK: DEFS 1 ; New disk |
|||
SEKTRK: DEFS 2 ; New track |
|||
CPMSEC: DEFS 2 ; New logical sector |
|||
SEKDPB: DEFS 2 ; DPB for host |
|||
SEKDPH: DEFS 2 ; DPH for host |
|||
SEKHST: DEFS 1 ; New host physical sector to seek |
|||
;----------------------------------------------------------- |
|||
; Parameters relating to what's in the Buffer Now |
|||
|
|||
; --- The Following Variables MUST be kept in this order --- |
|||
HSTDSK: DEFS 1 ; Current disk |
|||
HSTTRK: DEFS 2 ; Current track |
|||
HSTSEC: DEFS 1 ; Current physical sector |
|||
HSTDPB: DEFS 2 ; DPB for host |
|||
HSTDPH: DEFS 2 ; DPH for host |
|||
|
|||
HSTACT: DEFS 1 ; Host buffer active flag |
|||
HSTWRT: DEFS 1 ; Host buffer write pending flag |
|||
;----------------------------------------------------------- |
|||
|
|||
UCOUNT: DEFS 1 ; Number of logical records per alloc block |
|||
CPMSPT: DEFS 2 ; Logical sectors per track (byte) |
|||
SECSHF: DEFS 1 ; Sector shift factor |
|||
SECMSK: DEFS 1 ; Sector mask |
|||
DMAADR: DEFS 2 ; User's DMA buffer |
|||
|
|||
IF BANKED AND NOT INROM |
|||
COMMON /B2RAM/ ; These values only used internally, bank them! |
|||
ENDIF |
|||
|
|||
RSFLAG: DEFS 1 ; Read sector flag 0=skip, 1=read |
|||
READOP: DEFS 1 ; Read operation flag 1=read, 0=write |
|||
WRTYPE: DEFS 1 ; Write type 0=allocated, 1=dir, 2=unallocated |
|||
|
|||
;..... |
|||
; Parameters to track Pre-Read Requirements |
|||
|
|||
; --- The Following Variables MUST be kept in this order --- |
|||
UNADSK: DEFS 1 ; Current disk |
|||
UNATRK: DEFS 2 ; Current track |
|||
UNASEC: DEFS 1 ; Current record |
|||
;----------------------------------------------------------- |
|||
|
|||
UNACNT: DEFS 1 ; Unallocated record count |
|||
|
|||
;========================= End of DEBLOCK ================================= |
|||
|
|||
@ -1,367 +0,0 @@ |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::********************** |
|||
; B/P BIOS Configuration and Equate File. ** System Dependant ** |
|||
; - D-X Designs Pty Ltd P112 CPU Board - ********************** |
|||
; Tailor your system here. |
|||
; |
|||
; 30 Aug 01 - Cleaned up for GPL release. HFB |
|||
; 11 May 97 - Added GIDE and adjusted HD equates. HFB |
|||
; 5 Jan 97 - Reformatted to Standard. HFB |
|||
; 10 Jun 96 - Initial Test Release. HFB |
|||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
; BIOS Configuration Equates and Macros |
|||
|
|||
DATE MACRO |
|||
DEFB '30 Aug 01' ; Date of this version |
|||
ENDM |
|||
|
|||
;--- Basic System and Z-System Section --- |
|||
|
|||
MOVCPM EQU no ; Integrate into MOVCPM "type" loader? |
|||
IF MOVCPM |
|||
VERS EQU 13H ; Version number in BCD (Hex) (Major/Minor) |
|||
ELSE |
|||
VERS EQU 21H ; Version number w/Device Swapping permitted |
|||
ENDIF |
|||
BANKED EQU NO ; Is this a banked BIOS? |
|||
ZSDOS2 EQU yes ; Yes = Banked Dos, No = CP/M 2.2 Compatible |
|||
INROM EQU NO ; Alternate bank in ROM? |
|||
MHZ EQU 18 ; Set to Speed in MHZ (6/9/12/16/18/24) |
|||
FASTWB EQU yes ; Yes if restoring CPR from banked RAM |
|||
; ..No if restoring from Drive A |
|||
Z3 EQU YES ; Include ZCPR init code? |
|||
HAVIOP EQU yes ; Include IOP code into Jump table? |
|||
|
|||
;--- Memory configuration Section --- (Expansion Memory configured here) |
|||
|
|||
IBMOVS EQU YES ; Yes = Inter-bank Moves allowed (Z180/64180) |
|||
; No = Include Common RAM transfer buffer |
|||
|
|||
;--- Character Device Section --- |
|||
|
|||
MORDEV EQU yes ; YES = Include any extra Char Device Drivers |
|||
; NO = Only use the 4 defined Char Devices |
|||
ESCC_B EQU true ; Include ESCC Channel B Driver? |
|||
; The following two devices result in non-standard data rates |
|||
; with the standard 16.00 MHz crystal in the P112. If a more |
|||
; "standard" crystal is used (12.288, 18.432, 24.576 MHz etc) |
|||
; is used, the ports become usable. |
|||
; Driver code for ASCI0 and ASCI1 includes an option for |
|||
; assembling Polled or Interrupt-driven buffered input. |
|||
; Select the desired option for ASCI0 with the BUFFA0 flag, |
|||
; and BUFFA1 for ASCI1. |
|||
ASCI_0 EQU true ; Include ASCI0 Driver? |
|||
BUFFA0 EQU false ; Use buffered ASCI0 Input Driver? |
|||
ASCI_1 EQU true ; Include ASCI1 Driver? |
|||
BUFFA1 EQU true ; Use buffered ASCI1 Input Driver? |
|||
|
|||
QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) |
|||
; ..must be 2^n with n<8 |
|||
RTSCTS EQU yes ; Include RTS/CTS code on Serial Outputs? |
|||
XONOFF EQU no ; Include Xon/Xoff handshaking in Serial lines? |
|||
|
|||
;--- Clock and Time Section --- |
|||
|
|||
CLOCK EQU YES ; Include ZSDOS Clock Driver Code? |
|||
DS1202 EQU yes ; Use Dallas DS-1202 instead of Interrupt RTC? |
|||
CLKSET EQU no ; Allow DS-1202 Clock Sets? (Error if No) |
|||
TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) |
|||
|
|||
;--- Floppy Diskette Section --- |
|||
|
|||
BIOERM EQU yes ; Print BIOS error messages? |
|||
CALCSK EQU YES ; Calculate skew table? |
|||
AUTOSL EQU YES ; Auto select floppy formats? |
|||
; If AUTOSL=True, the next two are active... |
|||
FDDMA EQU no ; Use DMA Control for Floppy Drive Transfers? |
|||
FLOPYH EQU yes ; Include "Hi-Density" Floppy Formats? |
|||
FLOPY8 EQU no ; Include 8" Floppy Formats? |
|||
MORDPB EQU NO ; Include additional Floppy DPB Formats? |
|||
|
|||
;--- RAM Disk Section --- |
|||
|
|||
RAMDSK EQU yes ; YES = Make RAM-Disk Code, NO = No code made |
|||
|
|||
;--- Hard Disk Section --- |
|||
|
|||
HARDDSK EQU YES ; YES = Add Hard-disk Code, NO = Floppy Only |
|||
IDE EQU no ; YES = Use IDE Driver, NO = Use SCSI |
|||
HDDMA EQU yes ; Use DMA-Controlled Hard Disk Data Transfers? |
|||
; (DMA not implemented for GIDE) |
|||
UNIT_0 EQU YES ; Hard Disk Physical Unit 1 |
|||
UNIT_1 EQU yes ; Hard Disk Physical Unit 2 |
|||
UNIT_2 EQU NO ; Hard Disk Physical Unit 3 |
|||
|
|||
;--- Logical Drive Section --- |
|||
|
|||
DRV_A EQU yes ; Set each of these equates for the drive and |
|||
DRV_B EQU yes ; partition complement of your system. Assume |
|||
DRV_C EQU no ; that A-D are Floppies. |
|||
DRV_D EQU yes |
|||
DRV_E EQU yes ; Assume that E-L and N-P are Hard Disk |
|||
DRV_F EQU yes ; Partitions |
|||
DRV_G EQU yes |
|||
DRV_H EQU yes |
|||
DRV_I EQU no |
|||
DRV_J EQU no |
|||
DRV_K EQU no |
|||
DRV_L EQU no |
|||
IF RAMDSK |
|||
DRV_M EQU yes ; This is Yes for RAM drive |
|||
ELSE |
|||
DRV_M EQU no ; This is for drive if No RAM Drive present |
|||
ENDIF |
|||
DRV_N EQU yes |
|||
DRV_O EQU yes |
|||
DRV_P EQU yes |
|||
|
|||
;========== Configuration Unique Equates (P112) =========== |
|||
;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
|||
;>>> Do NOT Alter these unless you KNOW what you're doing <<< |
|||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
|||
|
|||
REFRSH EQU NO ; Set to NO for only Static RAM, needed for |
|||
; systems with dynamic RAMs. |
|||
NOWAIT EQU no ; Set to NO to use configured Wait States in |
|||
; Hard Disk Driver. Yes to eliminate Waits. |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; For Z-180/HD64180 systems, The Bank numbers should reflect Physical |
|||
; memory in 32k increments. In P112, the ROM occupies the first 32k |
|||
; increment and is ambiguously addressed occupying 0-1FFFFH. The upper |
|||
; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. |
|||
|
|||
BNK0 EQU 08H ; First TPA Bank (switched in/out) 40000H |
|||
BNK1 EQU 09H ; Second TPA Bank (Common Bank) 48000H |
|||
BNK2 EQU 0AH ; System Bank (BIOS, DOS, CPR) 50000H |
|||
BNKU EQU 0BH ; User Area Bank 58000H |
|||
; (set to 0 to disable) |
|||
BNK3 EQU 0CH ; First Bank for RAM disk 60000H |
|||
BNKM EQU 1FH ; Maximum Bank # F8000H |
|||
; With both on-board RAMs only (MEM1 or MEM2), |
|||
; the maximum Bank number is 11 (0BH). |
|||
|
|||
;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== |
|||
|
|||
CNTLA0 EQU 00H ; Control Port ASCI 0 |
|||
CNTLA1 EQU 01H ; Control Port ASCI 1 |
|||
STAT0 EQU 04H ; Serial port 0 Status |
|||
STAT1 EQU 05H ; Serial port 1 Status |
|||
TDR0 EQU 06H ; Serial port 0 Output Data |
|||
TDR1 EQU 07H ; Serial port 1 Output Data |
|||
RDR0 EQU 08H ; Serial port 0 Input Data |
|||
RDR1 EQU 09H ; Serial Port 1 Input Data |
|||
CNTR EQU 0AH ; HD64180 Counter port |
|||
TMDR0L EQU 0CH ; HD64180 DMA channel reg (low) |
|||
TMDR0H EQU 0DH ; HD64180 DMA channel reg (hi) |
|||
RLDR0L EQU 0EH ; CTC0 Reload Count, Low |
|||
RLDR0H EQU 0FH ; CTC0 Reload Count, High |
|||
TCR EQU 10H ; Interrupt Control Register |
|||
TMDR1L EQU 14H ; Timer Data Reg Ch1 (Low) |
|||
TMDR1H EQU 15H ; Timer Data Reg Ch1 (High) |
|||
RLDR1L EQU 16H ; Timer Reload Reg Ch1 (Low) |
|||
RLDR1H EQU 17H ; Timer Reload Reg Ch1 (High) |
|||
FRC EQU 18H ; Free-Running Counter |
|||
CCR EQU 1FH ; CPU Control Register (ZS8180/Z80182) |
|||
SAR0L EQU 20H ; DMA Channel 0 Register start (8 ports) |
|||
MAR1L EQU 28H ; DMA Channel 1 Register start (8 ports) |
|||
DSTAT EQU 30H ; DMA Status/Control port |
|||
DMODE EQU 31H ; DMA Mode Control port |
|||
DCNTL EQU 32H ; DMA/WAIT Control Register |
|||
IL EQU 33H ; Interrupt Segment Register |
|||
ITC EQU 34H ; Interrupt/Trap Control Register |
|||
RCR EQU 36H ; HD64180 Refresh Control register |
|||
CBR EQU 38H ; MMU Common Base Register |
|||
BBR EQU 39H ; MMU Bank Base Register |
|||
CBAR EQU 3AH ; MMU Common/Bank Area Register |
|||
OMCR EQU 3EH ; Operation Mode Control Reg |
|||
ICR EQU 3FH ; I/O Control Register |
|||
|
|||
; Some bit definitions used with the Z-180 on-chip peripherals: |
|||
|
|||
TDRE EQU 02H ; ACSI Transmitter Buffer Empty |
|||
RDRF EQU 80H ; ACSI Received Character available |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; Extended Features of Z80182 for P112 |
|||
|
|||
WSGCS EQU 0D8H ; Wait-State Generator CS |
|||
ENH182 EQU 0D9H ; Z80182 Enhancements Register |
|||
PINMUX EQU 0DFH ; Interrupt Edge/Pin Mux Register |
|||
RAMUBR EQU 0E6H ; RAM End Boundary |
|||
RAMLBR EQU 0E7H ; RAM Start Boundary |
|||
ROMBR EQU 0E8H ; ROM Boundary |
|||
FIFOCTL EQU 0E9H ; FIFO Control Register |
|||
RTOTC EQU 0EAH ; RX Time-Out Time Constant |
|||
TTOTC EQU 0EBH ; TX Time-Out Time Constant |
|||
FCR EQU 0ECH ; FIFO Register |
|||
SCR EQU 0EFH ; System Pin Control |
|||
RBR EQU 0F0H ; MIMIC RX Buffer Register (R) |
|||
THR EQU 0F0H ; MIMIN TX Holding Register (W) |
|||
IER EQU 0F1H ; Interrupt Enable Register |
|||
LCR EQU 0F3H ; Line Control Register |
|||
MCR EQU 0F4H ; Modem Control Register |
|||
LSR EQU 0F5H ; Line Status Register |
|||
MDMSR EQU 0F6H ; Modem Status Register |
|||
MSCR EQU 0F7H ; MIMIC Scratch Register |
|||
DLATL EQU 0F8H ; Divisor Latch (Low) |
|||
DLATM EQU 0F9H ; Divisor Latch (High) |
|||
TTCR EQU 0FAH ; TX Time Constant |
|||
RTCR EQU 0FBH ; RX Time Constant |
|||
IVEC EQU 0FCH ; MIMIC Interrupt Vector |
|||
MIMIE EQU 0FDH ; MIMIC Interrupt Enable Register |
|||
IUSIP EQU 0FEH ; MIMIC Interrupt Under-Service Register |
|||
MMCR EQU 0FFH ; MIMIC Master Control Register |
|||
|
|||
; Z80182 PIO Registers |
|||
|
|||
DDRA EQU 0EDH ; Data Direction Register A |
|||
DRA EQU 0EEH ; Port A Data |
|||
DDRB EQU 0E4H ; Data Direction Register B |
|||
DRB EQU 0E5H ; Data B Data |
|||
DDRC EQU 0DDH ; Data Direction Register C |
|||
DRC EQU 0DEH ; Data C Data |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; ESCC Registers on Z80182 |
|||
|
|||
SCCACNT EQU 0E0H ; ESCC Control Channel A |
|||
SCCAD EQU 0E1H ; ESCC Data Channel A |
|||
SCCBCNT EQU 0E2H ; ESCC Control Channel B |
|||
SCCBD EQU 0E3H ; ESCC Data Channel B |
|||
|
|||
; [E]SCC Internal Register Definitions |
|||
|
|||
RR0 EQU 00H |
|||
RR1 EQU 01H |
|||
RR2 EQU 02H |
|||
RR3 EQU 03H |
|||
RR6 EQU 06H |
|||
RR7 EQU 07H |
|||
RR10 EQU 0AH |
|||
RR12 EQU 0CH |
|||
RR13 EQU 0DH |
|||
RR15 EQU 0FH |
|||
|
|||
WR0 EQU 00H |
|||
WR1 EQU 01H |
|||
WR2 EQU 02H |
|||
WR3 EQU 03H |
|||
WR4 EQU 04H |
|||
WR5 EQU 05H |
|||
WR6 EQU 06H |
|||
WR7 EQU 07H |
|||
WR9 EQU 09H |
|||
WR10 EQU 0AH |
|||
WR11 EQU 0BH |
|||
WR12 EQU 0CH |
|||
WR13 EQU 0DH |
|||
WR14 EQU 0EH |
|||
WR15 EQU 0FH |
|||
|
|||
; FDC37C665/6 Parallel Port in Standard AT Mode |
|||
|
|||
DPORT EQU 8CH ; Data Port |
|||
SPORT EQU 8DH ; Status Port |
|||
CPORT EQU 8EH ; Control Port |
|||
|
|||
; FDC37C665/6 Configuration Control (access internal registers) |
|||
|
|||
CFCNTL EQU 90H ; Configuration control port |
|||
CFDATA EQU 91H ; Configuration data port |
|||
|
|||
; FDC37C665/6 Floppy Controller on P112 (Intel 80277 compatible) |
|||
|
|||
DCR EQU 92H ; Drive Control Register (Digital Output) |
|||
MSR EQU 94H ; Main Status Register |
|||
DR EQU 95H ; Data/Command Register |
|||
DRR EQU 97H ; Data Rate Register/Disk Changed Bit in B7 |
|||
|
|||
_DMA EQU 0A0H ; Diskette DMA Address |
|||
|
|||
; FDC37C665/6 Serial Port (National 16550 compatible) |
|||
|
|||
_RBR EQU 98H ;R Receiver Buffer |
|||
_THR EQU 98H ;W Transmit Holding Reg |
|||
_IER EQU 99H ;RW Interrupt-Enable Reg |
|||
_IIR EQU 9AH ;R Interrupt Ident. Reg |
|||
_FCR EQU 9AH ;W FIFO Control Reg |
|||
_LCR EQU 9BH ;RW Line Control Reg |
|||
_MCR EQU 9CH ;RW Modem Control Reg |
|||
_LSR EQU 9DH ;RW Line Status Reg |
|||
_MMSR EQU 9EH ;RW Modem Status Reg |
|||
_SCR EQU 9FH ;N/A Scratch Reg. (not avail in XT) |
|||
_DDL EQU 98H ;RW Divisor LSB | wih DLAB |
|||
_DLM EQU 99H ;RW Divisor MSB | set High |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; Equates for the National DP8490/NCR 5380 Prototype SCSI controller |
|||
|
|||
IF HARDDSK |
|||
NCR EQU 40H ; Base of NCR 5380 |
|||
|
|||
; 5380 Chip Registers |
|||
|
|||
NCRDAT EQU NCR ; Current SCSI Data (Read) |
|||
; Output Data Register (Write) |
|||
NCRCMD EQU NCR+1 ; Initiator Command Register (Read/Write) |
|||
NCRMOD EQU NCR+2 ; Mode Register (Read/Write) |
|||
NCRTGT EQU NCR+3 ; Target Command Register (Read/Write) |
|||
NCRBUS EQU NCR+4 ; Current SCSI Bus Status (Read) |
|||
NCRST EQU NCR+5 ; Bus & Status Register (Read) |
|||
; Start DMA Send (Write) |
|||
NCRINT EQU NCR+7 ; Reset Parity/Interrupt (Read) |
|||
; Start DMA Initiator Receive (Write) |
|||
DMAACK EQU NCR+8 ; SCSI Dack IO Port (Read/Write) |
|||
|
|||
; Bit Assignments for NCR 5380 Ports as indicated |
|||
|
|||
B_ARST EQU 10000000B ; Assert *RST (NCRCMD) |
|||
B_AACK EQU 00010000B ; Assert *ACK (NCRCMD) |
|||
B_ASEL EQU 00000100B ; Assert *SEL (NCRCMD) |
|||
B_ABUS EQU 00000001B ; Assert *Data Bus (NCRCMD) |
|||
|
|||
B_BSY EQU 01000000B ; *Busy (NCRBUS) |
|||
B_REQ EQU 00100000B ; *Request (NCRBUS) |
|||
B_MSG EQU 00010000B ; *Message (NCRBUS) |
|||
B_CD EQU 00001000B ; *Command/Data (NCRBUS) |
|||
B_IO EQU 00000100B ; *I/O (NCRBUS) |
|||
B_SEL EQU 00000010B ; *Select (NCRBUS) |
|||
|
|||
B_PHAS EQU 00001000B ; Phase Match (NCRST) |
|||
B_BBSY EQU 00000100B ; Bus Busy (NCRST) |
|||
|
|||
B_MBSY EQU 00000100B ; Monitor Busy Flag (NCRMOD) |
|||
B_DMA EQU 00000010B ; DMA Mode of transfer (NCRMOD) |
|||
ENDIF ;harddsk |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; Equates reflecting GIDE Base address from Address Jumpers (if GIDE added) |
|||
; Set the base GIDE equate to the jumper setting on the GIDE board. |
|||
|
|||
IF IDE |
|||
GIDE EQU 50H ; Set base of 16 byte address range |
|||
|
|||
IDEDOR EQU GIDE+6 ; Digital Output Register |
|||
IDEDat EQU GIDE+8 ; IDE Data Register (16-bit wide) |
|||
IDEErr EQU GIDE+9 ; IDE Error Register |
|||
IDESCnt EQU GIDE+0AH ; IDE Sector Count Register |
|||
IDESNum EQU GIDE+0BH ; IDE Sector Number Register |
|||
IDECLo EQU GIDE+0CH ; IDE Cylinder Number (Low) |
|||
IDECHi EQU GIDE+0DH ; IDE Cylinter Number (High) |
|||
IDESDH EQU GIDE+0EH ; IDE S-Drive-Head Register |
|||
IDECmd EQU GIDE+0FH ; IDE Command/Status Register |
|||
|
|||
CMDHOM EQU 10H ; Home Drive Heads |
|||
CMDRD EQU 20H ; Read Sector Command (w/retry) |
|||
CMDWR EQU 30H ; Write Sector Command (w/retry) |
|||
CMDVER EQU 40H ; Verify Sector(s) Command (w/retry) |
|||
CMDFMT EQU 50H ; Format Track Command |
|||
CMDDIAG EQU 90H ; Execute Diagnostics Command |
|||
CMDINIT EQU 91H ; Initialize Drive Params Command |
|||
CMDPW0 EQU 0E0H ; Low Range of Power Control Commands |
|||
CMDPW3 EQU 0E3H ; High Range of Power Control Commands |
|||
CMDPWQ EQU 0E5H ; Power Status Query Command |
|||
CMDID EQU 0ECH ; Read Drive Ident Data Command |
|||
ENDIF ;ide |
|||
;=================== End Unique Equates ======================= |
|||
|
|||
@ -1,367 +0,0 @@ |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::********************** |
|||
; B/P BIOS Configuration and Equate File. ** System Dependant ** |
|||
; - D-X Designs Pty Ltd P112 CPU Board - ********************** |
|||
; Tailor your system here. |
|||
; |
|||
; 30 Aug 01 - Cleaned up for GPL release. HFB |
|||
; 11 May 97 - Added GIDE and adjusted HD equates. HFB |
|||
; 5 Jan 97 - Reformatted to Standard. HFB |
|||
; 10 Jun 96 - Initial Test Release. HFB |
|||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
; BIOS Configuration Equates and Macros |
|||
|
|||
DATE MACRO |
|||
DEFB '30 Aug 01' ; Date of this version |
|||
ENDM |
|||
|
|||
;--- Basic System and Z-System Section --- |
|||
|
|||
MOVCPM EQU no ; Integrate into MOVCPM "type" loader? |
|||
IF MOVCPM |
|||
VERS EQU 13H ; Version number in BCD (Hex) (Major/Minor) |
|||
ELSE |
|||
VERS EQU 21H ; Version number w/Device Swapping permitted |
|||
ENDIF |
|||
BANKED EQU yes ; Is this a banked BIOS? |
|||
ZSDOS2 EQU yes ; Yes = Banked Dos, No = CP/M 2.2 Compatible |
|||
INROM EQU NO ; Alternate bank in ROM? |
|||
MHZ EQU 18 ; Set to Speed in MHZ (6/9/12/16/18/24) |
|||
FASTWB EQU yes ; Yes if restoring CPR from banked RAM |
|||
; ..No if restoring from Drive A |
|||
Z3 EQU YES ; Include ZCPR init code? |
|||
HAVIOP EQU yes ; Include IOP code into Jump table? |
|||
|
|||
;--- Memory configuration Section --- (Expansion Memory configured here) |
|||
|
|||
IBMOVS EQU YES ; Yes = Inter-bank Moves allowed (Z180/64180) |
|||
; No = Include Common RAM transfer buffer |
|||
|
|||
;--- Character Device Section --- |
|||
|
|||
MORDEV EQU yes ; YES = Include any extra Char Device Drivers |
|||
; NO = Only use the 4 defined Char Devices |
|||
ESCC_B EQU true ; Include ESCC Channel B Driver? |
|||
; The following two devices result in non-standard data rates |
|||
; with the standard 16.00 MHz crystal in the P112. If a more |
|||
; "standard" crystal is used (12.288, 18.432, 24.576 MHz etc) |
|||
; is used, the ports become usable. |
|||
; Driver code for ASCI0 and ASCI1 includes an option for |
|||
; assembling Polled or Interrupt-driven buffered input. |
|||
; Select the desired option for ASCI0 with the BUFFA0 flag, |
|||
; and BUFFA1 for ASCI1. |
|||
ASCI_0 EQU true ; Include ASCI0 Driver? |
|||
BUFFA0 EQU false ; Use buffered ASCI0 Input Driver? |
|||
ASCI_1 EQU true ; Include ASCI1 Driver? |
|||
BUFFA1 EQU true ; Use buffered ASCI1 Input Driver? |
|||
|
|||
QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) |
|||
; ..must be 2^n with n<8 |
|||
RTSCTS EQU yes ; Include RTS/CTS code on Serial Outputs? |
|||
XONOFF EQU no ; Include Xon/Xoff handshaking in Serial lines? |
|||
|
|||
;--- Clock and Time Section --- |
|||
|
|||
CLOCK EQU YES ; Include ZSDOS Clock Driver Code? |
|||
DS1202 EQU yes ; Use Dallas DS-1202 instead of Interrupt RTC? |
|||
CLKSET EQU no ; Allow DS-1202 Clock Sets? (Error if No) |
|||
TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) |
|||
|
|||
;--- Floppy Diskette Section --- |
|||
|
|||
BIOERM EQU yes ; Print BIOS error messages? |
|||
CALCSK EQU YES ; Calculate skew table? |
|||
AUTOSL EQU YES ; Auto select floppy formats? |
|||
; If AUTOSL=True, the next two are active... |
|||
FDDMA EQU no ; Use DMA Control for Floppy Drive Transfers? |
|||
FLOPYH EQU yes ; Include "Hi-Density" Floppy Formats? |
|||
FLOPY8 EQU no ; Include 8" Floppy Formats? |
|||
MORDPB EQU NO ; Include additional Floppy DPB Formats? |
|||
|
|||
;--- RAM Disk Section --- |
|||
|
|||
RAMDSK EQU yes ; YES = Make RAM-Disk Code, NO = No code made |
|||
|
|||
;--- Hard Disk Section --- |
|||
|
|||
HARDDSK EQU YES ; YES = Add Hard-disk Code, NO = Floppy Only |
|||
IDE EQU no ; YES = Use IDE Driver, NO = Use SCSI |
|||
HDDMA EQU yes ; Use DMA-Controlled Hard Disk Data Transfers? |
|||
; (DMA not implemented for GIDE) |
|||
UNIT_0 EQU YES ; Hard Disk Physical Unit 1 |
|||
UNIT_1 EQU yes ; Hard Disk Physical Unit 2 |
|||
UNIT_2 EQU NO ; Hard Disk Physical Unit 3 |
|||
|
|||
;--- Logical Drive Section --- |
|||
|
|||
DRV_A EQU yes ; Set each of these equates for the drive and |
|||
DRV_B EQU yes ; partition complement of your system. Assume |
|||
DRV_C EQU no ; that A-D are Floppies. |
|||
DRV_D EQU yes |
|||
DRV_E EQU yes ; Assume that E-L and N-P are Hard Disk |
|||
DRV_F EQU yes ; Partitions |
|||
DRV_G EQU yes |
|||
DRV_H EQU yes |
|||
DRV_I EQU no |
|||
DRV_J EQU no |
|||
DRV_K EQU no |
|||
DRV_L EQU no |
|||
IF RAMDSK |
|||
DRV_M EQU yes ; This is Yes for RAM drive |
|||
ELSE |
|||
DRV_M EQU no ; This is for drive if No RAM Drive present |
|||
ENDIF |
|||
DRV_N EQU yes |
|||
DRV_O EQU yes |
|||
DRV_P EQU yes |
|||
|
|||
;========== Configuration Unique Equates (P112) =========== |
|||
;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
|||
;>>> Do NOT Alter these unless you KNOW what you're doing <<< |
|||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
|||
|
|||
REFRSH EQU NO ; Set to NO for only Static RAM, needed for |
|||
; systems with dynamic RAMs. |
|||
NOWAIT EQU no ; Set to NO to use configured Wait States in |
|||
; Hard Disk Driver. Yes to eliminate Waits. |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; For Z-180/HD64180 systems, The Bank numbers should reflect Physical |
|||
; memory in 32k increments. In P112, the ROM occupies the first 32k |
|||
; increment and is ambiguously addressed occupying 0-1FFFFH. The upper |
|||
; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. |
|||
|
|||
BNK0 EQU 08H ; First TPA Bank (switched in/out) 40000H |
|||
BNK1 EQU 09H ; Second TPA Bank (Common Bank) 48000H |
|||
BNK2 EQU 0AH ; System Bank (BIOS, DOS, CPR) 50000H |
|||
BNKU EQU 0BH ; User Area Bank 58000H |
|||
; (set to 0 to disable) |
|||
BNK3 EQU 0CH ; First Bank for RAM disk 60000H |
|||
BNKM EQU 1FH ; Maximum Bank # F8000H |
|||
; With both on-board RAMs only (MEM1 or MEM2), |
|||
; the maximum Bank number is 11 (0BH). |
|||
|
|||
;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== |
|||
|
|||
CNTLA0 EQU 00H ; Control Port ASCI 0 |
|||
CNTLA1 EQU 01H ; Control Port ASCI 1 |
|||
STAT0 EQU 04H ; Serial port 0 Status |
|||
STAT1 EQU 05H ; Serial port 1 Status |
|||
TDR0 EQU 06H ; Serial port 0 Output Data |
|||
TDR1 EQU 07H ; Serial port 1 Output Data |
|||
RDR0 EQU 08H ; Serial port 0 Input Data |
|||
RDR1 EQU 09H ; Serial Port 1 Input Data |
|||
CNTR EQU 0AH ; HD64180 Counter port |
|||
TMDR0L EQU 0CH ; HD64180 DMA channel reg (low) |
|||
TMDR0H EQU 0DH ; HD64180 DMA channel reg (hi) |
|||
RLDR0L EQU 0EH ; CTC0 Reload Count, Low |
|||
RLDR0H EQU 0FH ; CTC0 Reload Count, High |
|||
TCR EQU 10H ; Interrupt Control Register |
|||
TMDR1L EQU 14H ; Timer Data Reg Ch1 (Low) |
|||
TMDR1H EQU 15H ; Timer Data Reg Ch1 (High) |
|||
RLDR1L EQU 16H ; Timer Reload Reg Ch1 (Low) |
|||
RLDR1H EQU 17H ; Timer Reload Reg Ch1 (High) |
|||
FRC EQU 18H ; Free-Running Counter |
|||
CCR EQU 1FH ; CPU Control Register (ZS8180/Z80182) |
|||
SAR0L EQU 20H ; DMA Channel 0 Register start (8 ports) |
|||
MAR1L EQU 28H ; DMA Channel 1 Register start (8 ports) |
|||
DSTAT EQU 30H ; DMA Status/Control port |
|||
DMODE EQU 31H ; DMA Mode Control port |
|||
DCNTL EQU 32H ; DMA/WAIT Control Register |
|||
IL EQU 33H ; Interrupt Segment Register |
|||
ITC EQU 34H ; Interrupt/Trap Control Register |
|||
RCR EQU 36H ; HD64180 Refresh Control register |
|||
CBR EQU 38H ; MMU Common Base Register |
|||
BBR EQU 39H ; MMU Bank Base Register |
|||
CBAR EQU 3AH ; MMU Common/Bank Area Register |
|||
OMCR EQU 3EH ; Operation Mode Control Reg |
|||
ICR EQU 3FH ; I/O Control Register |
|||
|
|||
; Some bit definitions used with the Z-180 on-chip peripherals: |
|||
|
|||
TDRE EQU 02H ; ACSI Transmitter Buffer Empty |
|||
RDRF EQU 80H ; ACSI Received Character available |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; Extended Features of Z80182 for P112 |
|||
|
|||
WSGCS EQU 0D8H ; Wait-State Generator CS |
|||
ENH182 EQU 0D9H ; Z80182 Enhancements Register |
|||
PINMUX EQU 0DFH ; Interrupt Edge/Pin Mux Register |
|||
RAMUBR EQU 0E6H ; RAM End Boundary |
|||
RAMLBR EQU 0E7H ; RAM Start Boundary |
|||
ROMBR EQU 0E8H ; ROM Boundary |
|||
FIFOCTL EQU 0E9H ; FIFO Control Register |
|||
RTOTC EQU 0EAH ; RX Time-Out Time Constant |
|||
TTOTC EQU 0EBH ; TX Time-Out Time Constant |
|||
FCR EQU 0ECH ; FIFO Register |
|||
SCR EQU 0EFH ; System Pin Control |
|||
RBR EQU 0F0H ; MIMIC RX Buffer Register (R) |
|||
THR EQU 0F0H ; MIMIN TX Holding Register (W) |
|||
IER EQU 0F1H ; Interrupt Enable Register |
|||
LCR EQU 0F3H ; Line Control Register |
|||
MCR EQU 0F4H ; Modem Control Register |
|||
LSR EQU 0F5H ; Line Status Register |
|||
MDMSR EQU 0F6H ; Modem Status Register |
|||
MSCR EQU 0F7H ; MIMIC Scratch Register |
|||
DLATL EQU 0F8H ; Divisor Latch (Low) |
|||
DLATM EQU 0F9H ; Divisor Latch (High) |
|||
TTCR EQU 0FAH ; TX Time Constant |
|||
RTCR EQU 0FBH ; RX Time Constant |
|||
IVEC EQU 0FCH ; MIMIC Interrupt Vector |
|||
MIMIE EQU 0FDH ; MIMIC Interrupt Enable Register |
|||
IUSIP EQU 0FEH ; MIMIC Interrupt Under-Service Register |
|||
MMCR EQU 0FFH ; MIMIC Master Control Register |
|||
|
|||
; Z80182 PIO Registers |
|||
|
|||
DDRA EQU 0EDH ; Data Direction Register A |
|||
DRA EQU 0EEH ; Port A Data |
|||
DDRB EQU 0E4H ; Data Direction Register B |
|||
DRB EQU 0E5H ; Data B Data |
|||
DDRC EQU 0DDH ; Data Direction Register C |
|||
DRC EQU 0DEH ; Data C Data |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; ESCC Registers on Z80182 |
|||
|
|||
SCCACNT EQU 0E0H ; ESCC Control Channel A |
|||
SCCAD EQU 0E1H ; ESCC Data Channel A |
|||
SCCBCNT EQU 0E2H ; ESCC Control Channel B |
|||
SCCBD EQU 0E3H ; ESCC Data Channel B |
|||
|
|||
; [E]SCC Internal Register Definitions |
|||
|
|||
RR0 EQU 00H |
|||
RR1 EQU 01H |
|||
RR2 EQU 02H |
|||
RR3 EQU 03H |
|||
RR6 EQU 06H |
|||
RR7 EQU 07H |
|||
RR10 EQU 0AH |
|||
RR12 EQU 0CH |
|||
RR13 EQU 0DH |
|||
RR15 EQU 0FH |
|||
|
|||
WR0 EQU 00H |
|||
WR1 EQU 01H |
|||
WR2 EQU 02H |
|||
WR3 EQU 03H |
|||
WR4 EQU 04H |
|||
WR5 EQU 05H |
|||
WR6 EQU 06H |
|||
WR7 EQU 07H |
|||
WR9 EQU 09H |
|||
WR10 EQU 0AH |
|||
WR11 EQU 0BH |
|||
WR12 EQU 0CH |
|||
WR13 EQU 0DH |
|||
WR14 EQU 0EH |
|||
WR15 EQU 0FH |
|||
|
|||
; FDC37C665/6 Parallel Port in Standard AT Mode |
|||
|
|||
DPORT EQU 8CH ; Data Port |
|||
SPORT EQU 8DH ; Status Port |
|||
CPORT EQU 8EH ; Control Port |
|||
|
|||
; FDC37C665/6 Configuration Control (access internal registers) |
|||
|
|||
CFCNTL EQU 90H ; Configuration control port |
|||
CFDATA EQU 91H ; Configuration data port |
|||
|
|||
; FDC37C665/6 Floppy Controller on P112 (Intel 80277 compatible) |
|||
|
|||
DCR EQU 92H ; Drive Control Register (Digital Output) |
|||
MSR EQU 94H ; Main Status Register |
|||
DR EQU 95H ; Data/Command Register |
|||
DRR EQU 97H ; Data Rate Register/Disk Changed Bit in B7 |
|||
|
|||
_DMA EQU 0A0H ; Diskette DMA Address |
|||
|
|||
; FDC37C665/6 Serial Port (National 16550 compatible) |
|||
|
|||
_RBR EQU 98H ;R Receiver Buffer |
|||
_THR EQU 98H ;W Transmit Holding Reg |
|||
_IER EQU 99H ;RW Interrupt-Enable Reg |
|||
_IIR EQU 9AH ;R Interrupt Ident. Reg |
|||
_FCR EQU 9AH ;W FIFO Control Reg |
|||
_LCR EQU 9BH ;RW Line Control Reg |
|||
_MCR EQU 9CH ;RW Modem Control Reg |
|||
_LSR EQU 9DH ;RW Line Status Reg |
|||
_MMSR EQU 9EH ;RW Modem Status Reg |
|||
_SCR EQU 9FH ;N/A Scratch Reg. (not avail in XT) |
|||
_DDL EQU 98H ;RW Divisor LSB | wih DLAB |
|||
_DLM EQU 99H ;RW Divisor MSB | set High |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; Equates for the National DP8490/NCR 5380 Prototype SCSI controller |
|||
|
|||
IF HARDDSK |
|||
NCR EQU 40H ; Base of NCR 5380 |
|||
|
|||
; 5380 Chip Registers |
|||
|
|||
NCRDAT EQU NCR ; Current SCSI Data (Read) |
|||
; Output Data Register (Write) |
|||
NCRCMD EQU NCR+1 ; Initiator Command Register (Read/Write) |
|||
NCRMOD EQU NCR+2 ; Mode Register (Read/Write) |
|||
NCRTGT EQU NCR+3 ; Target Command Register (Read/Write) |
|||
NCRBUS EQU NCR+4 ; Current SCSI Bus Status (Read) |
|||
NCRST EQU NCR+5 ; Bus & Status Register (Read) |
|||
; Start DMA Send (Write) |
|||
NCRINT EQU NCR+7 ; Reset Parity/Interrupt (Read) |
|||
; Start DMA Initiator Receive (Write) |
|||
DMAACK EQU NCR+8 ; SCSI Dack IO Port (Read/Write) |
|||
|
|||
; Bit Assignments for NCR 5380 Ports as indicated |
|||
|
|||
B_ARST EQU 10000000B ; Assert *RST (NCRCMD) |
|||
B_AACK EQU 00010000B ; Assert *ACK (NCRCMD) |
|||
B_ASEL EQU 00000100B ; Assert *SEL (NCRCMD) |
|||
B_ABUS EQU 00000001B ; Assert *Data Bus (NCRCMD) |
|||
|
|||
B_BSY EQU 01000000B ; *Busy (NCRBUS) |
|||
B_REQ EQU 00100000B ; *Request (NCRBUS) |
|||
B_MSG EQU 00010000B ; *Message (NCRBUS) |
|||
B_CD EQU 00001000B ; *Command/Data (NCRBUS) |
|||
B_IO EQU 00000100B ; *I/O (NCRBUS) |
|||
B_SEL EQU 00000010B ; *Select (NCRBUS) |
|||
|
|||
B_PHAS EQU 00001000B ; Phase Match (NCRST) |
|||
B_BBSY EQU 00000100B ; Bus Busy (NCRST) |
|||
|
|||
B_MBSY EQU 00000100B ; Monitor Busy Flag (NCRMOD) |
|||
B_DMA EQU 00000010B ; DMA Mode of transfer (NCRMOD) |
|||
ENDIF ;harddsk |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; Equates reflecting GIDE Base address from Address Jumpers (if GIDE added) |
|||
; Set the base GIDE equate to the jumper setting on the GIDE board. |
|||
|
|||
IF IDE |
|||
GIDE EQU 50H ; Set base of 16 byte address range |
|||
|
|||
IDEDOR EQU GIDE+6 ; Digital Output Register |
|||
IDEDat EQU GIDE+8 ; IDE Data Register (16-bit wide) |
|||
IDEErr EQU GIDE+9 ; IDE Error Register |
|||
IDESCnt EQU GIDE+0AH ; IDE Sector Count Register |
|||
IDESNum EQU GIDE+0BH ; IDE Sector Number Register |
|||
IDECLo EQU GIDE+0CH ; IDE Cylinder Number (Low) |
|||
IDECHi EQU GIDE+0DH ; IDE Cylinter Number (High) |
|||
IDESDH EQU GIDE+0EH ; IDE S-Drive-Head Register |
|||
IDECmd EQU GIDE+0FH ; IDE Command/Status Register |
|||
|
|||
CMDHOM EQU 10H ; Home Drive Heads |
|||
CMDRD EQU 20H ; Read Sector Command (w/retry) |
|||
CMDWR EQU 30H ; Write Sector Command (w/retry) |
|||
CMDVER EQU 40H ; Verify Sector(s) Command (w/retry) |
|||
CMDFMT EQU 50H ; Format Track Command |
|||
CMDDIAG EQU 90H ; Execute Diagnostics Command |
|||
CMDINIT EQU 91H ; Initialize Drive Params Command |
|||
CMDPW0 EQU 0E0H ; Low Range of Power Control Commands |
|||
CMDPW3 EQU 0E3H ; High Range of Power Control Commands |
|||
CMDPWQ EQU 0E5H ; Power Status Query Command |
|||
CMDID EQU 0ECH ; Read Drive Ident Data Command |
|||
ENDIF ;ide |
|||
;=================== End Unique Equates ======================= |
|||
|
|||
@ -1,365 +0,0 @@ |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::********************** |
|||
; B/P BIOS Configuration and Equate File. ** System Dependant ** |
|||
; - D-X Designs Pty Ltd P112 CPU Board - ********************** |
|||
; Tailor your system here. |
|||
; |
|||
; 30 Aug 01 - Adjusted values for GPL release. HFB |
|||
; 11 May 97 - Added GIDE and adjusted HD equates. HFB |
|||
; 5 Jan 97 - Reformatted to Standard. HFB |
|||
; 10 Jun 96 - Initial Test Release. HFB |
|||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
; BIOS Configuration Equates and Macros |
|||
|
|||
DATE MACRO |
|||
DEFB '30-08-01' ; Date of this version |
|||
ENDM |
|||
|
|||
;--- Basic System and Z-System Section --- |
|||
|
|||
MOVCPM EQU yes ; Integrate into MOVCPM "type" loader? |
|||
IF MOVCPM |
|||
VERS EQU 13H ; Version number in BCD (Hex) (Major/Minor) |
|||
ELSE |
|||
VERS EQU 21H ; Version number w/Device Swapping permitted |
|||
ENDIF |
|||
BANKED EQU no ; Is this a banked BIOS? |
|||
ZSDOS2 EQU no ; Yes = Banked Dos, No = CP/M 2.2 Compatible |
|||
INROM EQU NO ; Alternate bank in ROM? |
|||
MHZ EQU 18 ; Set to Speed in MHZ (6/9/12/16/18/24) |
|||
FASTWB EQU no ; Yes if restoring CPR from banked RAM |
|||
; ..No if restoring from Drive A |
|||
Z3 EQU YES ; Include ZCPR init code? |
|||
HAVIOP EQU no ; Include IOP code into Jump table? |
|||
|
|||
;--- Memory configuration Section --- (Expansion Memory configured here) |
|||
|
|||
IBMOVS EQU YES ; Yes = Inter-bank Moves allowed (Z180/64180) |
|||
; No = Include Common RAM transfer buffer |
|||
|
|||
;--- Character Device Section --- |
|||
|
|||
MORDEV EQU no ; YES = Include any extra Char Device Drivers |
|||
; NO = Only use the 4 defined Char Devices |
|||
ESCC_B EQU false ; Include ESCC Channel B Driver? |
|||
; The following two devices result in non-standard data rates |
|||
; with the standard 16.00 MHz crystal in the P112. If a more |
|||
; "standard" crystal is used (12.288, 18.432, 24.576 MHz etc) |
|||
; is used, the ports become usable. |
|||
; Driver code for ASCI0 and ASCI1 includes an option for |
|||
; assembling Polled or Interrupt-driven buffered input. |
|||
; Select the desired option for ASCI0 with the BUFFA0 flag, |
|||
; and BUFFA1 for ASCI1. |
|||
ASCI_0 EQU false ; Include ASCI0 Driver? |
|||
BUFFA0 EQU false ; Use buffered ASCI0 Input Driver? |
|||
ASCI_1 EQU false ; Include ASCI1 Driver? |
|||
BUFFA1 EQU true ; Use buffered ASCI1 Input Driver? |
|||
|
|||
QSIZE EQU 32 ; size of COM1 and COM2 typeahead buffers |
|||
; ..must be 2^n with n<8 |
|||
RTSCTS EQU yes ; Include RTS/CTS code on Serial Outputs? |
|||
XONOFF EQU no ; Include Xon/Xoff handshaking in Serial lines? |
|||
|
|||
;--- Clock and Time Section --- |
|||
|
|||
CLOCK EQU YES ; Include ZSDOS Clock Driver Code? |
|||
DS1202 EQU no ; Use Dallas DS-1202 instead of Interrupt RTC? |
|||
CLKSET EQU no ; Allow DS-1202 Clock Sets? (Error if No) |
|||
TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) |
|||
|
|||
;--- Floppy Diskette Section --- |
|||
|
|||
BIOERM EQU no ; Print BIOS error messages? |
|||
CALCSK EQU YES ; Calculate skew table? |
|||
AUTOSL EQU YES ; Auto select floppy formats? |
|||
; If AUTOSL=True, the next two are active... |
|||
FDDMA EQU no ; Use DMA Control for Floppy Drive Transfers? |
|||
FLOPYH EQU yes ; Include "Hi-Density" Floppy Formats? |
|||
FLOPY8 EQU no ; Include 8" Floppy Formats? |
|||
MORDPB EQU NO ; Include additional Floppy DPB Formats? |
|||
|
|||
;--- RAM Disk Section --- |
|||
|
|||
RAMDSK EQU no ; YES = Make RAM-Disk Code, NO = No code made |
|||
|
|||
;--- Hard Disk Section --- |
|||
|
|||
HARDDSK EQU YES ; YES = Add Hard-disk Code, NO = Floppy Only |
|||
IDE EQU no ; YES = Use IDE Driver, NO = Use SCSI |
|||
HDDMA EQU no ; Use DMA-Controlled Hard Disk Data Transfers? |
|||
; (DMA Not implemented for GIDE) |
|||
UNIT_0 EQU YES ; Hard Disk Physical Unit 1 |
|||
UNIT_1 EQU no ; Hard Disk Physical Unit 2 |
|||
UNIT_2 EQU NO ; Hard Disk Physical Unit 3 |
|||
|
|||
;--- Logical Drive Section --- |
|||
|
|||
DRV_A EQU yes ; Set each of these equates for the drive and |
|||
DRV_B EQU yes ; partition complement of your system. Assume |
|||
DRV_C EQU no ; that A-D are Floppies. |
|||
DRV_D EQU no |
|||
DRV_E EQU yes ; Assume that E-L and N-P are Hard Disk |
|||
DRV_F EQU yes ; Partitions |
|||
DRV_G EQU no |
|||
DRV_H EQU no |
|||
DRV_I EQU no |
|||
DRV_J EQU no |
|||
DRV_K EQU no |
|||
DRV_L EQU no |
|||
IF RAMDSK |
|||
DRV_M EQU yes ; This is Yes for RAM drive |
|||
ELSE |
|||
DRV_M EQU no ; This is for drive if No RAM Drive present |
|||
ENDIF |
|||
DRV_N EQU no |
|||
DRV_O EQU no |
|||
DRV_P EQU no |
|||
|
|||
;========== Configuration Unique Equates (P112) =========== |
|||
;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
|||
;>>> Do NOT Alter these unless you KNOW what you're doing <<< |
|||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
|||
|
|||
REFRSH EQU NO ; Set to NO for only Static RAM, needed for |
|||
; systems with dynamic RAMs. |
|||
NOWAIT EQU no ; Set to NO to use configured Wait States in |
|||
; Hard Disk Driver. Yes to eliminate Waits. |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; For Z-180/HD64180 systems, The Bank numbers should reflect Physical |
|||
; memory in 32k increments. In P112, the ROM occupies the first 32k |
|||
; increment and is ambiguously addressed occupying 0-1FFFFH. The upper |
|||
; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. |
|||
|
|||
BNK0 EQU 08H ; First TPA Bank (switched in/out) 40000H |
|||
BNK1 EQU 09H ; Second TPA Bank (Common Bank) 48000H |
|||
BNK2 EQU 0AH ; System Bank (BIOS, DOS, CPR) 50000H |
|||
BNKU EQU 0BH ; User Area Bank 58000H |
|||
; (set to 0 to disable) |
|||
BNK3 EQU 0CH ; First Bank for RAM disk 60000H |
|||
BNKM EQU 1FH ; Maximum Bank # F8000H |
|||
|
|||
;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== |
|||
|
|||
CNTLA0 EQU 00H ; Control Port ASCI 0 |
|||
CNTLA1 EQU 01H ; Control Port ASCI 1 |
|||
STAT0 EQU 04H ; Serial port 0 Status |
|||
STAT1 EQU 05H ; Serial port 1 Status |
|||
TDR0 EQU 06H ; Serial port 0 Output Data |
|||
TDR1 EQU 07H ; Serial port 1 Output Data |
|||
RDR0 EQU 08H ; Serial port 0 Input Data |
|||
RDR1 EQU 09H ; Serial Port 1 Input Data |
|||
CNTR EQU 0AH ; HD64180 Counter port |
|||
TMDR0L EQU 0CH ; HD64180 DMA channel reg (low) |
|||
TMDR0H EQU 0DH ; HD64180 DMA channel reg (hi) |
|||
RLDR0L EQU 0EH ; CTC0 Reload Count, Low |
|||
RLDR0H EQU 0FH ; CTC0 Reload Count, High |
|||
TCR EQU 10H ; Interrupt Control Register |
|||
TMDR1L EQU 14H ; Timer Data Reg Ch1 (Low) |
|||
TMDR1H EQU 15H ; Timer Data Reg Ch1 (High) |
|||
RLDR1L EQU 16H ; Timer Reload Reg Ch1 (Low) |
|||
RLDR1H EQU 17H ; Timer Reload Reg Ch1 (High) |
|||
FRC EQU 18H ; Free-Running Counter |
|||
CCR EQU 1FH ; CPU Control Register (ZS8180/Z80182) |
|||
SAR0L EQU 20H ; DMA Channel 0 Register start (8 ports) |
|||
MAR1L EQU 28H ; DMA Channel 1 Register start (8 ports) |
|||
DSTAT EQU 30H ; DMA Status/Control port |
|||
DMODE EQU 31H ; DMA Mode Control port |
|||
DCNTL EQU 32H ; DMA/WAIT Control Register |
|||
IL EQU 33H ; Interrupt Segment Register |
|||
ITC EQU 34H ; Interrupt/Trap Control Register |
|||
RCR EQU 36H ; HD64180 Refresh Control register |
|||
CBR EQU 38H ; MMU Common Base Register |
|||
BBR EQU 39H ; MMU Bank Base Register |
|||
CBAR EQU 3AH ; MMU Common/Bank Area Register |
|||
OMCR EQU 3EH ; Operation Mode Control Reg |
|||
ICR EQU 3FH ; I/O Control Register |
|||
|
|||
; Some bit definitions used with the Z-180 on-chip peripherals: |
|||
|
|||
TDRE EQU 02H ; ACSI Transmitter Buffer Empty |
|||
RDRF EQU 80H ; ACSI Received Character available |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; Extended Features of Z80182 for P112 |
|||
|
|||
WSGCS EQU 0D8H ; Wait-State Generator CS |
|||
ENH182 EQU 0D9H ; Z80182 Enhancements Register |
|||
PINMUX EQU 0DFH ; Interrupt Edge/Pin Mux Register |
|||
RAMUBR EQU 0E6H ; RAM End Boundary |
|||
RAMLBR EQU 0E7H ; RAM Start Boundary |
|||
ROMBR EQU 0E8H ; ROM Boundary |
|||
FIFOCTL EQU 0E9H ; FIFO Control Register |
|||
RTOTC EQU 0EAH ; RX Time-Out Time Constant |
|||
TTOTC EQU 0EBH ; TX Time-Out Time Constant |
|||
FCR EQU 0ECH ; FIFO Register |
|||
SCR EQU 0EFH ; System Pin Control |
|||
RBR EQU 0F0H ; MIMIC RX Buffer Register (R) |
|||
THR EQU 0F0H ; MIMIN TX Holding Register (W) |
|||
IER EQU 0F1H ; Interrupt Enable Register |
|||
LCR EQU 0F3H ; Line Control Register |
|||
MCR EQU 0F4H ; Modem Control Register |
|||
LSR EQU 0F5H ; Line Status Register |
|||
MDMSR EQU 0F6H ; Modem Status Register |
|||
MSCR EQU 0F7H ; MIMIC Scratch Register |
|||
DLATL EQU 0F8H ; Divisor Latch (Low) |
|||
DLATM EQU 0F9H ; Divisor Latch (High) |
|||
TTCR EQU 0FAH ; TX Time Constant |
|||
RTCR EQU 0FBH ; RX Time Constant |
|||
IVEC EQU 0FCH ; MIMIC Interrupt Vector |
|||
MIMIE EQU 0FDH ; MIMIC Interrupt Enable Register |
|||
IUSIP EQU 0FEH ; MIMIC Interrupt Under-Service Register |
|||
MMCR EQU 0FFH ; MIMIC Master Control Register |
|||
|
|||
; Z80182 PIO Registers |
|||
|
|||
DDRA EQU 0EDH ; Data Direction Register A |
|||
DRA EQU 0EEH ; Port A Data |
|||
DDRB EQU 0E4H ; Data Direction Register B |
|||
DRB EQU 0E5H ; Data B Data |
|||
DDRC EQU 0DDH ; Data Direction Register C |
|||
DRC EQU 0DEH ; Data C Data |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; ESCC Registers on Z80182 |
|||
|
|||
SCCACNT EQU 0E0H ; ESCC Control Channel A |
|||
SCCAD EQU 0E1H ; ESCC Data Channel A |
|||
SCCBCNT EQU 0E2H ; ESCC Control Channel B |
|||
SCCBD EQU 0E3H ; ESCC Data Channel B |
|||
|
|||
; [E]SCC Internal Register Definitions |
|||
|
|||
RR0 EQU 00H |
|||
RR1 EQU 01H |
|||
RR2 EQU 02H |
|||
RR3 EQU 03H |
|||
RR6 EQU 06H |
|||
RR7 EQU 07H |
|||
RR10 EQU 0AH |
|||
RR12 EQU 0CH |
|||
RR13 EQU 0DH |
|||
RR15 EQU 0FH |
|||
|
|||
WR0 EQU 00H |
|||
WR1 EQU 01H |
|||
WR2 EQU 02H |
|||
WR3 EQU 03H |
|||
WR4 EQU 04H |
|||
WR5 EQU 05H |
|||
WR6 EQU 06H |
|||
WR7 EQU 07H |
|||
WR9 EQU 09H |
|||
WR10 EQU 0AH |
|||
WR11 EQU 0BH |
|||
WR12 EQU 0CH |
|||
WR13 EQU 0DH |
|||
WR14 EQU 0EH |
|||
WR15 EQU 0FH |
|||
|
|||
; FDC37C665/6 Parallel Port in Standard AT Mode |
|||
|
|||
DPORT EQU 8CH ; Data Port |
|||
SPORT EQU 8DH ; Status Port |
|||
CPORT EQU 8EH ; Control Port |
|||
|
|||
; FDC37C665/6 Configuration Control (access internal registers) |
|||
|
|||
CFCNTL EQU 90H ; Configuration control port |
|||
CFDATA EQU 91H ; Configuration data port |
|||
|
|||
; FDC37C665/6 Floppy Controller on P112 (Intel 80277 compatible) |
|||
|
|||
DCR EQU 92H ; Drive Control Register (Digital Output) |
|||
MSR EQU 94H ; Main Status Register |
|||
DR EQU 95H ; Data/Command Register |
|||
DRR EQU 97H ; Data Rate Register/Disk Changed Bit in B7 |
|||
|
|||
_DMA EQU 0A0H ; Diskette DMA Address |
|||
|
|||
; FDC37C665/6 Serial Port (National 16550 compatible) |
|||
|
|||
_RBR EQU 98H ;R Receiver Buffer |
|||
_THR EQU 98H ;W Transmit Holding Reg |
|||
_IER EQU 99H ;RW Interrupt-Enable Reg |
|||
_IIR EQU 9AH ;R Interrupt Ident. Reg |
|||
_FCR EQU 9AH ;W FIFO Control Reg |
|||
_LCR EQU 9BH ;RW Line Control Reg |
|||
_MCR EQU 9CH ;RW Modem Control Reg |
|||
_LSR EQU 9DH ;RW Line Status Reg |
|||
_MMSR EQU 9EH ;RW Modem Status Reg |
|||
_SCR EQU 9FH ;N/A Scratch Reg. (not avail in XT) |
|||
_DDL EQU 98H ;RW Divisor LSB | wih DLAB |
|||
_DLM EQU 99H ;RW Divisor MSB | set High |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; Equates for the National DP8490/NCR 5380 Prototype SCSI controller |
|||
|
|||
IF HARDDSK |
|||
NCR EQU 40H ; Base of NCR 5380 |
|||
|
|||
; 5380 Chip Registers |
|||
|
|||
NCRDAT EQU NCR ; Current SCSI Data (Read) |
|||
; Output Data Register (Write) |
|||
NCRCMD EQU NCR+1 ; Initiator Command Register (Read/Write) |
|||
NCRMOD EQU NCR+2 ; Mode Register (Read/Write) |
|||
NCRTGT EQU NCR+3 ; Target Command Register (Read/Write) |
|||
NCRBUS EQU NCR+4 ; Current SCSI Bus Status (Read) |
|||
NCRST EQU NCR+5 ; Bus & Status Register (Read) |
|||
; Start DMA Send (Write) |
|||
NCRINT EQU NCR+7 ; Reset Parity/Interrupt (Read) |
|||
; Start DMA Initiator Receive (Write) |
|||
DMAACK EQU NCR+8 ; SCSI Dack IO Port (Read/Write) |
|||
|
|||
; Bit Assignments for NCR 5380 Ports as indicated |
|||
|
|||
B_ARST EQU 10000000B ; Assert *RST (NCRCMD) |
|||
B_AACK EQU 00010000B ; Assert *ACK (NCRCMD) |
|||
B_ASEL EQU 00000100B ; Assert *SEL (NCRCMD) |
|||
B_ABUS EQU 00000001B ; Assert *Data Bus (NCRCMD) |
|||
|
|||
B_BSY EQU 01000000B ; *Busy (NCRBUS) |
|||
B_REQ EQU 00100000B ; *Request (NCRBUS) |
|||
B_MSG EQU 00010000B ; *Message (NCRBUS) |
|||
B_CD EQU 00001000B ; *Command/Data (NCRBUS) |
|||
B_IO EQU 00000100B ; *I/O (NCRBUS) |
|||
B_SEL EQU 00000010B ; *Select (NCRBUS) |
|||
|
|||
B_PHAS EQU 00001000B ; Phase Match (NCRST) |
|||
B_BBSY EQU 00000100B ; Bus Busy (NCRST) |
|||
|
|||
B_MBSY EQU 00000100B ; Monitor Busy Flag (NCRMOD) |
|||
B_DMA EQU 00000010B ; DMA Mode of transfer (NCRMOD) |
|||
ENDIF ;harddsk |
|||
|
|||
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|||
; Equates reflecting GIDE Base address from Address Jumpers (if GIDE added) |
|||
; Set the base GIDE equate to the jumper setting on the GIDE board. |
|||
|
|||
IF IDE |
|||
GIDE EQU 50H ; Set base of 16 byte address range |
|||
|
|||
IDEDOR EQU GIDE+6 ; Digital Output Register |
|||
IDEDat EQU GIDE+8 ; IDE Data Register (16-bit wide) |
|||
IDEErr EQU GIDE+9 ; IDE Error Register |
|||
IDESCnt EQU GIDE+0AH ; IDE Sector Count Register |
|||
IDESNum EQU GIDE+0BH ; IDE Sector Number Register |
|||
IDECLo EQU GIDE+0CH ; IDE Cylinder Number (Low) |
|||
IDECHi EQU GIDE+0DH ; IDE Cylinter Number (High) |
|||
IDESDH EQU GIDE+0EH ; IDE S-Drive-Head Register |
|||
IDECmd EQU GIDE+0FH ; IDE Command/Status Register |
|||
|
|||
CMDHOM EQU 10H ; Home Drive Heads |
|||
CMDRD EQU 20H ; Read Sector Command (w/retry) |
|||
CMDWR EQU 30H ; Write Sector Command (w/retry) |
|||
CMDVER EQU 40H ; Verify Sector(s) Command (w/retry) |
|||
CMDFMT EQU 50H ; Format Track Command |
|||
CMDDIAG EQU 90H ; Execute Diagnostics Command |
|||
CMDINIT EQU 91H ; Initialize Drive Params Command |
|||
CMDPW0 EQU 0E0H ; Low Range of Power Control Commands |
|||
CMDPW3 EQU 0E3H ; High Range of Power Control Commands |
|||
CMDPWQ EQU 0E5H ; Power Status Query Command |
|||
CMDID EQU 0ECH ; Read Drive Ident Data Command |
|||
ENDIF ;ide |
|||
;=================== End Unique Equates ======================= |
|||
|
|||
@ -1,317 +0,0 @@ |
|||
;======= Hard Disk Parameter Blocks ======= |
|||
|
|||
; The B/P BIOS DPB's contain prefix information that provide data on the |
|||
; logical format. This table contains only DPB Data on Hard Disk Partitions. |
|||
; See DPB.LIB for definitions of bit equates used in all DPB files. |
|||
|
|||
; NOTE: For simplicity, the code always assumes a logical 16 512-byte sectors |
|||
; per track for SCSI interface. Translate the actual 17 or 18 sectors |
|||
; to an increased track count of 16 sector tracks. |
|||
|
|||
;..... |
|||
; Format Type Byte 0 (Fixed Disk Subset) |
|||
; ------------------ |
|||
; D D D D D D D D |
|||
; 7 6 5 4 3 2 1 0 |
|||
; | | | | | +-+-+----- Disk Size 000 = Fixed Disk, remainder unused |
|||
; +-+-+-+-+----------- (unused) |
|||
|
|||
; All DPBs use the equate: FIXDSK EQU 00000000B from DPB.LIB |
|||
|
|||
; Format Type Byte 1 (Fixed Disk Subset) |
|||
; ------------------ |
|||
; D D D D D D D D |
|||
; 7 6 5 4 3 2 1 0 |
|||
; | | | | | +-+-+----- Sector Size: 010 = 512 bytes assumed in driver |
|||
; | | +-+-+----------- Allocation Size: 000=1K, 001=2K, 010=4K, 011=8K, 100=16K |
|||
; | +----------------- (reserved) |
|||
; +------------------- 1 = High Speed. (0 Not Used) |
|||
|
|||
; Information in this byte is not used in the SCSI driver, but is simply |
|||
; maintained for future use and compatibility with other DPB access routines. |
|||
|
|||
; NOTE: No Skew Table is needed since Hard Disk Format is locked |
|||
|
|||
;..... |
|||
; These are some of the capacities and configurations used with different |
|||
; drives and controllers: |
|||
|
|||
; Shugart Adaptec Seagate |
|||
; 1610-3 /------- ACB-4000a ----------\ SCSI |
|||
; ST-212 SQ-312 SQ-312A SQ-306 ST-225 ST125N |
|||
; ------ ------ ------- ------ ------ ------ |
|||
; Size (MB) A=2.6 A=2.7 A=4.0 A=2.0 A=4.0 A=4.0 |
|||
; B=2.6 B=2.7 B=7.1 B=3.5 B=7.1 B=8.0 |
|||
; C=2.6 C=2.7 - - C=11.1 C=8.1 |
|||
; D=2.6 D=2.8 - - - - |
|||
|
|||
;..... |
|||
; Partition A. Conner CP-2045 Bower 4-Partition. |
|||
|
|||
IF DRV_E |
|||
DEFB 'CP-2045 ','A'+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor (== Only the +/- sign used) |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical # sectors as defined in DPB |
|||
; even though real layout is 17/18 physical |
|||
; sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ0 EQU 996 ; # of blocks in first Partition (498 trks) |
|||
|
|||
; SQ-312 SQ312A SQ-306 ST-225 ST125N |
|||
; ------ ------ ------ ------ ------ |
|||
DPB50: DEFW 64 ; Sctrs/Trk 64 64 64 64 64 |
|||
DEFB 5 ; Blk Shf Fctr 5 5 5 5 5 |
|||
DEFB 31 ; Block Mask 31 31 31 31 31 |
|||
DEFB 1 ; Extent Mask 1 1 1 1 1 |
|||
DEFW HSIZ0-1 ; Disk Size-1 683 995 495 995 995 |
|||
DEFW 1023 ; Dir Max 767 767 767 767 767 |
|||
DEFB 0FFH,0 ; Alloc 0,1 0FC 0FC 0FC 0FC 0FC |
|||
DEFW 0 ; Check Size 0 0 0 0 0 |
|||
DEFW 2 ; Trk Offset 2 2 2 2 2 |
|||
ENDIF |
|||
|
|||
;..... |
|||
; Partition B. Conner CP-2045, Bower 4-Partition. |
|||
|
|||
IF DRV_F |
|||
DEFB 'CP-2045 ','B'+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ1 EQU 2500 ; # of blocks in Second Partition (1250 trks) |
|||
|
|||
; SQ-312 SQ312A SQ-306 ST-225 ST125N |
|||
; ------ ------ ------ ------ ------ |
|||
DPB51: DEFW 64 ; Scts/Trk 64 64 64 64 64 |
|||
DEFB 5 ; Blk Shf Fctr 5 5 5 5 5 |
|||
DEFB 31 ; Block Mask 31 31 31 31 31 |
|||
DEFB 1 ; Extent Mask 1 1 1 1 1 |
|||
DEFW HSIZ1-1 ; Disk Size-1 687 1766 875 1766 1599 |
|||
DEFW 1023 ; Dir Max 767 1023 767 1023 1023 |
|||
DEFB 0FFH,0 ; Alloc 0,1 0FC 0FF 0FC 0FF 0FF |
|||
DEFW 0 ; Check size 0 0 0 0 0 |
|||
DEFW 500 ; Track offset 344 500 250 500 500 |
|||
ENDIF |
|||
|
|||
;..... |
|||
; Partition C. Conner CP-2045, Bower 4-Partition. |
|||
|
|||
IF DRV_G |
|||
DEFB 'CP-2045 ','C'+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ2 EQU 2500 ; # of blocks in third Partition (1250 tracks) |
|||
|
|||
; SQ-312 SQ312A SQ-306 ST-225 ST125N |
|||
; ------ ------ ------ ------ ------ |
|||
DPB52: DEFW 64 ; Scts/Trk 64 - - 64 64 |
|||
DEFB 5 ; Blk Shf Fctr 5 - - 5 5 |
|||
DEFB 31 ; Block Mask 31 - - 31 31 |
|||
DEFB 1 ; Extent Mask 1 - - 1 1 |
|||
DEFW HSIZ2-1 ; Disk Size-1 687 - - 2766 2639 |
|||
DEFW 1023 ; Dir Max 767 - - 1023 1023 |
|||
DEFB 0FFH,0 ; Alloc0,1 0FC - - 0FF 0FF |
|||
DEFW 0 ; Check size 0 - - 0 0 |
|||
DEFW 1750 ; Track offset 688 - - 1384 1300 |
|||
ENDIF |
|||
|
|||
;..... |
|||
; Partition D. Conner CP-2045, Bower 4-Partition. |
|||
|
|||
IF DRV_H |
|||
DEFB 'CP-2045 ','D'+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ3 EQU 1912 ; # of blocks in Fourth Partition (956 tracks) |
|||
|
|||
; SQ-312 SQ312A SQ-306 ST-225 ST125N |
|||
; ------ ------ ------ ------ ------ |
|||
DPB53: DEFW 64 ; Scts/Trk 64 - - - - |
|||
DEFB 5 ; Blk Shf Fctr 5 - - - - |
|||
DEFB 31 ; Block Mask 31 - - - - |
|||
DEFB 1 ; Extent Mask 1 - - - - |
|||
DEFW HSIZ3-1 ; Disk Size-1 687 (701) - - - - |
|||
DEFW 1023 ; Dir Max 767 - - - - |
|||
DEFB 0FFH,0 ; Alloc 0,1 0FC - - - - |
|||
DEFW 0 ; Check size 0 - - - - |
|||
DEFW 3000 ; Track offset 1032 - - - - |
|||
ENDIF |
|||
|
|||
;---- The rest are dummies for the present. Fill with your needs ---- |
|||
|
|||
IF DRV_I |
|||
DEFB ' ',' '+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ4 EQU 2762 ; Number of blocks in Fourth Logical Drive |
|||
|
|||
DPB54: DEFW 64 ; Scts/Trk |
|||
DEFB 5 ; Blk Shf Fctr |
|||
DEFB 31 ; Block Mask |
|||
DEFB 1 ; Extent Mask |
|||
DEFW HSIZ4-1 ; Disk Size-1 |
|||
DEFW 1023 ; Dir Max |
|||
DEFB 0FFH,0 ; Alloc 0,1 |
|||
DEFW 0 ; Check size |
|||
DEFW 2 ; Track offset |
|||
ENDIF |
|||
|
|||
IF DRV_J |
|||
DEFB ' ',' '+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ5 EQU 2762 ; Number of blocks in Fourth Logical Drive |
|||
|
|||
DPB55: DEFW 64 ; Scts/Trk |
|||
DEFB 5 ; Blk Shf Fctr |
|||
DEFB 31 ; Block Mask |
|||
DEFB 1 ; Extent Mask |
|||
DEFW HSIZ5-1 ; Disk Size-1 |
|||
DEFW 1023 ; Dir Max |
|||
DEFB 0FFH,0 ; Alloc 0,1 |
|||
DEFW 0 ; Check size |
|||
DEFW 2 ; Track offset |
|||
ENDIF |
|||
|
|||
IF DRV_K |
|||
DEFB ' ',' '+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ6 EQU 2762 ; Number of blocks in Fourth Logical Drive |
|||
|
|||
DPB56: DEFW 64 ; Scts/Trk |
|||
DEFB 5 ; Blk Shf Fctr |
|||
DEFB 31 ; Block Mask |
|||
DEFB 1 ; Extent Mask |
|||
DEFW HSIZ6-1 ; Disk Size-1 |
|||
DEFW 1023 ; Dir Max |
|||
DEFB 0FFH,0 ; Alloc 0,1 |
|||
DEFW 0 ; Check size |
|||
DEFW 2 ; Track offset |
|||
ENDIF |
|||
|
|||
IF DRV_L |
|||
DEFB ' ',' '+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ7 EQU 2762 ; Number of blocks in Fourth Logical Drive |
|||
|
|||
DPB57: DEFW 64 ; Scts/Trk |
|||
DEFB 5 ; Blk Shf Fctr |
|||
DEFB 31 ; Block Mask |
|||
DEFB 1 ; Extent Mask |
|||
DEFW HSIZ7-1 ; Disk Size-1 |
|||
DEFW 1023 ; Dir Max |
|||
DEFB 0FFH,0 ; Alloc 0,1 |
|||
DEFW 0 ; Check size |
|||
DEFW 2 ; Track offset |
|||
ENDIF |
|||
|
|||
;<<< --- Drive M is used for RAM Drive --- >>> |
|||
|
|||
IF DRV_N |
|||
DEFB ' ',' '+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ8 EQU 2762 ; Number of blocks in Fourth Logical Drive |
|||
|
|||
DPB58: DEFW 64 ; Scts/Trk |
|||
DEFB 5 ; Blk Shf Fctr |
|||
DEFB 31 ; Block Mask |
|||
DEFB 1 ; Extent Mask |
|||
DEFW HSIZ8-1 ; Disk Size-1 |
|||
DEFW 1023 ; Dir Max |
|||
DEFB 0FFH,0 ; Alloc 0,1 |
|||
DEFW 0 ; Check size |
|||
DEFW 2 ; Track offset |
|||
ENDIF |
|||
|
|||
IF DRV_O |
|||
DEFB ' ',' '+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ9 EQU 2762 ; Number of blocks in Fourth Logical Drive |
|||
|
|||
DPB59: DEFW 64 ; Scts/Trk |
|||
DEFB 5 ; Blk Shf Fctr |
|||
DEFB 31 ; Block Mask |
|||
DEFB 1 ; Extent Mask |
|||
DEFW HSIZ9-1 ; Disk Size-1 |
|||
DEFW 1023 ; Dir Max |
|||
DEFB 0FFH,0 ; Alloc 0,1 |
|||
DEFW 0 ; Check size |
|||
DEFW 2 ; Track offset |
|||
ENDIF |
|||
|
|||
IF DRV_P |
|||
DEFB ' ',' '+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 |
|||
DEFB -2 ; Skew factor |
|||
DEFB 1 ; Starting sector number |
|||
DEFB 16 ; Logical Sectors per track |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
HSIZ10 EQU 2762 ; Number of blocks in Fourth Logical Drive |
|||
|
|||
DPB60: DEFW 64 ; Scts/Trk |
|||
DEFB 5 ; Blk Shf Fctr |
|||
DEFB 31 ; Block Mask |
|||
DEFB 1 ; Extent Mask |
|||
DEFW HSIZ10-1 ; Disk Size-1 |
|||
DEFW 1023 ; Dir Max |
|||
DEFB 0FFH,0 ; Alloc 0,1 |
|||
DEFW 0 ; Check size |
|||
DEFW 2 ; Track offset |
|||
ENDIF |
|||
|
|||
;----------- End of Hard Disk DPBs ------------- |
|||
|
|||
@ -1,41 +0,0 @@ |
|||
;=========== RAM Disk Parameter Block =============************************ |
|||
; - D-X Designs Pty Ltd P112 - ** Hardware Dependent ** |
|||
; ************************ |
|||
; 1.1 - 28 Aug 01 - Cleaned up for GPL release. HFB |
|||
; 1.0 - 10 Jun 96 - Initial Release for P112 derived from YASBEC. HFB |
|||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
|||
; The B/P BIOS DPB's contain prefix information that provide data on the |
|||
; logical format. This table contains only DPB Data on a RAM Disk. |
|||
|
|||
; Format Type Bytes 0 and 1 are configured in the same way as Hard Disks. |
|||
; See DPBHD-xx.LIB and DPB.LIB files for descriptions of these two bytes. |
|||
|
|||
; NOTE: No Skew Table needed since RAM Disk Format is locked and not needed |
|||
|
|||
;..... |
|||
; P112 RAM Disk Format assuming 32k for a single System bank |
|||
|
|||
DEFB 'D-X Desig','n'+80H ; Id - 10 bytes |
|||
DEFB FIXDSK ; Format type byte 0 |
|||
DEFB SPEED8+SEC128+ALC2K ; Format type byte 1 |
|||
DEFB -1 ; Skew factor (== Only the +/- sign used) |
|||
DEFB 0 ; Starting sector number |
|||
DEFB 32 ; Physical # sectors/trk (32=4k per 'track') |
|||
DEFB 0 ; Physical tracks/side (No Meaning in HD) |
|||
|
|||
MSIZ EQU 176 ; # of blocks in Drive (by Memory/Block size) |
|||
; 2x128k = 80 (160k) - 64 (128k) w/User Bank |
|||
; 1x512k = 192 (384k) - 176 (352k) w/User Bank |
|||
; 2x512k = 448 (896k) - 432 (864k) w/User Bank |
|||
DPBRAM: DEFW 32 ; Sectors/Track |
|||
DEFB 4 ; Block Shift Factor (2k per block) |
|||
DEFB 0FH ; Block Mask |
|||
DEFB 0 ; Extent Mask |
|||
DEFW MSIZ-1 ; Disk Size-1 256 kB 512 kB 1024 kB |
|||
DEFW 128 ; Dir Max -or- 64 128 256 |
|||
DEFB 0C0H, 00 ; Alloc 0, 1 80H,0 0C0H,0 0F0H,0 |
|||
DEFW 0000 ; Check Size |
|||
DEFW 0000 ; Trk Offset from beginning of Ram Bank base |
|||
|
|||
;==================== End of RAM Disk DPB ==================== |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue