diff --git a/Source/BPBIOS/@WBW Issues.txt b/Source/BPBIOS/@WBW Issues.txt index 98021418..eadbab59 100644 --- a/Source/BPBIOS/@WBW Issues.txt +++ b/Source/BPBIOS/@WBW Issues.txt @@ -16,7 +16,7 @@ will boot from the first hard disk unit number you assign and always from the first slice. As documented in "@WBW Z3ENV.txt", there are two general -configurations of BPBIOS for RomWBW. I strongly recomment +configurations of BPBIOS for RomWBW. I strongly recommend using the T configurations (external HBIOS proxy). This is the long term direction for BPBIOS on RomWBW. The N configurations (internal HBIOS proxy) will not work with @@ -28,11 +28,4 @@ BPBIOS does not yet understand the 1024 directory entry hard disk format. You must use the 512 directory entry format images. -The clock drivers supplied with BPBIOS (LDDS, LDP2D, and LDNZT) -load into ZSYS user memory. If the user segment is not at the -same location as the original BPBIOS ($E900), then the clock -driver will just overlay other code. At present, the N config -is OK because it does not relocate the user segment, but the T -config fails because it uses a user segment at $E700. Note that -this does not affect ZSDOS2 variants because they do not require -a loadable clock driver. +--WBW 7:32 PM 10/3/2021 \ No newline at end of file diff --git a/Source/BPBIOS/@WBW Z3ENV.txt b/Source/BPBIOS/@WBW Z3ENV.txt index 8c17e2ca..63917480 100644 --- a/Source/BPBIOS/@WBW Z3ENV.txt +++ b/Source/BPBIOS/@WBW Z3ENV.txt @@ -65,7 +65,7 @@ ZSDOS2 NO NO NO NO YES -------------- -------------- -------------- -------------- -------------- -------------- CCP ZCPR33?.REL ZCPR33?.REL Z34.REL Z34.REL Z41.ZRL DOS ZSDOS.ZRL ZSDOS.ZRL ZSDOS.ZRL ZSDOS.ZRL ZS203.ZRL -BIOS BP33.REL BP33BNK.REL BP34.REL BP34BNK.REL BP41.REL +BIOS BP33?.REL BP33?BNK.REL BP34?.REL BP34?BNK.REL BP41?BNK.REL -------------- -------------- -------------- -------------- -------------- -------------- In addition to the configuration options above, ZCPR also utilizes a @@ -84,7 +84,7 @@ proxy. The full proxy occupies FE00H-FFFFH and implements all of the HBIOS routing code. Alternatively, a mini proxy can be utilized to minimize the dedicated proxy space in upper memory. The mini proxy requires just 20H bytes at the top of memory (FFE0H-FFFFH), but requires -that the bulk of the proxy code be implemented internally in BPBIOS. +that the remainder of the proxy code be implemented internally in BPBIOS. Taking the above into account, the build process implements a couple of memory segment configurations that are compatible with RomWBW HBIOS. @@ -93,18 +93,9 @@ to free up the area required by the HBIOS full or mini proxy. Note that this is a bit complicated because there are some constraints on the locations of certain segments. -First, the RCP, FCP, and IOP segments contain executable code which is -pre-built and intended to run at specific locations. Specifically, the -SYS.RCP, SYS.FCP, and SYS.IOP files provided with the BPBIOS distribution -must be loaded at their original intended location. In theory, new -versions of these files could be created to load at different locations, -but that is not the approach taken here. Instead, the memory segment -configurations are designed to keep these 3 components at the same -location as the original distribution. - BPBIOS is assembled as relocatable code. Subsequently, the BPBUILD tool is used to link BPBIOS with the CCP and DOS relocatable code to produce -the absolute image (.IMG file). Note that BPBUILD does more than just +the loadable image (.IMG file). Note that BPBUILD does more than just linking. As part of it's work, BPBUILD adjusts the built-in environment segment to customize the final image for the desired location and size of Z-System segments. @@ -112,36 +103,36 @@ of Z-System segments. The following table summarizes the original memory segment configuration and the two new configurations utilized by this build process. As indicated above, the original configuration is incompatible with RomWBW HBIOS because it occupies the -very top of memory. This configuration is shown below purely to document the -original distribued configuration. +very top of memory. The original configuration is shown below purely to +document the original distributed configuration. SEGMENT Original T Config N Config -------------- -------------- -------------- -------------- -Environment FE00 EA00* FE00 +Environment FE00 FC00 FC00 # Recs 2 2 2 -Flow Ctl Pkg FA00 FA00 FA00 +Flow Ctl Pkg FA00 F700 F900 # Recs 4 4 4 -I/O Pkg EC00 EC00 EC00 - # Recs 12 12 12 -Res Cmd Pkg F200 F200 F200 +I/O Pkg EC00 EF00 F100 + # Recs 12 0 0 +Res Cmd Pkg F200 EF00 F100 # Recs 16 16 16 -Cmd Line FF00 EB00* FF00 - # Bytes 203 203 171* -Named Dirs FC00 FC00 FC00 - # Ents 14 14 14 -Ext Path FDF4 FDF4 FDF4 +Cmd Line FF00 FD00* FD00 + # Bytes 203 251 251 +Named Dirs FC00 F900 FE00 + # Ents 14 25 25 +Ext Path FDF4 FBF4 FBF4 # Ents 5 5 5 -Shell Stack FD00 FD00 FD00 +Shell Stack FD00 FB00 FB00 # Ents 4 4 4 Ent Size 32 32 32 -Msg Buffer FD80 FD80 FD80 -Ext FCB FDD0 FDD0 FDD0 -Ext Stack FFD0 EBD0* FFB0* +Msg Buffer FD80 FB80 FB80 +Ext FCB FDD0 FBD0 FBD0 +Ext Stack FFD0 FAD0 FFB0 -User Space E900 E700* E900 +User Space E900 EC00* EE00 Size 300 300 300 -Wheel Byte FDFF FDFF FDFF +Wheel Byte FDFF FBFF FDFF The sections below provide a more detailed description of the memory segment configurations. @@ -168,62 +159,65 @@ ORIGINAL DISTRIBUTION CONFIGURATION (NO HBIOS): ============================================================================= T CONFIGURATION (HBIOS FULL PROXY @ FC00-FFFF): - This configuration uses a modified layout of the ZSystem segments so - that critical segments can be located at the same address as the - "stock" configuration. Some segments are built with an assumed - memory location and will generally fail if they are not loaded in - that location. The Flow Control Package (FCP) and Resident - Command Processor (RCP) are very sensitive to this. This configuration - places them at their original locations, so they work well. ----------------------------------------------------------------------------- - A - Environment - EA00H F - Named Dirs - FC00H - Size (# recs)- 2 # of Entries - 14 - B - Flow Ctrl Pkg - FA00H G - External Path - FDF4H - Size (# recs)- 4 # of Entries - 5 - C - I/O Package - EC00H H - Shell Stack - FD00H - Size (# recs)- 12 # of Entries - 4 - D - Res Cmd Proc - F200H Entry Size - 32 - Size (# recs)- 16 I - Msg Buffer - FD80H - E - Command Line - EB00H J - Ext. FCB - FDD0H - Size (bytes) - 203 K - Ext. Stack - EBD0H + A - Environment - FC00H F - Named Dirs - F900H + Size (# recs)- 2 # of Entries - 25 + B - Flow Ctrl Pkg - F700H G - External Path - FBF4H + Size (# recs)- 4 # of Entries - 5 + C - I/O Package - EF00H H - Shell Stack - FB00H + Size (# recs)- 0 # of Entries - 4 + D - Res Cmd Proc - EF00H Entry Size - 32 + Size (# recs)- 16 I - Msg Buffer - FB80H + E - Command Line - FD00H J - Ext. FCB - FBD0H + Size (bytes) - 251 K - Ext. Stack - FAD0H ============================================================================= ============================================================================= N CONFIGURATION (HBIOS MINI PROXY @ FFE0-FFFF): - This configuration frees up the top 20H bytes of memory to make space for the - HBIOS mini-proxy. It does this by shrinking Cmd Line and shifting the Ext Stack - down by 32 bytes. This configuration will only work if INTPXY=YES in HBIOS. ----------------------------------------------------------------------------- - A - Environment - FE00H F - Named Dirs - FC00H - Size (# recs)- 2 # of Entries - 14 - B - Flow Ctrl Pkg - FA00H G - External Path - FDF4H - Size (# recs)- 4 # of Entries - 5 - C - I/O Package - EC00H H - Shell Stack - FD00H - Size (# recs)- 12 # of Entries - 4 - D - Res Cmd Proc - F200H Entry Size - 32 - Size (# recs)- 16 I - Msg Buffer - FD80H - E - Command Line - FF00H J - Ext. FCB - FDD0H - Size (bytes) - 171 K - Ext. Stack - FFB0H + A - Environment - FC00H F - Named Dirs - FE00H + Size (# recs)- 2 # of Entries - 24 + B - Flow Ctrl Pkg - F900H G - External Path - FBF4H + Size (# recs)- 4 # of Entries - 5 + C - I/O Package - F100H H - Shell Stack - FB00H + Size (# recs)- 0 # of Entries - 4 + D - Res Cmd Proc - F100H Entry Size - 32 + Size (# recs)- 16 I - Msg Buffer - FB80H + E - Command Line - FD00H J - Ext. FCB - FBD0H + Size (bytes) - 251 K - Ext. Stack - FFB0H ============================================================================= BPBIOS is designed to invoke a command at startup (autostart command). There -are 3 ZEX command files customized for this build. They are Z33.ZEX, Z34.ZEX, -and Z41.ZEX. BPBIOS is customized to launch the ZEX command file corresponding +are 3 ZEX command files customized for this build. They are ZSTT.ZEX, ZSTN.ZEX, +and ZSTF.ZEX. BPBIOS is customized to launch the ZEX command file corresponding to the version of ZCPR being linked with it. The table below summarizes the loadable image files created by the build process: -ZCPR ZSDOS BPBIOS STARTUP T (INTPXY=NO) N (INTPXY=YES) ------- ------ -------------- -------------- -------------- -------------- -v3.3 v1.1 NON-BANKED Z33.ZEX BP33T.IMG BP33N.IMG -v3.3 v1.1 BANKED Z33.ZEX BP33TBNK.IMG BP33NBNK.IMG -v3.4 v1.1 NON-BANKED Z34.ZEX BP34T.IMG BP34N.IMG -v3.4 v1.1 BANKED Z34.ZEX BP34TBNK.IMG BP34NBNK.IMG -v4.1 v2.03 BANKED Z41.ZEX BP41TBNK.IMG BP41NBNK.IMG +ZCPR ZSDOS BPBIOS STARTUP HBIOS PROXY IMAGE +------ ------ -------------- -------------- -------------- -------------- +v3.3 v1.1 NON-BANKED ZSTT.ZEX EXTERNAL BP33T.IMG +v3.3 v1.1 BANKED ZSTT.ZEX EXTERNAL BP33TBNK.IMG +v3.3 v1.1 NON-BANKED ZSTN.ZEX INTERNAL BP33N.IMG +v3.3 v1.1 BANKED ZSTN.ZEX INTERNAL BP33NBNK.IMG +v3.4 v1.1 NON-BANKED ZSTT.ZEX EXTERNAL BP34T.IMG +v3.4 v1.1 BANKED ZSTT.ZEX EXTERNAL BP34TBNK.IMG +v3.4 v1.1 NON-BANKED ZSTN.ZEX INTERNAL BP34N.IMG +v3.4 v1.1 BANKED ZSTN.ZEX INTERNAL BP34NBNK.IMG +v4.1 v2.03 BANKED ZSTF.ZEX EXTERNAL BP41TBNK.IMG +v4.1 v2.03 BANKED ZSTF.ZEX INTERNAL BP41NBNK.IMG WARNING: Once an N configuration image has been loaded, it is no longer possible to load a T configuration without rebooting. This constraint -exists because the N configurations wipe out all but the top 20H bytes +exists because the N configurations wipes out all but the top 20H bytes of memory. The T configurations rely on the full 200H byte HBIOS proxy. + +WARNING: The N configurations *cannot* handle interrupts because the +RomWBW interrupt procesing framework exists in the RAM area FE00-FFFF +which is mostly overlaid by the N configurations. Use of the T +configuration is strongly recommended even though it leaves slightly +less TPA available for applications. + +--WBW 7:32 PM 10/3/2021 \ No newline at end of file diff --git a/Source/BPBIOS/Build.cmd b/Source/BPBIOS/Build.cmd index 09d9edac..90e33cce 100644 --- a/Source/BPBIOS/Build.cmd +++ b/Source/BPBIOS/Build.cmd @@ -3,8 +3,6 @@ setlocal setlocal & cd ZCPR33 && call Build || exit /b & endlocal -setlocal & cd Z34RCP11 && call Build || exit /b & endlocal -setlocal & cd NZFCP13 && call Build || exit /b & endlocal set PATH=%PATH%;..\..\Tools\zx;..\..\Tools\cpmtools; diff --git a/Source/BPBIOS/Clean.cmd b/Source/BPBIOS/Clean.cmd index 61d314af..c0174859 100644 --- a/Source/BPBIOS/Clean.cmd +++ b/Source/BPBIOS/Clean.cmd @@ -11,5 +11,3 @@ if exist *.bak del *.bak if exist def-ww.lib del def-ww.lib pushd ZCPR33 && call Clean.cmd & popd -pushd Z34RCP11 && call Clean.cmd & popd -pushd NZFCP13 && call Clean.cmd & popd diff --git a/Source/BPBIOS/Makefile b/Source/BPBIOS/Makefile index d1b0c403..91eb5b0c 100644 --- a/Source/BPBIOS/Makefile +++ b/Source/BPBIOS/Makefile @@ -14,7 +14,7 @@ OTHERS = zcpr33n.rel zcpr33t.rel \ TOOLS = ../../Tools -SUBDIRS = ZCPR33 NZFCP13 Z34RCP11 +SUBDIRS = ZCPR33 include $(TOOLS)/Makefile.inc $(HD0IMG): $(IMGFILES) diff --git a/Source/BPBIOS/NZFCP13/Build.cmd b/Source/BPBIOS/NZFCP13/Build.cmd deleted file mode 100644 index c58bd186..00000000 --- a/Source/BPBIOS/NZFCP13/Build.cmd +++ /dev/null @@ -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 diff --git a/Source/BPBIOS/NZFCP13/Clean.cmd b/Source/BPBIOS/NZFCP13/Clean.cmd deleted file mode 100644 index a088f4e8..00000000 --- a/Source/BPBIOS/NZFCP13/Clean.cmd +++ /dev/null @@ -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 diff --git a/Source/BPBIOS/NZFCP13/Makefile b/Source/BPBIOS/NZFCP13/Makefile deleted file mode 100644 index 614a877d..00000000 --- a/Source/BPBIOS/NZFCP13/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -OBJECTS = nzfcp13.rel -OTHERS = -TOOLS = ../../../Tools - -include $(TOOLS)/Makefile.inc diff --git a/Source/BPBIOS/NZFCP13/fcp-5.zrl b/Source/BPBIOS/NZFCP13/fcp-5.zrl deleted file mode 100644 index a2456212..00000000 Binary files a/Source/BPBIOS/NZFCP13/fcp-5.zrl and /dev/null differ diff --git a/Source/BPBIOS/NZFCP13/fcp-5t.zrl b/Source/BPBIOS/NZFCP13/fcp-5t.zrl deleted file mode 100644 index eb94964c..00000000 Binary files a/Source/BPBIOS/NZFCP13/fcp-5t.zrl and /dev/null differ diff --git a/Source/BPBIOS/NZFCP13/fcp-6.zrl b/Source/BPBIOS/NZFCP13/fcp-6.zrl deleted file mode 100644 index 6aa1aea9..00000000 Binary files a/Source/BPBIOS/NZFCP13/fcp-6.zrl and /dev/null differ diff --git a/Source/BPBIOS/NZFCP13/fcp-6t.zrl b/Source/BPBIOS/NZFCP13/fcp-6t.zrl deleted file mode 100644 index b75fbfb7..00000000 Binary files a/Source/BPBIOS/NZFCP13/fcp-6t.zrl and /dev/null differ diff --git a/Source/BPBIOS/NZFCP13/fcp-7t.zrl b/Source/BPBIOS/NZFCP13/fcp-7t.zrl deleted file mode 100644 index 8a12be09..00000000 Binary files a/Source/BPBIOS/NZFCP13/fcp-7t.zrl and /dev/null differ diff --git a/Source/BPBIOS/NZFCP13/nzfcp.doc b/Source/BPBIOS/NZFCP13/nzfcp.doc deleted file mode 100644 index 1eb1b0ab..00000000 --- a/Source/BPBIOS/NZFCP13/nzfcp.doc +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/Source/BPBIOS/NZFCP13/nzfcp.lib b/Source/BPBIOS/NZFCP13/nzfcp.lib deleted file mode 100644 index db55f33f..00000000 --- a/Source/BPBIOS/NZFCP13/nzfcp.lib +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/Source/BPBIOS/NZFCP13/nzfcp.lib.sav b/Source/BPBIOS/NZFCP13/nzfcp.lib.sav deleted file mode 100644 index 18f557f8..00000000 --- a/Source/BPBIOS/NZFCP13/nzfcp.lib.sav +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/Source/BPBIOS/NZFCP13/nzfcp13.for b/Source/BPBIOS/NZFCP13/nzfcp13.for deleted file mode 100644 index 40fb0c2c..00000000 --- a/Source/BPBIOS/NZFCP13/nzfcp13.for +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/NZFCP13/nzfcp13.z80 b/Source/BPBIOS/NZFCP13/nzfcp13.z80 deleted file mode 100644 index fe700554..00000000 --- a/Source/BPBIOS/NZFCP13/nzfcp13.z80 +++ /dev/null @@ -1,1424 +0,0 @@ - -; Program: NZFCP -; Date: October 9, 1989 -; Author: Carson Wilson -; Version: 1.3 -; Changes: Updated & improved JetLDR signon. -; Changed four JR's to JP's. - -; Date: August 21, 1988 -; Author: Carson Wilson -; Version: 1.2 - -; Derived from: - -; Date: April 1988 -; Name changed and code modified for NZ-COM. - -; Derived from: - -; PROGRAM: Z34FCP -; AUTHOR: Jay Sage -; VERSION: 1.0 -; DATE: May 25, 1987 -; DERIVATION: FCP10 by Jay Sage (ZSIG) - -; ZCPR34 is copyright 1987 by Jay P. Sage. All rights reserved. End-user -; distribution and duplication permitted for non-commercial purposes only. -; Any commercial use of ZCPR34, defined as any situation where the duplicator -; recieves revenue by duplicating or distributing ZCPR34 by itself or in -; conjunction with any hardware or software product, is expressly prohibited -; unless authorized in writing by Jay P. Sage. - -;============================================================================= -; -; R E V I S I O N H I S T O R Y -; -;============================================================================= -; -; 21 Aug 88 Added JetLDR signon description. -; IF IN now prints ' (Y/N)? ', and accepts only Y or y or -; N or n. -; Added macro code to show FCP length following assembly. -; -; Carson Wilson. -; -; 6 April 88 Handles latest Type 4 IF.COM -; 1.2 Changed command tail loader to accept :IF. Joe Wright -; -; 12/31/87 Modified for use with Z34CMN.LIB for NZ-COM. Joe Wright. -; 1.1 -; -; 05/25/87 Created ZCPR33 version from the code I released through ZSIG. -; 1.0 This code differs only in the more efficient way in which it -; determines if it was invoked with a directory prefix that -; signals that the transient IF.COM should be used to process -; the IF command. This permits the user to force the use of a -; more powerful option processor in the transient IF.COM than in -; the resident code. Option bytes were added after the end of -; the resident option dispatch table so that SHOW can report -; configuration options to the user. -; -; FCP10 notes -; -; The transient processor can now be loaded at an address other -; than 100h so as not to interfere with code loaded in the TPA. -; Then the GO command can normally be used even after IF.COM is -; used to process the flow test. If the LOADCHK equate -; is true then the FCP will verify that the transient -; processor has been loaded to the page in memory for which -; it was assembled. If loaded to the wrong page, it will -; be reloaded to the correct one. -; -; The test for the form ARG1=ARG2 was tightened up so as not to -; be confused by an equal sign in some later part of the command -; tail (e.g., "IF REG 1 = 2"). Now only the first token -; (contiguous string of characters) is checked. This extra code -; is under the control of the XEQOPT equate. The only option -; that is still a problem is the COMIF form '~='. Since the '=' -; is in the first token, this 'not equal' condition cannot be -; distinguished from an equality test against the character '~'. -; The solution is to turn off equality testing in the resident FCP -; or to use the alternative COMIF options 'NE' or '~EQ' for this -; test. -; -; Added optional commands AND and OR. These work like IF except -; that they affect the current IF level rather than going one -; level deeper. -; -; Added optional command ZIF to zero out all IF states no matter -; whether current state is true or false (XIF only works if state -; is true. -; -; Added new optional command IFQ (if-query) and enhanced the -; IFSTAT code that is invoked when the NOISE equate is true. -; In both cases, the entire tree of IF states is now shown, -; starting with the current level. For example, IFQ might result -; in the display "IF FTT" (we are at third IF level and it is -; false; the second and first IF levels are true). If the -; current IF level is 0, then the display is "IF None". -; -; Added two new resident options: AMBIGUOUS (AM) returns true if -; the file specification in the second token has a '?' (or '*') -; in it; COMPRESSED (CO) returns true if the file specificaton in -; the second token has a 'Z' or a 'Q' in the second character of -; the file type. -; -; Howard Goldstein contributed significantly to the development -; of this code. Bridger Mitchell also offered helpful -; suggestions. -; -; Jay Sage -; -; Notes from earlier SYSFCP revisions -; -; 09/12/85 Fixed bug in my code used when IF.COM is found in a specified -; drive/user area. The values of CDISK and CUSER were not being -; set, and as a result the user was not returned to the correct -; directory. The EXIST and EMPTY tests did not work correctly -; unless a DIR: or DU: was given explicitly with each file name. -; Jay Sage - -; 08/29/85 Reorganized code so that COMIF code handles only those -; options not in the table of local IF functions. Also changed -; code to allow searching for IF.COM in a specified directory -; instead of using the ROOT of the path. Also renamed macros -; to make code ZAS compatible. -; Jay Sage - -; 07/21/85 Corrected reversed sensing of program error flag in the -; IF ERROR test. -; Jay Sage - -; 01/02/85 Revised to correct a bug in the IF EMPTY test. First, the -; current record byte was not being set to zero before trying -; to read from the file. Secondly, the test for error was not -; testing for FF but for 00. My BDOS does not return 0 for -; success. It seems to return 00, 01, 02, or 03. This made the -; file appear to be empty. -; Jay Sage - - -;============================================================================= -; -; M A C R O S A N D E Q U A T E S -; -;============================================================================= - - name ('FCP') - -; External macro references - - maclib Z34CMN.LIB ; Source of system addresses - maclib NZFCP.LIB ; Source of configuration options - maclib Z34MAC.LIB ; Z34 macros - -; Equates section - -version equ 13 - -lf equ 0ah -cr equ 0dh -bell equ 07h - -base equ 0 -wboot equ base+0000h ; CP/M warm boot address -udflag equ base+0004h ; User num in high nybble, disk in low -bdos equ base+0005h ; BDOS function call entry point -tfcb equ base+005ch ; Default FCB buffer -fcb1 equ tfcb ; 1st and 2nd FCBs -fcb2 equ tfcb+16 -tbuff equ base+0080h ; Default disk I/O buffer -tpa equ base+0100h ; Base of TPA - - -;============================================================================= -; -; J e t L D R S I G N - O N -; -;============================================================================= - -; This prints an extended ID message upon loading with JetLDR. -; These are NOT the command names. - - COM /_ID_/ - - db 'Copyright 1989 ZSA',cr,lf - db 'Commands:',cr,lf - db ' IF ELSE FI XIF ' - - if andopt - db 'AND ' - endif - if oropt - db 'OR ' - endif - if ifqopt - db 'IFQ ' - endif - if zifopt - db 'ZIF ' - endif - - db cr,lf,'Options' - if ifoneg - db ' (use "',negchar,'" to negate)' - endif - if noise - db '; (noise)' - endif - db ':',cr,lf - - if ifotrue - db ' T F ' - endif - if ifambig - db 'AMbig ' - endif - if ifcompr - db 'COmpr ' - endif - if ifoempty - db 'EMpty ' - endif - if ifoeq - db 'x=y ' - endif - if ifoerror - db 'ERror ' - endif - if ifoexist - db 'EXist ' - endif - if ifoinput - db 'INput ' - endif - if ifonull - db 'NUll ' - endif - if iforeg - db 'REgs ' - endif - if ifotcap - db 'TCap ' - endif - if ifowheel - db 'WHeel ' - endif - - if comif - db cr,lf,' Use ' - if pathroot - db 'root:' - endif - db 'IF.COM' - endif - - db 0 ; End of JetLDR sign-on message - - CSEG - -;============================================================================= - -; Start of code - -start: - db 'Z3FCP' ; Flag for Package Loader - -;============================================================================= -; -; C O M M A N D T A B L E -; -;============================================================================= - -; The command name table is structured as follows: -; -; The first byte is the number of characters in each command name. -; Next come records consisting of command names followed by entry -; point addresses for the code to process the command. Finally, -; there is a null to indicate the end of the dispatch table. - - db cmdsize ; Size of text entries -ctab: ctable ; Macro defined in NZFCP.LIB - db 0 - -;============================================================================= -; -; I F C O N D I T I O N O P T I O N S -; -;============================================================================= - -condtab: - - if ifotrue - db 'T ' ; TRUE - dw ifctrue - db 'F ' ; FALSE - dw ifcfalse - endif ; ifotrue - - if ifambig ; Ambiguous file spec - db 'AM' - dw ifcambig - endif ; ifambig - - if ifcompr ; Squeezed or crunched - db 'CO' - dw ifccompr - endif ; ifcompr - - if ifoempty - db 'EM' ; File empty - dw ifcempty - endif ; ifoempty - - if ifoerror - db 'ER' ; Error message - dw ifcerror - endif ; ifoerror - - if ifoexist - db 'EX' ; File exists - dw ifcex - endif ; ifoexist - - if ifoinput - db 'IN' ; User input - dw ifcinput - endif ; ifoinput - - if ifonull - db 'NU' - dw ifcnull - endif ; ifonull - - if ifotcap ; Z3 TCAP available - db 'TC' - dw ifctcap - endif ; ifotcap - - if ifowheel ; Wheel Byte - db 'WH' - dw ifcwheel - endif ; ifowheel - - db 0 - -; Option bytes: these option bytes can be used to convey information to -; programs such as SHOW. The first one is used to reduce the chance of -; misinterpreting data from an earlier version of the FCP that does not -; have the option bytes. The next byte tells if COMIF has been activated -; and if the root of the path will be used as the directory in which to look -; for IF.COM. If PATHROOT is not selected (or if the path is empty), then -; the specified drive/user will be used. The overflow bit in case the user -; number is greater than 15 is kept in bit 2 of the second option byte. The -; combined user/drive value is kept in the third option byte. - -highuser defl ifusr gt 15 - -opt0: db 34h ; ZCPR34 version ID -opt1: optflag highuser,pathroot,comif -opt2: db ( ifusr and 0fh ) shl 4 + ( ifdrv - 'A' ) ; user/drive flag - -;============================================================================= -; -; C O M M A N D P R O C E S S I N G C O D E -; -;============================================================================= - -; Command: ZIF -; -; This command zeros out the IF system no matter what the current -; level IF state is. - - if zifopt - -ifzero: - if noise - call nl ; Print new line - endif ; noise - - jr ifexit1 - - endif ; zifopt - -;----------------------------------------------------------------------------- - -; Command: XIF -; -; If current IF state is true, XIF terminates all IFs, restoring a basic -; TRUE state. - -ifexit: - if noise - call nl ; Print new line - endif ; noise - - call iftest ; See if current IF is running and FALSE - - if noise - jr z,ifstat ; Abort with status message if so - else ; not noise - ret z ; Or just return if false - endif ; noise - -ifexit1: - ld hl,z3msg+1 ; Pt to IF flag - ld (hl),0 ; Zero IF flag - jr ifendmsg ; Print message - -;----------------------------------------------------------------------------- - -; Command: FI -; -; FI decrements to the previous IF level. It does this by shifting the -; current-if-bit in the first 'if' message in the Z3MSG buffer right one -; position. - -ifend: - if noise - call nl ; Print new line - endif ; noise - -; ld hl,z3msg+1 ; Point to IF flag -; ld a,(hl) ; Get it -; or a ; No IF active? - - call msgbf1 - dec hl ; Save a byte over the three lines above - - jr z,ifnderr - -ifendmsg: - if noise - call print - dc 'To ' ; Prefix to status display - endif ; noise - - srl (hl) ; Adjust active bit - - if noise - jr nz,ifstat ; Print status if IF still active - endif ; noise - -ifnderr: - if noise - - call print ; Print message - dc 'No ' - jp prif - - else ; not noise - - ret - - endif ; noise - -;----------------------------------------------------------------------------- - -; Command: ELSE -; -; ELSE complements the Active Bit for the Current IF provided the -; previous IF state was true. If the previous state was false, the -; command is flushed. -; -; This is accomplished according to the following algorithm. If the -; current IF is 0 (no IF) or 1 (one IF), then take the previous state -; to be true and perform the toggle. Otherwise, test the previous -; IF level condition and toggle only if it is true. - -ifelse: - if noise and (not ifqopt) - call nl ; Print new line - endif ; noise and (not ifqopt) - - call msgbf1 ; Get current if - ld b,a ; Save in B - srl a ; Back up if pointer bit to previous IF level - jr z,iftog ; If no previous IF level, go to toggle code - and (hl) ; Determine state of previous IF level - - if noise - if ifqopt - jr z,ifstat0 ; Print status on new line - else - jr z,ifstat ; If false, just print status - endif ; Ifqopt - else ; not noise - ret z ; Or simply return - endif ; noise - -iftog: - ld a,(hl) ; Get if-status message byte - xor b ; Flip current state - ld (hl),a ; Put result back in message byte - ; ..and fall thru to print status - - if not noise - ret - endif - -;----------------------------------------------------------------------------- - -; Indicate if current IF is True or False - -ifstat0: - call nl -ifstat: - call prif ; Print 'IF ' - call msgbf1 ; Get current if byte and set flags - ld b,a ; Get it into B - jr nz,ifstat1 ; Nz means if active - - call print - dc 'None' - ret - -ifstat1: - ld a,(hl) ; Get if-status message byte - and b ; Mask in currently active IF level status - ld c,'F' ; Load with false indicator - jr z,ifstat2 ; If current IF is false, jump - ld c,'T' ; Else, load with true indicator -ifstat2: - ld a,c - call conout - - srl b ; Drop one IF level - jr nz,ifstat1 ; Loop through all IF states - ret - -;------------------------- - -; Output CRLF - -nl: call print - dc cr,lf - ret - -;----------------------------------------------------------------------------- - -; Command: OR - -; This command performs a logical or operation by updating the -; if state without going to a new level. If there are active -; IFs and the current state is true, we do nothing. Else we back -; up one level and fall through to normal IF processing. - - if oropt - -orstart: - call msgbf1 ; Get if active byte - jr z,backup ; Treat like if if no IFs active - and (hl) ; Check current state - jr z,backup ; Current STATE false so go proecess - - if noise - jr ifstat0 ; Else return and show status - else - ret ; Or just return - - endif ; Noise - endif ; Oropt - -;----------------------------------------------------------------------------- - -; Command: AND - -; This command performs a logical and operation by updating the -; if state without going to a new level. If there are active -; IFs and the current state is false, we do nothing. Else we back -; up one level and fall through to normal IF processing. - - if andopt - -andstart: - call iftest ; Test for IF running and false - if noise - jr z,ifstat0 ; Condition met, show status & return - else - ret z ; Condition met, return - endif ; Noise - endif ; Andopt - -; Common stuff for and and or - - if andopt or oropt - -backup: - dec hl ; Pt to flag byte - srl (hl) ; Drop back one level -; -; Poke "IF" into external fcb for transient -; - if comif -pokefcb: - ld de,extfcb+1 ; Pt to external fcb - ld hl,ifcmd ; Pointer to IF command in table - ld bc,cmdsize ; Length - ldir ; Move it in - - endif ; comif - -; Fall through to IF PROCESSING - endif ;Andopt or oropt - -;----------------------------------------------------------------------------- - -; FCP Command: IF -; -; If current IF state is false, then advance to next level and set it -; to false also. If current IF state is true, then test condition and -; set the next level accordingly. - -ifstart: - if not ifqopt - - ld a,(extfcb) ; NZ if explicit - ld hl,tbuff - or (hl) - jp z,ifstat0 ; Report IF status - - endif ; not ifqopt - -ifstrt: - if noise - call nl ; Print new line - endif ; noise - - call iftest ; See if current IF is running and FALSE - jP z,ifcf ; Yes, do the right thing - -; Test for presence of colon in command. If colon present, then go directly -; to COMIF processing. - - if comif - ld a,(extfcb) ; Check drive byte of external FCB - or a ; If it is zero, no colon was present - jp nz,runcomif ; If colon, go to comif processing - ; Else fall through to resident processing - endif ; comif - -;----------------------------------------------------------------------------- -; -; R E S I D E N T C O M M A N D P R O C E S S I N G -; -;----------------------------------------------------------------------------- - -resident: - -; Test for Equality if Equal Sign in Token - - if ifoeq - - ld hl,tbuff+1 - - if xeqopt ; Extended equal testing - -skipsp: ; Skip over any space to first token - ld a,(hl) - or a ; Check for end of tail - jr z,ifck0 ; If so , go on - cp ' '+1 ; Test for space or control character - jr nc,tsteq ; If not, we are at first token - inc hl ; Otherwise advance to next character - jr skipsp ; ..and continue testing - - endif ; xeqopt - -tsteq: - ld a,(hl) ; Get character from command tail - inc hl ; Point to next one - or a ; EOL? - jr z,ifck0 ; Continue if so - - if xeqopt - cp ' '+1 ; End of token? - jr c,ifck0 ; If so, go on - endif ; xeqopt - - cp '=' ; Found '=' ? - jr nz,tsteq ; If not, continue scan - - ld hl,fcb1+1 ; Else, get ready to compare FCBs - ld de,fcb2+1 - ld b,11 ; 11 bytes -eqtest: - ld a,(de) ; Compare - cp (hl) - jr nz,ifcf - inc hl ; Pt to next - inc de - djnz eqtest - jr ifct - - endif ; ifoeq - - -ifck0: - ld de,fcb1+1 ; Point to first character in FCB1 - - if ifoneg - ld a,(de) ; Get it - ld (negflag),a ; Set negate flag - cp negchar ; Is it a negate? - jr nz,ifck1 ; If not, go on - inc de ; Else point to character after negchar -ifck1: - endif ; ifoneg - - if iforeg ; REGISTERS - call regtest ; Test for register value - jr nz,runreg - endif ; iforeg - - call condtest ; Test of condition match - jr nz,runcond ; If found, process condition - - if comif - jp runcomif ; If function not found in table, use transient - else - - call print ; Beep to indicate error - dc bell - - if noise - jp ifstat ; No condition, display current condition - else ; no noise - ret - endif ; noise - endif ; comif - -;----------------------------------------------------------------------------- -; -; Process register - register value is in A -; -;----------------------------------------------------------------------------- - - if iforeg -runreg: - push af ; Save value - call getnum ; Extract value in FCB2 as a number - pop af ; Get value - cp b ; Compare against extracted value - jr jrtrue ; True if match; false if not - endif ; iforeg - -;----------------------------------------------------------------------------- -; -; Process conditional test - address of conditional routine is in HL -; -;----------------------------------------------------------------------------- - -runcond: - jp (hl) ; "call" routine pted to by HL - -;============================================================================= -; -; R E S I D E N T C O N D I T I O N O P T I O N S -; -;============================================================================= - -; Condition: AMBIGUOUS - - if ifambig - -ifcambig: - ld hl,fcb2+1 ; Scan FCB2 for a '?' character - ld bc,11 ; Characters to scan - ld a,'?' ; Reference character - cpir - jr jrtrue ; True if '?' found; false if not - - endif ; ifambig - -;----------------------------------------------------------------------------- - -; Condition: COMPRESSED - - if ifcompr - -ifccompr: - ld a,(fcb2+10) ; Get middle character of file type - cp 'Z' ; Crunched - jr z,ifctrue - cp 'Q' ; Squeezed - jr jrtrue - - endif ; ifcompr - -;----------------------------------------------------------------------------- - -; Condition: TRUE -; IFCTRUE enables an active IF -; Condition: FALSE -; IFCFALSE enables an inactive IF - - if ifoempty or ifoerror or ifoexist or ifowheel -jrfalse: - jr z,ifcfalse - endif ; Ifoempty or ifoerror or ifoexist or ifowheel - -ifctrue: - - if ifoneg - call negtest ; Test for negate - jr z,ifcf - endif ; ifoneg - -ifct: - ld b,0ffh ; Active - jp ifset - - if iforeg or ifambig or ifcompr or ifoinput or ifonull -jrtrue: - jr z,ifctrue - endif ; Iforeg or ifambig or ifcompr or ifoinput or ifonull - -ifcfalse: - - if ifoneg - call negtest ; Test for negate - jr z,ifct - endif ; ifoneg - -ifcf: - ld b,0 ; Inactive - jp ifset - -;----------------------------------------------------------------------------- - -; Condition: EMPTY filename.typ - - if ifoempty -ifcempty: - call tlog ; Log into FCB2's DU - ld de,fcb2 ; Pt to fcb2 - ld c,15 ; Open file - push de ; Save fcb ptr - call bdos - pop de - inc a ; Not found? - jr z,ifctrue - ld c,20 ; Try to read a record - xor a ; set cr value to zero - ld (fcb2+32),a ; to attempt to read first record - call bdos - or a ; 0=OK - jr jrfalse ; true if no read - endif ; ifoempty - -;----------------------------------------------------------------------------- - -; Condition: ERROR - - if ifoerror -ifcerror: - ld a,(z3msg+6) ; Get error byte - or a ; 0=FALSE (no error registered) - jr jrfalse - endif ; ifoerror - -;----------------------------------------------------------------------------- - -; Condition: EXIST filename.typ - - if ifoexist -ifcex: - call tlog ; Log into DU - ld de,fcb2 ; Pt to fcb - ld c,17 ; Search for first - call bdos - inc a ; Set zero if error - jr jrfalse - endif ; Ifoexist - -;----------------------------------------------------------------------------- - -; Condition: INPUT (from user) - -; Modified to say " (Y/N)? ", and accept ONLY Y or y or N or n -; Carson Wilson 3/1/88 - - if ifoinput -ifcinput: - call print - dc ' (Y/N)? ' -ifcinp1: - ld hl,z3msg+7 ; Pt to ZEX message byte - ld (hl),10b ; Suspend ZEX input - push hl ; Save ptr to ZEX message byte -ifcinp2: - ld e,0ffh - ld c,6 ; Direct input from console - call bdos - or a ; Any input yet? - jr z,ifcinp2 ; Nope, try again - - pop hl ; Get ptr to ZEX message byte - ld (hl),0 ; Return ZEX to normal processing - and 5fh ; Mask and capitalize user input - cp 'Y' - jr nz,testN ; No, check if 'N' - call conout ; Display 'Y' - jr ifctrue ; Process as true -testN: - cp 'N' - jr nz,notN ; Not 'N' or 'n' - call conout ; Display 'N' - jr ifcfalse ; Process as false -notN: - ld a,bell ; Protest! - call conout - jr ifcinp1 ; Force either Y or y or N or n - - endif ; ifoinput - -;----------------------------------------------------------------------------- - -; Condition: NULL (2nd file name) - - if ifonull -ifcnull: - ld a,(fcb2+1) ; Get first char of 2nd file name - cp ' ' ; Space = null - jr jrtrue - endif ; ifonull - -;----------------------------------------------------------------------------- - -; Condition: TCAP - - if ifotcap -ifctcap: - ld a,(z3env+80h) ; Get first char of Z3 TCAP Entry - cp ' '+1 ; Space or less = none - jP c,ifcfalse - jP ifctrue - endif ; ifotcap - -;----------------------------------------------------------------------------- - -; Condition: WHEEL - - if ifowheel -ifcwheel: - ld hl,(z3env+29h) ; Get address of wheel byte - ld a,(hl) ; Get byte - or a ; Test for true - jP jrfalse ; False if 0 - endif ; ifowheel - -;============================================================================= -; -; S U P P O R T R O U T I N E S -; -;============================================================================= - -; Convert chars in FCB2 into a number in B - - if iforeg -getnum: - ld b,0 ; Set number - ld hl,fcb2+1 ; Pt to first char -getn1: - ld a,(hl) ; Get char - inc hl ; Pt to next - sub '0' ; Convert to binary - ret c ; Done if error - cp 10 ; Range? - ret nc ; Done if out of range - ld c,a ; Value in C - ld a,b ; A=old value - add a,a ; *2 - add a,a ; *4 - add a,b ; *5 - add a,a ; *10 - add a,c ; Add in new digit value - ld b,a ; Result in B - jr getn1 ; Continue processing - endif ; iforeg - -;----------------------------------------------------------------------------- - -; Log into DU in FCB2 - - if ifoexist or ifoempty - -tlog: - ld a,(fcb2) ; Get disk - or a ; Current? - jr nz,tlog1 - ld c,25 ; Get disk - call bdos - inc a ; Increment for following decrement -tlog1: - dec a ; A=0 - ld e,a ; Disk in E - ld c,14 - call bdos - ld a,(fcb2+13) ; Pt to user - ld e,a - ld c,32 ; Set user - jp bdos - - endif ; ifoexist or ifoempty - -;----------------------------------------------------------------------------- - -; Test of Negate Flag = negchar - - if ifoneg -negtest: -negflag equ $+1 ; Pointer for in-the-code modification - ld a,0 ; 2nd byte is filled in - cp negchar ; Test for No - ret - endif ; ifoneg - -;----------------------------------------------------------------------------- - -; Test FCB1 against a single digit (0-9) -; Return with register value in A and NZ if so - - if iforeg -regtest: - ld a,(de) ; Get digit - sub '0' - jr c,zret ; Z flag for no digit - cp 10 ; Range? - jr nc,zret ; Z flag for no digit - ld hl,z3msg+30h ; Pt to registers - add a,l ; Pt to register - ld l,a - ld a,h ; Add in H - adc 0 - ld h,a - xor a ; Set NZ - dec a - ld a,(hl) ; Get register value - ret -zret: - xor a ; Set Z - ret - endif ; iforeg - -;----------------------------------------------------------------------------- - -; Test to see if a current IF is running and if it is FALSE -; If so, return with Zero Flag Set (Z) -; If not, return with Zero Flag Clear (NZ) -; Affect only HL and PSW - -iftest: - call msgbf1 ; Test for active IF - jr z,ifok ; No active IF - and (hl) ; Check active flag - ret z ; Return Z since IF running and FALSE -ifok: - or 255 ; Return NZ for OK - ret - -msgbf1: - ld hl,z3msg+1 ; Get IF active flag - ld a,(hl) - inc hl ; Pt to If status byte - or a ; Set z if no IF active - ret - -;----------------------------------------------------------------------------- - -; Test FCB1 against condition table (must have 2-char entries) -; Return with routine address in HL if match and NZ flag - -condtest: - ld hl,condtab ; Pt to table -condt1: - ld a,(hl) ; End of table? - or a - ret z - ld a,(de) ; Get char - cp (hl) ; Comppare entries - inc hl ; Pt to next - inc de - jr nz,condt2 - ld a,(de) ; Get 2nd char - cp (hl) ; Compare - jr nz,condt2 - inc hl ; Pt to address - ld a,(hl) ; Get address in HL - inc hl - ld h,(hl) - ld l,a ; HL = address - jr ifok ; Set NZ for OK -condt2: - inc hl ; Pt to next entry - inc hl ; Skip over addr - inc hl - dec de ; Pt to 1st char of condition - jr condt1 - -;----------------------------------------------------------------------------- - -; Turn on next IF level -; B register is 0 if level is inactive, 0FFH if level is active - -ifset: -; ld hl,z3msg+1 ; Get IF flag -; ld a,(hl) -; or a ; If no if at all, start 1st one - - call msgbf1 - dec hl - - jr z,ifset1 -ifset0: - add a,a ; Advance to next level - jr c,iferr ; Check for overflow (8 IFs max) - ld (hl),a ; Set IF byte - jr ifset2 -ifset1: - inc a ; A=1 - ld (hl),a ; Set 1st IF -ifset2: - ld d,a ; Get IF byte - and b ; Set interested bit - ld b,a - inc hl ; Pt to active flag - ld a,d ; Complement IF byte - cpl - and (hl) ; Mask in only uninterested bits - or b ; Mask in interested bit - ld (hl),a ; Save result - - if noise - jp ifstat ; Print status and exit - else - ret ; Or just exit - endif ; noise - -iferr: - call print ; Beep to indicate overflow - dc bell - ret - -;============================================================================= -; -; T R A N S I E N T I F P R O C E S S I N G -; -;============================================================================= - - - if comif - -runcomif: - -; First we have to find IF.COM - - ld bc,100h*(ifdrv-'A')+ifusr ; Values to use if null path - - if pathroot - - ld hl,(expath) ; Point to symbolic path (indirect) -fndroot: - ld a,(hl) ; Check for end of path - or a - jr z,froot2 ; If end, branch - -; Process Next Path Element - - cp curint ; Current disk/user symbol? - jr nz,froot0 ; If not, branch - ld a,(curdr) ; Get current disk - inc a ; Compensate for following decrement -froot0: - dec a ; Shift to range 0..15 - ld b,a ; Set disk - inc hl ; Point to user in path - ld a,(hl) ; Get user - cp curint ; Current drive/user symbol? - jr nz,froot1 ; If not, branch - ld a,(curusr) ; Get current user -froot1: - ld c,a ; Set user - inc hl ; Point to next element in symbolic path - jr fndroot - -; Done with Search - BC Contains ROOT DU (or specified DU if path is empty) - - endif ; pathroot - -froot2: - call logbc ; Log into IF.COM's directory - -; Try to Open File IF.COM - - ld de,extfcb ; Point to command FCB - xor a - ld (de),a ; Force current drive - ld c,15 ; Open file - call bdos - inc a - jr nz,ifload ; Branch if file found - -; IF.COM not found - process as IF F - -ifnotfnd: - call iferr ; Ring bell - call reset ; Return home - jp ifcf - -; Load File IF.COM - -ifload: - call defdma ; First record to tbuff - call readcmd ; Read 1st record from IF.COM - jr nz,ifnotfnd ; If eof, treat as if file not found - - ld (extfcb+32),a ; Start from scratch (record 0) - ld a,(tbuff+8) - cp 3 - jr c,ifnotfnd ; Only Types 3 and 4 are acceptable - - call loadif ; Load IF.COM and set IFADR appropriately -; -; Build the command tail at tbuff -; - ld de,tbuff ; Point DE to tbuff - push de ; Save it for later - ld hl,(z3msg+4) ; Points into MCL buffer -; -; Advance HL to first 'space' after IF or .IF or :IF -; -advsp: inc hl - ld a,(hl) - cp ' '+1 ; Carry if space or null - jr nc,advsp - - ld c,0 ; Clear a counter - -putt: inc de ; Advance tbuff pointer - ld a,(hl) ; From MCL - ld (de),a ; To tbuff - inc hl ; Advance MCL pointer - or a ; Check for null - jr z,putx ; End of command line - cp ';' ; Command separator - jr z,putx ; End of command - inc c ; Count it up - jr putt ; Next.. - -putx: xor a ; Get a null - ld (de),a ; Terminate the line in tbuff - pop hl ; Beginning of tbuff - ld (hl),c ; Character count -; -; Pick up the execution address for Type 3 or 4 -; - ld hl,(ifadr) ; Load address - ld a,(hl) ; First byte at load address - cp 0c7h ; Test for RST 0 - jr nz,runif ; Nope, execute it - ld (hl),0c3h ; Plug in a JP -; -; Arrive here to execute IF.COM -; -runif: ld hl,z3env ; Pass environment in HL - db 0c3h ; JP instruction -ifadr: dw 0 ; Load/Execution address of IF.COM - -; -; Load IF.COM -; -loadif: - ld hl,(tbuff+11) ; Type 3 load address - jr z,loada ; Load as Type 3 -; -; Assume Type 4 (or higher) -; - ld hl,extfcb+32 ; Point to CR of extfcb - ld (hl),2 ; Set up for record 2 - push hl ; Save the pointer - call readcmd ; Get it into tbuff - pop hl - jp nz,ifnotfnd ; Too short - ld (hl),a ; Record 0 again - ld hl,(tbuff+11) ; Size word - push hl ; Save it - call readcmd ; Read record 0 again - pop bc ; Size - ld de,(ccp) ; CCP start - ld hl,z3env - dec a ; Phony fullget flag - call tbuff+9 ; Call Type 4 loader - push hl ; Save load address - call readcmd ; Read record 1 to tbuff (point to record 2) - pop hl ; Load address -; -loada: ld (ifadr),hl ; Save it -; -; Load IF.COM to (HL) until end of file, reset DMA and DU and return -; -load: push hl ; Save loading address - call setdma ; According to HL - call readcmd ; Read a record from file - pop hl ; Get current loading address back - jr nz,reset ; End of file - ld de,128 ; Advance it by one record - add hl,de - jr load ; Back to read some more - -; Reset DMA and Current DU - -reset: call defdma - ld bc,(curusr) ; Return home - -; Log Into DU in BC - -logbc: ld e,b ; Set disk - push bc - ld c,14 ; Select disk - call bdos - pop bc - ld e,c ; Set user - ld c,32 ; Select user - jp bdos - - -; Set default DMA address - -defdma: ld hl,tbuff - -; Set DMA to address according to HL - -setdma: push hl ; Save it - ex de,hl ; To DE - ld c,26 ; Set DMA command - call bdos ; Do it - pop hl ; DMA address - ret - -; Read a record from file in EXTFCB - -readcmd: - ld de,extfcb - ld c,20 - call bdos - or a ; Set NZ if error (end of file) - ret - - endif ; comif - -;============================================================================= -; -; U T I L I T Y S U B R O U T I N E S -; -;============================================================================= - -; Print "IF " - -prif: - call print - dc 'IF ' - ret - -;----------------------------------------------------------------------------- - -; Print String (terminated in 0 or MSB Set) at Return Address - -print: - ex (sp),hl ; Get address - call print1 - ex (sp),hl ; Put address - ret - -; Print String (terminated by MSB Set) pted to by HL - -print1: - ld a,(hl) ; Done? - inc hl ; Pt to next - call conout ; Print char - or a ; Set msb flag (m) - ret m ; Msb terminator - jr print1 - -;----------------------------------------------------------------------------- - -; Console Output Routine - -conout: - push hl ; Save regs - push de - push bc - push af - and 7fh ; Clear msb - ld e,a ; Char in E - ld c,2 ; Output - call bdos - pop af ; Get regs - pop bc - pop de - pop hl - ret - -;============================================================================= -; -; Display current length in records -; -prtval macro m1,v1,m2,v2,m3 - .radix 10 - .printx m1 v1 m2 v2 m3 - endm - -length equ $ - start -recs equ length / 128 -bytes equ length mod 128 - - .printx - prtval ,%recs,,%bytes, - .printx - - end - -; End of NZFCP.Z80 - \ No newline at end of file diff --git a/Source/BPBIOS/NZFCP13/z34cmn.lib b/Source/BPBIOS/NZFCP13/z34cmn.lib deleted file mode 100644 index ad8c8cec..00000000 --- a/Source/BPBIOS/NZFCP13/z34cmn.lib +++ /dev/null @@ -1,105 +0,0 @@ -; -; Library: Z34CMN.LIB -; Author: Carson Wilson -; Version: 1.2 -; Date: 16 June 1988 -; Changes: Renamed CRT0 to LINS for NZCOM compatibility. -; Added CUSR " " " - -; Author: Carson Wilson -; 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 - -z3whl equ z3env+29h ; Wheel byte address -z3whls equ yes ; There is a wheel - -lins equ z3env+33h ; CRT text lines address - -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 - -clrscr equ z3env+97h ; Clear screen string address - - 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 - -rsdmsg equ z3msg+3ah ; Reserved bytes - - 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 - - \ No newline at end of file diff --git a/Source/BPBIOS/NZFCP13/z34mac.lib b/Source/BPBIOS/NZFCP13/z34mac.lib deleted file mode 100644 index 8ab3ffbe..00000000 --- a/Source/BPBIOS/NZFCP13/z34mac.lib +++ /dev/null @@ -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, - - 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 - - \ No newline at end of file diff --git a/Source/BPBIOS/WW.Z3T b/Source/BPBIOS/WW.Z3T deleted file mode 100644 index 004cc957..00000000 Binary files a/Source/BPBIOS/WW.Z3T and /dev/null differ diff --git a/Source/BPBIOS/Z34RCP11/Build.cmd b/Source/BPBIOS/Z34RCP11/Build.cmd deleted file mode 100644 index 1965203f..00000000 --- a/Source/BPBIOS/Z34RCP11/Build.cmd +++ /dev/null @@ -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 diff --git a/Source/BPBIOS/Z34RCP11/Clean.cmd b/Source/BPBIOS/Z34RCP11/Clean.cmd deleted file mode 100644 index a088f4e8..00000000 --- a/Source/BPBIOS/Z34RCP11/Clean.cmd +++ /dev/null @@ -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 diff --git a/Source/BPBIOS/Z34RCP11/Makefile b/Source/BPBIOS/Z34RCP11/Makefile deleted file mode 100644 index 7d8b55f8..00000000 --- a/Source/BPBIOS/Z34RCP11/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -OBJECTS = z34rcp11.rel -TOOLS = ../../../Tools -DEST = - -include $(TOOLS)/Makefile.inc diff --git a/Source/BPBIOS/Z34RCP11/cledinst.com b/Source/BPBIOS/Z34RCP11/cledinst.com deleted file mode 100644 index c26a3cf0..00000000 Binary files a/Source/BPBIOS/Z34RCP11/cledinst.com and /dev/null differ diff --git a/Source/BPBIOS/Z34RCP11/cledsave.com b/Source/BPBIOS/Z34RCP11/cledsave.com deleted file mode 100644 index dde04bc1..00000000 Binary files a/Source/BPBIOS/Z34RCP11/cledsave.com and /dev/null differ diff --git a/Source/BPBIOS/Z34RCP11/nzrcp.z80 b/Source/BPBIOS/Z34RCP11/nzrcp.z80 deleted file mode 100644 index 52b844e3..00000000 --- a/Source/BPBIOS/Z34RCP11/nzrcp.z80 +++ /dev/null @@ -1,3010 +0,0 @@ - -; New Name: NZRCP.Z80 Joe Wright July 1987 - -; Program: Z34RCP -; Version: 1.0 -; Description: Resident Command Package (RCP) for ZCPR34 -; Author: Jay Sage -; Date: March 1, 1987 -; Derivation: SYSRCP (Richard Conn) and many other contributions - -; ZCPR34 is copyright 1987 by Jay P. Sage. All rights reserved. End-user -; distribution and duplication permitted for non-commercial purposes only. -; Any commercial use of ZCPR34, defined as any situation where the duplicator -; recieves revenue by duplicating or distributing ZCPR34 by itself or in -; conjunction with any hardware or software product, is expressly prohibited -; unless authorized in writing by Jay P. Sage. - -version equ 2 -subver equ 4 - -; Vers 2.4 - Add whlchk subroutine for indirect addressing of wheel byte. -; 4 Apr 88 - Fixed command list routines. -; Joe Wright - Inhibit SPOP if there is no shell. Allow shstks = 1. - -; Vers 2.3 - Reset command, after calling F37, jumps to 0. -; 22 Feb 88 - -; Vers 2.2 - Modified for use of Z34CMN.LIB and NZ-COM. -; 31 Dec 87 -; Joe Wright - - -; Vers 2.1 - R command uses ZRDOS function 37 to reset drives. -; 6 Sep 87 - WHL command changed, WHLQ disappears. -; Joe Wright - REG command expanded. Add REG E (program error byte) -; - SPOP command added. Pops the shell stack - -;============================================================================= -; -; D E F I N I T I O N S S E C T I O N -; -;============================================================================= - - name ('RCP') - - maclib z34cmn.lib ; Defines ZCPR system addresses - maclib z34defn.lib ; Defines offsets in Z34 command processor - maclib z34mac.lib ; Macros - maclib sysdef.lib ; Common logic, sys, ascii defines - maclib nzrcp.lib ; Defines command options - -;============================================================================= -; -; E N T R Y C O D E S E C T I O N -; -;============================================================================= - -start: - db 'Z3RCP' ; Package ID - - -;---------------------------------------- - -; Command table - - db cmdsize ; Length of each command name - cmdtbl ; Dispatch table from Z33RCP.LIB - db 0 ; Marks end of command jump table - - -;---------------------------------------- - -; 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. - -rcpname: - idstring ; From macro in Z33RCP.LIB - -; Include only those code sections that are required. - -; include rcph ; 'H' help (command list) command - page - -; RCP-H.Z80 'H' Command - -;============================================================================= -; -; H E L P C O M M A N D -; -;============================================================================= - -; This command displays a list of all resident commands that are supported, -; including those in the CPR (command processor), RCP, and FCP. - -clist: - -; Print the CPR-resident command names - - if listcpr - - call print ; Print "CPR" - db lf - db 'CP','R'+80h -; - ld hl,(ccp) ; CCP location from Z3ENV - ld de,offcmd ; Offset to CPR command table - add hl,de - call cmdlist ; Display the list of commands - - endif ;listcpr - -; Print the FCP-resident command names - - if listfcp - - ld hl,(fcp) - ld a,h - or l - jr z,rcplist ; No FCP - - ld a,(hl) - or a - jr z,rcplist ; FCP removed - - call print ; Print header for FCP - db lf - db 'FC','P'+80h - ld de,5 - add hl,de ; Point to FCP command table - call cmdlist - - endif ;listfcp - -; Print the RCP-resident command names - -rcplist: - if listrcp - - call crlf ; Skip a line - ld hl,rcpname ; Print RCP name - call printhl - ld hl,start+5 ; Point to RCP command table - - else - - ret - - endif ;listrcp - - ; 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 whlchk ; Check wheel byte - 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 - ld a,' ' -cmdlist3: - call conout - 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 RCP-H.Z80 - -;============================================================================= -; -; P O P S H E L L S T A C K C O M M A N D -; -;============================================================================= - -; -; POP the Shell Stack -; - if spopon - -; Pop the shell stack - -spop: ld hl,(z3env+1eh) ; SHSTK (indirect) - ld a,h - or l - ret z ; No shell stack - - ex de,hl ; SHSTK to DE - ld hl,(z3env+20h) ; SHSTKS to L, SHSIZE to H - push hl ; Save SHSIZE - xor a ; Your basic null in A - ld b,l - dec b ; SHSTKS-1 in B - jr z,sp0a ; Clear one entry - - push de ; Save SHSTK - ld e,h ; SHSIZE to E - ld d,a ; Clear D - ld h,a ; Clear H.. - ld l,a ; ..and L -sp0: add hl,de ; Multiply SHSIZE*(SHSTKS-1) - djnz sp0 - ld b,h - ld c,l ; Length to BC - ex de,hl ; SHSIZE to HL - pop de ; Get SHSTK (destination) - add hl,de ; SHSTK+SHSIZE to HL (Source) - ldir - -sp0a: pop bc ; Get SHSIZE in B -sp1: ld (de),a ; Clear last entry - inc de - djnz sp1 - ret - endif ; SPOPON - - - if clson -; include rcpcls ; 'CLS' clear screen command - page - -; RCP-CLS.Z80 'CLS' Command - -;============================================================================= -; -; C L E A R S C R E E N C O M M A N D -; -;============================================================================= - -; 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,(z3env+80h) ; Get beginning of tcap - cp ' '+1 ; See if blank or perhaps null - jr nc,cls1 ; If not, go to clear screen code - call print ; If blank, then give error message - db ' No TCA','P'+80h - ret - -cls1: ld hl,z3env+97h ; Point to beginning of clear screen string - jp printhl ; Display it - - else ; Not using tcap - - call print - clsstr ; String from Z33RCP.LIB - ret - - endif ;clstcap - -; End RCP-CLS.Z80 - - endif ;clson - - if reson -; include rcpr ; 'R' disk reset command - page - -; RCP-R.Z80 'R' command - -;============================================================================= -; -; D I S K R E S E T C O M M A N D -; -;============================================================================= - -; Command: RESET -; Function: Reset the disk system -; 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 performed, the disk in drive A need not have the -; operating system on it. -; Ver 2.1 Now logs all drives off and forces fixed and ram disks to -; re-log. -reset: - if resmsg ; If displaying a reset message - call print ; Report action - dc ' Reset' - endif ;resmsg - - ld de,-1 ; All 16 drives - ld c,37 ; Disks reset ZRDOS function - call bdos - ld c,13 ; Reset disk system - jp bdos - -; End RCP-R.Z80 - - endif ;reson - - if tston -; include rcptst ; 'TST' error test command - page - -; RCP-TST.Z80 'TST' Command - -;============================================================================= -; -; E R R O R T E S T C O M M A N D -; -;============================================================================= - -; Command: TST -; Function: To set the message buffer program error flag based on -; error count reported by M80 or L80 -; Syntax: TST PN where PN is (at least) the first letter of M80 or L80 - -testerr: - -; Check for name of program to test - - ld a,(fcb1+1) ; Get first character in program name - - if testm80 - ld hl,m80f ; Preset for m80 test counts - ld de,m80w - cp 'M' - jr z,testcount - endif ; Testm80 - - if testf80 - ld hl,f80f - ld de,f80w - cp 'F' - jr z,testcount - endif ; Testf80 - -; If no match, give error message - - call print - db 'bad nam','e'+80h - -testcount: - ld a,(hl) ; Test first error count word - inc hl - or (hl) - ex de,hl ; Test second word - or (hl) - inc hl - or (hl) - ld hl,z3msg+6 ; Point to program error flag - ld (hl),0 ; Clear it - ret z ; If counts were zero, we are done - ld (hl),0ffh ; Else set the error flag - ret - -; End RCP-TST.Z80 - - endif ;tston - - if spaceon -; include rcpsp ; 'SP' space on disk command - page - -; RCP-SP.Z80 'SP' Command - -;============================================================================= -; -; D I S K S P A C E C O M M A N D -; -;============================================================================= - -; 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. - - if [erasp or cpsp or dirsp] -crspace: ; Used to call space after other subroutines - call crlf ; Start new line - endif ;[erasp or cpsp or dirsp] - -space: - ld a,(fcb1) ; Determine requested drive - or a ; If drive explicitly selected - jr nz,space1 ; ..then skip - - ld c,25 ; BDOS get current drive function - call bdos - 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' ; 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) - -dparams: - 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 MAXBLK 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 - -free6: - call print - db ' Space on ' -seldrv: db 0 ; Modified above to contain drive letter - db ':',[' '+80h] - -; Display decimal value of HL - - 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 - ld a,'K' - jp conout ; Final return from space routine - -; End RCP-SP.Z80 - - endif ;spaceon - - if diron -; include rcpdir ; 'DIR' directory command - page - -; RCP-DIR.Z80 'DIR' Command - -;============================================================================= -; -; D I R E C T O R Y D I S P L A Y C O M M A N D -; -;============================================================================= - -; Command: DIR -; Function: Display a directory of the files on disk -; Syntax: DIR Displays the DIR files -; DIR S Displays the SYS files -; DIR A Display both DIR and SYS files -; DIR /S Equivalent to DIR *.* S -; DIR /A Equivalent to 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: - ld b,11 ; Prepare to fill FCB name and type with '?' - cp ' ' ; See if no file spec given - ld a,'?' ; Get ready to fill with '?' - call z,fillp ; ..carry out fill - - if nosys ; Suppress-SYS-file-if-no-wheel option - call whlchk ; Check wheel byte - 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 - ld e,width ; Count down to 0 -; -; 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 if 4 entries printed in line - jr nz,dir3a ; Continue - call crlf ; New line - ld e,width ; Reset entry count - ld a,e ; Get entry count -dir3a cp width ; First entry? - jr z,dir4 - call print -; - if wide -; - db ' ' ; 2 spaces - db fence ; Then fence char - 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 RCP-DIR.Z80 - - endif ;diron - - if eraon -; include rcpera ; 'ERA' erase command - page - -; RCP-ERA.Z80 'ERA' Command - -;============================================================================= -; -; E R A S E C O M M A N D -; -;============================================================================= - -;Command: ERA -;Function: Erase files -;Forms: -; ERA Erase Specified files and print their names -; ERA I 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 - 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 rotest ; Test file pted to by hl for r/o - jr nz,era3 -eraflg equ $+1 ; Address of flag - ld a,0 ; 2nd byte is flag - cp 'I' ; Is it an inspect option? - jr nz,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 RCP-ERA.Z80 - - endif ;eraon - - if lton -; include rcplt ; 'LIST' and 'TYPE' commands - page - -; RCP-LT.Z80 - -;============================================================================= -; -; L I S T A N D T Y P E C O M M A N D S -; -;============================================================================= - -;Command: LIST -;Function: Print out specified file on the LST: Device -;Forms: -; LIST Print file (NO Paging) -;Notes: -; The flags which apply to TYPE do not take effect with LIST - - if liston -list: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED - - - call retsave - ld a,0ffh ; Turn on printer flag - jr type0 - endif ;liston - -;Command: TYPE -;Function: Print out specified file on the CON: Device -;Forms: -; TYPE Print file -; TYPE 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: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; -; - call retsave - xor a ; Turn off printer flag -; -; ENTRY POINT FOR CPR LIST FUNCTION (LIST) -; -type0: - if liston - ld (prflg),a ; Set flag - endif ; Liston - - ld a,(fcb2+1) ; Get page flag - ld (pgflg),a ; Save it as a flag - ld a,1 ; Select dir files - call getdir ; Allow ambiguous files (HL points to buffer) - jp z,prfnf ; No files - jr typex2 - - ; Entry point for successive files -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 list output - or a ; 0=type - jr z,typex1 - ld a,cr ; Bol on printer - call lcout - ld a,ff ; Form feed the printer - call lcout - jr typex2 - endif ; Liston - -typex1: -; LDA PAGCNT ; If we've just done so, - push hl - ld hl,(pagcnt) - ld a,(hl) - pop hl - cp nlines-2 ; Don't type another - call nz,pagebreak ; Page break message -typex2: - 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,prfnf ; Abort if error -; MVI A,NLINES-2 ; Set line count -; STA PAGCNT - ld hl,(pagcnt) - ld (hl),nlines-2 - 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 -; PUSH H ; Read next block - push bc - ld de,fcb1 ; Pt to fcb - ld c,20 ; Read record - call bdos - or a ; Set flags - pop bc -; POP H - 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 -; -; OUTPUT CHAR AND INCREMENT CHAR COUNT -; - call lcout ; Output char - inc b ; Increment tab count - jr type6 -; -; OUTPUT OR AND RESET TAB COUNT -; -type4: - call lcout ; Output or - ld b,0 ; Reset tab counter - jr type6 -; -; TABULATE -; -type5: - ld a,' ' ; - 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 - call break ; Check for abort - jp z,typex ; Skip - jr type2 -; -; 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 - jr nz,lc2 - if liston - ld a,(prflg) ; Output to lst:? - or a ; Nz = yes - jr nz,lc2 - endif ; Liston -; -; CHECK FOR PAGING -; -; LXI H,PAGCNT ; Count down - ld hl,(pagcnt) - dec (hl) - jr nz,lc2 ; Jump if not end of page - ld (hl),nlines-2 ; Refill 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 -; - call pagebreak ; Print page break message - jp z,typex ; Z to skip -lc2: - pop bc ; Restore regs - pop hl - ret -; -; PRINT PAGE BREAK MESSAGE AND GET USER INPUT -; ABORT IF ^C, RZ IF ^X -; -pagebreak: - 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 - push af - call crlf ; New line - pop af - jp break1 -; -; End RCP-LT.Z80 - - endif ;lton - - if renon -; include rcpren ; 'REN' rename command - page - -; RCP-REN.Z80 - -;Section 5E -;Command: REN -;Function: To change the name of an existing file -;Forms: -; REN = Perform function -; -ren: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - - call retsave -; -; -; STEP 1: CHECK FOR FILE 2 BEING AMBIGUOUS -; - ld hl,fcb2+1 ; Can't be ambiguous - call ambchk1 -; -; STEP 2: LOG INTO USER AREA -; - call logusr ; Log into user area of fcb1 -; -; STEP 3: SEE IF OLD FILE IS R/O -; - ld hl,fcb1 ; Pt to 1st fcb - push hl - ld de,fcb2 ; Pt to 2nd file - push de ; Save ptr - ld a,(hl) ; Get 1st's drive - ld (de),a ; Stuff into second fcb - ld c,17 ; Look for file - call bdos - inc a - jp z,prfnf - call getsbit ; 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 - jp nz,exit -; -; 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 - jp z,exit ; 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 - jp z,prfnf ; Print no source file message - jp exit -; -; -; End RCP-REN.Z80 - - endif ;renon - - if proton -; include rcpprot ; 'PROT' file attribute setting command - page - -; RCP-PROT.Z80 - -;Section 5F -;Command: PROT -;Function: To set the attributes of a file (R/O and SYS) -; -;Form: -; PROT afn RSI -;If either R or S are omitted, the file is made R/W or DIR, resp; -;R and S may be in any order. If I is present, Inspection is enabled. - -att: - call retsave - xor a ; Set no inspect - ld (inspect),a - ld hl,0 ; Set r/o and sys attributes off - ld de,fcb2+1 ; Pt to attributes - ld b,3 ; 3 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 -att2: - djnz att1 - jr att3 -atti: - ld (inspect),a ; Set flag - jr att2 -attr: - ld h,80h ; Set r/o bit - jr att2 -atts: - ld l,80h ; Set sys bit - jr att2 -att3: - ld (fatt),hl ; Save file attributes - ld a,1 ; Select dir and sys files - call getdir ; Load directory - jp z,prfnf ; No file error - 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 - 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,(fatt) ; 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 ' and SY','S'+80h -att7: -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 -fatt equ $+1 ; Ptr for in-the-code modification - ld hl,0 ; Get attributes - dec de ; Pt to sys byte - dec de - ld a,l ; Get sys flag - call attset ; Set attribute correctly - dec de ; Pt to r/o byte - ld a,h ; Get r/o flag - call attset - ld de,fcb1 ; Pt to fcb - ld c,30 ; Set attributes - call bdos - jr att4 -attset: - or a ; 0=clear attribute - jr z,attst1 - ld a,(de) ; Get byte - or 80h ; Set attribute - ld (de),a - ret -attst1: - ld a,(de) ; Get byte - and 7fh ; Clear attribute - ld (de),a - ret -; -; End RCP-PROT.Z80 - - endif ;proton - - if cpon -; include rcpcp ; 'CP' file copying command - -; RCP-CP.Z80 - -;============================================================================= -; -; F I L E C O P Y C O M M A N D -; -;============================================================================= - -; Command: CP -; Function: Copy a file from one place to another -; Syntax: CP destfile=srcfile -; CP srcfile -; 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. - -copy: - call retsave - -; 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 c,25 ; Get-current-disk BDOS function - call bdos ; Get it in case no drive given explicitly - 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 - jr cperr ; Branch to error code if they are the same - -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 - ld hl,(srcfcb) ; 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 file - call bdos - inc a ; Check for error - jp z,prfnf ; Branch if file not found - -; Make sure destination file does not already exist - - call logdest ; Log into destination s user area - call extest ; Test for existence of file - jp z,exit ; Branch if it exists - -; 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) - jr nz,copy5 ; Branch if OK - -; Report file error - -cperr: - call print - db ' Copy','?'+80h - jp exit - -; Copy source to destination with buffering - -;++++++++++ this should be done by changing DMA address to save all the -; buffer swapping - -copy5: - call logsrc ; Log in source user area - ld b,0 ; Initialize counter - ld hl,(cbuff) ; Initialize buffer pointer - -copy5a: - push hl ; Save address and counter - push bc - ld hl,(srcfcb) ; Point to source file FCB - ex de,hl ; Put it in DE for BDOS call - 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 - - push bc ; Save counter - ld hl,tbuff ; Copy from 80h to buffer - ld b,128 ; 128 bytes - call blkmov - ex de,hl ; HL points to next buffer address - pop bc ; Get counter back - inc b ; Increment it - 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 hl,0 ; Point to beginning of copy buffer -copy5c: - ld de,tbuff ; Copy into tbuff - ld b,128 ; 128 bytes - call blkmov - push hl ; Save pointer to next block - ld de,fcb1 ; Point to destination file FCB - ld c,21 ; Write the block - call bdos - or a - jr nz,cperr ; Branch on error (disk full of write error) - pop hl ; Get back pointer to next block - pop bc ; Get count -; djnz copy5 ; Work through the blocks - dec b ; - jr z,copy5 ; - push bc ; Save count - jr copy5c ; Back for another bufferful - -; 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 - call print - db ' Don','e'+80h - - 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 RCP-CP.Z80 - - endif ;cpon - - if peekon or pokeon or porton -; include rcpiom ; 'PEEK', 'POKE', 'PORT' commands - page - -; RCP-IOM.Z80 - -; Command: PEEK -; Function: Display memory contents -; -; Form: -; PEEK startadr 256 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,255 ; 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 print - db ' '+80h - djnz peek0a - - ld b,16 ; Display 16 column headers -peek0b: - ld a,l - and 03h - call z,spac - - call spac - call spac - ld a,l ; Get low byte of address - and 0fh ; Display low hex digit - call pah - inc hl - djnz peek0b - - if peekbdr - call crlf - ld b,8 -peek0c: - call print - db ' '+80h - djnz peek0c - ld b,16 -peek0d: - ld a,l - and 3 - call z,spac - inc l - call print - db ' -', '-'+80h - djnz peek0d - 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,l - and 03h - call z,spac - - 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 -; -; PRINT A AS 2 HEX CHARS -; PASHC - LEADING SPACE -; - if peekon or [pokeon and not pokeq] or porton -pashc: - push af ; Save a - call spac - pop af -pahc: - push af - rrca ; Exchange nybbles - rrca - rrca - rrca - call pah ; Print hex char - pop af -pah: - and 0fh ; Mask - add a,'0' ; Convert to ascii - cp '9'+1 ; Letter? - jr c,pah1 - add a,7 ; Adjust to letter -pah1: - jp conout -; - endif ; Peekon or [pokeon and not pokeq] or porton -; -;Section 5I -;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 - jr z,noargs ; Arg error - call hexnum ; Convert to number - - if not pokeq - call print - db ' Pok','e'+80h - call adrat ; Print at message - endif - -; 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 -; -; No Argument Error -; - - if pokeon or porton - -noargs: - call print - db ' Arg','?'+80h - jp exit -; - endif ; Pokeon or porton - -; -;Section 5I+ -;Command: PORT -;Function: Display or Set I/O Port Data -; -;Form: -; 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 - jr z,noargs ; Abort if no port address given - call hexnum ; Get start address into de - push hl ; Save pointer to command tail - ld hl,portaddr ; Modify code - ld (hl),e ; Move specified port addr into place - dec hl ; Point to opcode position - ld (hl),0dbh ; Poke 'in' opcode - ex (sp),hl ; Get tail pointer back while saving this one - 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) -paddr: ld b,0 ; ..for both IN and OUT instructions -opcode: - db 0 ; Opcode for IN or OUT inserted by code above -portaddr: - db 0 ; Port address inserted by code above - call pashc - pop hl ; Clean up stack - jp exit - - endif ; Porton - -; End RCP-IOM.Z80 - - endif ;peekon or pokeon or porton - - if regon -; include rcpreg ; 'REG' register operation commands - page - -; RCP-REG.Z80 - -; -;Section 5J -;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 regout ; Print result - -; DECREMENT REGISTER VALUE -; HL PTS TO MEMORY REGISTER ON INPUT - -rdec: - dec (hl) ; Decrement value - jr regout ; 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. -; -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 RCP-REG.Z80 - - endif ;regon - - if whlon or whlqon -; include rcpwhl ; 'WHL' and 'WHLQ' commands - page -; -;Section 5K -;Command: WHL/WHLQ -;Function: Set the Wheel Byte on or off -; -;If WHLQUIET equate is true, then RCP does not report wheel status with WHL -;command. -; -;Form: -; WHL -- turn Wheel Byte OFF -; WHL password -- turn Wheel Byte ON if password is correct -; WHLQ -- find out status of Wheel Byte -; -; Vers 2.1 Changes the function a little as follows: -; -; WHL -- Report Wheel Status (no WHLQ) -; 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 - - if not whlqon - cp ' ' - jr z,whlmsg ; Report wheel status if no password - endif - - 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) ; Indirect from z3env - ld (hl),a -whlq: - if whlquiet - ret - endif - -; PRINT WHEEL BYTE MESSAGE - - if not whlquiet - -whlmsg: - call print - dc ' Wheel ' - call whlchk ; Check wheel byte - jr z,offm - call print - dc 'On' - ret -offm: - call print - dc 'Off' - ret - - endif ;[not whlquiet] or whlqon - - -; WHEEL PASSWORD DEFINED FROM SYSRCP.LIB FILE - - db 'Z'-'@' ; Leading ^z to block attempt to type rcp file -whlpass: - wpass ; Use macro -; -; End RCP-WHL.Z80 - - endif ;whlon - - if echoon -; include rcpecho ; 'ECHO' command - page - -; RCP-ECHO.Z80 - -;============================================================================= -; -; E C H O T E X T T O S C R E E N A N D P R I N T E R -; -;============================================================================= - -; Command: ECHO -; Function: Echo text to console or printer - -echo: - xor a ; Lower case flag setting - - 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 - - if echolst - call getchar ; Get first char after leading blank - ld b,a ; Save first char as list output flag - cp '$' ; Print flag? - jr z,echo2 ; If so, go on - dec hl ; Else backup one character - endif ; Echolst - -; 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 echo2d ; Echo it - -echo2a: cp cmdchar ; Case shift prefix? - jr nz,echo2d ; No, normal echo - call getchar ; Get next character - cp ucasechar ; Up-shift character? - jr z,echo2c ; Store non-zero value in case flag - -echo2b: cp lcasechar ; Lower-case character? - jr nz,echo2d ; No, echo the character as is - xor a ; Else, clear case flag -echo2c: ld (casefl),a - jr echo2 ; On to next character - -echo2d: - call echout ; Send char - jr echo2 - -; FORM FEED - SEND NEW LINE FOLLOWED BY FORM FEED IF PRINTER OUTPUT - - if echolst -echo3: - ld a,b ; Check for printer output - cp '$' - jr nz,echoff ; Send form feed normally if not printer - 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 echo2d - endif ;echolst - -; END OF PRINT LOOP - CHECK FOR PRINTER TERMINATION - -echo4: - if not echolst - - ret - - else - - ld a,b ; Get list mode flag - cp '$' - ret nz ; 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 - 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 console output - - if echolst - ld a,b ; Check for printer output - cp '$' - jr nz,echout1 - inc de ; Add 3 for printer offset - 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 RCP-ECHO.Z80 - - endif ;echoon - -; include rcpsubs ; File of subroutines - page - -; RCPSUBS.Z80 Subroutines for Z33RCP.Z80 - - -;----------------------------------------------------------------------------- - -; Display decimal digit routines - -;-------------------- - -; Display hundreds, tens, and units digits (assumes flag in B has been set) - - if regon or spaceon - -decdsp3: - ld de,100 ; Display hundreds - call decdsp -decdsp2: - ld de,10 ; Display tens - call decdsp - ld a,l ; Get remaining units value - add '0' ; Convert to character - jr conout ; Print it and return - -;-------------------- - -; Routine to print any single digit - -; Actually, this routine displays the value of HL divided by DE and leaves the -; remainder in HL. In computing the character to display, it assumes that the -; result of the division will be a decimal digit. If the result is zero, the -; value in the B register, which is the number of digits already printed, is -; checked. If it is zero, a space is printed instead of a leading '0'. If it -; is not zero, the '0' is printed. Whenever any digit (not a space) is -; printed, the value in B is incremented. - -decdsp: - ld c,'0'-1 ; Initialize digit count - xor a ; Clear carry flag - -decdsp1: - inc c ; Pre-increment the digit - sbc hl,de ; Subtract DE from HL - jr nc,decdsp1 - - add hl,de ; Add back in to produce remainder - ld a,c ; Get decimal digit - cp '0' ; Check for leading 0 - jr nz,decdout ; If not 0, proceed to display it - ld a,b ; Digit printed already? - or a - ld a,' ' ; Possible space for calling routine to print -; ret z ; If no digit printed, return zero flag set - jr z,conout ; Print leading space -decdout: - inc b ; Indicate digit printed - ld a,c ; Else print real digit - ; Fall through to CONOUT - - endif ;regon or spaceon - -;----------------------------------------------------------------------------- - -; Console Output Routine - -conout: - putreg ; Save all register except AF - push af ; Save AF, too - and 7fh ; Mask out MSB - ld e,a ; Transfer character to E - ld c,2 ; BDOS conout function number - call bdos - pop af - getreg ; Restore registers -note: ; Use this RET for NOTE command - ret - - if peekon or [pokeon and not pokeq] or porton -spac: ld a,' ' - jr conout - endif ; peekon or [pokeon and not pokeq] or porton - - -;----------------------------------------------------------------------------- - -; String printing routines - -;-------------------- - -; Print string following call (terminated with null or character with the -; high bit set) - -print: - ex (sp),hl ; Get address - call printhl - ex (sp),hl ; Put address - ret - -;-------------------- - -; Print string pointed to by HL (terminated with null or character with the -; high bit set) - -printhl: - ld a,(hl) ; Get next character - inc hl ; Point to following one - or a ; See if null terminator - ret z ; If so, we are done - call conout ; Display the character - ret m ; We are done if MSB is set (negative number) - jr printhl ; Back for more - -;----------------------------------------------------------------------------- - -; OUTPUT NEW LINE TO CON: - -crlf: - call print - db cr,lf+80h - ret - -; CONSOLE INPUT - - if eraon or lton or proton or renon or cpon - -conin: - push hl ; Save regs - push de - push bc - ld c,1 ; Input - call bdos - pop bc ; Get regs - pop de - pop hl - and 7fh ; Mask msb - cp 61h - ret c - and 5fh ; To upper case - ret - - endif ; Eraon or lton or proton or renon or cpon -; -; SAVE RETURN ADDRESS -; -retsave: - pop de ; Get return address - pop hl ; Get return address to zcpr3 - ld (z3ret),hl ; Save it - push hl ; Put return address to zcpr3 back - push de ; Put return address back - ret - -; - if spaceon and [dirsp or cpsp or erasp] -spaexit: - call crspace ; Show space remaining - endif ; Spaceon and [dirsp or cpsp or erasp] -; -; EXIT TO ZCPR3 -; -exit: -z3ret equ $+1 ; Pointer to in-the-code modification - jp 0 ; Return address - -; -; PRINT A DASH -; - if lton or peekon -dash: - call print - db ' -',' '+80h - ret -; - endif ; Lton or peekon -; -; PRINT ADDRESS MESSAGE -; PRINT ADDRESS IN DE -; - if peekon or pokeon - if not pokeq -adrat: - call print - db ' at',' '+80h - ld a,d ; Print high - call pahc - ld a,e ; Print low - jp pahc - - endif ; Not pokeq - endif ; Peekon or pokeon - - if peekon or pokeon or porton -; -; EXTRACT HEXADECIMAL NUMBER FROM LINE PTED TO BY HL -; RETURN WITH VALUE IN DE AND HL PTING TO OFFENDING CHAR -; -hexnum: - ld de,0 ; De=accumulated value -hnum1: - ld a,(hl) ; Get char - cp ' '+1 ; Done? - ret c ; Return if space or less - inc hl ; Pt to next - sub '0' ; Convert to binary - jr c,numerr ; Return and done if error - cp 10 ; 0-9? - jr c,hnum2 - sub 7 ; A-f? - cp 10h ; Error? - jr nc,numerr -hnum2: - push hl ; Save pointer - ex de,hl - add hl,hl - add hl,hl - add hl,hl - add hl,hl ; DE x16 to HL - ld e,a - ld d,0 - add hl,de - ex de,hl ; DE = DE * 16 + A - pop hl ; Get the pointer - jr hnum1 ; Try again -; -; NUMBER ERROR -; -numerr: - call print - db ' Num','?'+80h - jp exit -; -; SKIP TO NEXT NON-BLANK -; -sksp: - ld a,(hl) ; Get char - inc hl ; Pt to next - cp ' ' ; Skip spaces - jr z,sksp - dec hl ; Pt to good char - or a ; Set eol flag - ret -; - endif ; Peekon or pokeon or porton - -;----------------------------------------------------------------------------- - -; Test File in FCB for unambiguity and existence, ask user to delete if so -; Return with Z flag set if R/O or no permission to delete -; - if renon or cpon -extest: - call ambchk ; Ambiguous file names not allowed - call searf ; Look for specified file - jr z,exok ; Ok if not found - call getsbit ; Position into dir - inc de ; Pt to file name - ex de,hl ; Hl pts to file name - push hl ; Save ptr to file name - call prfn ; Print file name - pop hl - call rotest ; Check for r/o - jr nz,exer - call eraq ; Erase? - jr nz,exer ; Restart as error if no - ld de,fcb1 ; Pt to fcb1 - ld c,19 ; Delete file - call bdos -exok: - xor a - dec a ; Nz = ok - ret -exer: - xor a ; Error flag - file is r/o or no permission - ret - -; -; CHECK FOR AMBIGUOUS FILE NAME IN FCB1 -; RETURN Z IF SO -; -ambchk: - ld hl,fcb1+1 ; Pt to fcb -; -; CHECK FOR AMBIGUOUS FILE NAME PTED TO BY HL -; -ambchk1: - push hl - ld b,11 ; 11 bytes -amb1: - ld a,(hl) ; Get char - and 7fh ; Mask - cp '?' - jr z,amb2 - inc hl ; Pt to next - djnz amb1 - dec b ; Set nz flag - pop de - ret -amb2: - pop hl ; Pt to file name - call prfn - call print - db ' is AF','N'+80h - jp exit -; - endif ; Renon or cpon -; -; TEST FILE PTED TO BY HL FOR R/O -; NZ IF R/O -; - if renon or cpon or eraon -; -rotest: - push hl ; Advance to r/o byte - ld bc,8 ; Pt to 9th byte - add hl,bc - ld a,(hl) ; Get it - and 80h ; Mask bit - push af - ld hl,romsg - call nz,printhl ; Print if nz - pop af ; Get flag - pop hl ; Get ptr - ret -romsg: - db ' is R/','O'+80h -; -; CHECK USER TO SEE IF HE APPROVES ERASE OF FILE -; RETURN WITH Z IF YES -; -eraq: - call print - db ' - Eras','e'+80h - endif ; Renon or cpon or eraon - - if renon or cpon or eraon or proton -eraq1: - call print - db ' (Y/N/Q)?',' '+80h - call conin ; Get response - cp 'Q' ; Quit command? - jp z,exit - cp 'Y' ; Key on yes - ret -; - endif ; Renon or cpon or eraon or proton -; -; INIT FCB1, RETURN WITH DE PTING TO FCB1 -; - if eraon or lton or cpon -initfcb1: - ld hl,fcb1 ; Pt to fcb -initfcb2: - push hl ; Save ptr - ld bc,12 ; Pt to first byte - add hl,bc - ld b,24 ; Zero 24 bytes - xor a ; Zero fill - call fillp ; Fill memory - pop de ; Pt to fcb - ret -; - endif ; Eraon or lton or cpon -; - if eraon or lton or cpon or diron - -fillp: - ld (hl),a ; Store byte - inc hl ; Pt to next - djnz fillp ; Count down - ret -; - endif ; Eraon or lton or cpon or diron - -; -; CHECK FOR USER INPUT; IF ^C, RETURN WITH Z -; - if diron or lton or eraon or proton or peekon - -break: - push hl ; Save regs - push de - push bc - ld c,11 ; Console status check - call bdos - or a - ld c,1 ; Get char if any - call nz,bdos - pop bc ; Restore regs - pop de - pop hl -break1: cp ctrlc ; Check for abort - jp z,exit ; Exit - cp ctrlx ; Skip? - ret - endif ; Diron or lton or eraon or proton or peekon - -; AFTER A SEARCH, RETURN NZ SET IF DESIRED TYPE OF FILE FOUND, Z IF NOT -; THIS ALGORITHM LOOKS AT THE SYSTEM BIT OF THE LOCATED FILE; THIS -; BIT IS SET TO 1 IF THE FILE IS A SYSTEM FILE AND 0 IF NOT A SYSTEM -; FILE. THE FOLLOWING EXCLUSIVE OR MASKS ARE APPLIED TO RETURN Z OR NZ -; AS REQUIRED BY THE CALLING PROGRAM: -; -; SYSTEM BYTE: X 0 0 0 0 0 0 0 (AFTER 80H MASK, X=1 IF SYS, 0 IF DIR) -; -; SYS-ONLY : 0 0 0 0 0 0 0 0 (XOR 0 = 0 if X=0, = 80H if X=1) -; DIR-ONLY : 1 0 0 0 0 0 0 0 (XOR 80H = 80h if X=0, = 0 if X=1) -; BOTH : 0 0 0 0 0 0 0 1 (XOR 1 = 81H or 1H, NZ in both cases) - - if diron or eraon or lton or proton or cpon or renon - -getsbit: - dec a ; Adjust to returned value - rrca ; Convert number to offset into tbuff - rrca - rrca - and 60h - ld de,tbuff ; Pt to buffer - add a,e ; Add entry offset to base addr - ld e,a ; Result in e - push de ; Save ptr in de - add 10 ; Add offset of 10 to pt to system byte - ld e,a ; Set address - ld a,(de) ; Get byte - pop de ; Get ptr in de - and 80h ; Look at only system bit -systst equ $+1 ; In-the-code variable - xor 0 ; If systst=0, sys only; if systst=80h, dir - ; Only; if systst=1, both sys and dir - ret ; Nz if ok, z if not ok -; -; -; COPY HL TO DE FOR B BYTES -; -blkmov: - ld a,(hl) ; Get - ld (de),a ; Put - inc hl ; Pt to next - inc de - djnz blkmov ; Loop - ret - -; -; PRINT FILE NOT FOUND MESSAGE -; -prfnf: - call print - db ' No File','s'+80h - jp exit - -; LOG INTO USER AREA CONTAINED IN FCB1 -; -logusr: - ld a,(fcb1+13) ; Get user number -setusr: - ld e,a - ld c,32 ; Use bdos fct - jp bdos - -; -; PRINT FILE NAME PTED TO BY HL -; -prfn: - call print ; Leading space - db ' '+80h - ld b,8 ; 8 chars - call prfn1 - call print - db '.'+80h ; Dot - ld b,3 ; 3 chars -prfn1: - ld a,(hl) ; Get char - inc hl ; Pt to next - call conout ; Print char - djnz prfn1 ; Count down - ret - -; -; SEARCH FOR FIRST -; -searf: - push bc ; Save counter - push hl ; Save hl - ld c,17 ; Search for first function -searf1: - ld de,fcb1 ; Pt to fcb - call bdos - inc a ; Set zero flag for error return - pop hl ; Get hl - pop bc ; Get counter - ret - - endif ; Diron or eraon or lton or proton or cpon or renon - -;----------------------------------------------------------------------------- - -; Define buffers as high as possible in TPA for the following groups -; of commands: -; COPY needs SRCFCB and CBUFF -; LIST/TYPE needs PAGCNT and DIRBUF -; ERA, PROT, and DIR commands. needs DIRBUF -; If DIRBUF is defined, its value is in HL on return from this code. The DE -; register pair is not changed by the code, but the BC pair is affected. - -dirbufon equ lton or diron or eraon or proton - - if dirbufon -dirbuf: ds 2 ; Address for directory buffer - endif ;dirbufon - - if cpon -srcfcb: ds 2 ; Address of source file FCB (CBUFF address - ; ..is in the code) - endif ;cpon - - if lton -pagcnt: ds 2 ; Address for page counter - endif ;lton - - - if cpon or lton or eraon or proton or diron - -define: - push de - ld hl,(bdos+1) ; Get bottom of BDOS - ex de,hl ; ..into DE - ld hl,(1) ; Get BIOS warmboot address into HL - ld bc,-[0e00h+800h+3] ; Offset to command processor address - add hl,bc - -; Now we have to compare and pick the lower address as the top of TPA - - push hl ; Save CPR address while comparing - xor a ; Clear the carry flag - sbc hl,de ; Compute (CPR-BDOS) - pop hl ; Restore CPR address - jr c,define1 ; Branch if BDOS address is higher (use CPR) - ex de,hl ; Otherwise use BDOS address -define1: - - if lton - dec hl ; Put PAGCNT in first free byte at top of TPA - ld (pagcnt),hl - endif ;lton - - if cpon - ld de,-36 ; Calculate place for SRCFCB for copy command - add hl,de - ld (srcfcb),hl - if dirbufon - push hl ; Save if needed below - endif ;dirbufon - ld de,-[cpblocks*128] ; CBUFF can use same space as DIRBUF - add hl,de - ld (cbuff),hl - if dirbufon - pop hl - endif ;dirbufon - endif ;cpon - - if dirbufon - ld de,-[maxdirs*11] ; Space for directory buffer - add hl,de - ld (dirbuf),hl - endif - - pop de - ret - - endif ;cpon or dirbufon - -;----------------------------------------------------------------------------- - -; -; SEARCH FOR NEXT -; - if diron or eraon or lton or proton - -searn: - push bc ; Save counter - push hl ; Save hl - ld c,18 ; Search for next function - jr searf1 - -; LOAD DIRECTORY AND SORT IT -; ON INPUT, A=SYSTST FLAG (0=SYS, 1=DIR, 80H=BOTH) -; DIRECTORY IS LOADED INTO BUFFER AT TOP OF TPA -; RETURN WITH ZERO SET IF NO MATCH AND HL PTS TO 1ST ENTRY IF MATCH - -direrr: - call print - db 'DIR Ovf','l'+80h - jp exit - -getdir: - ld (systst),a ; Set system test flag - call logusr ; Log into user area of fcb1 - -; LXI H,DIRBUF ; Pt to dir buffer - call define ; Define buffer addresses - ld (hl),0 ; Set empty - ld bc,0 ; Set counter - call searf ; Look for match - ret z ; Return if not found -; -; STEP 1: LOAD DIRECTORY -; -gd1: - push bc ; Save counter - call getsbit ; Check for system ok - pop bc - jr z,gd2 ; Not ok, so skip - push bc ; Save counter - inc de ; Pt to file name - ex de,hl ; Hl pts to file name, de pts to buffer - ld b,11 ; Copy 11 bytes - call blkmov ; Do copy - pop bc ; Get counter - inc bc ; Increment counter - ld hl,maxdirs-1 ; See if count equals or exceeds MAXDIRS - ld a,b ; Check high bytes - sub a,h - jr c,gd1a ; If carry set, we are OK - ld a,c ; Check low bytes - sub a,l - jr nc,direrr ; If no carry, jump to error message -gd1a: - ex de,hl ; Hl pts to next buffer location -gd2: - call searn ; Look for next - jr nz,gd1 - ld (hl),0 ; Store ending 0 -; LXI H,DIRBUF ; Pt to dir buffer - ld hl,(dirbuf) ; Pt to dir buffer - ld a,(hl) ; Check for empty - or a - ret z -; -; STEP 2: SORT DIRECTORY -; - if sorton - push hl ; Save ptr to dirbuf for return - call diralpha ; Sort - pop hl - endif - xor a ; Set nz flag for ok - dec a - ret - -; -; DIRALPHA -- ALPHABETIZES DIRECTORY IN DIRBUF; BC CONTAINS -; THE NUMBER OF FILES IN THE DIRECTORY -; -diralpha: -; -; SHELL SORT -- -; THIS SORT ROUTINE IS ADAPTED FROM "SOFTWARE TOOLS" -; BY KERNIGAN AND PLAUGHER, PAGE 106. COPYRIGHT, 1976, ADDISON-WESLEY. -; - ld h,b ; Hl=bc=file count - ld l,c - ld (n),hl ; Set "N" - ld (gap),hl ; Set initial gap to n for first division by 2 - -; FOR (GAP = N/2; GAP > 0; GAP = GAP/2) -srtl0: - or a ; Clear carry -gap equ $+1 ; Pointer for in-the-code modification - ld hl,0 ; Get previous gap - ld a,h ; Rotate right to divide by 2 - rra - ld h,a - ld a,l - rra - ld l,a - -; TEST FOR ZERO - or h - ret z ; Done with sort if gap = 0 - - ld (gap),hl ; Set value of gap - ld (ii),hl ; Set ii=gap for following loop - -; FOR (II = GAP + 1; II <= N; II = II + 1) -srtl1: -ii equ $+1 ; Pointer for in-the-code modification - ld hl,0 ; Add 1 to ii - inc hl - ld (ii),hl - -; TEST FOR II <= N - ex de,hl ; Ii is in de -n equ $+1 ; Pointer for in-the-code modification - ld hl,0 ; Number of items to sort - ld a,l ; Compare by subtraction - sub a,e - ld a,h - sbc a,d ; Carry set means ii > n - jr c,srtl0 ; Don't do for loop if ii > n - - ex de,hl ; Set jj = ii initially for first subtraction of gap - ld (jj),hl - -; FOR (JJ = II - GAP; JJ > 0; JJ = JJ - GAP) -srtl2: - ld hl,(gap) ; Get gap - ex de,hl ; In de -jj equ $+1 ; Pointer for in-the-code modification - ld hl,0 ; Get jj - ld a,l ; Compute jj - gap - sub a,e - ld l,a - ld a,h - sbc a,d - ld h,a - ld (jj),hl ; Jj = jj - gap - jr c,srtl1 ; If carry from subtractions, jj < 0 and abort - or l ; Jj=0? - - jr z,srtl1 ; If zero, jj=0 and abort - -; SET JG = JJ + GAP - ex de,hl ; Jj in de - ld hl,(gap) ; Get gap - add hl,de ; Jj + gap - ld (jg),hl ; Jg = jj + gap - -; IF (V(JJ) <= V(JG)) - call icompare ; J in de, jg in hl - -; ... THEN BREAK - jr c,srtl1 - -; ... ELSE EXCHANGE - ld hl,(jj) ; Swap jj, jg - ex de,hl -jg equ $+1 ; Pointer for in-the-code modification - ld hl,0 - call iswap ; Jj in de, jg in hl - -; END OF INNER-MOST FOR LOOP - jr srtl2 - -; -; SWAP (Exchange) the elements whose indexes are in HL and DE -; -iswap: - call ipos ; Compute position from index - ex de,hl - call ipos ; Compute 2nd element position from index - ld b,11 ; 11 bytes to flip - endif ; Diron or eraon or lton or proton - - if diron or eraon or lton or proton or renon -iswap1: - ld a,(de) ; Get bytes - ld c,(hl) - ld (hl),a ; Put bytes - ld a,c - ld (de),a - inc hl ; Pt to next - inc de - djnz iswap1 - ret - endif ; Diron or eraon or lton or proton or renon - - if diron or eraon or lton or proton -; -; ICOMPARE compares the entry pointed to by the pointer pointed to by HL -; with that pointed to by DE (1st level indirect addressing); on entry, -; HL and DE contain the numbers of the elements to compare (1, 2, ...); -; on exit, Carry Set means ((DE)) < ((HL)), Zero Set means ((HL)) = ((DE)), -; and Non-Zero and No-Carry means ((DE)) > ((HL)) -; -icompare: - call ipos ; Get position of first element - ex de,hl - call ipos ; Get position of 2nd element - ex de,hl -; -; COMPARE DIR ENTRY PTED TO BY HL WITH THAT PTED TO BY DE; -; NO NET EFFECT ON HL, DE; RET W/CARRY SET MEANS DE/>> 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 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.) - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpcled.lib b/Source/BPBIOS/Z34RCP11/rcpcled.lib deleted file mode 100644 index 6c2879a7..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpcled.lib +++ /dev/null @@ -1,1327 +0,0 @@ - page - -; Library: RCPCLED for Z34RCP -; Author: Carson Wilson (modifications only) -; Version: 1.3b -; Date: October 8, 1989 -; Changes: Civilian time now prints "12" instead of "0" for midnight hour. -; Put Z3PLUS time display capability back in. -; Z3PLUS time display disabled if date = 01/01/78 (no clock). -; Added Rob Friefeld's fix to SAVE_LINE. -; -; Author: rdf -; Version: 1.3a -; Date: October 2, 1989 -; Changes: Changed order of installable highlight codes and history buffer -; addresses to simplify installing a ZRL file. Changed version -; number to guarantee compatibility with accessory programs. -; Option to print user number zero at prompt. -; Time string separator installable. - -; Author: Carson Wilson (modifications only) -; Version: 1.2 B -; Date: September 29, 1989 -; Changes: Made ">>" the prompt when previous commands are NOT being -; overwritten. -; Changed line edit commands to be closer to CP/M Plus. -; Shortened the clock read code (ZSDOS allows straight -; DateStamper calls). -; Uses DEFINE from RCPSUBS.LIB to save space. -; Does not print prompt user number if at user zero. -; Optional installable highlight codes for time in prompt. -; Time prompt shortened to "hh.mm" for easier reading. - -; Author: Rob Friefeld -; Version: 1.2 a -; Date: September 20, 1989 - -; Syntax: CLED [/] if "/", then run for one command line only -; e.g. from a shell like ZFILER - -; -; ===== D E F I N I T I O N S S E C T I O N ===================== -; - -clver equ 13 ; Version number (Install program compat.) -clrev equ 'b' ; Revision (Does not affect config.) - -del equ 7fh ; not in sysdef.lib - -; -;===== C O N F I G U R A T I O N A R E A ======================== -; - -; The installation program and buffer loader depend on the configuration -; of this data structure. It should not be changed. - -shname: db 'CLED',0 ; Name put on shell stack -versid: db clver ; CLED version -ddsep: db dudir_sep ; DU:DIR separator char -ins_flag: db clins ; Yes = insert mode -minsave: db clmin ; Discard line =< this -era_flag: db clera ; Erase stored line on exit -save_flag: db clsav ; Save command lines -tim_sep: db timesep ; Time string separator - -; --------------------------- - -; Command list for RCPCLED, Version 1.3 -; Set bit 7 to use a command with meta key - -cmd_list: - db 'Q' ; Meta key 1 - db 'H' ; Backspace - db 'S' ; Cursor left - db 'D' ; Cursor right - db 'A' ; Word left - db 'F' ; Word right - db 'B' ; Line end/ start - dc 'S' ; Line start - dc 'D' ; Line end - db 'G' ; Delete char - db DEL ; Delete left - db 'T' ; Delete word - db 'L' ; Delete word left - db 'X' ; Delete to SOL - db 'Y' ; Delete line - db 'K' ; Delete to EOL - db 'V' ; Toggle insert - db 'P' ; Enter control - db 'W' ; Recall line - db 'E' ; Recall reverse - db 'M' ; Execute line - db '[' ; ESC menu - -cmdlen equ $ - cmd_list - -; --------------------------- -; Highlight on/off codes for time display (installable) -; -stndout: db 0,0,0,0 ; Must terminate with hibit or binary 0 -stndend: db 0,0,0,0 ; Ditto - -; --------------------------- -; 4 bytes are used here for the information of the history save/load tool, -; CLEDSAVE - -histaddr: dw history ; Pointer to history buffer -histsz: dw histsize ; Buffer size - -; -;===== M A I N C O D E S E C T I O N ======================== -; -cled: - call define ; Set pointer to free mem - ld de,-lbufwid-1 - add hl,de - ld (line),hl ; Set line buffer location - xor a - ld (hl),a ; Zero line - ld hl,history ; History stack - ld (recall_ptr),hl ; Init position pointer to start - - ld a,(fcb+1) ; Check command line option - cp '/' - jr z,cledit ; Go right to editing - - ld a,(z3msg+3) ; QSHELL - dec a ; <> 1 on manual invocation - jr z,cledit ; Skip installation - -; -;===== S H E L L I N S T A L L A T I O N ========================= -; -sh_inst: - ld hl,shname - call shpush ; Z = OK - ret z - call print ; Complain about stack and cancel - dc cr,lf,'SH STK' ; Full or non-existent - ret - -; -;===== L I N E E D I T =========================================== -; - -; This is the main entry point for the shell -; 1 - Display prompt -; 2 - Get user input -; 3 - Reset shell bit -; 4 - Run command line - - -; Subtask 1 -- -cledit: - call prompt ; Display system prompt - -;---------------------------------------- -; Subtask 2 -- - -; The editor returns NZ if the shell pop command has been given. If not, it -; returns the character count of the command line in B. - - call EDIT - -;---------------------------------------- -; Subtask 3 -- - push af ; Save return code - xor a - ld (z3msg+3),a ; PUTCST - pop af - -;---------------------------------------- -; Subtask 4 -- - jp nz,shpop ; Quit shell - -; Here we load the MCL directly from the line buffer. On OVFL, loop to edit. - -loadcl: - ld a,(z3cl+2) ; MCL size - inc b ; B contains line count, include terminating 0 - cp b ; Compare to line size - jr nc,loadcl1 ; OK - -mclerr: - call print - dc cr,lf,'OVFL',cr,lf - jp cledit - -loadcl1: - ld de,z3cl+4 ; Set MCL pointer to start - ld (z3cl),de - - ld hl,(line) - ld c,b - ld b,0 - ldir ; Move line buff to MCL - ret ; Run it - - -; -;===== S U B R O U T I N E S ======================================= -; - -; Prompt -- PRINT a DU:DIR prompt. -; -prompt: - if systime - call print_time - endif - - ld bc,(cusr) ; GDEFDU - ld a,b ; Drive - add a,'A' ; Make it a letter - call conout ; Write it - ld a,c ; Get user - - if puser0 - call pusr ; Write it - else - or a - call nz,pusr ; Write it IF NONZERO - endif ;puser0 - - call dutdir ; Get the ndr - jr z,prompt1 - ld a,(ddsep) ; DU:DIR separator - call conout - ld b,8 ; Eight chars max -nameloop: - ld a,(hl) ; Get the first char - cp ' ' - call nz,conout ; Write it if not blank - inc hl - djnz nameloop - -prompt1: - call prompt2 - ld a,(save_flag) ; If save is OFF, prompt is >> - or a - ret nz -prompt2: - call print - dc '>' - ret - -; PUSR -- Convert user # in A to decimal and print -; -pusr: - ld hl,10 shl 8 + '0'-1 ; H=10, L='0'-1 - cp h ; User < 10 ? - jr c,pusr1 -pusr0: - inc l ; Advance character for user number tens digit - sub h - jr nc,pusr0 - add a,h - ld h,a ; Keep low digit of user number in H - ld a,l ; Display tens digit - call conout - ld a,h ; Ready to process units digit -pusr1: - jp decout ; Routine in RCPSUBS.LIB -; add '0' -;pusr2: -; jp conout - -; Console input without echo - -cin: - push hl - push de - push bc -cin1: ld c,dirconf ; DCIO - ld e,-1 - call bdos - or a - jr z,cin1 - pop bc - pop de - pop hl - ret - -; -;===== E D I T O R S E C T I O N ================================ -; - -; Date: October 2, 1989 - -; Entry is EDIT -; Return Z = Execute command line, NZ = Quit shell, B = char count of line - -; Initialize to on-line environment. -; While editing, HL -> current position in LINE, B = char count, -; C = cursor position (0 .. count), DE = scratch - -edit: - ld hl,(line) ; Init to start of line - xor a - ld b,a ; Line count = 0 - ld c,a ; Cursor pos = 0 - - push hl ; There may already be a line here - dec b ; Accumulate possible char count in B -edit1: - inc b - cp (hl) ; A = 0 - inc hl - jr nz,edit1 ; Loop until 0 terminator -edit2: - pop hl ; Point to line again - call zline ; Zero the remainder of LINE buffer - call ptail ; Print the line from cursor position - -;-------------------------------------------------------------------- - -; EDIT COMMAND LOOP - -; Get a char. If it is text, enter it. If it is a control, scan the -; CMD_LIST for a match. If found, compute offset into jump table and go. -; A "shifted" key (high bit set in table) is matched after the "meta-key" -; has been entered. - -ecmd: - exx ; Main regs must be preserved - ld hl,ecmd ; Save address so a return comes back here - push hl - -no_match: - call cin ; Next key... - cp 'C'-'@' ; Warm boot? - jp z,0000h - - ld hl,meta_flag ; Shift flag - or (hl) ; Mask in possible high bit - ld (hl),0 ; Reset flag - exx ; Recover main regs - - cp 20h ; Test key - jr c,control_key ; Not text - cp del ; This control char > text chars - jp c,enter ; Input text - -control_key: - call menuinp ; Convert control char to cap - - exx ; Must preserve main regs - ld hl,cmd_list ; Scan command list - ld bc,cmdlen - cpir - jr nz,no_match - ld hl,cmd_vector - ld a,cmdlen-1 ; Point to address in vector table - sub c - add a,a - ld c,a - add hl,bc - ld c,(hl) - inc hl - ld b,(hl) - ld (cjump),bc ; Address to jump to - exx ; Restore regs! - -cjump equ $+1 - jp 0 - - -; Convert a control key entry to cap char - -menuinp: - push af - and 80h ; Keep high bit - ld e,a - pop af - and 7fh - call ucase - or e ; Restore high bit - ret - -; Mark meta-key flag - -meta_key1: - ld a,10000000b - ld (meta_flag),a - ret - -meta_flag: db 0 ; Initial value 0 = no shift - - -; Jump table for commands - -cmd_vector: - dw meta_key1 ; Shift key - dw bsp ; Backspace - dw bsp ; Cursor left - dw fsp ; Cursor right - dw bwrd ; Left word - dw fwrd ; Right word - dw linend ; To EOL - dw linbeg ; To SOL - dw linend1 ; To EOL/SOL - dw delete ; Delete char - dw delft ; Delete char left - dw delwrd ; Delete word right - dw delwlft ; Delete word left - dw delsol ; Delete to start of line - dw dline ; Delete line - dw deleol ; Delete to end of line - dw instog ; Toggle insert - dw ctl_entry ; Enter control char - dw recall_back ; Scroll back in history - dw recall_fwrd ; Scroll ahead in history - dw eds$ex ; Execute line - dw esc_menu ; Submenu - -;-------------------------------------------------------------------- - -; ON-LINE ROUTINES, EDITING CURRENT LINE IN LINE BUFFER - -; WHILE ON LINE: -; B = CHAR COUNT (0..lbufwid) C = CURSOR POSITION (0..lbufwid) -; HL = MEM POSITION - - -; Backspace -; Return Z = backspace not done, NZ = all OK - -bsp: - xor a - cp c ; Cursor pos - ret z ; At start - dec hl ; Back up in mem - dec c ; Cursor pos back -bspace: - ld a,bs ; Back up on screen - or a ; Must ret nz - jp conout - - -; Forward space -; Return Z = not done - -fsp: - ld a,(hl) - or a - ret z ; At EOL - inc hl - inc c - jp pctl ; Screen advance by reprinting char - - -; Back word - -bwrd: - call bsp ; Backspace - ret z ; Nowhere to go - ld a,(hl) - cp ' ' - jr z,bwrd ; Backspace over blanks - dec hl ; Now backspace until next wordsep - call wrdsep ; Look at char before this position - inc hl - jr nz,bwrd - ret - -; Forward word - -fwrd: - call wrdsep ; Are we on a word separator? - jr z,fwrd1 ; Yes - call fsp ; No, advance until we find one - jr fwrd - -fwrd1: call fsp ; Word sep found, advance 1 more space - ld a,(hl) ; Are we on a blank? - cp ' ' - jr z,fwrd1 ; Don't quit on a blank - ret - - -; Delete char left - -delft: - call bsp ; Backspace and fall through to delete - - -; Delete char - -delete: - call delmem ; In memory - jp ptail ; Refresh screen from cursor position - -; Delete to start of line - -delsol: - ld a,c ; Get cursor pos - or a - ret z ; Already at start - cp b - jr z,dline ; At end, so delete entire line (quicker) - ld e,a ; Cursor pos = # chars to delete - call linbeg ; Go to start -delcmd1: - call delmem ; Delete first char in memory - dec e ; Loop counter - jr nz,delcmd1 - jp ptail ; Now update screen - - -; Delete word left - -delwlft: - call bwrd ; Back a word and fall thru ... - - -; Delete word right - -delwrd: - call wrdsep ; On a word sep? - jr z,delete ; Yes, kill it - ld a,b ; Compare line count to cursor pos - cp c - jr z,delete ; On last char of line -delwrd1: - call delmem ; Delete in mem, let screen catch up later - jr delwrd ; Go until word sep found - - -; Delete line - -dline: - call linbeg ; Position at line start and fall thru ... - -; Delete to eoln - -deleol: - call ereol ; Clear on screen - ld b,c ; Char count = current position - jp zline ; Zero line tail in mem - -; Insert/overwrite toggle - -instog: - ld a,(ins_flag) ; Flag 0 -> owrt - cpl - ld (ins_flag),a - ret - -; Enter a control - -ctl_entry: - call cin - and 1fh ; Fall thru to normal char entry - -; Enter a char - -enter: - ex af,af' ; Save char - ld a,b ; At eoln? - cp c - jr z,ovrwrt ; Yes, no need for insert mode - ld a,(ins_flag) ; Which mode are we in? - or a ; 0 = overwrite, nz = insert - jr nz,insert - - -; Enter char in overwrite mode - -ovrwrt: - ld a,b ; Char count - cp lbufwid-2 ; Line full? - jr c,ovr1 ; No - cp c ; At EOLN? - ret z ; Accept no more chars - -ovr1: ex af,af' ; Recover char - ld (hl),a ; Put char in place - call fsp ; Advance by printing it - ld a,b ; Char count -> a - cp c - ret nc ; No need to incr char count inside line - inc b ; Else add to count - ret - -; Enter char in insert mode - -insert: - ld a,b ; Line full? - cp lbufwid-2 - ret nc - -insrt: - ld a,b ; At eoln? - sub c ; A = # chars to eoln - jr z,ovr1 ; Yes, really want overwrite - call insmem ; Push chars down to make room - ex af,af' ; Recover new char - ld (hl),a ; Place char in line - call ptail ; Reprint entire line from here - inc b ; Inc char count - jp fsp ; Advance cursor - - -; Line end/start toggle - -linend: ; Go to eoln or, if there, to start of line - ld a,b - cp c - jr z,linbeg - -linend1: - call fsp ; Print ahead until EOL - jr nz,linend1 - ret - -linbeg: - call bsp ; Backspace until start - jr nz,linbeg - ret - - -; Compare current char to list of word separators - -wrdsep: - push hl - push bc - ld bc,wrdseplen - ld a,(hl) - ld hl,wrdseps - cpir - pop bc - pop hl - ret - -wrdseps: - db 0,' ,;:.' ; Punctuation word separators -wrdseplen equ $ - wrdseps - - -; Delete current char from line - -delmem: - ld (hl),0 ; Terminal 0 or char to be deleted - ld a,b - sub c ; A = (count-position) = chars from end - ret z ; At eoln, no char - dec b - ret z ; Single char line - dec a - ret z ; On last char, just deleted it -delmem1: - inc a ; To move terminal 0 in - push hl - push de - push bc - ld d,h ; Dest is current pos - ld e,l - inc hl ; Source, terminal 0 - ld c,a ; Count, line tail - ld b,0 - ldir ; Block move - pop bc - pop de - pop hl - ret - -; Insert a char in line - -insmem: - push bc ; Make room for char in line - push de - ld c,a ; Bc = # chars to move - ld b,0 - add hl,bc ; Dest is new eoln - ld d,h ; Now in DE - ld e,l - dec hl ; Source is current eoln - lddr ; Tail move - pop de - pop bc ; Recover char count, crs pos info - inc hl ; Hl to next char - ret - - -; Print line tail from cursor position, return to position - -ptail: - push hl ; Save mem pos - push bc ; Save screen pos - call linend1 ; Print ahead to end of line - call ereol ; Clean off danglers -ptail1: - ld a,c ; End of line cursor pos - pop bc - pop hl - sub c ; Current cursor pos - ret z ; At end of line already - ld e,a ; Loop counter -ptail2: - call bspace ; Else back up to where we were - dec e - jr nz,ptail2 - ret - - -; Print a char, turn a control char into a cap char - -pctl: - push af - cp 20h - jr nc,pctl1 - add '@' -pctl1: call conout - pop af - ret - - -; Convert char or control key to upper case - -ucase: - cp ' ' - jr nc,notctl - add '@' -notctl: cp 'a' - ret c ; Not a lowercase - cp 'z'+1 - ret nc ; Not a lowercase - sub ' ' ; Yes, a lowercase - ret - - -; Zero line tail - -zline: - push hl - push bc - ld hl,(line) ; HL -> start of line - ld c,b ; BC = char count - ld b,0 - add hl,bc ; HL -> EOLN - ld a,lbufwid - sub c - dec a - jr z,zline0 - ld b,a ; # of 0's - xor a -zline1: - ld (hl),a - inc hl - djnz zline1 -zline0: - pop bc - pop hl - ret - - -; ESC key pressed - get submenu command - -esc_menu: - call cin - call ucase - cp 'Q' ; Quit - jr z,edquit - cp 'S' ; Toggle Save - ret nz ; Loop if none of these - -; Toggle recording state -; - Alter line prompt to > if save ON, >> if save OFF - -save_tog: - ld a,(save_flag) ; Flip flag byte - cpl - ld (save_flag),a - call crlf - call prompt ; Print new prompt string - pop af ; Lift ecmd from stack - jp edit ; Restart - - -; Exit editor - -eds$ex: - pop af ; Lift ECMD from stack - ld a,(save_flag) ; Are we recording? - or a - ret z ; Nope - - ld a,(minsave) ; Is line worth keeping? - cp b - push bc - call c,save_line - pop bc - -edn$ex: - xor a ; Return Z - ret - - -; Exit and pop shell - -edquit: - pop af ; Lift ECMD from stack - xor a ; Return NZ - dec a - ret - - -; --------------------------- - -; HISTORY STACK ROUTINES for RCPCLED, Version 1.2 - -;Each command line is pushed onto the history stack before execution. As the -;older ones overflow, they are eliminated. The last character of each line -;has the high bit set. The buffer terminates with a 0. -;The history stack is internal to the RCP, but could be implemented in an RSX - -; Save new line to stack -; - This routine called only on exit, so on-line regs not preserved. -; - Push contents down by size of current line -; - Move line buffer to start of stack -; - Terminate line with high bit set -; - Terminate history with 0 after last complete line -; - If current line is too big for buffer size chosen, do nothing - -save_line: - ld c,b ; Line size from b to bc - xor a - ld b,a - push bc - ld hl,HISTSIZE - sbc hl,bc ; Buffer size - line length - jr z,savel_err ; Not enough room - jr c,savel_err ; Definitely not enough room! - push hl - ld hl,hbuf_top - push hl - sbc hl,bc ; hl -> bufftop - line size - pop de ; de -> bufftop - pop bc ; bc = buffsize - line size - lddr ; tail move - - pop bc ; Recover line size in bc - ex de,hl - inc de ; de -> buffstart - ld hl,(line) ; Move in line - ldir - dec de - ex de,hl - set 7,(hl) ; Tag line terminus - - ld hl,hbuf_top ; Terminate history after last complete line -savel1: - dec hl ; Back up to EOLN - bit 7,(hl) - jr z,savel1 ; Loop until hi-bit encountered - inc hl - ld (hl),0 - ret - -savel_err: - pop af ; Lift BC push - ret - -; Recall command history, newest -> oldest -; - recall_ptr is init to start of buffer on each CLED invocation -; - return with pointer updated to next line - -recall_back: - call check_recall ; Is there anything in buffer? - ret nc ; No - -; Transfer from recall pointer to line buffer -; - enter hl @ recall_ptr -; - return ptr -> start of next command if no OVFL - -rc_back1: - ld de,(line) ; Destination for move -rc_back1a: - ld a,(hl) - or a - jr z,recall_quit ; Buff end - ldi - bit 7,a - jr z,rc_back1a - - ld (recall_ptr),hl ; Update ptr now - ex de,hl ; Point to end of line in line buffer - ld (hl),0 ; Terminate it - dec hl - res 7,(hl) ; Fix high bit from storage - - pop af ; Lift ecmd from stack - jp edit ; Restart on this line - -recall_quit0: - pop af ; Lift subroutine call from stack -recall_quit: - exx ; Recover main regs - ret ; Back to editing - - -; Recall command history, oldest -> newest - -recall_fwrd: - call check_recall ; Anything in buffer? - ret nc ; No - call rc_fwrd1 ; Move to previous line - call rc_fwrd1 ; Don't repeat line on direction rev - jr rc_back1 ; Now same code as recall_back - -rc_fwrd1: - dec hl ; Initially, HL -> next line to recall - ld de,history ; Underflow address -rc_fwrd1a: - push hl ; Compute position relative to top - xor a - sbc hl,de - pop hl - ret z ; Quit when start of buff reached - jr c,recall_quit0 ; Underflow - dec hl ; Going backwards in buffer - bit 7,(hl) - jr z,rc_fwrd1a - inc hl ; Point to char past command terminator - ret - - -; Check to see if anything in recall buffer yet -; - Ret NC = no, main regs preserved -; - Else switch main regs to alt, ret HL @ recall buffer line - -check_recall: - ld a,(history) ; Is anything in buffer yet? - or a - ret z ; Nope - call linbeg - exx - ld hl,(recall_ptr) - scf - ret - -; --------------------------- - -; Routine: EREOL function for Z34RCP -; Author: Rob Friefeld -; Version: 1.0 -; Date: September 19, 1989 -; -; Entry: EREOL -; Function: To clear to end of line -; Comments: The setting of the ERLTCAP equate determines whether this -; command uses the TCAP information or not. If not, it uses the -; ereol string passed in macro CLR_EOL. That string should -; end with the high bit set. The setting of the ERLQUICK equate -; determines whether to simply output the TCAP string for this -; function or to interpret it as does Rick Conn's VLIB version. -; Uses RCPSUBS.LIB routines CONOUT and PRINTHL. - - -; ------------------------------------------------------------------- - - if [not erltcap] -; Erase to end of line. Return NZ. - -ereol: call print - clr_eol -; or -1 ; For VLIB compatibility - ret - - - else - if erlquick - -; --------------------------- - -; This version just prints the EREOL string: no delay, no interpretation. - -ereol: - push hl - ld hl,z3tcap+17h ; CLS string - xor a ; Skip to EREOL string -ereol1: cp (hl) ; Skip once - inc hl - jr nz,ereol1 -ereol2: cp (hl) ; Skip twice - inc hl - jr nz,ereol2 - call printhl ; Print it - pop hl - ret - -; --------------------------- - -; This is a disassembly of EREOL from VLIB - else - -ereol: - push bc - push de - push hl - ld hl,z3tcap+16h ; Point to ereol delay - ld d,(hl) - inc hl - call vidskp - call vidskp - call vidout - pop hl - pop de - pop bc - xor a - dec a - ret - -vidskp: - ld a,(hl) - inc hl - or a - ret z - cp '\' - jr nz,vidskp - inc hl - jr vidskp - -vidout: - ld a,(hl) - or a - jr z,vid2 - inc hl - cp '\' - jr nz,vid1 - ld a,(hl) -vid1: - call conout - jr vidout - -vid2: - ld a,d - or a - ret z - ld c,a - ld hl,z3env+2bh ; Processor speed - ld a,(hl) - or a - jr nz,vidl1 - ld a,4 -vidl1: - ld b,a - push bc - call vdelay - pop bc - dec c - jr nz,vidl2 - ret -vdelay: - call vdel1 - djnz vdelay - ret -vdel1: - ld c,20 -vdel1a: - ex (sp),hl - ex (sp),hl - dec c - jr nz,vdel1a - ret - - endif ;erlquick - endif ;not erltcap - -; -;===== Z 3 L I B R O U T I N E S ================================ -; - -; Disassembly of Z3LIB routines DUTDIR, SHPUSH, SHPOP -; For use with CLED RCP segment ONLY -; Does not save regs as does Z3LIB, and has less env error checking -; rdf 10/2/89 - -DUTDIR: - ld a,z3ndirs ; No NDR - or a - ret z - - ld hl,(z3ndir) - inc b -dutdir1: - ld a,(hl) - or a - jr nz,dutdir2 - dec b - xor a - ret -dutdir2: - cp b - inc hl - jr nz,dutdir3 - ld a,(hl) - cp c - jr nz,dutdir3 - inc hl - dec b - xor a - dec a - ret -dutdir3: - push bc - ld bc,11h - add hl,bc - pop bc - jr dutdir1 - - -shpop: - -; *** -;Special function for RCPCLED -- null saved command line - ld a,(era_flag) ; Erase? - or a - jr z,eflag1 ; Z = NO - xor a - ld (history),a -eflag1: -; *** - -;shpop: - call getsh ; HL -> stack, DE = size, B = entries - ret z ; No stack - ld c,e ; Entry size - ld a,(hl) - or a - ret z ; Empty - ex de,hl - add hl,de ; HL -> next entry, DE -> first entry - xor a -shpop1: - ld (de),a ; Zero entry - dec b - ret z ; Successful exit, no more entries - push bc ; Pop next entry - ld b,0 - ldir - pop bc - jr shpop1 - - -shpush: - push hl ; Save string pointer - call getsh - jr z,shpush_err1 ; No stack - -shpush3: - ld a,(hl) ; Look for free entry - or a - jr z,shpush4 - add hl,de - djnz shpush3 - jr shpush_err2 ; Stack full -shpush4: - call getsh ; Point to top of stack - push bc -shpush5: - dec b - jr z,shpush6 - add hl,de - jr shpush5 -shpush6: - pop bc - ld c,e - dec hl - ex de,hl - add hl,de ; HL -> (entry-1) + size, DE -> (entry-1) - ex de,hl -shpush7: - ld a,b - cp 1 - jr z,shpush8 - dec b - push bc - ld b,0 - lddr - pop bc - jr shpush7 -shpush8: - call getsh - pop de - ex de,hl -shpush9: - ld a,(hl) - ldi - or a - jr nz,shpush9 - -shpushx: - ret - -shpush_err1: -; ld a,1 ; No stack -; jr shpush_err - -shpush_err2: - ld a,2 ; Stack full -shpush_err: - pop hl - or a - ret - - -; Get shell stack entry -; Return HL -> top of stack -; DE = entry size -; C = unchanged -; B = # entries -; A = # entries -; Z = no entries -getsh: -getsh2: - ld hl,(z3env+1eh) ; Stack - ld a,(z3env+20h) ; # entries - ld b,a - ld de,(z3env+21h) ; Entry size in E - ld d,0 - or a - ret - -; -;===== C L O C K R E A D I N G ================================== -; - - if systime - -; Print system time from DateStamper, ZS/ZDDOS/Z3PLUS clock - -; Entry point -; Print the string with leading '0' suppression -; Format: "h.mm " or "hh.mm " - -print_time: - -; 1. Test for DateStamper/ZSDOS/Z3PLUS and read clock if present - - ld c,12 ; Return version - ld e,'D' ; DateStamper test - call bdos - ld a,l ; Version # - cp 30h ; Z3PLUS? - jr nc,time1 ; Yes - ld a,h - cp 'D' - ret nz ; No clock - -; 2. Get time - - ld hl,time2 - push hl ; Return address on stack - push de ; Clock address on stack - ld hl,dtbuf ; Point to buffer - ret ; Call clock, return to time2 -time1: ; Z3PLUS entry point - ld c,105 ; CP/M Plus get time - ld de,dtbuf+1 - push de - call bdos - pop hl - ld a,(hl) - inc hl - ld b,(hl) - dec a - or b - ret z ; No clock if date = 0001 -time2: - -; 3. Turn highlight on, if present - - ld hl,stndout - call printhl - - ld hl,dtbuf+3 ; Point to hours - -; 4. Convert military time to civilian, if selected - - if civtim - ld a,(hl) ; Hours - or a ; Midnight? - jr nz,time3 ; No - ld a,24h ; Yes, say "12" -time3: sub 13h ; Time past 12:59 pm? - jr c,time4 ; No, don't change - daa ; Decimal adjust - inc a ; Yes, xlate to 12-hour - daa - ld (hl),a ; ..and patch in. - endif ; civtim - -; 5. Display time - -time4: - xor a - call pmbcd ; Print hours as 1 or 2 digits - ld a,(tim_sep) ; Print separator between hours, minutes - call conout - inc hl ; Point to minutes - ld a,80h ; Say print leading 0 - call pmbcd ; Print minutes as 2 digits - -; 2. Turn highlight off, if present - - ld hl,stndend - call printhl - jp spac ; Space before rest of prompt - -; -;===== D A T A ==================================================== -; - -; Buffer for date/time for read/write system clock - -dtbuf: ds 6 - - endif ;systime - - -line ds 2 ; Pointer to line buffer -recall_ptr ds 2 ; History position pointer -history ds HISTSIZE,0 ; History buffer -hbuf_top: equ $-1 - -; End RCPCLED.LIB - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpcls.lib b/Source/BPBIOS/Z34RCP11/rcpcls.lib deleted file mode 100644 index e6264137..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpcls.lib +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpcmd.lib b/Source/BPBIOS/Z34RCP11/rcpcmd.lib deleted file mode 100644 index 58a54e78..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpcmd.lib +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpcp.lib b/Source/BPBIOS/Z34RCP11/rcpcp.lib deleted file mode 100644 index 6ec69f48..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpcp.lib +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpdir.lib b/Source/BPBIOS/Z34RCP11/rcpdir.lib deleted file mode 100644 index 76c08bc3..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpdir.lib +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpecho.lib b/Source/BPBIOS/Z34RCP11/rcpecho.lib deleted file mode 100644 index ffe56183..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpecho.lib +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpera.lib b/Source/BPBIOS/Z34RCP11/rcpera.lib deleted file mode 100644 index 776becb8..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpera.lib +++ /dev/null @@ -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 Erase Specified files and print their names -; ERA 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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcph.lib b/Source/BPBIOS/Z34RCP11/rcph.lib deleted file mode 100644 index 34cae928..00000000 --- a/Source/BPBIOS/Z34RCP11/rcph.lib +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpid.lib b/Source/BPBIOS/Z34RCP11/rcpid.lib deleted file mode 100644 index dfbacaf2..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpid.lib +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpiom.lib b/Source/BPBIOS/Z34RCP11/rcpiom.lib deleted file mode 100644 index d85e553d..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpiom.lib +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcplt.lib b/Source/BPBIOS/Z34RCP11/rcplt.lib deleted file mode 100644 index 98d6b0ba..00000000 --- a/Source/BPBIOS/Z34RCP11/rcplt.lib +++ /dev/null @@ -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 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 Print file -; TYPE 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 or and reset tab count - -type4: call lcout ; Output or - ld b,0 ; Reset tab counter - jr type6 - -; Tabulate - -type5: ld a,' ' ; - 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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpprot.lib b/Source/BPBIOS/Z34RCP11/rcpprot.lib deleted file mode 100644 index 4e8a5479..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpprot.lib +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpquiet.lib b/Source/BPBIOS/Z34RCP11/rcpquiet.lib deleted file mode 100644 index 9269d241..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpquiet.lib +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpr.lib b/Source/BPBIOS/Z34RCP11/rcpr.lib deleted file mode 100644 index e29a4f37..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpr.lib +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpreg.lib b/Source/BPBIOS/Z34RCP11/rcpreg.lib deleted file mode 100644 index d73eee05..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpreg.lib +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpren.lib b/Source/BPBIOS/Z34RCP11/rcpren.lib deleted file mode 100644 index 6947bad2..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpren.lib +++ /dev/null @@ -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 = -; LEFTRIGHT true: -; REN -; 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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpsp.lib b/Source/BPBIOS/Z34RCP11/rcpsp.lib deleted file mode 100644 index 0fc5ecf6..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpsp.lib +++ /dev/null @@ -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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/rcpsubs.lib b/Source/BPBIOS/Z34RCP11/rcpsubs.lib deleted file mode 100644 index 3879e9a2..00000000 --- a/Source/BPBIOS/Z34RCP11/rcpsubs.lib +++ /dev/null @@ -1,1057 +0,0 @@ - page - -; Library: RCPSUBS for Z34RCP -; Author: Carson Wilson -; Version: 1.4 -; Date: October 4, 1989 -; Changes: Added modifications by Rob Friefeld for CLED. -; -; Version: 1.3 -; Date: Sept. 8, 1989 -; Changes: Added ERREX1 routine. RCP now sets bit 4 of the command -; status flag on ambiguous file name errors. Intelligent -; error handlers can interpret this bit and chain to -; more sophisticated transient programs of the same name, -; much the same as CP/M Plus. -; -; Version: 1.2 -; Date: August 12, 1989 -; Changes: Added QPLUG and UNPLUG routines for QUIET operation. - -; Author: Carson Wilson -; Version: 1.1 -; Date: December 30, 1988 -; Changes: Added CPMVER routine to detect CP/M Plus. -; Expanded ZSDOS datestamp buffer to full 128 bytes. -; Now gets CCP address from Z34CMN.LIB instead of calculating -; it from BIOS address, since NZCOM allows nonstandard length -; CCP segments (suggested by Howard Goldstein). - -; Author: Carson Wilson -; Version: 1.0 -; Date: June 15, 1988 -; -; Subroutines for Z34RCP.Z80 - -; ---------------------------------------- - -; Routines to chain to Error Handler (EH) - -; 1. Error codes (from ZCPR34.LBR) - -; ZCPR34 uses the error byte at the beginning of the message buffer as a flag -; to show what kind of error occurred. Advanced error handlers will be able -; to help the user further by suggesting the possible cause of the error. - -ecbaddir equ 2 ; Bad directory specification -- logging of - ; ..user number beyond legal range, - ; ..nonexistent named directory -ecambig equ 8 ; Ambiguous file specification where not - ; ..allowed (SAVE, GET, REN) -ecbadnum equ 9 ; Bad numerical value -- not a number where - ; ..number expected, number out of range -ecnofile equ 10 ; File not found -- REN, TYPE, LIST could not - ; ..find a specified file -ecdiskfull equ 11 ; Disk directory or data area full - ; ..(DOS write error) -ectpafull equ 12 ; TPA overflow error -ecdupspec equ 16 ; Duplicate filespecs (COPY, RENAME) - -; 2. Error Routines - - if cpon or renon or lton or proton -NoFlErr: ; File missing - ld a,ecnofile ; File not found error - jr errexit ; Chain to error handler - endif ; cpon or renon or lton or proton - - if cpon -FulErr: ; Disk or directory full (BDOS write error) - ld a,ecdiskfull ; Disk or data area full - jr errexit ; Chain to error handler -DupErr: ; Duplicate file specs - ld a,ecdupspec ; Duplicate filespec error - jr errexit ; Chain to error handler - endif ; cpon -; -; Check for illegal directory specification under ZCPR 3.4. -; DirChek assumes that FCB's have not been altered since they were -; set by the CCP. Therefore DirChek is called before other BDOS calls. - - if cpon or lton or renon or diron or eraon or proton or reson or spaceon -DirChek: - ld a,(fcb1+15) ; Z34 sets these to non zero - ld hl,fcb2+15 ; ..if illegal dirspecs. found - or (hl) - ret z ; Return if OK - ld a,ecbaddir ; Bad dir. error code -; fall thru - endif -; -; Set error type, then set error, ECP, and external program bits of command -; status flag to tell CCP to go straight to EH. - -ErrExit: - ld b,0 -ErrEx1: ld ix,z3msg ; Point to message buffer - ld (ix+0),a ; First set error type in error byte - ld a,00001110b ; Tell CCP External, No ECP, Error, No shell - or b ; Add any specified bits - ld (ix+3),A ; Set bits in command status flag - jp exit ; Return to CCP - -; ------------------------------------------------------------- - -; Routine to get wheel byte - Returns wheel in A with flags set - -getwhl: - push hl - ld hl,(z3whl) ; Get wheel address from ENV - ld a,(hl) ; Read wheel byte - and a ; Set flags - pop hl - ret - -; ------------------------------ - - if systime ; Time in CLED prompt -; -; PMBCD - Print byte at (HL) to console as 1 or 2 BCD digits. -; -; Entry: A = 80h for leading zero's -; A = 0h for no leading zero's -; -pmbcd: - rld ; Get hi nibble (HL) to low nibble A - or a ; For HD64180 - call nz,decout ; Display if low or high of A not zero - rld ; Get low nibble (HL), from above -decout: - and 00001111b ; Mask high nibble - add a,'0' ; Convert to character - jr conout - endif ; systime - -; Display decimal digit routines - -; Display hundreds, tens, and units digits (assumes flag in B has been set) - - if regon or spaceon -decdsp3: - ld de,100 ; Display hundreds - call decdsp -decdsp2: - ld de,10 ; Display tens - call decdsp - ld a,l ; Get remaining units value -decdsp4: - add a,'0' ; Convert to character - jr conout ; Print it and return - -; --------------------------------- - -; Routine to print any single digit - -; Actually, this routine displays the value of HL divided by DE and leaves the -; remainder in HL. In computing the character to display, it assumes that the -; result of the division will be a decimal digit. If the result is zero, the -; value in the B register, which is the number of digits already printed, is -; checked. If it is zero, a space is printed instead of a leading '0'. If it -; is not zero, the '0' is printed. Whenever any digit (not a space) is -; printed, the value in B is incremented. - - -decdsp: - ld c,'0'-1 ; Initialize digit count - xor a ; Clear carry flag - -decdsp1: - inc c ; Pre-increment the digit - sbc hl,de ; Subtract DE from HL - jr nc,decdsp1 - - add hl,de ; Add back in to produce remainder - ld a,c ; Get decimal digit - cp '0' ; Check for leading 0 - jr nz,decdout ; If not 0, proceed to display it - ld a,b ; Digit printed already? - or a - jr z,spac ; Print leading space if not -decdout: - ld a,c ; Else print real digit - inc b ; Indicate digit printed - jr conout - endif ; regon or spaceon - -; ------------ - -; Print a dash - - if lton or peekon -dash: call print - db ' -',' '+80h - ret - endif ; Lton or peekon - -; ------------------------- - -; Shut off output in QUIET is set. Return Z if QUIET, NZ otherwise. -; Uses: AF - -qplug: - ld a,(quiet) - or a - ret z - ld a,0C9h ; "RET" -qplug1: ld (plug),a - ret - -; -------------------------- - -; Turn on output - -unplug: xor a - jr qplug1 - - -; ------------- - -; Print a space - -spac: ld a,' ' - -; fall thru - -; Console Output Routine - -conout: -plug: db 00h ; Goes to 0C9h to turn off output - putreg ; Save all registers except AF - push af ; Save AF, too - and 7fh ; Mask out MSB - ld e,a ; Transfer character to E - ld c,2 ; BDOS conout function number - call bdos - pop af - getreg ; Restore registers -note: ; Use this RET for NOTE command - ret - -; ------------------------ - -; String printing routines - -; Print string following call (terminated with null or character with the -; high bit set) - -print: - ex (sp),hl ; Get address - call printhl - ex (sp),hl ; Put address - ret - - if whlon or quieton -; -; Routine to say "On" if A is non-zero or "Off" if A is zero. -; Called by WHL and Q commands. - -onmsg: - dc ' On' -offmsg: - dc ' Off' -tella: - ld hl,offmsg ; Prepare to say Off - or a - jr z,printhl ; Say it if A=0 - ld hl,onmsg ; Say On - -; fall thru ; Display message and return - - endif ; whlon or quieton - -; Print string pointed to by HL (terminated with null or character with the -; high bit set) - -printhl: - ld a,(hl) ; Get next character - inc hl ; Point to following one - or a ; See if null terminator - ret z ; If so, we are done - call conout ; Display the character - ret m ; We are done if MSB is set (negative number) - jr printhl ; Back for more - -; ------------------------ - -; Output new line to CON: - -crlf: - call print - db cr,lf+80h - ret - -; Console input - - if eraon or lton or proton or renon or cpon -conin: - push hl ; Save regs - push de - push bc - ld c,1 ; Input - call bdos - pop bc ; Get regs - pop de - pop hl - and 7fh ; Mask msb - cp 61h - ret c - and 5fh ; To upper case - ret - endif ; Eraon or lton or proton or renon or cpon - -; ------------------- - -; Save return address - -retsave: - pop de ; Get return address - pop hl ; Get return address to zcpr3 - ld (z3ret),hl ; Save it - push hl ; Put return address to zcpr3 back - push de ; Put return address back - ret - -; ------------------------------- - -; Test file pted to by HL for R/O -; NZ if R/O - - if renon or cpon or eraon -rotest: - push hl ; Advance to r/o byte - ld bc,8 ; Pt to 9th byte - add hl,bc - ld a,(hl) ; Get it - and 80h ; Mask bit - push af - ld hl,romsg - call nz,printhl ; Print if nz - pop af ; Get flag - pop hl ; Get ptr - ret -romsg: - db ' is R/','O'+80h - -; ----------------------------------------------- - -; Check user to see if he approves erase of file -; Return with Z if yes - -eraq: - call print - db ' - Eras','e'+80h - endif ; Renon or cpon or eraon - - if renon or cpon or eraon or proton -eraq1: - call print - db ' (Y/N/Q)? N',88h ; 88h = backspace - call conin ; Get response - cp 'Q' ; Quit command? - jr z,exit - cp 'Y' ; Key on yes - ret - endif ; Renon or cpon or eraon or proton - -; ------------------------------------- - -; Give space on current disk and return - - if spaceon and [dirsp or cpsp or erasp or resetsp] -spaexit: - call crspace ; Show space remaining -; fall thru - endif ; spaceon and [dirsp or cpsp or erasp or resetsp] - -; -; Exit to ZCPR3 -; -exit: -z3ret equ $+1 ; Pointer to in-the-code modification - ld hl,0 ; Return address - jp (hl) ; Goto ZCPR3 - -; -------------------------------------------------------- - -; Check for user input; if ^X, return with Z, abort if ^C - - if diron or lton or eraon or proton or peekon -break: - push hl ; Save regs - push de - push bc - ld c,11 ; Console status check - call bdos - or a - ld c,1 ; Get char if any - call nz,bdos - pop bc ; Restore regs - pop de - pop hl -break1: cp ctrlc ; Check for abort - jr z,exit ; Exit - cp ctrlx ; Skip? - ret - endif ; Diron or lton or eraon or proton or peekon - -; --------------------- - -; Print address in DE - - if peekon or pokeon -adrat: - call print - db ' at',' '+80h - ld a,d ; Print high - call pahc - ld a,e ; Print low - jp pahc - endif ; Peekon or pokeon - -; -------------------------------------------------- - -; Extract hexadecimal number from line pted to by HL -; Return with value in DE and HL pting to offending char - - if peekon or pokeon or porton -hexnum: - ld de,0 ; De=accumulated value -hnum1: - ld a,(hl) ; Get char - cp ' '+1 ; Done? - ret c ; Return if space or less - inc hl ; Pt to next - sub '0' ; Convert to binary - jr c,numerr ; Return and done if error - cp 10 ; 0-9? - jr c,hnum2 - sub 7 ; A-f? - cp 10h ; Error? - jr nc,numerr -hnum2: - push hl ; Save pointer - ex de,hl - add hl,hl - add hl,hl - add hl,hl - add hl,hl ; De x16 to hl - ld e,a - ld d,0 - add hl,de - ex de,hl ; De = de * 16 + a - pop hl ; Get the pointer - jr hnum1 ; Try again -; -; Number error -; -numerr: - ld a,ecbadnum ; Numeric error - jp errexit ; Chain to error handler - -; Skip to next non-blank - -sksp: - ld a,(hl) ; Get char - inc hl ; Pt to next - cp ' ' ; Skip spaces - jr z,sksp - dec hl ; Pt to good char - or a ; Set eol flag - ret - endif ; Peekon or pokeon or porton - -; ------------------------------------------------------------------------ - -; Test File in FCB for unambiguity and existence, ask user to delete if so -; Return with Z flag set if R/O or no permission to delete - - if renon or cpon -extest: - call ambchk ; Ambiguous file names not allowed - call searf ; Look for specified file - jr z,exok ; Ok if not found - call getsbit ; Position into dir - inc de ; Pt to file name - ex de,hl ; Hl pts to file name - push hl ; Save ptr to file name - call prfn ; Print file name - pop hl - call rotest ; Check for r/o - jr nz,exer - call eraq ; Erase? - jr nz,exer ; Restart as error if no - ld de,fcb1 ; Pt to fcb1 - ld c,19 ; Delete file - call bdos -exok: xor a - dec a ; Nz = ok - ret -exer: - xor a ; Error flag - file is r/o or no permission - ret - -; Check for ambiguous file name in FCB1 -; Return z if so - -ambchk: - ld hl,fcb1+1 ; Pt to fcb - -; Check for ambiguous file name pted to by HL - -ambchk1: - push hl - ld b,11 ; 11 bytes -amb1: ld a,(hl) ; Get char - and 7fh ; Mask - cp '?' - jr z,amb2 - inc hl ; Pt to next - djnz amb1 - dec b ; Set nz flag - pop de - ret -amb2: - pop hl ; Pt to file name - ld a,ecambig ; Ambiguous name error - ld b,00010000b ; Bit 4 tells EH to load transient - jp ErrEx1 ; Chain to error handler - endif ; Renon or cpon - -; --------------------------------------- - -; Init FCB1, return with DE pting to FCB1 - - if eraon or lton or cpon -initfcb1: - ld hl,fcb1 ; Pt to fcb -initfcb2: - push hl ; Save ptr - ld bc,12 ; Pt to first byte - add hl,bc - ld b,24 ; Zero 24 bytes - xor a ; Zero fill - call fillp ; Fill memory - pop de ; Pt to fcb - ret - endif ; Eraon or lton or cpon - -; Fill a region with byte in A - - if eraon or lton or cpon or diron -fillp: - ld (hl),a ; Store byte - inc hl ; Pt to next - djnz fillp ; Count down - ret - endif ; Eraon or lton or cpon or diron - -; --------------------------------------------------------------------- - -; After a search, return NZ set if desired type of file found, Z if not. -; This algorithm looks at the system bit of the located file; this -; bit is set to 1 if the file is a system file and 0 if not a system -; file. The following exclusive or masks are applied to return Z or NZ -; as required by the calling routine: -; -; SYSTEM BYTE: X 0 0 0 0 0 0 0 (AFTER 80H MASK, X=1 IF SYS, 0 IF DIR) -; -; SYS-ONLY : 0 0 0 0 0 0 0 0 (XOR 0 = 0 if X=0, = 80H if X=1) -; DIR-ONLY : 1 0 0 0 0 0 0 0 (XOR 80H = 80h if X=0, = 0 if X=1) -; BOTH : 0 0 0 0 0 0 0 1 (XOR 1 = 81H or 1H, NZ in both cases) - - if diron or eraon or lton or proton or cpon or renon -getsbit: - dec a ; Adjust to returned value - rrca ; Convert number to offset into tbuff - rrca - rrca - and 60h - ld de,tbuff ; Pt to buffer - add a,e ; Add entry offset to base addr - ld e,a ; Result in e - push de ; Save ptr in de - add a,10 ; Add offset of 10 to pt to system byte - ld e,a ; Set address - ld a,(de) ; Get byte - pop de ; Get ptr in de - and 80h ; Look at only system bit -systst equ $+1 ; In-the-code variable - xor 0 ; If systst=0, sys only; if systst=80h, dir - ; Only; if systst=1, both sys and dir - ret ; Nz if ok, z if not ok - -; Log into user area contained in FCB1 - -logusr: - ld a,(fcb1+13) ; Get user number -setusr: - ld e,a - ld c,32 ; Use bdos fct - jp bdos - -; Print file name pted to by HL - -prfn: - call spac ; Leading space - ld b,8 ; 8 chars - call prfn1 - call print - db '.'+80h ; Dot - ld b,3 ; 3 chars -prfn1: ld a,(hl) ; Get char - inc hl ; Pt to next - call conout ; Print char - djnz prfn1 ; Count down - ret - -; Search for first - -searf: - push bc ; Save counter - push hl ; Save hl - call dirchek ; Check bad dirspec - ld c,17 ; Search for first function -searf1: ld de,fcb1 ; Pt to fcb - call bdos - inc a ; Set zero flag for error return - pop hl ; Get hl - pop bc ; Get counter - ret - endif ; Diron or eraon or lton or proton or cpon or renon - -; ------------------------- - -; Copy HL to DE for B bytes - - if diron or eraon or lton or proton or cpon -blkmov: - ld a,(hl) ; Get - ld (de),a ; Put - inc hl ; Pt to next - inc de - djnz blkmov ; Loop - ret - endif ; Diron or eraon or lton or proton or cpon - -; ----------------------------- - -; Print file not found message - - if diron or eraon -prfnf: - call print - db ' No File','s'+80h - jp exit - endif ; Diron or eraon - -; ------------------------------------------------------------------ - -; Define buffers as high as possible in TPA for the following groups -; of commands: -; -; COPY needs SRCFCB, CBUFF, STPBUF (if STPCALL) -; ERA, PROT, LIST/TYPE need DIRBUF and NXTFILE -; DIR needs DIRBUF -; -; If DIRBUF is defined, its value is in HL on return from this code. The DE -; register pair is not changed by the code, but the BC pair is affected. - -dirbufon equ lton or eraon or proton or diron - - if dirbufon -dirbuf: ds 2 ; Address for directory buffer - endif ; dirbufon - - if lton or eraon or proton -nxtfile: ds 2 ; Ptr to next file in list - endif ; eraon or lton or proton - - if cpon or dirbufon or cledon -define: - push de - ld hl,(bdos+1) ; Get bottom of BDOS - ex de,hl ; ..into DE - ld hl,(ccp) ; From Z34CMN.LIB - -; Now we have to compare and pick the lower address as the top of TPA - - push hl ; Save CPR address while comparing - xor a ; Clear the carry flag - sbc hl,de ; Compute (CPR-BDOS) - pop hl ; Restore CPR address - jr c,define1 ; Branch if BDOS address is higher (use CPR) - ex de,hl ; Otherwise use BDOS address -define1: - if cpon - ld de,-36 ; Calculate place for SRCFCB for copy command - add hl,de - ld (srcfcb),hl - - if stpcall - ld de,-128 - add hl,de ; Buffer for datestamps - ld (stpbuf),hl - endif ; stpcall - - if dirbufon - push hl ; Save if needed below - endif ; dirbufon - - ld de,-[cpblocks*128] ; CBUFF can use same space as DIRBUF - add hl,de - ld (cbuff),hl - - if dirbufon - pop hl - endif ; dirbufon - - endif ; cpon - - if dirbufon - ld de,-[maxdirs*11] ; Space for directory buffer - add hl,de - ld (dirbuf),hl - endif ; dirbufon - - pop de - ret - - endif ; cpon or dirbufon or cledon - -; --------------- - -; Search for next - - if diron or eraon or lton or proton -searn: - push bc ; Save counter - push hl ; Save hl - ld c,18 ; Search for next function - jr searf1 - -; Load directory and sort it -; On input, A=SYSTST flag (0=SYS, 1=DIR, 80H=BOTH) -; Directory is loaded into buffer at top of TPA -; Return with ZERO set if no match and HL pts to 1st entry if match - -direrr: - ld a,ectpafull ; Chain to error handler - jp errexit - -getdir: - ld (systst),a ; Set system test flag - call logusr ; Log into user area of fcb1 - call define ; Define buffer addresses - ld (hl),0 ; Set empty - ld bc,0 ; Set counter - call searf ; Look for match - ret z ; Return if not found - -; Step 1: Load directory - -gd1: - push bc ; Save counter - call getsbit ; Check for system ok - pop bc - jr z,gd2 ; Not ok, so skip - push bc ; Save counter - inc de ; Pt to file name - ex de,hl ; Hl pts to file name, de pts to buffer - ld b,11 ; Copy 11 bytes - call blkmov ; Do copy - pop bc ; Get counter - inc bc ; Increment counter - ld hl,maxdirs-1 ; See if count equals or exceeds MAXDIRS - ld a,b ; Check high bytes - sub h - jr c,gd1a ; If carry set, we are OK - ld a,c ; Check low bytes - sub l - jr nc,direrr ; If no carry, jump to error message -gd1a: ex de,hl ; Hl pts to next buffer location -gd2: call searn ; Look for next - jr nz,gd1 - ld (hl),0 ; Store ending 0 - ld hl,(dirbuf) ; Pt to dir buffer - ld a,(hl) ; Check for empty - or a - ret z - -; Step 2: Sort directory - - if dsort - push hl ; Save ptr to dirbuf for return - call diralpha ; Sort - pop hl - endif - - xor a ; Set nz flag for ok - dec a - ret - - -; DIRALPHA -- Alphabetizes directory in DIRBUF; BC contains -; the number of files in the directory -; - if dsort -diralpha: -; -; SHELL SORT -- -; This sort routine is adapted from "Software Tools" -; by Kernigan and Plaugher, page 106. Copyright, 1976, Addison-Wesley. -; - ld h,b ; Hl=bc=file count - ld l,c - ld (num),hl ; Set "NUM" - ld (gap),hl ; Set initial gap to n for first division by 2 - -; For (gap = num/2; gap > 0; gap = gap/2) - -srtl0: -gap equ $+1 ; Pointer for in-the-code modification - ld hl,0 ; Get previous gap - or a ; Clear carry - rr h ; Rotate right to divide by 2 - rr l - - ld a,l ; Test for zero - or h - ret z ; Done with sort if gap = 0 - - ld (gap),hl ; Set value of gap - push hl - pop ix ; Set ix=gap for following loop - -; For (ix = gap + 1; ix <= num; ix = ix + 1) - -srtl1: - inc ix ; Add 1 to ix - push ix - pop de ; IX is in DE - -; Test for ix <= num - -num equ $+1 ; Pointer for in-the-code modification - ld hl,0 ; Number of items to sort - ld a,l ; Compare by subtraction - sub e - ld a,h - sbc a,d ; Carry set means ix > n - jr c,srtl0 ; Don't do for loop if ix > n - ex de,hl ; Set jj = ix initially for first - ; ..subtraction of gap - ld (jj),hl - -; For (jj = ix - gap; jj > 0; jj = jj - gap) - -srtl2: - ld de,(gap) -jj equ $+1 ; Pointer for in-the-code modification - ld hl,0 ; Get jj - - sbc hl,de ; Compute JJ - GAP - ld a,h - ld (jj),hl ; Jj = jj - gap - jr c,srtl1 ; If carry from subtractions, jj < 0 and abort - or l ; Jj=0? - jr z,srtl1 ; If zero, jj=0 and abort - -; Set iy = jj + gap - - ex de,hl ; Jj in de - ld hl,(gap) ; Get gap - add hl,de ; Jj + gap - push hl - pop iy ; IY = iy + gap - -; If (v(jj) <= v(iy)) - - call icompare ; JJ in de, iy in hl - -; ...then break - - jr c,srtl1 - -; ...else exchange - - ld de,(jj) ; Swap jj, iy - push iy - pop hl - call iswap ; Jj in de, iy in hl - -; End of inner-most for loop - - jr srtl2 - -; -; SWAP (Exchange) the elements whose indexes are in HL and DE -; -iswap: - call ipos ; Compute position from index - ex de,hl - call ipos ; Compute 2nd element position from index - ld b,11 ; 11 bytes to flip - endif ; Dsort - endif ; Diron or eraon or lton or proton - - if diron or eraon or lton or proton or renon or (cpon and leftright) -iswap1: - ld a,(de) ; Get bytes - ld c,(hl) - ex de,hl - ld (de),a ; Put bytes - ld (hl),c - inc hl ; Pt to next - inc de - djnz iswap1 - ret - endif ; Diron or eraon or lton or proton or renon - ; ..or (cpon and leftright) - - if leftright and (cpon or renon) -; -; FCBSWAP exchanges 16 byte FCB1 with FCB2 from the command line. -; This allows COPY and REN commands to execute left to right, -; e.g., "cp source dest". Costs 10 bytes. -; -; If TESTEQ is true, then commands containing '=' still execute right -; to left, e.g., "cp dest=source". Costs 11 bytes additional. -; -fcbswap: - if testeq - xor a ; Zero B - ld b,a - ld hl,80h ; Point to command line, length - ld c,(hl) ; Set up for CPIR - ld a,'=' ; Search for '=' - cpir ; '=' found in command? - ret z ; Yes, don't swap - endif ; Testeq - - ld de,fcb1 ; Point to command fcb's - ld hl,fcb2 - ld b,16 ; Exchange them - jr iswap1 - endif ; leftright and (cpon or renon) - - if diron or eraon or lton or proton - if dsort -; -; ICOMPARE compares the entry pointed to by the pointer pointed to by HL -; with that pointed to by DE (1st level indirect addressing); on entry, -; HL and DE contain the numbers of the elements to compare (1, 2, ...); -; on exit, Carry Set means ((DE)) < ((HL)), Zero Set means ((HL)) = ((DE)), -; and Non-Zero and No-Carry means ((DE)) > ((HL)) -; -icompare: - call ipos ; Get position of first element - ex de,hl - call ipos ; Get position of 2nd element - ex de,hl -; -; Compare dir entry pted to by HL with that pted to by DE; -; No net effect on HL, DE; ret w/CARRY set means DE -; Version: 1.2 -; Date: 16 June 1988 -; Changes: Renamed CRT0 to LINS for NZCOM compatibility. -; Added CUSR " " " - -; Author: Carson Wilson -; 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 - -z3whl equ z3env+29h ; Wheel byte address -z3whls equ yes ; There is a wheel - -lins equ z3env+33h ; CRT text lines address - -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 - -clrscr equ z3env+97h ; Clear screen string address - - 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 - -rsdmsg equ z3msg+3ah ; Reserved bytes - - 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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/z34defn.lib b/Source/BPBIOS/Z34RCP11/z34defn.lib deleted file mode 100644 index 683fc322..00000000 Binary files a/Source/BPBIOS/Z34RCP11/z34defn.lib and /dev/null differ diff --git a/Source/BPBIOS/Z34RCP11/z34mac.lib b/Source/BPBIOS/Z34RCP11/z34mac.lib deleted file mode 100644 index 8ab3ffbe..00000000 --- a/Source/BPBIOS/Z34RCP11/z34mac.lib +++ /dev/null @@ -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, - - 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 - - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/z34rcp.lib b/Source/BPBIOS/Z34RCP11/z34rcp.lib deleted file mode 100644 index 74908d54..00000000 --- a/Source/BPBIOS/Z34RCP11/z34rcp.lib +++ /dev/null @@ -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, %' ; 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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/z34rcp.lib.sav b/Source/BPBIOS/Z34RCP11/z34rcp.lib.sav deleted file mode 100644 index a0272445..00000000 --- a/Source/BPBIOS/Z34RCP11/z34rcp.lib.sav +++ /dev/null @@ -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, %' ; 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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/z34rcp11.doc b/Source/BPBIOS/Z34RCP11/z34rcp11.doc deleted file mode 100644 index 92195c5d..00000000 --- a/Source/BPBIOS/Z34RCP11/z34rcp11.doc +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/z34rcp11.for b/Source/BPBIOS/Z34RCP11/z34rcp11.for deleted file mode 100644 index c60e1910..00000000 --- a/Source/BPBIOS/Z34RCP11/z34rcp11.for +++ /dev/null @@ -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. - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/z34rcp11.hlp b/Source/BPBIOS/Z34RCP11/z34rcp11.hlp deleted file mode 100644 index 991d5d71..00000000 --- a/Source/BPBIOS/Z34RCP11/z34rcp11.hlp +++ /dev/null @@ -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 % - prtdec ,%recs,,%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, - option Echo,echoon,lst,echolst - option Era,eraon,sp, - 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, - option Space,spaceon - option Spop,cledon - option Type,lton,cls, - 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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/z34rcp11.z80.sav b/Source/BPBIOS/Z34RCP11/z34rcp11.z80.sav deleted file mode 100644 index 7af6b875..00000000 --- a/Source/BPBIOS/Z34RCP11/z34rcp11.z80.sav +++ /dev/null @@ -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, - prtdec ,%recs,,%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, - option Echo,echoon,lst,echolst - option Era,eraon,sp, - 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, - option Space,spaceon - option Spop,cledon - option Type,lton,cls, - 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 - \ No newline at end of file diff --git a/Source/BPBIOS/Z34RCP11/zsystem.ad b/Source/BPBIOS/Z34RCP11/zsystem.ad deleted file mode 100644 index 5231a575..00000000 --- a/Source/BPBIOS/Z34RCP11/zsystem.ad +++ /dev/null @@ -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 :", 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. - \ No newline at end of file diff --git a/Source/BPBIOS/ZCPR33/zcpr33n.z80 b/Source/BPBIOS/ZCPR33/zcpr33n.z80 index a5bdeda8..c8774da3 100644 --- a/Source/BPBIOS/ZCPR33/zcpr33n.z80 +++ b/Source/BPBIOS/ZCPR33/zcpr33n.z80 @@ -78,6 +78,9 @@ ; which are used to customize ZCPR33 for the user's working environment. ; NOTE -- TRUE & FALSE are defined in Z3BASE. +memtop equ 0FFE0H - 1 ; Reserve memory above this for HBIOS +base equ 0 + maclib z3basen.lib maclib z33hdr.lib diff --git a/Source/BPBIOS/ZCPR33/zcpr33t.z80 b/Source/BPBIOS/ZCPR33/zcpr33t.z80 index 3f2313e1..702626c1 100644 --- a/Source/BPBIOS/ZCPR33/zcpr33t.z80 +++ b/Source/BPBIOS/ZCPR33/zcpr33t.z80 @@ -78,6 +78,9 @@ ; which are used to customize ZCPR33 for the user's working environment. ; NOTE -- TRUE & FALSE are defined in Z3BASE. +memtop equ 0FE00H - 1 ; Reserve memory above this for HBIOS +base equ 0 + maclib z3baset.lib maclib z33hdr.lib diff --git a/Source/BPBIOS/bank-dx.cnf b/Source/BPBIOS/bank-dx.cnf deleted file mode 100644 index 15f25911..00000000 --- a/Source/BPBIOS/bank-dx.cnf +++ /dev/null @@ -1,129 +0,0 @@ -; BPCNFG Configuration script for D-X Designs' P112, 256/512k RAM, 16/18 MHz -; - -;-- 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) - ] - \ No newline at end of file diff --git a/Source/BPBIOS/boot-dx.cnf b/Source/BPBIOS/boot-dx.cnf deleted file mode 100644 index 1bfa09fe..00000000 --- a/Source/BPBIOS/boot-dx.cnf +++ /dev/null @@ -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 - ] - \ No newline at end of file diff --git a/Source/BPBIOS/bp33n.dat b/Source/BPBIOS/bp33n.dat index 8ec9a9c2..596c693b 100644 Binary files a/Source/BPBIOS/bp33n.dat and b/Source/BPBIOS/bp33n.dat differ diff --git a/Source/BPBIOS/bp33nbnk.dat b/Source/BPBIOS/bp33nbnk.dat index 8ec9a9c2..671ee847 100644 Binary files a/Source/BPBIOS/bp33nbnk.dat and b/Source/BPBIOS/bp33nbnk.dat differ diff --git a/Source/BPBIOS/bp33t.dat b/Source/BPBIOS/bp33t.dat index 09506ea4..99d9361e 100644 Binary files a/Source/BPBIOS/bp33t.dat and b/Source/BPBIOS/bp33t.dat differ diff --git a/Source/BPBIOS/bp33tbnk.dat b/Source/BPBIOS/bp33tbnk.dat index 09506ea4..1db3d61f 100644 Binary files a/Source/BPBIOS/bp33tbnk.dat and b/Source/BPBIOS/bp33tbnk.dat differ diff --git a/Source/BPBIOS/bp34n.dat b/Source/BPBIOS/bp34n.dat index bb4c48f3..aeb6bc31 100644 Binary files a/Source/BPBIOS/bp34n.dat and b/Source/BPBIOS/bp34n.dat differ diff --git a/Source/BPBIOS/bp34nbnk.dat b/Source/BPBIOS/bp34nbnk.dat index bb4c48f3..fdea1ddb 100644 Binary files a/Source/BPBIOS/bp34nbnk.dat and b/Source/BPBIOS/bp34nbnk.dat differ diff --git a/Source/BPBIOS/bp34t.dat b/Source/BPBIOS/bp34t.dat index ffb28311..cf414646 100644 Binary files a/Source/BPBIOS/bp34t.dat and b/Source/BPBIOS/bp34t.dat differ diff --git a/Source/BPBIOS/bp34tbnk.dat b/Source/BPBIOS/bp34tbnk.dat index ffb28311..5616693b 100644 Binary files a/Source/BPBIOS/bp34tbnk.dat and b/Source/BPBIOS/bp34tbnk.dat differ diff --git a/Source/BPBIOS/bp41nbnk.dat b/Source/BPBIOS/bp41nbnk.dat index 7f6786be..0f4c06cc 100644 Binary files a/Source/BPBIOS/bp41nbnk.dat and b/Source/BPBIOS/bp41nbnk.dat differ diff --git a/Source/BPBIOS/bp41tbnk.dat b/Source/BPBIOS/bp41tbnk.dat index 736fbe67..ed7aa82a 100644 Binary files a/Source/BPBIOS/bp41tbnk.dat and b/Source/BPBIOS/bp41tbnk.dat differ diff --git a/Source/BPBIOS/bpbio-dx.z80 b/Source/BPBIOS/bpbio-dx.z80 deleted file mode 100644 index 39b2a5ef..00000000 --- a/Source/BPBIOS/bpbio-dx.z80 +++ /dev/null @@ -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 - \ No newline at end of file diff --git a/Source/BPBIOS/bpbio-ww.z80 b/Source/BPBIOS/bpbio-ww.z80 index 666b2ad2..491a6319 100644 --- a/Source/BPBIOS/bpbio-ww.z80 +++ b/Source/BPBIOS/bpbio-ww.z80 @@ -32,35 +32,45 @@ ; ; XX: 00=COM1 01=COM2 10=PIO 11=NULL ; -;+++++++++++++++++ D-X Designs Pty Ltd P112 Version ++++++++++++++++++ +;+++++++++++++++++ Retro-Brew HBIOS 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: +; This configuration of the B/P Bios is for Retro-Brew (formerly +; called N8VEM) Single board computers with HBIOS. Multifunction +; chips on the board provide the services needed by a CP/M BIOS. +; This version of BPBios was derived from the P-112 version. +; The primary chips and the functions provided are: ; +; For Mark IV or N8 ; 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 +; 28F512 Flash ROM Boot code, device initialization +; and ROM disk +; 512 KB Static RAM On board RAM +; +; For SBC V1/2, ZETA or SIMH +; Zilog Z80 Z80 core at 4 Mhz +; UART 16650 compatible UART +; Dallas DS-1202 Primary Real time clock +; 28F512 Flash ROM Boot code, device initializtion, monitor and +; ROM disk +; 512k Static RAM On board RAM ; ; Ver Date Revision Description -; --- --------- ------------------------ +; --- --------- ----------------------- +; 1.8 04 Apr 21 - Update for ROMWBW version 3.0.1 LN +; 1.7 01 Jul 17 - Updated for HBIOS version 2.8.1 WW+LN +; 1.6 04 Sep 16 - Updated for HBIOS version 2.8 pre 5 WW+LN +; 1.5 15 May 15 - Updated for new versin of HBIOS WW+LN +; 1.4 24 Mar 14 - Initial HBIOS test Release WW+LN ; 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.2 - 30 Aug 97 - Expanded HD CDB length to 12 bytes for CDROM. HFB +; 1.1 - 11 May 97 - Added IDE Hard Drive, updated files to latest +; version. HFB ; 1.0 - 13 Aug 96 - Initial Release for P112 from YASBEC release. HFB ;***************************************************************************** @@ -75,9 +85,9 @@ YES EQU TRUE INCLUDE DEF-WW.LIB ; << file for your configuration. >> ; << ****** SYSTEM SPECIFIC ****** >> - ; << Insert DEF-xxxx.LIB definition >> - INCLUDE ROMWBW.LIB ; << file for your configuration. >> - + ; << Insert ROMWBW definitions here >> + INCLUDE ROMWBW.LIB ; << for version # in ROM >> + CSEG ;..... ; Ascii Character Equates @@ -97,13 +107,20 @@ WRUAL EQU 2 ; DOS code for unallocated write LOCKF EQU LOW [NOT AUTOSL] ;Lock flag for format default ALONE EQU FALSE ; Boot code equate + ; Include ENV definitions IF Z3 -; MACLIB Z3BASE.LIB ; Include ENV definitions - IF CONF_T - MACLIB Z3BASET.LIB - ENDIF - IF CONF_N + IF INTPXY + IF ZSDOS2 + MACLIB Z3BASEFN.LIB + ELSE MACLIB Z3BASEN.LIB + ENDIF + ELSE + IF ZSDOS2 + MACLIB Z3BASEFT.LIB + ELSE + MACLIB Z3BASET.LIB + ENDIF ENDIF ENDIF PAGE @@ -154,7 +171,7 @@ BIOSJT: JP CBOOT ; 00 Cold Boot ; --- <<< End of CP/M 3 Vectors >>> JP RETBIO ; 30 Return BIOS Addresses - JP DIRDIO ; 31 Direct Disk I/O + JP ISTRUE ; 31 Direct Disk I/O - Not implemented 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 @@ -177,21 +194,21 @@ DOS EQU BIOSJT-0E00H IF BANKED COMMON /BANK2/ ROMJT: - IF INROM + IF INROM JP INSYNC INSYNC: JP BOOTER ; Cold start loader - ELSE + 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) + ENDIF ; Inrom +JDIRIO: JP ISTRUE ; Low Level HDC/FDC Functions +JHDCIO: JP ISTRUE ; Low Level HDC Functions (combined w/FDCIO) JBREAD: JP BREAD ; BIOS Read JBWRT: JP BWRT ; BIOS Write JBSTRN: JP BSTRN ; BIOS Sectran - IF INROM + IF INROM INCLUDE BOOTROM.Z80 ; Boot Routines - ENDIF ; Inrom + ENDIF ; Inrom ENDIF ; Banked PAGE ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -218,15 +235,15 @@ JBSTRN: JP BSTRN ; BIOS Sectran IF [BANKED OR INROM] COMMON /B2RAM/ - IF INROM + IF INROM HSTBUF: DEFS INITCS ; Use a 1k buffer w/below - ELSE + ELSE HSTBUF EQU CBOOT0 ; Use CBOOT0 code for part of buffer w/below - ENDIF ;inrom + ENDIF ;INROM ELSE DSEG HSTBUF EQU CBOOT - ENDIF ;not banked + ENDIF ;[BANKED OR INROM] DEFS 1024-(INITCS) ; Use a 1 k buffer HSTSIZ EQU HSTBUF+1024 ; Added label for Hard Drive ext. interface @@ -249,19 +266,19 @@ 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 + IF FLOPYH INCLUDE DPB-H.LIB ; If "High-Density" Disk formats desired, - ENDIF - IF FLOPY8 + ENDIF ; FLOPYH + IF FLOPY8 INCLUDE DPB-8.LIB ; If 8" or HD Floppy Disks can be handled, - ENDIF ; add default Autoselect DPB's - IF MORDPB + ENDIF ;FLOPY8 ; add default Autoselect DPB's + IF MORDPB INCLUDE DPB2.LIB ; Additional assignable DPB's (4+4 unused) - ENDIF ;mordpb + ENDIF ;mordpb ELSE ;Not autosl INCLUDE DPBRAM.LIB ; RAM-based DPB's, 1 per physical Format - ENDIF + ENDIF ; AUTOSL NRDPB EQU [$-DPB]/DPBSIZ ; Calc number of DPB's @@ -271,132 +288,17 @@ NRDPB EQU [$-DPB]/DPBSIZ ; Calc number of DPB's ; << ****** Hardware Specific ****** >> ; << Insert DPB Info for Hard Disk >> INCLUDE DPBHD-WW.LIB ; << Drives as DPBHD-xx.LIB >> - ENDIF + ENDIF ; HARDDSK ;.list - IF RAMDSK - ; << ****** Hardware Specific ****** >> - ; << Insert DPB Info for RAM Disk >> - INCLUDE DPBM-WW.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 + ENDIF ;HARDDSK ;.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: -; CALL PRTSTRD -; DEFB '[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 @@ -409,7 +311,7 @@ MAXHFN EQU [$-HDFUNC]/2 ; << Enter the Inter-Bank Movement >> INCLUDE IBMV-WW.Z80 ; << routines in IBMV-xxx.Z80 >> - ELSE ; If Not Banked, Use these hooks + ELSE ; If Not Banked, Use these hooks MOVE: LDIR RET @@ -481,39 +383,23 @@ DRVTBL: LD HL,DPHTBL ; Point to DPH table INCLUDE SELFLP2.Z80 ; Floppy disk select ELSE INCLUDE SELFLP1.Z80 - ENDIF + ENDIF ;AUTOSL PAGE INCLUDE FLOPPY.Z80 ; Hardware independent floppy routines PAGE ; << ****** Hardware Specific ****** >> - ; << This Driver is for the Standard >> - INCLUDE FDC-WW.Z80 ; << MicroSystems (SMC) FDC37C665 >> + INCLUDE FDC-WW.Z80 ; << This Driver is for HBIOS >> PAGE ; << ****** Hardware Specific ****** >> - ; << Enter routines for your timer >> - INCLUDE TIM-WW.Z80 ; << and clock in TIM-xxxx.Z80 >> + INCLUDE TIM-WW.Z80 ; << This Driver is for HBIOS >> PAGE IF HARDDSK ; << ****** Hardware Specific ****** >> - IF SCSI ; << Enter driver routines for your >> - INCLUDE HARD-WW.Z80 ; << Hard Disk in HARD-xxx.Z80 >> - ENDIF - IF IDE - INCLUDE HARDIDE.Z80 - ENDIF - IF SIMHDSK - INCLUDE HARDSIM.Z80 - ENDIF - IF HBDSK - INCLUDE HARDHB.Z80 - ENDIF + INCLUDE HARD-WW.Z80 ; << This Driver is for HBIOS >> + PAGE - ENDIF + ENDIF ;HARDDSK - IF RAMDSK ; << ****** Hardware Specific ****** >> - INCLUDE RAMD-WW.Z80 ; << Enter driver routines for RAM >> - PAGE ; << Disk in RAMD-xxx.Z80 >> - ENDIF ; << ****** Hardware Specific ****** >> ; << Enter Warm Boot routines in >> @@ -530,44 +416,9 @@ DRVTBL: LD HL,DPHTBL ; Point to DPH table 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 + ENDIF ;[BANKED AND ZSDOS2] ; ..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 @@ -588,17 +439,18 @@ LIMIT EQU $-BIOSJT+INITCS PRINTX %LIMIT .printx ELSE - IF MOVCPM AND LIMIT > 4352 + IF MOVCPM AND LIMIT > 4352 .printx .printx ++++ BIOS exceeds (>4352) 2-Sector Boot Record ++++ PRINTX %LIMIT .printx - ENDIF - ENDIF + ENDIF ;IF MOVCPM AND LIMIT > 4352 + ENDIF ;MOVCPM AND LIMIT > 4480 NSECTS EQU ($+INITCS-BIOSJT)/128+1 IF INROM INCLUDE BOOTRAM.Z80 - ENDIF + ENDIF ;INROM END - \ No newline at end of file + + \ No newline at end of file diff --git a/Source/BPBIOS/byteio.z80 b/Source/BPBIOS/byteio.z80 index ed11044e..af8d98df 100644 --- a/Source/BPBIOS/byteio.z80 +++ b/Source/BPBIOS/byteio.z80 @@ -1,5 +1,5 @@ ;************************************************************************** -; BYTEIO. Character IO High-Level Routines. (MUST be in Common Memory) +; BYTEIO. Character IO High-Level Routines. (MUSt be in Common Memory) ; Calling parameters apply to both High and Low-Level routines. ; ; Output Routines - Enter: C = Character to be sent @@ -124,7 +124,8 @@ ISFALSE: XOR A ;..... ; Print routine prints to console the Null or Zero-terminated string at (SP) -PRINT: EX (SP),HL ; Print inline 0 or Hi-bit terminated +PRINT: + EX (SP),HL ; Print inline 0 or Hi-bit terminated PSTR: LD A,(HL) ; General purpose print 0 or Hi-bit INC HL ; Terminated string pointed to by HL OR A @@ -143,4 +144,4 @@ PSTRX: EX (SP),HL ; Else swap Ptr to next instr for entry HL val RET ; ..and return to caller ;========================== End of BYTEIO ================================ - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/cboot-dx.z80 b/Source/BPBIOS/cboot-dx.z80 deleted file mode 100644 index eac62ca0..00000000 --- a/Source/BPBIOS/cboot-dx.z80 +++ /dev/null @@ -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 ============================= - \ No newline at end of file diff --git a/Source/BPBIOS/cboot-ww.z80 b/Source/BPBIOS/cboot-ww.z80 index 3febd543..77b535d9 100644 --- a/Source/BPBIOS/cboot-ww.z80 +++ b/Source/BPBIOS/cboot-ww.z80 @@ -2,8 +2,11 @@ ; 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 - *********************** +; - Retro-Brew Boards W/ RomWBW HBIOS *********************** ; +; 1.5 - 04 Sep 16 - Mods to work with HBIOS V 2.8 LWN+WW +; 1.4 - 15 Apr 15 - Mods to work with HBIOS V 2.7.1 WW+LN_ +; 1.3 - 24 Mar 14 - Initial N8VEM HBIOS test release WW+LN ; 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 @@ -23,14 +26,19 @@ ; module must be one of the first linked to place HSTBUF/DIRBUF at the ; beginning of B2RAM and DSEG. -CBOOT: DI ; Disable interrupt system +CBOOT: + DI ; Disable interrupt system + IF BANKED + LD SP,USP ; Set to User Stack in High memory + ELSE + LD SP,80H ; Set stack in Low memory + ENDIF ; BANKED + CALL HBX_INIT LD HL,(IOBYT) ; Get IOBYTE, Default Drive & User LD (3),HL ; Set values in TPA bank IF BANKED - LD SP,USP ; Set to User Stack in High memory - CALL HBX_INIT ; WW CALL GOSYSB ; Turn on the System bank XOR A LD (BIOSTK),A ; Init bank switcher @@ -39,11 +47,9 @@ CBOOT: DI ; Disable interrupt system LD A,(TPABNK) CALL SELBNK ; Insure TPA is in context ELSE - LD SP,80H ; Set stack in Low memory - CALL HBX_INIT ; WW CALL CBOOT0 ; Execute main part of Cold Setup - ENDIF - + ENDIF ; Banked + IF NOT MOVCPM LD HL,003CH ; Point to ZMP Flag LD (HL),0E5H ; say this is first time run @@ -63,10 +69,11 @@ CBOOT: DI ; Disable interrupt system LD BC,(CPLEN) ; Length of command processor CALL HBX_COPY ; Do it + JP WBOOTV ; move it and commence execution ELSE JP GOZSYS ; Otherwise just go to Command Processor - ENDIF + ENDIF ;FASTWB IF BANKED COMMON /B2RAM/ @@ -77,7 +84,8 @@ CBOOT: DI ; Disable interrupt system ; 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 +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 @@ -92,14 +100,14 @@ DYNLP: LD E,(HL) 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 +; 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 +; ENDIF ; Ramdsk JR NZ,DYNCHK ; ..jump to end if Not ADDSIZ: PUSH BC ; Save loop counter PUSH HL ; and ptr to DPH @@ -137,7 +145,7 @@ DVRAME: SRL D ; Divide by 2 DYNCHK: DJNZ DYNLP ; Loop til all 16 tested ENDIF ;harddsk - + IF BANKED LD DE,USP ; Point above critical Bios Ram storage ELSE @@ -146,7 +154,7 @@ DYNCHK: DJNZ DYNLP ; Loop til all 16 tested IF Z3 LD HL,(ENVADR) ; And top of memory ELSE - LD HL,0FFFFH + LD HL,MEMTOP ENDIF SBC HL,DE ; Calculate # bytes to clear (CF already clr) EX DE,HL ; Ptr to HL, Cnt to DE @@ -156,7 +164,7 @@ Clr0: LD (HL),0 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 @@ -184,7 +192,7 @@ ATTOP: LD A,H OR L JR NZ,BMOVE ; ..jump if we already have one - ENDIF ; (Always move Env if using MOVCPM type load) + ENDIF ; NOT MOVCPM ; (Always move Env if using MOVCPM type load) LD HL,Z3ENV ; Else set up pointers LD (ENVADR),HL LD DE,ENV @@ -202,11 +210,11 @@ ATTOP: BMOVE: IF NOT MOVCPM ; No need to set values on Boot Track System LD DE,(ENVADR) ; Get pointer to ENV - IF HAVIOP + 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 + ENDIF ;haviop LD HL,18H ; Set offset to Mult Comnd Line in ENV CALL CALCOF ; get addr and size LD (CLPTR),HL ; set addr @@ -222,10 +230,10 @@ BMOVE: LD (PTHPTR),HL ; and set ENDIF ;Movcpm IF FASTWB ; Do we restore CPR from Bank? - IF MOVCPM + IF MOVCPM LD DE,BIOSJT-1600H ; Get CPR Starting Addr LD HL,0800H ; and Default Length - ELSE + ELSE LD HL,(ENVADR) ; Get pointer to ENV start LD DE,3FH ; offset to CPR start ADD HL,DE @@ -237,11 +245,11 @@ BMOVE: LD L,0 ; convert to Word SRL H ; Compute Blks * 128 RR L ; to give HL = CPR length in bytes - ENDIF ;~Movcpm + ENDIF ; Movcpm - ; - ; SETUP FOR FASTWB - ; +; +; SETUP FOR FASTWB +; LD (CPLEN),HL ; Save command processor length LD (CPADR),DE ; Save command processor address (in TPA) @@ -267,12 +275,12 @@ BLKMV: POP BC ; And number of bytes to move ; Allocate disk buffer in HBIOS bank and ; save it for use later in disk access. - LD B,0F6H ; BIOS FUNC: ALLOCATE HEAP MEMORY - LD HL,512 ; 1 SECTOR, 512 BYTES - CALL HBX_INVOKE ; DO IT - CALL NZ,PANIC ; HANDLE ERROR - LD (HB_DSKBUF),HL ; RECORD THE BUFFER ADDRESS - + LD B,H_ALLOC ; HBIOS Func: ALLOCATE Heap Memory + LD HL,512 ; 1 Sector, 512 Bytes + CALL HBX_INVOKE ; Do it + CALL NZ,PANIC ; Handle error + LD (HB_DSKBUF),HL ; Record the buffer address + IF HAVIOP LD HL,IOPRET LD (BIOSJT+1),HL @@ -302,77 +310,74 @@ BLKMV: POP BC ; And number of bytes to move MEMOK: CALL PRINT IF MOVCPM ; Space is critical for boot tracks - DEFB CR,LF,'P112 - ' ; Save all bytes possible + DEFB CR,LF,'RetroB' ; Save all bytes possible ELSE ; Otherwise sign on with complete name - DEFB CR,LF,'RomWBW - ' - ENDIF - DEFB 'B/P 50.00k Bios' ;**** Do NOT alter this string **** + DEFB CR,LF,'Retro-Brew ' + IF SBC + DEFB ' SBC V1/2 ' + ENDIF ;SBC + IF SIMH + DEFB 'ON SimH ' + ENDIF ;SIMH + IF ZETA + DEFB ' ZETA ' + ENDIF ;ZETA + IF N8 + DEFB ' N8 ' + ENDIF ;N8 + IF MK4 + DEFB ' Mark IV ' + ENDIF ;MK4 + ENDIF ; MOVCPM + 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 + IF NOT MOVCPM DEFB ' (Non-Banked) ' ; Nothing for boot track system - ENDIF - ENDIF - IF BANKED + ENDIF ;NOT MOVCPM + ENDIF ; Banked DEFB ' with:',CR,LF,LF DEFB ' ZCPR3+ Env' - IF CLOCK - IF DS1202 + IF CLOCK DEFB CR,LF,' RomWBW HBIOS Clock, ' - IF CLKSET + IF CLKSET DEFB 'with ' - ELSE + ELSE DEFB 'NO ' - ENDIF + ENDIF ; CLKSET DEFB 'Set' - ELSE - DEFB CR,LF,' ZSDOS Interrupt Clock' - ENDIF - ENDIF + ENDIF ; Clock DEFB CR,LF,' High-Density Floppy' - IF FDDMA + IF FDDMA DEFB ' (DMA-driven IO)' - ELSE + ELSE DEFB ' (Polled IO)' - ENDIF - IF HARDDSK - IF SCSI - DEFB CR,LF,' SCSI Hard Disk Driver' - ENDIF - IF IDE - DEFB CR,LF,' GIDE Hard Disk Driver' - ENDIF - IF SIMHDSK - DEFB CR,LF,' SIMH Hard Disk Driver' - ENDIF - IF HBDSK + ENDIF ; FDDMA + IF HARDDSK DEFB CR,LF,' HBIOS Hard Disk Driver' - ENDIF - IF HDDMA + IF HDDMA DEFB ' (DMA-driven IO)' - ELSE + ELSE DEFB ' (Polled IO)' - ENDIF - ENDIF - IF FASTWB + ENDIF ;HDDMA + ENDIF ; HARDDSK + IF FASTWB DEFB CR,LF,' Warm Boot from RAM' - ENDIF - IF RAMDSK - DEFB CR,LF,' RAM Disk (M:)' - ENDIF - IF BIOERM + ENDIF ;FASTWB +; IF RAMDSK + DEFB CR,LF,' RAM Disk (A:)' +; ENDIF ;RAMDSK + IF BIOERM DEFB CR,LF,' Full Error Messages' - ENDIF - ENDIF ;Banked + ENDIF ;BIOERM DEFB CR,LF+80H ;WW EI ; Turn Interrupts back on RET ; ..and return - ;..... ; Offset to and get ENV Address and respective element size @@ -404,13 +409,13 @@ PTHPTR: DEFW EXPATH DEFW IOPLEN+2 DEFW IOPENT IOPPTR: DEFW IOP - ENDIF + ENDIF ;HAVIOP ; IF HARDDSK AND HDDMA AND (NOT IDE) ; DEFW DMALEN ; DEFW DMADAT ; DEFW DMATBL -; ENDIF +; ENDIF ;HARDDSK AND HDDMA AND (NOT IDE) BLOCKE EQU $ @@ -659,4 +664,5 @@ HISAV: DEFS 2 ; Storage for Hi-ALV address BTTBL: DEFS 8 ; Initial WB DMA Block ENDIF ;======================== End of CBOOT ============================= - \ No newline at end of file + + \ No newline at end of file diff --git a/Source/BPBIOS/deblock.z80 b/Source/BPBIOS/deblock.z80 index a252c18e..cd0c1f72 100644 --- a/Source/BPBIOS/deblock.z80 +++ b/Source/BPBIOS/deblock.z80 @@ -1,6 +1,7 @@ ;************************************************************************** ; DEBLOCK - Disk Deblocking Buffer Routines. (Based on CP/M Example code) ; +; 1.1 - 14 Jun 16 - eliminated unnecessary disk accessess WW ; 1.0 - 3 Jul 92 - First General Release. HFB ; 0.0 - 8 Jul 91 - Initial Test Release. HFB ;************************************************************************** @@ -303,13 +304,13 @@ RWMOVE: CALL HBX_COPY ; Handle possible inter-bank move ELSE ; HBIOS IF BANKED - IF INROM + IF INROM LD A,(TPABNK) ; If bank in ROM, HSTBUF is in TPA LD C,A - ELSE + ELSE LD A,(SYSBNK) ; If bank in RAM, HSTBUF is in System Bank LD C,A - ENDIF + ENDIF ;INROM LD A,(DMABNK) ; Set Read Destination Bank LD B,A LD A,(READOP) ; Direction? @@ -319,7 +320,7 @@ RWMOVE: CALL HBX_COPY ; Handle possible inter-bank move LD B,C LD C,A OKBNKS: CALL XMOVE ; Set source & destination banks - ENDIF + ENDIF ;BANKED LD DE,HSTBUF ; Host buffer address ADD HL,DE ; Point to the sector LD DE,(DMAADR) ; User's buffer @@ -413,4 +414,4 @@ UNASEC: DEFS 1 ; Current record UNACNT: DEFS 1 ; Unallocated record count ;========================= End of DEBLOCK ================================= - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/deblock.z80.sav b/Source/BPBIOS/deblock.z80.sav deleted file mode 100644 index a32d5c4b..00000000 --- a/Source/BPBIOS/deblock.z80.sav +++ /dev/null @@ -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 ================================= - \ No newline at end of file diff --git a/Source/BPBIOS/def-dx.lib b/Source/BPBIOS/def-dx.lib deleted file mode 100644 index 480af62b..00000000 --- a/Source/BPBIOS/def-dx.lib +++ /dev/null @@ -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 ======================= - \ No newline at end of file diff --git a/Source/BPBIOS/def-ww-z33n.lib b/Source/BPBIOS/def-ww-z33n.lib index 3b3faf84..91375b53 100644 --- a/Source/BPBIOS/def-ww-z33n.lib +++ b/Source/BPBIOS/def-ww-z33n.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Setup for a Non-banked, internal HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,16 +16,15 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 Aug 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z33 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTN',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- -MOVCPM EQU no ; Integrate into MOVCPM "type" loader? +MOVCPM EQU NO ; Integrate into MOVCPM "type" loader? IF MOVCPM VERS EQU 13H ; Version number in BCD (Hex) (Major/Minor) ELSE @@ -34,9 +38,20 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU YES ; Internal HBIOS Mini Proxy -CONF_T EQU NO ; Set for Segment Configuration T -CONF_N EQU YES ; Set for Segment Configuration N +INTPXY EQU YES ; YES to use internal HBIOS proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; YES load Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; interface (32 bytes) + ELSE + ; NO use HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy (if used) +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) @@ -47,19 +62,6 @@ IBMOVS EQU NO ; Yes = Inter-bank Moves allowed (Z180/64180) MORDEV EQU NO ; YES = Include any extra Char Device Drivers ; NO = Only use the 4 defined Char Devices -ESCC_B EQU NO ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -69,12 +71,12 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made + BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -84,17 +86,14 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -103,25 +102,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -133,8 +140,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -147,6 +155,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -371,4 +381,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/def-ww-z33nbnk.lib b/Source/BPBIOS/def-ww-z33nbnk.lib index c8d940da..e212219f 100644 --- a/Source/BPBIOS/def-ww-z33nbnk.lib +++ b/Source/BPBIOS/def-ww-z33nbnk.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Setup for banked bios & internal HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,16 +16,15 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 Aug 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z33 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTN',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- -MOVCPM EQU no ; Integrate into MOVCPM "type" loader? +MOVCPM EQU NO ; Integrate into MOVCPM "type" loader? IF MOVCPM VERS EQU 13H ; Version number in BCD (Hex) (Major/Minor) ELSE @@ -34,32 +38,30 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU YES ; Internal HBIOS Mini Proxy -CONF_T EQU NO ; Set for Segment Configuration T -CONF_N EQU YES ; Set for Segment Configuration N +INTPXY EQU YES ; YES to use internal HBIOS Mini proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; YES load Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; interface (32 bytes) + ELSE + ; NO use HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy (if used) +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) IBMOVS EQU NO ; 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 no ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -69,12 +71,11 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -84,17 +85,14 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -103,25 +101,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -133,8 +139,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -147,6 +154,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -371,4 +380,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/def-ww-z33t.lib b/Source/BPBIOS/def-ww-z33t.lib index 2c296319..7cdd43a0 100644 --- a/Source/BPBIOS/def-ww-z33t.lib +++ b/Source/BPBIOS/def-ww-z33t.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Tailored for Non-banked, external HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,11 +16,10 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 Aug 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z33 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTT',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- @@ -34,9 +38,20 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU NO ; Internal HBIOS Mini Proxy -CONF_T EQU YES ; Set for Segment Configuration T -CONF_N EQU NO ; Set for Segment Configuration N +INTPXY EQU NO ; YES to use internal HBIOS proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; YES load Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; interface (32 bytes) + ELSE + ; NO use HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) @@ -47,19 +62,6 @@ IBMOVS EQU NO ; Yes = Inter-bank Moves allowed (Z180/64180) MORDEV EQU NO ; YES = Include any extra Char Device Drivers ; NO = Only use the 4 defined Char Devices -ESCC_B EQU NO ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -69,12 +71,12 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made + BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -84,17 +86,14 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -103,25 +102,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -133,8 +140,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -147,6 +155,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -371,4 +381,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/def-ww-z33tbnk.lib b/Source/BPBIOS/def-ww-z33tbnk.lib index ffca7b09..1938a4bf 100644 --- a/Source/BPBIOS/def-ww-z33tbnk.lib +++ b/Source/BPBIOS/def-ww-z33tbnk.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Setup for a banked bios, external HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,11 +16,10 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 AUG 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z33 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTT',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- @@ -34,32 +38,30 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU NO ; Internal HBIOS Mini Proxy -CONF_T EQU YES ; Set for Segment Configuration T -CONF_N EQU NO ; Set for Segment Configuration N +INTPXY EQU NO ; YES to use internal HBIOS Mini proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; Use internal Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; mini-proxy (32 bytes) + ELSE + ; Use external HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) IBMOVS EQU NO ; 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 no ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -69,12 +71,12 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made + BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -84,17 +86,14 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -103,25 +102,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -133,8 +140,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -147,6 +155,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -371,4 +381,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/def-ww-z34n.lib b/Source/BPBIOS/def-ww-z34n.lib index b6c40f7f..91375b53 100644 --- a/Source/BPBIOS/def-ww-z34n.lib +++ b/Source/BPBIOS/def-ww-z34n.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Setup for a Non-banked, internal HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,16 +16,15 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 Aug 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z34 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTN',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- -MOVCPM EQU no ; Integrate into MOVCPM "type" loader? +MOVCPM EQU NO ; Integrate into MOVCPM "type" loader? IF MOVCPM VERS EQU 13H ; Version number in BCD (Hex) (Major/Minor) ELSE @@ -34,32 +38,30 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU YES ; Internal HBIOS Mini Proxy -CONF_T EQU NO ; Set for Segment Configuration T -CONF_N EQU YES ; Set for Segment Configuration N +INTPXY EQU YES ; YES to use internal HBIOS proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; YES load Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; interface (32 bytes) + ELSE + ; NO use HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy (if used) +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) IBMOVS EQU NO ; 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 no ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -69,12 +71,12 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made + BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -84,17 +86,14 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -103,25 +102,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -133,8 +140,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -147,6 +155,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -371,4 +381,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/def-ww-z34nbnk.lib b/Source/BPBIOS/def-ww-z34nbnk.lib index c5910ba4..e212219f 100644 --- a/Source/BPBIOS/def-ww-z34nbnk.lib +++ b/Source/BPBIOS/def-ww-z34nbnk.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Setup for banked bios & internal HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,16 +16,15 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 Aug 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z34 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTN',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- -MOVCPM EQU no ; Integrate into MOVCPM "type" loader? +MOVCPM EQU NO ; Integrate into MOVCPM "type" loader? IF MOVCPM VERS EQU 13H ; Version number in BCD (Hex) (Major/Minor) ELSE @@ -34,32 +38,30 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU YES ; Internal HBIOS Mini Proxy -CONF_T EQU NO ; Set for Segment Configuration T -CONF_N EQU YES ; Set for Segment Configuration N +INTPXY EQU YES ; YES to use internal HBIOS Mini proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; YES load Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; interface (32 bytes) + ELSE + ; NO use HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy (if used) +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) IBMOVS EQU NO ; 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 no ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -69,12 +71,11 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -84,17 +85,14 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -103,25 +101,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -133,8 +139,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -147,6 +154,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -371,4 +380,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/def-ww-z34t.lib b/Source/BPBIOS/def-ww-z34t.lib index 4b97cca2..7cdd43a0 100644 --- a/Source/BPBIOS/def-ww-z34t.lib +++ b/Source/BPBIOS/def-ww-z34t.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Tailored for Non-banked, external HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,11 +16,10 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 Aug 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z34 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTT',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- @@ -34,32 +38,30 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU NO ; Internal HBIOS Mini Proxy -CONF_T EQU YES ; Set for Segment Configuration T -CONF_N EQU NO ; Set for Segment Configuration N +INTPXY EQU NO ; YES to use internal HBIOS proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; YES load Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; interface (32 bytes) + ELSE + ; NO use HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) IBMOVS EQU NO ; 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 no ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -69,12 +71,12 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made + BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -84,17 +86,14 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -103,25 +102,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -133,8 +140,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -147,6 +155,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -371,4 +381,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/def-ww-z34tbnk.lib b/Source/BPBIOS/def-ww-z34tbnk.lib index 4b659c3a..1938a4bf 100644 --- a/Source/BPBIOS/def-ww-z34tbnk.lib +++ b/Source/BPBIOS/def-ww-z34tbnk.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Setup for a banked bios, external HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,11 +16,10 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 AUG 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z34 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTT',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- @@ -34,32 +38,30 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU NO ; Internal HBIOS Mini Proxy -CONF_T EQU YES ; Set for Segment Configuration T -CONF_N EQU NO ; Set for Segment Configuration N +INTPXY EQU NO ; YES to use internal HBIOS Mini proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; Use internal Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; mini-proxy (32 bytes) + ELSE + ; Use external HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) IBMOVS EQU NO ; 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 no ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -69,12 +71,12 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made + BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -84,17 +86,14 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -103,25 +102,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -133,8 +140,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -147,6 +155,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -371,4 +381,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/def-ww-z41nbnk.lib b/Source/BPBIOS/def-ww-z41nbnk.lib index 0eef1948..ea03c16e 100644 --- a/Source/BPBIOS/def-ww-z41nbnk.lib +++ b/Source/BPBIOS/def-ww-z41nbnk.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Tailored for a Fully-banked, internal HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,11 +16,10 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 Aug 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z41 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTF',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- @@ -34,31 +38,30 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU YES ; Internal HBIOS Mini Proxy -CONF_T EQU NO ; Set for Segment Configuration T -CONF_N EQU YES ; Set for Segment Configuration N +INTPXY EQU YES ; YES to use internal HBIOS proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; YES load Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; interface (32 bytes) + ELSE + ; NO use HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy (if used) +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) IBMOVS EQU NO ; 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 no ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -68,12 +71,12 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made + BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -83,17 +86,15 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -102,25 +103,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -132,8 +141,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -146,6 +156,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -370,4 +382,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/def-ww-z41tbnk.lib b/Source/BPBIOS/def-ww-z41tbnk.lib index ce31179b..2fb9da05 100644 --- a/Source/BPBIOS/def-ww-z41tbnk.lib +++ b/Source/BPBIOS/def-ww-z41tbnk.lib @@ -1,8 +1,13 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** -; Tailor your system here. +; - Retro-Brew boards /w RomWBW HBIOS - ********************** +; Tailored for Fully-banked, external HBIOS proxy System +; Custom tailor your system here. ; +; 02 May 18 - changes made to conform with HBIOS v 2.9.1p2 WW+LN +; 04 Sep 16 - Mods for RomWBW V 2.8 WW+LN +; 30 Apr 15 - changes made to conform with v 2.7.2 of RomWBW WW+LN +; 17 Jan 14 - Initial N8VEM release WW+LN ; 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 @@ -11,11 +16,10 @@ ; BIOS Configuration Equates and Macros DATE MACRO - DEFB '17 Jan 14' ; Date of this version + DEFB '02 Aug 21' ; Date of this version ENDM - AUTOCL MACRO - DEFB 8,'ZEX Z41 ',0 ; Autostart command line + DEFB 8,'ZEX ZSTF',0 ; Autostart command line ENDM ;--- Basic System and Z-System Section --- @@ -34,31 +38,30 @@ 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 NO ; Include IOP code into Jump table? -INTPXY EQU NO ; Internal HBIOS Mini Proxy -CONF_T EQU YES ; Set for Segment Configuration T -CONF_N EQU NO ; Set for Segment Configuration N +INTPXY EQU NO ; YES to use internal HBIOS proxy + ; and load Proxy as part of BPBIOS. + ; NO to use HBIOS Proxy in high RAM + ; (already loaded) + IF INTPXY + ; YES load Proxy as part of BPBIOS. +MEMTOP EQU 0FFE0H - 1 ; Reserve memory above this for HBIOS + ; interface (32 bytes) + ELSE + ; NO use HBIOS Proxy in high RAM + ; (already loaded) +HBLOC EQU 0FE00H ; Location of HBIOS proxy (if used) +MEMTOP EQU HBLOC - 1 ; Reserve memory above this for HBIOS + ENDIF ;--- Memory configuration Section --- (Expansion Memory configured here) IBMOVS EQU NO ; 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 no ; 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 false ; Use buffered ASCI1 Input Driver? QSIZE EQU 32 ; size of interrupt typeahead buffers (if used) ; ..must be 2^n with n<8 @@ -68,12 +71,12 @@ 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 YES ; Allow DS-1202 Clock Sets? (Error if No) -TICTOC EQU NO ;== NOT USED IN P112 ("heartbeat" count) +CLKSET EQU YES ; Allow Clock Sets? (Error if No) ;--- Floppy Diskette Section --- +FLPYDSK EQU NO ; YES = Make Floppy-Disk Code, NO = No code made + BIOERM EQU yes ; Print BIOS error messages? CALCSK EQU YES ; Calculate skew table? AUTOSL EQU YES ; Auto select floppy formats? @@ -83,17 +86,14 @@ FLOPYH EQU no ; 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 +;;--- 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 ; (Pick 1 of 3 options below) -SCSI EQU NO ; YES = Use SCSI Driver -IDE EQU NO ; YES = Use IDE Driver -SIMHDSK EQU NO ; YES = Use SIMH HDSK Driver HBDSK EQU YES ; YES = Use HBIOS Disk Driver HDDMA EQU NO ; Use DMA-Controlled Hard Disk Data Transfers? ; (DMA not implemented for GIDE) @@ -102,25 +102,33 @@ UNIT_1 EQU YES ; Hard Disk Physical Unit 2 UNIT_2 EQU YES ; Hard Disk Physical Unit 3 ;--- Logical Drive Section --- - -DRV_A EQU no ; Set each of these equates for the drive and -DRV_B EQU no ; 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 yes +; +; Set each of these equates for the drive and partition complement of +; your system. Set equates to no if drive exists or is wanted. + +DRV_A EQU yes ; A is always RAMDSK on HBIOS Device 0. +DRV_B EQU yes ; B is always ROMDSK on HBIOS Device 1. +DRV_C EQU yes +DRV_D EQU yes +DRV_E EQU yes ; Default is C-J are Hard Disk Slices +DRV_F EQU yes ; on the first hard drive (room for +DRV_G EQU yes ; up to 8 Slices provided) e.g. CF card. DRV_H EQU yes DRV_I EQU yes DRV_J EQU yes -DRV_K EQU yes -DRV_L EQU yes -DRV_M EQU RAMDSK ; This is Yes for RAM drive +DRV_K EQU yes ; Default is K-N are Hard Disk Slices +DRV_L EQU yes ; on a second hard drive (room for up to +DRV_M EQU yes ; 4 Slices provided) e.g. SD card DRV_N EQU yes -DRV_O EQU ~RAMDSK ; Use HBIOS RAM disk if BPBIOS RAM disk is not enabled + if FLPYDSK +DRV_O EQU yes ; O & P are floppies +DRV_P EQU yes + else +DRV_O EQU no ; O & P are floppies DRV_P EQU no + endif -;========== Configuration Unique Equates (P112) =========== +;========== Configuration Unique Equates =========== ;>>>>>>>>>>>>>>>>>>>>>>>>>>> W A R N I N G <<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;>>> Do NOT Alter these unless you KNOW what you're doing <<< ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -132,8 +140,9 @@ NOWAIT EQU NO ; Set to NO to use configured Wait States in ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; 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 in 32k increments. In SBC V1&2, Zeta and Simh, RAM occupies the +; first 512k (16 32k banks). The upper 32k bank is fixed as the last 32k +; of 512k. HBIOS occupies bank 1. The upper ; memory bounds (BNKU, BNK3 and BNKM) should be set for your configuration. BNK0 EQU BID_USR ; First TPA Bank (switched in/out) 40000H @@ -146,6 +155,8 @@ BNKM EQU BID_RAMM ; Maximum Bank # F8000H ; With both on-board RAMs only (MEM1 or MEM2), ; the maximum Bank number is 11 (0BH). + IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a + ; nice resource for Z180 programing in general ;=========== CPU-dependent Equates, Zilog Z-180/Hitachi HD64180 ========== CNTLA0 EQU 00H ; Control Port ASCI 0 @@ -370,4 +381,4 @@ CMDPWQ EQU 0E5H ; Power Status Query Command CMDID EQU 0ECH ; Read Drive Ident Data Command ENDIF ;ide ;=================== End Unique Equates ======================= - \ No newline at end of file + ENDIF ; REMOVE CODE diff --git a/Source/BPBIOS/defbank b/Source/BPBIOS/defbank deleted file mode 100644 index 044fc09d..00000000 --- a/Source/BPBIOS/defbank +++ /dev/null @@ -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 ======================= - \ No newline at end of file diff --git a/Source/BPBIOS/defboot b/Source/BPBIOS/defboot deleted file mode 100644 index 9bb8bf2c..00000000 --- a/Source/BPBIOS/defboot +++ /dev/null @@ -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 ======================= - \ No newline at end of file diff --git a/Source/BPBIOS/dpb-h.lib b/Source/BPBIOS/dpb-h.lib index e853f99e..10a8217d 100644 --- a/Source/BPBIOS/dpb-h.lib +++ b/Source/BPBIOS/dpb-h.lib @@ -8,10 +8,10 @@ ; these rates without hardware modifications and this file should not be ; included. See DPB.LIB for definitions of Format Type Bytes. ;..... -; D-X Designs Pty Ltd, P112 Board (IBM/MS-DOS Compatible) 3.5" HD Disk +; Retro-Brew Board with RomWBW HBIOS (IBM/MS-DOS Compatible) 3.5" HD Disk ; This format is: 18-512 byte Sectors/Track, Skew=2, 500 kbps, 300 rpm. - DEFB 'D-X Desgn','1'+80H ; Id - 10 bytes + DEFB 'RetroB 3.','5'+80H ; Id - 10 bytes DEFB DSK3+DD+TSBTL ; Format type byte 0 DEFB SPEED8+SEC512+ALC2K ; Format type byte 1 DEFB -2 ; Skew factor @@ -143,4 +143,4 @@ ENDIF ENDIF ;~Movcpm ;======================= End of DPB-H.LIB =========================== - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/dpb2.lib b/Source/BPBIOS/dpb2.lib index 656334d3..af0c97d1 100644 --- a/Source/BPBIOS/dpb2.lib +++ b/Source/BPBIOS/dpb2.lib @@ -1,4 +1,4 @@ -;========= Additional Disk Parameter Blocks if MORDPB is True ========== +;========= Additional Disk Parameter Blocks if MORDPB is True ========= ; See DPB.LIB for descriptions of Format Type Byte bit assignments. ;..... ; Teletek 8" DS/DD - STOCK @@ -255,4 +255,4 @@ DPB15: DEFW 0 ; Sectors per track ; 25 26 ; Logical Sector DEFB 00,00 ; Physical sector ENDIF -;---------------------- End of DPB2.LIB ------------------------------ \ No newline at end of file +;---------------------- End of DPB2.LIB ------------------------------ \ No newline at end of file diff --git a/Source/BPBIOS/dpbhd-dx.lib b/Source/BPBIOS/dpbhd-dx.lib deleted file mode 100644 index cf3a28dd..00000000 --- a/Source/BPBIOS/dpbhd-dx.lib +++ /dev/null @@ -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 ------------- - \ No newline at end of file diff --git a/Source/BPBIOS/dpbhd-ww.lib b/Source/BPBIOS/dpbhd-ww.lib index 3d3900cc..d5d37c56 100644 --- a/Source/BPBIOS/dpbhd-ww.lib +++ b/Source/BPBIOS/dpbhd-ww.lib @@ -1,309 +1,531 @@ -;======= Hard Disk Parameter Blocks ======= +;======= Hard Disk Parameter Blocks ======= ************************ +; - Retro-Brew boards w/ RomWBW HBIOS - ** Hardware Dependant ** +; ************************ +; 1.4 - 04 Sep 16 - Mods for HBIOS V 2.8 pre 5 LWN+WW +; 1.3 - 20 Jan 14 - Initial N8VEM test release LWN +; 1.2 - 17 Nov 07 - Initial LabZ80 test release LWN +; 1.1 - 27 Feb 93 - General Release. HFB +; 0.0 - 12 Jun 91 - Initial Test Release. HFB +;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ; 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. +; NOTE: For simplicity, BPBIOS always assumes a logical 16 512-byte +; sectors (64 128 byte records) per track for hard disks. +; One must therefore translate the actual number of sectors +; to a track count of 16 sectors per track. ;..... ; 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) +; \ \ \ \ \ \_\_\____ Disk Size 000 = Fixed Disk +; \_\_\_\_\_________ (unused) -; All DPBs use the equate: FIXDSK EQU 00000000B from DPB.LIB +; Format Type Byte is set to FIXDSK EQU 00000000B. See DPB.LIB for +; def'ns. ; 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) +; \ \ \ \ \ \_\_\____ Sector Size +; \ \ \ \ \ 000=128, 001=256, 010=512, 011=1024 +; \ \ \_\_\________ Allocation Size +; \ \ 000=1K, 001=2K, 010=4K, 011=8K, 100=16K +; \ \____________ Reserved +; \_____________ Speed Normal 5.25" (0), 8" or HD Floppy (1) -; 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. +; Information in this byte is not used in the driver, but is simply +; maintained for future use and compatibility with other DPB access +; applications such as BPCNFG. Refer to DPB.LIB for bit definitions. -; NOTE: No Skew Table is needed since Hard Disk Format is locked +; NOTE: No Skew Table needed since Hard Disk Format is locked w/No Skew ;..... -; Partition A. HBIOS Disk 0, Slice 0 +; Currently, BPBIOS supports 2 memory drive devices and 3 phyical hard +; drive like devices. BPBIOS can support seven but unfortunately +; BPCNFG only supports 3 hard drive like devices and the source +; code is not available, so menu 4 is meaningless. Devices +; include IDE Hard drives (16 bit), USB and SD card drives. CF +; cards can connect to both 8 and 16 bit IDE interfaces. Note +; that the RAM and ROM drives are handled separately. A default +; system configuration consists of two Floppy drives, an IDE drive +; and an SD drive. The IDE drive is allocated eight 8 MB slices +; while the SD drive will have four 8 MB slices. For SIMH, the +; IDE drive is replaced by SIMH HDSK0 with eight slices and the SD +; drive with SIMH HDSK1 with 4 slices. The configuration +; and/or mix of drives can be altered at any time by using BPCNFG +; Manually or by editting the appropriate .CNF file. The SD card +; could replaced by the USB for example, +; +; Starting with ver 2.8 of HBIOS, devices are discovered at boot +; time and assigned device numbers. Since devices are tested in +; a certain order, the device numbers are somewhat predicably +; assigned. Memory drives are discovered first. IDE drives are +; discovered next so that IDE Hard drives including CF cards are +; assigned device 2 and device 3 if a slave drive is supported by +; the interface. Next comes the SD drive and is assigned device 3 +; or 4 depending on the whether there is an ide slave drive. +; USB drive is assigned device 4 or 5 . For SIMH HDSK0 is device 0 +; and HDSK1 is device 1. Memory drives are now handled as LBA +; devices, ie like hard drives. +; +; The following non-memory drive capacities and configurations used for +; the SIMH, SD and IDE drives: Slice geometry is 256, 512 byte sectors, +; 1 head per track and 1 with one reserved track, a block size of 4096 +; bytes with 512 directory entries. An equivalent geometry is 16 +; sectors and 16 heads per track. Internally BPBIOS uses a uniform +; logical organization with 64 logical records per logical track. +; Thus there are 16 logical tracks per physical track with 1040 +; logical (65 physical) tracks per slice. If all partitions are not +; physically present, the missing partitions can be disabled in the +; BPBCNFG configuration file or by hand. Note that HBIOS uses LBA, +; Logical Block Addressing, for non-floppy drives. +; +; For SBC V1,2, ZETA, MARK IV and N8, the following non-memory partitions +; are available: +; +; These are the capacities and configuration used for the IDE drives: +; +; partition Size Blocks Block Offset in +; MByte Size logical tracks +;==================================================================== +; C 8 2048 4096 1*16 = 16 +; D 8 2048 4096 (1+65)*16 = 1056 +; E 8 2048 4096 (1+2*65)*16 = 2096 +; F 8 2048 4096 (1+3*65)*16 = 3136 +; G 8 2048 4096 (1+4*65)*16 = 4176 +; H 8 2048 4096 (1+5*65)*16 = 5216 +; I 8 2048 4096 (1+6*65)*16 = 6256 +; J 8 2048 4096 (1+7*65)*16 = 7296 +; +; These are capacities and configurations used for SD card: +; +; partition Size Blocks Block Offset +; MByte Size logical tracks +;==================================================================== +; K 8 2048 4096 1*16 = 16 +; L 8 2048 4096 (1+65)*16 = 1056 +; M 8 2048 4096 (1+2*65)*16 = 2096 +; N 8 2048 4096 (1+3*65)*16 = 3136 +; +; RAM drive is paritition A while ROM drive is partition B. +; +; For example, a typical Memory drive configuration is: +; +; partition Size Blocks Block Offset +; MByte Size logical tracks +;==================================================================== +; B 384K 192 2048 0 +; +; For SIMH the IDE and SD drives are replaced by HDSK0 and HDSK1. The +; follow non-RAM partitions are available: +; +; Simh HDSK0 drive configuration is identical to the IDE drive. +; +; Simh HDSK1 drive configuration is identical to the SD drive. +; +; Memory disks are drives A and B +; Hard drives (IDE, SD AND USB) are drives E TO L and M to P +; Floppies are drives O and P +; +;==================================================================== +; +;..... +; Partition A. RAM Disk +; Retro-Brew HBIOS RAM Disk Format assuming 64k for System & HBIOS banks - IF DRV_E - DEFB 'HBDSK0:0 ','A'+80H ; Id - 10 bytes + DEFB 'Ram Drive',' '+80H ; Id - 10 bytes + DEFB FIXDSK ; Format type byte 0 + DEFB SPEED8+SEC512+ALC2K ; Format type byte 1 + DEFB -1 ; Skew factor (== Only the +/- sign used) + DEFB 1 ; Starting sector number + DEFB 16 ; Physical # sectors/trk (16*512=8k per 'track') + DEFB 0 ; Physical tracks/side (No Meaning in HD) + +MSIZR EQU HB_RAMBLKS ; # of blocks in Drive (by Memory/Block size) + ; 2x128k = 64 (128k) - 48 (96k) w/User Bank + ; 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 64 ; Records/Track (16 sectors*4 records/sector) + DEFB 4 ; Block Shift Factor (2k per block) + DEFB 0FH ; Block Mask + IF (MSIZR-1)<256 + DEFB 1 ; Extent Mask + ELSE + DEFB 0 ; Extent Mask + ENDIF + DEFW MSIZR-1 ; Disk Size-1 128 kB 256 kB 512 kB + ; Dir Max -or- 64 128 256 + ; Alloc 0, 1 80H,0 0C0H,0 0F0H,0 + IF MSIZR<65 + DEFW 63 ; Dir Max-1 1 block + DEFB 80H,0 ; Alloc 0,1 + ELSE + IF MSIZR<129 + DEFW 128 - 1 ; Dir Max-1 2 blocks + DEFB 0C0H, 00 ; Alloc 0,1 + ELSE + DEFW 255 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + ENDIF + ENDIF + DEFW 0000 ; Check Size + DEFW 0000 ; Trk Offset from beginning of Ram Bank base +; +;..... +; Partition B. ROM Disk +; Retro-Brew HBIOS ROM Disk Format assuming 64k for System & HBIOS banks + + DEFB 'ROM Drive',' '+80H ; Id - 10 bytes + DEFB FIXDSK ; Format type byte 0 +; DEFB SPEED8+SEC128+ALC2K ; Format type byte 1 + DEFB SPEED8+SEC512+ALC2K ; Format type byte 1 + DEFB -1 ; Skew factor (== Only the +/- sign used) +; DEFB 0 ; Starting sector number + DEFB 1 ; Starting sector number +; DEFB 32 ; Physical # sectors/trk (32=4k per 'track') + DEFB 16 ; Physical # sectors/trk (32=4k per 'track') + DEFB 0 ; Physical tracks/side (No Meaning in HD) + +MSIZO EQU HB_ROMBLKS ; # of blocks in Drive (by Memory/Block size) + ; 2x128k = 64 (128k) - 48 (96k) w/User Bank + ; 2x128k = 80 (160k) - 64 (128k) w/User Bank + ; 1x512k = 192 (384k) - 176 (352k) w/User Bank + ; 2x512k = 448 (896k) - 432 (864k) w/User Bank + +;DPBROM: DEFW 32 ; Sectors/Track +DPBROM: DEFW 64 ; Sectors/Track + DEFB 4 ; Block Shift Factor (2k per block) + DEFB 0FH ; Block Mask + IF (MSIZO-1)<256 + DEFB 1 ; Extent Mask + ELSE + DEFB 0 ; Extent Mask + ENDIF + DEFW MSIZO-1 ; Disk Size-1 128 kB 256 kB 512 kB + ; Dir Max -or- 64 128 256 + ; Alloc 0, 1 80H,0 0C0H,0 0F0H,0 + IF MSIZO<65 + DEFW 63 ; Dir Max-1 1 block + DEFB 80H,0 ; Alloc 0,1 + ELSE + IF MSIZO<129 + DEFW 128 - 1 ; Dir Max-1 2 blocks + DEFB 0C0H, 00 ; Alloc 0,1 + ELSE + DEFW 255 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + ENDIF + ENDIF + DEFW 0000 ; Check Size + DEFW 0000 ; Trk Offset from beginning of Ram Bank base +; +;..... +; Partition C. HBIOS Disk 0, Slice 0 + + IF DRV_C + DEFB 'HBDSK0:0 ','C'+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 per track + DEFB 16 ; 16 Logical sectors are defined in DPB + ; even though real layout is 256 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) - HSIZ0 EQU 2048 ; # of blocks in first Partition (1024 trks) - ; - ; -DPB50: DEFW 64 ; Sctrs/Trk - DEFB 5 ; Blk Shf Fctr - DEFB 31 ; Block Mask - DEFB 1 ; Extent Mask - DEFW HSIZ0-1 ; Disk Size-1 - DEFW 511 ; Dir Max - DEFB 0F0H,0 ; Alloc 0,1 - DEFW 0 ; Check Size - DEFW 16 ; Trk Offset +DPB50: DEFW 64 ; Sctrs/Trk + DEFB 5 ; Blk Shf Fctr + DEFB 31 ; Block Mask + DEFB 1 ; Extent Mask + DEFW HSIZ0-1 ; Disk Size-1 + DEFW 511 ; Dir Max-1 - 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 - 4 blocks + DEFW 0 ; Check Size + DEFW 16 ; Trk Offset ENDIF - +; ;..... -; Partition B. HBIOS Disk 0, Slice 1 +; Partition D. HBIOS Disk 0, Slice 1 - IF DRV_F - DEFB 'HBDSK0:1 ','B'+80H ; Id - 10 bytes + IF DRV_D + DEFB 'HBDSK0:1 ','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 16 ; 16 Logical Sectors per track is defined + ; in DPB even though there is 256 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) HSIZ1 EQU 2048 ; # of blocks in Second Partition (1024 trks) - - ; - ; -DPB51: DEFW 64 ; Scts/Trk - DEFB 5 ; Blk Shf Fctr - DEFB 31 ; Block Mask - DEFB 1 ; Extent Mask - DEFW HSIZ1-1 ; Disk Size-1 - DEFW 511 ; Dir Max - DEFB 0F0H,0 ; Alloc 0,1 - DEFW 0 ; Check size - DEFW 1056 ; Track offset + ; +DPB51: DEFW 64 ; Scts/Trk + DEFB 5 ; Blk Shf Fctr + DEFB 31 ; Block Mask + DEFB 1 ; Extent Mask + DEFW HSIZ1-1 ; Disk Size-1 + DEFW 511 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + DEFW 0 ; Check size + DEFW (1+65)*16 ; Track offset 1056 ENDIF - +; ;..... -; Partition C. HBIOS Disk 0, Slice 2 +; Partition E. HBIOS Disk 0, Slice 2 - IF DRV_G - DEFB 'HBDSK0:2 ','C'+80H ; Id - 10 bytes + IF DRV_E + DEFB 'HBDSK0:2 ','E'+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 16 ; 16 Logical Sectors per track is defined + ; in DPB even though there is 256 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) HSIZ2 EQU 2048 ; # of blocks in third Partition (1024 tracks) - - ; ; -DPB52: DEFW 64 ; Scts/Trk - DEFB 5 ; Blk Shf Fctr - DEFB 31 ; Block Mask - DEFB 1 ; Extent Mask - DEFW HSIZ2-1 ; Disk Size-1 - DEFW 511 ; Dir Max - DEFB 0F0H,0 ; Alloc0,1 - DEFW 0 ; Check size - DEFW 2096 ; Track offset +DPB52: DEFW 64 ; Scts/Trk + DEFB 5 ; Blk Shf Fctr + DEFB 31 ; Block Mask + DEFB 1 ; Extent Mask + DEFW HSIZ2-1 ; Disk Size-1 + DEFW 511 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + DEFW 0 ; Check size + DEFW (1+2*65)*16 ; Track offset = 2096 ENDIF - +; ;..... -; Partition D. HBIOS Disk 0, Slice 3 +; Partition F. HBIOS Disk 0, Slice 4 - IF DRV_H - DEFB 'HBDSK0:3 ','D'+80H ; Id - 10 bytes + IF DRV_F + DEFB 'HBDSK0:3 ','F'+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 16 ; 16 Logical Sectors per track is defined + ; in DPB even though there is 256 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) HSIZ3 EQU 2048 ; # of blocks in Fourth Partition (1024 tracks) - - ; ; -DPB53: DEFW 64 ; Scts/Trk - DEFB 5 ; Blk Shf Fctr - DEFB 31 ; Block Mask - DEFB 1 ; Extent Mask - DEFW HSIZ3-1 ; Disk Size-1 - DEFW 511 ; Dir Max - DEFB 0F0H,0 ; Alloc 0,1 - DEFW 0 ; Check size - DEFW 3136 ; Track offset +DPB53: DEFW 64 ; Scts/Trk + DEFB 5 ; Blk Shf Fctr + DEFB 31 ; Block Mask + DEFB 1 ; Extent Mask + DEFW HSIZ3-1 ; Disk Size-1 + DEFW 511 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + DEFW 0 ; Check size + DEFW (1+3*65)*16 ; Track offset = 3136 ENDIF - +; ;..... -; Partition A. HBIOS Disk 1, Slice 0 +; Partition G. HBIOS Disk 0, Slice 4 - IF DRV_I - DEFB 'HBDSK1:0 ','E'+80H ; Id - 10 bytes + IF DRV_G + DEFB 'HBDSK0:4 ','G'+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 per track + DEFB 16 ; 16 Logical Sectors per track is defined + ; in DPB even though there is 64 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) HSIZ4 EQU 2048 ; # of blocks in first Partition (1024 trks) - - ; ; -DPB54: DEFW 64 ; Sctrs/Trk - DEFB 5 ; Blk Shf Fctr - DEFB 31 ; Block Mask - DEFB 1 ; Extent Mask - DEFW HSIZ4-1 ; Disk Size-1 - DEFW 511 ; Dir Max - DEFB 0F0H,0 ; Alloc 0,1 - DEFW 0 ; Check Size - DEFW 16 ; Trk Offset +DPB54: DEFW 64 ; Sctrs/Trk + DEFB 5 ; Blk Shf Fctr + DEFB 31 ; Block Mask + DEFB 1 ; Extent Mask + DEFW HSIZ4-1 ; Disk Size - 1 + DEFW 511 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + DEFW 0 ; Check size + DEFW (1+4*65)*16 ; Track offset = 16 ENDIF - +; ;..... -; Partition B. HBIOS Disk 1, Slice 1 +; Partition H. HBIOS Disk 0, Slice 5 - IF DRV_J - DEFB 'HBDSK1:1 ','F'+80H ; Id - 10 bytes + IF DRV_H + DEFB 'HBDSK0:5 ','H'+80H ; Id - 10 bytes DEFB FIXDSK ; Format type byte 0 DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 - DEFB -2 ; Skew factor + DEFB -2 ; Skew factor (== Only the +/- sign used) DEFB 1 ; Starting sector number - DEFB 16 ; Logical Sectors per track + DEFB 16 ; 16 Logical sectors is defined in DPB + ; even though real layout is 64 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) HSIZ5 EQU 2048 ; # of blocks in Second Partition (1024 trks) - - ; - ; -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 511 ; Dir Max - DEFB 0F0H,0 ; Alloc 0,1 - DEFW 0 ; Check size - DEFW 1056 ; Track offset + ; +DPB55: DEFW 64 ; Sctrs/Trk - actually 256 + DEFB 5 ; Blk Shf Fctr + DEFB 31 ; Block Mask + DEFB 1 ; Extent Mask + DEFW HSIZ5-1 ; Disk Size-1 + DEFW 511 ; Dir Max-1 + DEFB 0F0H,0 ; Alloc 0,1 - 4 blocks + DEFW 0 ; Check Size + DEFW (1+5*65)*16 ; Trk Offset = 1056 ENDIF - +; ;..... -; Partition C. HBIOS Disk 1, Slice 2 +; Partition I. HBIOS Disk 0, Slice 6 - IF DRV_K - DEFB 'HBDSK1:2 ','G'+80H ; Id - 10 bytes + IF DRV_I + DEFB 'HBDSK0:6 ','I'+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 16 ; 16 Logical Sectors per track is defined + ; in DPB even though there is 64 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) HSIZ6 EQU 2048 ; # of blocks in third Partition (1024 tracks) - - ; ; -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 511 ; Dir Max - DEFB 0F0H,0 ; Alloc0,1 - DEFW 0 ; Check size - DEFW 2096 ; Track offset +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 511 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + DEFW 0 ; Check size + DEFW (1+6*65)*16 ; Track offset = 2096 ENDIF ;..... -; Partition D. HBIOS Disk 1, Slice 3 +; Partition J. HBIOS Disk 0, Slice 7 - IF DRV_L - DEFB 'HBDSK1:3 ','H'+80H ; Id - 10 bytes + IF DRV_J + DEFB 'HBDSK0:7 ','J'+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 16 ; 16 Logical Sectors per track is defined + ; in DPB even though there is 64 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) HSIZ7 EQU 2048 ; # of blocks in Fourth Partition (1024 tracks) + ; +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 511 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + DEFW 0 ; Check size + DEFW (1+7*65)*16 ; Track offset = 3136 + ENDIF +; +;..... +; partition K. HBIOS Disk 1, Slice 0 + IF DRV_K + DEFB 'HBDSK1:0 ','K'+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 ; 16 Logical sectors are defined in DPB + ; even though real layout is 256 physical + ; sectors per track + DEFB 0 ; Physical tracks/side (No Meaning in HD) +HSIZ8 EQU 2048 ; # of blocks in first Partition (1024 trks) ; - ; -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 511 ; Dir Max - DEFB 0F0H,0 ; Alloc 0,1 - DEFW 0 ; Check size - DEFW 3136 ; Track offset +DPB58: DEFW 64 ; Sctrs/Trk + DEFB 5 ; Blk Shf Fctr + DEFB 31 ; Block Mask + DEFB 1 ; Extent Mask + DEFW HSIZ8-1 ; Disk Size-1 + DEFW 511 ; Dir Max-1 - 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 - 4 blocks + DEFW 0 ; Check Size + DEFW 16 ; Trk Offset ENDIF +; +;..... +; partition L. HBIOS Disk 1, Slice 1 -;<<< --- Drive M is used for RAM Drive --- >>> - - IF DRV_N - DEFB 'ROM ',' '+80H ; Id - 10 bytes + IF DRV_L + DEFB 'HBDSK1:1 ','L'+80H ; Id - 10 bytes DEFB FIXDSK ; Format type byte 0 - DEFB SPEED8+SEC512+ALC2K ; Format type byte 1 + DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 DEFB -2 ; Skew factor DEFB 1 ; Starting sector number - DEFB 16 ; Logical Sectors per track + DEFB 16 ; 16 Logical Sectors per track is defined + ; in DPB even though there is 256 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) -HSIZ8 EQU HB_ROMBLKS - -DPB58: DEFW 64 ; Scts/Trk - DEFB 4 ; Blk Shf Fctr - DEFB 15 ; Block Mask - IF ((HSIZ8 - 1) < 256) - DEFB 1 ; Extent Mask - ELSE - DEFB 0 ; Extent Mask - ENDIF - DEFW HSIZ8-1 ; Disk Size-1 - DEFW 255 ; Dir Max - DEFB 0F0H,0 ; Alloc 0,1 - DEFW 0 ; Check size - DEFW 0 ; Track offset +HSIZ9 EQU 2048 ; # of blocks in Second Partition (1024 trks) + ; +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 511 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + DEFW 0 ; Check size + DEFW (1+65)*16 ; Track offset 1056 ENDIF +; +;..... +; partition M. HBIOS Disk 1, Slice 2 - IF DRV_O - DEFB 'RAM ',' '+80H ; Id - 10 bytes + IF DRV_M + DEFB 'HBDSK1:2 ','M'+80H ; Id - 10 bytes DEFB FIXDSK ; Format type byte 0 - DEFB SPEED8+SEC512+ALC2K ; Format type byte 1 + DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 DEFB -2 ; Skew factor DEFB 1 ; Starting sector number - DEFB 16 ; Logical Sectors per track + DEFB 16 ; 16 Logical Sectors per track is defined + ; in DPB even though there is 256 physical + ; sectors per track DEFB 0 ; Physical tracks/side (No Meaning in HD) -HSIZ9 EQU HB_RAMBLKS - -DPB59: DEFW 64 ; Scts/Trk - DEFB 4 ; Blk Shf Fctr - DEFB 15 ; Block Mask - IF ((HSIZ9 - 1) < 256) - DEFB 1 ; Extent Mask - ELSE - DEFB 0 ; Extent Mask - ENDIF - DEFW HSIZ9-1 ; Disk Size-1 - DEFW 255 ; Dir Max - DEFB 0F0H,0 ; Alloc 0,1 - DEFW 0 ; Check size - DEFW 0 ; Track offset +HSIZ10 EQU 2048 ; # of blocks in Second Partition (1024 trks) + ; +DPB60: DEFW 64 ; Scts/Trk + DEFB 5 ; Blk Shf Fctr + DEFB 31 ; Block Mask + DEFB 1 ; Extent Mask + DEFW HSIZ10 ; Disk Size-1 + DEFW 511 ; Dir Max-1 4 blocks + DEFB 0F0H,0 ; Alloc 0,1 + DEFW 0 ; Check size + DEFW (1+2*65)*16 ; Track offset 2096 ENDIF - - IF DRV_P - DEFB ' ',' '+80H ; Id - 10 bytes +; +;..... +; partition N. HBIOS Disk 1, Slice 3 + IF DRV_N + DEFB 'HBDSK1:3 ','N'+80H ; Id - 10 bytes DEFB FIXDSK ; Format type byte 0 DEFB SPEED8+SEC512+ALC4K ; Format type byte 1 DEFB -2 ; Skew factor @@ -311,18 +533,19 @@ DPB59: DEFW 64 ; Scts/Trk 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 +HSIZ11 EQU 2048 ; # of blocks in Forth Logical Drive + ; (1024 tracks) + +DPB61: DEFW 64 ; Scts/Trk + DEFB 5 ; Blk Shf Fctr + DEFB 31 ; Block Mask + DEFB 1 ; Extent Mask + DEFW HSIZ11-1 ; Disk Size-1 + DEFW 511 ; Dir Max-1 + DEFB 0F0H,0 ; Alloc 0,1 + DEFW 0 ; Check size + DEFW (1+3*65)*16 ; Track offset 3136 ENDIF - -;----------- End of Hard Disk DPBs ------------- - \ No newline at end of file + +;=========== End of Hard Disk DPBs =========== + \ No newline at end of file diff --git a/Source/BPBIOS/dpbm-dx.lib b/Source/BPBIOS/dpbm-dx.lib deleted file mode 100644 index c88799a4..00000000 --- a/Source/BPBIOS/dpbm-dx.lib +++ /dev/null @@ -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 ==================== - \ No newline at end of file diff --git a/Source/BPBIOS/dpbram.lib b/Source/BPBIOS/dpbram.lib index 8ccac9d9..85fb43a9 100644 --- a/Source/BPBIOS/dpbram.lib +++ b/Source/BPBIOS/dpbram.lib @@ -1,6 +1,7 @@ ;================ Disk Parameter Blocks, Fixed Formats ==================== ; Generic File. ; +; 1.1 - 04 Sep 16 - Mods for HBIOS V 2.8 LN+WW ; 1.0 - 31 Aug 92 - General Release. HFB ; 0.1 - 3 Jan 92 - Initial Release. HFB ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -136,4 +137,4 @@ DPBRB: DEFW 40 ; Sectors per track DEFB 00,00 ; Physical sector ENDIF ;======================= End of DPBRAM.LIB =========================== - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/dph.lib b/Source/BPBIOS/dph.lib index 1f6021e6..2e8470c1 100644 --- a/Source/BPBIOS/dph.lib +++ b/Source/BPBIOS/dph.lib @@ -5,104 +5,117 @@ ; All access to DPH's are done through this table. A Zero in this table ; indicates the logical drive does Not exist. The table is indexed by logical ; drive (e.g. A-P). To swap logical drives, exchange entries in this table. +; Default drive ordering is RAM (A), ROM (B), 8 logical drives from 1st +; Hard drive (C-J), 4 logical drives from the second Hard drive (M-P) and +; two Floppy drives (O&P),. BPCNFG can be used to rearrange drive order +; to suit the user. ; ; 1.0 - 31 Aug 92 - General Release. HFB ; 0.1 - 3 Jan 92 - Initial Release. HFB ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: CSEG - -; Table has been reordered so that hard disk entries come before -; floppy entries. This means that "DRV_A" appears as I: and "DRV_E" -; appears as A:. The point is to allow booting from the first -; hard drive which pretty much needs to be A: + +; Note: ROMWBW boots from any disk on demand so order of table not +; important with regards to booting from disks rather than ROM. DPHTBL: + IF DRV_A + DEFW DPH$90 ; Dph for drive A (RAM) + ELSE + DEFW 00 + ENDIF ;DRV_A +; + IF DRV_B + DEFW DPH$91 ; Dph for drive B (ROM) + ELSE + DEFW 00 + ENDIF ;DRV_B +; + IF DRV_C AND HARDDSK + DEFW DPH$50 ; Dph for Hard drive Partition C + ELSE + DEFW 0 + ENDIF ;DRV_C AND HARDDSK +; + IF DRV_D AND HARDDSK + DEFW DPH$51 ; Dph for Hard drive Partition D + ELSE + DEFW 0 + ENDIF ;DRV_D AND HARDDSK +; IF DRV_E AND HARDDSK - DEFW DPH$50 ; Dph for Hard drive Partition E + DEFW DPH$52 ; Dph for Hard drive Partition E ELSE DEFW 00 - ENDIF + ENDIF ;DRV_E AND HARDDSK +; IF DRV_F AND HARDDSK - DEFW DPH$51 ; Dph for Hard drive Partition F + DEFW DPH$53 ; Dph for Hard drive Partition F ELSE - DEFW 00 - ENDIF + DEFW 0 + ENDIF ;DRV_F AND HARDDSK +; IF DRV_G AND HARDDSK - DEFW DPH$52 ; Dph for Hard drive Partition G + DEFW DPH$54 ; Dph for Hard drive Partition G ELSE - DEFW 00 - ENDIF + DEFW 0 + ENDIF ;DRV_G AND HARDDSK +; IF DRV_H AND HARDDSK - DEFW DPH$53 ; Dph for Hard drive Partition H + DEFW DPH$55 ; Dph for Hard drive Partition H ELSE - DEFW 00 - ENDIF - + DEFW 0 + ENDIF ;DRV_H AND HARDDSK +; IF DRV_I AND HARDDSK - DEFW DPH$54 ; Dph for Hard drive Partition I + DEFW DPH$56 ; Dph for Hard drive Partition I ELSE - DEFW 00 - ENDIF + DEFW 0 + ENDIF ;DRV_I AND HARDDSK +; IF DRV_J AND HARDDSK - DEFW DPH$55 ; Dph for Hard drive Partition J + DEFW DPH$57 ; Dph for Hard drive Partition J ELSE DEFW 00 - ENDIF + ENDIF ;DRV_J AND HARDDSK +; IF DRV_K AND HARDDSK - DEFW DPH$56 ; Dph for Hard drive Partition K + DEFW DPH$58 ; Dph for Hard drive Partition K ELSE DEFW 00 - ENDIF + ENDIF ;DRV_K AND HARDDSK +; IF DRV_L AND HARDDSK - DEFW DPH$57 ; Dph for Hard drive Partition L - ELSE - DEFW 00 - ENDIF - - IF DRV_A - DEFW DPH$00 ; Dph for drive A (Floppy) - ELSE - DEFW 00 - ENDIF - IF DRV_B - DEFW DPH$01 ; Dph for drive B (Floppy) + DEFW DPH$59 ; Dph for Hard drive Partition L ELSE DEFW 00 - ENDIF - IF DRV_C - DEFW DPH$02 ; Dph for drive C (Floppy) + ENDIF ;DRV_L AND HARDDSK +; + IF DRV_M AND HARDDSK + DEFW DPH$60 ; Dph for Hard drive Partition M ELSE DEFW 00 - ENDIF - IF DRV_D - DEFW DPH$03 ; Dph for drive D (Floppy) - ELSE - DEFW 0 ; Dph for drive D - ENDIF - - IF DRV_M AND RAMDSK - DEFW DPH$90 ; Dph for RAM Drive M in DPHM-xx.Z80 - ELSE - DEFW 00 ; Dph for drive M - ENDIF ;ramdsk - + ENDIF ;DRV_M AND HARDDSK +; IF DRV_N AND HARDDSK - DEFW DPH$58 ; Dph for Hard drive Partition N + DEFW DPH$61 ; Dph for Hard drive Partition N ELSE DEFW 00 - ENDIF - IF DRV_O AND HARDDSK - DEFW DPH$59 ; Dph for Hard drive Partition O + ENDIF ;DRV_N AND HARDDSK +; + IF DRV_O AND FLPYDSK + DEFW DPH$00 ; Dph for drive O (First Floppy) ELSE DEFW 00 - ENDIF - IF DRV_P AND HARDDSK - DEFW DPH$60 ; Dph for Hard drive Partition P + ENDIF ;DRV_O +; + IF DRV_P AND FLPYDSK + DEFW DPH$01 ; Dph for drive P (Second Floppy) ELSE DEFW 00 - ENDIF - + ENDIF ;DRV_P +; ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ; Disk Parameter Headers (DPH) for Drives MUST be in Common Memory ; @@ -140,8 +153,8 @@ DBLSTP EQU 00010000B NODBLS EQU 00000000B CSEG - - IF DRV_A +; Floppy Headers + IF DRV_O AND FLPYDSK XDPH00: DB LOCKF ; Format lock flag DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type DB 1 ; Driver id @@ -159,8 +172,9 @@ DPH$00: DW 0 ; Skew table pointer XDPHSZ EQU $-XDPH00 ; Calc for xdph size XDPHOF EQU DPH$00-XDPH00 ; Offset from xdph to dph - ENDIF ;Drv_a - IF DRV_B + ENDIF ;Drv_O +; + IF DRV_P AND FLPYDSK XDPH01: DB LOCKF ; Format lock flag DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type DB 1 ; Driver id @@ -172,42 +186,44 @@ DPH$01: DW 0 ; Skew table pointer DEFW DPB$01+DPHDSZ ; Ram space for DPB #1 ELSE DW DPBRB ; Pointer to current DPB for Drive 1 - ENDIF + ENDIF ;AUTOSL DW CHK$01 ; Wacd for drive 01 DW ALV$01 ; Alloc vector for 01 - ENDIF ;Drv_b - IF DRV_C -XDPH02: DB LOCKF ; Format lock flag - DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type - DB 1 ; Driver id - DB 2 ; Physical drive number -DPH$02: DW 0 ; Skew table pointer - DW 0,0,0 ; Scratch area - DW DIRBUF ; Directory buffer pointer - IF AUTOSL - DEFW DPB$02+DPHDSZ ; Ram space for DPB #2 - ELSE - DW DPBRA ; Pointer to current DPB for Drive #2 - ENDIF - DW CHK$02 ; Wacd for drive 02 - DW ALV$02 ; Alloc vector for 02 - ENDIF - IF DRV_D -XDPH03: DB LOCKF ; Format lock flag - DB DSK3+sS+DD+DVSPDl+MTR ; Disk drive type - DB 1 ; Driver id - DB 3 ; Physical drive number -DPH$03: DW 0 ; Skew table pointer - DW 0,0,0 ; Scratch area - DW DIRBUF ; Directory buffer pointer - IF AUTOSL - DEFW DPB$03+DPHDSZ ; Ram space for DPB #3 - ELSE - DW DPBRA ; Pointer to current DPB for Drive #3 - ENDIF - DW CHK$03 ; Wacd for drive 03 - DW ALV$03 ; Alloc vector for 03 - ENDIF ;Drv_d + ENDIF ;Drv_P +; +; Third and fourth floppy drives removed +; IF DRV_E +;XDPH02: DB LOCKF ; Format lock flag +; DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type +; DB 1 ; Driver id +; DB 2 ; Physical drive number +;DPH$02: DW 0 ; Skew table pointer +; DW 0,0,0 ; Scratch area +; DW DIRBUF ; Directory buffer pointer +; IF AUTOSL +; DEFW DPB$02+DPHDSZ ; Ram space for DPB #2 +; ELSE +; DW DPBRA ; Pointer to current DPB for Drive #2 +; ENDIF +; DW CHK$02 ; Wacd for drive 02 +; DW ALV$02 ; Alloc vector for 02 +; ENDIF +; IF DRV_F +;XDPH03: DB LOCKF ; Format lock flag +; DB DSK3+sS+DD+DVSPDl+MTR ; Disk drive type +; DB 1 ; Driver id +; DB 3 ; Physical drive number +;DPH$03: DW 0 ; Skew table pointer +; DW 0,0,0 ; Scratch area +; DW DIRBUF ; Directory buffer pointer +; IF AUTOSL +; DEFW DPB$03+DPHDSZ ; Ram space for DPB #3 +; ELSE +; DW DPBRA ; Pointer to current DPB for Drive #3 +; ENDIF +; DW CHK$03 ; Wacd for drive 03 +; DW ALV$03 ; Alloc vector for 03 +; ENDIF ;Drv_F ; Directory Buffer Allocation. Only One Directory Buffer is required. Since ; we want it to be the first item in DSEG, it must be placed here. @@ -218,7 +234,7 @@ DPH$03: DW 0 ; Skew table pointer DIRBUF EQU CBOOT ; Resident Init code in here ELSE DIRBUF EQU $ - ENDIF + ENDIF ;BANKED ORG DIRBUF+128 ; Directory buffer ; If we are using autoselection of drives, we copy the XDPB/DPB structure @@ -226,58 +242,64 @@ DIRBUF EQU $ ; installing data for the desired format and locking the DPH. For Non-auto- ; select, we simply point to the read-only structure defined in DPB.LIB. - IF AUTOSL - IF DRV_A + IF AUTOSL AND FLPYDSK + IF DRV_O DPB$00: DEFS DPBSIZ ; Size of XDPB+DPB - ENDIF - IF DRV_B + ENDIF ;DRV_O +; + IF DRV_P DPB$01: DEFS DPBSIZ - ENDIF - IF DRV_C -DPB$02: DEFS DPBSIZ - ENDIF - IF DRV_D -DPB$03: DEFS DPBSIZ - ENDIF + ENDIF ;DRV_P +; +; Third and fourth floppy drives removed +; IF DRV_E +;DPB$02: DEFS DPBSIZ +; ENDIF +; IF DRV_F +;DPB$03: DEFS DPBSIZ +; ENDIF ENDIF ;autosel IF [BANKED AND ZSDOS2] COMMON /B2RAM/ ELSE DSEG - ENDIF + ENDIF ; [BANKED AND ZSDOS2] ; Directory Check Buffers. Each Buffer MUST be NDE/4 Bytes long at minimum. ; Each Logical Drive with removable media MUST have its own check buffer. - IF DRV_A + IF DRV_O AND FLPYDSK CHK$00: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries ENDIF - IF DRV_B +; + IF DRV_P AND FLPYDSK CHK$01: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries ENDIF - IF DRV_C -CHK$02: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries - ENDIF - IF DRV_D -CHK$03: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries - ENDIF +; +; IF DRV_E +;CHK$02: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries +; ENDIF +; IF DRV_F +;CHK$03: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries +; ENDIF ; Allocation BitMap Buffers. Each MUST be NAB/8 Bytes at Minimum. ; Each Logical Floppy Drive MUST have an Allocation BitMap Buffer. - - IF DRV_A +; + IF DRV_O AND FLPYDSK ALV$00: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives ENDIF - IF DRV_B +; + IF DRV_P AND FLPYDSK ALV$01: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives ENDIF - IF DRV_C -ALV$02: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives - ENDIF - IF DRV_D -ALV$03: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives - ENDIF +; IF DRV_E +;ALV$02: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives +; ENDIF +; IF DRV_F +;ALV$03: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives +; ENDIF ;======================= End of DPH.LIB ======================= - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/dph.lib.sav b/Source/BPBIOS/dph.lib.sav deleted file mode 100644 index 58b0af34..00000000 --- a/Source/BPBIOS/dph.lib.sav +++ /dev/null @@ -1,274 +0,0 @@ -;:::::::::::::::::::::::::::::::::::::::::::::::***************************** -; DPH Pointer Table ** Configuration Dependant ** -; (This table may be in Banked Memory) ***************************** -; -; All access to DPH's are done through this table. A Zero in this table -; indicates the logical drive does Not exist. The table is indexed by logical -; drive (e.g. A-P). To swap logical drives, exchange entries in this table. -; -; 1.0 - 31 Aug 92 - General Release. HFB -; 0.1 - 3 Jan 92 - Initial Release. HFB -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - - CSEG - -DPHTBL: - IF DRV_A - DEFW DPH$00 ; Dph for drive A (Floppy) - ELSE - DEFW 00 - ENDIF - IF DRV_B - DEFW DPH$01 ; Dph for drive B (Floppy) - ELSE - DEFW 00 - ENDIF - IF DRV_C - DEFW DPH$02 ; Dph for drive C (Floppy) - ELSE - DEFW 00 - ENDIF - IF DRV_D - DEFW DPH$03 ; Dph for drive D (Floppy) - ELSE - DEFW 0 ; Dph for drive D - ENDIF - IF DRV_E AND HARDDSK - DEFW DPH$50 ; Dph for Hard drive Partition E - ELSE - DEFW 00 - ENDIF - IF DRV_F AND HARDDSK - DEFW DPH$51 ; Dph for Hard drive Partition F - ELSE - DEFW 00 - ENDIF - IF DRV_G AND HARDDSK - DEFW DPH$52 ; Dph for Hard drive Partition G - ELSE - DEFW 00 - ENDIF - IF DRV_H AND HARDDSK - DEFW DPH$53 ; Dph for Hard drive Partition H - ELSE - DEFW 00 - ENDIF - IF DRV_I AND HARDDSK - DEFW DPH$54 ; Dph for Hard drive Partition I - ELSE - DEFW 00 - ENDIF - IF DRV_J AND HARDDSK - DEFW DPH$55 ; Dph for Hard drive Partition J - ELSE - DEFW 00 - ENDIF - IF DRV_K AND HARDDSK - DEFW DPH$56 ; Dph for Hard drive Partition K - ELSE - DEFW 00 - ENDIF - IF DRV_L AND HARDDSK - DEFW DPH$57 ; Dph for Hard drive Partition L - ELSE - DEFW 00 - ENDIF - IF DRV_M AND RAMDSK - DEFW DPH$90 ; Dph for RAM Drive M in DPHM-xx.Z80 - ELSE - DEFW 00 ; Dph for drive M - ENDIF ;ramdsk - IF DRV_N AND HARDDSK - DEFW DPH$58 ; Dph for Hard drive Partition N - ELSE - DEFW 00 - ENDIF - IF DRV_O AND HARDDSK - DEFW DPH$59 ; Dph for Hard drive Partition O - ELSE - DEFW 00 - ENDIF - IF DRV_P AND HARDDSK - DEFW DPH$60 ; Dph for Hard drive Partition P - ELSE - DEFW 00 - ENDIF - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Disk Parameter Headers (DPH) for Drives MUST be in Common Memory -; -; The DPH's used have a two byte prefix which indicates the Physical -; Unit # and the Driver Number for the Drive. The Physical Unit Number -; is Controller specific, while the driver number is used to select -; which service routines are to be called to satisfy service requests. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -; Drive Type Byte -; --------------- -; D D D D D D D D -; 7 6 5 4 3 2 1 0 -; | | | | | +-+-+--- Disk Size: 000=Fixed Disk, 001=8", 010=5.25", 011=3.5" -; | | | | +--------- 0 = Single Sided, 1 = Double Sided -; | | | +----------- 0 = Normal Step, 1 = Double-Step Drive -; | | +------------- 0 = Motor Always On, 1 = Drive Motor Control needed -; | +--------------- 0 = Max Speed is Normal 5.25" (300rpm) -; | 1 = 8" and Hi-Density 5.25" Max Speed (360rpm) -; +----------------- 0 = Double-Density, 1 = Single-Density - -FIXDSK EQU 00000000B -DSK8 EQU 00000001B -DSK5 EQU 00000010B -DSK3 EQU 00000011B -SS EQU 00000000B -DS EQU 00001000B -DD EQU 00000000B -SD EQU 10000000B -DVSPDH EQU 01000000B -DVSPDL EQU 00000000B -MTR EQU 00100000B -NOMTR EQU 00000000B -DBLSTP EQU 00010000B -NODBLS EQU 00000000B - - CSEG - - IF DRV_A -XDPH00: DB LOCKF ; Format lock flag - DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type - DB 1 ; Driver id - DB 0 ; Physical drive number -DPH$00: DW 0 ; Skew table pointer - DW 0,0,0 ; Scratch area - DW DIRBUF ; Directory buffer pointer - IF AUTOSL ; For autoselection, we need RAM Space - DEFW DPB$00+DPHDSZ ; Ram area for DPB #0 - ELSE - DW DPBRA ; Pointer to current DPB for Drive 0 - ENDIF - DW CHK$00 ; Wacd for drive 00 - DW ALV$00 ; Alloc vector for 00 - -XDPHSZ EQU $-XDPH00 ; Calc for xdph size -XDPHOF EQU DPH$00-XDPH00 ; Offset from xdph to dph - ENDIF ;Drv_a - IF DRV_B -XDPH01: DB LOCKF ; Format lock flag - DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type - DB 1 ; Driver id - DB 1 ; Physical drive number -DPH$01: DW 0 ; Skew table pointer - DW 0,0,0 ; Scratch area - DW DIRBUF ; Directory buffer pointer - IF AUTOSL - DEFW DPB$01+DPHDSZ ; Ram space for DPB #1 - ELSE - DW DPBRB ; Pointer to current DPB for Drive 1 - ENDIF - DW CHK$01 ; Wacd for drive 01 - DW ALV$01 ; Alloc vector for 01 - ENDIF ;Drv_b - IF DRV_C -XDPH02: DB LOCKF ; Format lock flag - DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type - DB 1 ; Driver id - DB 2 ; Physical drive number -DPH$02: DW 0 ; Skew table pointer - DW 0,0,0 ; Scratch area - DW DIRBUF ; Directory buffer pointer - IF AUTOSL - DEFW DPB$02+DPHDSZ ; Ram space for DPB #2 - ELSE - DW DPBRA ; Pointer to current DPB for Drive #2 - ENDIF - DW CHK$02 ; Wacd for drive 02 - DW ALV$02 ; Alloc vector for 02 - ENDIF - IF DRV_D -XDPH03: DB LOCKF ; Format lock flag - DB DSK3+sS+DD+DVSPDl+MTR ; Disk drive type - DB 1 ; Driver id - DB 3 ; Physical drive number -DPH$03: DW 0 ; Skew table pointer - DW 0,0,0 ; Scratch area - DW DIRBUF ; Directory buffer pointer - IF AUTOSL - DEFW DPB$03+DPHDSZ ; Ram space for DPB #3 - ELSE - DW DPBRA ; Pointer to current DPB for Drive #3 - ENDIF - DW CHK$03 ; Wacd for drive 03 - DW ALV$03 ; Alloc vector for 03 - ENDIF ;Drv_d - -; Directory Buffer Allocation. Only One Directory Buffer is required. Since -; we want it to be the first item in DSEG, it must be placed here. - - DSEG - - IF BANKED -DIRBUF EQU CBOOT ; Resident Init code in here - ELSE -DIRBUF EQU $ - ENDIF - ORG DIRBUF+128 ; Directory buffer - -; If we are using autoselection of drives, we copy the XDPB/DPB structure -; for the identified format to RAM thereby allowing emulation of formats by -; installing data for the desired format and locking the DPH. For Non-auto- -; select, we simply point to the read-only structure defined in DPB.LIB. - - IF AUTOSL - IF DRV_A -DPB$00: DEFS DPBSIZ ; Size of XDPB+DPB - ENDIF - IF DRV_B -DPB$01: DEFS DPBSIZ - ENDIF - IF DRV_C -DPB$02: DEFS DPBSIZ - ENDIF - IF DRV_D -DPB$03: DEFS DPBSIZ - ENDIF - ENDIF ;autosel - - IF [BANKED AND ZSDOS2] - COMMON /B2RAM/ - ELSE - DSEG - ENDIF - -; Directory Check Buffers. Each Buffer MUST be NDE/4 Bytes long at minimum. -; Each Logical Drive with removable media MUST have its own check buffer. - - IF DRV_A -CHK$00: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries - ENDIF - IF DRV_B -CHK$01: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries - ENDIF - IF DRV_C -CHK$02: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries - ENDIF - IF DRV_D -CHK$03: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries - ENDIF - -; Allocation BitMap Buffers. Each MUST be NAB/8 Bytes at Minimum. -; Each Logical Floppy Drive MUST have an Allocation BitMap Buffer. - - IF DRV_A -ALV$00: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives - ENDIF - IF DRV_B -ALV$01: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives - ENDIF - IF DRV_C -ALV$02: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives - ENDIF - IF DRV_D -ALV$03: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives - ENDIF - -;======================= End of DPH.LIB ======================= - \ No newline at end of file diff --git a/Source/BPBIOS/dphhd.lib b/Source/BPBIOS/dphhd.lib index c1fd3830..d16642d0 100644 --- a/Source/BPBIOS/dphhd.lib +++ b/Source/BPBIOS/dphhd.lib @@ -3,6 +3,8 @@ ; (MUST be in Common Memory) ; This data must match information contained in the DPB table for Hard Drives. ; +; 1.3 - 04 Sep 16 - Mods for HBIOS V 2.8 WW+LN +; 1.2 - 24 Mar 14 - Initial N8VEM test release WW+LN ; 1.1 - 28 Aug 01 - Made generic module for GPL release. HFB ; 1.0 - 31 Aug 92 - General Release. HFB ; 0.1 - 3 Jan 92 - Initial release. HFB @@ -15,11 +17,38 @@ ; See ICFG-xx.Z80 for a definition of the data. CSEG - IF DRV_E +;<<< --- Drive A is for RAM Drive --- >>> + +XDPH90: DEFB TRUE ; Format lock flag (Lock RAM Drive) + DEFB FIXDSK ; Disk Drive Type + DEFB 2 ; Driver ID = Treat as Hard Drive + DEFB HB_MDDEV ; Physical Drive Number +DPH$90: DEFW 0 ; Skew Table pointer + DEFW 0,0,0 ; Scratch area + DEFW DIRBUF ; Directory buffer pointer + DEFW DPBRAM ; Pointer to DPB for RAM Drive + DEFW 0 ; No Wacd for RAM drive + DEFW ALV$90 ; Alloc vector for RAM Drive +; +;<<< --- Drive B is for ROM Drive --- >>> + +XDPH91: DEFB TRUE ; Format lock flag (Lock ROM Drive) + DEFB FIXDSK ; Disk Drive Type + DEFB 2 ; Driver ID = Treat as Hard Drive + DEFB HB_MDDEV + 1 ; Physical Drive Number +DPH$91: DEFW 0 ; Skew Table pointer + DEFW 0,0,0 ; Scratch area + DEFW DIRBUF ; Directory buffer pointer + DEFW DPBROM ; Pointer to DPB for ROM Drive + DEFW 0 ; No Wacd for ROM drive + DEFW ALV$91 ; Alloc vector for ROM Drive + +; + IF DRV_C XDPH50: DEFB TRUE ; Format lock flag (Lock First Hard Drive) DEFB FIXDSK ; Disk drive type - DEFB 2 ; Driver ID - DEFB HB_HDDEV + 0 ; Physical drive [0..2] for this Partition + DEFB 2 ; Driver ID - 2=hard drive + DEFB HB_HDDEV + 0 ; Physical drive [0..6] for this Partition DPH$50: DEFW 0 ; Skew table pointer DEFW 0,0,0 ; Scratch area DEFW DIRBUF ; Directory buffer pointer @@ -27,11 +56,12 @@ DPH$50: DEFW 0 ; Skew table pointer DEFW 0 ; No Wacd for hard drive DEFW ALV$50 ; Alloc vector for first Partition ENDIF - IF DRV_F +; + IF DRV_D XDPH51: DEFB TRUE ; --- Second Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB HB_HDDEV + 0 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + DEFB HB_HDDEV + 0 ; Physical drive [0..6] for this Partition DPH$51: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -39,11 +69,12 @@ DPH$51: DEFW 0 DEFW 0 DEFW ALV$51 ; Alloc vector for second Partition/Drive ENDIF - IF DRV_G +; + IF DRV_E XDPH52: DEFB TRUE ; --- Third Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB HB_HDDEV + 0 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + DEFB HB_HDDEV + 0 ; Physical drive [0..2] for this Partition DPH$52: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -51,11 +82,12 @@ DPH$52: DEFW 0 DEFW 0 DEFW ALV$52 ; Alloc vector for third Partition/Drive ENDIF - IF DRV_H +; + IF DRV_F XDPH53: DEFB TRUE ; --- Fourth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB HB_HDDEV + 0 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + DEFB HB_HDDEV + 0 ; Physical drive [0..6] for this Partition DPH$53: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -63,11 +95,12 @@ DPH$53: DEFW 0 DEFW 0 DEFW ALV$53 ; Alloc vector for fourth Partition/Drive ENDIF - IF DRV_I +; + IF DRV_G XDPH54: DEFB TRUE ; --- Fifth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB HB_HDDEV + 1 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + DEFB HB_HDDEV + 0 ; Physical drive [0..6] for this Partition DPH$54: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -75,11 +108,12 @@ DPH$54: DEFW 0 DEFW 0 DEFW ALV$54 ; Alloc vector for fifth Partition/Drive ENDIF - IF DRV_J +; + IF DRV_H XDPH55: DEFB TRUE ; --- Sixth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB HB_HDDEV + 1 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + DEFB HB_HDDEV + 0 ; Physical drive [0..6] for this Partition DPH$55: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -87,11 +121,12 @@ DPH$55: DEFW 0 DEFW 0 DEFW ALV$55 ; Alloc vector for sixth Partition/Drive ENDIF - IF DRV_K +; + IF DRV_I XDPH56: DEFB TRUE ; --- Seventh Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB HB_HDDEV + 1 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + DEFB HB_HDDEV + 0 ; Physical drive [0..6] for this Partition DPH$56: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -99,11 +134,12 @@ DPH$56: DEFW 0 DEFW 0 DEFW ALV$56 ; Alloc vector for seventh Partition/Drive ENDIF - IF DRV_L +; + IF DRV_J XDPH57: DEFB TRUE ; --- Eighth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB HB_HDDEV + 1 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + DEFB HB_HDDEV + 0 ; Physical drive [0..6] for this Partition DPH$57: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -111,12 +147,16 @@ DPH$57: DEFW 0 DEFW 0 DEFW ALV$57 ; Alloc vector for eighth Partition/Drive ENDIF -;<<< --- Drive M is for RAM Drive --- >>> - IF DRV_N +; + IF DRV_K XDPH58: DEFB TRUE ; --- Ninth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB HB_MDDEV + 1 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + IF MK4 + DEFB HB_HDDEV + 2 ; SD card on MK4 + ELSE + DEFB HB_HDDEV + 1 ; SLAVE IDE or 2nd simh HDSK + ENDIF DPH$58: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -124,11 +164,16 @@ DPH$58: DEFW 0 DEFW 0 DEFW ALV$58 ; Alloc vector for ninth Partition/Drive ENDIF - IF DRV_O +; + IF DRV_L XDPH59: DEFB TRUE ; --- Tenth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB HB_MDDEV + 0 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + IF MK4 + DEFB HB_HDDEV + 2 ; SD card on MK4 + ELSE + DEFB HB_HDDEV + 1 ; SLAVE IDE or 2nd simh HDSK + ENDIF DPH$59: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -136,11 +181,16 @@ DPH$59: DEFW 0 DEFW 0 DEFW ALV$59 ; Alloc vector for tenth Partition/Drive ENDIF - IF DRV_P +; + IF DRV_M XDPH60: DEFB TRUE ; --- Eleventh Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 2 + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + IF MK4 + DEFB HB_HDDEV + 2 ; SD card on MK4 + ELSE + DEFB HB_HDDEV + 1 ; SLAVE IDE or 2nd simh HDSK + ENDIF DPH$60: DEFW 0 DEFW 0,0,0 DEFW DIRBUF @@ -148,45 +198,80 @@ DPH$60: DEFW 0 DEFW 0 DEFW ALV$60 ; Alloc vector for eleventh Partition/Drive ENDIF +; + IF DRV_N +XDPH61: DEFB TRUE ; --- Twelveth Hard Drive/Partition + DEFB FIXDSK ; Disk drive type + DEFB 2 ; Driver ID - 2=hard drive + IF MK4 + DEFB HB_HDDEV + 2 ; SD card on MK4 + ELSE + DEFB HB_HDDEV + 1 ; SLAVE IDE or 2nd simh HDSK + ENDIF +DPH$61: DEFW 0 + DEFW 0,0,0 + DEFW DIRBUF + DEFW DPB61 ; Pointer to DPB for eleventh Partition/Drive + DEFW 0 + DEFW ALV$61 ; Alloc vector for eleventh Partition/Drive + ENDIF ; Allocation BitMap Buffers. Each MUST be # Alloc Blks/8 Bytes at Minimum. ; Each Logical Drive MUST have an Allocation BitMap Buffer. COMMON /RESVD/ ; Reserve space for BPBUILD - IF DRV_E +ALV$90: DEFS MSIZR/8+1 ; Space for RAM Drive Alloc Blocks +; +ALV$91: DEFS MSIZO/8+1 ; Space for ROM Drive Alloc Blocks +; + IF DRV_C ALV$50: DEFS HSIZ0/8+1 ; Space for First Logical Drive Alloc Blocks ENDIF - IF DRV_F +; + IF DRV_D ALV$51: DEFS HSIZ1/8+1 ; Space for Second Logical Drive Alloc Blocks ENDIF - IF DRV_G +; + IF DRV_E ALV$52: DEFS HSIZ2/8+1 ; Space for Third Logical Drive Alloc Blocks ENDIF - IF DRV_H +; + IF DRV_F ALV$53: DEFS HSIZ3/8+1 ; Space for Fourth Logical Drive Alloc Blocks ENDIF +; + IF DRV_G +ALV$54: DEFS HSIZ4/8+1 ; Space for Fifth Logical Drive Alloc Blocks + ENDIF +; + IF DRV_H +ALV$55: DEFS HSIZ5/8+1 ; Space for Sixth Logical Drive Alloc Blocks + ENDIF +; IF DRV_I -ALV$54: DEFS HSIZ4/8+1 +ALV$56: DEFS HSIZ6/8+1 ; Space for Seventh Logical Drive Alloc Blocks ENDIF +; IF DRV_J -ALV$55: DEFS HSIZ5/8+1 +ALV$57: DEFS HSIZ7/8+1 ; Space for Eighth Logical Drive Alloc Blocks ENDIF +; IF DRV_K -ALV$56: DEFS HSIZ6/8+1 +ALV$58: DEFS HSIZ8/8+1 ; Space for Nineth Logical Drive Alloc Blocks ENDIF +; IF DRV_L -ALV$57: DEFS HSIZ7/8+1 +ALV$59: DEFS HSIZ9/8+1 ; Space for Tenth Logical Drive Alloc Blocks ENDIF -;<<< --- Drive M is RAM --- >>> - IF DRV_N -ALV$58: DEFS HSIZ8/8+1 - ENDIF - IF DRV_O -ALV$59: DEFS HSIZ9/8+1 +; + IF DRV_M +ALV$60: DEFS HSIZ10/8+1 ; Space for Eleventh Logical Drive Alloc Blocks ENDIF - IF DRV_P -ALV$60: DEFS HSIZ10/8+1 +; + IF DRV_N +ALV$61: DEFS HSIZ11/8+1 ; Space for Twelveth Logical Drive Alloc Blocks ENDIF ;======================= End of DPHHD.LIB ========================= + \ No newline at end of file diff --git a/Source/BPBIOS/dphhd.lib.sav b/Source/BPBIOS/dphhd.lib.sav deleted file mode 100644 index ec72cd8c..00000000 --- a/Source/BPBIOS/dphhd.lib.sav +++ /dev/null @@ -1,193 +0,0 @@ -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Additional Disk Parameter Headers (DPH) for Hard Drives Generic File -; (MUST be in Common Memory) -; This data must match information contained in the DPB table for Hard Drives. -; -; 1.1 - 28 Aug 01 - Made generic module for GPL release. HFB -; 1.0 - 31 Aug 92 - General Release. HFB -; 0.1 - 3 Jan 92 - Initial release. HFB -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; The Physical Drive Number byte (XDPH+3) is simply an index to the Physical -; Drive as specified in the ICFG-xx.Z80 file. Up to three physical drives -; may be defined in that section, the first byte of which defines the -; Physical/Logical Unit Address (Device & LUN for SCSI, Master/Slave for IDE), -; and a flag bit to specify whether or not the drive is physically present. -; See ICFG-xx.Z80 for a definition of the data. - - CSEG - IF DRV_E -XDPH50: DEFB TRUE ; Format lock flag (Lock First Hard Drive) - DEFB FIXDSK ; Disk drive type - DEFB 2 ; Driver ID - DEFB 0 ; Physical drive [0..2] for this Partition -DPH$50: DEFW 0 ; Skew table pointer - DEFW 0,0,0 ; Scratch area - DEFW DIRBUF ; Directory buffer pointer - DEFW DPB50 ; Pointer to DPB for first partition/drive - DEFW 0 ; No Wacd for hard drive - DEFW ALV$50 ; Alloc vector for first Partition - ENDIF - IF DRV_F -XDPH51: DEFB TRUE ; --- Second Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 0 -DPH$51: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB51 ; Pointer to DPB for second Partition/Drive - DEFW 0 - DEFW ALV$51 ; Alloc vector for second Partition/Drive - ENDIF - IF DRV_G -XDPH52: DEFB TRUE ; --- Third Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 0 -DPH$52: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB52 ; Pointer to DPB for third Partition/Drive - DEFW 0 - DEFW ALV$52 ; Alloc vector for third Partition/Drive - ENDIF - IF DRV_H -XDPH53: DEFB TRUE ; --- Fourth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 0 -DPH$53: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB53 ; Pointer to DPB for fourth Partition/Drive - DEFW 0 - DEFW ALV$53 ; Alloc vector for fourth Partition/Drive - ENDIF - IF DRV_I -XDPH54: DEFB TRUE ; --- Fifth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 1 -DPH$54: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB54 ; Pointer to DPB for fifth Partition/Drive - DEFW 0 - DEFW ALV$54 ; Alloc vector for fifth Partition/Drive - ENDIF - IF DRV_J -XDPH55: DEFB TRUE ; --- Sixth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 1 -DPH$55: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB55 ; Pointer to DPB for sixth Partition/Drive - DEFW 0 - DEFW ALV$55 ; Alloc vector for sixth Partition/Drive - ENDIF - IF DRV_K -XDPH56: DEFB TRUE ; --- Seventh Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 1 -DPH$56: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB56 ; Pointer to DPB for seventh Partition/Drive - DEFW 0 - DEFW ALV$56 ; Alloc vector for seventh Partition/Drive - ENDIF - IF DRV_L -XDPH57: DEFB TRUE ; --- Eighth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 1 -DPH$57: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB57 ; Pointer to DPB for eighth Partition/Drive - DEFW 0 - DEFW ALV$57 ; Alloc vector for eighth Partition/Drive - ENDIF -;<<< --- Drive M is for RAM Drive --- >>> - IF DRV_N -XDPH58: DEFB TRUE ; --- Ninth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 1 -DPH$58: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB58 ; Pointer to DPB for ninth Partition/Drive - DEFW 0 - DEFW ALV$58 ; Alloc vector for ninth Partition/Drive - ENDIF - IF DRV_O -XDPH59: DEFB TRUE ; --- Tenth Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 1 -DPH$59: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB59 ; Pointer to DPB for tenth Partition/Drive - DEFW 0 - DEFW ALV$59 ; Alloc vector for tenth Partition/Drive - ENDIF - IF DRV_P -XDPH60: DEFB TRUE ; --- Eleventh Hard Drive/Partition - DEFB FIXDSK - DEFB 2 - DEFB 1 -DPH$60: DEFW 0 - DEFW 0,0,0 - DEFW DIRBUF - DEFW DPB60 ; Pointer to DPB for eleventh Partition/Drive - DEFW 0 - DEFW ALV$60 ; Alloc vector for eleventh Partition/Drive - ENDIF - -; Allocation BitMap Buffers. Each MUST be # Alloc Blks/8 Bytes at Minimum. -; Each Logical Drive MUST have an Allocation BitMap Buffer. - - COMMON /RESVD/ ; Reserve space for BPBUILD - - IF DRV_E -ALV$50: DEFS HSIZ0/8+1 ; Space for First Logical Drive Alloc Blocks - ENDIF - IF DRV_F -ALV$51: DEFS HSIZ1/8+1 ; Space for Second Logical Drive Alloc Blocks - ENDIF - IF DRV_G -ALV$52: DEFS HSIZ2/8+1 ; Space for Third Logical Drive Alloc Blocks - ENDIF - IF DRV_H -ALV$53: DEFS HSIZ3/8+1 ; Space for Fourth Logical Drive Alloc Blocks - ENDIF - IF DRV_I -ALV$54: DEFS HSIZ4/8+1 - ENDIF - IF DRV_J -ALV$55: DEFS HSIZ5/8+1 - ENDIF - IF DRV_K -ALV$56: DEFS HSIZ6/8+1 - ENDIF - IF DRV_L -ALV$57: DEFS HSIZ7/8+1 - ENDIF -;<<< --- Drive M is RAM --- >>> - IF DRV_N -ALV$58: DEFS HSIZ8/8+1 - ENDIF - IF DRV_O -ALV$59: DEFS HSIZ9/8+1 - ENDIF - IF DRV_P -ALV$60: DEFS HSIZ10/8+1 - ENDIF - -;======================= End of DPHHD.LIB ========================= - \ No newline at end of file diff --git a/Source/BPBIOS/fdc-dx.z80 b/Source/BPBIOS/fdc-dx.z80 deleted file mode 100644 index c42724c6..00000000 --- a/Source/BPBIOS/fdc-dx.z80 +++ /dev/null @@ -1,1275 +0,0 @@ -;::::::::::::::::::::::::::::::::::::::::::::****************************** -; Floppy Disk Routines ***** Hardware Dependent ***** -; - D-X Designs Pty Ltd P112 - ****************************** -; -; 1.3 - 26 Aug 01 - Cleaned up for GPL Release. HFB -; 1.2c- 12 May 97 - Cleaned up source, modified STSIZE Code (again). HFB -; 1.2b- 22 Apr 97 - Changed 5.25" Hi/Lo Speed controls. HFB -; 1.0a- 23 Mar 97 - (test) fixes. HFB -; 1.0 - 13 Aug 96 - Initial Release for P112 from YASMIO. HFB -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Floppy Units are accessed on the P112 using the on-board SMC FDC37C665. -; An optional assembly flag controls whether Polled or DMA-controlled IO is -; used in operation. The DMA mode does not use any Interrupts in this -; preliminary version, but instead polls the INT1* line as Bit 6 on Port C -; of the Z182. -; This software uses the following registers: - -; 0DE - Port C, Bit 6=INT1*, Bit 7=INT2* (DRC) - -; 090 - Configuration Control Port (CFCNTL) -; 091 - Configuration Data Port (CFDATA) - -; The Chip configuration must be altered only to change the polarity on the -; Density signal applied to Pin 2 on the Floppy Connectors. Optional code -; which may be used forces this lead Hi/Lo as required for different formats -; using two bits of Configuration Register #5. - -CR5 EQU 5 ; FDC/IDE setups - ;Bit 7 6 5 4 3 2 1 0 - ; | | | | | +-+-+- unused - ; | | | +-+------- 00 = Density Normal (tracks Data Rate) - ; | | | 01 = (reserved), 10 = Force "1", 11 = Force "0" - ; +-+-+----------- unused - -; 092 - Drive Control Register (Write Only) -; 7 6 5 4 3 2 1 0 -; | | | | | | +-+-- Drive (00=0, 01=1, 10=2, 11=3) -; | | | | | +------ 1 = Normal Opn, 0 = Reset Controller -; | | | | +-------- 1 = Enable DMA Pins, 0 = Disable DRQ,DAK,INT pins -; | | | +---------- 1 = Enable Drive 0 Motor -; | | +------------ 1 = Enable Drive 1 Motor -; | +-------------- 1 = Enable Drive 2 Motor -; +---------------- 1 = Enable Drive 3 Motor -; 093 - (Not Used) -; 094 - Data-Rate Select (Write) / Main Status Register (Read) -; 7 6 5 4 3 2 1 0 (Write) - -; 7 6 5 4 3 2 1 0 (Read) -; | | | | +-+-+-+-- Drives Seeking (0=B0 Set, 1=B1 Set,.. 3=B3 Set) -; | | | +---------- 1 = Command In Progress, 0 = Command Ended -; | | +------------ 1 = Non-DMA Execution, 0 = DMA Execution -; | +-------------- 1 = Read, 0 = Write -; +---------------- 1 = Request for Master, 0 = Internal Execution -; -; 095 - Data/Command Register (Read/Write) -; (Byte Writes/Reads) -; 096 - (Not Used) -; 097 - Data Rate Register (Write) / Disk Changed Bit (Read) -; 7 6 5 4 3 2 1 0 (Write) -; | | | | | | +-+-- 00=500 kb/s, RPM/LC Hi, 01=250/300 kb/s (RPM/LC Lo) -; | | | | | | 10=250 kb/s, RPM/LC Lo, 11=1000 kb/s (RPM/LC Hi/Lo) -; +-+-+-+-+-+------ (Not Used) -; -; 7 6 5 4 3 2 1 0 (Read) -; | +-+-+-+-+-+-+-- (Tri-State, used for HD Controller) -; +---------------- 1 = Disk Changed (latched complement of DSKCHG inp) -; -; 0A0 - DMA I/O Select Port (DMA configuration Only) - - IF BANKED - COMMON /BANK2/ - ELSE - CSEG - ENDIF - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; STMODE (Function 0) - Set the FDC mode for Read/Write operations. -; -; Enter : A = Single-Density Flag (0 = Double Dens, 0FFH = Single Dens) -; Return: Nothing -; Uses : AF All other Registers Preserved/Not Affected -; -; Assumes STSIZE and STSECT called first -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STMODE: PUSH BC ; Save Regs - PUSH HL - CPL ; Flip Bits so 1=MFM, 0=FM - AND 01000000B ; keep only bit of interest - LD (MODE),A ; Set MT, MF, SK for Commands - LD B,A ; (for later) - LD A,(DRVSIZ) - DEC A ; becomes: 8"=0, 5"=1, 3"=2 - LD L,2 ; (prepare for 8") - JR Z,STMOD2 ; ..jump if 8" (same as HD) - DEC L ; Else set to 3/5" Low Speed (1) - LD A,(DRVSPD) - OR A ; Low Speed? - JR Z,STMOD2 ; ..jump if So - INC L ; Else bump to 2 for Hi-Speed - LD A,(DRVSIZ) - SUB 2 ; 5.25" Hi-Density? - JR Z,STMOD2 ; ..jump if So pointing to 8"/5.25"HD - LD L,8+GAP3HD-FM5G3 ; Else Offset to 3.5" HD Gaps - JR STMOD4 ; ..and set SecSize - -STMOD2: BIT 6,B ; MFM Set? - JR Z,STMOD3 ; ..jump if Not - SCF ; Else Set Carry if MFM -STMOD3: RL L ; Shift into LSB, Size * 2 - ADD HL,HL - ADD HL,HL ; Size * 8, MFM * 4 (only 1 matters) -STMOD4: LD A,(RSZ) - LD (NBYTS),A ; save in Comnd Blk - OR A - PUSH AF - ADD A,L ; Add Sector Size to computation - LD L,A ; and Store - POP AF - LD A,129 ; (Prepare default) - JR Z,STMOD1 ; ..jump if 128-byte Sectors (DTL=128) - XOR A ; Else DTL is 0FFH (0-->FF) -STMOD1: DEC A ; Correct DTL Value - LD (DTL),A ; set - LD A,L ; Xfer index to A - LD HL,FM5G3-8 ; No low speed on 8" - CALL ADDAHL ; Index into gap 3 table - LD A,(HL) - LD (GPL),A ; store Gap Length - POP HL - POP BC - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; STSIZE (Function 1) - Set Drive Size (3.5", 5.25", 8"), Drive Speed -; (High/Low) Capability, and a Boolean flag for whether Motor Control is -; needed by the Drive. -; -; Enter : A = Hi Speed Flag ( 0 = Normal, 0FFH = High Speed Capable) -; D = Motor Flag (0 = No Motor Control, 0FFH = Motor needed) -; E = Drive Size (0 = Hard, 001 = 8", 010 = 5.25", 011 = 3.5") -; Return: Nothing -; Uses : AF All other Registers Preserved/Not Affected -; -; Assumes STHDRV Called Previously. Call before calling STMODE. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STSIZE: LD (DRVSPD),A ; Save Drive Speed Flag - OR A ; (set flag, 0=Normal, FF=Hi-Speed/Density) - LD A,E - LD (DRVSIZ),A ; Save Drive Size Byte - LD A,D - LD (FDMOT),A ; Set Drive Motor Needed flag - PUSH DE ; (Save Regs) - LD A,00000000B ; (Preset Hi 500 kbps, 3.5 & 5.25" Rate) - JR NZ,STSIZ2 ; ..jump if Hi-Density/Speed to Set - DEC E - DEC E ; 5.25" (010B -> 00)? - LD A,00000010B ; (Prepare for 250 kbps) - JR NZ,STSIZ2 ; ..jump if Not 5.25" w/Rate Set - PUSH HL - LD A,(HDR) ; Else use a routine from FLOPPY.Z80 to - CALL PHYSCL ; point to Physical Drive Byte (ICFG-xx) - BIT 6,(HL) ; Hi-Density capable? - POP HL - LD A,00000010B ; (Prepare for 250 kbps) - JR Z,STSIZ2 ; ..jump if No - LD A,00000001B ; Else set to 300 kbps (@360 rpm = 250kbps) -STSIZ2: OUT (DRR),A ; Set Rate in FDC Reg - LD D,A ; preserve Rate bits - IN0 A,(1FH) ; Read Cntrl Reg (B7=1 if Hi Speed) - RLA ; Speed to Bit Carry..Turbo? - LD A,(SPEED) ; (Get Processor Rate in MHz) - JR C,STSIZ8 ; ..jump if Turbo for longer delay - SRL A ; Else divide rate by 2 -STSIZ8: INC D - DEC D ; 500 kb/s (Hi-Speed) Rate (D=0)? - JR NZ,STSIZ9 ; ..jump if Not - LD A,1 ; Else minimum delay for "High-Speed" -STSIZ9: LD (DLYCNT),A ; save delay count - POP DE - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; STHDRV (Function 2) - Set Head and Drive for Disk Operations. -; -; Enter : A = Unit # in D0-D1, Head in D2 -; Return: Nothing -; Uses : AF All other Registers Preserved/Not Affected -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STHDRV: LD (HDR),A ; Save the Combined Head/Drive Byte - PUSH BC ; Save Regs - LD B,A ; and the HDR byte - SRL A ; Move - SRL A ; Head to B0 - LD (HD),A ; and Save - LD A,(ACTIVE) ; Get current Activation Byte - IF FDDMA - AND 11111000B ; keep only motors and DMA Bit - ELSE - AND 11110000B ; If Polled, keep only motors - ENDIF - OR B ; add drive bit - POP BC ; Restore Regs - JP ACTIV8 ; ..exit saving new byte and activating FDC - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; STSECT (Function 3) - Set Sector Number, Sector Size and Last Sector # -; -; Enter : A = Physical Sector Number -; D = Sector Size (0=128, 1=256, 2=512, 3=1024) -; E = Last Physical Sector # on Side -; Return: Nothing -; Uses : AF All other Registers Preserved/Not Affected -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STSECT: LD (SECT),A ; Set Sector Number - LD A,D ; Get sector size - LD (RSZ),A ; save for commands - LD A,E ; Get last sector number - LD (EOT),A ; save in Command Block - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; SPEC (Function 4) - Do a Specify Command, setting Step Rate and Head -; Load/Unload Time. Values are rounded up if not even increments. -; -; Enter : A = Step Rate (in mS; Bit 7 = 1 for 8" drive -; D = Head Unload Time (in mS) -; E = Head Load Time (in mS) -; Return: Nothing -; Uses : AF All other Registers Preserved/Not Affected -; -; Assumes STSIZE called previously to set DRVSPD variable. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -SPEC: PUSH BC ; Save Regs - PUSH DE - AND 7FH ; Strip 8" Bit from Step Rate - -; At 250 kb/s MFM (125 kb/s FM), the times are doubled, so we must -; Divide the delays by two, else leave alone for 500 kb/s - - LD B,A ; Save the Step Rate - LD A,(DRVSPD) ; Get Speed (Data Rate) - OR A ; High Speed? - LD A,B ; (restore Step Rate) - JR NZ,SPEC0 ; ..jump if 500 kb/s (High Density) - - SRL A ; Divide Step Rate by 2 - ADC A,0 ; round Up for partial - SRL D ; Divide Head Unload Time by 2 - JR NC,SPEC11 ; ..jump if No Rounding Corr. - INC D -SPEC11: SRL E ; Divide Head Load Time by 2 - JR NC,SPEC0 ; ..jump if No Rounding Corr. - INC E ; Else Round -SPEC0: NEG ; Get 2's Complement of Step Rate - AND 0FH ; mask - LD B,A ; (save) - LD A,D ; Get Head Unload Time in mS - ADD A,0FH ; force Rounding up - JR C,SPEC00 ; ..jump if Overflow to Max - AND 0F0H ; Keep Time MOD 16 - JR NZ,SPEC3 ; ..jump if Not Zero -SPEC00: LD A,0F0H ; Else go to Maximum allowed -SPEC3: OR B ; Add in Step Rate - RLCA - RLCA - RLCA - RLCA ; Swap Nibbles - LD D,A ; put combined byte back in D - CALL WRDY ; Wait for RQM (hope DIO is Low!), retain Ints - LD A,03H ; Do an FDC Specify Command - OUT (DR),A - CALL WRDY - LD A,D ; first Rate Byte (Step Rate, HUT) - OUT (DR),A - CALL WRDY - LD A,E ; Get Head Load Time - ADD A,A ; Shift rate to B7..1 - IF NOT FDDMA ; (Bit 0 = 0 for DMA) - OR 1 ; Insure Non-DMA Operation - ENDIF - OUT (DR),A - POP DE ; Restore Regs - POP BC - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; RECAL (Function 5) - Recalibrate Drive (moves heads to track 0). -; -; Enter : Nothing -; Return: A = 0 if Ok, NZ if Error. Flags reflect A -; Uses : AF All other Registers Preserved/Not Affected -; -; NOTE: BC Must be preserved by this routine. -; Assumes STHDRV, SPEC, STSIZE and STMODE called first. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -RECAL: LD A,3 ; Give this 3 chances to Home -RECAL1: LD (RETRYS),A - PUSH BC ; Save needed regs - LD BC,2*256+7 ; Two bytes, Recalibrate = 7 - PUSH HL - CALL FDCMD ; execute Recalibrate - POP HL - IF NOT FDDMA - CALL FDCDN ; Clear Pending Ints, Wait for Seek Complete - AND 00010000B ; Homed? (B4=1 if No Trk0 found) - ENDIF - POP BC ; (restore regs) - JR Z,RECOK ; ..jump to Store if Ok - - LD A,(RETRYS) - DEC A ; Any trys left? - JR NZ,RECAL1 ; ..loop if So - DEC A ; Else set Error Flag (0-->FF) - RET - -RECOK: PUSH HL ; Save Regs - CALL IDXTRK ; Point to Current Drive in Track Array - XOR A ; get a Zero - LD (HL),A ; set Drive's Trk to 0 - POP HL ; Restore regs - RET ; and return - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; SEEK (Function 6) - Set the Track for disk operations and seek to it. -; -; Enter : A = Desired Track Number -; D = Verify flag (0=No, FF=Yes) -; E = Double-step Flag (E <> 0 for Double-step) -; Return: A = 0, Zero Flag Set (Z) if Ok, A <> 0 Zero Clear (NZ) if Error -; Uses : AF All other Registers Preserved/Not Affected -; -; Assumes STHDRV, SPEC, STSIZE and STMODE are called first. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -SEEK: LD (TTRK),A ; Save Track to Seek - PUSH HL ; Save Regs used here - PUSH DE - PUSH BC - - CALL IDXTRK ; Point to Current Trk for Selected Drive - CP (HL) ; Is desired Track same as last logged? - JR NZ,SEEKNV ; ..jump if Not Same - INC D ; Else Set to No Verify (FF->0) -SEEKNV: LD A,E ; Get Double-step flag - LD (STEP2),A ; ..and save locally - - LD A,(MXRTRY) ; Get the maximum Count -SEEK1: LD (RETRYS),A ; save remaining Retry Count - LD A,E - OR A ; Double Step? - LD A,(TTRK) ; Restore Track # - JR Z,SEEK2 ; ..jump if No Double Step - ADD A,A ; Else double Track # -SEEK2: LD (TRK),A ; Save the Track # in Comnd Block - LD BC,3*256+0FH ; (3-byte Seek Command = 0FH) - PUSH HL - CALL FDCMD ; Execute the Seek - POP HL - IF FDDMA - OR A ; Insure flags set - ELSE - CALL FDCDN ; Clear Pending Int, wait for Seek Complete - AND 01000000B ; Set NZ if Abnormal Termination - ENDIF - JR NZ,SEEKER ; ..jump if Error Seeking - INC D ; Are we Verifying (FF -> 0)? - DEC D ; (Correct for Test, 0 -> FF) - CALL NZ,READID ; Read next ID Mark if So - JR Z,SEEKX ; ..exit if Ok - -SEEKER: LD A,(RETRYS) ; Else get trys remaining - DEC A ; Any left (80-track could need two)? - JR NZ,SEEK1 ; ..loop to try again if More - DEC A ; Else set Error Flag (0->FF) -SEEKX: LD E,A ; (Save status byte) - LD A,(TTRK) - LD (TRK),A ; Restore "Real" Track Number - JR NZ,SEEKXX ; ..jump if Error - LD (HL),A ; Else update Track in Index -SEEKXX: LD A,E ; Restore Status - OR A ; set flags - POP BC ; Restore Regs - POP DE - POP HL - RET - -;......................................................................... -; Actual Read or Write - -ACTRW: LD HL,(ACTDMA) ; Get actual DMA Addr - LD A,(RDOP) - OR A ; Read operation? - JR Z,SWRITE ; No, must be Write - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; SREAD (Function 7) - Read a Sector from the Floppy Disk. The Mode, -; Head/Drive, Track, and Sector must have already been set. -; -; Enter : HL --> Read Buffer -; Return: A = 0, Zero Set (Z) if Ok, A <> 0, Zero Clear (NZ) if Error. -; Uses : AF,HL. All other Registers Preserved/Not Affected -; -; Assumes STMODE, STHDRV, STSECT, SPEC and SEEK Called First. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -SREAD: LD A,0110B ; Load 765 Read Command (06H) - IF FDDMA - PUSH AF ; Save Command - LD A,11001101B ; Set DMA Direction - ; |||||||+- ? - ; ||||||+-- MOD = Cycle Steal (ignored in I/O) - ; ||||++--- Source = I/O (fixed) - ; ||++----- Dest = Memory (Auto-Inc) - ; ++------- ? - ENDIF - JR RW ; ..and continue below - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; SWRITE (Function 8) - Write a Sector to the Floppy Disk. The Mode, -; Head/Drive, Track, and Sector must have already been set. -; -; Enter : HL --> Write Buffer -; Return: A = 0, Zero Flag Set (Z) if Ok, A <> 0 Zero Clear (NZ) if Errors -; Uses : AF,HL. All other registers Preserved/Not Affected. -; Assumes STMODE, STHDRV, STSECT, SPEC and SEEK Called First. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -SWRITE: LD A,0101B ; Load 765 Write Command (05H) - IF FDDMA - PUSH AF ; Save Command - LD A,11110001B ; Set DMA Direction - ; |||||||+- ? - ; ||||||+-- MOD = Cycle Steal (ignored in I/O) - ; ||||++--- Source = Memory (Auto-Inc) - ; ||++----- Dest = I/O (fixed) - ; ++------- ? -RW: OUT0 (DMODE),A ; Set DMA Channel #0 direction - POP AF ; restore Rd/Wr Comnd - ELSE -RW: - ENDIF ;fddma - PUSH BC ; Save Regs - PUSH DE - IF FDDMA - CALL SFDMA ; Set DMA Transfer Regs - LD HL,MODE ; Pt to Mode Flag - OR (HL) ; add to Command - ELSE - LD C,A ; (Save Command) - LD A,(MODE) ; Get Mode Flag - OR C ; add Read/Write Command to Mode Flag - ENDIF ;fddma - LD C,A ; to Reg - LD B,9 ; Read/Write Comnds are 9 bytes - - LD A,(TSBSCF) ; Get Special Format Flag - OR A ; Special? - JR NZ,RW0 ; ..jump if Not - LD (HD),A ; Else Side 1 coded with Hd # 0 -RW0: LD A,(RSZ) ; Get Sector Size Code - LD (NBYTS),A ; and Set in Comnd Blk - - LD A,(EOT) ; Get Last Sctr # - PUSH AF ; (save for Exit) - LD A,(SECT) ; Get Desired Sector # - LD (EOT),A ; make last to Read only one Sector - - PUSH HL - CALL FDCMD ; Execute Read/Write - POP HL - - POP AF ; Restore Last Sctr # - LD (EOT),A ; to Comnd Blk - LD A,(ST1) ; Get Status Reg 1 - AND 34H ; Return Any Error Bits - POP DE ; Restore Regs - POP BC - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; READID (Function 9) - Read the first Valid Address Mark on a track. -; -; Enter : Nothing -; Return: A = 0 if Ok, NZ if Error. Flags reflect A -; Uses : AF All other Registers Preserved/Not Affected -; -; Assumes STHDRV, SPEC, STSIZE and STMODE called first. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -READID: LD A,(MODE) ; Get Command byte from block - OR 0AH ; or in Command - PUSH BC ; Save regs - LD B,2 ; two bytes in ReadID Command - LD C,A ; move Command to C - PUSH HL - CALL FDCMD ; Activate Controller - POP HL - LD A,(ST1) ; Get Status Reg 1 - AND 25H ; Keep only Error Bits - POP BC ; Restore regs - RET ; ..and quit - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; RETDST (Function 10) - Return the status of a drive. -; This routine reports a "765" Controller type instead of actual number. -; -; Enter : Nothing -; Return: A = Status byte -; BC = 765 (FDC Controller Type) -; HL = Address of Status Byte -; Uses : AF,BC,HL All other Registers Preserved/Not Affected -; -; Assumes STHDRV called first -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -RETDST: - IF FDDMA - CALL WRDY ; Wait for RQM to be Set - LD A,0100B ; Load Return Drive Status Command (04H) - OUT0 (DR),A ; send to FDC - CALL WRDY - LD A,(HDR) ; Get Drive and Head - OUT (DR),A ; send it too - CALL FDCIN0 ; Read Stat at Command End - ELSE - LD BC,2*256+04H ; 2-byte Return Drive Status Command - CALL FDCMD - ENDIF ;fddma - LD HL,ST0 ; Point to Status Byte (Reg 3 contents) - LD A,(HL) ; fetch it - LD BC,765 ; load Controller ID - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; FMTTRK (Function 11) - Format a complete track on one side of a Floppy -; Disk. The Mode, Head/Drive, Track, and Sector must have been set. -; -; NOTE: The contents of the Format Data Block varies between controllers, -; so RETDST should be called to determine the controller type before -; setting up data structures. -; -; Enter : D = Formatting Sctrs/Track value -; E = Formatting Gap 3 Byte Count -; HL = Pointer to Controller-dependent Format Data block -; Return: A = 0, Zero Flag Set (Z) if Ok, A <> 0 Zero Clear (NZ) if Errors -; Uses : All Primary Registers -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -FMTTRK: PUSH DE ; Save for Later - IF FDDMA - LD A,11110001B ; Set DMA Direction - ; |||||||+- ? - ; ||||||+-- MOD = Cycle Steal (ignored in I/O) - ; ||||++--- Source = Memory (Auto-Inc) - ; ||++----- Dest = I/O (fixed) - ; ++------- ? - OUT0 (DMODE),A ; Set DMA Channel #0 direction - LD A,(TPABNK) ; Format Data comes from TPA Bank - IF BANKED - RL H ; Eliminate the MSB of DMA Addr - ADC A,0 ; offset bank # by 32k banks - RRA ; shift Bank LSB to Carry - RR H ; Move Bank # LSB (Carry) to Address MSB - ENDIF ;banked - LD (FDMAB+2),A ; Set the Bank Value - LD (FDMAB),HL ; and DMA Address for Bank in DMA Comnd Block - LD HL,_DMA ; Get DMA IO Port addr - LD (FDMAB+3),HL ; place in DMA Comnd Block - XOR A - LD (FDMAB+5),A ; and Null out rest of Dest - CALL STFDMA ; Set DMA for Format - - ELSE ;~fddma - IF BANKED - LD BC,(TPABNK) ; Get Source and Dest Banks - CALL XMOVE ; set them up - ENDIF - LD DE,HSTBUF ; Move the data to Host Buffer - LD BC,256 ; Two Sector's worth should be enough - CALL MOVE ; and move it - POP DE ; Restore SPT (D) and Gap3 (E) - ENDIF ;~fddma - LD A,(MODE) - OR 1101B ; set command to Format - LD C,A ; and place in Reg - LD HL,TRK - LD A,(RSZ) - LD (HL),A ; Place values in Command Block - INC HL - LD (HL),D - INC HL - LD (HL),E - INC HL - LD (HL),0E5H ; Set byte to write as Data - LD B,6 ; Six bytes in Format Command - IF NOT FDDMA - LD HL,HSTBUF - ENDIF - CALL FDCMD ; Execute ! - LD A,(ST1) ; Get Status - AND 92H ; Return Error bits in A - RET - -;============================================================================= -; FDCMD - Send Command to FDC -; Enter: B = # of Bytes in Command, C = Command Byte -; HL -> Buffer for Read/Write Data (If Needed) -; Exit : AF = Status byte -; Uses : AF,BC - -FDCMD: PUSH HL ; save regs - CALL MOTOR ; Insure motors are On - LD HL,COMND ; Point to Command Block - LD (HL),C ; command passed in C - LD C,DR ; Set Data Port Addr -OTLOOP: CALL WRDY ; Wait for RQM (hoping DIO is Low) (No Ints) - OUTI ; Output Command bytes to FDC - JR NZ,OTLOOP ; ..loop til all bytes sent - - POP HL ; Restore Transfer Addr - DI ; No Ints during IO to avoid data loss -FDCI1: - IF FDDMA - CALL FDCINT ; "Call" the Interrupt handler instead of Int - RET C ; ..quit if Timeout Error (C, A=FF) - LD A,(ST0) ; Else get first byte of Status - AND 0C0H ; check for Normal termination - RET ; ..return w/Error Flags set - ELSE - CALL WRDY - BIT 5,A ; In Execution Phase? - JR Z,FDCRES ; ..jump if Not to check result - BIT 6,A ; Write? - JR NZ,FDCI2 ; ..jump if Not to Read - OUTI ; Else Write a Byte from (HL) to (C) - JR FDCI1 ; and check for next - -FDCI2: INI ; Read a byte from (C) to (HL) - JR FDCI1 ; and check for next - -; Enter the Result Phase of the Command. Gather returned bytes - -FDCRES: EI ; Interrupts Ok now if in Result Phase - LD HL,ST0 ; Point to Status Result area -ISGO: CALL WRDY - BIT 4,A ; End of Status/Result? - RET Z ; ..return if So - BIT 6,A ; Another byte Ready? - RET Z ; ..return if Not - INI ; Else Read Result/Status Byte - JR ISGO ; ..loop for next - -;..... -; Check for Proper Termination of Seek/Recalibrate Actions by -; executing a Check Interrupt Command returning ST0 in A. - -FDCDN: PUSH HL ; Don't alter regs - EI ; (Ints Ok Now) -FDCDN0: CALL WRDY ; Ready? (leave Ints alone) - LD A,08H ; Else Issue Sense Interrupt Status Comnd - OUT0 (DR),A - CALL WRDY - IN0 A,(DR) ; Get first Result Byte (ST0) - LD L,A - CP 80H ; Invalid Command? - JR Z,FDCDN0 ; ..jump to exit if So - CALL WRDY - IN0 A,(DR) ; Read Second Result Byte (Trk #) - LD A,L - BIT 5,A ; Command Complete? - JR Z,FDCDN0 ; ..loop if Not - POP HL - RET - ENDIF ;~fddma - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; MOTOR CONTROL. This routine performs final selection of the drive control -; latch and determines if the Motors are already spinning. If they are off -; and Motor control is needed, then the Motors are activated and the spinup -; delay time in tenths-of-seconds is performed before returning. -; -; Enter : Command byte in A -; Return: Head Delay bit set in Command in A if needed -; Uses : None. All Registers Preserved/Not Affected - -MOTOR: PUSH AF ; Save Reg - LD A,(FDMOT) - OR A ; Need Motor? - JR Z,MOTORX ; ..jump to exit if Not - - LD A,(MOTIM) ; Get remaining seconds - OR A ; Already On? - LD A,(MONTIM) ; (get Default On Time) - LD (MOTIM),A ; always reset - EI ; Insure Ints are Active - JR NZ,MOTORX ; ..exit if Motors On..they will stay On - - LD A,(HDR) ; Get current Drive - IF FDDMA - OR 11111100B ; Set All Motors and DMA On, Cntrlr Active - ELSE - OR 11110100B ; Set All Motors On, DMA Off, Cntrlr Active - ENDIF - CALL ACTIV8 ; Do It! - LD A,(SPINUP) ; Get Spinup Time - LD (MTM),A ; to GP Counter -MOTOLP: LD A,(MTM) - OR A ; Up to Speed? - JR NZ,MOTOLP ; ..loop if Not -MOTORX: POP AF ; Restore Reg - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Hardware-Dependent Host Read/Write Routine linked to from FLOPPY module. -; This routine Reads/Writes data from HSTBUF trying up to MXRTRY times -; before giving up. If an error occurs after the next-to-last try, the -; heads are homed to force a re-seek. -; -; Enter: (RDOP Set for desired operation) -; Exit : A = 0, Zero Set if Ok, A <> 0, Zero Reset if Errors -; Uses : AF,HL -; -; RDOP is set to 1 for Read, 0 for Write, TTRK set with desired Track -; number, STHDRV, STSECT, STMODE, SPEC all called previously. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -FHDRW: LD HL,HSTBUF ; Point to the host buffer - LD (ACTDMA),HL ; and set Memory Pointer - - LD (FRWSTK),SP - LD SP,FRWSTK ; Use Local Stack - LD A,(MXRTRY) ; Get the maximum retry count -RWF2: LD (RWRTRY),A - PUSH DE ; (Save Regs) - LD A,(STEP2) ; Get double-Step flag - LD E,A - LD D,0FFH ; (Verify needed) - LD A,(TTRK) ; and track - CALL SEEK ; Try to seek to the desired track - POP DE ; (Restore Regs) - CALL Z,ACTRW ; Call R/W if Seek succeeded - LD (ERFLAG),A ; Save error code in any case - JR Z,FHDRX ; ..jump to return if No Errors - - LD A,(RWRTRY) ; Get retry count - CP 2 ; Are we on Next to last try? - CALL Z,RECAL ; Return to Track 0 if so - LD A,(RWRTRY) ; and re-fetch try count - DEC A ; Do we have more retries left? - JR NZ,RWF2 ; ..jump to try again if more tries remain - - CALL ERROR ; Else print Error Bios Message -FHDRX: LD SP,(FRWSTK) ; Restore Entry Stack - RET ; and Exit - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Gap 3 Length Table -; Index is: ((Drive_Factor * 8) + (MFM * 4) + RSZ) - 8 -; Where Drive_Factor is based on Size and Speed as: -; 5.25"/3.5" Low Speed = 1 -; 8" (Speed Ignored) = 2 -; 3.5" High-Density Disks use special GAP3 Table, while 5.25" High- -; Density disks use 8" DD GAP3 values. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; 5.25"/3.5" Single-Density GAP3. 300 rpm, 125 kbps, FM - -FM5G3: DEFB 7 ; 128 - DEFB 5 ; 256 - DEFB 20 ; 512 - DEFB 27 ; 1024 - -; 5.25"/3.5" Double-Density GAP3. 300 rpm, 250 kbps, MFM - - DEFB 0 ; 128 - DEFB 9 ; 256 - DEFB 13 ; 512 - DEFB 27 ; 1024 - -; 8" Single-Density / 5.25" High-Speed GAP3. 360 rpm, 250 kbps, FM - - DEFB 7 ; 128 - DEFB 5 ; 256 - DEFB 27 ; 512 - DEFB 27 ; 1024 - -; 8" Double-Density / 5.25" High-Speed GAP3. 360 rpm, 500 kbps, MFM - -GAP5HD: DEFB 0 ; 128 - DEFB 15 ; 256 - DEFB 11 ; 512 - DEFB 17 ; 1024 - -; 3.5" Hi-Density GAP3. 300 rpm, 500 kbps, MFM - -GAP3HD: DEFB 0 ; 128 - DEFB 27 ; 256 - DEFB 27 ; 512 - DEFB 17 ; 1024 (27 if 10 spt) - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Error Printing Routine. This routine prints Error messages from the -; High-level Sector Read/Write routine when detected based on various -; parameters in the BIOS. -; Entering a Control-C after the message will cause a warm boot, anything -; else will ignore the error and return status to the caller. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -ERROR: - IF BIOERM - PUSH BC - PUSH DE - CALL PRINT - DEFB BELL,CR,LF - DEFC 'FDC Error, U' - LD A,(HDR) ; Get unit number - AND 3 - CALL PDEC ; ..in decimal - CALL PRINT - DEFC ' ' - - LD A,(COMND) ; Get the command byte - AND 3FH ; Else Mask Command - CP 0FH ; 765 type Seek? - JR NZ,ERR0 ; ..jump if Not - - CALL PRINT - DEFC 'Seek' - JR ERR4 - -ERR0: CP 05H ; 765 type Write? - JR NZ,ERR1 ; ..jump if Not - CALL PRINT - DEFC 'Wr' - JR ERR4 - -ERR1: CP 06H ; 765 type Read? - JR NZ,ERR2 ; ..jump if Not - CALL PRINT - DEFC 'Rd' - JR ERR4 - -ERR2: CALL PRINT - DEFC 'Comnd = ' - LD A,(COMND) - CALL PHEX - -ERR4: CALL PRINT - DEFC ', ' - LD HL,ST0 ; Point to Status Bytes - BIT 7,(HL) ; Abnormal Termination? - JR Z,ERR5 - CALL PRINT - DEFC 'AT' - JR ERR13 - -ERR5: BIT 4,(HL) ; Equipment Check? - JR Z,ERR6 - CALL PRINT - DEFC 'EC' - JR ERR13 - -ERR6: BIT 3,(HL) ; Not Ready? - JR Z,ERR7 - CALL PRINT - DEFC 'NR' - JR ERR13 - -ERR7: INC HL ; Point to ST1 - BIT 5,(HL) ; Data Error? - JR Z,ERR8 - CALL PRINT - DEFC 'DE' -ERR8: BIT 2,(HL) ; No Data? - JR Z,ERR9 - CALL PRINT - DEFC ' ND' -ERR9: BIT 1,(HL) ; Write Protect? - JR Z,ERR10 - CALL PRINT - DEFC ' NW' -ERR10: BIT 0,(HL) ; Missing Address Mark? - JR Z,ERR11 - CALL PRINT - DEFC ' MA' -ERR11: INC HL ; Point to ST2 - BIT 4,(HL) ; Wrong Cylinder? - JR Z,ERR12 - CALL PRINT - DEFC ' WC' -ERR12: CALL PRINT - DEFC ' (T=' - LD A,(TTRK) ; Get Track (Cyl) - CALL PDEC ; Print cylinder (track) - CALL PRINT - DEFC ' H=' - LD A,(HDR) - RRCA - RRCA - AND 0001B - CALL PDEC ; Print head - CALL PRINT - DEFC ' S=' - LD A,(SECT) - CALL PDEC ; Print sector - CALL PRINT - DEFC ')' - -ERR13: POP DE ; Restore Regs - POP BC - CALL CONIN ; Wait for any key - SUB 3 ; ^C (reboot)? - PUSH AF - CALL PRINT - DEFB CR,LF+80H ; Always echo crlf - POP AF - LD A,0FFH - RET NZ ; ..Return Bad Status if Not user abort - IF BANKED - JP ABORT - ELSE - RST 0 ; Vector thru loc 0 so wboot may be - ENDIF ; Intercepted by NZCOM, BGii, etc. - -;..... -; Print value in A as a Decimal number (0-99) - -PDEC: LD DE,10 ; We work in decimal -PD0: INC D - SUB E - JR NC,PD0 - LD E,A - LD A,D - DEC A ; Is the first digit a Zero? - JR Z,PD1 ; ..jump if so and Don't Print - ADD A,'0' - CALL OUTCHR -PD1: LD A,E - ADD A,'0'+10 - JR OUTCHR - -;..... -; Print value in A as two Hex digits - -PHEX: PUSH AF ; Print value in A as 2 Hex digits - RRCA - RRCA - RRCA - RRCA - CALL PHEX0 - POP AF -PHEX0: AND 0FH - ADD A,90H - DAA - ADC A,40H - DAA - ;..if Bioerm, fall thru to Outchr.. - ELSE - OR 0FFH ; Insure NZ - RET - ENDIF ;Bioerm - -OUTCHR: PUSH HL ; Print char in A to Console - PUSH DE - PUSH BC - LD C,A - CALL CONOUT - POP BC - POP DE - POP HL - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Point to Last Track Storage Location for the Current Drive -; Enter: None -; Exit : HL -> Last track storage for this drive -; Uses : HL - -IDXTRK: PUSH AF ; Save regs - LD A,(HDR) ; Get current drive/head - AND 0011B ; mask off head - LD HL,TRKARY ; Point to track storage block - CALL ADDAHL ; Point to the byte - POP AF ; restore regs - RET ; and return to caller - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Wait for FDC RQM to become Ready, and return DIO status in Zero Flag -; Pause before reading status port based on CPU Speed and Data Rate. - -WRDY: LD A,(DLYCNT) ; Get computed delay count -WRDY0: DEC A ; Done? - JR NZ,WRDY0 ; ..loop if Not -WRDYL: IN A,(MSR) ; Read Main Status Register - BIT 7,A ; Interrupt Present? - RET NZ ; Return if So - JR WRDYL ; Else Loop - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; D M A S U P P O R T R O U T I N E S -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - IF FDDMA -; Set DMA Channel #0 for Format - -STFDMA: PUSH AF ; Save regs - XOR A - OUT0 (DSTAT),A ; (No DMA or Interrupts) - LD L,D ; Get SPT value - LD H,0 ; extend to Word value - LD B,2 ; Multiply by 4 for Number of bytes -STDMA2: ADD HL,HL ; * 2 -STDMA3: DJNZ STDMA2 ; ..looping til done - LD (FDMAB+6),HL ; Save Number of bytes to transfer - LD HL,FDMAB ; Point to DMA Control block - LD BC,8*256+SAR0L ; 8 bytes from (HL).. - OTIMR ; to DMA Ch #0 Registers - LD A,01100011B ; Enable DMA on Ch #0 - ; |||||||+- DME - ; ||||||+-- ? - ; ||||++--- DMA Ints (Ch1, Ch0) - ; ||++----- Bit Write En * (Ch1, Ch0) - ; ++------- DMA Enable (Ch1, Ch0) - OUT0 (DSTAT),A ; Command! - POP AF ; Restore regs - RET - -;..... -; SFDMA - Set up DMA Channel #0 for Read/Write Operation. -; Number of sectors in Reg E is multiplied by Base Sector size to obtain -; the full number of bytes to transfer. -; Enter: HL -> Read/Write Buffer -; A = Read/Write Command - -SFDMA: PUSH AF ; Save Rd/Wr Command - XOR A - OUT0 (DSTAT),A ; Disable DMA/DMA Ints - IF BANKED - LD A,(SYSBNK) ; Set System Bank # - ELSE - LD A,(TPABNK) ; If Not Banked, Load TPA Bank # - ENDIF - RL H ; Place Address MSB in Carry - ADC A,0 ; offset Bank # by 32k banks - RRA ; shift Bank LSB to Carry - RR H ; Move Bank # LSB (Carry) to Addr MSB - LD C,A ; Save Bank # - LD DE,_DMA ; Get Floppy DMA IO Port Address - LD B,0 ; and Dummy Bank # - POP AF - PUSH AF ; Restore Rd/Wr Command - AND 00001111B ; keeping only low nibble - CP 0101B ; Write? - JR Z,SFDMA0 ; ..jump if So; CHL = Source, BDE = Dest - EX DE,HL ; Else - LD A,B ; Swap Source - LD B,C ; w/Dest - LD C,A -SFDMA0: LD (FDMAB),HL ; Save Source - LD A,C ; in Block - LD (FDMAB+2),A - LD (FDMAB+3),DE ; and Dest - LD A,B - LD (FDMAB+5),A - LD HL,0080H ; Set 1 Logical Sector Size for Calcs - LD A,(RSZ) ; Get Physical Sector Size (in 128-byte recs) - LD B,A - INC B ; (compensate for first DJNZ) - JR STDMA3 ; ..compute, set and activate - ENDIF ;fddma - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; FDCINT - Used in the P112 as a polled routine in default configuration -; with Interrupts disabled. This code is assembled if the FDDMA equate -; is set TRUE. If your system uses Interrupts, add any additional code -; to save Stack pointer and AF, and insure that it is in the CODE segment. -; NOTE: that the service routine MUST be in the Common Memory if Interrupts -; (instead of polling ) are used to prevent problems when banked. -; -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -;;-- CSEG - IF FDDMA -FDCINT: ; Set local stack if Needed, Disable Interrupts for local calls - PUSH BC - PUSH DE - PUSH HL - LD BC,0000 ; Inner loop timeout - LD D,30 ; Outer loop timeout - LD HL,ST0 ; Point to Status Area -Int00: IN0 A,(DRC) ; Read Port C - BIT 6,A ; Int1* active? - JR Z,Int01 ; ..jump if So - DEC BC ; Else count down - LD A,B - OR C - JR NZ,Int00 ; ..loop if Not timed out - DEC D ; Outer loop done? - JR NZ,Int00 ; ..loop if Not - SUB 1 ; Else set Carry, A=FF - LD (ST1),A ; Save Bad Status - CALL FDRst ; Reset the Controller - JR Int0X ; ..and Quit - -Int01: LD BC,DR ; Else Point BC to Data Port - CALL WRDYw0 - JR C,Int03 ; ..jump if Timeout -Int02: CALL WRDY - BIT 6,A ; Result phase over? - JR Z,Int03 ; ..jump if So to Exit - INI ; Read a byte from (C) to (HL) - INC B ; (correct B for above dec) - JR Int02 ; and check for next - -Int03: CALL WRDY - LD A,08H ; Sense Interrupt Status Comnd - OUT (DR),A - CALL WRDY - IN A,(DR) ; Get first Result Byte (ST0) - CP 80H ; Invalid Command? - JR Z,Int0X ; ..jump to exit if So - LD (ST0),A ; Else save Status Byte 0 - CALL WRDY - IN A,(DR) ; Read Second Result Byte (Trk #) - JR Int03 ; ..and loop - -Int0X: POP HL ; Restore Regs - POP DE - POP BC - ; Restore Stack if Needed - EI ; Insure Interrupts are Enabled - RET - -;..... -; Alternate entry for code that generates no "Interrupt" - -FDCIN0: PUSH BC ; Save regs - PUSH DE - PUSH HL - LD HL,ST0 ; Put Status bytes here - JR Int01 ; ..and continue mainline code - ENDIF ;fddma - -; Wait for Interrupt maintaining watchdog timer - -WRDYw0: PUSH BC ; Save Regs - LD BC,0 ; Set Maximum count -WRDYw1: IN A,(MSR) ; Get Status - RLA ; Int bit to Carry - JR C,WRDYw2 ; ..quit if Int - DEC BC ; Else count down - LD A,B - OR C ; Timed Out? - JR NZ,WRDYw1 ; ..loop if Not - CALL FDRst ; Else Reset Controller -WRDYw2: CCF ; Set Carry appropriately - POP BC ; restore regs - RET - -;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CSEG ;*** Remainder of Code MUST be in Main Memory *** - -;======================================================================== -; Reset the Floppy Disk Controller. Called from CBOOT in case of Hard -; Disk Boot which leaves the controller in a "hung" state, and locally -; if the Controller times out (often due to changing diskettes). - -FDRst: PUSH AF ; Save any status - XOR A - OUT (DCR),A ; Place Controller in Reset state - LD A,(ACTIVE) ; get current settings - AND 0FCH ; keep only motors, DMA and Ready - OUT (DCR),A ; and Restore - POP AF ; Restore Status - RET - -;======================================================================== -; Motor Off routine. Called from TIM-DX and SELFLP2 which forces -; Motors/Timer to be Off state so spinup delay is forced on next selection. - -;;ChgSpd: ; <<-- Required label for SELFLP2. Activate - ; label here if switching motor speed -MOTOFF: XOR A - LD (MOTIM),A ; Insure Motors Timed Out and show OFF - LD A,(ACTIVE) ; Get current settings - IF FDDMA ; - AND 00001111B ; strip of Motor bits - ELSE - AND 00000111B ; strip off Motor bits and DMA - ENDIF -ACTIV8: OR 00000100B ; (insure FDC out of Reset) - LD (ACTIVE),A ; save - OUT (DCR),A ; and Command! -ChgSpd: RET ; <<-- Activate label here if using 300 kb - ; for constant 360 rpm on 5.25" Drives - -;======================== RAM Storage Area ============================== - - IF BANKED - COMMON /B2RAM/ ; If banked, Local stack in Bank - ELSE - DSEG ; ..otherwise in Data Segment - ENDIF ; - - DEFS 30 ; Bios R/W Entry 15-level Local Stack -FRWSTK: DEFS 2 ; Storage for Entry Stack Pointer - - DSEG ; Place in Common memory - -; Add storage for DMA Control Block if using DMA Transfers - IF FDDMA -FDMAB: DEFS 2 ; Source Addr (16-bits) - DEFS 1 ; Source Bank - DEFS 2 ; Dest Addr (16-bits) - DEFS 1 ; Dest Bank - DEFS 2 ; Byte Count of transfer - ENDIF ;fddma - -; NOTE: Variables listed as (** Global **) are accessed by other modules and -; MUST exist as defined. - -COMND: DEFS 1 ; Storage for Command in execution -HDR: DEFS 1 ; Head (B2), Drive (B0,1) (** Global **) -TRK: DEFS 1 ; Track (t) -HD: DEFS 1 ; Head # (h) -SECT: DEFS 1 ; Physical Sector Number -NBYTS: DEFS 1 ; Bytes/Sector (n) -EOT: DEFS 1 ; End-of-Track Sect # -GPL: DEFS 1 ; Gap Length -DTL: DEFS 1 ; Data Length - -RSZ: DEFS 1 ; Bytes/Sector. Must be placed outside of the - ; Comnd Blk for FMTTRK to work. -; FDC Operation Result Storage Area - -ST0: DEFS 1 ; Status Byte 0 -ST1: DEFS 1 ; Status Byte 1 (can also be PCN) -ST2: DEFS 1 ; Status Byte 2 -RC: DEFS 1 ; Track # (** Global **) -RH: DEFS 1 ; Head # (0/1) -RR: DEFS 1 ; Sector # (** Global **) -RN: DEFS 1 ; Sector Size (** Global **) - -ACTDMA: DEFS 2 ; 16-bit DMA Address - -;-->>> Do NOT re-order the following two bytes !! <<<-- - -MTM: DEFS 1 ; Floppy Time down-counter -MOTIM: DEFS 1 ; Motor On Time Counter - -; DISK Subsystem Variable Storage - -FDMOT: DEFS 1 ; Motor on required flag -RDOP: DEFS 1 ; Read/write flag -RETRYS: DEFS 1 ; Number of times to try Opns -RWRTRY: DEFS 1 ; Number of read/write tries -DRVSPD: DEFS 1 ; Drive Speed -DRVSIZ: DEFS 1 ; Drive Size -STEP2: DEFS 1 ; <> 0 for Double Step (** Global **) -MODE: DEFS 1 ; Bit 6 = 1 if MFM, 0 = FM -ACTIVE: DEFS 1 ; Current bits written to Dev Contr Reg (DCR) -DLYCNT: DEFS 1 ; Delay value reading Main Status Reg -FSPT: DEFS 1 ; Format Sectors/Track value -TSBSCF: DEFS 1 ; 0=Hd always 0 (TSBSC) (** Global **) - -TTRK: DEFS 1 ; Storage for Track (** Global **) -TRKARY: DEFS 4 ; Track storage locations for four drives - -;=========================== End of FDC-DX ============================== - \ No newline at end of file diff --git a/Source/BPBIOS/fdc-ww.z80 b/Source/BPBIOS/fdc-ww.z80 index 2def4ed6..69b6ce80 100644 --- a/Source/BPBIOS/fdc-ww.z80 +++ b/Source/BPBIOS/fdc-ww.z80 @@ -1,14 +1,26 @@ ;::::::::::::::::::::::::::::::::::::::::::::****************************** ; Floppy Disk Routines ***** Hardware Dependent ***** -; - D-X Designs Pty Ltd P112 - ****************************** +; - Retro-Brew Hardware with HBIOS - ****************************** ; +; 1.4 - 27 Mar 14 - Initial N8VEM test release WW+LN ; 1.3 - 26 Aug 01 - Cleaned up for GPL Release. HFB ; 1.2c- 12 May 97 - Cleaned up source, modified STSIZE Code (again). HFB ; 1.2b- 22 Apr 97 - Changed 5.25" Hi/Lo Speed controls. HFB ; 1.0a- 23 Mar 97 - (test) fixes. HFB ; 1.0 - 13 Aug 96 - Initial Release for P112 from YASMIO. HFB ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; +; Floppy Units are accessed on Retro-Brew systems using HBIOS function +; calls. These functions include read, write, status and media type. +; For 3.5" drive there are two media types. For 5.25" drive two media +; types are supported, while for 8" drives one type is supported. +; Only high density is supported on 3.5" drives either single or double +; sided. For 5.25" drive either double or high density is supported on +; double sided disks. Only double density double sided 8" disks are +; supported. Many BPBIOS floppy routines are stubbed such as DMA support +; and motor control since all these details are handled behind the scene by +; HBIOS. Currently HBIOS handles the head given the track and sector so +; the interface treats all floppies as single sided. + IF BANKED COMMON /BANK2/ ELSE @@ -248,7 +260,7 @@ FDRst: CALL PANIC RET ;======================================================================== -; Motor Off routine. Called from TIM-DX and SELFLP2 which forces +; Motor Off routine. Called from SELFLP2 which forces ; Motors/Timer to be Off state so spinup delay is forced on next selection. MOTOFF: CALL PANIC @@ -302,4 +314,5 @@ TSBSCF: DEFS 1 ; 0=Hd always 0 (TSBSC) (** Global **) TTRK: DEFS 1 ; Storage for Track (** Global **) ;TRKARY: DEFS 4 ; Track storage locations for four drives -;=========================== End of FDC-DX ============================== +;=========================== End of FDC-WW ============================== + \ No newline at end of file diff --git a/Source/BPBIOS/hard-ww.z80 b/Source/BPBIOS/hard-ww.z80 index 1b52f009..2f4d2140 100644 --- a/Source/BPBIOS/hard-ww.z80 +++ b/Source/BPBIOS/hard-ww.z80 @@ -1,19 +1,37 @@ ;::::::::::::::::::::::::::::::::::::::::::::::::************************** -; Hard disk routines as implemented for the ** Hardware Dependent ** -; D-X Designs Pty Ltd P112 via an external ** for exact interface ** -; NCR/National 5380 Controller. These routines ************************** -; may be assembled to use Polled or DMA (no Interrupt) transfers without -; Arbitration depending on an equate in the DEF-DX.LIB assembly definition -; file. Direct driver IO routines to Select (SELHD), Read (HDREAD) and -; Write (HDWRIT) are all included here. Thanks to Terry Hazen for -; debugging the polled code while working on the YASBEC and Ampro versions. +; Hard disk routines as implemented for ** Hardware Dependent ** +; Retro-Brew Hardware with HBIOS. ** for exact interface ** +; Uses HBIOS disk routines for all HD access ************************** +;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +; This file uses modifications of the definitions in ICFG-xx to reflect +; Physical and/or logical definitions for HBIOS drives. A controller type of +; 8xH signifies IDE/ATA drives, in which case the Drive byte at HDRVx is: +; 7 6 5 4 3 2 1 0 +; | | | | | +-+-+- Unit Number (0-7) +; | | | | +------- (reserved) +; | | | +--------- 1 = Active, 0 = Inactive +; +-+-+----------- (reserved) +; Additionally, the first byte of the Reduced Write Cylinder word is re- +; defined to be the number of physical/logical Sectors-Per-Track. +; Uses HBIOS disk routines for all HD access. Direct BIOS disk access +; in not implemented. +; These parameters are used to convert the Track & 16 Sector/Track format +; assumed in the B/P Bios definitions for Hard Drives into Track/Sector/Head +; Sector Number needed for HBIOS Disk accesses. Direct driver IO routines +; to Select (SELHD), Read (HDREAD) and Write (HDWRIT) are all included here. ;-------------------------------------------------------------------------- -; 1.3 - 22 Aug 01 - Cleaned source for GPL Release. HFB -; 1.2a- 15 Sep 97 - Corrected Data saves for Direct Device IO when +; 1.8 - 06 Feb 20 - Updated for HBIOS version 2.9.2 WW +; 1.7 - 28 Nov 16 - Updated for HBIOS version 2.8 WW +; 1.6 - 20 Jan 14 - Initial N8VEM test release WW+LWN +; 1.5 - 31 May 12 - Added ability to handle two IDE devices LN +; 1.4 - 12 Dec 07 - Initial Test LabZ80 Release LN +; 1.3 - 26 Aug 01 - Cleaned up source and included fixes from SCSI. HFB +; 1.2 - 15 Sep 97 - Corrected Data saves for Direct Device IO when ; flushing to/from other SCSI units, added Busy tests. HFB -; 1.2 - 17 Jul 96 - Initial P112 integration, deleted Xebec 1410/Shugart +; 1.1 - 28 Jun 97 - Added Home Drive, Retry Disable bit handling. HFB +; 1.0 - 17 Jul 96 - Initial P112 integration, deleted Xebec 1410/Shugart ; 1610-3 driver, selectable Polled/DMA modes. HFB -; 1.1 - 28 May 93 - Fixed Access to fast drives. JTH +; 0.1 - 28 May 93 - Fixed Access to fast drives. JTH ; 0.0 - 9 Jul 91 - Initial Test Release HFB ;*************************************************************************** @@ -24,157 +42,28 @@ ENDIF ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 0 - Set User Data Area Adress for Direct SCSI IO, Return -; Number of Bytes in the SCSI driver Command Block +; Function 0 - Set User Data Area Address for Direct Disk IO, Return +; Number of Bytes in the driver Command Block (SCSI-"like") +; For IDE, a minimum of 6 Bytes is needed (Comnd,Trk(2),Sctr,Head,Drive) +; ***** direct disk IO no longer supported - so this function is not +; implemented ***** ; Enter: DE = Address of User Data Area -; Exit : A = Number of bytes available in the SCSI Command Block +; Exit : A = Number of bytes available in the Command Block ; Uses : A,HL ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -HDVALS: LD (DATADR),DE ; Save the Users Data Area - LD A,CMDSIZ +HDVALS: CALL PANIC ; NOT IMPLEMENTED!!!! RET ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 1 - Set Physical Device bit and Logical Unit Number in SCSI -; Command Block (Byte 1, bits 7-5) from byte in A -; Enter: A = Device Byte (See ICFG-xx.Z80) -; Exit : A = Physical Device Bit of selected drive +; Function 1 - Set Unit # and dev/unit in Command Block from A - return +; unit # in A +; Enter: A = Drive Byte +; Exit : A = Unit # ; Uses : AF ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -HDSlct: LD (xUnit),A ; Save Dev/LUN byte for later - RET - -HDSlc0: PUSH BC ; Save regs - LD C,A ; and entry byte - AND 0E0H ; Mask off all but Logical Unit Number - LD (LUNSAV),A ; and save for execution - LD A,C ; Get byte back - AND 07H ; keeping only Physical Device bits - LD B,A ; Prepare for bit rotation - INC B ; by bumping count for initial value - XOR A ; Start with 0 byte - SCF ; and 1 bit in Carry -HDSLCZ: RLA ; Rotate bit around thru Carry - DJNZ HDSLCZ ; ..until properly positioned - LD (HDEVIC),A ; Save for future operations - POP BC ; Restore regs - RET - -;========================================================================= -; Select Hard Disk (SCSI Device and Unit) < Internal Bios routine > - -SELHD: LD A,(SEKPDN) ; Load Device and Unit # to select -SELHDA: LD C,A ; position for calculations - LD B,HDRV1-HDRV0 ; with size - MLT BC ; Calculate offset into table - LD HL,HDRV0 ; from first Physical drive - ADD HL,BC - LD A,(HL) ; Fetch Device/LUN byte - ld (iUnit),a ; save as internal unit # - CALL HDSlc0 ; setting variables for Device and LUN - CALL HDINIT ; Do the actual initialization - JP NZ,SELERR ; ..return Error if Bad - JP SETPARMS ; Else set parameters for DPH/DPB - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Initialize Xebec 1410/Shugart 1610-3 Controller for appropriate -; Drive Specs. Does Nothing if Owl, Adaptec or SCSI. -; <<-- Returns Error for Xebec/Shugart...deleted in 1.2. -->> -; Enter: HL -> Configuration block for desired drive (see ICFG-xx) -; Exit : A = 0, Zero Set (Z) if Ok, A <> 0, Zero Clear (NZ) if Error -; Uses : AF,BC,DE,HL -; NOTE : This routine uses the Physical drive parameters contained -; in ICFG-xx to determine some of the parameters. -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HDINIT: LD A,(CNTRLR) ; Set Controller type - CP 2 ; Is it Xebec 1410/Shugart 1610-3? - JR NZ,HDINIS ; ..jump if Not to return Ok - DEFB 0F6H ; Fall thru w/"OR 0AFH" and return Error -HDINIS: XOR A ; Else signify this was done Ok - RET ; ..and quit - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Write to SCSI Hard Disk Drive < Internal BIOS Routine > -; Writes from HSTBUF using HSTTRK and HSTSEC to build Block Number. -; NOTE: This routine uses physical drive characteristics from ICFG-xx. - -HDWRIT: XOR A - LD (HSTWRT),A ; Show No pending Write - - LD A,0AH ; Set the SCSI Write Command - DEFB 11H ; ..trash DE, fall thru to save - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Read from SCSI Hard Disk Drive < Internal BIOS Routine > -; Reads to HSTBUF using HSTTRK and HSTSEC to build Block Number. -; NOTE: This routine uses physical drive characteristics from ICFG-xx. - -HDREAD: LD A,08H ; Set the SCSI Read Command - LD (HDCOMD),A ; save command in CDB - LD HL,(HSTDPH) ; Get pointer to desired DPH - DEC HL ; back up to Device # - LD A,(HL) ; and fetch - CALL SELHDA ; Select this device from A-Reg - - LD DE,HDCOMD+1 ; Point to second byte of Command Block - LD BC,4*256+0 ; Count = 4, MSB of Block # = 0 - LD HL,(HSTTRK) ; Get requested track -MUL16: ADD HL,HL ; Multiply C,H,L by 16 for 21-bit block # - RL C ; shifting overflow bit to C - DJNZ MUL16 ; ..and looping til * 16 - LD A,(DE) ; Get LUN/High Address - AND 11100000B ; keep only LUN - OR C ; and add in High 5 bits of Block # - LD (DE),A ; Store back in LUN/High Address - INC DE ; Pt to next - LD A,H ; Get middle Block # - LD (DE),A ; and save - INC DE ; Pt to next - LD A,(HSTSEC) ; Get Logical Host Sector # (4-bits) - ADD A,L ; add in Hi 4-bits of low Block # - LD (DE),A ; save lowest 8 bits of Block # - INC DE ; Pt to next - LD A,1 - LD (DE),A ; Set HDSIZ for 1 block - INC DE ; Pt to next - -; NOTE: Support for Xebec 1410/Shugart 1610-3 removed. They required a -; step rate byte to be stored at this point. - - XOR A ; Get a Zero - LD (DE),A ; Set in Command Block - -; Set Physical/Logical Unit numbers just prior to accessing the Drive - - LD A,(iUnit) ; Get internal unit data - CALL HDSlc0 ; set variables for Device and LUN - -; Try the Command specified. If errors returned (e.g. Attn assertion), -; read the SCSI Sense status and try the command again. - -RWSCSI: CALL HDRW0 ; Try a Normal Data Access - RET Z ; ..exitting if Ok - LD HL,sense ; Set Ptr to Sense Command Block - LD DE,snsDat ; and Sense Data Poiner - CALL HDRW1 ; Try a Sense Read, following thru to Dat Rd -HDRW0: LD DE,HSTBUF ; and Data Pointer for Normal Accesses -STSCSI: LD HL,HDCOMD ; Set Command Block Address -HDRW1: LD (HDCMDV),HL ; Save Command Block Address - LD (HDDATV),DE ; and Data Area Pointer - IF NOWAIT ; If Wait States not desired.. - IN0 A,(DCNTL) ; Get current settings - LD (WTSAVE),A ; save for exit - AND 11001111B ; Keep everything but IO Waits - OUT0 (DCNTL),A ; and set to No IO Wait States - ENDIF ;nowait - ;..fall thru to change phases on the SCSI bus - - CALL SCSI ; Do the Work - AND 00000010B ; Any errors? - LD (ERFLAG),A ; save resulting status here +HDSLCT: CALL PANIC ; NOT IMPLEMENTED!!!! RET ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -197,424 +86,136 @@ HDRW1: LD (HDCMDV),HL ; Save Command Block Address ; set the data transfer source/dest address and logical & physical drive. ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -HD_RW: PUSH AF ; Save User Data Flag - PUSH DE ; and ptr to User's CDB - CALL FLUSH ; Insure Host Buffer is Free - POP HL ; restore User CDB ptr to HL for move - IF BANKED - CALL SHDBNK ; Load Banks for transfer to System fm User - CALL XMOVE ; and Set - ENDIF ;Banked - LD DE,HDCOMD - LD BC,CMDSIZ ; Move Command Descriptor Block - CALL MOVE ; into SCSI Command area (6-12 bytes) - POP AF ; Restore Flag - OR A ; Any User data to write? - JR Z,DOSCS0 ; ..bypass move if not - IF BANKED - CALL SHDBNK ; Load for move from User's to System Banks - CALL XMOVE ; and Set - ENDIF ;Banked - CALL HDDMOV ; Set to move 512 bytes from User to Hstbuf - CALL MOVE ; Do It! -DOSCS0: LD A,(xUnit) ; Get External Device data - CALL HDSlc0 ; set variables for Device & LUN - - CALL RWSCSI ; Set Data Addr and do the operation - IF BANKED - CALL SHDBNK ; Load Bank Numbers - LD A,B ; Swap - LD B,C ; Source - LD C,A ; and Destination Banks - CALL XMOVE ; Set Source/Dest - ENDIF ;Banked - PUSH HL ; Save Status and Message bytes - CALL HDDMOV ; set Addresses and Length - EX DE,HL ; write back to User's area - CALL MOVE ; move without affecting status in A - POP HL ; Restore Status and Message bytes - LD A,L ; Load Status byte for checks - AND 1010B ; keeping only Check (3) and Busy (1) Bits - RET ; ..and quit - -;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -; Raw SCSI Driver - -SCSI: - IF HDDMA - LD (DATPTR),DE ; Save Pointer to Data Area - ENDIF - LD HL,LUNSAV ; Address LUN storage location - LD A,(HDUNIT) ; Get LUN/HiBlock byte from Command Blk - AND 1FH ; Strip off old LUN - OR (HL) ; add in New LUN - LD (HDUNIT),A ; save new byte - XOR A - OUT0 (NCRCMD),A ;1.1 Clear any previous Controller status - OUT0 (NCRMOD),A ;1.1 no Mode settings - OUT0 (NCRTGT),A ;1.1 nothing asserted - - IF HDDMA - DEC A ; 0 --> FF - LD (STATUS),A ; Set Initial timeout status - IN0 A,(NCRINT) ; Clear interrupts & Error Bits - ENDIF - - LD A,(HDEVIC) ; Get the Target Device address bit - OR 10000000B ; add Host initiator address bit - OUT0 (NCRDAT),A - IN0 A,(NCRCMD) ; Get Initiator Comnd Reg - OR B_ABUS ; Assert the Data Bus - OUT0 (NCRCMD),A - LD A,B_ASEL+B_ABUS ; Now Assert both Select and Data Bus bits - OUT0 (NCRCMD),A - -; Wait for 200-300 mS for Target to become Busy. The SCSI spec says 250 mS, -; but we don't know when the triggering will occur with our 100ms counter. -; We therefore set it for 300 mS which results in 200-300 mS w/250 on average. - - LD L,0FFH ; Preset Timeout Error Status - LD A,3 ; 3-100mS ticks - LD (MTM),A ; from Now! -BSYWT: LD A,(MTM) ; Get Current Count - OR A ; Have we timed out? - JR Z,TIMOUT ; ..exit to Error if So - IN0 A,(NCRBUS) ; Get the Current Bus Status - AND B_BSY ; Is it BSY? - JR Z,BSYWT ; ..loop if Not - ;..else fall thru.. - LD A,B_ABUS - OUT0 (NCRCMD),A ; Assert Bus w/o Select Command (or free) - XOR A ; get a Zero - OUT0 (NCRCMD),A ; then free the Data Bus - IF HDDMA - LD (HDONE),A ; Start by showing Not Done - ;..fall thru to wait for a Request on the SCSI bus - -RQWAIT: IN0 A,(NCRBUS) ; Get Bus status - AND B_REQ ; Bus Request yet? - JR Z,RQWAIT ; ..jump if Not and wait - -WtCall: CALL NZ,SCSINT ; Call the Interrupt to start transfer - LD A,(HDONE) ; Get Hard Drive Done flag - OR A ; Finished? - JR NZ,WtDonX ; ..exit if So - - IN0 A,(DRA) ; Else fetch Status (from Z182 Port A) - BIT 4,A ; Interrupt? - JR WtCall ; ..check & Read/Write SCSI if So - -WtDonX: LD HL,(STATUS) ; Else get Status and Message bytes -TIMOUT: - IF NOWAIT - LD A,(WTSAVE) ; Get entry Wait state settings - OUT0 (DCNTL),A ; and restore - ENDIF - LD A,L ; get Status Byte - OR A ; set flags - RET ; and return - ELSE ;Not hddma - LD (STATUS),A ; Assume Status is Ok - ;..fall thru to check SCSI Bus phase changes.. - ENDIF ;Not hddma - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; SCSINT - Interrupt routine for the NCR 5380/DP 8490 chip. -; -; This routine handles Interrupts generated by the SCSI controller on phase -; changes or loss of BSY signal meaning that the operation is complete. -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - - IF HDDMA -; CSEG ;<-- NOTE: If "True" Interrupts are used,this Vector - ; MUST be in Common Memory (CSEG) in case an - ; interrupt hits unexpectedly. Also, insert - ; code to save registers and set Local Stack. - -SCSINT: DI ; ..disable interrupts here for local calls - XOR A - OUT0 (NCRCMD),A ; Release the SCSI Bus - IN0 A,(NCRST) ; Get status - AND B_BBSY+B_PHAS ; Phase Match or Bus Busy? - JR Z,SCSIN0 ; ..jump if Not to continue - ;..else fall thru to Exit.. -; Exit here when we are done to set the Completed flag - -DISCSI: XOR A ; Turn off any SCSI operations - OUT0 (NCRMOD),A - OUT0 (NCRTGT),A - DEC A ; 0 --> FF - LD (HDONE),A ; Indicate Hard Disk Operation Complete - IN0 A,(NCRINT) ; Discard any pending 5380 Interrupts - IN0 A,(DSTAT) - AND 5FH ; Disable DMA1 Interrupts - OUT0 (DSTAT),A - EI +HD_RW: CALL PANIC ; NOT IMPLEMENTED!!!! RET -; Continue with Transaction +;======================================================================== +; Select Hard Disk (Unit 0/1, Master/Slave) < Internal Bios routine > -SCSIN0: XOR A - OUT0 (NCRMOD),A ; Clear DMA mode - IN0 A,(NCRINT) ; Clear SCSI Interrupts - IN0 A,(DSTAT) - AND 5FH ; and Stop Z-180 DMA Ch #1 - OUT0 (DSTAT),A - LD A,B_MBSY+B_DMA ; Monitor Busy and Set DMA Mode - OUT0 (NCRMOD),A - ENDIF ;hddma -;..... -; Come here when phases change (Main Handler for Polled IO Mode) +SELHD: ; SET DEVICE -PHASE: IN0 A,(NCRBUS) ; Read the Bus Status - AND B_MSG+B_CD+B_IO ; keep the three phases we are interested in - RRCA ; Rotate Phase status bits - RRCA ; into B0-2 position for testing - OUT0 (NCRTGT),A ; Check for phase match - IF NOT HDDMA ; (only need this with Polled IO) - LD BC,NCRDAT ; with data going to/from this port (B=0) - ENDIF - LD HL,MESSAGE ; (Ph 7 input goes here) - CP 7 ; Are we in Phase 7 ? - JR Z,HDIN ; ..jump if so to Message In Phase - LD HL,(HDDATV) ; (Ph 0/1 IO From/To here) - OR A ; Are we in Phase 0 ? - JR Z,HDOUT ; ..jump to if so to Data Out Phase - DEC A ; Are we in Phase 1 ? - JR Z,HDIN ; ..jump to if so to Data In Phase - LD HL,(HDCMDV) ; (Ph 2 output from here) - DEC A ; Are we in Phase 2 ? - JR Z,HDOUT ; ..jump to if so to Command Out Phase - LD HL,STATUS ; (Ph 3 Input to here) - DEC A ; Are we in Phase 3 ? - JR Z,HDIN ; ..jump to if so to Status In Phase - ;..else fall thru -; Phases 4, 5 and 6 wind up here in an Error +; CALL PRTSTRD +; DEFB '[SELHD]$' - IF NOWAIT - LD A,(WTSAVE) ; Get entry Wait state settings - OUT0 (DCNTL),A ; and restore - ENDIF - CALL PRINT - DEFB CR,LF,' Phase Err',CR,LF+80H - IF HDDMA - CALL DISCSI ; Disable any ongoing DMA/SCSI operation - ENDIF ;..else fall thru to abort. Stack is reset so don't - ; worry about popping and restoring anything - IF BANKED - JP ABORT ; Use this error exit if banked - ELSE - RST 0 ; ..this exit if Non-banked - ENDIF ;banked - -;..... -; SCSI Input Routine (Polled IO) -; Enter with HL pointing to buffer, C addressing 5380 Data Port - - IF NOT HDDMA -HDIN: IN0 A,(NCRBUS) ; Check the Bus - BIT 5,A ; Do we have a REQuest? - JR NZ,HDIN1 ; ..jump if so to read it - AND B_BSY ; Is the Bus Busy? - JR NZ,HDIN ; ..loop if so - -HDEXIT: XOR A ; Else we are finished. Clean up & Quit - OUT0 (NCRCMD),A ; Clear Initiator Command Register - OUT0 (NCRTGT),A ; and Target Command Register - LD HL,(STATUS) ; Get Message (H) and Status (L) bytes -TIMOUT: - IF NOWAIT - LD A,(WTSAVE) ; Get entry Wait state settings - OUT0 (DCNTL),A ; and restore - ENDIF - LD A,L ; Get Status byte - OR A ; Set Return Status Ok if Status Byte = 0 - RET + JP SETPARMS ; then set parameters for DPH/DPB -HDIN1: IN0 A,(NCRST) ; Get SCSI Status - AND B_PHAS ; Do the Phases Match? - JR Z,PHASE ; ..quit here if Not and clear - INI ; Get a byte from Port (C) to Memory at (HL) - INC B ; (correct B for decrement in INI) - LD A,B_AACK - OUT0 (NCRCMD),A ; ACKnowledge the byte - XOR A - OUT0 (NCRCMD),A ; clear *ACK bit - JR HDIN ; and back for more - -;..... -; SCSI Output Routine (Polled IO) -; Enter with HL pointing to buffer, C addressing 5380 Data Port - -HDOUT: LD A,B_ABUS ; Assert Data Bus - OUT0 (NCRCMD),A - IN0 A,(NCRBUS) ; Check the SCSI Bus - BIT 5,A ; Do we have a REQuest? - JR NZ,HDOUT1 ; ..jump if So to Send a byte - AND B_BSY ; Else is the Bus Busy? - JR NZ,HDOUT ; ..loop if so because we have more to go - JR HDEXIT ; Quit +;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +; Write to Hard Disk Drive < Internal BIOS Routine > +; Writes from HSTBUF using HSTTRK and HSTSEC to build Block Number. +; NOTE: This routine uses physical drive characteristics from ICFG-xx. -HDOUT1: IN0 A,(NCRST) ; Get current Status - AND B_PHAS ; Do we have a Phase Match? - JP Z,PHASE ; ..quit here if Not and clear +HDWRIT: - OUTI ; Send a byte from (HL) to Port (C) - INC B ; (Correct B for decrement in OUTI) - LD A,B_AACK+B_ABUS - OUT0 (NCRCMD),A ; Set ACKnowledge and BUS bits XOR A - OUT0 (NCRCMD),A ; clear *ACK and *BUS - JR HDOUT ; and back for more - ENDIF ;Not hddma + LD (HSTWRT),A ; Show no active writes pending + JP HDSK_WRITE ; ..continue -;..... -; SCSI Input routine (DMA Controlled) -; Enter: HL = Address of Receive Buffer start - - IF HDDMA -HDIN: LD C,1010B ; Set for Edge Triggering and Read mode - CALL STDMA ; Set up Transfer and DMA Data - OUT0 (NCRINT),A ; Start DMA Initiator Rcv (bits don't care) - ;<-- NOTE: If using true Interrupts, restore local Stack Ptr - ; and preserved registers here - EI ; Interrupts Ok Now - RET - -;..... -; SCSI Output Routine (DMA Controlled) -; Enter: HL = Address of Send Buffer start - -HDOUT: LD C,1000B ; Set for Edge Triggering bit and Write mode - CALL STDMA ; Set up Transfer and DMA Data - LD A,B_ABUS ; Assert the Data Bus - OUT0 (NCRCMD),A - OUT0 (NCRST),A ; Start DMA Send (bits irrelevant) - ;<-- NOTE: If using true Interrupts, restore local Stack Ptr - ; and preserved registers here - EI ; Interrupts Ok Now - RET - -;..... -; STDMA - Set up DMA Channel 1 for a SCSI Read or Write operation. -; Enter: HL = Start Address of Buffer to Read/Write from/to -; C = Write (1x00B) or Read (1x10B) DMA1 Control bits -; ||++- Mem->IO ||++- IO->Mem -; |+--- DMA0-Sns |+--- DMA0-Sns -; +---- DMA1-Edge +---- DMA1-Edge - -STDMA: IN0 A,(DCNTL) ; Get DMA1 Control bits - AND 0F4H ; mask pertinent bits assuming a Write - OR C ; Add Edge Triggering bit and R/W mode - OUT0 (DCNTL),A ; and Command DMA Chan 1 - - IF BANKED - LD A,(SYSBNK) ; Get system Bank # - ELSE - LD A,(TPABNK) ; If Not Banked, load TPA Bank # - ENDIF ;banked - RL H ; Place Address MSB in Carry - ADC A,0 ; offset Bank # by 32k banks - RRA ; shift Bank LSB to Carry - RR H ; Move Bank # LSB (Carry) to Address MSB - LD (DMATBL+2),A ; Store Bank byte in DMA Block - LD (DMATBL),HL ; save Actual DMA Addr in Ctl Block - LD HL,DMATBL ; Point to DMA Control Block - LD BC,8*256+MAR1L ; Set for 8 bytes to DMA Channel 1 - OTIMR ; and output 8 bytes to 8 ports - IN0 A,(DSTAT) ; Get DMA Chan 1 Status - AND 57H ; set for No Terminating Interrupt - OR 81H ; enable DMA operation - OUT0 (DSTAT),A ; and Start the action! - RET - ENDIF ;hddma - -;..... -; Set registers for Whole Block Move - -HDDMOV: LD HL,(DATADR) ; Get ptr to User's Area - LD DE,HSTBUF ; Pt to local Host Buffer - LD BC,512 ; set length - RET ; ..and return +;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +; Read from Hard Disk Drive < Internal BIOS Routine > +; Reads to HSTBUF using HSTTRK and HSTSEC to build Block Number. +; NOTE: This routine uses physical drive characteristics from ICFG-xx. +; The routine computes a sequential block number with the algorithm; +; Trk * 16 + Sector, HBIOS uses LBA addressing for hard drive like +; devices i.e. everything but floppies. The Track contains the most +; significant 16 bits, Head the next byte and Sector the least +; significant byte. Note, only 16 bits are needed to address 33 +; megabytes for now 24 bits will be used for the LBA address. For non- +; hard drive like devices, Head, Sector and Track can be computed +; using Physical characteristics (hdHds = Number_of_Heads, +; hdSPT = Sectors_per_Track) according to the algorithm: +; +; Sector := (Block# MOD hdSPT)+1 (* Quotient1 := Block# DIV hdSPT *) +; Head := Quotient1 MOD hdHds (* Quotient2 := Quotient1 DIV hdHds *) +; Track := Quotient2 +;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -;..... -; Set banks for Interbank move +HDREAD: + JP HDSK_READ IF BANKED -SHDBNK: LD A,(USP-1) ; Get Source Bank Byte - RRA ; shift to - RRA ; - RRA ; Bank # - AND 1FH ; Mask off any Junk - LD C,A ; position - LD A,(SYSBNK) ; Get System Bank - LD B,A ; position it too - RET ; and return - ENDIF ;banked + COMMON /BANK2/ + ELSE + CSEG + ENDIF +; +;================================================================================================== +; HDSK DISK DRIVER +;================================================================================================== +;; +;; HBIOS HDSK equates +;; +;HDSK_IO EQU 0FDH +;; +;HDSK_CMDNONE EQU 0 +;HDSK_CMDRESET EQU 1 +;HDSK_CMDREAD EQU 2 +;HDSK_CMDWRITE EQU 3 +;HDSK_CMDPARAM EQU 4 +;; +;; STATUS +;; +;HDSKRC_OK EQU 0 +;; +;HBIOS disk commands +; +HB_DSKRD EQU 13H +HB_DSKWR EQU 14H +; +HDSK_READ: +; CALL PRTSTRD ; DEBUG +; DEFB '[HDSK READ]$' ; DEBUG -;..... -; SCSI Read Sense Command Data Block + LD B,HB_DSKRD ; HBIOS DISK READ (13H) + JR HDSK_RW +; +HDSK_WRITE: +; CALL PRTSTRD +; DEFB '[HDSK WRITE]$' -sense: DEFB 03H ; SCSI Sense Command - DEFB 0,0,0,SNSLEN,0 ; remainder of Sense Command Block - ; (data length set to available space) + LD B,HB_DSKWR ; HBIOS DISK WRITE (14H) +; +HDSK_RW: + LD HL,(HSTDPH) ; GET ACTIVE DPH POINTER + DEC HL ; ADJUST TO POINT TO UNIT NUMBER + LD C,(HL) ; LOAD IT IN C FOR HBIOS CALL LATER + PUSH BC ; SAVE FUNCTION AND DEVICE FOR LATER + LD HL,(HSTTRK) ; GET TRACK VALUE + LD A,L ; LSB OF TRACK TO A + AND 0FH ; ISOLATE HEAD IN LOW 4 BITS + LD D,A ; STUFF IT IN D + LD A,(HSTSEC) ; GET SECTOR + LD E,A ; STUFF IT IN E + LD B,4 ; PREPARE TO SHIFT OUT 4 BIT HEAD VALUE +HDSK_RW1: + SRL H ; SHIFT ONE BIT OUT + RR L ; ... OF HL + DJNZ HDSK_RW1 ; DO ALL 4 BITS + POP BC ; RECOVER FUNCTION AND DEVICE + PUSH BC ; SAVE INCOMING FUNCTION, DEVICE/UNIT + LD B,12H ; SETUP FOR NEW SEEK CALL + CALL HBX_INVOKE ; DO IT + POP BC ; RESTORE INCOMING FUNCTION, DEVICE/UNIT + RET NZ ; ABORT IF SEEK RETURNED AN ERROR W/ ERROR IN A + LD HL,(HB_DSKBUF) ; GET BUFFER ADDRESS + LD D,BID_HB ; BUFFER IN HBIOS BANK + LD E,1 ; ONE SECTOR + CALL HBX_INVOKE ; DO IT + OR A ; SET FLAGS + RET Z ; DONE IF NO ERROR + + OR 0FFH ; A=$FF TO SIGNAL ERROR + RET ; AND DONE W/ ERROR +; +;================================================================================================== +; HDSK DISK DRIVER - DATA +;================================================================================================== +; IF BANKED COMMON /B2RAM/ ELSE DSEG ENDIF -HDCMDV: DEFS 2 ; Storage for Current Command Data Block -HDDATV: DEFS 2 ; Storage for current Data Transfer Area -snsDat: DEFS 18 ; Storage for extended Sense Data Received -SNSLEN EQU $-snsDat -; SCSI Controller Command Block - -HDCOMD: DEFS 1 ; Command Byte -HDUNIT: DEFS 1 ; B7-5 = Unit #, remainder is Hi-Addr -HIBLK: DEFS 1 ; Mid-Addr Byte -LOBLK: DEFS 1 ; Lo-Addr Byte -HDSIZ: DEFS 1 ; Block Size to Read/Write (1=512 byte blk) -HDCTL DEFS 1 ; Control/Step Byte - DEFS 6 ; (pad for 12-byte Command Block) -CMDSIZ EQU $-HDCOMD ; Size of Command Block - - IF HDDMA -DATPTR: DEFS 2 ; Pointer to Data Area - ENDIF -DATADR: DEFS 2 ; Pointer to User Buffer Space (user bank) -HDEVIC: DEFS 1 ; Target Device address bit -LUNSAV: DEFS 1 ; Storage for LUN - -HDSTEP: DEFS 1 ; Step Rate Byte for Xebec/Shugart -INIBUF: DEFS 9 ; Buffer for Xebec/Shugart 1610-3 Init. - -; Z-180 DMA Control Block for SCSI Data Transfers - - IF HDDMA -DMATBL: DEFS 2 ; MAR1L, MAR1H - DEFS 1 ; MAR1B (Bank) - DEFS 2 ; DMAACK Output Port - DEFS 1 ; (unused) -NBYTES: DEFS 2 ; BCR1L, BCR1H - ENDIF ;hddma - -;<<--- WARNING! --- Do not re-order the following Two Bytes --->> - -STATUS: DEFS 1 ; Ending Status Byte -MESSAGE: DEFS 1 ; Ending Message Byte - -; IF HDDMA ;<-- If using True Interrupts, uncomment this - ; Section and add code to Interrupt Handler - ; to save registers here. -; DEFS 12 ; ..fill bytes and stack space -;INTSTK: DEFS 2 ; Storage for Stack Pointer -; ENDIF ;hddma - IF NOWAIT -WTSAVE: DEFS 1 ; Entry Wait State Setting - ENDIF -iUnit: DEFS 1 ; Bios Select Unit/LUN byte -xUnit: DEFS 1 ; Direct Access Unit/LUN byte +HDSK_PDN DEFS 1 ; PHYSICAL DEVICE -;======================= End of HARD-DX =========================== - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/hardhb.z80 b/Source/BPBIOS/hardhb.z80 deleted file mode 100644 index d19ccb40..00000000 --- a/Source/BPBIOS/hardhb.z80 +++ /dev/null @@ -1,215 +0,0 @@ -;::::::::::::::::::::::::::::::::::::::::::::::::************************** -; Hard disk routines as implemented for ** Hardware Dependent ** -; SIMH Altair80 ** for exact interface ** -; D-X Designs Pty Ltd P112. ************************** -;-------------------------------------------------------------------------- -; This file uses modifications of the definitions in ICFG-xx to reflect -; Physical and/or logical definitions for HBIOS drives. A controller type of -; 8xH signifies IDE/ATA drives, in which case the Drive byte at HDRVx is: -; 7 6 5 4 3 2 1 0 -; | | | | | | | +- Unit Number (0 = Master, 1 = Slave) -; | | | | +-+-+--- (reserved) -; | | | +--------- 1 = Active, 0 = Inactive -; +-+-+----------- (reserved) -; Additionally, the first byte of the Reduced Write Cylinder word is re- -; defined to be the number of physical/logical Sectors-Per-Track. -; These parameters are used to convert the Track & 16 Sector/Track format -; assumed in the B/P Bios definitions for Hard Drives into Track/Sector/Head -; Sector Number needed for IDE/ATA Data accesses. Direct driver IO routines -; to Select (SELHD), Read (HDREAD) and Write (HDWRIT) are all included here. -;-------------------------------------------------------------------------- -; 1.0 - 26 Aug 01 - Cleaned up source and included fixes from SCSI. HFB -; 0.2 - 28 Jun 97 - Added Home Drive, Retry Disable bit handling. HFB -; 0.1 - 25 Apr 97 - Initial Test Release HFB -;*************************************************************************** - - IF BANKED - COMMON /BANK2/ - ELSE - CSEG - ENDIF - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 0 - Set User Data Area Adress for Direct Disk IO, Return -; Number of Bytes in the driver Command Block (SCSI-"like") -; For IDE, a minimum of 6 Bytes is needed (Comnd,Trk(2),Sctr,Head,Drive) -; Enter: DE = Address of User Data Area -; Exit : A = Number of bytes available in the Command Block -; Uses : A,HL -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HDVALS: CALL PANIC ; NOT IMPLEMENTED!!!! - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 1 - Set Drive bit Command Block from A -; Enter: A = Drive Byte -; Exit : A = Drive Bit in LSB (00/01H, for Master/Slave) -; Uses : AF -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HDSLCT: CALL PANIC ; NOT IMPLEMENTED!!!! - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 2 - Direct SCSI driver. This routine performs the function -; described by the command in the HD Command Block with Data area -; addressed by DE. At the end of the function, 512 bytes of data are -; transferred from the Bios IO Buffer to the Users Space set by Fcn 0. -; -; Enter: DE = Pointer to User Command Descriptor Block -; HDCOMD contains pre-filled SCSI Command Block -; A = 0 if No Data to be Written, FF if User-supplied data to write -; Exit : H = Message Byte value -; L = Status Byte value -; A = Status byte, Flags set accordingly. -; Uses : AF,BC,DE,HL -; NOTE : Routine assumes the Command Block is properly configured for the -; desired function and device. Errors in phasing result in program -; exit and Warm Boot function, while Timeout returns 0FFH. -; For external access, It assumes the user has used Functions 0 and 1 to -; set the data transfer source/dest address and logical & physical drive. -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HD_RW: CALL PANIC ; NOT IMPLEMENTED!!!! - RET - -;======================================================================== -; Select Hard Disk (Unit 0/1, Master/Slave) < Internal Bios routine > - -SELHD: ; SET DEVICE - -; CALL PRTSTRD -; DEFB '[SELHD]$' - - JP SETPARMS ; then set parameters for DPH/DPB - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Write to Hard Disk Drive < Internal BIOS Routine > -; Writes from HSTBUF using HSTTRK and HSTSEC to build Block Number. -; NOTE: This routine uses physical drive characteristics from ICFG-xx. - -HDWRIT: - - XOR A - LD (HSTWRT),A ; Show no active writes pending - - JP HDSK_WRITE ; ..continue - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Read from Hard Disk Drive < Internal BIOS Routine > -; Reads to HSTBUF using HSTTRK and HSTSEC to build Block Number. -; NOTE: This routine uses physical drive characteristics from ICFG-xx. -; The routine computes a sequential block number (as with SCSI) with -; the algorithm; Trk * 16 + Sector, then computes Head, Sector and Track -; using Physical characteristics (hdHds = Number_of_Heads, -; hdSPT = Sectors_per_Track) according to the algorithm: -; -; Sector := (Block# MOD hdSPT)+1 (* Quotient1 := Block# DIV hdSPT *) -; Head := Quotient1 MOD hdHds (* Quotient2 := Quotient1 DIV hdHds *) -; Track := Quotient2 - -HDREAD: - JP HDSK_READ - - IF BANKED - COMMON /B2RAM/ - ELSE - DSEG - ENDIF - -;======================= End of HARDIDE =========================== - - - IF BANKED - COMMON /BANK2/ - ELSE - CSEG - ENDIF - -; -;================================================================================================== -; HDSK DISK DRIVER -;================================================================================================== -; -; IO PORT ADDRESSES -; -HDSK_IO EQU 0FDH -; -HDSK_CMDNONE EQU 0 -HDSK_CMDRESET EQU 1 -HDSK_CMDREAD EQU 2 -HDSK_CMDWRITE EQU 3 -HDSK_CMDPARAM EQU 4 -; -; STATUS -; -HDSKRC_OK EQU 0 -; -; -; -HDSK_READ: -; CALL PRTSTRD -; DEFB '[HDSK READ]$' - - LD B,13H ; $13 IS HBIOS DISK READ - JR HDSK_RW -; -; -; -HDSK_WRITE: -; CALL PRTSTRD -; DEFB '[HDSK WRITE]$' - - LD B,14H ; $14 IS HBIOS DISK WRITE - JR HDSK_RW -; -; -; -HDSK_RW: - LD HL,(HSTDPH) ; GET ACTIVE DPH POINTER - DEC HL ; ADJUST TO POINT TO UNIT NUMBER - LD C,(HL) ; LOAD IT IN C FOR HBIOS CALL LATER - PUSH BC ; SAVE FUNCTION AND DEVICE FOR LATER - LD HL,(HSTTRK) ; GET TRACK VALUE - LD A,L ; LSB OF TRACK TO A - AND 0FH ; ISOLATE HEAD IN LOW 4 BITS - LD D,A ; STUFF IT IN D - LD A,(HSTSEC) ; GET SECTOR - LD E,A ; STUFF IT IN E - LD B,4 ; PREPARE TO SHIFT OUT 4 BIT HEAD VALUE -HDSK_RW1: - SRL H ; SHIFT ONE BIT OUT - RR L ; ... OF HL - DJNZ HDSK_RW1 ; DO ALL 4 BITS - POP BC ; RECOVER FUNCTION AND DEVICE - PUSH BC ; SAVE INCOMING FUNCTION, DEVICE/UNIT - LD B,12H ; SETUP FOR NEW SEEK CALL - CALL HBX_INVOKE ; DO IT - POP BC ; RESTORE INCOMING FUNCTION, DEVICE/UNIT - RET NZ ; ABORT IF SEEK RETURNED AN ERROR W/ ERROR IN A - LD HL,(HB_DSKBUF) ; GET BUFFER ADDRESS - LD D,BID_HB ; BUFFER IN HBIOS BANK - LD E,1 ; ONE SECTOR - CALL HBX_INVOKE ; DO IT - OR A ; SET FLAGS - RET Z ; DONE IF NO ERROR - - OR 0FFH ; A=$FF TO SIGNAL ERROR - RET ; AND DONE W/ ERROR -; -;================================================================================================== -; HDSK DISK DRIVER - DATA -;================================================================================================== -; - IF BANKED - COMMON /B2RAM/ - ELSE - DSEG - ENDIF - - -HDSK_PDN DEFS 1 ; PHYSICAL DEVICE - - - \ No newline at end of file diff --git a/Source/BPBIOS/hardide.z80 b/Source/BPBIOS/hardide.z80 deleted file mode 100644 index d8f5822a..00000000 --- a/Source/BPBIOS/hardide.z80 +++ /dev/null @@ -1,469 +0,0 @@ -;::::::::::::::::::::::::::::::::::::::::::::::::************************** -; Hard disk routines as implemented for ** Hardware Dependent ** -; Tilmann Reh's GIDE board adapted to the ** for exact interface ** -; D-X Designs Pty Ltd P112. ************************** -; Portions derived from GIDE.Z80 with tips from GIDETEST.PAS by Tilmann Reh. -;-------------------------------------------------------------------------- -; This file uses modifications of the definitions in ICFG-xx to reflect -; Physical and/or logical definitions for IDE drives. A controller type of -; 8xH signifies IDE/ATA drives, in which case the Drive byte at HDRVx is: -; 7 6 5 4 3 2 1 0 -; | | | | | | | +- Unit Number (0 = Master, 1 = Slave) -; | | | | +-+-+--- (reserved) -; | | | +--------- 1 = Active, 0 = Inactive -; +-+-+----------- (reserved) -; Additionally, the first byte of the Reduced Write Cylinder word is re- -; defined to be the number of physical/logical Sectors-Per-Track. -; These parameters are used to convert the Track & 16 Sector/Track format -; assumed in the B/P Bios definitions for Hard Drives into Track/Sector/Head -; Sector Number needed for IDE/ATA Data accesses. Direct driver IO routines -; to Select (SELHD), Read (HDREAD) and Write (HDWRIT) are all included here. -;-------------------------------------------------------------------------- -; 1.0 - 26 Aug 01 - Cleaned up source and included fixes from SCSI. HFB -; 0.2 - 28 Jun 97 - Added Home Drive, Retry Disable bit handling. HFB -; 0.1 - 25 Apr 97 - Initial Test Release HFB -;*************************************************************************** - - IF BANKED - COMMON /BANK2/ - ELSE - CSEG - ENDIF - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 0 - Set User Data Area Adress for Direct Disk IO, Return -; Number of Bytes in the driver Command Block (SCSI-"like") -; For IDE, a minimum of 6 Bytes is needed (Comnd,Trk(2),Sctr,Head,Drive) -; Enter: DE = Address of User Data Area -; Exit : A = Number of bytes available in the Command Block -; Uses : A,HL -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HDVALS: LD (DATADR),DE ; Save the Users Data Area - LD A,CMDSIZ - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 1 - Set Drive bit Command Block from A -; Enter: A = Drive Byte -; Exit : A = Drive Bit in LSB (00/01H, for Master/Slave) -; Uses : AF -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HDSLCT: AND 01H ; Strip any garbage - LD (hdUnit),A ; save in Command Block - RET - -;======================================================================== -; Select Hard Disk (Unit 0/1, Master/Slave) < Internal Bios routine > - -SELHD: LD A,(SEKPDN) ; Load Device and Unit # to select -SELHDA: LD C,A ; position for calculations - LD B,HDRV1-HDRV0 ; with size - MLT BC ; Calculate offset into table - LD HL,HDRV0 ; from first Physical drive - ADD HL,BC - LD A,(CNTRLR) ; Set Controller type - BIT 7,A ; Is it IDE/ATA? - JP Z,SELERR ; ..jump if Not to return Error - - LD A,(HL) ; Fetch Device/LUN byte - CALL HDSLCT ; setting variables for Device and LUN - ; Wait until Drive is ready or 10 Seconds - LD A,100 ; 100-100mS ticks -SelWt: CALL BsyWt ; Wait this long for Drive to come Ready - JP C,SELERR ; ..Error if Timeout - ; Else gather drive geometry specified in ICFG-xx - INC HL ; Advance to Number of Tracks Word - LD BC,4 ; Move Number of Tracks (Word) - LD DE,hdTrks ; Number of Heads (Byte) - LDIR ; and Sctrs/Trk to local storage -SetPmV: JP SETPARMS ; then set parameters for DPH/DPB - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Write to Hard Disk Drive < Internal BIOS Routine > -; Writes from HSTBUF using HSTTRK and HSTSEC to build Block Number. -; NOTE: This routine uses physical drive characteristics from ICFG-xx. - -HDWRIT: XOR A - LD (HSTACT),A ; Show no active writes pending - - LD HL,7CH*256+CMDWR ; Set the IDE Write Command - JR HDRW ; ..continue - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Read from Hard Disk Drive < Internal BIOS Routine > -; Reads to HSTBUF using HSTTRK and HSTSEC to build Block Number. -; NOTE: This routine uses physical drive characteristics from ICFG-xx. -; The routine computes a sequential block number (as with SCSI) with -; the algorithm; Trk * 16 + Sector, then computes Head, Sector and Track -; using Physical characteristics (hdHds = Number_of_Heads, -; hdSPT = Sectors_per_Track) according to the algorithm: -; -; Sector := (Block# MOD hdSPT)+1 (* Quotient1 := Block# DIV hdSPT *) -; Head := Quotient1 MOD hdHds (* Quotient2 := Quotient1 DIV hdHds *) -; Track := Quotient2 - -HDREAD: LD HL,7EH*256+CMDRD ; Set the IDE Read Command -HDRW: LD (hdComd),HL ; save - -; Prepare for Disk Read/Write by Preloading all Registers - - LD HL,(HSTDPH) ; Get pointer to desired DPH - DEC HL ; back up to Device # - LD A,(HL) ; and fetch - CALL SELHDA ; Select this device from A-Reg - LD BC,4*256+0 ; Count = 4, MSB of Block # = 0 - LD HL,(HSTTRK) ; Get requested track -MUL16: ADD HL,HL ; Multiply C,H,L by 16 for 21-bit block # - RL C ; shifting overflow bit to C - DJNZ MUL16 ; ..and looping til * 16 - LD A,(HSTSEC) ; Get Logical Host Sector # (4-bits) - ADD A,L ; add in Hi 4-bits of low Block # - LD L,A ; save back - LD A,(hdSPT) ; Get Sctrs-Per-Trk - LD E,A - CALL Divide ; Divide CHL by E - INC A ; Make Sctr # Base at 1 - LD (hdSec),A ; (save) - LD A,(hdHds) ; Get Number of Heads - LD E,A - CALL Divide ; Divide CHL (Quotient from above) by E - LD (hdHead),A ; (save) - LD A,H ; Swap - LD H,L ; Bytes - LD L,A ; in Track Word - LD (hdTrkH),HL ; save Quotient (Track, Hi & Lo) - LD A,0AAH - LD (hdErr),A ; Activate Retries in case Reading - LD A,1 - LD (hdSCnt),A ; Do only One Sector - - LD A,5 ; Give it a few tries -HDOps0: LD (HRTrys),A ; Save Count - CALL GoGIDE ; Try Read/Write Operation - RET Z ; ..quit if Ok - LD A,(HRTrys) ; Else - DEC A ; Any tries remaining? - JR NZ,HDOps0 ; ..loop if So - DEC A ; Else Return 0FFH - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 2 - Direct IDE/ATA driver. This routine performs the function -; described by the command in the HD Command Block with Data area -; addressed by DE. At the end of the function, 512 bytes of data are -; transferred from the Bios IO Buffer to the Users Space set by Fcn 0. -; The IDE/ATA Command Block layout is: -; -; Byte Format R/W/V Init RdID Power Diag PwrSet Home -; 0 [Command ] 50 20/30/40 91 EC E0/E1/E5 90 E2/E3 10 -; 1 [BitMap ] 70 7C/(7E) 74 40 00 00 04 40 -; 2 [Drv/Hd ] 0AnH 0AnH 0AnH-1 0AnH - - - 0An0 -; 3 [Cyl#(Hi)] CylHi CylHi CylHi - - - - - -; 4 [Cyl#(Lo)] CylLo CylLo CylLo - - - - - -; 5 [Sector# ] - Sctr - - - - - - -; 6 [Sctr Cnt] - SCnt NSecs - - - n*5Secs - -; 7 [Err Reg ] - (0AA) - - - - - - -; 8 [Dgtl Out] - - - - - - - - -; Rslts/Stat: Stat Stat Stat Stat SCnt Err - Stat -; Reg Reg Reg Reg Reg Reg Reg -; -; Enter: DE = Pointer to User IDE/ATA Command Block -; "hdComd" contains pre-filled Command Block -; A = 0 if No Data to be Written, FF if User-supplied data to write -; Exit : H = Error Byte value (If any) -; L = Status Byte value (If any) -; A = Status byte, Flags set accordingly. -; Uses : AF,BC,DE,HL -; NOTE : Routine assumes the Command Block is properly configured for the -; desired function and device. Timeout returns 0FFH, Unsupported -; command returns 7FH. -; For external access, It assumes the user has used Functions 0 and 1 to -; set the data transfer source/dest address drive number. -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HD_RW: PUSH AF ; Save User Data Flag - PUSH DE ; and ptr to User's CDB - CALL FLUSH ; Insure Host Buffer is Free - POP HL ; restore User CDB ptr to HL for move - IF BANKED - CALL SHDBNK ; Load Banks for transfer to System fm User - CALL XMOVE ; and Set - ENDIF ;Banked - LD DE,hdComd - LD BC,10 ; Move a 10-byte block - CALL MOVE ; into the Command area - POP AF ; Restore Flag - OR A ; Any User data to write? - JR Z,HD_RW0 ; ..bypass move if not - IF BANKED - CALL SHDBNK ; Load for move from User's to System Banks - CALL XMOVE ; and Set - ENDIF ;Banked - CALL HDDMOV ; Set to move 512 bytes from User to Hstbuf - CALL MOVE ; Do It! -HD_RW0: CALL GoGIDE ; Set Data Addr and do the operation - PUSH HL ; save Status/Err - IF BANKED - CALL SHDBNK ; Load Bank Numbers - LD A,B ; Swap - LD B,C ; Source - LD C,A ; and Destination Banks - CALL XMOVE ; Set Source/Dest - ENDIF ;Banked - CALL HDDMOV ; set Addresses and Length - EX DE,HL ; write back to User's area - CALL MOVE ; move without affecting status in A - POP HL ; Restore Status/Err bytes for checks - LD A,L ; Get Status - OR A ; set flags - RET ; ..and quit - -;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -; Raw GIDE Driver. Assumes Command in hdComd and Parms in Comnd Data Block - -GoGIDE: - IF NOWAIT ; If Wait States not desired.. - IN0 A,(DCNTL) ; Get current settings - LD (WTSAVE),A ; save for exit - AND 11001111B ; Keep everything but IO Waits - OUT0 (DCNTL),A ; and set to No IO Wait States - ENDIF ;nowait - -; Wait approximately 5 Seconds for Target to become Busy. - - LD L,0FFH ; Preset Timeout Error Status - LD A,50 ; 50-100mS ticks - CALL BsyWt ; Monitor Timeout while checking Busy Bit - JR C,TIMOUT ; ..Reporting Error if Timed Out - ;..else fall thru.. - LD HL,hdHead - LD A,(hdUnit) ; Get Drive # - ADD A,A ; Shift - ADD A,A ; Drive Bit - ADD A,A ; into - ADD A,A ; position - OR (HL) ; Add Head # bits - OR 0A0H ; and Fixed Bits - LD (HL),A - LD BC,IDESDH ; Set Port Address (GIDE+0EH) - DEC HL ; back ptr up to hdBMap byte - LD E,(HL) ; fetch - LD D,7 ; and set number of bytes - RL E ; Shift B7 out - -GoGID0: RL E ; Test bit to Carry - INC HL ; bump Byte ptr - JR NC,GoGID1 ; ..jump if No byte to write - LD A,(HL) ; Else get byte - OUT (C),A ; set IDE Register -GoGID1: DEC BC ; Down to next Register address - DEC D ; Finished? - JR NZ,GoGID0 ; ..loop if Not - - LD HL,HSTBUF ; Always IO to/from Host Buffer - LD BC,IDEDat ; Pre-load Data Reg Adr in C, 0 in B - LD A,(hdComd) ; Get Command Byte - CP CMDVER+2 ; Is it in the range w/retry bit? - JR NC,GoGID2 ; ..jump if Not - AND 0FEH ; Else Ignore Retry disable bit (B0) - CP CMDRD ; Read Sector? - JR Z,HRead - CP CMDWR ; Write Sector? - JR Z,HWrite - CP CMDVER ; Verify Sector(s)? - JR Z,HMisc - BIT 4,A ; Is it Home Comnd? - JR Z,HMisc - ;..else fall thru to error exit.. -GoGID2: CP CMDID ; Read ID Information? - JR Z,HRead - CP CMDDIAG ; Perform Diagnostics? - JR Z,HDiag - CP CMDINIT ; Initialize Drive Parameters? - JR Z,HInit - CP CMDPWQ ; Query Power Status? - JR Z,HPwrQ - CP CMDFMT ; Format Track? - JR Z,HWrite - CP CMDPW0 ; Low range of Power Set Commands? - JR C,GoGIDX ; ..jump if < 0E0H - CP CMDPW3+1 ; High Range of Power Set Commands? - JR C,HMisc ; ..jump if in [E0..E3] -GoGIDX: RES 7,L ; If Not legal Command, Return Error 7FH - POP AF ; (clear command from stack) -TIMOUT: - IF NOWAIT - LD A,(WTSAVE) ; Get entry Wait state settings - OUT0 (DCNTL),A ; and restore - ENDIF - LD A,L ; get Status Byte - LD (ERFLAG),A ; (store) - OR A ; set flags - RET ; and return - -;..... -; Read a Sector from the Disk, or Disk Parameters to the Buffer - -HRead: CALL Cmd_Wt ; Send Command in A, Return when Ready -HRead0: IN A,(IDECmd) ; Get Status - BIT 3,A ; Ready? - JR Z,HRead0 ; ..loop if Not - INIR ; Read 512 bytes - INIR ; in two-256 byte sequences -HdFini: CALL Wt_Rdy ; Wait for drive to become Ready -;; -- May need this with some Older Drives that send ECC bytes with no warning! -;; BIT 4,A ; DRQ Shifted? -;; JR Z,HdFnQ ; ..jump if Not -;; IN A,(IDEDat) ; Else Read data reg (ECC Bytes? -;; JR HdFini ; ..loop til no more data - -HdFnQ: IN A,(IDECmd) ; Restore byte - AND 10001001B ; Busy, DRQ, or Error? - JR Z,HdFnOk ; ..exit if Ok - LD A,02H ; Else Set Error status = 2 -HdFnOk: LD L,A ; store - IN A,(IDEErr) ; Get Any Error Status - LD H,A ; save - JR TIMOUT ; ..and exit thru common location - -;..... -; Write a 512-byte Sector to the Disk - -HWrite: CALL Cmd_Wt ; Send Command in A, Return when Ready -HWrit2: IN A,(IDECmd) - BIT 3,A ; Data Request? - JR Z,HWrit2 ; ..loop if Not - OTIR ; Else Write 512 bytes - OTIR ; in two-256 byte operations -HInit: CALL Wt_Rdy - JR HdFnQ ; ..and finish off above - -;..... -; Execute Drive Diagnostics - -HDiag: CALL Cmd_Wt ; Send Command in A, Return when Ready - IN A,(IDEErr) ; Read Status of Tests - JR HdFnOk ; ..exit with Status - -;..... -; Query Power Save Status - -HPwrQ: CALL Cmd_Wt ; Send Command in A, Return when Ready - IN A,(IDESCnt) ; Get Status (00=Running, FF=Stopped) - JR HdFnOk ; ..exit with Status - -;..... -; Miscellaneous Commands such as Set Various Power Control Features - -HMisc: CALL Cmd_Wt ; Send Command in A, Return When Ready - JR HdFnQ ; ..exit checking Status - -;================== SUPPORT ROUTINES ================== -; Divide 24-bit Number by 8-bit Number returning Quotient and Remainder -; Enter: CHL = 24-bit Unsigned Dividend -; E = 8-bit Unsigned Divisor -; Exit : CHL = 24-bit Quotient -; A = 8-bit Remainder -; Uses : AF,BC,HL - -Divide: LD B,24+1 ; 25 times thru Loop - XOR A ; Clear Remainder and Carry -Div: ADC A,A ; Shift Accum Left + Carry - SBC A,E ; Subtract Divisor - JR NC,Div0 ; ..jump if it Worked - ADD A,E ; Else restore Accum & Carry -Div0: CCF ; Flip Carry Bit - ADC HL,HL ; Shift any Carry into - RL C ; Dividend/Quotient - DJNZ Div ; ..loop til Done - RET - -;..... -; Wait for Drive to become Ready (With Timeout) -; Enter: A = Number of 100 mS increments to wait before timeout -; Exit : Carry Set (C) if Timeout, else Carry Clear (NC), Unit Ready -; Uses : MTM Timer variable, AF - -BsyWt: LD (MTM),A ; Set Timer value -BsyW0: LD A,(MTM) ; Get Current Count - OR A ; Have we timed out? - SCF ; (Set error flag in case) - RET Z ; ..exit w/Error flag if So - IN A,(IDECmd) ; Else Get the Busy Bit - RLA ; Is it BSY? - JR C,BSYW0 ; ..loop if So - RET ; else back to Caller, Carry Clear - -;..... -; Send command to the IDE Command Register, fall thru to wait for Ready Status - -Cmd_Wt: LD A,(hdComd) ; Get Command Byte in case bit stripped - OUT (IDECmd),A ; Start Operation - ;..fall thru to wait for Ready -;..... -; Wait for Drive to become Ready (No Timeout) -; Enter: None -; Exit : None -; Uses : AF - -Wt_Rdy: IN A,(IDECmd) ; Get Drive Status - RLA ; Ready? - JR C,Wt_Rdy ; ..loop if Not - RET - -;..... -; Set registers for Whole Block Move - -HDDMOV: LD HL,(DATADR) ; Get ptr to User's Area - LD DE,HSTBUF ; Pt to local Host Buffer - LD BC,512 ; set length - RET ; ..and return - -;..... -; Set banks for Interbank move - - IF BANKED -SHDBNK: LD A,(USP-1) ; Get Source Bank Byte - RRA ; shift to - RRA ; - RRA ; Bank # - AND 1FH ; Mask off any Junk - LD C,A ; position - LD A,(SYSBNK) ; Get System Bank - LD B,A ; position it too - RET ; and return - ENDIF ;banked - - IF BANKED - COMMON /B2RAM/ - ELSE - DSEG - ENDIF - -HRTrys: DEFS 1 ; Retry counter storage -hdUnit: DEFS 1 ; IDE Drive (0 = Master, 1 = Slave) -hdTrks: DEFS 2 ; Number of Tracks on IDE Drive -hdHds: DEFS 1 ; Number of Heads on IDE Drive -hdSPT: DEFS 1 ; Number of Sectors-Per-Track on IDE Drive - -; IDE Command Block for User Direct Driver Access - -hdComd: DEFS 1 ; Command Byte -hdBMap: DEFS 1 ; Bit Map (B6..0) of Following Bytes to Set -hdHead: DEFS 1 ; Head Number/Number of Heads in B3..0 -hdTrkH: DEFS 1 ; Hi-Track (Cylinder) Byte -hdTrkL: DEFS 1 ; Lo-Track (Cylinder) Byte -hdSec: DEFS 1 ; Sector Number -hdSCnt: DEFS 1 ; Sector Count -hdErr: DEFS 1 ; Error Reg Value -hdDigO: DEFS 1 ; Digital Output Reg Value -CMDSIZ EQU $-hdComd ; Size of Command Block - -DATADR: DEFS 2 ; Pointer to User Buffer Space (user bank) - IF NOWAIT -WTSAVE: DEFS 1 ; Storage for Entry Wait State Setting - ENDIF -;======================= End of HARDIDE =========================== - \ No newline at end of file diff --git a/Source/BPBIOS/hardsim.z80 b/Source/BPBIOS/hardsim.z80 deleted file mode 100644 index ff42da65..00000000 --- a/Source/BPBIOS/hardsim.z80 +++ /dev/null @@ -1,291 +0,0 @@ -;::::::::::::::::::::::::::::::::::::::::::::::::************************** -; Hard disk routines as implemented for ** Hardware Dependent ** -; SIMH Altair80 ** for exact interface ** -; D-X Designs Pty Ltd P112. ************************** -;-------------------------------------------------------------------------- -; This file uses modifications of the definitions in ICFG-xx to reflect -; Physical and/or logical definitions for HBIOS drives. A controller type of -; 8xH signifies IDE/ATA drives, in which case the Drive byte at HDRVx is: -; 7 6 5 4 3 2 1 0 -; | | | | | | | +- Unit Number (0 = Master, 1 = Slave) -; | | | | +-+-+--- (reserved) -; | | | +--------- 1 = Active, 0 = Inactive -; +-+-+----------- (reserved) -; Additionally, the first byte of the Reduced Write Cylinder word is re- -; defined to be the number of physical/logical Sectors-Per-Track. -; These parameters are used to convert the Track & 16 Sector/Track format -; assumed in the B/P Bios definitions for Hard Drives into Track/Sector/Head -; Sector Number needed for IDE/ATA Data accesses. Direct driver IO routines -; to Select (SELHD), Read (HDREAD) and Write (HDWRIT) are all included here. -;-------------------------------------------------------------------------- -; 1.0 - 26 Aug 01 - Cleaned up source and included fixes from SCSI. HFB -; 0.2 - 28 Jun 97 - Added Home Drive, Retry Disable bit handling. HFB -; 0.1 - 25 Apr 97 - Initial Test Release HFB -;*************************************************************************** - - IF BANKED - COMMON /BANK2/ - ELSE - CSEG - ENDIF - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 0 - Set User Data Area Adress for Direct Disk IO, Return -; Number of Bytes in the driver Command Block (SCSI-"like") -; For IDE, a minimum of 6 Bytes is needed (Comnd,Trk(2),Sctr,Head,Drive) -; Enter: DE = Address of User Data Area -; Exit : A = Number of bytes available in the Command Block -; Uses : A,HL -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HDVALS: LD (DATADR),DE ; Save the Users Data Area - LD A,CMDSIZ - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 1 - Set Drive bit Command Block from A -; Enter: A = Drive Byte -; Exit : A = Drive Bit in LSB (00/01H, for Master/Slave) -; Uses : AF -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HDSLCT: AND 01H ; Strip any garbage - LD (hdUnit),A ; save in Command Block - RET - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Function 2 - Direct SCSI driver. This routine performs the function -; described by the command in the HD Command Block with Data area -; addressed by DE. At the end of the function, 512 bytes of data are -; transferred from the Bios IO Buffer to the Users Space set by Fcn 0. -; -; Enter: DE = Pointer to User Command Descriptor Block -; HDCOMD contains pre-filled SCSI Command Block -; A = 0 if No Data to be Written, FF if User-supplied data to write -; Exit : H = Message Byte value -; L = Status Byte value -; A = Status byte, Flags set accordingly. -; Uses : AF,BC,DE,HL -; NOTE : Routine assumes the Command Block is properly configured for the -; desired function and device. Errors in phasing result in program -; exit and Warm Boot function, while Timeout returns 0FFH. -; For external access, It assumes the user has used Functions 0 and 1 to -; set the data transfer source/dest address and logical & physical drive. -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -HD_RW: CALL PANIC ; NOT IMPLEMENTED!!!! - RET - -;======================================================================== -; Select Hard Disk (Unit 0/1, Master/Slave) < Internal Bios routine > - -SELHD: ; SET DEVICE - LD A,(SEKPDN) - LD (HDSK_DEVICE),A - JP SETPARMS ; then set parameters for DPH/DPB - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Write to Hard Disk Drive < Internal BIOS Routine > -; Writes from HSTBUF using HSTTRK and HSTSEC to build Block Number. -; NOTE: This routine uses physical drive characteristics from ICFG-xx. - -HDWRIT: XOR A - LD (HSTACT),A ; Show no active writes pending - - JP HDSK_WRITE ; ..continue - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Read from Hard Disk Drive < Internal BIOS Routine > -; Reads to HSTBUF using HSTTRK and HSTSEC to build Block Number. -; NOTE: This routine uses physical drive characteristics from ICFG-xx. -; The routine computes a sequential block number (as with SCSI) with -; the algorithm; Trk * 16 + Sector, then computes Head, Sector and Track -; using Physical characteristics (hdHds = Number_of_Heads, -; hdSPT = Sectors_per_Track) according to the algorithm: -; -; Sector := (Block# MOD hdSPT)+1 (* Quotient1 := Block# DIV hdSPT *) -; Head := Quotient1 MOD hdHds (* Quotient2 := Quotient1 DIV hdHds *) -; Track := Quotient2 - -HDREAD: - JP HDSK_READ - - IF BANKED - COMMON /B2RAM/ - ELSE - DSEG - ENDIF - -HRTrys: DEFS 1 ; Retry counter storage -hdUnit: DEFS 1 ; IDE Drive (0 = Master, 1 = Slave) -hdTrks: DEFS 2 ; Number of Tracks on IDE Drive -hdHds: DEFS 1 ; Number of Heads on IDE Drive -hdSPT: DEFS 1 ; Number of Sectors-Per-Track on IDE Drive - -; IDE Command Block for User Direct Driver Access - -hdComd: DEFS 1 ; Command Byte -hdBMap: DEFS 1 ; Bit Map (B6..0) of Following Bytes to Set -hdHead: DEFS 1 ; Head Number/Number of Heads in B3..0 -hdTrkH: DEFS 1 ; Hi-Track (Cylinder) Byte -hdTrkL: DEFS 1 ; Lo-Track (Cylinder) Byte -hdSec: DEFS 1 ; Sector Number -hdSCnt: DEFS 1 ; Sector Count -hdErr: DEFS 1 ; Error Reg Value -hdDigO: DEFS 1 ; Digital Output Reg Value -CMDSIZ EQU $-hdComd ; Size of Command Block - -DATADR: DEFS 2 ; Pointer to User Buffer Space (user bank) - IF NOWAIT -;WTSAVE: DEFS 1 ; Storage for Entry Wait State Setting - ENDIF -;======================= End of HARDIDE =========================== - - - IF BANKED - COMMON /BANK2/ - ELSE - CSEG - ENDIF - -; -;================================================================================================== -; HDSK DISK DRIVER -;================================================================================================== -; -; IO PORT ADDRESSES -; -HDSK_IO EQU 0FDH -; -HDSK_CMDNONE EQU 0 -HDSK_CMDRESET EQU 1 -HDSK_CMDREAD EQU 2 -HDSK_CMDWRITE EQU 3 -HDSK_CMDPARAM EQU 4 -; -; STATUS -; -HDSKRC_OK EQU 0 -; -; -; -HDSK_READ: -; CALL PRTSTRD -; DEFB '[HDSK READ]$' - - LD A,HDSK_CMDREAD - JR HDSK_RW -; -; -; -HDSK_WRITE: -; CALL PRTSTRD -; DEFB '[HDSK WRITE]$' - LD A,HDSK_CMDWRITE - JR HDSK_RW -; -; -; -HDSK_RW: - LD (HDSK_CMD),A - - ; CLEAR RESULTS - XOR A ; A = 0 - LD (HDSK_RC),A ; CLEAR RETURN CODE - - ; INIT IF NEEDED - LD A,(HDSK_STAT) ; GET CURRENT STATUS - OR A ; SET FLAGS - CALL NZ,HDSK_RESET ; RESET IF NOT READY - -; ; SET SECTOR (IGNORES MSB) -; LD A,(HSTSEC) -; LD (HDSK_SEC),A - -; ; SET TRACK -; LD BC,(HSTTRK) -; LD (HDSK_TRK),BC - - ; BPBIOS DEFINES 16 SECTORS PER TRACK - ; CONVERT TO 256 SECTORS PER TRACK FOR SIMH DEFINITION - ; FIRST, DIVIDE TRACKS BY 16 SAVING REMAINDER IN TOP NIBBLE OF A - LD HL,(HSTTRK) - XOR A ; CLEAR A - LD B,4 ; ROTATE 4 BITS TO DIVIDE BY 4 -HDSK_RW0: - SRL H - RR L - RR A - DJNZ HDSK_RW0 - LD (HDSK_TRK),HL ; SAVE MODIFIED TRACK FOR HDSK I/O CALL - LD HL,HSTSEC ; POINT TO INCOMING SECTOR - OR (HL) ; COMBINE WITH SECTOR VALUE PASSED IN - LD (HDSK_SEC),A ; SAVE IT FOR HDSK I/O CALL - - ; SET TRANSFER ADDRESS - LD BC,HSTBUF - LD (HDSK_DMA),BC - - ; EXECUTE COMMAND - LD B,7 ; SIZE OF PARAMETER BLOCK - LD HL,HDSK_PARMBLK ; START ADDRESS OF PARAMETER BLOCK -HDSK_RW1: - LD A,(HL) ; GET BYTE OF PARAMETER BLOCK - OUT (0FDH),A ; SEND IT TO PORT - INC HL ; POINT TO NEXT BYTE - DJNZ HDSK_RW1 - - IN A,(0FDH) ; GET RESULT CODE - LD (HDSK_RC),A - OR A - JR Z,HDSK_OK - JR HDSK_ERR - -HDSK_ERR: - XOR A - DEC A ; A=$FF TO SIGNAL ERROR - LD (HDSK_STAT),A ; SAVE IT - RET - -HDSK_OK: - XOR A - RET -; -; -; -HDSK_RESET: - LD B,32 - LD A,HDSK_CMDRESET -HDSK_RESET1: - OUT (0FDH),A - DJNZ HDSK_RESET1 - - XOR A ; STATUS = OK - LD (HDSK_STAT),A ; SAVE IT - - RET -; -;================================================================================================== -; HDSK DISK DRIVER - DATA -;================================================================================================== -; - IF BANKED - COMMON /B2RAM/ - ELSE - DSEG - ENDIF - -HDSK_STAT DEFB 0 -HDSK_RC DEFB 0 -; -HDSK_PARMBLK: -HDSK_CMD DEFB 0 ; COMMAND (HDSK_READ, HDSK_WRITE, ...) -HDSK_DEVICE DEFB 0 ; 0..7, HARD DISK UNIT -HDSK_SEC DEFB 0 ; 0..255 SECTOR -HDSK_TRK DEFW 0 ; 0..2047 TRACK -HDSK_DMA DEFW 0 ; DEFINES WHERE RESULT IS PLACED IN MEMORY - - - - - \ No newline at end of file diff --git a/Source/BPBIOS/hbios.z80 b/Source/BPBIOS/hbios.z80 index c8671c87..2dcbf735 100644 --- a/Source/BPBIOS/hbios.z80 +++ b/Source/BPBIOS/hbios.z80 @@ -1,7 +1,7 @@ ;:::::::::::::::::::::::::::::::::::::::***************************** ; HBIOS - HBios Interface Routines ***** Hardware-Specific ***** ; ***************************** -; +; - Retro Brew - ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ; HB_DEFBNK EQU BID_USR ; Default bank number @@ -11,16 +11,20 @@ HB_DEFBNK EQU BID_USR ; Default bank number HB_DISPATCH EQU 403H HB_STACK EQU 500H ; +; HBIOS Functions +; +H_ALLOC EQU 0F6H ; HBIOS Func: ALLOCATE Heap Memory +; ; PLATFORM SPECIFIC CONSTANTS ; - IF N8VEM OR ZETA OR ZETA2 + IF SBC OR ZETA OR ZETA2 SBC_BASE EQU 60H - ENDIF + ENDIF ;SBC OR ZETA OR ZETA2 - IF N8VEM OR ZETA + IF SBC OR ZETA MPCL_RAM EQU SBC_BASE + 18H ; BASE IO ADDRESS OF RAM MEMORY PAGER CONFIGURATION LATCH MPCL_ROM EQU SBC_BASE + 1CH ; BASE IO ADDRESS OF ROM MEMORY PAGER CONFIGURATION LATCH - ENDIF + ENDIF ;SBC OR ZETA IF ZETA2 MPGSEL_0 EQU SBC_BASE + 18H @@ -28,18 +32,18 @@ MPGSEL_1 EQU SBC_BASE + 19H MPGSEL_2 EQU SBC_BASE + 1AH MPGSEL_3 EQU SBC_BASE + 1BH MPGENA EQU SBC_BASE + 1CH - ENDIF + ENDIF ;ZETA2 IF N8 N8_BASE EQU 80H ; BASE I/O ADDRESS BOARD PERIPHERALS (NON-CPU) ACR EQU N8_BASE + 14H ; AUXILLARY CONTROL REGISTER DEFACR EQU 1BH ; DEFAULT VALUE FOR ACR CPU_BBR EQU 40H + 39H - ENDIF + ENDIF ;N8 IF MK4 CPU_BBR EQU 40H + 39H - ENDIF + ENDIF ;MK4 CSEG @@ -51,20 +55,20 @@ HB_XFC EQU 0FFE0H HB_XFCIMG EQU $ .PHASE HB_XFC -HB_CURBNK DB 0 -HB_INVBNK DB 0 -HB_SRCADR DW 0 -HB_SRCBNK DB 0 -HB_DSTADR DW 0 -HB_DSTBNK DB 0 -HB_CPYLEN DW 0 +HB_CURBNK: DB 0 +HB_INVBNK: DB 0 +HB_SRCADR: DW 0 +HB_SRCBNK: DB 0 +HB_DSTADR: DW 0 +HB_DSTBNK: DB 0 +HB_CPYLEN: DW 0 DB 0,0,0,0,0,0 -HB_INVOKE JP HBX_INVOKE -HB_BNKSEL JP HBX_BNKSEL -HB_BNKCPY JP HBX_BNKCPY -HB_BNKCALL JP 0 ; HBX_BNKCALL (NOT IMPLEMENTED) +HB_INVOKE: JP HBX_INVOKE +HB_BNKSEL: JP HBX_BNKSEL +HB_BNKCPY: JP HBX_BNKCPY +HB_BNKCALL: JP 0 ; HBX_BNKCALL (NOT IMPLEMENTED) DB 0,0 ; RESERVED -HB_IDENT DW 0 ; HBX_IDENT +HB_IDENT: DW 0 ; HBX_IDENT .DEPHASE HB_XFCSIZ EQU $ - HB_XFCIMG @@ -84,7 +88,7 @@ HB_DSTADR EQU 0FFE5H HB_DSTBNK EQU 0FFE7H HB_CPYLEN EQU 0FFE8H - ENDIF + ENDIF ;INTPXY ; ;================================================================================================== @@ -107,7 +111,7 @@ HBX_INIT: LD HL,HBX_INVOKE LD (09H),HL - ENDIF + ENDIF ;INTPXY ; Init HB data fields LD A,BID_USR @@ -115,7 +119,7 @@ HBX_INIT: LD (HB_SRCBNK),A LD (HB_DSTBNK),A - IF BANKED + IF BANKED ; Copy vectors from TPA page zero to SYS page zero LD BC,(TPABNK) ; C := TPABNK, B := SYSBNK @@ -126,19 +130,12 @@ HBX_INIT: CALL MOVE ; Do it LD A,(TPABNK) ; Set all Bank regs to TPA - ENDIF - -; CSEG -;ORG_CSEG EQU $ -; DSEG -;ORG_DSEG EQU $ - IF BANKED COMMON /BANK2/ ORG_BANK2 EQU $ COMMON /B2RAM/ ORG_B2RAM EQU $ - ENDIF - + ENDIF ;BANKED +; begin debug CSEG CALL NEWLINE2 @@ -149,7 +146,7 @@ ORG_B2RAM EQU $ LD DE,HB_STR_INTPXY ELSE LD DE,HB_STR_EXTPXY - ENDIF + ENDIF ;INTPXY CALL WRITESTR CALL NEWLINE @@ -175,21 +172,21 @@ ORG_B2RAM EQU $ CALL WRITESTR LD BC,ALV$50 CALL PRTHEXWORD - ENDIF + ENDIF ;BANKED CALL NEWLINE RET -HB_STR_TAG DB "HBIOS: $" -HB_STR_INTPXY DB "Internal Proxy$" -HB_STR_EXTPXY DB "External Proxy$" -HB_STR_CSEG DB "CSEG=$" -HB_STR_DSEG DB ", DSEG=$" -HB_STR_BANK2 DB ", BANK2=$" -HB_STR_B2RAM DB ", B2RAM=$" -HB_STR_RESVD DB ", RESVD=$" - +HB_STR_TAG: DB "HBIOS: $" +HB_STR_INTPXY: DB "Internal Proxy$" +HB_STR_EXTPXY: DB "External Proxy$" +HB_STR_CSEG: DB "CSEG=$" +HB_STR_DSEG: DB ", DSEG=$" +HB_STR_BANK2: DB ", BANK2=$" +HB_STR_B2RAM: DB ", B2RAM=$" +HB_STR_RESVD: DB ", RESVD=$" +; end debug HBX_XCOPY: LD A,C LD (HB_SRCBNK),A @@ -209,13 +206,13 @@ HBX_COPY: HBX_BNKSEL: LD (HB_CURBNK),A - IF N8VEM OR ZETA + IF SBC OR ZETA OUT (MPCL_ROM),A OUT (MPCL_RAM),A RET - ENDIF + ENDIF ;SBC OR ZETA - IF ZETA2 + IF ZETA2 BIT 7,A ; BIT 7 SET REQUESTS RAM PAGE JR Z,HBX_ROM ; NOT SET, SELECT ROM PAGE RES 7,A ; RAM PAGE REQUESTED: CLEAR ROM BIT @@ -227,9 +224,9 @@ HBX_ROM: INC A ; OUT (MPGSEL_1),A ; BANK_1: 16K - 32K RET - ENDIF + ENDIF ;ZETA2 - IF N8 + IF N8 BIT 7,A JR Z,HBX_ROM ; @@ -250,9 +247,9 @@ HBX_ROM: LD A,DEFACR OUT0 (ACR),A RET - ENDIF + ENDIF ; N8 - IF MK4 + IF MK4 RLCA JR NC,HBX_BNKSEL1 XOR 00100001B @@ -262,7 +259,7 @@ HBX_BNKSEL1: OUT0 (CPU_BBR),A RET - ENDIF + ENDIF ; MK4 ;================================================================================================== ; INTERBANK MEMORY COPY @@ -351,7 +348,7 @@ HBX_INVSP EQU $ - 2 RET ; RETURN TO CALLER - ENDIF + ENDIF ;INTPXY ;================================================================================================== ; LD A,(C:HL) @@ -449,15 +446,16 @@ HBX_FRPUTW: DSEG -HB_DSKBUF DEFW 0 ; Address of physical disk buffer in HBIOS bank -HBX_BNKSAV DEFB 0 ; Saved bank id during HBIOS calls -HBX_STKSAV DEFW 0 ; Saved stack pointer during HBIOS calls +HB_DSKBUF: DEFW 0 ; Address of physical disk buffer in HBIOS bank +HBX_BNKSAV: DEFB 0 ; Saved bank id during HBIOS calls +HBX_STKSAV: DEFW 0 ; Saved stack pointer during HBIOS calls DEFS 32 ; Private stack for HBIOS HBX_TMPSTK EQU $ ; Top of private stack IF INTPXY HBX_BUFSIZ EQU 40H -HBX_BUF DEFS HBX_BUFSIZ ; Interbank copy buffer +HBX_BUF: DEFS HBX_BUFSIZ ; Interbank copy buffer - ENDIF + ENDIF ;INTPXY + \ No newline at end of file diff --git a/Source/BPBIOS/ibmv-dx.z80 b/Source/BPBIOS/ibmv-dx.z80 deleted file mode 100644 index f5b302bb..00000000 --- a/Source/BPBIOS/ibmv-dx.z80 +++ /dev/null @@ -1,302 +0,0 @@ -;:::::::::::::::::::::::::::::::::::::::***************************** -; IBMOVE - Inter-Bank Move Routines ***** Hardware-Specific ***** -; D-X Designs Pty Ltd P112 ***************************** -; -; 1.0a- 17 Aug 01 - Cleaned up for GPL Release. HFB -; 1.0 - 10 Jun 96 - Initial Release for P112 from YASBEC. HFB -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - - CSEG - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Move Data - Possibly between banks. This resembles CP/M 3, but -; usage of the HL and DE registers is reversed. -; Enter: HL = Source Address -; DE = Destination Address -; BC = Number of bytes to move -; Exit : None -; Uses : AF,BC,DE,HL -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -MOVE: LD (ICNT),BC ; Save length of move - LD BC,(SRCBNK) ; Get Source (C) and Dest (B) Banks - RL H ; Move MSB of Source Addr to Carry - LD A,C ; .get Source Bank - JR NC,MOVB0 ; ..jump if Source < 8000H (Not Common Bank) - LD A,(TPABNK) ; Else Set to TPA Bank for Common Access -MOVB0: ADC A,0 ; ..add Carry to Bank # - RRA ; ...shift Bank # in position for Z-180 DMA - RR H ; .move Carry to Address Bit 7 - LD (ISRC+2),A ; Save Source Bank physical byte - LD (ISRC),HL ; ..and Save Source Address - RL D ; Move MSB of Dest Addr to Carry - LD A,B ; .Get Destination Bank - JR NC,MOVB1 ; ..jump if Source < 8000H (Not Common Bank) - LD A,(TPABNK) ; Else Set to TPA Bank for Common Access -MOVB1: ADC A,0 ; ..add Carry to Bank # - RRA ; ...shift into position for Z-180 DMA - RR D ; .move Carry to Address Bit 7 - LD (IDST+2),A ; Save Destination Bank byte - LD (IDST),DE ; ..and Save Destination Address - - LD HL,ISRC ; Point to DMA Initialization block - CALL DMAMOV ; ..and use the Z-180 DMA - - LD HL,(TPABNK) ; Get TPA Bank # - LD H,L ; .to both H and L - LD (SRCBNK),HL ; ..set Source & Destination Bank # to TPA - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Routine to Switch to Local Stack for Banked Operations -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - - CSEG - -BIOSTK: DEFB 0 ; NOP if not currently in bank, - ; ..RET if we are - LD (USP-7),HL ; Save entry HL - POP HL ; Retrieve caller's return address from stack - LD (USP-5),HL ; ..and set in our stack for local return - DI ; No interrupts while we play with the stack - LD (USP),SP ; Save User's Stack Pointer - LD SP,USP-1 ; ..and point locally, saving 1 byte for Bank - PUSH AF ; Save entry A and Flags - IN0 A,(BBR) ; Get current bank address - LD (USP-1),A ; ..and save for exitting - LD A,0C9H ; Disable other calls here - LD (BIOSTK),A ; ..by poking a RETurn at entry - POP AF ; Restore entry AF - LD HL,USRSTK ; Set banked return address - PUSH HL ; ..at USP-2 & 3 - LD SP,USP-7 ; Point stack pointer to do local return - POP HL ; .restoring entry HL - EI ; ..enabling interrupts - RET ; And return to caller - -; Restore User Stack and Bank Routine - -USRSTK: PUSH AF - LD A,(USP-1) ; Get bank control byte from entry - OUT0 (BBR),A ; ..and make it current - XOR A - LD (BIOSTK),A ; Patch NOP back in at start of code - POP AF - LD SP,(USP) ; Restore user stack - RET ; And return to caller - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Restore Bank and Stack Ptr to Entry and Jump to (HL) -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -FRCLR: PUSH AF ; Save any entry in AF - LD A,(USP-1) ; Get bank control byte - OUT0 (BBR),A ; ..and make current - XOR A - LD (BIOSTK),A ; Patch NOP to enable stack switcher - POP AF - LD SP,(USP) ; Restore User Stack - JP (HL) ; ..and jump to vector - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Abort a Process (possibly in Alternate Bank) and Warm Boot -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -ABORT: LD SP,USP ; Insure stack is in Common Memory - LD A,(TPABNK) - CALL SELBNK ; Insure TPA in Context - XOR A - LD (BIOSTK),A ; Remove patch - RST 0 ; ..And Warm Boot - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Return Current Memory Bank in Context -; Entry: none -; Exit : A = Current Memory Bank -; Uses : AF -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -RETMEM: IN0 A,(BBR) ; Read Bank Base Register - RRA ; Shift - RRA ; .to right - RRA ; ..to give Bank # - AND 1FH ; Mask off junk - RET ; ..and return it to caller - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Set Bank into context. Save all Registers. -; A = Bank -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -SELMEM: LD (USRBNK),A ; Update user bank - ;..fall thru to set specified bank.. -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; SELBNK - Switch Memory Bank to Bank in A and show as current. -; Must preserve all Registers including Flags. -; All Bank Switching MUST be done by this routine -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -SELBNK: PUSH AF ; Save regs -SELBN0: LD (CURBNK),A ; Save as current bank # - ADD A,A ; Shift into position for Z-180 DMA regs - ADD A,A - ADD A,A - OUT0 (BBR),A ; ..and Set the bank offset - POP AF ; restore regs - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Set Bank for DMA Xfer. Preserve All Registers -; A = Bank Number -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -SETBNK: LD (DMABNK),A - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Set Banks for Inter-Bank Xfer. Save all Registers. -; B = Destination Bank, C = Source Bank -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -XMOVE: LD (SRCBNK),BC - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Select System Bank -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -GOSYSB: PUSH AF - LD A,(SYSBNK) ; Get system bank - JR SELBN0 ; ..and set - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Set Bank for FRJP and FRCALL (Reg A) -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -STFARC: LD (JPBNK),A - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Jump to (HL) in Alternate Bank -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -FRJP: CALL BIOSTK ; Insure we are in a common stack - PUSH AF - LD A,(JPBNK) - CALL SELBNK ; Select the destination bank - POP AF - JP (HL) ; ..and go - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Load A,(HL) from Alternate Bank (in Reg C) -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -FRGETB: IN0 A,(BBR) ; Get current bank control byte - PUSH BC ; Save regs - LD B,A ; ..and entry bank - LD A,C ; Get source bank - ADD A,A ; Shift into position for Z-180 DMA regs - ADD A,A - ADD A,A - DI ; .no Ints here - OUT0 (BBR),A ; ..and Set the bank offset - LD C,(HL) ; Get the byte - LD A,B ; .entry bank - OUT0 (BBR),A ; ..and restore entry bank - EI - LD A,C ; Get the byte - POP BC ; ..and restore regs - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Load DE,(HL) from Alternate Bank -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -FRGETW: PUSH BC ; Save regs - LD B,A ; ..and entry bank - IN0 A,(BBR) ; Get current Bank Byte - LD (ASAVE),A ; ..saving locally - LD A,C ; Get source bank - ADD A,A ; Shift into position for Z-180 DMA regs - ADD A,A - ADD A,A - DI ; .no ints allowed here - OUT0 (BBR),A ; ..and Set the bank offset - LD E,(HL) ; Get Low byte - INC HL - LD D,(HL) ; ..and High byte - DEC HL ; Retain addr pointer - JR GPEX ; ..and exit - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Load (HL),A to Alternate Bank (in Reg C) -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -FRPUTB: PUSH BC ; Save all regs - LD B,A ; Store byte temporarily - IN0 A,(BBR) ; Get current bank byte - LD (ASAVE),A ; ..saving in Common Memory - LD A,C ; Get destination bank - ADD A,A ; Shift into position for Z-180 DMA regs - ADD A,A - ADD A,A - DI ; .allowing no interrupts - OUT0 (BBR),A ; ..and Set the bank offset - LD (HL),B ; ..and stuff the byte -GPEX: LD A,(ASAVE) ; Retrieve Entry Bank byte - OUT0 (BBR),A ; ..and restore to active - EI ; Interrupts Ok now - LD A,B ; Restore byte - POP BC ; ..and rest of regs - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Load (HL),DE to Alternate Bank -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -FRPUTW: PUSH BC ; Save regs - LD B,A ; ..and entry bank - IN0 A,(BBR) ; Get current Bank Byte - LD (ASAVE),A ; ..saving locally - LD A,C ; Get source bank - ADD A,A ; Shift into position for Z-180 DMA regs - ADD A,A - ADD A,A - DI ; .no Ints allowed - OUT0 (BBR),A ; ..and Set the bank offset - LD (HL),E ; Save Low byte - INC HL - LD (HL),D ; ..and High byte - DEC HL ; Retain addr pointer - JR GPEX ; ..and exit - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - DSEG - -JPBNK: DEFS 1 ; Bank # for Far Jump or Call -USRBNK: DEFS 1 ; User's selected bank # -CURBNK: DEFS 1 ; Current bank # -SRCBNK: DEFS 1 ; Move Source Bank # -DSTBNK: DEFS 1 ; Move Destination Bank # -DMABNK: DEFS 1 ; Target bank # for disk xfers - DEFS 64 ; 32 level stack -USP: DEFS 2 ; User stack pointer -ASAVE: DEFS 1 ; Temp storage for User's A-Register - -; Z-180 DMA transfer block for inter-bank moves - -ISRC: DEFS 2 ; Source Segment address - DEFS 1 ; ..Source Bank in physical RAM -IDST: DEFS 2 ; Destination Segment address - DEFS 1 ; ..Destination Bank in physical RAM -ICNT: DEFS 2 ; Number of bytes to move - -; The P112 does not need this buffer, but other versions might - - IF INROM OR [NOT IBMOVS] - DSEG -IBMVBF: DEFS 256 ; Inter-bank move buffer - ENDIF - -;======================= End of IBMV-DX =========================== - \ No newline at end of file diff --git a/Source/BPBIOS/ibmv-ww.z80 b/Source/BPBIOS/ibmv-ww.z80 index 540cf8a8..400090fb 100644 --- a/Source/BPBIOS/ibmv-ww.z80 +++ b/Source/BPBIOS/ibmv-ww.z80 @@ -1,6 +1,6 @@ ;:::::::::::::::::::::::::::::::::::::::***************************** ; IBMOVE - Inter-Bank Move Routines ***** Hardware-Specific ***** -; for RomWBW HBIOS ***************************** +; using RomWBW HBIOS ***************************** ; ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -189,4 +189,5 @@ DMABNK: DEFS 1 ; Target bank # for disk xfers DEFS 64 ; 32 level stack USP: DEFS 2 ; User stack pointer -;======================= End of IBMV-DX =========================== +;======================= End of IBMV-WW =========================== + \ No newline at end of file diff --git a/Source/BPBIOS/icfg-dx.z80 b/Source/BPBIOS/icfg-dx.z80 deleted file mode 100644 index fcef45eb..00000000 --- a/Source/BPBIOS/icfg-dx.z80 +++ /dev/null @@ -1,187 +0,0 @@ -;::::::::::::::::::::::::::::::::::::::::::******************************** -; I/O Configuration Area ****** Hardware Specific ****** -; - D-X Designs Pty Ltd P112 - ******************************** -; -; 1.2 - 22 Aug 01 - Cleaned up for GPL release. HFB -; 1.1 - 18 Apr 97 - Modified to Add GIDE Definitions. HFB -; 1.0 - 27 Jan 97 - Initial Release for P112. HFB -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -;*** * * * * * * * * * * W A R N I N G ! ! ! * * * * * * * * * * * * *** -;*** Do NOT alter any of the ordering or sizing of the following data *** -;*** locations or utilities will probably NOT function correctly! *** -;*** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *** - - CSEG -; Form Option Byte 1 - -OPT1 DEFL [BANKED AND 1] ; Bit 0 = unbanked/banked -OPT1 DEFL OPT1+[INROM AND 2] ; Bit 1 = Bank in RAM/Bank in ROM -OPT1 DEFL OPT1+[AUTOSL AND 4] ; Bit 2 = DPB Fixed/DPB Assignable -OPT1 DEFL OPT1+[BANKED AND ZSDOS2 AND 8] ; Bit 3 = ALV/CSV in Banked RAM -; Bit 7 is "Lock" flag for system loads -; If set to 1, LDSYS will not load a -; new system over the running one. - - DEFB 'B/P-DX' ; Six-char string for Text ID Matching - -CONFIG: -IOBYT: DEFB 10010100B ; LST:=PIO, AUX:=COM2, CON:=COM1 -SYSDRV: DEFB 0 ; System drive (a=0, b=1...) -OPTF1: DEFB OPT1 ; Option flags - -UABNK: DEFB BNKU ; Beginning of User Bank(s) if Banked System - ; (Ending Bank denoted by SYSBNK-1) -TPABNK: DEFB BNK0 ; TPA Bank Number if Banked System -SYSBNK: DEFB BNK2 ; Beginning of System Bank(s) if Banked System - ; (Ending Bank denoted by RAMBNK-1) -RAMBNK: DEFB BNK3 ; Base Bank Number for Ram Disk -MAXBNK: DEFB BNKM ; Highest permissible Bank Number -HICOMM: DEFB 80H ; Page address of start of high Common Memory -DPBSZ: DEFB DPBSIZ ; Size of DPB -NUMDPB: - IF BANKED - DEFB 0 ; Number of DPBs in Common RAM - DEFB NRDPB ; Number of Banked DPBs - ELSE - DEFB NRDPB ; Number of DPBs in Common RAM - DEFB 0 ; Number of Banked DPBs - ENDIF -DPBADR: - IF BANKED - DEFW 0 ; Pointer to dirst Common RAM XDPB - DEFW DPB ; Pointer to first XDPB in Alternate Bank - ELSE - DEFW DPB ; Pointer to first Common RAM XDPB - DEFW 0 ; Pointer to first XDPB in Alternate Bank - ENDIF - -AUTOCMD: DEFB 8,'STARTUP ',0 ; Startup command for Z3 - -ENVADR: DEFW Z3ENV ; Pointer to the Environment Descriptor - -;------------ Banked User Area Control Information --------------- -; An existing User Area cannot exist in Bank 0 by decree. The User Area -; can therefore be used as a flag to determine whether such an area exists. -; The Bank Number is set in DEF-xx.LIB. To keep Page 0 equivalent free in -; the user bank, we offset values to 80H (it's just a good number). The -; top of each User Bank is 7FFFH as with all of the switched banks in -; a B/P Bios System. Banked applications should chain themselves together -; sequentially so that the end can be determined and space managed. - -UADAT: DEFB BNKU ; Flag for Banked User Area (0 if None) - DEFW 0080H ; Pointer to Start of User area in Bank - -;---------------- CPU Configuration Information ------------------ - -SPEED: DEFB MHZ ; Set to processor speed value in Configuration -WAITS: DEFB 00010010B ; Number of additional Memory & IO Wait states -; ||||++++--- # of IO Wait States (bits 3-0, only 1 & 0 used) -; ++++------- # of Memory Wait States (bits 7-4, only 5 & 4 used) - -RELOD0: DEFW 2560*MHZ ; 16-bit constant for counter/timer refresh - ; based on 50 mS Interrupts to Down Timer. - ; Use 2560 for 12.288/18.432MHz etc. Crystals, - ; 2500 for 16.000MHz Crystals. - -;-------- Physical Floppy Disk Configuration Information --------- -; The Physical Drive table consists of 5 bytes for each of 4 Floppy Drives -; thereby providing all necessary data to all types of controllers. -; -; 1 - Drive Characteristics Bits. The Bits have the following meanings: -; D D D D D D D D -; 7 6 5 4 3 2 1 0 -; | | | | | +-+-+---- Disk Size 000=Fixed; 001=8"; 010=5.25"; 011=3.5" (*) -; | | | | +---------- Single-Sided (0); Double-Sided (1) -; | | | +------------ (Reserved for Double-Step(1) in XDPH) -; | | +-------------- Drive Motor Control (1); Motor Always On (0) -; | +---------------- Max Speed is 5.25" (0); 8" & Hard Disk & Hi-Dens (1) -; +------------------ (Reserved for Single(1)/Double(0) Density in XDPH) -; (*) - 3.5" and 5.25" drives are treated the same for many formats with -; the drive bits being reduced to 010B in the BIOS code. -; 2 - Drive Step Rate (1 to 16 in increments of 1) in milliseconds -; 3 - Head Load Time (2 to 254 in increments of 2) in milliseconds -; 4 - Head Unload Time (16 to 240 in increments of 16) in milliseconds -; 5 - Number of Physical Tracks on Drive - -FDCSPEC: DEFB 6BH,3, 4,240,80 ; #1 (3"DSHD,3 mS Step,4mS HLT,255 mS HUT,80t) - DEFB 2AH,6,24,240,40 ; #2 (5"DS,6 mS Step,24mS HLT,255 mS HUT,40t) - DEFB 2AH,4,24,240,80 ; #3 (5"DS,4 mS Step,24mS HLT,255 mS HUT,80t) - DEFB 6AH,3, 4,240,80 ; #4 (5"DS,3 mS Step, 4mS HLT,255 mS HUT,80t) - -MONTIM: DEFB 100 ; Motor On Time (1 to 255) in tenths-of-seconds -SPINUP: DEFB 8 ; Spinup delay (1 to 255) in tenths-of-seconds -MXRTRY: DEFB 4 ; Maximum Number of retries on Floppy Opns - -IVCT: DEFW INTTBL ; Pointer to interrupt vectors - -;-------- Physical Hard Drive Configuration Information ---------- -; Hard Disk data begins w/Controller Type, followed by data for 3 drives. -; The first byte for each drive consists of a byte containing bit codes -; for SCSI Device, Logical Unit, and a bit indicating whether or not the -; drive is physically connected to the system. The configuration should -; match that contained in DPHHD-xx.LIB for Hard Drive partitions. -; Bit 7 6 5 4 3 2 1 0 -; | | | | | | | | -; | | | | | +-+-+-- Physical Device Number (0..6, 7 = Host) -; | | | | +-------- (reserved) -; | | | +---------- 1 = Drive Active, 0 = No Drive -; +-+-+------------ Logical Unit Number (usually 0 or 1) - -;..... -; The Controller Type Byte contains information needed to dictate the specific -; bytes to be used to communicate to a SASI/SCSI-connected Hard Drive. -; Additional bytes will be defined as needed, so please coordinate any -; extensions with the Authors to insure the generality of tools. - -CNTRLR: DEFB 80H ; Controller Types recognized are: - ; 0- Owl 5- Conner SCSI - ; 1- Adaptec ACB-4000A 6- Quantum SCSI - ; 2- Xebec 1410A/Shugart 1610-3 7- Maxtor SCSI - ; 3- Seagate SCSI 8- Syquest SCSI - ; 4- Shugart 1610-4 Minimal SCSI 80H- GIDE (IDE/ATA) - -; First drive (Parameters for Toshiba MK-1544 IDE) - -BITS DEFL 00000000B ; SCSI - Physical Device 0, Logical Unit 0 - ; IDE - Drive 0 = Master -BITS DEFL BITS+[UNIT_0 AND 10H] ; If active, set Bit 4 - -HDRV0: DEFB BITS ; Set Device, Unit, and Active bits - DEFW 581 ; Number of Cylinders - DEFB 2 ; Number of Heads - DEFW 36 ; SCSI - Cylinder # to start reduced write - ; IDE - Number of Sectors Per Track - DEFW 0000 ; Cylinder # to start precompensation - DEFB 0 ; Step Rate (0=3ms, 1=28us, 2=12us) - -; Second drive (Parameters for Seagate ST-125N SCSI) - -BITS DEFL 00000001B ; SCSI - Physical Device 1, Logical Unit 0 - ; IDE - Drive 1 = Slave -BITS DEFL BITS+[UNIT_1 AND 10H] ; If active, set Bit 4 - -HDRV1: DEFB BITS ; Set Device, Unit, and Active bits - DEFW 615 ; Syquest ST-125N - DEFB 4 - DEFW 0000 - DEFW 0000 - DEFB 0 - -; Third drive (Parameters for Miniscribe 8425 SCSI) - -BITS DEFL 00000010B ; Physical Device 2, Logical Unit 0 - ; IDE - (undefined) -BITS DEFL BITS+[UNIT_2 AND 10H] ; If active, set Bit 4 - - DEFB BITS ; Set Device, Unit, and Active bits - DEFW 615 - DEFB 4 - DEFW 615 - DEFW 300 - DEFB 2 - - DEFB 0,0,0,0,0 ; (Reserved) - -;======= End of Fixed Config ======== Device Config follows ======== - \ No newline at end of file diff --git a/Source/BPBIOS/icfg-ww.z80 b/Source/BPBIOS/icfg-ww.z80 index 4b17951a..82a4d312 100644 --- a/Source/BPBIOS/icfg-ww.z80 +++ b/Source/BPBIOS/icfg-ww.z80 @@ -1,7 +1,9 @@ ;::::::::::::::::::::::::::::::::::::::::::******************************** ; I/O Configuration Area ****** Hardware Specific ****** -; - D-X Designs Pty Ltd P112 - ******************************** +; - Retro-Brew Computers w/ HBIOS- ******************************** ; +; 1.4 - 29 Nov 16 - Updated for HBIOS version 2.8 WW +; 1.3 - 17 Jan 14 - N8VEM Initial Test release WW+LN ; 1.2 - 22 Aug 01 - Cleaned up for GPL release. HFB ; 1.1 - 18 Apr 97 - Modified to Add GIDE Definitions. HFB ; 1.0 - 27 Jan 97 - Initial Release for P112. HFB @@ -26,8 +28,9 @@ OPT1 DEFL OPT1+[BANKED AND ZSDOS2 AND 8] ; Bit 3 = ALV/CSV in Banked RAM DEFB 'B/P-WW' ; Six-char string for Text ID Matching CONFIG: -IOBYT: DEFB 10010100B ; LST:=PIO, AUX:=COM2, CON:=COM1 -SYSDRV: DEFB 0 ; System drive (a=0, b=1...) +;IOBYT: DEFB 10010100B ; LST:=PIO, AUX:=COM2, CON:=COM1 +IOBYT: DEFB 11111100B ; LST:=Null, AUX:=Null, CON:=COM1 +SYSDRV: DEFB 2 ; System drive (a=0, b=1...) OPTF1: DEFB OPT1 ; Option flags UABNK: DEFB BNKU ; Beginning of User Bank(s) if Banked System @@ -57,6 +60,7 @@ DPBADR: ENDIF AUTOCMD: AUTOCL ; Startup command for Z3 +;AUTOCMD: DEFB 8,'startupf',0 ; Startup command for Z3 ENVADR: DEFW Z3ENV ; Pointer to the Environment Descriptor @@ -104,51 +108,79 @@ RELOD0: DEFW 2560*MHZ ; 16-bit constant for counter/timer refresh ; 4 - Head Unload Time (16 to 240 in increments of 16) in milliseconds ; 5 - Number of Physical Tracks on Drive -FDCSPEC: DEFB 6BH,3, 4,240,80 ; #1 (3"DSHD,3 mS Step,4mS HLT,255 mS HUT,80t) - DEFB 2AH,6,24,240,40 ; #2 (5"DS,6 mS Step,24mS HLT,255 mS HUT,40t) - DEFB 2AH,4,24,240,80 ; #3 (5"DS,4 mS Step,24mS HLT,255 mS HUT,80t) - DEFB 6AH,3, 4,240,80 ; #4 (5"DS,3 mS Step, 4mS HLT,255 mS HUT,80t) +FDCSPEC: DEFB 6BH,4,24,240,80 ; #1 (3"DSHD,4 mS Step,24mS HLT,240 mS HUT,80t) + DEFB 2AH,4,24,240,40 ; #2 (5"DS,4 mS Step,24mS HLT,240 mS HUT,40t) + DEFB 2AH,4,24,240,80 ; #3 (5"DS,4 mS Step,24mS HLT,240 mS HUT,80t) + DEFB 6AH,4,24,240,80 ; #4 (3"DS,4 mS Step, 24mS HLT,240 mS HUT,80t) MONTIM: DEFB 100 ; Motor On Time (1 to 255) in tenths-of-seconds SPINUP: DEFB 8 ; Spinup delay (1 to 255) in tenths-of-seconds MXRTRY: DEFB 4 ; Maximum Number of retries on Floppy Opns +;IVCT: DEFW INTTBL ; Pointer to interrupt vectors - WW IVCT: DEFW 0 ; Pointer to interrupt vectors ;-------- Physical Hard Drive Configuration Information ---------- ; Hard Disk data begins w/Controller Type, followed by data for 3 drives. -; The first byte for each drive consists of a byte containing bit codes -; for SCSI Device, Logical Unit, and a bit indicating whether or not the -; drive is physically connected to the system. The configuration should -; match that contained in DPHHD-xx.LIB for Hard Drive partitions. -; Bit 7 6 5 4 3 2 1 0 +; BPCNFG only supports 3 devices. Originally BPBIOS systems used a SCSI +; interface that could support up to 7 physical drives. Thus the hard disk +; data begins w/ controller type (read SCSI type). Later the GIDE adapter +; became available. It supported only two drives. IDE drives usually have +; much larger capacity and so more drives were never needed with the IDE. +; In the extended DPH the drive associated with each logical CPM drive is +; specified. In ver 2.8 of HBIOS, disk devices are discovered dynamically, +; in the order RAM, ROM, IDE then SD and assigned at that time a +; device number. So the ROM drive is usually device 1, the IDE or HDSK0 is +; device 2 and the SD or HDSK1 is device 3. In this situation, the hard +; disk data below seems redundant. To maintain compatibility it will be +; retained but mostly not used. Controller type will be set GIDE and the +; rest of the data will be set to describe a generic 8 mB drive. The data +; for each drive consists of a byte containing bit codes for Device and a +; bit indicating whether or not the drive is physically connected to the +; system. The configuration should match that contained in DPHHD-xx.LIB +; for Hard Drive partitions, i.e. the unit specified in DPHHD-NH will be +; used in the hard disk driver. The byte for Hard Drive partitions +; contains the following bit fields +;. +; Bit 7 6 5 4 3 2 1 0 ; | | | | | | | | ; | | | | | +-+-+-- Physical Device Number (0..6, 7 = Host) ; | | | | +-------- (reserved) ; | | | +---------- 1 = Drive Active, 0 = No Drive -; +-+-+------------ Logical Unit Number (usually 0 or 1) - +; +-+-+------------ Logical Unit Number (usually 0 or 1 +; i.e. master or slave for IDE) ;..... ; The Controller Type Byte contains information needed to dictate the specific -; bytes to be used to communicate to a SASI/SCSI-connected Hard Drive. +; bytes to be used to communicate to a BPBIOS-connected Hard Drive. ; Additional bytes will be defined as needed, so please coordinate any -; extensions with the Authors to insure the generality of tools. +; extensions with the Authors to insure the generality of tools. Note that +; this byte is not used since HBIOS presents a unified interface to BPBIOS. +; Also note that BPCNFG only knows about the first ten controller types, +; Second IDE and HBIOS are "Unknown" devices to BPCNFG but it will accept +; these types if input. CNTRLR: DEFB 80H ; Controller Types recognized are: - ; 0- Owl 5- Conner SCSI - ; 1- Adaptec ACB-4000A 6- Quantum SCSI - ; 2- Xebec 1410A/Shugart 1610-3 7- Maxtor SCSI - ; 3- Seagate SCSI 8- Syquest SCSI - ; 4- Shugart 1610-4 Minimal SCSI 80H- GIDE (IDE/ATA) - + ; 0 = Owl + ; 1 = Adaptec ACB4000a + ; 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 + ; 80H = First IDE + ; 81H = Second IDE + ; 90H = HBIOS Disk IO ; First drive (Generic HBIOS drive configuration) -BITS DEFL 00000000B ; First HBIOS Hard Disk Drive +BITS DEFL HB_HDDEV ; First HBIOS Hard Disk Drive BITS DEFL BITS+[UNIT_0 AND 10H] ; If active, set Bit 4 -HDRV0: DEFB BITS ; Set Device, Unit, and Active bits - DEFW 520 ; Number of Cylinders +HDRV0: ; used to convert logical to physical sector addressing + DEFB BITS ; Set Device, Unit, and Active bits + DEFW 520 ; # Cylinders - nuf for 8 8mB partitions DEFB 16 ; Number of Heads DEFW 16 ; IDE - Number of Sectors Per Track DEFW 0000 ; Cylinder # to start precompensation @@ -156,7 +188,7 @@ HDRV0: DEFB BITS ; Set Device, Unit, and Active bits ; Second drive (Generic HBIOS drive configuration) -BITS DEFL 00000001B ; Second HBIOS Hard Disk Drive +BITS DEFL HB_HDDEV + 1 ; Second HBIOS Hard Disk Drive BITS DEFL BITS+[UNIT_1 AND 10H] ; If active, set Bit 4 @@ -169,7 +201,7 @@ HDRV1: DEFB BITS ; Set Device, Unit, and Active bits ; Third drive (Generic HBIOS drive configuration) -BITS DEFL 00000010B ; Third HBIOS Hard Disk Drive +BITS DEFL HB_HDDEV + 2 ; Third HBIOS Hard Disk Drive BITS DEFL BITS+[UNIT_2 AND 10H] ; If active, set Bit 4 @@ -183,4 +215,4 @@ HDRV2: DEFB BITS ; Set Device, Unit, and Active bits DEFB 0,0,0,0,0 ; (Reserved) ;======= End of Fixed Config ======== Device Config follows ======== - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/iio-dx.z80 b/Source/BPBIOS/iio-dx.z80 deleted file mode 100644 index b8d0f4dc..00000000 --- a/Source/BPBIOS/iio-dx.z80 +++ /dev/null @@ -1,1296 +0,0 @@ -;:::::::::::::::::::::::::::::::::::::::::::::::::************************* -; Byte I/O Routines *** Hardware Specific *** -; - D-X Designs Pty Ltd P112 - ************************* -; -; Several serial and parallel options exist on the P112, with two serial -; ports available at RS-232 signalling levels. The primary port defined here -; as COM1 uses SCC Channel A of the Z80182. A 16550-compatible serial port -; on the SMC FDC37C665 is used as COM2. Three other serial ports (the two -; ACSI ports in the Z180 core, and SCC Channel B) are available at TTL -; voltage levels on a single header and may be defined as COM3-5 if the pins -; from the Z182 are not otherwise used. -; This code supports the additional serial channels if the MORDEV equate -; is set to YES. If any of the three additional serial ports are defined -; (ESCC_B, ASCI_0, ASCI_1), then the System Configuration Register is set to -; Zero activating the additional signals in the conditions specified herein -; as activated by options in DEF-DX.LIB. -; A full Parallel port on the SMC FDC37C655 (in Normal Centronics mode) is -; used as the primary List (Printer) Device. -; -; NOTE: At the present time, it appears that port 0D9H (ENH182) cannot be set -; so ESCC operation at 24 MHz will occur at the full clock rate instead -; of being divided by Two as specified in Zilog documentation. Code -; managing ENH182 is commented out with ";;--" markers (HFB). -; -; 1.2 - 28 Aug 01 - Final scrub for GPL release. HFB -; 1.1a- 11 May 97 - Cleaned code, fixed added port accesses. HFB -; 1.1 - 25 Jan 97 - Revised ESCC Baud rate calcs, added COM3-5. HFB -; 1.0 - 19 Jun 96 - Initial Release for the P112 from YASBEC. HFB -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Place constants for Expansions here - - CSEG -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Byte Device Control Tables -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -DEVCFG: - -; The Clock Rate for the SCC channels on the Z80182 is based on a divider -; constant loaded in extended registers, the Processor Crystal frequency, -; and the setting of the divider in the SCC Register (1FH). -; -; NOTE: Divisor values are computed based on a compromise between the Crystal -; rates considered "standard" (6.144, 9.216, 12.288 MHz, etc) and the -; 16.000 MHz initially placed on the P112. Higher data rates (38.4 kbps -; and higher) may be out of tolerance, particularly at low CPU speeds. -; -; Clock rates for the serial port on the SMC 37C655 are based on a software -; programmable divider from the 24 MHz crystal driving the chip. - -COM1: DEFB 'COM1' ; 4-Char ID - DEFB 11101011B ; Baud Rate -; ||||++++--- Baud Rate setting (19.2 kbps) -; ++++------- Maximum Baud Rate (115.2 kbps) -; Rates are as: -; 0000 = None 0001 = 134.5 0011 = 50 0011 = 75 -; 0100 = 150 0101 = 300 0110 = 600 0111 = 1200 -; 1000 = 2400 1001 = 4800 1010 = 9600 1011 = 19200 -; 1100 = 38400 1101 = 76800 1110 = 115200 1111 = Fixed - - DEFB 11100001B ; Config Byte (In,Out,CTS/RTS control,1 Stop) -; |||||||+---------- Stop Bits 1 (1), 2 (0) -; ||||||+----------- Parity Enable (1), Disable (0) -; |||||+------------ Parity Even (1), Odd (0) -; ||||+------------- Data Bits 8 (0), 7 (1) -; |||+-------------- Xon-Xoff Handshake -; ||+--------------- CTS/RTS Handshake -; |+---------------- Input Device No (0), Yes (1) -; +----------------- Output Device No (0), Yes (1) - - DEFB 0FFH ; Input Data Mask - DEFB 0FFH ; Output Data Mask - - DEFW COM1OT ; COM 1 Byte Output - DEFW COM1OS ; COM 1 Output Status - DEFW COM1IN ; COM 1 Byte Input - DEFW COM1IS ; COM 1 Input Status - -COM2: DEFB 'COM2' ; 4-Char ID - DEFB 11101010B ; Baud Rate (115.2k Max, 9600 Set) - DEFB 11100001B ; Config Byte (In,Out,CTS/RTS control,1 Stop) - DEFB 0FFH ; Input Data Mask - DEFB 0FFH ; Output Data Mask - - DEFW COM2OT ; COM 2 Byte Output - DEFW COM2OS ; COM 2 Output Status - DEFW COM2IN ; COM 2 Byte Input - DEFW COM2IS ; COM 2 Input Status - -PIO1: DEFB 'PIO1' ; 4-Char ID - DEFB 00000000B ; Baud Rate (None) - DEFB 10000000B ; Config Byte (Output Only) - DEFB 0FFH ; Input Data Mask - DEFB 07FH ; Output Data Mask - - DEFW PIO1OT ; PIO Byte Output - DEFW PIO1OS ; PIO Output Status - DEFW PIO1IN ; PIO Byte Input - DEFW PIO1IS ; PIO Input Status - - IF MOVCPM OR [MORDEV AND NOT [ESCC_B OR ASCI_0 OR ASCI_1]] - DEFB 'NULL' ; 4-Char ID - DEFB 00000000B ; Baud Rate (None) - DEFB 11000000B ; Config Byte - DEFB 0FFH ; Input Data Mask - DEFB 0FFH ; Output Data Mask - - DEFW ISFALSE ; Null Output - DEFW ISTRUE ; Null Output Status - DEFW ISFALSE ; Null Input - DEFW ISTRUE ; Null Input Status - ENDIF - - IF MORDEV AND NOT MOVCPM ; Include additional devices -; Add Expansion Char IO here with Device format as above - - IF ESCC_B -COM3: DEFB 'COM3' ; 4-Char ID - DEFB 11101010B ; Baud Rate (115.2k Max, 9600 Set) - DEFB 11100001B ; Config Byte (In,Out,CTS/RTS control,1 Stop) - DEFB 0FFH ; Input Data Mask - DEFB 0FFH ; Output Data Mask - - DEFW COM3OT ; COM 3 Byte Output - DEFW COM3OS ; COM 3 Output Status - DEFW COM3IN ; COM 3 Byte Input - DEFW COM3IS ; COM 3 Input Status - ENDIF - IF ASCI_0 -COM4: DEFB 'COM4' ; 4-Char ID - DEFB 11001010B ; Baud Rate (38.4k Max, 9600 Set) - DEFB 11100001B ; Config Byte (In,Out,CTR/RTS control, 1 Stop) - DEFB 0FFH ; Input Data Mask - DEFB 0FFH ; Output Data Mask - - DEFW COM4OT ; COM 4 Byte Output - DEFW COM4OS ; COM 4 Output Status - DEFW COM4IN ; COM 4 Byte Input - DEFW COM4IS ; COM 4 Input Status - ENDIF - IF ASCI_1 -COM5: DEFB 'COM5' ; 4-Char ID - DEFB 11001010B ; Baud Rate (38.4k Max, 9600 Set) - DEFB 11100001B ; Config Byte (In,Out,CTR/RTS control, 1 Stop) - DEFB 0FFH ; Input Data Mask - DEFB 0FFH ; Output Data Mask - - DEFW COM5OT ; COM 5 Byte Output - DEFW COM5OS ; COM 5 Output Status - DEFW COM5IN ; COM 5 Byte Input - DEFW COM5IS ; COM 5 Input Status - ENDIF - ENDIF ;Mordev & Not Movcpm - - DEFB 0 ; - End-of-Table marker -MAXBDV EQU [$-DEVCFG-1]/[COM2-COM1] ; Number of Character Devices Defined - -DEVTBL: LD HL,DEVCFG ; BYTE device table - RET ; CP/M-3 device init - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; COM1 Drivers -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Uses Z80182 SCC Channel A (Default to Console) -;..... -; COM1 Input Status Test -; Bit 0 of SCC Ch.A Control Port signifies Char Ready - -COM1IS: IN0 A,(SCCACNT) ; Console Input Status - RRA ; Input Ready = Bit0 -> Carry - SBC A,A ; A=00 if Not Ready, FF if Char Ready - RET - -;..... -; COM1 Input Routine -; Remain in Loop until Char ready, then Return Char in A - -COM1IN: CALL COM1IS ; Console input from SCC Ch.A Ready? - JR Z,COM1IN ; ..loop if Not - IN0 A,(SCCAD) ; Else Read SCC Ch.A Data - IF MOVCPM ; (No Swap allowed) - LD C,A ; Store byte temporarily - LD A,(COM1+6) ; .get Input mask - AND C ; ..and apply to byte - ELSE ; (Swapping permitted) -IPAT1: AND $-$ ; Char Mask patched in Config - ENDIF ;Movcpm - RET - -;..... -; COM1 Output Status Test - -COM1OS: - IF XONOFF - LD A,(COM1+5) ; Get this Chan's Config settings - AND 00010000B ; Xon/Xoff in use? - JR Z,COM1O0 ; ..jump if Not - LD A,(COM1WT) ; Else get Current flow status - RLA - LD A,00 ; (prepare for stopped) - JR C,SOSTV ; ..jump to return Not Ready if Stopped -COM1O0: - ENDIF ;Xonoff - IN0 A,(SCCACNT) ; Read SCC Ch.A Control Reg - RRA ; Output Ready = Bit 2 - RRA - RRA ; -> Carry - SBC A,A ; A=00 if Not Ready, FF if Xmt Buffer Empty - RET - -;..... -; COM1 Output Routine (Byte to Send in C) - -COM1OT: CALL COM1OS ; Output to SCC Ch.A Ready? - JR Z,COM1OT ; ..loop if Not - IF MOVCPM ; (No Swap allowed) - LD A,(COM1+7) ; Get output mask - AND C ; .apply to byte - ELSE ; (Swapping permitted) - LD A,C ; Get Char -OPAT1: AND $-$ ; mask as set in Config - ENDIF ; Movcpm - OUT0 (SCCAD),A ; and send - RET - - PAGE -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; COM2 Drivers -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Uses 16550-compatible SMC FDC37C665 Serial Port (defaults to Aux) -;..... -; COM2 Input Status Test - -COM2IS: IN0 A,(_LSR) ; Input Status Reg Byte - RRA ; Rcv Rdy Bit[0] -> Carry - SBC A,A ; A=00 if Not Ready, FF if Char received - RET - -;..... -; COM2 Input Routine - -COM2IN: CALL COM2IS ; Char Ready? - JR Z,COM2IN ; ..loop if Not - IN0 A,(_RBR) ; Else Read Receive Buffer - IF MOVCPM ; (No Swap allowed) - LD C,A ; Save byte - LD A,(COM2+6) ; .get mask - AND C ; ..apply it - ELSE ; (Swapping permitted) -IPAT2: AND $-$ ; Mask as set in Config - ENDIF ;Movcpm - RET - -;..... -; COM2 Output Status Test - -COM2OS: - IF XONOFF - LD A,(COM2+5) ; Get Config Byte - AND 00010000B ; Xon/Xoff Active? - JR Z,COM2O0 ; ..jump if Not - LD A,(COM2WT) ; Get Flags Byte - RLA ; Xoff to Carry - LD A,0 ; (prepare for Xoff active) - JR C,SOSTV ; ..jump if Waiting to Return Not Rdy -COM2O0: ;..else fall thru to Check Real Status.. - ENDIF ;xonoff - IF RTSCTS - LD A,(COM2+5) ; Get this Chan's Config settings - AND 00100000B ; RTS/CTS in use? - JR Z,COM2O1 ; ..jump if Not - IN0 A,(_MMSR) ; Else Get Port 1 Modem Status - BIT 4,A ; Clear-To-Send? - LD A,0 ; (prepare for No) - JR Z,SOSTV ; ..jump if Not -COM2O1: - ENDIF ;Rtscts - IN0 A,(_LSR) ; Read Status Reg -SOSTV: AND 20H ; Mask Bit of interest -RETST: RET Z ; ..return if nothing valid -ISTRUE: OR 0FFH ; Else set flags for Ready - RET - -;..... -; COM2 Output Routine - -COM2OT: CALL COM2OS ; Test if ready - JR Z,COM2OT ; ..loop if not - IF MOVCPM ; (No Swap allowed) - LD A,(COM2+7) ; Get output mask - AND C ; apply - ELSE ; (Swapping permitted) - LD A,C ; Get Output Char -OPAT2: AND $-$ ; mask as set in Config - ENDIF ;Movcpm - OUT0 (_THR),A ; and send char to Xmt Holding Reg - RET - - PAGE -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Parallel I/O Drivers -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Uses "Standard" Parallel Centronics mode of SMC37C655 (output only) -;..... -; Parallel Input Status Test - -PIO1IS: JR ISTRUE ; Not implemented - -;..... -; Parallel Input Data fetch - -PIO1IN: JP ISFALSE ; Not implemented - -;..... -; Parallel Output Status Test - -PIO1OS: IN0 A,(SPORT) ; Read Port Status - RLA ; Status Bit [7] -> Carry - SBC A,A ; A=0 if Not Ready, FF if Ready to Send - RET - -;..... -; Parallel Output Routine - -PIO1OT: CALL PIO1OS ; List on the parallel device - JR Z,PIO1OT - IF MOVCPM ; (No Swap Allowed) - LD A,(PIO1+7) ; Get output mask - AND C ; ..and apply to char - ELSE ; (Swapping permitted) - LD A,C ; Get Output Char -OPATP: AND $-$ ; .mask as set in Config - ENDIF ;Movcpm - OUT0 (DPORT),A ; Latch the output byte to Data Port - LD A,0DH - OUT0 (CPORT),A ; Strobe (STB) = 1 to Control Port - NOP ; (delay) - NOP - LD A,0CH - OUT0 (CPORT),A ; then Strobe = 0 to Control Port - RET - PAGE - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -;---->> Additional Driver Code goes Here <<---- -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; To constrain the size of the boot system to available space on -; Floppy Disks, The additional drivers are only included if a -; banked system is being assembled, and "MorDev" is set TRUE. - - IF MORDEV AND NOT MOVCPM -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; COM3 Driver -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Z80182 SCC Channel B, Auxiliary Serial Port - IF ESCC_B -;..... -; COM3 Input Status Test -; Bit 0 of SCC Ch.B Control Port signifies Char Ready - -COM3IS: IN0 A,(SCCBCNT) ; Input Status - RRA ; Input Ready = Bit0 -> Carry - SBC A,A ; A=00 if Not Ready, FF if Char Ready - RET - -;..... -; COM3 Input Routine -; Remain in Loop until Char ready, then Return Char in A - -COM3IN: CALL COM3IS ; Console input from SCC Ch.B Ready? - JR Z,COM3IN ; ..loop if Not - IN0 A,(SCCBD) ; Else Read SCC Ch.B Data - IF MOVCPM ; (No Swap allowed) - LD C,A ; Store byte temporarily - LD A,(COM3+6) ; .get Input mask - AND C ; ..and apply to byte - ELSE ; (Swapping permitted) -IPAT3: AND $-$ ; Char Mask patched in Config - ENDIF ;Movcpm - RET - -;..... -; COM3 Output Status Test - -COM3OS: - IF XONOFF - LD A,(COM3+5) ; Get this Chan's Config settings - AND 00010000B ; Xon/Xoff in use? - JR Z,COM3O0 ; ..jump if Not - LD A,(COM3WT) ; Else get Current flow status - RLA - LD A,00 ; (prepare for stopped) - JR C,SOSTV ; ..jump to return Not Ready if Stopped -COM3O0: - ENDIF ;Xonoff - IN0 A,(SCCACNT) ; Read SCC Ch.A Control Reg - RRA ; Output Ready = Bit 2 - RRA - RRA ; -> Carry - SBC A,A ; A=00 if Not Ready, FF if Xmt Buffer Empty - RET - -;..... -; COM3 Output Routine (Byte to Send in C) - -COM3OT: CALL COM3OS ; Output to SCC Ch.B Ready? - JR Z,COM3OT ; ..loop if Not - IF MOVCPM ; (No Swap allowed) - LD A,(COM3+7) ; Get output mask - AND C ; .apply to byte - ELSE ; (Swapping permitted) - LD A,C ; Get Char -OPAT3: AND $-$ ; mask as set in Config - ENDIF ;Movcpm - OUT0 (SCCBD),A ; and send - RET - ENDIF ;Escc_b - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; ASCI0 Driver Routines -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - IF ASCI_0 - IF NOT BUFFA0 -;..... -; COM4 Input Status Test - -COM4IS: IN0 A,(STAT0) ; Get Status byte - RLA ; RDRF Bit to Carry - SBC A,A ; set A=0 if Not Rdy, FF if Ready - RET - -;..... -; COM4 Input Routine - -COM4IN: CALL COM4IS ; Anything ready? - JR Z,COM4IN ; ..loop if Not - IN0 A,(RDR0) - IF MOVCPM ; (No Swap allowed) - LD C,A ; Store byte temporarily - LD A,(COM4+6) ; get input mask - AND C ; apply to byte - ELSE ; (swapping permitted) -IPAT4: AND $-$ ; Char Mask patched in Config - ENDIF ;Movcpm - RET - ELSE ; Proceed with Buffered input -;..... -; COM4 Input Status Test (Buffered) - -COM4IS: LD A,(COM4Q) ; Get COM4 Queue Char Count - OR A ; Anything there? - JR RETST ; ..set appropriate flag and exit - -;..... -; COM4 Input Routine (Buffered) - -COM4IN: CALL COM4IS ; Anything there? - JR Z,COM4IN ; ..loop if Not - DI - PUSH HL ; Save Regs - PUSH BC - LD HL,COM4Q+QSIZE ; Point to end of Input Buffer - LD BC,QSIZE*256 ; length to B, Null in C - -; "Pop" character from the Buffer - -COM4LP: LD A,(HL) ; Get a byte - LD (HL),C ; store Null 1st time, else character - LD C,A ; move previous char for later save - DEC HL ; down to previous char - DJNZ COM4LP ; ..loop til Done - DEC (HL) ; Decrement Count in Queue - IF MOVCPM ; (No Swap Allowed) - LD A,(COM4+6) ; Get Input Mask - AND C ; apply setting flags based on Char - ELSE ; (swapping permitted) -IPAT4: AND $-$ ; Mask as set in Config - ENDIF ;Movcpm - POP BC ; Restore Regs - POP HL - EI - RET - ENDIF ;BuffA0 - -;..... -; COM4 Output Status Test - -COM4OS: IN0 A,(STAT0) ; ASCI0 Output Status - RRA ; TDRE Bit - RRA ; to Carry - SBC A,A ; set status, A=0 if Not ready, FF if Rdy - RET - -;..... -; COM4 Output Routine - -COM4OT: CALL COM4OS ; Ready to Send? - JR Z,COM4OT ; ..loop if Not - IF MOVCPM ; (No Swap allowed) - LD A,(COM4+7) ; Get output mask - AND C ; apply to byte - ELSE ; (swapping permitted) - LD A,C ; Get Char -OPAT4: AND $-$ ; mask as set in Config - ENDIF ;Movcpm - OUT0 (TDR0),A ; and Send - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Interrupt service routines for ASCI0 -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - IF BUFFA0 -RCAA: LD (INTSP),SP - LD SP,INTSP - PUSH AF - PUSH BC - PUSH HL - - IN0 A,(RDR0) ; Get character from ASCI0 - LD C,A ; ..save it - - IF XONOFF - LD A,(COM4+5) ; Get Config Byte - AND 00010000B ; Xon/Xoff Active? - JR Z,RCAA0 ; ..jump if Not - LD HL,COM4WT ; Else Point to Flags Byte - LD A,C ; get Byte Back - CP XON ; Is it Xon? - JR NZ,RCAA1 ; ..jump if Not - RES 7,(HL) ; Else Enable Sending again - JR RCAAX ; and Exit - -RCAA1: CP XOFF ; Is it Xoff? - JR NZ,RCAA0 ; ..jump if Not to add to Queue - SET 7,(HL) ; Else Stop Sending - JR RCAAX ; and Exit - ENDIF ;Xonoff - -RCAA0: LD HL,COM4Q ; Point to char count - LD A,(HL) ; ..and get it - INC A ; Bump - CP QSIZE ; Buffer Full? - JR NC,RCAAX ; ..exit if so - LD (HL),A ; Else save new char count - CALL ADDAHL ; Offset to storage in Queue - LD (HL),C ; ..and save the character -RCAAX: POP HL ; Restore Regs - POP BC - POP AF - LD SP,(INTSP) ; and Entry Stack Ptr - EI ; Ints back On - RET - ENDIF ;BuffA0 - ENDIF ;Asci_0 - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; ASCI1 Driver Routines -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - IF ASCI_1 - IF NOT BUFFA1 -;..... -; COM5 Input Status Test - -COM5IS: IN0 A,(STAT1) ; Get Status byte - RLA ; RDRF Bit to Carry - SBC A,A ; set A=0 if Not Rdy, FF if Ready - RET - -;..... -; COM5 Input Routine - -COM5IN: CALL COM5IS ; Anything ready? - JR Z,COM5IN ; ..loop if Not - IN0 A,(RDR1) - IF MOVCPM ; (No Swap allowed) - LD C,A ; Store byte temporarily - LD A,(COM5+6) ; get input mask - AND C ; apply to byte - ELSE ; (swapping permitted) -IPAT5: AND $-$ ; Char Mask patched in Config - ENDIF ;Movcpm - RET - - ELSE ;proceed w/buffered input -;..... -; COM5 Input Status Test (Buffered) - -COM5IS: LD A,(COM5Q) ; Get COM5 Queue Char Count - OR A ; Anything there? - JP RETST - -;..... -; COM5 Input Routine (Buffered) - -COM5IN: CALL COM5IS ; COM5 input - JR Z,COM5IN - DI - PUSH HL ; Save registers - PUSH BC - LD HL,COM5Q+QSIZE ; Point to end of Type ahead Buffer - LD BC,QSIZE*256 ; Length in B, Null in C - -; "Pop" character from the Buffer - -COM5LP: LD A,(HL) ; Get a character - LD (HL),C ; Store Null 1st time, else character - LD C,A ; Move previous char for later save - DEC HL ; down to previous char - DJNZ COM5LP ; Loop til done - DEC (HL) ; Decrement Count in Queue - IF MOVCPM ; (No Swap Allowed) - LD A,(COM5+6) ; Get input mask - AND C ; apply setting flags based on char - ELSE ; (Swapping permitted) -IPAT5: AND $-$ ; Mask as set in Config - ENDIF ;Movcpm - POP BC ; Restore regs - POP HL - EI - RET - ENDIF ;buffered - -;..... -; COM5 Output Status Test - -COM5OS: IN0 A,(STAT1) ; ASCI1 Output Status - RRA ; TDRE Bit - RRA ; to Carry - SBC A,A ; set status, A=0 if Not ready, FF if Rdy - RET - -;..... -; COM5 Output Routine - -COM5OT: CALL COM5OS ; Ready to Send? - JR Z,COM5OT ; ..loop if Not - IF MOVCPM ; (No Swap allowed) - LD A,(COM5+7) ; Get output mask - AND C ; apply to byte - ELSE ; (swapping permitted) - LD A,C ; Get Char -OPAT5: AND $-$ ; mask as set in Config - ENDIF ;Movcpm - OUT0 (TDR1),A ; and Send - RET - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Interrupt service routines for ASCI1 -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - IF BUFFA1 -RCAB: LD (INTSP),SP - LD SP,INTSP - PUSH AF - PUSH BC - PUSH HL - - IN0 A,(RDR1) ; Get character from ASCI1 - LD C,A ; ..save it - - IF XONOFF - LD A,(COM5+5) ; Get Config Byte - AND 00010000B ; Xon/Xoff Active? - JR Z,RCAB0 ; ..jump if Not - LD HL,COM5WT ; Else Point to Flags Byte - LD A,C ; get Byte Back - CP XON ; Is it Xon? - JR NZ,RCAB1 ; ..jump if Not - RES 7,(HL) ; Else Enable Sending again - JR RCABX ; and Exit - -RCAB1: CP XOFF ; Is it Xoff? - JR NZ,RCAB0 ; ..jump if Not to add to Queue - SET 7,(HL) ; Else Stop Sending - JR RCABX ; and Exit - ENDIF ;Xonoff -RCAB0: LD HL,COM5Q ; Point to char count - LD A,(HL) ; ..and get it - INC A ; Bump - CP QSIZE ; Buffer Full? - JR NC,RCABX ; ..exit if so - LD (HL),A ; Else save new char count - CALL ADDAHL ; Offset to storage in Queue - LD (HL),C ; ..and save the character -RCABX: POP HL ; Restore Regs - POP BC - POP AF - LD SP,(INTSP) ; and Entry Stack Ptr - EI ; Ints back On - RET - ENDIF ;BuffA1 - ENDIF ;Asci_1 - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; Skeletons for Additional Expansion IO -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -;..... -; COMx Input Status (Non-buffered) -COMxIS: -;..... -; COMx Input Routine (Non-buffered) -COMxIN: -;..... -; COMx Output Status (Non-buffered) -COMxOS: -;..... -; COMx Output Routine (Non-buffered) -COMxOT: - ENDIF ;Mordev - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -;:: I n t e r r u p t T a b l e :: -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; The Z80182 Interrupt Vector table is placed here on a 32-byte -; boundary for internal peripherals. - - DEFS 32-[$-BIOSJT AND 31] ; Align -INTTBL: - DEFW BADINT ; FDC Controller w/Ints (FDCINT if Real Ints) - DEFW BADINT ; Parallel output port (INTPIO if Real Ints) - DEFW TIMER ; Timer0 - DEFW BADINT ; Timer1 - DEFW BADINT ; DMA Channel 0 - DEFW BADINT ; DMA Channel 1 - DEFW BADINT ; Clocked Serial IO - IF MORDEV AND ASCI_0 AND BUFFA0 - DEFW RCAA ; ASCI 0 - ELSE - DEFW BADINT ; ASCI 0 if Not Interrupt/Mordev - ENDIF - IF MORDEV AND ASCI_1 AND BUFFA1 - DEFW RCAB ; ASCI 1 - ELSE - DEFW BADINT ; ASCI 1 if Not Interrupt/Mordev - ENDIF - -; Error trap for unimplemented Interrupts - -BADINT: CALL PRINT - DEFC CR,LF,'Bad Int.' - JP WBOOT - -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -;:: D e v i c e I n i t i a l i z a t i o n :: -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - - CSEG -DEVINI: - IF BANKED - CALL BIOSTK - CALL GOSYSB - JP JDVINI - COMMON /BANK2/ -JDVINI: - ENDIF - -; Synchronize Environment Descriptor Speed byte to Bios CPU Clock Speed setting - - LD A,(SPEED) ; Get Processor Speed from Bios Setting - LD HL,(ENVADR) ; Get ENV Address - LD L,2BH ; offset to CPU Clock rate - LD (HL),A ; and slam it into the ENV - -; Set Clock Rate and Dividers before we initialize devices - ;;--(ENH182 doesn't seem to be variable at present) - -;;-- LD C,0 ; (preset ESCC Div-by-1, No Halt) -;;-- CP 20 ; < 20 MHz? -;;-- JR C,IsBy1 ; ..jump if So -;;-- LD C,00001000B ; Else Divide ESCC clock by 2 - ; |||||+++- (reserved) - ; ||||+---- 0 = ESCC Clk Div-by-1, 1 = ESCC Clk Div-by-2 - ; |||+----- 1 = TxDA Disable on Halt - ; ||+------ 1 = Force Halt - ; ++------- (reserved) -;;--IsBy1: OUT0 (ENH182),C ; Set ESC Divider - - LD C,10000000B ; (preset flags) - ; |+++++++- Normal Drive, Standby/Idle Disabled - ; +-------- 0 = XTAL/2 Rate, 1 = XTAL/1 Rate - CP 12+1 ; Is Clock Speed > 12 MHz? - JR NC,ISHI ; jump if Yes - LD C,0 ; Else Set for Low (Xtal / 2) Speed -ISHI: OUT0 (1FH),C ; and Set Speed - -; Set Configured Wait States for IO and Memory - - LD A,(WAITS) ; Get # Wait states for Memory & IO - AND 00110011B ; Mask off all but 2 LSBs in each nybble - RLCA ; move Mem bits to B7,6 - RLCA - LD C,A ; Save partially shifted byte - RLCA ; Move IO to Bits 5,4 - RLCA - OR C ; OR in Memory waits - AND 11110000B ; and mask off all others - OR 00001100B ; Edge Triggering for both DMA channels - OUT0 (DCNTL),A ; set parameters - -; Set Refresh to Assembled Setting - - IF REFRSH ; (Must be TRUE if using Dynamic RAM) - LD A,83H ; Set refreshing on for Dynamic Rams - ELSE ; (Don't need wasted time if Static Memory) - LD A,00H ; Else disable Refresh cycles - ENDIF - OUT0 (RCR),A ; Set Refresh timing specs - -; Set Reload constant to values in header - - LD HL,(RELOD0) ; Get the timer reload constant - OUT0 (RLDR0L),L ; send low byte - OUT0 (RLDR0H),H ; and hi byte - -; Configure COM1 IO Masks and Channel characteristics - - IF NOT MOVCPM ; (Swapping permitted) - LD DE,C1NAM ; Point to COM1 Name String - CALL SETPTR ; locate data returning ptr - JR Z,DEVIN0 ; jump to next if No Device Name - LD A,(HL) ; Else Get Dev+7 Mask - LD (OPAT1+1),A ; patch - DEC HL ; Down to Input Mask @ Dev+6 - LD A,(HL) ; fetch - LD (IPAT1+1),A ; and patch - DEC HL ; Down to Config byte @ Dev+5 - ELSE ; (No Swap Allowed) - LD HL,DEVCFG+5 ; Point to second COM1 Config byte - ENDIF ;Movcpm - LD BC,SCCACNT ; Point to SCC Channel A Control Port - CALL INSCC ; Set the SCC parameters - -; Configure COM2 IO Masks and Channel Characteristics - -DEVIN0: - IF NOT MOVCPM ; (Swapping permitted) - LD DE,C2NAM ; Point to COM2 Name String - CALL SETPTR ; locate data returning ptr - JR Z,DEVIN1 ; ..jump to next if No Device Name - LD A,(HL) ; Else Get Dev+7 Mask - LD (OPAT2+1),A ; patch - DEC HL ; Down to Input Mask @ Dev+6 - LD A,(HL) ; fetch - LD (IPAT2+1),A ; and patch - DEC HL ; Down to Config Byte @ Dev+5 - ELSE ; (No Swap Allowed) - LD HL,DEVCFG+[COM2-COM1]+5 ; Point to second COM2 Config byte - ENDIF ;Movcpm - CALL IOI550 ; Initialize 16550-compatible 37C665 Port - -; Configure Parallel Port IO Masks and Characteristics and Reset - - IF NOT MOVCPM ; (No Swap Allowed) -DEVIN1: LD DE,P1NAM ; Point to PIO1 Name String - CALL SETPTR ; locate data returning ptr - JR Z,DEVIN2 ; jump if No Device Name - LD A,(HL) ; Get Dev+7 Mask - LD (OPATP+1),A ; and patch -DEVIN2: - ENDIF ;Movcpm - ; Reset Parallel port on FDC37C665 Multi-IO Chip - LD A,00001000B ; Command to Reset Parallel Port - OUT0 (CPORT),A ; by bringing INIT Low - LD BC,4000 -PDly: DEC BC ; and - LD A,B - OR C - JR NZ,PDly ; holding there for a while - LD A,00001100B ; Re-activate Port - OUT0 (CPORT),A ; by bringing INIT High - IN0 A,(SPORT) ; Clear by - IN0 A,(SPORT) ; reading status twice - - IF MORDEV AND NOT MOVCPM -; -- Add necessary Initialization for Expansion Drivers here -- - IF ESCC_B - ; Initialize ESCC Channel B - LD DE,C3NAM ; Point to COM3 Name String - CALL SETPTR ; locate data returning ptr - JR Z,DEVIN3 ; jump to next if No Device Name - LD A,(HL) ; Else Get Dev+7 Mask - LD (OPAT3+1),A ; patch - DEC HL ; Down to Input Mask @ Dev+6 - LD A,(HL) ; fetch - LD (IPAT3+1),A ; and patch - DEC HL ; Down to Config byte @ Dev+5 - LD BC,SCCBCNT ; Point to SCC Channel B Control Port - CALL INSCC ; Set the SCC parameters - ENDIF ;Escc_b -DEVIN3: - IF ASCI_0 - ; Initialize ASCI0 - LD DE,C4NAM ; Point to COM4 Name String - CALL SETPTR ; locate data returning ptr - JR Z,DEVIN4 ; jump to next if No Device Name - LD A,(HL) ; Else Get Dev+7 Mask - LD (OPAT4+1),A ; patch - DEC HL ; Down to Input Mask @ Dev+6 - LD A,(HL) ; fetch - LD (IPAT4+1),A ; and patch - DEC HL ; Down to Config byte @ Dev+5 - LD BC,CNTLA0 ; B=0 for Hi-order IO Address, C=CNTLA0 Port - LD E,01100000B ; CNTLA0 Mask, RE, TE, RTS* - CALL INASCI ; and set a couple of bytes -DEVIN4: - IF BUFFA0 - LD A,00001000B ; Enable ASCI0 Interrupts - ELSE - XOR A ; No Interrupts - ENDIF - OUT0 (STAT0),A - ENDIF ;Asci_0 - IF ASCI_1 - ; Initialize ASCI1 - LD DE,C5NAM ; Point to COM5 Name String - CALL SETPTR ; locate data returning ptr - JR Z,DEVIN5 ; jump to next if No Device Name - LD A,(HL) ; Else Get Dev+7 Mask - LD (OPAT5+1),A ; patch - DEC HL ; Down to Input Mask @ Dev+6 - LD A,(HL) ; fetch - LD (IPAT5+1),A ; and patch - DEC HL ; Down to Config byte @ Dev+5 - LD BC,CNTLA1 ; B=0 for Hi-order IO Address, C=CNTLA1 Port - LD E,01110000B ; CNTLA1 Mask, RE, TE, Internal Clk - CALL INASCI ; and set a couple of bytes -DEVIN5: - IF BUFFA1 - LD A,00001100B ; Enable ASCI1 Interrupts & CTS1* - ELSE - LD A,00000100B ; No Interrupts, Enable CTS1* - ENDIF - OUT0 (STAT1),A - ENDIF ;Asci_1 - ENDIF ;Mordev & Not Movcpm - -; Set IOByte(s) to Configured Device Settings - - IF BANKED - LD A,(TPABNK) ; Get Bank # for TPA - LD C,A ; and set for destination - LD HL,0003H ; Point to IOBYTE - LD A,(IOBYT) ; get the new settings - CALL FRPUTB ; and stuff it in TPA bank - ENDIF - LD A,(IOBYT) ; If Non-banked, just get the byte - LD (0003H),A ; and stuff it, else stuff in SYStem bank - -; De-Select any IDE Drives to force re-initialization on first select - - IF IDE - OR 0FFH ; Set all bits - LD (hdUnit),A ; to mismatch select on current unit - ENDIF - -; Set Interrupt Conditions - - LD A,00010001B ; Turn Ints On and enable downcounting - OUT0 (TCR),A - - LD A,00000111B ; Activate INT0 and Internals - OUT0 (ITC),A - EI ; Insure interrupts enabled - RET - -;..... -; Z182 [E]SCC Configuration Routine. -; Enter= BC -> respective Control Register SCCACNT/SCCBCNT. -; HL -> Dev+5 Configuration byte - -INSCC: LD DE,0100010000101010B ; Skeleton WR4 (D), WR5 (E) contents - ; |||||||||||||||+- Tx CRC Enable \---------------+ - ; ||||||||||||||+-- RTS | - ; |||||||||||||+--- /SDLC/CRC-16 | - ; ||||||||||||+---- Tx Enable WR5 - ; |||||||||||+----- Send Break | - ; |||||||||++------ Bits/Char (00=5, 01=7, 10=6, 11=8) | - ; ||||||||+-------- DTR /---------------+ - ; |||||||+--------- Parity Enable \---------------+ - ; ||||||+---------- Parity EVEN/ODD | WR4 - ; ||||++----------- 00=Sync, 01=1 Stop, 10=1.5 Stop, 11=2 - ; ||++------------- Sync Char Settings | - ; ++--------------- Clock 00=X1,01=X16,10=X32,11=X64 /-+ - BIT 0,(HL) ; One Stop Bit? - JR NZ,INSCC0 ; ..jump if So - SET 3,D ; Else Set for 2 Stop bits -INSCC0: BIT 1,(HL) ; Parity On? - JR Z,INSCC1 ; ..jump if Not - SET 0,D ; Else Turn it On - BIT 2,(HL) ; Is Odd parity desired? - JR NZ,INSCC1 ; ..jump if Even parity - SET 1,D ; Else set to Odd -INSCC1: BIT 3,(HL) ; 7-bit Data? - JR NZ,INSCC2 ; ..jump if So - SET 6,E ; Else set for 8-bit data -INSCC2: LD A,WR4 - CALL IWdOut ; Set basic Parms - LD A,E ; Get WR4 Config Byte - SCF ; (prep to set LSB) - ADC A,A ; Move old B6/5 to B7/6 and Set LSB - AND 0C1H ; strip off Garbage - BIT 5,(HL) ; RTS/CTS Handshake selected? - JR Z,INSCC8 ; ..jump if Not - OR 00100000B ; Else Set Auto-Enables -INSCC8: LD E,A ; (position) - LD A,WR3 - CALL IBytO ; Set Receive Bits/Char & activate - - CALL ChkRat ; Can we set the Data Rate? - RET Z ; ..quit if Not - - PUSH BC ; Else Save regs (A [0..3] = Rate index) - DEC A ; adjust index to Base 0 - LD C,A ; store - LD HL,brSCC ; Pt to Start of Baud Rate Table - CALL ADDAHL ; -> appropriate constant - LD L,(HL) ; fetch constant -;;-- IN0 A,(ENH182) ; Get Enhancement Reg -;;-- AND 00001000B ; Keep ESCC Divide Rate Bit - LD A,(SPEED) ; Fetch Clock speed -;;-- JR Z,INSCC9 ; ..jump if Div-by-1 -;;-- SRL A ; Else Divide Rate by 2 (by dividing Clk) -;;--INSCC9: - LD H,A - LD A,C - CP 3 ; Rate In [134.5, 50, 75]? - JR NC,INSCC3 ; ..jump if Not - LD A,H ; Else - ADD A,A ; Multiply - ADD A,H ; constant * 3 - LD H,A -INSCC3: MLT HL ; Multiply Clock Rate by Constant - LD A,C - CP 7 ; Rate < 2400 bps? - JR C,INSCC4 ; ..jump if Yes - LD C,18 ; Else Compute Divisor / 18 - LD B,17 ; 17 times thru loop for 16 bits - XOR A ; start w/Carry Clear - -; Divide computed value in HL by 18 (in C), Ret: Remainder in A, Quotient in HL - -SDiv0: ADC A,A - SBC A,C - JR NC,SDiv1 - ADD A,C ; correct for underflow -SDiv1: CCF - ADC HL,HL - DJNZ SDiv0 ; ..loop til Done - SRL C ; Dividend / 2 - CP C ; Rounding Needed? - JR C,INSCC4 ; ..jump if Not - INC HL ; Else round up - -INSCC4: POP BC - DEC HL ; Compute Divisor - DEC HL ; - 2 - LD A,H - OR L ; If Divisor = 0 - JR NZ,INSCC5 - INC L ; default to 1 -INSCC5: LD A,WR12 ; Address Divisor Reg pair - LD E,H ; swap - LD D,L ; bytes to send Lower first - -IWdOut: DI - OUT (C),A ; Address WR4 - OUT (C),D ; Set values - INC A ; Bump to WR5 -IBytO: OUT (C),A ; address it - OUT (C),E ; Set values - EI - RET - -;..... -; Divisor factors are computed as: -; (Xtal Freq (Hz) / (2 * bps * Divisor)) - 2 -; These rate constants represent a compromise between the "standard" rates of -; multiples of 6.144 and 9.216 MHz, and the 8.000/16.000 MHz used in the P112. -; All factors are based on a x16 clock divisor. - -brSCC: DEFB 79 ; 1 = 134.5 bps / 3 - DEFB 213 ; 2 = 50 bps / 3 - DEFB 142 ; 3 = 75 bps / 3 - DEFB 213 ; 4 = 150 bps - DEFB 106 ; 5 = 300 bps - DEFB 53 ; 6 = 600 bps - DEFB 26 ; 7 = 1200 bps - DEFB 240 ; 8 = 2400 bps * 18 - DEFB 120 ; 9 = 4800 bps * 18 - DEFB 60 ; 10 = 9600 bps * 18 - DEFB 30 ; 11 = 19.2 kbps * 18 - DEFB 15 ; 12 = 38.4 kbps * 18 - DEFB 10 ; 13 = 57.6 kbps * 18 - DEFB 5 ; 14 = 115.2 kbps * 18 - -;..... -; 16550-compatible Configuration Routine - -IOI550: LD E,00000011B ; Start w/byte going to Line Contr Reg (LCR) - ; ||||||++- Word Len in Bits (00=5, 01=6, 10=7, 11=8) - ; |||||+--- Stop Bits (0=1, 1=1.5 or 2) - ; ||||+---- 0 = No Parity, 1 = Parity Enabled - ; ||++----- (If Parity) 00=Odd, 01=Even, 10=Mark, 11=Space - ; |+-------- 0 = Normal, 1 = Send Break - ; +--------- 0 = Normal, 1 = Set Baud Rate - BIT 0,(HL) ; One Stop Bit? - JR NZ,IOI55a ; ..jump if So - SET 2,E ; Else Set for 2 Stop Bits -IOI55a: BIT 1,(HL) ; Parity On? - JR Z,IOI55b ; ..jump if Not - SET 3,E ; Else Turn it On - BIT 2,(HL) ; Even Parity? - JR Z,IOI55b ; ..jump if Odd - SET 4,E ; Else Set Even Parity -IOI55b: CALL ChkRat ; Can we set the Data Rate? - JR Z,IOI55c ; ..jump if Not - ADD A,A ; Else double index - LD C,A - LD B,0 - LD HL,RATE55-2 ; Pt to compensated Table - ADD HL,BC - SET 7,E ; Address DLAB - OUT0 (_LCR),E - LD A,(HL) - OUT0 (_DDL),A ; send Low Byte - INC HL - LD A,(HL) - OUT0 (_DLM),A ; and High Byte -IOI55c: RES 7,E ; Clear DLAB Bit - OUT0 (_LCR),E ; and Set configuration - LD A,00000011B - ; |||||||+-- 1 = DTR Active - ; ||||||+--- 1 = RTS Active - ; |||||+---- (unused) - ; ||||+----- 1 = Send Ints to CPU, 0 = Ints Hi-Z - ; |||+------ 1 = Line Loopback - ; +++------- (unused) - OUT0 (_MCR),A ; Activate Port - LD A,00000000B - ; |||||||+-- 1 = Enable Rcv Buff Full Interrupt - ; ||||||+--- 1 = Enable Xmt Buff Empty Interrupt - ; |||||+---- 1 = Enable Line Status Interrupt - ; ||||+----- 1 = Enable Delta Status Signals Inerrupt - ; ++++------ (unused) - OUT0 (_IER),A ; Set Interrupt Settings - RET - -; Clock Divisor factors for various rates - -RATE55: DEFW 857 ; 1 = 134.5 bps - DEFW 2304 ; 2 = 50 bps - DEFW 1536 ; 3 = 75 bps - DEFW 768 ; 4 = 150 bps - DEFW 384 ; 5 = 300 bps - DEFW 192 ; 6 = 600 bps - DEFW 96 ; 7 = 1200 bps - DEFW 48 ; 8 = 2400 bps - DEFW 24 ; 9 = 4800 bps - DEFW 12 ; 10 = 9600 bps - DEFW 6 ; 11 = 19.2 kbps - DEFW 3 ; 12 = 38.4 kbps - DEFW 2 ; 13 = 57.6 kbps (non-std) - DEFW 1 ; 14 = 115.2 kbps - -;..... -; Expansion Common routines may be places here - IF MORDEV AND NOT MOVCPM - IF ASCI_0 OR ASCI_1 -INASCI: BIT 0,(HL) ; One Stop Bit? - JR NZ,INASC0 ; ..jump if Not - SET 0,E ; Else Set for 2 Stop bits -INASC0: BIT 1,(HL) ; Parity On? - JR Z,INASC1 ; ..jump if Not - SET 1,E ; Else Turn it On -INASC1: BIT 3,(HL) ; 7-bit Data? - JR NZ,INASC2 ; ..jump if So - SET 2,E ; Else set for 8-bit Data -INASC2: OUT (C),E ; Send the byte to CNTLA0/1 - INC C ; advance to CNTLB0/1 - INC C - DEC HL ; Back up to first Config byte - LD A,(HL) ; fetch - AND 0F0H ; Check Config Status - LD E,0111B ; (preset for External clock in case) - JR Z,INASCX ; ..jump if No rate to Set - LD A,(HL) ; Refetch the rate byte - AND 0FH ; masking off all but desired rate - PUSH HL ; Save Config byte pointer - LD HL,ASCRAT-1 ; pt to Rate Table (Correcting for Base 0) - CALL ADDAHL ; offsetting to desired byte - LD E,0 ; Prepare an initial mask - LD A,(SPEED) ; Check processor speed - CP 6+1 ; Is it 6 or below? - JR C,INASC8 ; ..jump assuming 6.144 MHz if <= 6 - DEC HL ; (prepare for 12 test) - CP 12 ; Is it 12 MHz? - JR Z,INASC8 ; ..jump assuming 12.288 MHz if = 12 - DEC HL ; (prepare for 24 test) - CP 24 ; Is it 24 MHz? - JR NC,INASC8 ; ..jump if >= 24 MHz - INC HL ; Else correct pointer - INC HL ; Advance for 18 MHz - SET 5,E ; Set additional divisor bit for 9/18 MHz - CP 16 ; Is it >= 16 MHz? (including 18 MHz) - JR NC,INASC8 ; ..jump to use 6 MHz rates if So - INC HL ; Else bump up one in Rate Table -INASC8: LD A,(HL) ; Get the Rate Setting Byte - OR E ; add in any additional divisor - LD E,A ; back to output reg - POP HL ; Restore Config byte ptr -INASCX: INC HL ; advance to second byte - BIT 2,(HL) ; Is Odd parity desired? - JR NZ,INASC9 ; ..jump if Even parity - SET 4,E ; Else set to Odd -INASC9: OUT (C),E ; Send the byte to CNTLB0/1 - RET - - ; bps @ 6MHz 9MHz 12MHz 18MHz 24MHz - DEFB 00001110B ; 0 (protection) -ASCRAT: DEFB 00001110B ; 1 = default to lowest rate - DEFB 00001110B ; 2 = default to lowest rate - DEFB 00001110B ; 3 = default to lowest rate - DEFB 00001110B ; 4 = 150 75 300 150 600 - DEFB 00001101B ; 5 = 300 150 600 300 1200 - DEFB 00000110B ; 6 = 600 300 1200 600 2400 - DEFB 00000101B ; 7 = 1200 600 2400 1200 4800 - DEFB 00000100B ; 8 = 2400 1200 4800 2400 9600 - DEFB 00000011B ; 9 = 4800 2400 9600 4800 19.2k - DEFB 00000010B ; 10 = 9600 4800 19.2k 9600 38.4k - DEFB 00000001B ; 11 = 19.2 k 9600 38.4k 19.2k 76.8k - DEFB 00000000B ; 12 = 38.4 k 19.2 k 76.8k 38.4k 153.6k - DEFB 00000000B ; 13 = default to highest rate - DEFB 00000000B ; 14 = default to highest rate - DEFB 00000000B ; 15 = default to highest rate - ENDIF ;Asci_0 | Asci_1 - ENDIF ;Mordev - -;..... -; Check Data Rate Config byte for authority and limits on configuration -; Enter: HL -> Second Config byte (back up to get rate byte) -; Exit : Zero Set if Can't configure - -ChkRat: DEC HL ; Pt to Data Rate - LD A,(HL) ; fetch - AND 0F0H ; Any Allowed rate to set? - RET Z ; ..quit if Not (Z Set) - LD A,(HL) ; Fetch byte again - AND 0FH ; Anything to Set? - RET Z ; ..quit if Not (Z Set) - CP 0FH ; Fixed Rate? - RET ; ..exit w/Z Set if Fixed, else NZ for Ok - -;..... -; Locate Named Device and return pointer to last Config byte - IF NOT MOVCPM -SETPTR: LD HL,DEVCFG-[COM2-COM1] ; Point ahead of start -SETPTL: LD BC,COM2-COM1 ; Set size of entries - ADD HL,BC ; advance to next entry - LD B,4 ; Set # chars to compare - LD A,(HL) ; Get first char - OR A ; Is it Table End? - RET Z ; ..return Zero Set if so - PUSH DE ; (save source & dest strings) - PUSH HL -SETPT0: LD A,(DE) - CP (HL) ; Compare each char - JR NZ,SETPTX ; ..quitting if mismatch - INC DE ; Else advance to next - INC HL - DJNZ SETPT0 ; ..loop to next char -SETPTX: POP HL ; Restore source & dest ptrs - POP DE - JR NZ,SETPTL ; ..try next entry if mismatch - LD DE,7 ; Else advance to Dev+7 - ADD HL,DE - OR 0FFH ; Insure Zero Clear on Return - RET ; ..and quit - -C1NAM: DEFB 'COM1' ; Device needing Configuration to match -C2NAM: DEFB 'COM2' -P1NAM: DEFB 'PIO1' - ENDIF ;Movcpm -; Name strings for Expansion IO added here after Primary Devices - IF MORDEV AND ESCC_B AND NOT MOVCPM -C3NAM: DEFB 'COM3' ; ESCC Channel B Expansion Device - ENDIF - IF MORDEV AND ASCI_0 AND NOT MOVCPM -C4NAM: DEFB 'COM4' ; ASCI0 Expansion Device - ENDIF - IF MORDEV AND ASCI_1 AND NOT MOVCPM -C5NAM: DEFB 'COM5' ; ASCI1 Expansion Device - ENDIF -;..... -; NOTE: BuffA0 and BuffA1 Intrpt Buffers are located at end of B/P Root module. - -;===================== End of IIO-DX.Z80 ========================== - \ No newline at end of file diff --git a/Source/BPBIOS/iio-ww.z80 b/Source/BPBIOS/iio-ww.z80 index 64f4fbae..6923e20c 100644 --- a/Source/BPBIOS/iio-ww.z80 +++ b/Source/BPBIOS/iio-ww.z80 @@ -1,7 +1,17 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::::************************* ; Byte I/O Routines *** Hardware Specific *** -; - D-X Designs Pty Ltd P112 - ************************* +; - Retro-Brew Processor boards w/ HBIOS - ************************* ; +; Several serial and parallel options exist with HBIOS. With SBC, SIMH or +; ZETA two serial ports are available at RS-232 signalling levels via a +; 16650 compatible UART. For Mark IV or N8, the internal ACSI ports +; are used. The primary port defined here as COM1 uses ASCI Channel A of +; the Z80182. COM2 uses ACSI Channel B are available at TTL voltage levels +; A full Parallel port is available on SBC and ZETA is used as the +; primary List (Printer) Device. +; +; +; 1.3 - 27 Mar 14 - Initial N8VEM test release WW+LN ; 1.2 - 28 Aug 01 - Final scrub for GPL release. HFB ; 1.1a- 11 May 97 - Cleaned code, fixed added port accesses. HFB ; 1.1 - 25 Jan 97 - Revised ESCC Baud rate calcs, added COM3-5. HFB @@ -67,7 +77,7 @@ PIO1: DEFB 'PIO1' ; 4-Char ID DEFW PIO1IN ; PIO Byte Input DEFW PIO1IS ; PIO Input Status - IF MOVCPM OR [MORDEV AND NOT [ESCC_B OR ASCI_0 OR ASCI_1]] + IF MOVCPM OR [MORDEV] DEFB 'NULL' ; 4-Char ID DEFB 00000000B ; Baud Rate (None) DEFB 11000000B ; Config Byte @@ -215,3 +225,4 @@ JDVINI: ENDIF RET ; WW + \ No newline at end of file diff --git a/Source/BPBIOS/movp112.com b/Source/BPBIOS/movp112.com deleted file mode 100644 index 41111647..00000000 Binary files a/Source/BPBIOS/movp112.com and /dev/null differ diff --git a/Source/BPBIOS/myterm.z3t b/Source/BPBIOS/myterm.z3t deleted file mode 100644 index 8c905b96..00000000 Binary files a/Source/BPBIOS/myterm.z3t and /dev/null differ diff --git a/Source/BPBIOS/p112boot.doc b/Source/BPBIOS/p112boot.doc deleted file mode 100644 index 85f18fce..00000000 --- a/Source/BPBIOS/p112boot.doc +++ /dev/null @@ -1,46 +0,0 @@ - 21 July 1996 -The boot record is NOT executable. Any attempt to execute it will produce -varied effects ranging from a HALT to only a single load or jump. The -arguments of the instructions are simply intended to make addresses available -to the ROM Boot loader. The layout is: - - ORG 8000H - - DB 76H ; HALT instruction - LD HL,CCP-80H ; Base load point assuming 128 bytes for - ; this Boot Record size. - RET ; (safety) - JP BIOS ; This address is for the CBOOT entry in the - ; relocated System image. Execution should - ; commence at the argument of this jump. - -Accessing the relevant parameters from the ROM, then, normally consists of -getting the Load Address from 8002H, and the BIOS CBOOT Entry point from -8006H. It is recommended that the jump itself not be executed, but use a -vectored approach such as the sequence: - - LD HL,(8006H) - JP (HL) - -The remainder of this record is available for transferring parameters to the -Bios as part of the CBOOT setup. Parameters may be addressed by absolute -values such as 8020H, etc. - -Since the two location addresses are variable depending on the system size -generated, a checksum of the boot record is not feasible without generating -an entirely new, unique utility. That defeats the intent of this effort which -is to retain a common suite of utilities across multiple platforms. Validation -of the Boot record instead can check the absolute bytes at any or all of the -following locations: - - 8000 - 76H - 8001 - 21H - 8004 - 0C9H - 8005 - 0C3H - -Another possibility which may be implemented is to embed an ASCII Text string -in the available space. This may be a visual thing, but there comes a limit -to complexity vs reliability. - -Hal - \ No newline at end of file diff --git a/Source/BPBIOS/ramd-dx.z80 b/Source/BPBIOS/ramd-dx.z80 deleted file mode 100644 index e6fb93ce..00000000 --- a/Source/BPBIOS/ramd-dx.z80 +++ /dev/null @@ -1,112 +0,0 @@ -;===============================================************************ -; RAM Disk Driver. ** Hardware Specific ** -; D-X Designs Pty Ltd P112 ************************ -; -; 1.1 - 28 Jul 01 - Updated to latest fix for external driver. HFB -; 1.0 - 10 Jun 96 - Initial Release for P112 from YASBEC. HFB -;======================================================================= - - CSEG - IF BANKED - COMMON /BANK2/ - ENDIF - -; This module creates a RAM Drive using the available memory (if available) -; above the TPA and possible System banks. For a banked system, the minimum -; needed is a 64k Main TPA and a 32k System Bank. - -;..... -; Select the RAM Drive. This routine performs any setup required in a select. - -SELRAM: JP SETPARMS ; No action locally. - -;..... -; Read a 128-byte logical sector from the RAM Drive to main memory. -; This routine uses the HSTxxx values from the base BIOS routines. - -RAMRD: OR 0FFH ; Set Read flag (non-0) - JR RamRW ; ..go to common code - -;..... -; Write a 128-byte logical sector from main memory to the RAM Drive. -; This routine uses the HSTxxx values from the base BIOS routines. - -RAMWR: XOR A ; Set Write flag with 0, Read w/AFH - LD (HSTWRT),A ; clear pending write flag - ;..fall thru to common code.. -; The following performs calculations for the proper address and bank, sets -; the DMA block and executes the Move to/from the Host Buffer. - -RamRW: PUSH AF ; Save R/W flag for later - LD A,(RAMBNK) ; Get 1st Bank of Ram Drive - ADD A,A - ADD A,A ; .converting - ADD A,A ; ..to DMA Bank addr - LD HL,HSTTRK ; Point to Track # - ADD A,(HL) ; ..and add in - LD HL,0000 ; ..prepare address - LD B,4 -SHFTR: SRL A ; Shift low 4 bits - RR H ; ..to high of H - DJNZ SHFTR - LD C,A ; Save High byte of A - LD A,(HSTSEC) ; Get sector # - SRL A - RR L ; .multiply by 128 - ADD A,H ; Add Remaining High bits to MSB of address - LD H,A ; ..and store Addr - LD A,C ; Get Bank # - ADC A,0 ; .adjust for possible overflow - LD C,A ; ..and re-save - - IF BANKED - LD A,(SYSBNK) ; Point to system bank for HSTBUF - ELSE - LD A,(TPABNK) ; Point to TPA bank if Unbanked - ENDIF - LD DE,HSTBUF ; Point to Host Buffer - RL D ; Place MSB of address in Carry - ADC A,0 ; .add to Bank Number - RRA ; Shift Bnk # to DMA Bank Byte (LSB to Carry) - LD B,A ; ..and place in destination register - RR D ; Bank # LSB (Carry) to Address MSB - - POP AF ; Read or Write? - JR NZ,RAMRD0 ; ..jump if Read - EX DE,HL ; Else swap things around - LD A,C - LD C,B - LD B,A -RAMRD0: LD (RAMSRC),HL ; Stuff values in DMA block - LD A,C - LD (RAMSRC+2),A - LD (RAMDST),DE - LD A,B - LD (RAMDST+2),A - LD HL,128 ; ..including length of move - LD (MLEN),HL - -; Set the Z-180 registers and start the move - - LD HL,RAMSRC ; Point to the DMA Control block - CALL DMAMOV ; .and use the Z-180 DMA to move - XOR A ; Return Ok status - RET - -;..... -; We need a little data area to set a DMA control block. Put in scratch RAM - - IF BANKED - COMMON /B2RAM/ - ELSE - DSEG - ENDIF - -RAMSRC: DEFS 2 ; Address of Source - DEFS 1 ; .Bank of Source -RAMDST: DEFS 2 ; Address of Destination - DEFS 1 ; .Bank of Destination -MLEN: DEFS 2 ; Length of Data Area to move - -;================== End of RAM Disk Code ==================== - \ No newline at end of file diff --git a/Source/BPBIOS/romwbw.lib b/Source/BPBIOS/romwbw.lib index 4ac87cd5..7953a54e 100644 --- a/Source/BPBIOS/romwbw.lib +++ b/Source/BPBIOS/romwbw.lib @@ -1,6 +1,6 @@ ;:::::::::::::::::::::::::::::::::::::::::::::::********************** ; B/P BIOS Configuration and Equate File. ** System Dependant ** -; - D-X Designs Pty Ltd P112 CPU Board - ********************** +; - Retro-Brew Processors W/ RomWBW HBIOS - ********************** ; HBIOS specific customizations ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ; BIOS Configuration Equates and Macros @@ -13,22 +13,29 @@ HBLOC EQU 0FE00H ; Location of HBIOS proxy (used if not INTPXY) ; ; Set exactly one of the following to YES to specify platform ; -N8VEM EQU YES +SBC EQU YES ZETA EQU NO ZETA2 EQU NO N8 EQU NO MK4 EQU NO ; -; Set either the following to YES (or both to NO for no clock code) +; SIMH SUPPORT - only used with SBC + IF SBC +SIMH EQU YES ; Set yes if running on SimH + ELSE +SIMH EQU NO + ENDIF +; +; Set to YES FOR BIOS clock support else NO If no clock ; -SIMHCLK EQU NO ; Direct SIMH clock access HBCLK EQU YES ; HBIOS clock driver ; ; Set HB_IODEV to appropriate console device ; HB_IODEV EQU 0 ; Assume we want to use first HBIOS serial device + ; Change if using PROPIO etc. ; -; Set HB_HDDEV to the first (boot) hard disk device unit number +; Set HB_HDDEV to appropriate hard disk driver ; HB_HDDEV EQU 2 ; Assumes disk device #2 is first hard disk device ; @@ -36,6 +43,13 @@ HB_HDDEV EQU 2 ; Assumes disk device #2 is first hard disk device ; HB_MDDEV EQU 0 ; Assumes disk device #0 is ROM disk device ; +; Floppy disk support +; + IF MK4 or SIMH +DRV_O SET NO ; YES if system has flopy drives +DRV_P SET NO ; YES if system has flopy drives + ENDIF ;MK4 or SIMH +; ; RAM/ROM disk sizes expressed as count of 2K blocks ; HB_RAMBLKS EQU 192 ; 512K - 128K reserved / 2K per block @@ -44,7 +58,7 @@ HB_ROMBLKS EQU 192 ; 512K - 128K reserved / 2K per block ; ; Layout of RAM banks ; - IF N8VEM OR ZETA OR ZETA2 OR MK4 + IF SBC OR ZETA OR ZETA2 OR MK4 BID_RAMD EQU 80H BID_RAMM EQU 8BH BID_SYS EQU 8CH @@ -80,3 +94,4 @@ HB_DI MACRO DI ENDM ENDIF + \ No newline at end of file diff --git a/Source/BPBIOS/sectran.z80 b/Source/BPBIOS/sectran.z80 index 5b021f93..bbe05dde 100644 --- a/Source/BPBIOS/sectran.z80 +++ b/Source/BPBIOS/sectran.z80 @@ -1,9 +1,9 @@ -;************************************************************************ -; S e c t o r T r a n s l a t i o n R o u t i n e +;****************************************************************** +; S e c t o r T r a n s l a t i o n R o u t i n e ; ; 1.0 - 3 Jul 92 - First General Release. HFB ; 0.0 - 12 Jun 91 - Initial Test Release HFB -;************************************************************************ +;****************************************************************** CSEG @@ -102,4 +102,4 @@ PHYLP1: DJNZ PHYLOP ; Loop as required RET ; Exit w/ logical host sector in A ;========================== End of SECTRAN ================================ - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/selrwd.z80 b/Source/BPBIOS/selrwd.z80 index efb7665e..255878bd 100644 --- a/Source/BPBIOS/selrwd.z80 +++ b/Source/BPBIOS/selrwd.z80 @@ -18,7 +18,7 @@ SELDSK: JP SELDKV COMMON /BANK2/ SELDKV: - ENDIF + ENDIF ; BANKED LD A,C ; Set disk to seek LD (SEKDSK),A PUSH DE ; Save new mount flag @@ -33,7 +33,8 @@ SELDKV: DEC HL LD A,(HL) LD (SEKPDN),A ; Save physical drive number - DEC HL ; advance to Driver Type (Hard/Floppy/RAM) + DEC HL ; advance to Driver Type (1=Floppy, + ; 2=Hard drive & 3=Memory drive) LD A,(HL) ; and Get it DEC HL ; Now advance to Drive Type Byte CP 1 ; Is this a Floppy Drive? @@ -114,17 +115,17 @@ DVRVCT: DEFW SELERR ; Driver 0 Select DEFW HDREAD ; Driver 2 Read DEFW HDWRIT ; Driver 2 Write ENDIF ; harddsk - IF [RAMDSK AND NOT HARDDSK] - DEFW SELERR ; Driver 2 Select (Dummy if No Hard Drive) - DEFW ISTRUE ; Driver 2 Read - DEFW ISTRUE ; Driver 2 Write - ENDIF ;ramdsk & not harddsk - - IF RAMDSK - DEFW SELRAM ; Driver 3 Select (RAM Drive) - DEFW RAMRD ; Driver 3 Read - DEFW RAMWR ; Driver 3 Write - ENDIF ;ramdsk +; IF [RAMDSK AND NOT HARDDSK] +; DEFW SELERR ; Driver 2 Select (Dummy if No Hard Drive) +; DEFW ISTRUE ; Driver 2 Read +; DEFW ISTRUE ; Driver 2 Write +; ENDIF ;ramdsk & not harddsk + +; IF RAMDSK +; DEFW SELHD ; Driver 3 Select (RAM Drive) +; DEFW HDREAD ; Driver 3 Read +; DEFW HDWRIT ; Driver 3 Write +; ENDIF ;ramdsk SELERR: LD HL,0 ; Send null DPH pointer back to caller RET @@ -236,4 +237,4 @@ SEKPDN: DEFS 1 ; Physical drive number to use SEKDVT: DEFS 1 ; Drive type byte for selected drive ;============================= End of SELRWD ============================== - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/suportww.lbr b/Source/BPBIOS/suportww.lbr new file mode 100644 index 00000000..0bc2e57f Binary files /dev/null and b/Source/BPBIOS/suportww.lbr differ diff --git a/Source/BPBIOS/support.txt b/Source/BPBIOS/support.txt new file mode 100644 index 00000000..071e4626 --- /dev/null +++ b/Source/BPBIOS/support.txt @@ -0,0 +1,104 @@ +This library contains a number of support files, programs and scripts needed +to bring up a fully functioning BPBIOS Zsystem. These programs and files +are used and/or loaded by the startup scripts. + +Some of the support files are startup ZEX scripts, some are Z3+ segment files, +others are Date and Time stamp drivers, some are command line editors and +history shells others are needed to initialize the RAMDRIVE as well as help files. + +The following table shows which files are needed to support each of the ten +BPBIOS variants (BP33N, BP33T, BP33NBNK, BP33TBNK, BP34N, BP34T, BP34NBNK, +BP34TBNK, BP41NBNK & BBP41TBNK). + +Variant Name BP33N* BP33T* BP34N* BP34T* BP41NBNK BP41TBNK +====================================================================== +bpbio.ndr X X X X +bpbioz33.ndr X X +BPCNFG.COM X X X X X X +EASE.COM X X +EASE.HLP X X +fcp-4.zrl X X +fcp-4t.zrl X X X X +FILEATTR.COM X X X X X X +HELPLSH.COM X X X X +IF.COM X X X X +jetldr.com X X X X X X +LDTIME7.COM X +LDTIME9.COM X +LDTIMEC.COM X +LDTIMEE.COM X +LSH.COM X X X X +LSHF.COM +LSHF.VAR +myterm.z3t X X X X X X +nzdec23d.z3t X X X X X X +PUTDS.COM X X X X X X +RAMFILES.TXT X X X X X X +RCOPY.COM X X X X X X +rcp-16h.zrl X X X X +Z33N.ZEX X +Z33T.ZEX X +ZEX.COM X X X X X X +ZPATH.COM X X X X X X +ZSCFG2.COM +ZSTF.ZEX X X +ZSTN.ZEX X +ZSTT.ZEX X + + +Instructions: + The support files are "crunched" and stored in the library file +SUPPORT.LBR. Place SUPPORT.LBR on the RAMDRIVE using for example +XModem. Use LBREXT with the /U option to extract and uncrunch the +files. First extract ZEX.COM while logged onto the A: drive with the +following command: + B0:LBREXT SUPPORT C0:ZEX.C?M /U +Next place all the .COM files on C15: by typing: + B0:LBREXT SUPPORT C15:*.C?M +The remaining files should be placed on C0:. + B0:LBREXT SUPPORT C0:*.Z?X /U + B0:LBREXT SUPPORT C0:*.Z?L /U + B0:LBREXT SUPPORT C0:*.N?R /U + B0:LBREXT SUPPORT C0:*.Z?T /U + B0:LBREXT SUPPORT C0:*.T?T /U + B0:LBREXT SUPPORT C0:*.H?P /U + +Note in all BPBIOS variants that A: is the RAMDRIVE, B: is +the ROMDRIVE and C: is the system drive. Hard drive slices occupy C: +through N: and floppy drives are O: & P:. A short desciption +of each of the support files follows: + +bpbioz33.ndr - Named Directory Table for Z33 +bpbio.ndr - Named Directory Table for Z34 & Z41 +BPCNFG.COM - BPBIOS configuration program +EASE.COM - Command line editor & history shell for Z33* +EASE.HLP - Help file for EASE +fcp-4.zrl - Z33 Flow Control Processor (handles IF, ELSE etc) +fcp-4t.zrl - Z34 & Z41 Flow Control Processor (handles IF, ELSE etc) +FILEATTR.COM - Enables date stamping on RAM drive. +HELPLSH.COM - Help file for LSH +if.com - Adds tests to fcp-4t +jetldr.com - Loads Zsystem segments +LDTIME9.COM - Date stamping & clock drivers for Z33N* variants +LDTIME7.COM - Date stamping & clock drivers for Z33T* variants +LDTIMEE.COM - Date stamping & clock drivers for Z34N* variants +LDTIMEC.COM - Date stamping & clock drivers for Z34T* variants +LSH.COM - Command line editor & history shell for Z34 & Z41 +LSHF.COM - LSH with a fixed length History file (runs faster) +LSHF.VAR - History file for LSHF +myterm.z3t - Terminal Capabilities file (defines ESC sequences etc) +NZDEC23D.Z3T - VT100 Terminal Capabilities File. +PUTDS.COM - Installs date stamping for RAM drive. +RAMFILES.TXT - List of frequently used command (edit to suit) +RCOPY.COM - Copies files listed in RAMFILES.TXT to RAMDRIVE +rcp-16h.zrl - Zsystem Resident Command Processor +Z33N.ZEX - Automatically executed Startup script +Z33T.ZEX - Automatically executed Startup script +ZEX.COM - Memory resident SUBMIT - executes startup scripts +ZPATH.COM - Loads the Zsystem & ZSDOS search paths +ZSCFG2.COM - Configures ZSDOS 2 +ZSTF.ZEX - Automatically executed Startup script for BP41* +ZSTN.ZEX - Automatically executed Startup script for BP34N* +ZSTT.ZEX - Automatically executed Startup script for BP34T* + +Note that clock & datestamping drivers are builtin to Z41. \ No newline at end of file diff --git a/Source/BPBIOS/tim-dx.z80 b/Source/BPBIOS/tim-dx.z80 deleted file mode 100644 index 7b15f523..00000000 --- a/Source/BPBIOS/tim-dx.z80 +++ /dev/null @@ -1,415 +0,0 @@ -;:::::::::::::::::::::::::::::::::::::::*************************** -; Time-handling Routines ** Machine-Dependant ** -; D-X Designs Pty Ltd, P112 *************************** -; -; This module incorporates provisions for an interrupt-driven clock, or -; the Dallas DS-1202 Real Time Clock for obtaining Time and Date Info. -; -; 1.0 - 18 Jul 96 - Initial Release. HFB -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -; This code module should handle all Time-related segments, to include -; Interrupt handlers for Real Time update, motor timeouts, user down- -; counter and any necessary time format conversion routines. - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; TIMER -; This routine keeps the Real Time Clock, Diskette Time Out -; counter, and General-Purpose down-counters. An interrupt is -; generated every 50 mS by the Z-182 Programmable Interrupt Timer -; and used to update parameters. Every other interrupt (100 mS -; intervals) is used to update the 100 mS counters and Time string -; if using Interrupt-driven Time and Date. -; Enter: No parameters needed (Interrupt) -; Exit : None -; Uses : None. All registers preserved. Decrements MTM, User and BIOS -; general-purpose counter bytes every 100 mS. -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - - CSEG - -; Come here every 50 milliseconds from Programmable Reload Timer 0 - -TIMER: DI ; Don't Interrupt from here - LD (TIMSTK),SP ; Save entry Stack Pointer - LD SP,TIMSTK ; ..set up Local Interrupt Stack - PUSH HL - PUSH AF ; Save the registers - - IN0 A,(TCR) - IN0 A,(TMDR0L) - IN0 A,(TMDR0H) ; Clear the interrupt - - LD HL,FLAG50 ; Point to 50 mS Flag - LD A,(HL) ; fetch - XOR 01H ; and toggle LSB - LD (HL),A ; Re-save - JR NZ,TDONE ; ..exit if Odd 50 mS Tick - - LD HL,DCNTR ; Adjust User GP Down-Counter - DEC (HL) - - LD HL,MTM ; Adjust Bios GP Down-Counter - DEC (HL) - - INC HL ; Point to Motor On-timer (MOTIM) - LD A,(HL) - OR A ; Already Timed Out? - JR Z,TIMER0 ; ..jump if So - DEC (HL) ; Else count down - CALL Z,MOTOFF ; turning Motors Off if timed out -TIMER0: - -; Adjust the Interrupt-driven Real Clock (if no Real Time Clock exists). -; This "Clock" maintains Date and Time in a DateStamper(C) compatible -; string per ZSDOS specifications. - - IF CLOCK AND [NOT DS1202] - LD HL,TENTHS ; 100ms counter - INC (HL) ; Bump Tenths-of-Seconds - LD A,(HL) ; get the value - SUB 10 ; Subtract limit value (in decimal times 2) - JR NZ,TDONE ; jump to exit if no rollover - LD (HL),A ; Else save a zero - DEC HL ; back down time string - - LD A,(HL) ; Get Seconds - INC A ; bump - DAA ; in BCD - LD (HL),A ; and save - SUB 60H ; Subtract limit value - JR NZ,TDONE ; ..jump to exit if no rollover - LD (HL),A ; Else save a zero - DEC HL ; back down time string - - LD A,(HL) ; Get Minutes - INC A ; bump - DAA ; in BCD - LD (HL),A ; and save - SUB 60H ; Subtract limit value - JR NZ,TDONE ; ..jump to exit if no rollover - LD (HL),A ; Else save a zero - DEC HL ; back down time string - - LD A,(HL) ; Get Hours - INC A ; bump - DAA ; in BCD - LD (HL),A ; and save - SUB 24H ; Subtract limit value - JR NZ,TDONE ; ..jump to exit if no rollover - LD (HL),A ; Else save a zero - DEC HL ; back down time string - - LD A,(HL) ; Get Day - INC A ; bump - DAA ; in BCD - LD (HL),A ; and save - PUSH DE ; Save regs - PUSH AF - EX DE,HL - LD HL,DPM-1 ; Point to days per month table indexed base 1 - DEC DE ; back up to Months byte - LD A,(DE) - INC DE ; move ptr back - CP 10 ; >Sept? - JR C,TIMER1 ; ..jump if Not - SUB 6 ; Else convert BCD to binary -TIMER1: CALL ADDAHL ; Offset into table based on Month - POP AF ; Get current day count - CP (HL) ; Time for new month? - EX DE,HL ; (put regs back) - POP DE - JR C,TDONE ; ..exit here if not time - LD (HL),1 ; Else start out on first of month - DEC HL ; back down to month - - LD A,(HL) ; Get month - INC A ; Bump - DAA ; in BCD - LD (HL),A ; and save - SUB 13H ; Time for new year? - JR C,TDONE ; ..exit if not - LD (HL),1 ; Else start at month 1 (Jan) - DEC HL ; back up to Years byte - - LD A,(HL) ; Get Year - INC A ; bump - DAA ; in BCD - LD (HL),A ; and save - SUB 99H ; Time for next century? - JR NZ,TDONE ; ..exit if not - LD (HL),A ; Else save 0 year - - ENDIF ;Clock & Not DS1202 - -TDONE: POP AF - POP HL ; Restore registers - LD SP,(TIMSTK) ; and Stack Pointer - EI ; allow Ints again - RET - - IF CLOCK AND [NOT DS1202] ; Table of Days-per-Month -DPM: DEFB 31H+1, 28H+1, 31H+1 ; January, February, March - DEFB 30H+1, 31H+1, 30H+1 ; April, May, June - DEFB 31H+1, 31H+1, 30H+1 ; July, August, September - DEFB 31H+1, 30H+1, 31H+1 ; October, November, December - ENDIF ;Clock & Not Ds1202 - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; TIME - Set or Return the time string as defined for ZSDOS. If Reading, -; The Six digit BCD ZSDOS Clock string is copied to the location -; addressed by Register pair DE. As an enhancement, the tenths-of-seconds -; value is returned in Reg D. If Setting the Clock, the RTC clock string -; will be set from the 6 bytes addressed by DE. -; -; ENTER: C - 0 to Read the Clock, Non-0 (1 recommended) to Set the Clock -; DE = Pointer to receive 6-byte Time/Date on Read, Source for Set -; -; EXIT : E = Original contents of Target Seconds field -; D = Tenths of Seconds field -; HL = Pointer to Target Seconds field -; A = 1 for success, 0 if Unable to Set or Read -; BC = Address of User General-Purpose Down-Counter -; -; NOTE: The Wall Clock string is arranged as BCD digits with Tenths- -; of-Seconds byte appended. The entire string is: -; -; YR MO DA HH MM SS TT -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - - IF CLOCK AND DS1202 -; Dallas DS-1202 Clock Interface on the D-X Designs Pty Ltd P112. -; Read the Clock to a buffer area in Memory. Seven bytes (Six used) are -; read in burst mode from the clock chip, one bit at a time via three bits -; from one of the Z-182 parallel ports. When Setting the clock from this -; code fragment, the DOW is forced to 01H, which will probably be invalid. -; The Clock is accessed serially (LSB first) one byte at a time with a -; command byte being written to begin the Read/Write. Burst Mode is used -; with a 0BFH byte for Reading, 0BEH for Writing as the Command. Clock -; Setting clears the Write Protect bit before setting, and resets the chip -; to Read-Only when finished. The Entire Date/Time String is eight bytes -; read as: -; -; Sec Min Hour Day Mon DOW Year WProt -; (12/24) (MSB) -; -; In this implementation, the DOW field is not used, and the 12/24 hour bit -; is always set to 24-hour mode by setting the MSB to 1. - -RTCRst EQU 2 ; DS-1202 Reset\ Bit -RTCClk EQU 1 ; DS-1202 Clock Bit -RTCDat EQU 0 ; DS-1202 Data IO Bit - -TIME: DI ; NO INTERRUPTS in This Routine - LD (TIMSTK),SP ; Save Entry Stack Ptr - LD SP,TIMSTK ; and Set Local Stack - LD A,C ; Get Clock Operation Flag - OR A ; Is it a Write? - PUSH AF ; (save) - CALL CSETUP ; Set Clock to Read, returning BC->DRA Port - LD DE,5 ; (above also moved ptr to HL) - ADD HL,DE ; offset to Seconds Field - POP AF ; (restore Write flag) - IF CLKSET - JR NZ,TIMSET ; ..jump if Write and Set allowed - ELSE - LD A,00 ; (preset Error Condition) - JR NZ,NOCLOK ; ..jump to Error if Set Not allowed - ENDIF - LD E,(HL) ; Else Read, so fetch orig contents - PUSH DE ; (Save for Exit) - PUSH HL ; (and preserve ptr) - -; Command the DS-1202 for Burst Read of Clock - - LD A,0BFH ; Load the Burst Clock Read Command - CALL Wr1202 ; and Send it - -; Read the Clock Data. D still 0 from above Load, use as Byte Index - -RdTim0: PUSH HL ; Save Ptr - LD E,8 ; Gather 8 bit for a byte -RdTim1: IN A,(C) ; Read Port - RES RTCClk,A ; Clock LO - OUT (C),A ; Set - NOP ; (settle) - IN A,(C) ; Read Bit to LSB - RRCA ; Data Bit to Carry - RR L ; to MSB of Accum - RLCA ; restore Parallel Port bits - SET RTCClk,A ; Clock HI - OUT (C),A ; Set - DEC E ; Byte Done? - JR NZ,RdTim1 ; ..jump if Not - - LD E,L ; Else Get Byte - POP HL ; Restore Ptr to Dest - LD A,D ; Get Index - CP 5 ; Day-Of-Week? - JR Z,RdTim2 ; ..jump if So, bypassing save - LD (HL),E ; Save value in output string - DEC HL ; back down to previous byte in output -RdTim2: INC D ; increment index - CP 6 ; Did we just save Year? - JR NZ,RdTim0 ; ..get another byte if So - CALL CClose ; Else Deselect Clock - POP HL ; Restore Ptr - POP DE ; Orig Seconds content (and 0 Tenths) -ClkExt: LD A,01H ; Set Good Exit -NOCLOK: LD SP,(TIMSTK) ; Restore entry Stack - LD BC,DCNTR ; Get Address of User Down-Counter - EI ; Ints Ok now - RET ; and Quit - -;..... -; Set the Clock if code assembly option set -; Enter: BC = DRA Address -; D = 0 (used as count of bytes written) -; HL -> Seconds of ZSTime string - - IF CLKSET -WrTim: LD A,8EH - CALL Wr1202 ; Turn Write Protect OFF - XOR A - CALL Wr1202 ; by clearing MSB of Time+6 - CALL CClose ; then terminate Clock Access - CALL COpen ; Start Clock access again -WrTim0: LD A,D ; Get Index 0..7 of Write String - CP 8 ; At End? - JR Z,WrTimX ; ..quit if So - CP 6 ; Year or WrProtect? - JR C,WrTim1 ; .jump if Not - JR Z,WrTim2 ; ..jump if Year - LD A,80H ; Else Write Protect On since last byte - JR WrTim3 ; ..do It! - -WrTim1: CP 5 ; DOW? - LD A,01H ; (set default if So) - JR Z,WrTim3 ; ..set if So -WrTim2: LD A,(HL) ; Else Get Byte from ZSTime String - DEC HL ; back up for Next Byte -WrTim3: CALL Wr1202 ; Write Byte to Clock - INC D ; bump index of bytes written - JR WrTim0 ; ..continue til Done - -WrTimX: CALL CClose ; Terminate Clock Access - JR ClkExt ; ..and Exit - ENDIF - -;..... -; Set up DS-1202 interface from Z80182 Parallel port -; Entry: None -; Exit : BC -> Data Port w/Clk at bits 0-2 -; Uses : AF,BC,DE - -CSETUP: EX DE,HL ; Move Pointer to HL -COpen: LD BC,DDRA ; Address Parallel Port A Control - IN A,(C) ; Read Settings - SET RTCDat,A ; Data Line to Input - OUT (C),A ; and Set - INC BC ; Address Parallel Port A (DRA) - IN A,(C) ; Fetch settings - RES RTCClk,A ; Clk LO to Start - OUT (C),A ; (set) - SET RTCRst,A ; Clear Reset to HI - OUT (C),A ; (set) - RET - -;..... -; Write the Byte in A to the clock (used for Command) -; Entry: BC -> Data Port (DRA) -; Exit : None -; Uses : AF,E - -Wr1202: PUSH HL ; Save Regs - LD L,A ; Store byte - LD E,8 ; set bit count - IN0 A,(DDRA) ; Fetch Def'n Reg contents - RES RTCDat,A ; Data Line to Output - OUT0 (DDRA),A ; (set) -Wr120L: IN A,(C) ; Read Parallel Port - RES RTCClk,A ; Clk LO - OUT (C),A ; (set) - SRL A ; (clear LSB) - RR L ; Data Byte LSB to Carry - RLA ; then to Parallel Port LSB - OUT (C),A ; (set) - SET RTCClk,A ; Clk HI - OUT (C),A ; (set) - DEC E ; Eight Bits Sent? - JR NZ,Wr120L ; ..loop if Not - - IN0 A,(DDRA) - SET RTCDat,A ; Set Port to Data IN - OUT0 (DDRA),A - POP HL ; Restore Regs - RET - -;..... -; Deselect the Clock for Exit -; Enter: BC -> Z80182 Parallel Port A -; Exit : None -; Uses : AF - -CClose: IN A,(C) ; Fetch Parallel Port - SET RTCClk,A ; Clk to HI - OUT (C),A - RES RTCRst,A ; Reset Active LO - OUT (C),A - RET - - ENDIF ;Clock & Ds1202 -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - IF CLOCK AND [NOT DS1202] ; Not Dallas, make Intrpt Code - -TIME: LD A,C ; Get Clock Operation Flag - LD BC,5 ; and set up for ZSDOS Read/Write - LD HL,YEAR ; Pointing to Clock String - OR A ; Is it a Read? - JR Z,TIMES ; ..jump it so - EX DE,HL ; Else swap pointers for write -TIMES: DI ; disable Interrupts - LDIR ; and move 5 bytes of 6 bytes (.1 Sec = 7) - LD C,(HL) ; Get the Seconds byte - INC HL ; bump to 1/10th Seconds - LD H,(HL) ; and Get - EI ; Re-enable Interrupts - EX DE,HL ; Swap pointers - LD E,(HL) ; Preserve original Sec field contents in E - LD (HL),C ; and store the Seconds byte (.1 Sec in D) - LD BC,DCNTR ; Get Address of User Down-Counter - LD A,01 ; Set Ok exit value of 1 - RET - - ENDIF ;Clock & Not Ds1202 - IF NOT CLOCK ; If No Clock.. - XOR A ; Set Error Return - RET ; and exit - - ELSE - DSEG - -; Real Time Clock Buffer - IF NOT DS1202 ; Don't need this if D-X Designs P112 -YEAR: DEFS 1 ; Year - packed BCD - DEFS 1 ; Month - packed BCD - DEFS 1 ; Day - packed BCD - DEFS 1 ; Hour - packed BCD - DEFS 1 ; Minute - packed BCD - DEFS 1 ; Seconds - packed BCD -TENTHS: DEFS 1 ; Tenths of Seconds - Binary (Int, else..) - ENDIF - ENDIF ;Clock - -;..... -; Save some space in the Common RAM Area for a local stack - - DSEG -DCNTR: DEFS 1 ; User 100 mS General-Purpose Down-Counter -FLAG50: DEFS 1 ; Flag for dividing 50mS to 100mS ticks - DEFS 12 ; We use 6 levels of stack (worst case) -TIMSTK: DEFS 2 ; Store the entry Stack pointer here - CSEG ; End up by restoring CSEG - -;=========================== END of TIM-DX ================================== - \ No newline at end of file diff --git a/Source/BPBIOS/tim-ww.z80 b/Source/BPBIOS/tim-ww.z80 index ab2563d7..ba6b519a 100644 --- a/Source/BPBIOS/tim-ww.z80 +++ b/Source/BPBIOS/tim-ww.z80 @@ -1,36 +1,19 @@ ;:::::::::::::::::::::::::::::::::::::::*************************** ; Time-handling Routines ** Machine-Dependant ** -; D-X Designs Pty Ltd, P112 *************************** +; Retro-Brew Hardware with HBIOS *************************** ; -; This module incorporates provisions for an interrupt-driven clock, or -; the Dallas DS-1202 Real Time Clock for obtaining Time and Date Info. +; This module incorporates provisions for an HBIOS clock for +; obtaining Time and Date Info. ; +; 1.1 - 24 Mar 14 - Initial N8VEM test release WW-LN ; 1.0 - 18 Jul 96 - Initial Release. HFB -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; This code module should handle all Time-related segments, to include -; Interrupt handlers for Real Time update, motor timeouts, user down- -; counter and any necessary time format conversion routines. - -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -; TIMER -; This routine keeps the Real Time Clock, Diskette Time Out -; counter, and General-Purpose down-counters. An interrupt is -; generated every 50 mS by the Z-182 Programmable Interrupt Timer -; and used to update parameters. Every other interrupt (100 mS -; intervals) is used to update the 100 mS counters and Time string -; if using Interrupt-driven Time and Date. -; Enter: No parameters needed (Interrupt) -; Exit : None -; Uses : None. All registers preserved. Decrements MTM, User and BIOS -; general-purpose counter bytes every 100 mS. -;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +; This code module should handle all Time-related segments +; including any necessary time format conversion routines. CSEG -TIMER: - RET ; NOT IMPLEMENTED FOR HBIOS - ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ; TIME - Set or Return the time string as defined for ZSDOS. If Reading, ; The Six digit BCD ZSDOS Clock string is copied to the location @@ -55,46 +38,15 @@ TIMER: IF CLOCK - IF SIMHCLK -SIMHPORT EQU 0FEH -READCLOCK EQU 7 -WRITECLOCK EQU 8 -PARBLOCKSIZE EQU 6 - TIME: - EX DE,HL ; GET DE TO HL LD A,C OR A JR NZ,WRCLK ; -GETTIM: LD A,READCLOCK - OUT (SIMHPORT),A - LD BC,256*(PARBLOCKSIZE-1)+SIMHPORT ; B := 5, C := 0FEH - INIR - LD E,(HL) ; Save original seconds in E - INI ; READ SECONDS - DEC HL - LD A,1 ; Set OK status return - LD BC,DCNTR ; Get Address of User Down-Counter - RET ; -WRCLK: LD A,WRITECLOCK - OUT (SIMHPORT),A - LD A,L - OUT (SIMHPORT),A - LD A,H - OUT (SIMHPORT),A - LD A,1 - LD BC,DCNTR ; Get Address of User Down-Counter - RET - ENDIF ; SIMHCLK - - IF HBCLK - -TIME: - LD A,C - OR A - JR NZ,WRCLK +;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - +; R e a d T h e C l o c k +;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; RDCLK: PUSH DE ; Save the final destination @@ -117,6 +69,11 @@ RDCLK: LD A,1 ; Signal success RET +; + if CLKSET +;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +; S e t T h e C l o c k +;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; WRCLK: EX DE,HL ; Make incoming DE the copy source in HL @@ -131,26 +88,21 @@ WRCLK: LD A,1 ; Signal success RET - - ENDIF ; HBCLK - + else XOR A ; Set Error Return RET ; and exit - + endif ; clkset ENDIF ; Clock ;..... -; Save some space in the Common RAM Area for a local stack +; Buffer space in the Common RAM Area for Time & Date DSEG - -DCNTR: DEFS 1 ; User 100 mS General-Purpose Down-Counter - - IF HBCLK -TIMBUF DEFS 6 - ENDIF +DCNTR: DEFS 1 +TIMBUF: DEFS 6 CSEG ; End up by restoring CSEG -;=========================== END of TIM-DX ================================== +;=========================== END of TIM-WW ================================== + \ No newline at end of file diff --git a/Source/BPBIOS/util.z80 b/Source/BPBIOS/util.z80 index 4602fcfa..7df8ceba 100644 --- a/Source/BPBIOS/util.z80 +++ b/Source/BPBIOS/util.z80 @@ -1,5 +1,5 @@ ;:::::::::::::::::::::::::::::::::::::::***************************** -; UTIL - N8VEM Utility Routines ***** Hardware-Specific ***** +; UTIL - Retro-Brew Utility Routines ***** Hardware-Specific ***** ; ***************************** ; ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -333,3 +333,4 @@ STR_EMPTY DEFB "$" ; DSEG ; Put the following areas in Data Segment (uninitialized REAM) ; ;======================= End of UTIL ============================== + \ No newline at end of file diff --git a/Source/BPBIOS/wboot-dx.z80 b/Source/BPBIOS/wboot-dx.z80 deleted file mode 100644 index 03fd31d0..00000000 --- a/Source/BPBIOS/wboot-dx.z80 +++ /dev/null @@ -1,183 +0,0 @@ -;:::::::::::::::::::::::::::::::::::::::************************************ -; Warm Boot Routine *** Machine Dependant for Moves *** -; - D-X Designs Pty Ltd P112 - *** and custom load formatting *** -; ************************************ -; 1.0 - 12 Jun 96 - Initial Release for P112 from YASBEC. HFB -;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - - CSEG - -WBOOT: - IF BANKED - LD A,(TPABNK) ; Get TPA Bank # in case currently in Bank - CALL SELMEM ; ..and make current - LD SP,USP ; Set stack in high memory - ELSE - LD SP,80H ; Use space below default buffer - ENDIF - IF FASTWB - LD HL,SARL ; Point to DMA Initialization block -WBOOTV: CALL DMAMOV - XOR A ; Indicate "A" logged as Host Disk - LD (HSTDSK),A ; ..by showing Host Disk already logged - ELSE - IF BANKED - LD SP,USP ; If banked, use stack in high common memory - CALL GOSYSB ; Disk routines are in banked memory - ELSE - LD SP,EXTSTK+32 ; Place default stack up high - ENDIF - LD A,0FFH ; Insure the default drive is logged - LD (HSTDSK),A ; ..by unlogging the Host Disk - LD A,(SYSDRV) - LD C,A ; Select system disk - LD E,0 ; Declare new mount - CALL SELDSK ; We're going to use the system disk - LD BC,0 - CALL SETTRK ; Set track 0 - LD BC,10H*256+1 ; B sectors remaining, C first sector - LD DE,0 ; DE beginning track - -; Note that we begin by reading track 0, sector 1 since sector 0 -; contains the cold start loader, which is skipped in a warm start - - LD HL,CPR ; Base of CP/M (initial load point) -LOAD1: PUSH DE ; Load a Sector, Save Current Track - PUSH BC ; Save sectors remaining and next sector - PUSH HL ; Save DMA address - LD (DMAADR),HL ; ..in deblocker - LD HL,(SEKDPH) - LD E,(HL) - INC HL - LD D,(HL) ; Get sector XLATE address - CALL SECTRN ; Skew sector as needed - LD (SEKSEC),HL ; Save Sector # directly in deblocker - -; Drive = 0, track set, sector set, DMA address set - - CALL READ - OR A ; Any errors? - JR NZ,WBOOT ; Retry the entire boot if an error occurs - -; No error, move to next sector - - POP HL ; Recall DMA address - LD DE,128 ; DMA=DMA+128 - ADD HL,DE ; New DMA address is in H,L - POP BC ; Recall NSECTS and current sector - POP DE ; Recall current track - DEC B ; Sectors=sectors-1 - JR Z,GOZSYS ; Go to Z-System if all have been loaded - -; More sectors remain to load, check for track change - - INC C ; Increment sector count - LD A,(CPMSPT) ; Max sector +1 - CP C ; Have we reached the end? - JR NZ,LOAD1 ; If not - -; End of current track, go to next track - - INC DE ; Track=track+1 - LD C,0 ; First sector on next track - -; Save register state, and set new track - - LD (SEKTRK),DE ; Save track directly - JR LOAD1 ; For another sector - ENDIF ;fastwb - -; End load operation, set parameters & go to Z-System - -GOZSYS: LD BC,80H ; Default DMA address is 80H - CALL SETDMA - - LD A,0C3H ; C3 is a JMP instruction - LD (0),A ; For JMP to WBOOT - LD (5),A ; For JMP to BDOS - LD HL,BIOSJT+3 ; Wboot entry point - LD (1),HL ; Set address field for JMP at 0 - LD HL,(ENVADR) ; Get the pointer to the ENV - LD DE,43H ; Offset to high byte of Dos Start - ADD HL,DE - LD D,(HL) ; Load Dos start - DEC HL - LD E,(HL) - EX DE,HL ; Put Dos in HL - LD BC,6 ; .offset to Entry - ADD HL,BC - LD (6),HL ; ..and set Address field of jump at 5 to BDOS - EX DE,HL - DEC HL ; Back down to CCP entry - DEC HL - LD D,(HL) ; Get the vector - DEC HL - LD E,(HL) - IF BANKED - LD HL,CPYVEC ; Copy Page0 Vectors and RSTs to System Bank - CALL DMAMOV - LD A,(TPABNK) ; Set all Bank regs to TPA - LD (SRCBNK),A - LD (DSTBNK),A - LD (DMABNK),A - CALL SELMEM ; Insure TPA in context (also set USRBNK) - XOR A - LD (BIOSTK),A ; Init bank switcher - ENDIF - LD A,(4) ; Get current disk number - LD C,A ; Send to the CCP - EI ; Enable the interrupt system - EX DE,HL ; ..put destination in HL - JP (HL) ; Go to Z-System for further processing - -;..... -; Common DMA move sequence placed here in CSEG for Common access -; Enter with HL pointing to a DMA definition block - - IF [BANKED OR FASTWB OR RAMDSK] -DMAMOV: LD BC,8*256+SAR0L ; Send 8 bytes to Ports SAR0L - OTIMR - LD A,00000010B ; Set DMA Mode control to Burst Mode - OUT0 (DMODE),A - LD A,40H ; Enable DMA0 - OUT0 (DSTAT),A ; ..and move the block - RET - ENDIF - - IF [Z3 AND HAVIOP] -; Aux Jump Table so IOP's can find routines. After Cold Boot, the -; address of this table is placed in BIOSJT+1. - -IOPRET: JP CONST - JP CONIN - JP CONOUT - JP LIST - JP AUXOUT - JP AUXIN - JP LISTST - ENDIF - - DSEG ; Put the following areas in Data Segment - -; This table in unitialized RAM is filled from the Cold Boot module. - - IF FASTWB -SARL: DEFS 2 ; Source Segment address - DEFS 1 ; Source Bank Number - DEFS 2 ; Destination Segment address - DEFS 1 ; Destination Bank Number (TPA) - DEFS 2 ; Number of bytes to move - ENDIF ;fastwb - -; This table is used to copy Page 0 vectors from TPA to base of System bank -; on Warm Boots to insure that needed IO can vector to the correct devices. - - IF BANKED -CPYVEC: DEFS 2 ; Offset of Source area - DEFS 1 ; ..Source Bank (Base of TPA) [BNK0 SHR 1] - DEFS 2 ; Offset of Destination - DEFS 1 ; ..Dest Bank (Base of System Bank) [BNK2 SHR 1] - DEFS 2 ; Length of move - ENDIF -;========================= End of WBOOT ============================ - \ No newline at end of file diff --git a/Source/BPBIOS/wboot-ww.z80 b/Source/BPBIOS/wboot-ww.z80 index df9d135c..dbdb5509 100644 --- a/Source/BPBIOS/wboot-ww.z80 +++ b/Source/BPBIOS/wboot-ww.z80 @@ -1,7 +1,8 @@ ;:::::::::::::::::::::::::::::::::::::::************************************ ; Warm Boot Routine *** Machine Dependant for Moves *** -; - D-X Designs Pty Ltd P112 - *** and custom load formatting *** +; - Retro-Brew Hardware with HBIOS - *** and custom load formatting *** ; ************************************ +; 1.1 - 28 Nov 16 - Modified for version 2.8 of HBIOS WW ; 1.0 - 12 Jun 96 - Initial Release for P112 from YASBEC. HFB ;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -15,7 +16,7 @@ WBOOT: ELSE LD SP,80H ; Use space below default buffer ENDIF - + IF FASTWB ; Restore command processor from ; cache in (SYSBNK):100H. We assume that the @@ -29,11 +30,14 @@ WBOOT: LD DE,(CPADR) ; .. to location of command processor in TPA LD BC,(CPLEN) ; Length of command processor CALL HBX_COPY ; Do it - +; call PRTSTRD ; DEBUG +; defb CR,LF ; DEBUG +; defb 'WB - copied C' ; DEBUG +; defb 'P','$' ; DEBUG WBOOTV: XOR A ; Indicate "A" logged as Host Disk LD (HSTDSK),A ; ..by showing Host Disk already logged - ELSE + ELSE ; FASTWB IF BANKED LD SP,USP ; If banked, use stack in high common memory CALL GOSYSB ; Disk routines are in banked memory @@ -149,7 +153,11 @@ GOZSYS: LD BC,80H ; Default DMA address is 80H ; EI ; Enable the interrupt system ; EX DE,HL ; ..put destination in HL POP HL ; Restore CCP entry address - +; call PRTSTRD ; DEBUG +; defb CR,LF ; DEBUG +; defb 'WB exi' ; DEBUG +; defb 't$' ; DEBUG +; HALT ; DEBUG JP (HL) ; Go to Z-System for further processing IF [Z3 AND HAVIOP] @@ -174,4 +182,4 @@ CPADR DEFS 2 ; Command processor address CPLEN DEFS 2 ; Command processor length ENDIF ;fastwb ;========================= End of WBOOT ============================ - \ No newline at end of file + \ No newline at end of file diff --git a/Source/BPBIOS/z33.zex b/Source/BPBIOS/z33.zex deleted file mode 100644 index ea1e714e..00000000 --- a/Source/BPBIOS/z33.zex +++ /dev/null @@ -1,3 +0,0 @@ -IOPINIT -JETLDR RCP.ZRL,SYS.NDR,FCP.ZRL,MYTERM.Z3T - \ No newline at end of file diff --git a/Source/BPBIOS/z34.zex b/Source/BPBIOS/z34.zex deleted file mode 100644 index ea1e714e..00000000 --- a/Source/BPBIOS/z34.zex +++ /dev/null @@ -1,3 +0,0 @@ -IOPINIT -JETLDR RCP.ZRL,SYS.NDR,FCP.ZRL,MYTERM.Z3T - \ No newline at end of file diff --git a/Source/BPBIOS/z34.zrl b/Source/BPBIOS/z34.zrl new file mode 100644 index 00000000..0459f044 Binary files /dev/null and b/Source/BPBIOS/z34.zrl differ diff --git a/Source/BPBIOS/z3basen.lib b/Source/BPBIOS/z3basen.lib index 0a84f197..b1c38a9a 100644 --- a/Source/BPBIOS/z3basen.lib +++ b/Source/BPBIOS/z3basen.lib @@ -1,4 +1,6 @@ -; B/P Bios System Z3 Definition File. +; z3base.fp -- B/P Bios System Z3 Definition File for not or partially +; banked system with 32 byte external HBIOS proxy and +; internal proxy. ; This file is adapted from the basic Z3BASE.LIB configuration file used for ; most ZCPR33 systems. It has added the new definitions for the Resident @@ -12,32 +14,32 @@ ; comment table, then set the equates to reflect the memory map, doing any ; required calculations for element sizes and required spaces. As an ; alternative, just leave this file alone and configure everything with -; the utilities provided. +; the utilities provided. For example reserve top 1k for HBIOS and no IOP. -; FFE0 - FFFF 32 Bytes HBIOS Reserved -; FFB0 - FFDF 48 Bytes ZCPR3 External Stack -; FF00 - FFAF 176 Bytes Multiple Command Line Buffer -; FE00 - FEFF 256 Bytes Environment Descriptor +; FFE0 - FFFF 32 Bytes HBIOS RESERVED AREA (mini proxy) +; FFB0 - FFDF 48 Bytes ZCPR3 External Stack (must be 48 bytes) +; FE00 - FFAF 432 Bytes Named Directory Buffer +; FD00 - FDFF 256 Bytes Multiple Command Line Buffer +; FC00 - FCFF 256 Bytes Environment Descriptor ; Bytes 00H-7FH: Z3 Parameters ; Bytes 80H-FFH: Z3 TCAP -; FDFF 1 Byte Wheel byte -; FDF4 - FDFE 11 Bytes Path (5 elements) -; FDD0 - FDF3 36 Bytes ZCPR3 External FCB -; FD80 - FDCF 80 Bytes ZCPR3 Message Buffers -; FD00 - FD7F 128 Bytes ZCPR3 Shell Stack -; FC00 - FCFF 256 Bytes Named Directory Buffer -; FA00 - FBFF 512 Bytes Flow Command Package -; F200 - F9FF 2.0 KBytes Resident Command Package -; EC00 - F1FF 1.5 KBytes IO Package -; E900 - EBFF .75 KBytes Resident User Space +; FBFF 1 Byte Wheel byte +; FBF4 - FAFE 11 Bytes Path (5 elements) +; FBD0 - FAF3 36 Bytes ZCPR3 External FCB +; FB80 - FACF 80 Bytes ZCPR3 Message Buffers +; FB00 - FA7F 128 Bytes ZCPR3 Shell Stack +; F900 - FAFF 512 Bytes Flow Command Package +; F100 - F8FF 2.0 KBytes Resident Command Package +; F100 - F100 0 KBytes IO Package - no IOP +; EE00 - F0FF 768 Bytes Resident User Space (room for clock driver) ; The remainder is for the Operating System. Exact sizes vary depending -; primarily on the Number and sizes of Hard Drive Partitions, but may be: +; primarily on the Number and sizes of Hard Drive Partitions, typically: -; CE00 - E8FF 5.0 KBytes B/P BIOS (unbanked version) -; C000 - CDFF 3.5 KBytes ZSDOS 1.0 BDOS -; B800 - BFFF 2 KBytes ZCPR 3.3 Command Processor -; 0100 - B7FF ~46 KBytes Transient Program Area +; DC00 - EDFF 4.5 KBytes B/P BIOS (banked version) +; CE00 - DBFF 3.5 KBytes ZSDOS 1.0 BDOS +; C600 - CDFF 2 KBytes ZCPR 3.3 Command Processor +; 0100 - C5FF ~50 KBytes Transient Program Area ; 0000 - 00FF 256 Bytes Standard CP/M Buffers ;======================================================================== @@ -47,85 +49,104 @@ TRUE EQU NOT FALSE YES EQU TRUE NO EQU FALSE -BASE EQU 0 - -CCP EQU 0C000H ; ZCPR3 COMMAND PROCESSOR - ; The External Stack is placed in the very top position in memory. It is ; mandatory for B/P Bios and ZCPR 3.3. -;EXTSTK EQU 0FFD0H ; ZCPR3 External Stack -EXTSTK EQU 0FFB0H ; ZCPR3 External Stack +; FFB0 - FFDF 48 Bytes ZCPR3 External Stack (must be 48 bytes) +;EXTSTK EQU 0FBD0H ; ZCPR3 External Stack +EXTSTK EQU MEMTOP+1-48 ; ZCPR3 External Stack EXTSTKS EQU YES +; ZCPR3 Named Directory Buffer definition. +; FE00 - FFAF 432 Bytes Named Directory Buffer -23 names +Z3NDIRS EQU 23 ; Number of Named Directory Elements +; F800 - F8FF 256 Bytes Named Directory Buffer - 14 NAMES +NDIRSZ EQU Z3NDIRS * 18 + 1 + ; (NDIR Size = Z3NDIRS * 18 + 1 = 433 Bytes) +Z3NDIR EQU ((EXTSTK-NDIRSZ)/256)*256 ; Start of Named Directory Buffer + ; The Multiple Command Line Buffer is placed in the Top Page of Memory to ; place it above the Environment. It is mandatory for ZCPR 3.3. - -Z3CL EQU 0FF00H ; ZCPR3 Command Line Buffer +; FD00 - FDFF 256 Bytes +;Z3CL EQU 0FB00H ; ZCPR3 Command Line Buffer ;Z3CLS EQU 208-5 ; Size of Command Line Buffer-5 -Z3CLS EQU 176-5 ; Size of Command Line Buffer-5 +Z3CLS EQU 256-5 ; Size of Command Line Buffer-5 +Z3CL EQU Z3NDIR-Z3CLS-5 ; ZCPR3 Command Line Buffer ; The ZCPR3 External Environment Descriptor is mandatory B/P Bios & ZCPR 3.3. ; The Environment Descriptor MUST begin on an even Page Boundary (xx00H). -Z3ENV EQU 0FE00H ; Environment Descriptors +; FC00 - FCFF 256 Bytes Environment Descriptor Z3ENVS EQU 2 ; Size of Env Descriptor in 128-Byte Blks +Z3ENV EQU (Z3CL-Z3ENVS*128) and 0FF00H ; The ZCPR3 Wheel Byte is mandatory for ZCPR 3.3. -Z3WHL EQU 0FDFFH ; Wheel Byte Address +; FBFF 1 Byte Wheel byte Z3WHLS EQU YES +Z3WHL EQU Z3ENV-1 ; Wheel Byte Address ; The Path is mandatory for ZCPR 3.3. -EXPATH EQU 0FDF4H ; External Path starting Address +; FBF4 - FBFE 11 Bytes Path (5 elements) EXPATHS EQU 5 ; (Path Size = EXPATHS*2 + 1 = 11 bytes) ; This defines 5 2-byte Path Elements +EXPATH EQU Z3WHL-EXPATHS*2-1 ; External Path starting Address ; The ZCPR3 External FCB is mandatory for ZCPR 3.3. -EXTFCB EQU 0FDD0H ; 36-Byte ZCPR3 External FCB +; FBD0 - FBF3 36 Bytes ZCPR3 External FCB EXTFCBS EQU YES +EXFCBSZ EQU 36 +EXTFCB EQU EXPATH-EXFCBSZ ; 36-Byte ZCPR3 External FCB ; The ZCPR3 Message Buffers are mandatory for ZCPR 3.3. -Z3MSG EQU 0FD80H ; 80-Byte ZCPR3 Message Buffer +; FB80 - FBCF 80 Bytes ZCPR3 Message Buffers Z3MSGS EQU YES +Z3MSGSZ EQU 80 ; size of buffer +Z3MSG EQU EXTFCB-Z3MSGSZ ; 80-Byte ZCPR3 Message Buffer ; Shell Stack definition. Set SHSTKS to 0 to eliminate Shell Stack -SHSTK EQU 0FD00H ; Shell Stack Starting Address +; FB00 - FB7F 128 Bytes ZCPR3 Shell Stack SHSTKS EQU 4 ; Number of SHSIZE-Byte Shell Stack entries SHSIZE EQU 32 ; (Stack Size = SHSTKS * SHSIZE = 128 Bytes) - -; ZCPR3 Named Directory Buffer definition. Set Z3NDIRS to 0 to eliminate -; the named directory buffer. - -Z3NDIR EQU 0FC00H ; Start of Named Directory Buffer -Z3NDIRS EQU 14 ; Number of Named Directory Elements - ; (NDIR Size = Z3NDIRS * 18 + 1 = 253 Bytes) +SHSTK EQU Z3MSG-SHSTKS*SHSIZE ; Shell Stack Starting Address ; Flow Command Package definition. Set FCPS to 0 to eliminate FCP -FCP EQU 0FA00H ; Start of Flow Command Package +; F900 - FAFF 512 Bytes Flow Command Package FCPS EQU 4 ; (FCP Size = 128 * FCPS = 512 Bytes) +;FCPS EQU 0 ; (FCP Size = 128 * FCPS = 512 Bytes) +FCP EQU SHSTK-FCPS*128 ; Start of Flow Command Package ; Resident Command Processor Definition. Set RCPS to 0 to eliminate RCP -RCP EQU 0F200H ; Start of Resident Command Processor +; F100 - F8FF 2.0 KBytes Resident Command Package RCPS EQU 16 ; (RCP Size = 128 * RCPS = 2 kBytes) +;RCPS EQU 0 ; (RCP Size = 128 * RCPS = 2 kBytes) +RCP EQU FCP-RCPS*128 ; Start of Resident Command Processor ; IO Package definition. Set IOPS to 0 to eliminate IOP -IOP EQU 0EC00H ; Start of IO Package -IOPS DEFL 12 ; (IOP Size = 128 * IOPS = 1.5 kBytes) +;IOP EQU 0EC00H ; Start of IO Package +; F100 - F100 0 KBytes IO Package +IOPS DEFL 0 ; (IOP Size = 128 * IOPS = 0 kBytes) +;IOPS DEFL 12 ; (IOP Size = 128 * IOPS = 1.5 kBytes) +;IOPS DEFL 10 ; (IOP Size = 128 * IOPS = 1.25 kBytes) +;OPS DEFL 3 ; (IOP Size = 128 * IOPS = 1.25 kBytes) +IOP EQU RCP-IOPS*128 ; Start of IO Package ;========================================================================= ; Resident User Space Definition. Set USPCS to 0 to eliminate USPC. ; The USPC Value marks the Lower Limit of Reserved Common High Memory and ; MUST BE PRESENT! -USPC EQU 0E900H ; Start of Resident User Space (MANDATORY) +;USPCS EQU 0 ; (USPC Size = 128 * USPCS = 0 kBytes) USPCS EQU 6 ; (USPC Size = 128 * USPCS = 0.75 kBytes) +; EE00 - F0FF 0.75 KBytes Resident User Space +USPC EQU IOP-USPCS*128 ; Start of Resident User Space (MANDATORY) ;--- End of Z3BASE.LIB --- + \ No newline at end of file diff --git a/Source/BPBIOS/z3baset.lib b/Source/BPBIOS/z3baset.lib index 8ee0fa35..b48156f6 100644 --- a/Source/BPBIOS/z3baset.lib +++ b/Source/BPBIOS/z3baset.lib @@ -1,8 +1,13 @@ -; B/P Bios System Z3 Definition File. +; z3base.fp -- B/P Bios System Z3 Definition File for not or partially +; banked system with 512 byte external HBIOS proxy (no +; internal proxy). ; This file is adapted from the basic Z3BASE.LIB configuration file used for ; most ZCPR33 systems. It has added the new definitions for the Resident -; User Space defined in B/P Bios descriptions. +; User Space defined in B/P Bios descriptions and modified for an HBIOS +; implementation with a full external HBIOS proxy (i.e. proxy not internal +; to BPBIOS). +; ;========================================================================= ;== NOTE: The Starting Address of the User Space marks the lower == ;== base of memory and MUST be entered. B/P Bios Utilities use == @@ -14,30 +19,30 @@ ; alternative, just leave this file alone and configure everything with ; the utilities provided. -; FE00 - FFFF 512 Bytes HBIOS Reserved -; FDFF 1 Byte Wheel byte -; FDF4 - FDFE 11 Bytes Path (5 elements) -; FDD0 - FDF3 36 Bytes ZCPR3 External FCB -; FD80 - FDCF 80 Bytes ZCPR3 Message Buffers -; FD00 - FD7F 128 Bytes ZCPR3 Shell Stack -; FC00 - FCFF 256 Bytes Named Directory Buffer -; FA00 - FBFF 512 Bytes Flow Command Package -; F200 - F9FF 2.0 KBytes Resident Command Package -; EC00 - F1FF 1.5 KBytes IO Package -; EBD0 - EBFF 48 Bytes ZCPR3 External Stack -; EB00 - EBAF 176 Bytes Multiple Command Line Buffer -; EA00 - EAFF 256 Bytes Environment Descriptor +; FE00 - FFFF 512 Bytes HBIOS proxy AREA in the top of ram +; FD00 - FDFF 256 Bytes Multiple Command Line Buffer +; FC00 - FCFF 256 Bytes Environment Descriptor ; Bytes 00H-7FH: Z3 Parameters ; Bytes 80H-FFH: Z3 TCAP -; E700 - E9FF .75 KBytes Resident User Space +; FBFF 1 Byte Wheel byte +; FBF4 - FBFE 11 Bytes Path (5 elements) +; FBD0 - FBF3 36 Bytes ZCPR3 External FCB +; FB80 - FBCF 80 Bytes ZCPR3 Message Buffers +; FB00 - FB7F 128 Bytes ZCPR3 Shell Stack (4x32) +; FAD0 - FAFF 48 Bytes ZCPR3 External Stack (must be 48 bytes) +; F900 - FACF 464 Bytes Named Directory Buffer (25 entries) +; F700 - F9FF 512 Bytes Flow Command Package +; EF00 - F6FF 2.0 KBytes Resident Command Package +; EF00 - EF00 0 KBytes IO Package - no IOP +; EC00 - EEFF 768 Bytes Resident User Space (room for clock driver) ; The remainder is for the Operating System. Exact sizes vary depending -; primarily on the Number and sizes of Hard Drive Partitions, but may be: +; primarily on the Number and sizes of Hard Drive Partitions, typically: -; D300 - E6FF 5.0 KBytes B/P BIOS (unbanked version) -; C500 - D2FF 3.5 KBytes ZSDOS 1.0 BDOS -; BD00 - C4FF 2 KBytes ZCPR 3.3 Command Processor -; 0100 - BCFF ~47 KBytes Transient Program Area +; E100 - EBFF 4.5 KBytes B/P BIOS (banked version) +; D300 - E0FF 3.5 KBytes ZSDOS 1.0 BDOS +; CB00 - D2FF 2 KBytes ZCPR 3.4 Command Processor +; 0100 - C5FF ~50 KBytes Transient Program Area ; 0000 - 00FF 256 Bytes Standard CP/M Buffers ;======================================================================== @@ -47,83 +52,98 @@ TRUE EQU NOT FALSE YES EQU TRUE NO EQU FALSE -BASE EQU 0 - -CCP EQU 0BD00H ; ZCPR3 COMMAND PROCESSOR - -; The External Stack is placed in the very top position in memory. It is -; mandatory for B/P Bios and ZCPR 3.3. - -EXTSTK EQU 0EBD0H ; ZCPR3 External Stack -EXTSTKS EQU YES - -; The Multiple Command Line Buffer is placed in the Top Page of Memory to -; place it above the Environment. It is mandatory for ZCPR 3.3. - -Z3CL EQU 0EB00H ; ZCPR3 Command Line Buffer -Z3CLS EQU 208-5 ; Size of Command Line Buffer-5 +; The Multiple Command Line Buffer is mandatory for ZCPR 3.3. 3.4 & 4.1. +; FD00 - FDCF 208 Bytes +;Z3CL EQU 0FB00H ; ZCPR3 Command Line Buffer +Z3CLS EQU 256-5 ; Size of Command Line Buffer-5 +Z3CL EQU MEMTOP+1-Z3CLS-5 ; ZCPR3 Command Line Buffer ; The ZCPR3 External Environment Descriptor is mandatory B/P Bios & ZCPR 3.3. ; The Environment Descriptor MUST begin on an even Page Boundary (xx00H). - -Z3ENV EQU 0EA00H ; Environment Descriptors +; FC00 - FCFF 256 Bytes Environment Descriptor Z3ENVS EQU 2 ; Size of Env Descriptor in 128-Byte Blks +Z3ENV EQU (Z3CL-Z3ENVS*128) and 0FF00H ; The ZCPR3 Wheel Byte is mandatory for ZCPR 3.3. -Z3WHL EQU 0FDFFH ; Wheel Byte Address +; FBFF 1 Byte Wheel byte Z3WHLS EQU YES +Z3WHL EQU Z3ENV-1 ; Wheel Byte Address ; The Path is mandatory for ZCPR 3.3. -EXPATH EQU 0FDF4H ; External Path starting Address +; FBF4 - FBFE 11 Bytes Path (5 elements) EXPATHS EQU 5 ; (Path Size = EXPATHS*2 + 1 = 11 bytes) ; This defines 5 2-byte Path Elements +EXPATH EQU Z3WHL-EXPATHS*2-1 ; External Path starting Address ; The ZCPR3 External FCB is mandatory for ZCPR 3.3. -EXTFCB EQU 0FDD0H ; 36-Byte ZCPR3 External FCB +; FBD0 - FBF3 36 Bytes ZCPR3 External FCB EXTFCBS EQU YES +EXFCBSZ EQU 36 +EXTFCB EQU EXPATH-EXFCBSZ ; 36-Byte ZCPR3 External FCB ; The ZCPR3 Message Buffers are mandatory for ZCPR 3.3. -Z3MSG EQU 0FD80H ; 80-Byte ZCPR3 Message Buffer +; FB80 - FBCF 80 Bytes ZCPR3 Message Buffers Z3MSGS EQU YES +Z3MSGSZ EQU 80 ; size of buffer +Z3MSG EQU EXTFCB-Z3MSGSZ ; 80-Byte ZCPR3 Message Buffer ; Shell Stack definition. Set SHSTKS to 0 to eliminate Shell Stack -SHSTK EQU 0FD00H ; Shell Stack Starting Address +; FB00 - FB7F 128 Bytes ZCPR3 Shell Stack SHSTKS EQU 4 ; Number of SHSIZE-Byte Shell Stack entries SHSIZE EQU 32 ; (Stack Size = SHSTKS * SHSIZE = 128 Bytes) +SHSTK EQU Z3MSG-SHSTKS*SHSIZE ; Shell Stack Starting Address + +; The External Stack is mandatory for B/P Bios and ZCPR 3.3, 3.4 & 4.1 +; FAD0 - FAFF 48 Bytes ; ZCPR3 External Stack (must be 48 bytes) +;EXTSTK EQU 0FAD0H ; ZCPR3 External Stack +EXTSTK EQU SHSTK-48 ; ZCPR3 External Stack +EXTSTKS EQU YES ; ZCPR3 Named Directory Buffer definition. Set Z3NDIRS to 0 to eliminate ; the named directory buffer. - -Z3NDIR EQU 0FC00H ; Start of Named Directory Buffer -Z3NDIRS EQU 14 ; Number of Named Directory Elements - ; (NDIR Size = Z3NDIRS * 18 + 1 = 253 Bytes) +; F900 - FACF 464 Bytes ; Named Directory Buffer - 25 NAMES +Z3NDIRS EQU 25 ; Number of Named Directory Elements +NDIRSZ EQU Z3NDIRS * 18 + 1 + ; (NDIR Size = Z3NDIRS * 18 + 1 = 451 Bytes) +Z3NDIR EQU SHSTK-(NDIRSZ/256+1)*256 ; Start of Named Directory Buffer ; Flow Command Package definition. Set FCPS to 0 to eliminate FCP -FCP EQU 0FA00H ; Start of Flow Command Package +; F700 - F8FF 512 Bytes Flow Command Package FCPS EQU 4 ; (FCP Size = 128 * FCPS = 512 Bytes) +;FCPS EQU 0 ; (FCP Size = 128 * FCPS = 0 Bytes) +FCP EQU Z3NDIR-FCPS*128 ; Start of Flow Command Package ; Resident Command Processor Definition. Set RCPS to 0 to eliminate RCP -RCP EQU 0F200H ; Start of Resident Command Processor +; EF00 - F6FF 2.0 KBytes Resident Command Package RCPS EQU 16 ; (RCP Size = 128 * RCPS = 2 kBytes) +;RCPS EQU 0 ; (RCP Size = 128 * RCPS = 0 kBytes) +RCP EQU FCP-RCPS*128 ; Start of Resident Command Processor -; IO Package definition. Set IOPS to 0 to eliminate IOP +; IO Package definition. Set IOPS to 0 which eliminates IOP -IOP EQU 0EC00H ; Start of IO Package -IOPS DEFL 12 ; (IOP Size = 128 * IOPS = 1.5 kBytes) +;IOP EQU 0EC00H ; Start of IO Package +; EF00 - EF00 0 KBytes IO Package +IOPS DEFL 0 ; (IOP Size = 128 * IOPS = 0 kBytes) +;IOPS DEFL 12 ; (IOP Size = 128 * IOPS = 1.5 kBytes) +;IOPS DEFL 10 ; (IOP Size = 128 * IOPS = 1.25 kBytes) +IOP EQU RCP-IOPS*128 ; Start of IO Package ;========================================================================= ; Resident User Space Definition. Set USPCS to 0 to eliminate USPC. ; The USPC Value marks the Lower Limit of Reserved Common High Memory and ; MUST BE PRESENT! -USPC EQU 0E700H ; Start of Resident User Space (MANDATORY) +;USPCS EQU 0 ; (USPC Size = 128 * USPCS = 0 kBytes) USPCS EQU 6 ; (USPC Size = 128 * USPCS = 0.75 kBytes) +; EC00 - EEFF 0.75 KBytes Resident User Space +USPC EQU IOP-USPCS*128 ; Start of Resident User Space (MANDATORY) ;--- End of Z3BASE.LIB --- + \ No newline at end of file diff --git a/Source/BPBIOS/z41.zex b/Source/BPBIOS/z41.zex deleted file mode 100644 index aa944b80..00000000 --- a/Source/BPBIOS/z41.zex +++ /dev/null @@ -1,4 +0,0 @@ -IOPINIT -JETLDR SYS.NDR,FCP.ZRL,MYTERM.Z3T -ZSCFG2 CB - \ No newline at end of file diff --git a/Source/BPBIOS/zs227g.zrl b/Source/BPBIOS/zs227g.zrl new file mode 100644 index 00000000..9d3b6559 Binary files /dev/null and b/Source/BPBIOS/zs227g.zrl differ diff --git a/Source/BPBIOS/zstf.zex b/Source/BPBIOS/zstf.zex new file mode 100644 index 00000000..f3e38584 --- /dev/null +++ b/Source/BPBIOS/zstf.zex @@ -0,0 +1,21 @@ +;; set the Zsystem and ZSDOS paths +C15:ZPATH $$$$ A0 B0 C15 C0 /D=$$$$ C15 C0 +;; enable clock and turn off last access stamping +zscfg2 cb +a- +;; load Zsystem segments +jetldr BPBIO.NDR,nzdec23d.z3t,fcp-4t.zrl +;;;; disable the wheel byte since BPBUILD doesn't +;;poke fc2a fb ;;correct wheel addr in Z3ENV +;;poke fbff ff ;;set the wheel +poke FC32 19 ;;change CRT length to 25 lines +;; initialize the RAM disk if needed and copy some useful file there +if ~EX A0:-ram.000 +putds -d=A: +fileattr a0:*.dat /nd +save 0 a0:-ram.000 +RCOPY RAMFILES.TXT A0: /Q +fi +;; load the command history shell and editor +LSH + + \ No newline at end of file diff --git a/Source/BPBIOS/zstn.zex b/Source/BPBIOS/zstn.zex new file mode 100644 index 00000000..451b60df --- /dev/null +++ b/Source/BPBIOS/zstn.zex @@ -0,0 +1,22 @@ +C15:ZPATH $$$$ A0 B0 C15 C0 /D=$$$$ C15 C0 +jetldr RCP-16H.ZRL,FCP-4T.ZRL,BPBIO.NDR,nzdec23d.z3t +ldtimee +;;disable the wheel byte since BPBUILD doesn't +;;;;correct wheel addr in Z3ENV +;;poke fc2a fb +;;;;set the wheel +;;poke fbff ff +;;change CRT length to 25 lines< +poke FC32 19 +;; change "D " to "DIR" so we can use D.COM +poke F10D 49 52 +;; initialize ram drive if needed +IF ~EX A0:-RAM.000 +putds -d=A: +fileattr a0:*.dat /nd +save 0 a:-ram.000 +RCOPY RAMFILES.TXT A0: /Q +FI +;; load command history shell and editor +LSH + \ No newline at end of file diff --git a/Source/BPBIOS/zstt.zex b/Source/BPBIOS/zstt.zex new file mode 100644 index 00000000..9bb9ab65 --- /dev/null +++ b/Source/BPBIOS/zstt.zex @@ -0,0 +1,22 @@ +C15:ZPATH $$$$ A0 B0 C15 C0 /D=$$$$ C15 C0 +jetldr RCP-16H.ZRL,FCP-4T.ZRL,BPBIO.NDR,nzdec23d.z3t +ldtimec +;;disable the wheel byte since BPBUILD doesn't +;;;;correct wheel addr in Z3ENV +;;poke fc2a fb +;;;;set the wheel +;;poke fbff ff +;;change CRT length to 25 lines< +poke FC32 19 +;; change "D " to "DIR" so we can use D.COM +poke EF0D 49 52 +;; initialize ram drive if needed +IF ~EX A0:-RAM.000 +putds -d=A: +fileattr a0:*.dat /nd +save 0 a:-ram.000 +RCOPY RAMFILES.TXT A0: /Q +FI +;; load command history shell and editor +LSH + \ No newline at end of file diff --git a/Source/Images/d_bp.txt b/Source/Images/d_bp.txt index d51015a6..e123b471 100644 --- a/Source/Images/d_bp.txt +++ b/Source/Images/d_bp.txt @@ -5,9 +5,10 @@ ../BPBIOS/*.rel 0: ../BPBIOS/*.zrl 0: ../BPBIOS/*.zex 0: -../BPBIOS/myterm.z3t 0: -../BPBIOS/Z34RCP11/z34rcp11.rel 0:rcp.zrl -../BPBIOS/NZFCP13/nzfcp13.rel 0:fcp.zrl +../BPBIOS/bpbuild.com 0: +#../BPBIOS/myterm.z3t 0: +#../BPBIOS/Z34RCP11/z34rcp11.rel 0:rcp.zrl +#../BPBIOS/NZFCP13/nzfcp13.rel 0:fcp.zrl # # Add RomWBW utilities # @@ -41,7 +42,7 @@ #../../Binary/Apps/ramtest.com 2: #../../Binary/Apps/tstdskng.com 2: ../../Binary/Apps/Test/*.com 2: -Test/*.* 2: +##Test/*.* 2: # # Add Tune sample files # @@ -50,7 +51,7 @@ Test/*.* 2: # # Add CPNET client files # -cpnet12/*.* 4: +##cpnet12/*.* 4: # # Add Common Applications # @@ -62,4 +63,3 @@ Common/Z/u15/*.* 15: Common/Z3/u10/*.* 10: Common/Z3/u14/*.* 14: Common/Z3/u15/*.* 15: - diff --git a/Source/Images/d_bp/u0/ALIEN.DAT b/Source/Images/d_bp/u0/ALIEN.DAT deleted file mode 100644 index 7ef59044..00000000 Binary files a/Source/Images/d_bp/u0/ALIEN.DAT and /dev/null differ diff --git a/Source/Images/d_bp/u0/ASM.COM b/Source/Images/d_bp/u0/ASM.COM deleted file mode 100644 index a63e5aec..00000000 Binary files a/Source/Images/d_bp/u0/ASM.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/BPBUILD.COM b/Source/Images/d_bp/u0/BPBUILD.COM deleted file mode 100644 index 9ffe859e..00000000 Binary files a/Source/Images/d_bp/u0/BPBUILD.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/CR.COM b/Source/Images/d_bp/u0/CR.COM deleted file mode 100644 index 8a824bcc..00000000 Binary files a/Source/Images/d_bp/u0/CR.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/DIRX.COM b/Source/Images/d_bp/u0/DIRX.COM deleted file mode 100644 index 413bceca..00000000 Binary files a/Source/Images/d_bp/u0/DIRX.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/DUMP.COM b/Source/Images/d_bp/u0/DUMP.COM deleted file mode 100644 index 03a77c3c..00000000 Binary files a/Source/Images/d_bp/u0/DUMP.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/ED.COM b/Source/Images/d_bp/u0/ED.COM deleted file mode 100644 index a0f0f541..00000000 Binary files a/Source/Images/d_bp/u0/ED.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/LBREXT.COM b/Source/Images/d_bp/u0/LBREXT.COM deleted file mode 100644 index c0c950e3..00000000 Binary files a/Source/Images/d_bp/u0/LBREXT.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/LIB.COM b/Source/Images/d_bp/u0/LIB.COM deleted file mode 100644 index 45d7fb21..00000000 Binary files a/Source/Images/d_bp/u0/LIB.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/LINK.COM b/Source/Images/d_bp/u0/LINK.COM deleted file mode 100644 index e188fb92..00000000 Binary files a/Source/Images/d_bp/u0/LINK.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/LOAD.COM b/Source/Images/d_bp/u0/LOAD.COM deleted file mode 100644 index b9601e00..00000000 Binary files a/Source/Images/d_bp/u0/LOAD.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/MAC.COM b/Source/Images/d_bp/u0/MAC.COM deleted file mode 100644 index f49e835a..00000000 Binary files a/Source/Images/d_bp/u0/MAC.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/PIP.COM b/Source/Images/d_bp/u0/PIP.COM deleted file mode 100644 index 4b2ce4b6..00000000 Binary files a/Source/Images/d_bp/u0/PIP.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/RMAC.COM b/Source/Images/d_bp/u0/RMAC.COM deleted file mode 100644 index 9ab7206b..00000000 Binary files a/Source/Images/d_bp/u0/RMAC.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/START01.COM b/Source/Images/d_bp/u0/START01.COM deleted file mode 100644 index 6f0d3af4..00000000 Binary files a/Source/Images/d_bp/u0/START01.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/STAT.COM b/Source/Images/d_bp/u0/STAT.COM deleted file mode 100644 index 1de359f2..00000000 Binary files a/Source/Images/d_bp/u0/STAT.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/SUBMIT.COM b/Source/Images/d_bp/u0/SUBMIT.COM deleted file mode 100644 index f651bfee..00000000 Binary files a/Source/Images/d_bp/u0/SUBMIT.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/SUPERSUB.COM b/Source/Images/d_bp/u0/SUPERSUB.COM deleted file mode 100644 index a25d60a6..00000000 Binary files a/Source/Images/d_bp/u0/SUPERSUB.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/SYS.FCP b/Source/Images/d_bp/u0/SYS.FCP deleted file mode 100644 index 26f1cf6d..00000000 Binary files a/Source/Images/d_bp/u0/SYS.FCP and /dev/null differ diff --git a/Source/Images/d_bp/u0/SYS.NDR b/Source/Images/d_bp/u0/SYS.NDR deleted file mode 100644 index b4c382aa..00000000 Binary files a/Source/Images/d_bp/u0/SYS.NDR and /dev/null differ diff --git a/Source/Images/d_bp/u0/SYS.RCP b/Source/Images/d_bp/u0/SYS.RCP deleted file mode 100644 index 45e38856..00000000 Binary files a/Source/Images/d_bp/u0/SYS.RCP and /dev/null differ diff --git a/Source/Images/d_bp/u0/TCSELECT.COM b/Source/Images/d_bp/u0/TCSELECT.COM deleted file mode 100644 index 723f89ae..00000000 Binary files a/Source/Images/d_bp/u0/TCSELECT.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/UNCR.COM b/Source/Images/d_bp/u0/UNCR.COM deleted file mode 100644 index 42385ddd..00000000 Binary files a/Source/Images/d_bp/u0/UNCR.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/UNZIP.COM b/Source/Images/d_bp/u0/UNZIP.COM deleted file mode 100644 index afde7204..00000000 Binary files a/Source/Images/d_bp/u0/UNZIP.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/UNZIPZ4.COM b/Source/Images/d_bp/u0/UNZIPZ4.COM deleted file mode 100644 index 9da369ff..00000000 Binary files a/Source/Images/d_bp/u0/UNZIPZ4.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/URL.COM b/Source/Images/d_bp/u0/URL.COM deleted file mode 100644 index 45446079..00000000 Binary files a/Source/Images/d_bp/u0/URL.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/VIDATT.Z80 b/Source/Images/d_bp/u0/VIDATT.Z80 deleted file mode 100644 index 073bb84f..00000000 --- a/Source/Images/d_bp/u0/VIDATT.Z80 +++ /dev/null @@ -1,69 +0,0 @@ - title WordStar 4.0 Video Attributes Driver - -strngout equ 0283h - -esc equ 1bh -dim equ 1 -blink equ 2 -invert equ 4 -uline equ 8 - - aseg - org 03c1h - -vidatt: - xor a - ld hl,funtbl - ld b,8 -getloop: - rr c - jr nc,getnext - or a,(hl) -getnext: - inc hl - djnz getloop -; - ld hl,string+2 ; attribute #1 on/off indicator - push hl - ld b,4 - ld de,'?!' ; ? = attribute off, ! = attribute on -setloop: - rra - jr nc,attroff - ld (hl),e ; attribute on - jr setnext -attroff: - ld (hl),d ; attribute off -setnext: - inc hl - inc hl - inc hl ; advance to next on/off indicator - djnz setloop -; - pop hl ; hl --> dim on/off - ld a,d ; attribute off - cp (hl) ; dim off? - jr nz,setdim - ld a,e ; attribute on -setdim: - ld (hl),a - ld hl,string - jp strngout ; ws string routine -; -; -funtbl: - defb dim ; strike out - defb invert or blink ; warnings & errors - defb invert ; block - defb uline ; underline - defb blink ; subscript - defb blink or uline ; superscript - defb invert ; menu, headline, bold, double - defb invert or uline ; italics, RET, backspace -; -string: - defb 12,esc,' 2',esc,' 3',esc,' 4',esc,' 5' -; -finis equ $ - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u0/VT100TCP.Z3T b/Source/Images/d_bp/u0/VT100TCP.Z3T deleted file mode 100644 index 13b150ee..00000000 Binary files a/Source/Images/d_bp/u0/VT100TCP.Z3T and /dev/null differ diff --git a/Source/Images/d_bp/u0/WW.Z3T b/Source/Images/d_bp/u0/WW.Z3T deleted file mode 100644 index 004cc957..00000000 Binary files a/Source/Images/d_bp/u0/WW.Z3T and /dev/null differ diff --git a/Source/Images/d_bp/u0/XSUB.COM b/Source/Images/d_bp/u0/XSUB.COM deleted file mode 100644 index 15e86abf..00000000 Binary files a/Source/Images/d_bp/u0/XSUB.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/Z3TCAP.TCP b/Source/Images/d_bp/u0/Z3TCAP.TCP deleted file mode 100644 index 0862d65d..00000000 Binary files a/Source/Images/d_bp/u0/Z3TCAP.TCP and /dev/null differ diff --git a/Source/Images/d_bp/u0/Z3TCAP.Z3T b/Source/Images/d_bp/u0/Z3TCAP.Z3T deleted file mode 100644 index b5befb8c..00000000 Binary files a/Source/Images/d_bp/u0/Z3TCAP.Z3T and /dev/null differ diff --git a/Source/Images/d_bp/u0/ZSID.COM b/Source/Images/d_bp/u0/ZSID.COM deleted file mode 100644 index 686b3775..00000000 Binary files a/Source/Images/d_bp/u0/ZSID.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/ZXD.COM b/Source/Images/d_bp/u0/ZXD.COM deleted file mode 100644 index 16469ed0..00000000 Binary files a/Source/Images/d_bp/u0/ZXD.COM and /dev/null differ diff --git a/Source/Images/d_bp/u0/bpbio.ndr b/Source/Images/d_bp/u0/bpbio.ndr new file mode 100644 index 00000000..49daf910 Binary files /dev/null and b/Source/Images/d_bp/u0/bpbio.ndr differ diff --git a/Source/Images/d_bp/u0/bpbioz33.ndr b/Source/Images/d_bp/u0/bpbioz33.ndr new file mode 100644 index 00000000..92093e14 Binary files /dev/null and b/Source/Images/d_bp/u0/bpbioz33.ndr differ diff --git a/Source/Images/d_bp/u0/cp.bin b/Source/Images/d_bp/u0/cp.bin deleted file mode 100644 index 463cc668..00000000 Binary files a/Source/Images/d_bp/u0/cp.bin and /dev/null differ diff --git a/Source/Images/d_bp/u0/ease.hlp b/Source/Images/d_bp/u0/ease.hlp new file mode 100644 index 00000000..f95ef113 Binary files /dev/null and b/Source/Images/d_bp/u0/ease.hlp differ diff --git a/Source/BPBIOS/NZFCP13/fcp-4.zrl b/Source/Images/d_bp/u0/fcp-4.zrl similarity index 100% rename from Source/BPBIOS/NZFCP13/fcp-4.zrl rename to Source/Images/d_bp/u0/fcp-4.zrl diff --git a/Source/BPBIOS/NZFCP13/fcp-4t.zrl b/Source/Images/d_bp/u0/fcp-4t.zrl similarity index 100% rename from Source/BPBIOS/NZFCP13/fcp-4t.zrl rename to Source/Images/d_bp/u0/fcp-4t.zrl diff --git a/Source/Images/d_bp/u0/LDSYS.COM b/Source/Images/d_bp/u0/ldsys.com similarity index 100% rename from Source/Images/d_bp/u0/LDSYS.COM rename to Source/Images/d_bp/u0/ldsys.com diff --git a/Source/Images/d_bp/u0/lshf.var b/Source/Images/d_bp/u0/lshf.var new file mode 100644 index 00000000..34736429 --- /dev/null +++ b/Source/Images/d_bp/u0/lshf.var @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Source/Images/d_bp/u0/nzcpr.zrl b/Source/Images/d_bp/u0/nzcpr.zrl deleted file mode 100644 index b8cc645f..00000000 Binary files a/Source/Images/d_bp/u0/nzcpr.zrl and /dev/null differ diff --git a/Source/Images/d_bp/u0/NZDEC23D.Z3T b/Source/Images/d_bp/u0/nzdec23d.z3t similarity index 100% rename from Source/Images/d_bp/u0/NZDEC23D.Z3T rename to Source/Images/d_bp/u0/nzdec23d.z3t diff --git a/Source/Images/d_bp/u0/ramfiles.txt b/Source/Images/d_bp/u0/ramfiles.txt new file mode 100644 index 00000000..9c476470 --- /dev/null +++ b/Source/Images/d_bp/u0/ramfiles.txt @@ -0,0 +1,9 @@ +BIN:COPY.COM +BIN:D.COM +BIN:ZXD.COM +BIN:IF.COM +BIN:QL.COM +bin:SD.COM +BIN:CL.COM +BIN:LU.COM + \ No newline at end of file diff --git a/Source/Images/d_bp/u0/rcp-16h.zrl b/Source/Images/d_bp/u0/rcp-16h.zrl new file mode 100644 index 00000000..e4c53abc Binary files /dev/null and b/Source/Images/d_bp/u0/rcp-16h.zrl differ diff --git a/Source/Images/d_bp/u0/start.com b/Source/Images/d_bp/u0/start.com deleted file mode 100644 index 81c0858f..00000000 Binary files a/Source/Images/d_bp/u0/start.com and /dev/null differ diff --git a/Source/Images/d_bp/u0/suportww.tag b/Source/Images/d_bp/u0/suportww.tag new file mode 100644 index 00000000..8b045548 --- /dev/null +++ b/Source/Images/d_bp/u0/suportww.tag @@ -0,0 +1,35 @@ +BPBIO NDR +BPBIOZ33NDR +BPCNFG COM +EASE COM +EASE HLP +FCP-4 ZRL +FCP-4T ZRL +FILEATTRCOM +HELPLSH COM +IF COM +JETLDR COM +LDTIME7 COM +LDTIME9 COM +LDTIMEC COM +LDTIMEE COM +LSH COM +LSHF COM +LSHF VAR +MYTERM Z3T +NZDEC23DZ3T +PUTDS COM +RAMFILESTXT +RCOPY COM +RCP-16H ZRL +SUPORTWWTAG +SUPPORT TXT +Z33N ZEX +Z33T ZEX +ZEX COM +ZPATH COM +ZSCFG2 COM +ZSTF ZEX +ZSTN ZEX +ZSTT ZEX + \ No newline at end of file diff --git a/Source/Images/d_bp/u0/support.txt b/Source/Images/d_bp/u0/support.txt new file mode 100644 index 00000000..90e7b336 --- /dev/null +++ b/Source/Images/d_bp/u0/support.txt @@ -0,0 +1,85 @@ +This library contains a number of support files, programs and scripts needed +to bring up a fully functioning BPBIOS Zsystem. These programs and files +are used and/or loaded by the startup scripts. + +Some of the support files are startup ZEX scripts, some are Z3+ segment files, +others are Date and Time stamp drivers, some are command line editors and +history shells while others are needed to initialize the RAMDRIVE. + +The following table shows which files are needed to support each of the ten +BPBIOS variants (BP33N, BP33T, BP33NBNK, BP33TBNK, BP34N, BP34T, BP34NBNK, +BP34TBNK, BP41NBNK & BBP41TBNK). + +Variant Name Z33N* Z33T* Z34N* Z34T* Z41NBNK Z41TBNK +====================================================================== +Z33N.ZEX X +Z33T.ZEX X +ZSTN.ZEX X +ZSTT.ZEX X +ZSTF.ZEX X X +ZPATH.COM X X X X X X +jetldr.com X X X X X X +rcp-16h.zrl X X X X +fcp-4.zrl X X +fcp-4t.zrl X X X X +bpbioz33.ndr X X +bpbio.ndr X X X X +myterm.z3t X X X X X X +LDTIME9.COM X +LDTIME7.COM X +LDTIMEE.COM X +LDTIMEC.COM X +PUTDS.COM X X X X X X +FILEATTR.COM X X X X X X +RCOPY.COM X X X X X X +RAMFILES.TXT X X X X X X +EASE.COM X X +LSH.COM X X X X + + +Instructions: + The support files were "crunched" and stored in the library file +SUPPORT.LBR. Place SUPPORT.LBR on the RAMDRIVE using for example +XModem. Use LBREXT with the /U option to extract and uncrunch the +files. First extract ZEX.COM while logged onto the A: drive with the +following command: + B0:LBREXT SUPPORT C0:ZEX.Z?X /U +Next place all the .COM files on C15: by typing: + B0:LBREXT SUPPORT C15:*.C?M +The remaining files should be placed in C0:. + B0:LBREXT SUPPORT C0:*.Z?X /U + B0:LBREXT SUPPORT C0:*.Z?L /U + B0:LBREXT SUPPORT C0:*.N?R /U + B0:LBREXT SUPPORT C0:*.Z?T /U + B0:LBREXT SUPPORT C0:*.T?T /U + +Note in all BPBIOS variants that A: is the RAMDRIVE, B: is +the ROMDRIVE and C: is the system drive. Hard drive slices occupy C: +through N: and floppy drives are O: & P:. A short desciption +of each of the support files follows: + +Z33N.ZEX - Automatically executed Startup script +Z33T.ZEX - Automatically executed Startup script +ZSTN.ZEX - Automatically executed Startup script +ZSTT.ZEX - Automatically executed Startup script +ZSTF.ZEX - Automatically executed Startup script +ZPATH.COM - Loads the Zsystem & ZSDOS search paths +jetldr.com - Loads Zsystem segments +rcp-16h.zrl - Zsystem Resident Command Processor +fcp-4.zrl - Z33 Flow Control Processor (handles IF, ELSE etc) +fcp-4t.zrl - Z34 & Z41 Flow Control Processor (handles IF, ELSE etc) +bpbioz33.ndr - Named Directory Table for Z33 +bpbio.ndr - Named Directory Table for Z34 & Z41 +myterm.z3t - Terminal Capabilities file (defines ESC sequences etc) +LDTIME9.COM - Date stamping & clock drivers for Z33N* variants +LDTIME7.COM - Date stamping & clock drivers for Z33T* variants +LDTIMEE.COM - Date stamping & clock drivers for Z34N* variants +LDTIMEC.COM - Date stamping & clock drivers for Z34T* variants +PUTDS.COM - Installs date stamping for RAM drive. +FILEATTR.COM - Enables date stamping on RAM drive. +RCOPY.COM - Copies files listed in RAMFILES.TXT to RAMDRIVE +RAMFILES.TXT - List of frequently used command (edit to suit) +EASE.COM - Command line editor & history shell for Z33* +LSH.COM - Command line editor & history shell for Z34 & Z41 + +Note that clock & datestamping drivers are builtin to Z41. \ No newline at end of file diff --git a/Source/Images/d_bp/u0/zex.com b/Source/Images/d_bp/u0/zex.com new file mode 100644 index 00000000..cd46405d Binary files /dev/null and b/Source/Images/d_bp/u0/zex.com differ diff --git a/Source/Images/d_bp/u10/Z40.HLP b/Source/Images/d_bp/u10/z40.hlp similarity index 100% rename from Source/Images/d_bp/u10/Z40.HLP rename to Source/Images/d_bp/u10/z40.hlp diff --git a/Source/Images/d_bp/u10/Z40A.HLP b/Source/Images/d_bp/u10/z40a.hlp similarity index 100% rename from Source/Images/d_bp/u10/Z40A.HLP rename to Source/Images/d_bp/u10/z40a.hlp diff --git a/Source/Images/d_bp/u10/Z40B.HLP b/Source/Images/d_bp/u10/z40b.hlp similarity index 100% rename from Source/Images/d_bp/u10/Z40B.HLP rename to Source/Images/d_bp/u10/z40b.hlp diff --git a/Source/Images/d_bp/u10/Z40C.HLP b/Source/Images/d_bp/u10/z40c.hlp similarity index 100% rename from Source/Images/d_bp/u10/Z40C.HLP rename to Source/Images/d_bp/u10/z40c.hlp diff --git a/Source/Images/d_bp/u10/Z40D.HLP b/Source/Images/d_bp/u10/z40d.hlp similarity index 100% rename from Source/Images/d_bp/u10/Z40D.HLP rename to Source/Images/d_bp/u10/z40d.hlp diff --git a/Source/Images/d_bp/u10/Z40E.HLP b/Source/Images/d_bp/u10/z40e.hlp similarity index 100% rename from Source/Images/d_bp/u10/Z40E.HLP rename to Source/Images/d_bp/u10/z40e.hlp diff --git a/Source/Images/d_bp/u10/Z40F.HLP b/Source/Images/d_bp/u10/z40f.hlp similarity index 100% rename from Source/Images/d_bp/u10/Z40F.HLP rename to Source/Images/d_bp/u10/z40f.hlp diff --git a/Source/Images/d_bp/u10/Z40G.HLP b/Source/Images/d_bp/u10/z40g.hlp similarity index 100% rename from Source/Images/d_bp/u10/Z40G.HLP rename to Source/Images/d_bp/u10/z40g.hlp diff --git a/Source/Images/d_bp/u14/ZXD.CFG b/Source/Images/d_bp/u14/ZXD.CFG deleted file mode 100644 index f202ae59..00000000 Binary files a/Source/Images/d_bp/u14/ZXD.CFG and /dev/null differ diff --git a/Source/Images/d_bp/u14/BPCNFG.CFG b/Source/Images/d_bp/u14/bpcnfg.cfg similarity index 100% rename from Source/Images/d_bp/u14/BPCNFG.CFG rename to Source/Images/d_bp/u14/bpcnfg.cfg diff --git a/Source/Images/d_bp/u14/BPFORMAT.CFG b/Source/Images/d_bp/u14/bpformat.cfg similarity index 100% rename from Source/Images/d_bp/u14/BPFORMAT.CFG rename to Source/Images/d_bp/u14/bpformat.cfg diff --git a/Source/Images/d_bp/u14/COPY.CFG b/Source/Images/d_bp/u14/copy.cfg similarity index 100% rename from Source/Images/d_bp/u14/COPY.CFG rename to Source/Images/d_bp/u14/copy.cfg diff --git a/Source/Images/d_bp/u14/EMULATE.CFG b/Source/Images/d_bp/u14/emulate.cfg similarity index 100% rename from Source/Images/d_bp/u14/EMULATE.CFG rename to Source/Images/d_bp/u14/emulate.cfg diff --git a/Source/Images/d_bp/u14/HDIAG.CFG b/Source/Images/d_bp/u14/hdiag.cfg similarity index 100% rename from Source/Images/d_bp/u14/HDIAG.CFG rename to Source/Images/d_bp/u14/hdiag.cfg diff --git a/Source/Images/d_bp/u14/INIRAMD.CFG b/Source/Images/d_bp/u14/iniramd.cfg similarity index 100% rename from Source/Images/d_bp/u14/INIRAMD.CFG rename to Source/Images/d_bp/u14/iniramd.cfg diff --git a/Source/Images/d_bp/u14/INITDIR.CFG b/Source/Images/d_bp/u14/initdir.cfg similarity index 100% rename from Source/Images/d_bp/u14/INITDIR.CFG rename to Source/Images/d_bp/u14/initdir.cfg diff --git a/Source/Images/d_bp/u14/LDSYS.CFG b/Source/Images/d_bp/u14/ldsys.cfg similarity index 100% rename from Source/Images/d_bp/u14/LDSYS.CFG rename to Source/Images/d_bp/u14/ldsys.cfg diff --git a/Source/Images/d_bp/u14/SETCLOK.CFG b/Source/Images/d_bp/u14/setclok.cfg similarity index 100% rename from Source/Images/d_bp/u14/SETCLOK.CFG rename to Source/Images/d_bp/u14/setclok.cfg diff --git a/Source/Images/d_bp/u14/TDD.CFG b/Source/Images/d_bp/u14/tdd.cfg similarity index 100% rename from Source/Images/d_bp/u14/TDD.CFG rename to Source/Images/d_bp/u14/tdd.cfg diff --git a/Source/Images/d_bp/u15/00-INDEX.TXT b/Source/Images/d_bp/u15/00-INDEX.TXT deleted file mode 100644 index bebff788..00000000 --- a/Source/Images/d_bp/u15/00-INDEX.TXT +++ /dev/null @@ -1,358 +0,0 @@ -ALIAS-1.LBR 74752 07-27-86 -ALIAS-2.LBR 21504 10-30-86 -ALIAS.COM 3840 02-09-85 -ALIAS.HLP 4480 07-13-94 -ALIAS.HQP 3328 06-14-85 -ALIAS.ZEX 1152 07-13-94 -ALIAS.ZQX 1024 06-14-85 -ALIAS0.MAC 8064 07-13-94 -ALIAS0.MQC 5504 06-14-85 -ALIAS1.MAC 9600 07-13-94 -ALIAS1.MQC 6400 06-14-85 -CD.COM 896 02-09-85 -CD.MAC 2816 07-13-94 -CD.MQC 2176 06-14-85 -CLEAND15.LBR 16896 02-26-87 -CLEANDIR.COM 1920 02-09-85 -CLEANDIR.MAC 15232 07-13-94 -CLEANDIR.MQC 10752 06-14-85 -CLNDR13B.LBR 21376 04-18-86 -CMD.COM 896 02-09-85 -CMD.MAC 4864 07-13-94 -CMD.MQC 3584 06-14-85 -CMDFILES.HLP 24576 07-13-94 -CMDFILES.HQP 16384 06-14-85 -CMDRUN.COM 256 02-09-85 -CMDRUN.MAC 896 07-13-94 -CMDRUN.MQC 896 06-14-85 -COMMENT.COM 640 02-09-85 -COMMENT.MAC 3584 07-13-94 -COMMENT.MQC 2688 06-14-85 -COMPARE.HLP 4224 07-13-94 -COMPARE.HQP 2944 06-14-85 -CPSEL.COM 1024 02-09-85 -CPSEL.MAC 6656 07-13-94 -CPSEL.MQC 4608 06-14-85 -CRC.COM 5248 02-09-85 -CRC.MAC 18048 07-13-94 -CRC.MQC 12032 06-14-85 -DBRCPREL.LBR 18688 03-22-87 -DEBUGRCP.AQM 19584 11-28-86 -DEBUGRCP.ASM 27904 07-13-94 -DEV.COM 1792 02-09-85 -DEV.MAC 9088 07-13-94 -DEV.MQC 6272 06-14-85 -DEV10.LBR 6528 02-27-87 -DEVICE.COM 2176 02-09-85 -DEVICE.MAC 10752 07-13-94 -DEVICE.MQC 7168 06-14-85 -DEVICE10.LBR 7552 02-27-87 -DIFF.COM 3200 02-09-85 -DIFF.MAC 14720 07-13-94 -DIFF.MQC 9856 06-14-85 -DIFF21.LBR 10624 02-27-87 -DIR.COM 2688 02-09-85 -DIR.MAC 33152 07-13-94 -DIR.MQC 22912 06-14-85 -DIR14.LBR 19840 02-27-87 -DIRS.HLP 21248 07-13-94 -DIRS.HQP 13312 06-14-85 -DPGFILE.LBR 23168 02-27-87 -DPROG.COM 2944 02-09-85 -DPROG.HLP 7552 07-13-94 -DPROG.HQP 5376 06-14-85 -DPROG.MAC 18944 07-13-94 -DPROG.MQC 12416 06-14-85 -DPROG12.LBR 13440 02-27-87 -DU3.COM 11520 03-03-85 -DU3.HLP 38400 07-13-94 -DU3.HQP 25472 06-14-85 -DU3.MAC 83584 07-13-94 -DU3.MQC 56960 06-14-85 -DU312.LBR 64896 09-01-86 -ECHO.COM 512 02-09-85 -ECHO.MAC 3584 07-13-94 -ECHO.MQC 2816 06-14-85 -ERASE.COM 2560 02-09-85 -ERASE.MAC 10112 07-13-94 -ERASE.MQC 6912 06-14-85 -ERROR1.COM 1536 02-09-85 -ERROR1.MAC 7296 07-13-94 -ERROR1.MQC 4992 06-14-85 -ERROR2.COM 2304 02-09-85 -ERROR2.MAC 8448 07-13-94 -ERROR2.MQC 5632 06-14-85 -ERROR3.COM 640 02-09-85 -ERROR3.MAC 3456 07-13-94 -ERROR3.MQC 2560 06-14-85 -ERROR4.COM 640 02-09-85 -ERROR4.MAC 3968 07-13-94 -ERROR4.MQC 2816 06-14-85 -ERRORX.COM 384 02-09-85 -ERRORX.MAC 1152 07-13-94 -ERRORX.MQC 1024 06-14-85 -FINDF.COM 1792 02-09-85 -FINDF.MAC 21888 07-13-94 -FINDF.MQC 14336 06-14-85 -FINDF26.LBR 22400 09-29-86 -FINDF26A.LBR 18176 11-28-86 -GOTO.COM 768 02-09-85 -GOTO.MAC 3456 07-13-94 -GOTO.MQC 2560 06-14-85 -GRDEMO.LBR 52352 02-24-86 -HELP.COM 3072 02-09-85 -HELP.HLP 896 07-13-94 -HELP.HQP 896 06-14-85 -HELP.MAC 24960 07-13-94 -HELP.MQC 15872 06-14-85 -HELPCK.COM 2048 02-09-85 -HELPCK.MAC 9856 07-13-94 -HELPCK.MQC 6784 06-14-85 -HELPPR.COM 4480 02-09-85 -HELPPR.MAC 28032 07-13-94 -HELPPR.MQC 19328 06-14-85 -HELPSYS.HLP 29440 07-13-94 -HELPSYS.HQP 19072 06-14-85 -IF.COM 2304 03-03-85 -IF.HLP 12672 07-13-94 -IF.HQP 7680 06-14-85 -IF.MAC 10496 07-13-94 -IF.MQC 7168 06-14-85 -IFSTAT.COM 384 02-09-85 -IFSTAT.MAC 1408 07-13-94 -IFSTAT.MQC 1280 06-14-85 -IO.HLP 11776 07-13-94 -IO.HQP 8064 06-14-85 -LDR-UPD.COM 2560 02-09-85 -LDR-UPD.MSG 516 08-09-84 -LDR.COM 2688 02-09-85 -LDR.MAC 13184 07-13-94 -LDR.MQC 8960 06-14-85 -LDR15.LBR 13824 06-14-86 -LGET11.LBR 9088 11-21-86 -LLF11.LBR 9728 11-30-86 -LUZ3.LBR 20608 12-31-85 -LX12.LBR 14976 09-24-86 -LX14.LBR 12416 04-26-87 -MCOPY.COM 4224 02-09-85 -MCOPY.MAC 22016 07-13-94 -MCOPY.MQC 14464 06-14-85 -MCOPY44.LBR 24064 09-24-86 -MCOPY45B.LBR 26112 11-06-86 -MENU.COM 3456 02-09-85 -MENU.HLP 32384 07-13-94 -MENU.HQP 20608 06-14-85 -MENU.MAC 30848 07-13-94 -MENU.MQC 20480 06-14-85 -MENUCK.COM 2560 02-09-85 -MENUCK.MAC 11136 07-13-94 -MENUCK.MQC 7680 06-14-85 -MKDIR.COM 5376 11-24-84 -MKDIR.MAC 19328 07-13-94 -MKDIR.MQC 12544 06-14-85 -MU3.COM 2944 02-09-85 -MU3.HLP 6400 07-13-94 -MU3.HQP 4608 06-14-85 -MU3.MAC 15360 07-13-94 -MU3.MQC 10624 06-14-85 -NDIRS.HLP 15616 07-13-94 -NDIRS.HQP 10112 06-14-85 -NEWTCAP.Z80 6912 07-13-94 -NEWTCAP.ZZ0 3712 02-08-87 -NOTE.COM 128 02-09-85 -NOTE.MAC 896 07-13-94 -NOTE.MQC 768 06-14-85 -PAGE.COM 4608 02-09-85 -PAGE.MAC 23936 07-13-94 -PAGE.MQC 16640 06-14-85 -PATH.COM 1280 02-09-85 -PATH.MAC 8832 07-13-94 -PATH.MQC 5888 06-14-85 -PATH31.LBR 7936 06-04-85 -PPAL.DOC 12553 09-07-86 -PRINT.COM 5376 02-09-85 -PRINT.MAC 28032 07-13-94 -PRINT.MQC 19456 06-14-85 -PRINTHLP.LBR 17280 10-30-86 -PROTECT.COM 3584 02-09-85 -PROTECT.MAC 12416 07-13-94 -PROTECT.MQC 8448 06-14-85 -PWD.COM 1024 02-09-85 -PWD.MAC 4736 07-13-94 -PWD.MQC 3456 06-14-85 -QUIET.COM 512 02-09-85 -QUIET.MAC 2176 07-13-94 -QUIET.MQC 1792 06-14-85 -READ.ME 18437 07-14-94 -READ.MQ 10624 06-14-85 -RECORD.COM 1024 02-09-85 -RECORD.MAC 3840 07-13-94 -RECORD.MQC 2944 06-14-85 -REG.COM 1024 02-09-85 -REG.MAC 4736 07-13-94 -REG.MQC 3328 06-14-85 -RENAME.COM 3456 02-09-85 -RENAME.MAC 13184 07-13-94 -RENAME.MQC 8960 06-14-85 -RENAME31.LBR 15616 04-26-87 -SAK.COM 896 02-09-85 -SAK.MAC 4864 07-13-94 -SAK.MQC 3456 06-14-85 -SETFILE.COM 512 02-09-85 -SETFILE.MAC 2048 07-13-94 -SETFILE.MQC 1664 06-14-85 -SF.COM 9216 03-07-86 -SF.Z80 1274 02-07-86 -SH.COM 3584 02-09-85 -SH.HLP 12928 07-13-94 -SH.HQP 8448 06-14-85 -SH.MAC 16000 07-13-94 -SH.MQC 10496 06-14-85 -SH11.LBR 22272 03-16-87 -SHCTRL.COM 896 02-09-85 -SHCTRL.MAC 2688 07-13-94 -SHCTRL.MQC 2048 06-14-85 -SHDEFINE.COM 2944 02-09-85 -SHDEFINE.MAC 11136 07-13-94 -SHDEFINE.MQC 7552 06-14-85 -SHFILE.COM 512 02-09-85 -SHFILE.MAC 1920 07-13-94 -SHFILE.MQC 1536 06-14-85 -SHOW.COM 7936 02-09-85 -SHOW.MAC 31616 07-13-94 -SHOW.MQC 20480 06-14-85 -SHSET.COM 896 02-09-85 -SHSET.MAC 3712 07-13-94 -SHSET.MQC 2816 06-14-85 -SHUTILS2.LBR 21504 01-27-87 -SHVAR.COM 2944 02-09-85 -SHVAR.MAC 11264 07-13-94 -SHVAR.MQC 7552 06-14-85 -SHVAR11.LBR 13312 03-16-87 -SUB.COM 2560 02-09-85 -SUB.MAC 23424 07-13-94 -SUB.MQC 15360 06-14-85 -SYSENV.AQM 640 06-14-85 -SYSENV.ASM 640 07-13-94 -SYSENV.LIB 3328 07-13-94 -SYSENV.LQB 2560 06-14-85 -SYSFCP.AQM 12032 06-14-85 -SYSFCP.ASM 17536 07-13-94 -SYSFCP1.LIB 5504 07-13-94 -SYSFCP1.LQB 3840 06-14-85 -SYSFCP11.LBR 16256 06-04-85 -SYSFCP2.LIB 5504 07-13-94 -SYSFCP2.LQB 3840 06-14-85 -SYSIOP.AQM 19328 06-14-85 -SYSIOP.ASM 32512 07-13-94 -SYSNDR.AQM 512 06-14-85 -SYSNDR.ASM 384 07-13-94 -SYSNDR.LIB 1280 07-13-94 -SYSNDR.LQB 1152 06-14-85 -SYSRCP.AQM 30080 06-14-85 -SYSRCP.ASM 45056 07-13-94 -SYSRCP.HLP 6144 07-13-94 -SYSRCP.HQP 4608 06-14-85 -SYSRCP1.LIB 10368 07-13-94 -SYSRCP1.LQB 7168 06-14-85 -SYSRCP11.LBR 33408 06-04-85 -SYSRCP2.LIB 10368 07-13-94 -SYSRCP2.LQB 7168 06-14-85 -SYSRCP3.LIB 10368 07-13-94 -SYSRCP3.LQB 7168 06-14-85 -SYSRCP4.LIB 10368 07-13-94 -SYSRCP4.LQB 7168 06-14-85 -T3M-HI2.Z80 9600 07-13-94 -T3M-HI2.ZZ0 5120 04-26-87 -T3T-24-1.Z80 11234 07-31-86 -T3T-24-1.ZQ0 8448 05-31-86 -TCCHECK.COM 1792 02-09-85 -TCCHECK.MAC 5120 07-13-94 -TCCHECK.MQC 3584 06-14-85 -TCMAKE.COM 6016 02-09-85 -TCMAKE.MAC 18944 07-13-94 -TCMAKE.MQC 12416 06-14-85 -TCSELECT.COM 2816 03-03-85 -TCSELECT.MAC 11776 07-13-94 -TCSELECT.MQC 7936 06-14-85 -UNERASE.COM 1664 02-09-85 -UNERASE.MAC 14080 07-13-94 -UNERASE.MQC 9472 06-14-85 -VF-BOX11.LBR 33536 01-27-87 -VF41.IQF 11008 09-01-86 -VF41H.LBR 27776 09-01-86 -VF42A.LBR 31744 11-30-86 -VFILER.COM 11776 03-03-85 -VFILER.HLP 21120 07-13-94 -VFILER.HQP 13696 06-14-85 -VFILER.MAC 98688 07-13-94 -VFILER.MQC 69120 06-14-85 -VFILR4-1.LBR 26240 07-28-86 -VFILR4-2.LBR 160512 12-08-86 -VMENU.COM 5888 02-09-85 -VMENU.HLP 32384 07-13-94 -VMENU.HQP 20480 06-14-85 -VMENU.MAC 53632 07-13-94 -VMENU.MQC 36608 06-14-85 -VMENU24.LBR 77184 11-06-86 -VMENUCK.COM 2688 02-09-85 -VMENUCK.MAC 11264 07-13-94 -VMENUCK.MQC 7680 06-14-85 -VMENUFUN.LBR 9728 02-14-87 -WHEEL.COM 1408 02-09-85 -WHEEL.MAC 4096 07-13-94 -WHEEL.MQC 3072 06-14-85 -WYSE.DPG 2131 07-31-86 -XD.COM 3584 02-09-85 -XD.MAC 18432 07-13-94 -XD.MQC 12032 06-14-85 -XDIR.COM 7936 02-09-85 -XDIR.MAC 38912 07-13-94 -XDIR.MQC 24960 06-14-85 -Z3BASE1.LIB 8448 07-13-94 -Z3BASE1.LQB 6016 06-14-85 -Z3BASE2.LIB 8192 07-13-94 -Z3BASE2.LQB 5888 06-14-85 -Z3FILES.PH1 22171 11-04-84 -Z3FILES.PH2 18560 07-13-94 -Z3FILES.PQ2 9984 06-14-85 -Z3FILES2.PH2 18560 07-13-94 -Z3FILES2.PQ2 9984 06-14-85 -Z3HDR1.LIB 19200 07-13-94 -Z3HDR1.LQB 13056 06-14-85 -Z3HDR2.LIB 19200 07-13-94 -Z3HDR2.LQB 13056 06-14-85 -Z3LDRBUG.LBR 5632 02-09-85 -Z3LOC.COM 896 02-09-85 -Z3LOC.MAC 3840 07-13-94 -Z3LOC.MQC 2816 06-14-85 -Z3LOC11.LBR 4096 02-27-87 -Z3RES.HLP 8192 07-13-94 -Z3RES.HQP 5760 06-14-85 -Z3TCAP.AQM 19200 06-14-85 -Z3TCAP.ASM 28288 07-13-94 -Z3TCAP.HLP 40192 07-13-94 -Z3TCAP.HQP 23424 06-14-85 -Z3TCAP.TCP 7680 07-13-94 -Z3TCAP.TQP 2688 06-14-85 -Z3TCAP22.LBR 12672 02-14-87 -Z3UTIL1.HLP 29952 07-13-94 -Z3UTIL1.HQP 19968 06-14-85 -Z3UTIL2.HLP 21248 07-13-94 -Z3UTIL2.HQP 14080 06-14-85 -Z3UTIL3.HLP 6656 07-13-94 -Z3UTIL3.HQP 4992 06-14-85 -ZCPR3.AQM 44544 06-14-85 -ZCPR3.ASM 66816 07-13-94 -ZCPR3.HLP 3840 07-13-94 -ZCPR3.HQP 2944 06-14-85 -ZCPR3.INS 3968 07-13-94 -ZCPR3.IQS 2816 06-14-85 -ZCPR3DIR.BQG 2944 02-09-85 -ZCPR3DIR.BUG 3840 07-13-94 -ZEX.AQM 30976 06-14-85 -ZEX.ASM 47104 07-13-94 -ZEX.COM 4992 02-09-85 -ZEX.ZEX 4096 07-13-94 -ZEX.ZQX 3072 06-14-85 -ZSYSTEM.INS 2061 07-31-86 diff --git a/Source/Images/d_bp/u15/ALIAS-1.LBR b/Source/Images/d_bp/u15/ALIAS-1.LBR deleted file mode 100644 index 8bb3bc1c..00000000 Binary files a/Source/Images/d_bp/u15/ALIAS-1.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/ALIAS-2.LBR b/Source/Images/d_bp/u15/ALIAS-2.LBR deleted file mode 100644 index 0bf294fc..00000000 Binary files a/Source/Images/d_bp/u15/ALIAS-2.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/ALIAS.COM b/Source/Images/d_bp/u15/ALIAS.COM deleted file mode 100644 index f03006d0..00000000 Binary files a/Source/Images/d_bp/u15/ALIAS.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ALIAS.HLP b/Source/Images/d_bp/u15/ALIAS.HLP deleted file mode 100644 index b41d8e90..00000000 --- a/Source/Images/d_bp/u15/ALIAS.HLP +++ /dev/null @@ -1,167 +0,0 @@ -; - - The ZCPR3 ALIAS Facility - - A - The ALIAS Command - - E - ALIAS Examples - - S - Summary of ALIAS Variables - -:A - -Command: ALIAS 1.1 - -Syntax: - - ALIAS <-- Define New Command -or - ALIAS dir:ufn <-- Redefine Old Command - -Function: - - Thå  ALIAÓ facilitù ió thå scripô expansioî utilitù  oæ -ZCPR3®  Aî Aliaó ió á COÍ filå createä bù thå ALIAÓ prograí -whicè   containó   onå  oò  morå  commandó   (separateä   bù -semicolons© tï bå placeä iî thå Commanä Linå  Buffer®  Wheî -thå  Aliaó ió invoked¬  parameteró froí thå commanä linå arå -implanteä  intï thå scripô containeä withiî thå  Alias¬  anä -thå  resultinç ne÷ commanä linå ió placeä intï  thå  Commanä -Linå Buffeò anä executed. - - -Options: - None - -Comments: - - ZCPR³ MUSÔ bå implementeä witè aî Externaì Commanä Linå -Buffer in order for ALIAS to work. - - Thå  scripô  oæ  thå  internaì  commanä  linå  supportó -parameteò  passinç iî á manneò similaò tï ZEØ anä SUB®  Thå -variableó  $n¬  wherå ° <½ î <½ 9¬  maù bå placeä  intï  thå -script¬ anä thå correspondinç parameteró wilì bå substituteä -foò thå indicateä variables® Thå variablå $° ió thå namå oæ -thå Aliaó itself® Thå variablå $ª ió thå entirå taiì oæ thå -command line. - - - Twï  additionaì variables¬  $Ä anä $U¬  arå  available® -$Ä  expandó intï thå letteò oæ thå disë whicè waó loggeä  iî -aô  thå timå thå Aliaó waó expandeä (thå homå disk)¬  anä $Õ -expandó intï á numbeò (iî ASCIÉ chars© representinç thå useò -areá whicè waó loggeä iî aô thå timå thå Aliaó waó  expandeä -(the home user). - - Thå  ZCPR³ Systeí filå nameó arå availablå tï thå Aliaó -aó thå variableó $Fî anä $Nn¬ wherå ± <½ î <½ 4® $F± referó -tï FILENAME.TYÐ oæ Systeí Filå 1¬  $N± referó tï FILENAMÅ oæ -Systeí Filå 2¬  etc®  Notå thaô thå SETFILÅ commanä ió useä -to define the contents of the System file names. - - '$$' expands into a single '$'. - - - Summary of Alias Variables - - $0 - Name of Alias - $n - Parameter from Command Line (1 <= n <= 9) - - $* - Tail of Command Line (everything after the verb) - - $D - Home Disk - $U - Home User - - $Fn - FILENAME.TYP of System File n (1 <= n <= 4) - $Nn - FILENAME of System File n - - $$ - The character '$' - - -Selected Error Messages: - - "Ovfl¢ meanó thaô thå expandeä commanä  line¬  combineä -witè  thå  remaindeò  oæ thå contentó oæ  thå  commanä  linå -buffer, is too long to fit in the command line buffer. - -Examples of Use: - - ALIAS - -- define Alias - - ALIAS alias - -- display script of "alias.COM" and edit - -:S - - Summary of Alias Variables - - $0 - Name of Alias - $n - Parameter from Command Line (1 <= n <= 9) - - $* - Tail of Command Line (everything after the verb) - - $D - Home Disk - $U - Home User - - $Fn - FILENAME.TYP of System File n (1 <= n <= 4) - $Nn - FILENAME of System File n - - $$ - The character '$' - -:E - - Examples of Aliases - -Case 1: - - Thå  useò ió constantlù issuinç thå followinç  commandó -in the order indicated: - - ASM myfile.BBZ - LOAD myfile - - He can generalize it with the following Alias script: - - ASM $1.BBZ;LOAD $1 - - If this Alias is named MYASM.COM, then typing - -"MYASM test" will be equivalent to "ASM test.BBZ;LOAD test" - - -Case 2: - - Thå  useò haó twï printeró oî hió system®  Hå ió usinç -redirectablå I/Ï aó implementeä undeò ZCPR3¬  anä hå haó twï -versionó oæ Worä Staò (trademark¬  Micropro© - onå foò  eacè -printer®  Hå  caî creatå aî Aliaó containinç thå  followinç -script: - - Script Meaning - - IÆ NEC=$² Checë tï seå iæ 2nä parí ió NEC - DEV L NEC If so, assign LST to NEC - WSN $1 and run NEC version of WS - ELSE If not ... - DEV L TTY assign LST to TTY - WST $1 and run TTY version of WS - FI - - If the Alias was named WSTAR, then: - - "WSTAR myfile.txt" - -would be equivalent to - - DEV L TTY;WST myfile.txt - -and - - "WSTAR myfile.txt NEC" - -would be equivalent to - - DEV L NEC;WSN myfile.txt - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ALIAS.ZEX b/Source/Images/d_bp/u15/ALIAS.ZEX deleted file mode 100644 index c94e8866..00000000 --- a/Source/Images/d_bp/u15/ALIAS.ZEX +++ /dev/null @@ -1,64 +0,0 @@ -; -; Command File to Assemble the ALIAS Program by Richard Conn -; - -; -; 1. Check for Needed Files -; These files are listed below in the IF EXIST tests -; The availability of PIP.COM, M80.COM, and L80.COM is assumed -; -if exist alias0.mac -if exist alias1.mac -if exist a:z3lib.rel -if exist a:syslib.rel -if exist z3base.lib -if exist sysenv.lib - -; -; 2. Perform Assemblies of ALIAS0.MAC and ALIAS1.MAC -; -m80 =alias0 -m80 =alias1 - -; -; 3. Allow User to Abort if Errors Occurred -; -if input - -; -; 4. Cleanup Files -; -era alias0.bak -era alias1.bak -era alias.com - -; -; 5. Link -; -l80 /p:100,alias0,a:z3lib/s,a:syslib/s,alias0/n,/u,/e -l80 /p:100,alias1,a:z3lib/s,a:syslib/s,alias1/n,/u,/e - -; -; 6. Combine ALIAS0.COM and ALIAS1.COM to Form ALIAS.COM -; -pip alias.com=alias0.com,alias1.com - -; -; 7. Clean Up Some Files -; -era alias0.com -era alias1.com - -; -; 8. Exit IF INPUT (1 Level) and Remove REL Files -; -fi -era alias0.rel -era alias1.rel - -; -; 9. Exit IFs (6 Levels) -; -fi;fi;fi;fi;fi;fi - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ALIAS0.MAC b/Source/Images/d_bp/u15/ALIAS0.MAC deleted file mode 100644 index fd0e76fe..00000000 --- a/Source/Images/d_bp/u15/ALIAS0.MAC +++ /dev/null @@ -1,432 +0,0 @@ -; -; Program: ALIAS0 -; Author: Richard Conn -; Version: 1.1 -; Date: 10 Jun 84 -; Previous Versions: 1.0 (5 Mar 84) -; -version equ 11 - -; -; The purpose of ALIAS0 is to create aliases using the ALIAS1 -; program. -; - -; -; Environment Definition -; - MACLIB Z3BASE.LIB - -; -; Basic Equates -; -buffer equ 4000h ;1K (approx) buffer -tbuff equ 80h -fcb equ 5ch -cr equ 0dh -lf equ 0ah - -; -; External References -; - ext $memry - ext z3init,qprint,getwhl - ext print,sksp,bbline,capine,crlf,pfn1,retud,logud,padc - ext hmovb,sfa,cout,ccout,pstr,zfname - ext f$open,f$read,f$close,f$make,f$delete,f$write,f$exist,initfcb - -; -; Key Equates for Address Definition of Environment -; -envdefn equ 103H ;Beginning of Environment Definition -envclas equ 108H ;Address of Environment Descriptor Class - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env -; -; Print Banner -; - call qprint - db 'ALIAS, Version ' - db (version/10)+'0','.',(version mod 10)+'0',0 -; -; Check for File -; - xra a - sta flflag ;clear file loaded flag - lxi h,fcb+1 ;pt to file name - mov a,m ;get first char - cpi ' ' ;no name if space - jz create ;create an alias if no name - cpi '/' ;help? - jnz start0 -; -; Help Message -; - call print - db cr,lf,'ALIAS -- Create Alias Commands' - db cr,lf,'Syntax:' - db cr,lf,' ALIAS <-- Define New Command' - db cr,lf,'or' - db cr,lf,' ALIAS dir:cmndname <-- Redefine Old Command' - db 0 - ret - -; -; Load ALIAS File -; -start0: - call setcom ;set file type of file in FCB to COM if not already - call retud ;get current DU in BC - dcx h ;pt to disk - mov a,m ;get disk - ora a ;no current disk? - jz start1 ;use current disk - dcr a ;set disk (A=0) - mov b,a -start1: - mvi m,0 ;set current disk - lxi d,13 ;pt to user number - push h ;save ptr to FCB - dad d ;pt to user - mov c,m ;get user - pop d ;pt to FCB - call logud ;log into dir in BC - lxi h,buffer ;pt to file storage buffer - call f$open ;open alias file for input - jz load ;load file - call print - db cr,lf,' Alias File ',0 - inx d ;pt to file name - call pfn1 ;print it - call print - db ' Not Found',0 - ret -; -; Load Alias File -; -load: - lxi h,buffer ;pt to load buffer - mvi c,9 ;set block count -load1: - lxi d,fcb ;pt to FCB - call f$read ;read next block - jnz load2 - lxi d,tbuff ;pt to buffer - xchg - mvi b,128 ;128 bytes - call hmovb - xchg ;DE pts to next block - dcr c ;count down - jnz load1 -; -; Error - Not an Alias File -; -noalias: - call print - db cr,lf,' File ',0 - lxi d,fcb+1 - call pfn1 - call print - db ' is Not an Alias',0 - ret -; -; Load Complete - Check for Alias File Structure -; -load2: - call f$close ;close input file - lhld buffer+1 ;get address of START - lxi d,buffer-100H - dad d ;pt to actual address - lxi d,9 ;skip to ALIAS ID - dad d - lxi d,aliasid ;compare - mvi b,8 ;8 chars -acheck: - ldax d ;get char - cmp m ;compare - jnz noalias - inx h ;pt to next - inx d - dcr b ;count down - jnz acheck - shld oldaline ;save ptr to old alias command line - mvi a,0ffh ;set file loaded flag - sta flflag -; -; Create New Alias -; -create: - lda flflag ;check for file loaded - ora a ;0 if not - jz cr1 -; -; Display Data on Old Alias -; - call print - db cr,lf,' Alias Name: ',0 - lxi h,fcb+1 ;pt to name - mvi b,8 ;8 chars -cr0: - mov a,m ;print name - call cout - inx h ;pt to next char - dcr b ;count down - jnz cr0 - call print - db cr,lf,' Old Alias Command Line:',0 - lhld oldaline - mvi b,1 ;set line count -cr0a: - mov a,m ;check for done - ora a - jz cr1 - call crlf ;new line - mov a,b ;print line number - call padc - inr b ;increment count - call print ;print prompt - db ' --> ',0 -cr0b: - mov a,m ;get char - ora a - jz cr1 - call ccout ;print char with control char processing - inx h ;pt to next - cpi ';' ;next logical line? - jz cr0a - jmp cr0b - -; -; Input Alias Command from User -; -cr1: - call getwhl ;get wheel byte - jnz cr1a - call print - db cr,lf,' Modification of Alias Not Permitted',0 - ret -; -; Input Alias from User -; -cr1a: - call print - db cr,lf - db cr,lf,' Input Alias (RETURN to Abort)',cr,lf,' --> ',0 - mvi a,0ffh ;input line from user - call bbline - call sksp ;skip to non-blank - mov a,m ;get char - ora a ;any input? - rz - push h ;save ptr -; -; Set Buffers in New Alias to Reflect the ALIAS0 Buffers -; - call codend ;pt to new alias - inx h ;pt to start of buffers - inx h - inx h - lxi d,envdefn ;pt to environment definition - mvi b,8 ;prepare to copy 8 bytes for class 1 - ; bytes are: DB 'Z3ENV',1 - ; DW envaddr - lda envclas ;get code for class of alias - cpi 1 ;class 1 is address of Env Desc only - jz cr1b - mvi b,100H-3 ;prepare to copy an entire env desc -; -; Copy the Buffers Over -; -cr1b: - ldax d ;copy environment definition into new alias - mov m,a - inx h ;advance - inx d - dcr b ;count down - jnz cr1b -; -; Prep to Copy New Command Into Alias -; - call codend ;pt to new alias command buffer - inx h - mov e,m ;get address of START - inx h - mov d,m - lxi h,17 ;pt to buffer at START+17 - dad d - lxi d,-100H ;compute offset - dad d ;HL contains offset - xchg - call codend - dad d ;HL pts to absolute address - mvi b,255 ;check for overflow (max number of chars) - pop d ;pt to new command -; -; Copy New Command into ALIAS File -; -cr2: - ldax d ;get char - mov m,a ;put char - ora a ;done? - jz cr3 - inx h ;pt to next - inx d - dcr b ;count down - jnz cr2 - call print - db cr,lf,' Command Too Long for Buffer - Reenter',0 - jmp create -; -; ALIAS Command Line Copied -; -cr3: - lda flflag ;file loaded? - ora a ;0=no - jnz write - call print - db cr,lf,' Name of ALIAS Command (RETURN to Abort)? ',0 - mvi a,0ffh ;capitalize - call bbline - call sksp ;skip to non-blank - mov a,m - ora a - jz create - lxi d,fcb ;pt to FCB - call zfname ;convert and place in FCB - call setcom ;set file type to COM if not already - call retud ;get current DU - lda fcb ;get disk - ora a ;default? - jz cr4 - dcr a ;disk A = 0 - mov b,a -cr4: - lda fcb+13 ;get user - mov c,a - call logud -; -; Write File whose Name is in FCB -; -write: - lxi d,fcb ;check for file - call initfcb ;clear FCB - call f$exist ;check for existence - jz write1 - call print - db cr,lf,' File ',0 - lxi d,fcb+1 - call pfn1 - call print - db ' Exists - Overwrite (Y/N)? ',0 - call capine - call crlf - cpi 'Y' - rnz ;abort if not Y - lxi d,fcb ;clear file attributes - xra a - call sfa ;set file attributes to R/W DIR - call f$delete ;delete file -; -; Create New File -; -write1: - lxi d,fcb ;pt to FCB - call initfcb ;init it - call f$make ;create file - mvi c,8 ;8 sectors - call codend ;pt to file -write2: - lxi d,tbuff ;copy sector into buffer - mvi b,128 ;128 bytes - call hmovb - lxi d,fcb ;write block - call f$write - jnz werr - dcr c ;count down - jnz write2 - call f$close ;close file - call print - db cr,lf,' Alias Created',0 - ret -werr: - call print - db cr,lf,' Error in Creating File',0 - ret - -; -; Determine End of Code to Nearest 128 bytes -; -codend: - push d - lhld $memry ;get next available byte - mov a,l ;get low - ani 80h ;set MSB - mov l,a - lxi d,128 ;next 128 bytes - dad d - pop d - ret - -; -; Set File Type of File in FCB to COM if Not Already Set -; -setcom: - lda fcb+9 ;get first char of file type - cpi ' ' - rnz - push h - push d - push b - lxi h,comtyp ;set COM type - lxi d,fcb+9 ;copy into file type - mvi b,3 ;3 bytes - call hmovb - pop b - pop d - pop h - ret - -; -; Buffers -; -comtyp: - db 'COM' ;COM File Type -aliasid: - db 'Z3 ALIAS' ;ALIAS File ID -flflag: - ds 1 ;file loaded flag -oldaline: - ds 2 ;ptr to old alias line - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ALIAS1.MAC b/Source/Images/d_bp/u15/ALIAS1.MAC deleted file mode 100644 index 3b9f8be2..00000000 --- a/Source/Images/d_bp/u15/ALIAS1.MAC +++ /dev/null @@ -1,514 +0,0 @@ -; -; Program: ALIAS1 -; Author: Richard Conn -; Version: 1.1 -; Date: 10 June 84 -; Previous Versions: 1.0 (5 Mar 84) -; -version equ 11 - -; -; The purpose of ALIAS1 is to load the Command Line Buffer with -; a command line stored within ALIAS1, extracting parameters using the -; SUBMIT file convention ($n) as they are referenced in the new command -; line. Upon successful build, ALIAS1 runs the new command line by simply -; returning to ZCPR3. -; - -; -; Macros -; - MACLIB Z3BASE.LIB - -; -; Basic Equates -; -tbuff equ 80h - -; -; External References -; - ext z3init,getefcb,getcl1,getenv,getfn2 - ext eprint,codend,sksp,retud,caps - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - jmp start1 ;skip command line buffer -; -; ALIAS ID at START+9 -; - db 'Z3 ALIAS' -; -; Internal Command Line Buffer -; This buffer address can be determined from START+17, where the -; value of START is obtained from the 2nd and 3rd bytes of ALIAS1. -; -clbuf: - db 0 ;set to empty - ds 255 ;allow 256 bytes -; -; Resume ALIAS1 -; -start1: - call codend ;pt to free space in which to build new line - lxi d,clbuf ;pt to buffer - xchg ;HL pts to target line, DE pts to buffer -; -; Process Next Char from Target Command Line -; -nxtchar: - mov a,m ;get next char - ora a ;end of line? - jz done - cpi '$' ;possible passed parameter? - jz param - stax d ;store next char - inx h ;pt to next - inx d - jmp nxtchar -; -; Process Possible Parameter -; -param: - lxi b,nxtchar ;establish return address - push b ;... on stack - inx h ;get parameter char - mov a,m - call caps ;capitalize - cpi '*' ;entire tail? - jz paraml - cpi 'D' ;current disk? - jz paramd - cpi 'U' ;current user? - jz paramu - cpi 'F' ;System Filename.Typ? - jz paramf - cpi 'N' ;System Filename? - jz paramn -; cpi 'T' ;System Typ? -; jz paramt - sui '0' ;convert - jc noparam - cpi 10 ;range? - jnc noparam - ora a ;parameter 0 = original name - jz oname - mov b,a ;count in B (1 or more) - inx h ;pt to next char - push h ;save ptr - lxi h,tbuff+1 ;pt to input line -; -; Advance to Desired Parameter -; -param1: - call sksp ;skip to non-blank - mov a,m ;check for done - ora a - jz paramx - dcr b ;count down - jz param3 ;got it -; -; Skip Over This Parameter -; -param2: - mov a,m ;skip to space or EOL - inx h ;pt to next - cpi ' ' ;space - jz param1 - ora a ;EOL - jz paramx - jmp param2 ;continue -; -; Extract Parameter Into Target Buffer -; -param3: - mov a,m ;get char - cpi ' '+1 ;done? - jc paramx - stax d ;store char - inx h ;advance - inx d - jmp param3 -; -; Resume Processing of Target Command -; -paramx: - pop h ;restore ptr to next char - ret ;resume at next char -; -; Parameter is for System Filename.typ -; -paramf: - call getfnum ;get file number - rz ;resume if error - push h ;save ptr to next char - call ptfn ;set ptr to file name - call putn ;put file name - mvi a,'.' ;dot - stax d - inx d - call putt ;put file type - pop h ;restore ptr - ret -; -; Parameter is for System Filename -; -paramn: - call getfnum ;get file number - rz ;resume if error - push h ;save ptr to next char - call ptfn ;set ptr to file name - call putn ;put file name - pop h ;restore ptr - ret -; -; Parameter is for System Typ -; -;paramt: -; call getfnum ;get file number -; jz nxtchar ;resume if error -; push h ;save ptr to next char -; call ptfn ;set ptr to file name -; mvi a,8 ;add 8 to get to file type -; add l -; mov l,a -; mov a,h -; aci 0 -; mov h,a -; call putt ;put file type -; pop h ;restore ptr -; jmp nxtchar - -; -; Get File Number (1 to 4) -; If valid number, return with value in A and HL pting to next char -; If not valid, return with Z and HL pting to next char (the number) -; -getfnum: - inx h ;pt to number - mov a,m ;get char - sui '1' ;convert - jc getfne ;error if less - cpi 4 ;range? - jnc getfne ;error if more - inx h ;pt to next char - ret ;NZ from CPI 4 -getfne: - xra a ;return Z - ret -; -; Pt to File Name whose Number (1-4) is in A -; -ptfn: - mov b,a ;number in B - call getfn2 ;pt to file name 2 - push d ;save DE - mov a,b ;file 0? - ora a - jz ptfnx - lxi d,11 ;size of file name and type -ptfn1: - dad d ;pt to next - dcr b ;count down - jnz ptfn1 -ptfnx: - pop d ;restore DE - ret -; -; Put File Name pted to by HL -; -putn: - mvi b,8 ;8 chars - jmp putc -; -; Put File Type pted to by HL -; -putt: - mvi b,3 ;3 chars -; -; Copy chars from HL to DE for up to 8 bytes - flush if space -; -putc: - mov a,m ;get next char - cpi ' ' ;skip spaces - jz putc1 - stax d ;put next char - inx d ;pt to next -putc1: - inx h ;pt to next - dcr b ;count down - jnz putc - ret -; -; Parameter is for Disk Letter -; -paramd: - call retud ;get DU in BC - mov a,b ;get disk letter - adi 'A' ;convert to ASCII - stax d ;store char - inx d ;pt to next - inx h ;pt to next char - ret -; -; Parameter is for User Number -; -paramu: - call retud ;get DU in BC - mov a,c ;get user number - mvi b,10 ;compute 10's - mvi c,'0' -pmu1: - sub b ;subtract 10's - jc pmu2 - inr c ;increment 10's - jmp pmu1 -pmu2: - add b ;add B back in - adi '0' ;convert to ASCII - mov b,a ;10's in C, 1's in B - mov a,c - cpi '0' ;no leading 0's - jz pmu3 - stax d ;store char - inx d ;pt to next -pmu3: - mov a,b ;get 1's - stax d ;store char - inx d ;pt to next - inx h ;pt to next char - ret -; -; Parameter is command line tail -; -paraml: - inx h ;pt to char after parameter letter - push h ;save ptr to parameter - lxi h,tbuff+1 ;pt to tail -paramt1: - mov a,m ;copy tail into line - ora a ;end of tail? - jz paramt2 - stax d ;store char - inx h ;pt to next - inx d - jmp paramt1 -paramt2: - pop h ;pt to next char in script - ret ;continue processing -; -; Form assumed to be $$ -; -noparam: - mvi a,'$' ;store '$' - stax d - inx d ;pt to next chars - inx h - ret -; -; $0 - ALIAS Command Name -; -oname: - inx h ;pt to next char - push h ;save ptr - call getefcb ;pt to FCB - jz paramx ;skip if no external FCB - inx h ;pt to first char - mvi b,8 ;at most 8 chars -on1: - mov a,m ;copy into output line - cpi ' ' ;done if space - jz paramx - stax d ;store char - inx h ;pt to next - inx d - dcr b ;count down - jnz on1 - jmp paramx - -; -; Done -- Buffer is Loaded -; -done: - xra a ;store ending 0 - stax d - call codend ;pt to buffer - mov a,m ;skip if empty line - ora a - rz -; -; Determine if ZCPR3 Environment Support is Available for Command Line -; - push h ;save ptr to line - call getenv ;get environment - mov a,h - ora l - jz done0 -; -; Get environment from descriptor -; - call getcl1 ;get command line data - mov b,a ;save char count - mov a,h ;check for no command line - ora l - jz done0 - mov a,b ;restore char count - ora a ;check for no chars - jnz done1 -; -; Get environment from MACRO File -; -done0: - lxi h,z3cl ;pt to command line from macro expansion - mvi a,z3cls ;get size of command line -; -; Store Command Line -; -done1: - pop d ;DE pts to line - call putcl ;store in command line - rnz ;return to ZCPR3 for processing if OK - call eprint - db 'Ovfl',0 - ret -; -; PUTCL stores a command line in the ZCPR3 command line buffer. -; This command line is pted to by DE. CL Buffer is pted to by HL. -; Size in A. On return, A=0 and Zero -; Flag Set if command line overflow is possible (no change to command line). -; -putcl: - shld clbfr ;save ptr to command line buffer - ora a ;any command line? - jz nocl - mov b,a ;char count in B - xchg ;HL pts to new line - push h ;save ptr to new line -pcl2: - mov a,m ;go to end of line - ora a ;at end? - jz pcl3 - inx h ;pt to next - dcr b ;count down - jnz pcl2 - pop h ;clear stack -; -; Command Line Buffer Overflow -; -nocl: - xra a ;error return - ret -; -; At End of New Command Line (ptr on stack) -; Ptr to first char of new command line on stack -; HL pts to ending 0 of new command line -; B = number of chars remaining before overflow of Z3 command line -; -pcl3: - push h ;save ptr to last byte in case of error - lhld clbfr ;pt to tail of command line - mov e,m - inx h - mov d,m - xchg ;HL pts to command line tail - pop d ;restore ptr to last byte of command line - push d - mov a,m ;get first char of tail - cpi ';' ;continuation? - jz pcl4 - ora a ;done? - jz pcl4 - mvi a,';' ;set continuation char - stax d - inx d - dcr b ;count down - jz pcl5 ;overflow -; -; Copy tail onto end of new command line -; -pcl4: - mov a,m ;get next char - stax d ;store it - inx h ;pt to next - inx d - ora a ;done? - jz pcl6 - dcr b ;count down - jnz pcl4 -; -; Command Line too Long -; -pcl5: - pop h ;get ptr to end of old line - mvi m,0 ;store ending 0 - pop psw ;clear stack - jmp nocl -; -; New Command Line OK -; -pcl6: - pop psw ;clear stack - lhld clbfr ;pt to command line buffer - lxi d,4 ;pt to first char in buffer - xchg - dad d - xchg - mov m,e ;store address - inx h - mov m,d ;DE pts to first char of buffer - pop h ;HL pts to first char of new line -; -; Copy New Command Line into Buffer -; -pcl7: - mov a,m ;copy - stax d - inx h - inx d - ora a ;EOL? - jnz pcl7 -; -; Exit with OK Code -; - xra a ;set NZ - dcr a - ret - -; -; Buffers -; -clbfr: - ds 2 ;ptr to command line - - end - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/CD.COM b/Source/Images/d_bp/u15/CD.COM deleted file mode 100644 index adc74b39..00000000 Binary files a/Source/Images/d_bp/u15/CD.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/CD.MAC b/Source/Images/d_bp/u15/CD.MAC deleted file mode 100644 index 14eeaf8d..00000000 --- a/Source/Images/d_bp/u15/CD.MAC +++ /dev/null @@ -1,152 +0,0 @@ -; -; Program: CD -; Version: 3.0 -; Author: Richard Conn -; Date: 12 Apr 84 -; Previous Versions: None -; Derivation: In Concept from CD 2.4 for ZCPR2 -; -version equ 30 -z3env set 0f400h - -; -; CD is used to log into a new directory by name or DU (DIR or DU forms) -; and to automatically run ST once there if it is available. -; -; Syntax: -; CD or CD // <-- Print Help -; CD dir: <-- Log In and Run ST.COM -; - -; -; OS Equates et al -; -cpm equ 0 -udbyte equ 4 -bdos equ 5 -fcb equ 5ch -tbuff equ 80h -tpa equ 100h -cr equ 0dh -lf equ 0ah - -; -; SYSLIB and Z3LIB Functions -; - ext z3init,z3log - ext retud,moveb,initfcb,putcl,eprint,pafdc,cout,dutdir - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - lda fcb+1 ;check for help - cpi '/' ;help? - jnz cd - call eprint - db 'CD, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,'Syntax:' - db cr,lf,' CD dir: or CD du: <-- Change Directory' - db 0 - ret -; -; Log into DU converted by ZCPR3 -; -cd: - lxi d,fcb ;pt to FCB - call z3log ;login to DU - call retud ;set DU in the UD byte - mov a,c ;set user - rlc ;rotate right 4 bits - rlc - rlc - rlc - ani 0f0h ;mask - mov c,a ;save for now - mov a,b ;get disk - ani 0fh ;mask - ora c ;mask in user - sta udbyte ;save value in UD byte -; -; Print New Directory -; - call eprint - db ' Logging Into ',0 - call retud ;get DU in BC - mov a,b ;get disk - adi 'A' - call cout - mov a,c ;get user - call pafdc ;print number - mvi a,':' ;print colon - call cout - call dutdir ;convert to name - jz runfile ;run file if no name - mvi b,8 ;8 chars max to name (pted to by HL) -prtname: - mov a,m ;get name char - cpi ' ' ;done? - jz runfile - inx h ;pt to next - call cout - dcr b ;count down - jnz prtname -; -; Look for File -; -runfile: - lxi h,stfile ;pt to FCB - lxi d,fcb ;copy into FCB - mvi b,12 ;12 bytes - call moveb - call initfcb ;init FCB - mvi c,15 ;try to open file - call bdos ;use BDOS - cpi 0ffh ;not found? - jz cpm ;done - no ST.COM - lxi h,stcl ;pt to default command line - call putcl ;store it in ZCPR3 CL Buffer - jnz cpm ;abort to OS if done - call eprint ;print error message - db ' Command Line Overflow',0 - jmp cpm - -; -; Buffers -; -stfile: - db 0,'ST COM' ;default command -stcl: - db 'ST',0 ;default command line - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/CLEAND15.LBR b/Source/Images/d_bp/u15/CLEAND15.LBR deleted file mode 100644 index 1efb96bd..00000000 Binary files a/Source/Images/d_bp/u15/CLEAND15.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/CLEANDIR.COM b/Source/Images/d_bp/u15/CLEANDIR.COM deleted file mode 100644 index 3199d20c..00000000 Binary files a/Source/Images/d_bp/u15/CLEANDIR.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/CLEANDIR.MAC b/Source/Images/d_bp/u15/CLEANDIR.MAC deleted file mode 100644 index 4d5d71e2..00000000 --- a/Source/Images/d_bp/u15/CLEANDIR.MAC +++ /dev/null @@ -1,857 +0,0 @@ -; -; Program: CLEANDIR -; Derivation: SAP 3.8 (see following history for authors) -; Derivation By: Richard Conn -; Version: 1.1 -; Date: 28 November 1984 -; Previous Versions: 1.0 (20 June 84) -; -; bug fix ;841201 Peter T Lyman -; Version 1.1P -; -; Search for ';841201' to locate the code -; -; CLEANDIR can and does wipe out the operating system -; (also known as a crash) whenever the maximum size of -; the directory (DRM) exceeds the available memory.... -; -; Maybe that is a good feature, since you at least don't -; hurt the disk... -; -; However on my hard disk I have two platters with -; DRM equal to 2048.... In this case CLEANDIR crashes... -; -; The fix that I have added (I did this with an early version -; of SAP) gives you a choice.... If DRM is greater than -; the space available betwwen BUF and BDOS, you are given -; a choice with proceeding if the actual number of directory -; entries is less than or equal to the space available.... -; If not you ABORT..... -; -; The down side risk of this modification is that if you -; proceed ("Y") when the actual number of files exceeds -; the space available, you lose all the directories entries -; which don't fit in the available space.... -; -; With out the fix the system crashes and you cannot clean the -; directory... With the fix you can clean the directory, but -; you can lose files if you don't pay attention.... -; - -vers equ 11 -z3env equ 0f400h - -; -; SYSLIB and Z3LIB References -; - ext z3init,z3log - ext eprint,cout - ext codend - ext phlfdc ;841201 - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment - -; v3.8 SORT AND PACK CP/M DISK DIRECTORY - 10/16/83 -; -; THIS PROGRAM READS THE DISK DIRECTORY TRACKS, SORTS THEM ALPHABETICALLY -; THEN REPLACES THEM ON THE DISK. ALL UNUSED OR ERASED AREAS ON THE DIR- -; ECTORY TRACK ARE REFORMATTED WITH CONTINUOUS 'E5' CHARACTERS. (THIS -; ERASES PREVIOUS FILE NAMES WHICH HAVE BEEN DEACTIVATED.) SORTING THE -; DIRECTORY IN THIS MANNER OFFERS MANY ADVANTAGES. SOME OF THEM ARE: -; -; 1) ALLOWS 'DIR' TO SHOW AN ALPHABETIZED LISTING -; 2) ELIMINATES POTENTIAL PROBLEMS WITH "UNERASE" PROGRAMS -; 3) SPEEDS UP ACCESS VIA 'SD' AND OTHER SPECIAL PROGRAMS -; 4) ASSISTS ON WORKING DIRECTLY ON THE DISK WITH 'DUU', ETC. -; 5) REMOVES FILES FROM THE DISK SOMEBODY ELSE COULD RECOVER -; -; - Notes by Irv Hoff W6FFC -; -; 1977 Written by L. E. Hughes. Modified extensively since by Bruce -; Ratoff, Keith Petersen, James Prest, Ron Fowler, Frank Gaude, -; Irv Hoff and likely others. -; -; 10/16/83 Now using a Shell-Metzner sort which speeds the sorting time -; considerably, especially on large directories. (SFK) -; -; 07/27/83 Shows an error flag for MP/M and CP/M+ both. Rewrites dir- -; tory even if previously sorted, to insure erased programs at -; v3.7 end of directory are properly cleared. -; - Irv Hoff -; -TRUE EQU 0FFH -FALSE EQU 0 -; -BDOS EQU 5 -CR EQU 0DH -DPBLEN EQU 15 ;SIZE OF CP/M2 DISK PARAMETER BLOCK -FCB EQU 5CH -FCB2 EQU 6CH -GETDSK EQU 25 ;BDOS "GET DISK #" FUNCTION -LF EQU 0AH -SELDRV EQU 14 ;SELECT DRIVE -;..... -; -; -; OBTAIN BIOS VECTORS -; -VECTRS: - JMP GETVEC -; - DS 53 ;ROOM FOR JUMP VECTORS -; -WBOOT EQU VECTRS+3 ;DO NOT CHANGE THESE EQUATES -CSTS EQU VECTRS+6 -CI EQU VECTRS+9 -CO EQU VECTRS+12 -LO EQU VECTRS+15 -PO EQU VECTRS+18 -RI EQU VECTRS+21 -HOME EQU VECTRS+24 -SELDSK EQU VECTRS+27 -SETTRK EQU VECTRS+30 -SETSEC EQU VECTRS+33 -SETDMA EQU VECTRS+36 -READ EQU VECTRS+39 -WRITE EQU VECTRS+42 -LSTS EQU VECTRS+45 ;ONLY IN CP/M2 -SECTRN EQU VECTRS+48 ;ONLY IN CP/M2 -; -; GET BIOS VECTORS -; -GETVEC: - LXI D,WBOOT - LHLD 1 - MVI B,53 - CALL MOVE -; -; PROGRAM STARTS HERE -; - LXI H,0 - DAD SP ;GET ADDRESS OF CP/M STACK - SHLD STACK ;STORE IT SO WE CAN GO BACK TO IT - CALL CODEND ;DETERMINE FREE SPACE - LXI D,80H ;ALLOW 80H BYTES FOR STACK - SHLD BUF ;SET BUFFER ADDRESS - SPHL ;SET TOP OF STACK - lda bdos+2 ;fetch bdos page ;841201 - dcr a ; less one ; - lhld buf ;fetch buf pntr ; - sub h ;available space for dir ; - mvi h,0 ; ; - mov l,a ;number of pages available ; - dad h ;x2->number of sectors ; - dad h ;x2 ; - dad h ;x2->number of directory ; - ; entries which will fit ; - shld maxdir ;save for later ; - XRA A ;SET NO REVERSE OF USER AREAS - STA REVERSE - CALL EPRINT ;PRINT MSG: - DB 'CLEANDIR, Version ' - DB (vers/10)+'0','.',(vers mod 10)+'0','P' ;841201 - DB 0 - LDA FCB+1 ;CHECK FOR HELP REQUEST - CPI '/' ;ANY OPTION MEANS HELP - JZ HELP - CPI 'D' ;SELECT DESCENDING ORDER? - JZ DESC - LDA FCB2+1 ;CHECK FOR OPTION CHAR - CPI 'D' ;DESCENDING ORDER OF USER AREAS? - JNZ SAP -DESC: - MVI A,0FFH ;ENABLE REVERSE - STA REVERSE - JMP SAP -; -; PRINT HELP MESSAGE -; -HELP: - CALL EPRINT - DB CR,LF,'Syntax:' - DB CR,LF,' CLEANDIR dir: o' - DB CR,LF,'Options:' - DB CR,LF,' D - sort in Descending Order (users and files)' - DB CR,LF,'Note:' - DB CR,LF,' Only disk ref is used in dir: form' - DB 0 - JMP EXIT1 -; -; MAIN PROGRAM ROUTINE -; -SAP: - CALL SETUP - call ckdrsz ;check available memory space ;841201 - CALL RDDIR - CALL CLEAN - CALL SORT - CALL PACK - CALL WRDIR - CALL EPRINT - DB 'Done',0 - JMP EXIT - -ckdrsz: lhld drm ;fetch max dir size ;841201 - xchg ; ; - lhld maxdir ;fetch memory available for dir ; - call hlmde ;subtract ; - rnc ;return if room ; - call eprint ;else... ; - db lf,lf,lf,lf,lf,lf ; - db cr,lf,'Your maximum directory size is ',0 ; - lhld drm ;print max dir size ; - inx h ; ; - call phlfdc ; ; - call eprint ; ; - db ' directory entries.',0 ; - call eprint ; ; - db cr,lf,'your memory can only handle ',0 ; - lhld maxdir ;print space available ; - call phlfdc ; ; - call eprint ; ; - db ' directory entries.' ; - db cr,lf,lf,'IF.....your directory DOES NOT exceed ',0; - lhld maxdir ; ; - call phlfdc ; ; - call eprint ; ; - db ' directory entries,' ; - db cr,lf,' (Directory entries NOT Files)'; - db cr,lf,' you may enter "Y" to proceed,' ; - db cr,lf,lf,'ELSE...any other key ABORTS.' ; - db cr,lf,lf,lf,lf,lf,lf,lf,lf,'..............> ',7,0; -ck1: mvi c,6 ;get input ; - mvi e,-1 ; ; - call bdos ; ; - cpi 0 ; ; - jz ck1 ; ; - ani 5fh ; ; - cpi 'Y' ; ; - jnz exit1 ; ; - lhld maxdir ; ; - shld drm ; ; - ret ; ; - ; ; -hlmde: mov a,h ; ; - cmp d ; ; - rnz ; ; - mov a,l ; ; - cmp e ; ; - ret ; ; -; -; SUBROUTINES -; -; -CLEAN: - LXI H,0 ;I = 0 -; -CLNLOP: - SHLD I - CALL INDEX ;HL = BUF + 16 * I - MOV A,M ;JUMP IF THIS IS A DELETED FILE - CPI 0E5H - JZ FILLE5 - LXI D,12 - DAD D ;HL = HL + 12 - MOV A,M ;CHECK EXTENT FIELD - ORA A - JNZ CLBUMP ;SKIP IF NOT EXTENT ZERO - INX H ;POINT TO RECORD COUNT FIELD - INX H - MOV A,M ;GET S2 BYTE (EXTENDED RC) - ANI 0FH ; FOR CPM2, 0 FOR CPM1 - MOV E,A - INX H - MOV A,M ;CHECK RECORD COUNT FIELD - ORA E - JNZ CLBUMP ;JUMP IF NON-ZERO - LHLD I ;CLEAR ALL 32 BYTES OF - CALL INDEX ; DIRECTORY ENTRY TO E5 - INX H - MOV A,M ;GET FIRST CHAR OF FILENAME - DCX H ; WARD CHRISTENSONS CAT PGMS - CPI '-' ; HAVE DISKNAME OF ZERO LENGTH - JZ CLBUMP ; THAT START WITH '-', DON'T DELETE - CPI ' ' ; DISCAT USES DISKNAME OF ZERO LENGTH - JZ CLBUMP ; THAT STARTS WITH ' ', DON'T DELETE -; -FILLE5: - MVI C,32 ;NUMBER OF BYTES TO CLEAR -; -FILLOP: - MVI M,0E5H ;MAKE IT ALL E5'S - INX H - DCR C - JNZ FILLOP -; -CLBUMP: - LHLD DRM ;GET COUNT OF FILENAMES - INX H - XCHG - LHLD I ;OUR CURRENT COUNT - INX H - PUSH H - CALL SUBDE ;SUBTRACT - POP H - JC CLNLOP ;LOOP TILL ALL CLEANED - RET -; -DODIR: - STA WRFLAG - LHLD SYSTRK - CALL DOTRAK ;SET THE TRACK - LXI H,0 - SHLD SECTOR - LHLD DRM ;NUMBER OF DIR ENTRIES - INX H ;RELATIVE TO 1 - CALL ROTRHL ;DIVIDE BY 4 - CALL ROTRHL ; TO GET SECTOR COUNT - SHLD DIRCNT - LHLD BUF - SHLD ADDR ;FOR DMA ADDRESS -; -DIRLOP: - LHLD SECTOR ;GET SECTORS PER TRACK - INX H - XCHG - LHLD SPT ;CURRENT SECTOR - CALL SUBDE ; SECTOR - SPT - XCHG - JNC NOTROV -; -; TRACK OVERFLOW, BUMP TO NEXT -; - LHLD TRACK - INX H - CALL DOTRAK - LXI H,1 ;REWIND SECTOR NUMBER -; -NOTROV: - CALL DOSEC ;SET CURRENT SECTOR - LHLD ADDR - MOV B,H ;SET UP DMA ADDRESS - MOV C,L - CALL SETDMA - LDA WRFLAG ;TIME TO FIGURE OUT - ORA A ; IF WE ARE READING - JNZ DWRT ; OR WRITING -; -; -; READ -; - CALL READ - ORA A ;TEST FLAGS ON READ - JNZ RERROR ;NZ=ERROR - JMP MORE ;GOOD READ, GO DO MORE -; -; TRACK AND SECTOR UPDATE ROUTINES -; -DOTRAK: - SHLD TRACK - MOV B,H - MOV C,L - CALL SETTRK - RET -DOSEC: - SHLD SECTOR - MOV B,H - MOV C,L - LHLD SECTBL - XCHG - DCX B - CALL SECTRN - MOV B,H - MOV C,L - CALL SETSEC - RET -; -; WRITE -; -DWRT: - MVI C,1 ;FOR CPM/2 DEBLOCKING BIOS'S - CALL WRITE - ORA A ;TEST FLAGS ON WRITE - JNZ WERROR ;NZ=BAD DIRECTORY WRITE - JMP MORE -; -; Exit Program -; -EXIT: - LDA NOBOOT ;SEE IF BOOT IS NEEDED - ORA A - JNZ EXIT1 ;FLAG IS SET IF ALREADY ALPHABETIZED - JMP 0000H ;A REWRITTEN DIRECTORY NEEDS A WARM BOOT -; -EXIT1: - LHLD STACK ;GET ADDRESS OF ORIGINAL CP/M STACK - SPHL ;RESET STACK ADDRESS - RET -; -INDEX: - DAD H - DAD H - DAD H - DAD H - DAD H - XCHG - LHLD BUF ;GET ADDRESS OF BUF - XCHG - DAD D - RET -; -; GOOD READ OR WRITE -; -MORE: - LHLD ADDR ;BUMP DMA ADRS FOR NEXT PASS - LXI D,80H - DAD D - SHLD ADDR - LHLD DIRCNT ;COUNTDOWN ENTRIES - DCX H - SHLD DIRCNT - MOV A,H ;TEST FOR ZERO LEFT - ORA L - JNZ DIRLOP ;LOOP TILL ZERO -; -; -; DIRECTORY I/O DONE, RESET DMA ADDRESS -; - LXI B,80H - CALL SETDMA - RET -; -; MOVE UTILITY SUBROUTINE -; -MOVE: - MOV A,M - STAX D - INX H - INX D - DCR B - JNZ MOVE - RET -; -; PACK DIRECTORY -; -PACK: - LXI H,0 ;I = 0 -; -PACK1: - SHLD I - CALL INDEX ;HL = BUF + 16 * I - LXI D,9 - DAD D ;HL = HL + 9 - MOV A,M ;JUMP IF FILETYPE NOT 'X$$' - SUI '0' ; WHERE 0.LE.X.LE.9 - JC PACK2 - CPI 10 - JNC PACK2 - STA J - INX H - MOV A,M - CPI '$' - JNZ PACK2 - INX H - MOV A,M - CPI '$' - JNZ PACK2 - INX H ;SET EXTENT NUMBER TO X - LDA J - MOV M,A - DCX H ;SET FILETYPE TO '$$$' - MVI M,'$' - DCX H - MVI M,'$' - DCX H - MVI M,'$' -; -PACK2: - LHLD I ;I = I + 1 - INX H - XCHG - LHLD DRM - INX H - XCHG - PUSH H - CALL SUBDE - POP H ;LOOP UNTIL I > DRM - JC PACK1 - RET -; -; READ AND WRITE DIRECTORY ROUTINES -; -RDDIR: - CALL EPRINT - DB ' --> Reading, ',0 - XRA A - STA NOBOOT ;ZERO THE FLAG - JMP DODIR ;ZERO THE WRITE FLAG FOR NOW -; -; COME HERE IF WE GET A READ ERROR -; -RERROR: - CALL EPRINT ;PRINT: - DB ' READ ERROR - No Change Made',0 - JMP EXIT -; -; DIVIDE HL BY 2 -; -ROTRHL: - ORA A ;CLEAR CARRY - MOV A,H - RAR - MOV H,A - MOV A,L - RAR - MOV L,A - RET -; -; SETUP FOR SELECTING DRIVE AND LOADING DISK PARM BLOCK -; -SETUP: - LXI D,FCB - CALL Z3LOG ;LOG INTO DISK SPECIFIED BY USER - MVI C,GETDSK ;OTHERWISE GET CURRENT DEFAULT DRIVE - CALL BDOS ;SO QUERY 'BDOS' FOR DRIVE - MOV C,A ;PREP FOR OBTAINING DPB - CALL EPRINT - DB CR,LF,' Disk ',0 - MOV A,C ;GET DISK NUMBER - ADI 'A' ;CONVERT TO ASCII - CALL COUT - CALL SELDSK -; -; GET CP/M 2.2 DPB DATA -; - MOV E,M - INX H - MOV D,M - INX H - XCHG - SHLD SECTBL - XCHG - LXI D,8 ;OFFSET TO DPB WITHIN HEADER - DAD D ;RETURNED BY SELDSK IN CPM2 - MOV A,M ;GET ADRS OF DPB - INX H - MOV H,M - MOV L,A - LXI D,DPB ;POINT TO DEST: OUR DPB - MVI B,DPBLEN - CALL MOVE - RET -; -; SORT THE DIRECTORY -; -SORT: - CALL EPRINT - DB 'Sorting (',0 - LDA REVERSE ;INDICATE ASC OR DSC - ORA A ;0=ASC - JZ SORTASC - CALL EPRINT - DB 'Descending',0 - JMP SORTDO -SORTASC: - CALL EPRINT - DB 'Ascending',0 -; -; SHELL-METZNER SORT -; -SORTDO: - CALL EPRINT - DB ' Order), ',0 - LHLD I - SHLD SNUMRECW - LHLD BUF - SHLD SSTADR - PUSH H ; AND SAVE IT - LXI H,32 - SHLD SRECLEN - PUSH H ; AND SAVE IT -; -; NOW DIVIDE # OF FIELDS BY 2 -; -DIVIDE: - LHLD SNUMRECW ;GET VALUE - CALL ROTRHL - SHLD SNUMRECW ;SAVE RESULT - MOV A,L ;IF SNUMRECW<>0 - ORA H ; THEN - JNZ NOTDONE ; NOT DONE -; -; ALL FIELDS SORTED -; - POP B ;CLEAN UP STACK - POP D - RET -; -NOTDONE: - XCHG - LHLD I - MOV A,L - SUB E - MOV L,A - MOV A,H - SBB D - MOV H,A - SHLD SRECLEN - LXI H,1 - SHLD SSORTV1 - SHLD SSTADR - DCR L - POP B - PUSH B -NDONE1: - DAD D - DCX B - MOV A,B - ORA C - JNZ NDONE1 - SHLD SSORTV2 - XCHG - POP B - POP H - PUSH H - PUSH B -NDONE2: - SHLD SSORTV4 - SHLD SSORTV3 - XCHG - DAD D - XCHG -COMPARE: - POP B - PUSH B -COMPAR1: - LDAX D - ANI 7FH - PUSH B - MOV C,A - MOV A,M - ANI 7FH - MOV B,A - MOV A,C - SUB B - POP B - JNZ NOTEQU - INX H - INX D - DCX B - MOV A,B - ORA C - JNZ COMPAR1 - JMP NOSWITCH -; -; THE CONDITION AT NOTEQU: HAS TO -; BE CHANGED FOR DESCENDING SORT -- IF REVERSE=0, JNC TO NOSWITCH, ELSE -; JC TO NOSWITCH -; -NOTEQU: - PUSH PSW ;SAVE CONDITION - LDAX D ;GET (DE) - CPI 0E5H ;IF ERASED, SELECT ASCENDING - JZ ASCENDING - MOV A,M ;GET (HL) - CPI 0E5H ;IF ERASED, SELECT ASCENDING - JZ ASCENDING - LDA REVERSE ;DESCENDING SORT? - ORA A ;0=NO - JZ ASCENDING - POP PSW ;GET CONDITION FOR DESCENDING SORT - JC NOSWITCH - JMP SWITCH -ASCENDING: - POP PSW ;GET CONDITION FOR ASCENDING SORT - JNC NOSWITCH -SWITCH: - PUSH B - MOV B,M - LDAX D - MOV M,A - MOV A,B - STAX D - INX H - INX D - POP B - DCX B - MOV A,B - ORA C - JNZ SWITCH - LHLD SNUMRECW - MOV A,H - CMA - MOV D,A - MOV A,L - CMA - MOV E,A - LHLD SSORTV1 - DAD D - JNC NOSWITCH - INX H - SHLD SSORTV1 - LHLD SSORTV3 - XCHG - LHLD SSORTV2 - MOV A,E - SUB L - MOV L,A - MOV A,D - SBB H - MOV H,A - SHLD SSORTV3 - JMP COMPARE -; -NOSWITCH: - LHLD SSTADR - INX H - SHLD SSTADR - SHLD SSORTV1 - XCHG - LHLD SRECLEN - MOV A,L - SUB E - MOV A,H - SBB D - JC DIVIDE - LHLD SSORTV4 - POP D - PUSH D - DAD D - XCHG - LHLD SSORTV2 - XCHG - JMP NDONE2 -; -; UTILITY SUBTRACTION SUBROUTINE... -; HL=HL-DE -; -SUBDE: - MOV A,L - SUB E - MOV L,A - MOV A,H - SBB D - MOV H,A - RET -;..... -; -; -WRDIR: - CALL EPRINT - DB 'Writing, ',0 - MVI A,1 - JMP DODIR -; -; COME HERE IF WE GET A WRITE ERROR -; -WERROR: - CALL EPRINT ;PRINT: - DB ' WRITE ERROR - Directory Left in UNKNOWN Condition',0 - JMP EXIT -; -; DATA AREA -; -ADDR: - DS 2 -BUF: - DS 2 -DIRCNT: - DS 2 -I: - DS 2 -J: - DS 2 -MAPPTR: - DS 2 -maxdir: - ds 2 ;841201 -NOBOOT: - DS 1 -NOSWAP: - DS 1 -REVERSE: - DS 1 -SECTBL: - DS 2 -SECTOR: - DS 2 -TRACK: - DS 2 -WRFLAG: - DS 1 -SRECLEN: - DS 2 -SSTADR: - DS 2 -SSORTV1: - DS 2 -SSORTV2: - DS 2 -SSORTV3: - DS 2 -SSORTV4: - DS 2 -SNUMRECW: - DS 2 -; -; DISK PARAMETER BLOCK: -; -DPB: -SPT: - DS 2 -BSH: - DS 1 -BLM: - DS 1 -EXM: - DS 1 -DSM: - DS 2 -DRM: - DS 2 -AL0: - DS 1 -AL1: - DS 1 -CKS: - DS 2 -SYSTRK: - DS 2 -; -STACK: - DS 2 ;SPACE FOR OLD STACK ADDRESS -; - END -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/CLNDR13B.LBR b/Source/Images/d_bp/u15/CLNDR13B.LBR deleted file mode 100644 index b74e2545..00000000 Binary files a/Source/Images/d_bp/u15/CLNDR13B.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/CMD.COM b/Source/Images/d_bp/u15/CMD.COM deleted file mode 100644 index 7afcba9d..00000000 Binary files a/Source/Images/d_bp/u15/CMD.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/CMD.MAC b/Source/Images/d_bp/u15/CMD.MAC deleted file mode 100644 index 9a5cbf68..00000000 --- a/Source/Images/d_bp/u15/CMD.MAC +++ /dev/null @@ -1,267 +0,0 @@ -; PROGRAM: CMD -; VERSION: 1.0 -; DATE: 19 July 84 -; AUTHOR: Richard Conn -; PREVIOUS VERSIONS: None -; -z3env equ 0f400h -VERS EQU 10 ;version number - -; CMD is copyright (c) 1984 by Richard Conn -; All Rights Reserved -; CMD may be used freely by the ZCPR3 Community - -; -; CMD is used to define and run a command line. It either accepts -; the command line (including semicolons) which follow the verb CMD onto -; the command line buffer or, if no input is provided, it prompts the -; user for input and then places this into the command line buffer. -; -; Syntax: -; CMD cmd1;cmd2;... -; or CMD -; -; The sequence of commands "cmd1;cmd2;..." becomes the command line. -; - -; -; SYSLIB, Z3LIB, and VLIB References -; - ext z3init - ext getcl1,getcl2,puter2,putzex,dutdir - ext eprint,pafdc,cout,bline - ext retud - ext codend - -; -; Basic Definitions -; -TRUE EQU 0FFH ;define true and.. -FALSE EQU 0 ;..false. - -; -; System Addresses -; -OS$BASE EQU 000H ;system base.. -BDOS EQU OS$BASE+05H -FCB EQU OS$BASE+5CH -FCB2 EQU OS$BASE+6CH -TBUFF EQU OS$BASE+80H -TPA EQU OS$BASE+100H - -; -; ASCII Chars -; -LF EQU 0AH ;..linefeed.. -CR EQU 0DH ;..carriage return.. - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Mainline -; - call z3init ;initialize the ZCPR3 Env - -; -; Check for Help or Prompt -; - lda fcb+1 ;check for help request - cpi ' ' ;prompted input? - jz prompt - cpi '/' ;help? - jnz cinit -; -; Print Help Message -; -help: - call eprint - db 'CMD, Version ' - db (VERS/10)+'0','.',(VERS MOD 10)+'0' - db cr,lf,' Syntax: CMD cmd1;cmd2;... or CMD (prompted input)' - db cr,lf,' CMD defines the command line in the CL buffer' - db 0 - ret -; -; Initialize Command Line -; -cinit: - call getcl1 ;check for command line buffer - jz nocl -; -; HL now points to the command line buffer -; - call codend ;pt to free area - inx h ;skip 2 bytes - inx h - xchg ;... in DE - lxi h,tbuff+2 ;pt to option input - call copystr ;copy string - mvi c,1 ;set not empty -; -; Entry point to build rest of command line, where DE=next address -; and C=empty line flag (C=0 means line was empty) -; -checkcl: - mov a,c ;get empty flag - call puter2 ;set error flag - call getcl2 ;get address of command line - jz setsh ;set shell command - call copystr ;copy string -setsh: - call getcl1 ;pt to command line buffer - xchg ;... in DE - lxi h,4 ;pt to first char position - dad d - shld lstart ;save start address in case of abort - xchg - mov m,e ;store pointer - inx h - mov m,d - inx h ;pt to buffer size - mov b,m ;get it in B - call codend ;pt to string - inx h ;skip 2 bytes - inx h -clcopy: - mov a,m ;get char - stax d ;put char - inx h ;pt to next - inx d - ora a ;done? - rz - dcr b ;count down - jnz clcopy -; -; Command Line Too Long -; - lhld lstart ;zero command line - mvi m,0 - call eprint - db ' Command Line too Long for Buffer',0 - ret - -; -; Print no command line buffer message and exit -; -nocl: - call eprint - db ' No Command Line Buffer',0 - ret - -; -; Copy string from HL to DE -; Store ending 0 and leave pointer in DE to it -; -copystr: - mov a,m ;get char - stax d ;store it - ora a ;done? - rz - inx h ;pt to next - inx d - jmp copystr - -; -; Prompt User for Input -; -prompt: - call eprint - db 'CMD ',0 - call retud ;get DU -; -; Print DU -; - mov a,b ;output disk - adi 'A' - call cout - mov a,c ;output user - call pafdc - mvi a,':' ;separator - call cout -; -; Print DIR -; - call dutdir ;convert to name - jz prompt2 ;no name input -; -; DIR is defined -; - mvi b,8 ;8 chars max -prompt1: - mov a,m ;get char - cpi ' ' ;done if space - jz promptx - call cout ;echo it - inx h ;pt to next - dcr b ;count down - jnz prompt1 - jmp promptx -; -; DIR is not defined -; -prompt2: - call eprint ;name not found - db 'Noname',0 -; -; Complete prompt and get user input -; -promptx: - call eprint - db '> ',0 - mvi a,1 ;tell ZEX that it is prompted - call putzex - call codend ;use buffer area - mvi m,254 ;set large line size - mvi a,0 ;no caps - call bline ;get input line - xra a ;no more prompt - call putzex - call codend ;skip to EOL - inx h - inx h - xchg ;ptr in DE - ldax d ;get first char - mov c,a ;save flag -; -; Skip to end of input line -; -findeol: - ldax d ;get char - ora a ;done? - jz checkcl - inx d ;pt to next - jmp findeol -; -; Buffers -; -lstart: - ds 2 ;start of command line - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/CMDFILES.HLP b/Source/Images/d_bp/u15/CMDFILES.HLP deleted file mode 100644 index 822026f2..00000000 --- a/Source/Images/d_bp/u15/CMDFILES.HLP +++ /dev/null @@ -1,729 +0,0 @@ -; - - - - Command File Processing - - -- Basics -- - 0 - Overview - 1 - Restrictions - 2 - Extended Cmd Procs - --- Disk-Based Command Files -- -- Memory-Based Command Files -- - S - The SUB Utility Z - The ZEX Utility - E - SUB Error Messages D - ZEX Directives - G - GOTO Command - - -:0 - - Overview of Command Files - - Á  Commanä  Filå ió á filå  containinç  commands¬  witè -optionaì  parameteò substitution¬  whicè caî bå executeä  bù -ZCPR3®  Theså  commandó  arå  exactlù  thå  samå  kindó  oæ -commandó aó yoõ woulä issuå aô thå console¬  anä anù commanä -whicè caî bå issueä froí thå consolå caî alsï bå issueä froí -withiî á Commanä Filå (witè jusô á couplå oæ restrictions). - - Thå   Commanä  Filå  Facilitieó  oæ  SU  anä  ZEØ  arå -availablå  undeò ZCPR3®  Similaò iî concepô tï  thå  SUBMIÔ -facilitù oæ CP/M¬  botè SU anä ZEØ arå upward-compatablå tï -SUBMIÔ   (anù   SU  filå  caî  ruî  undeò  theí  witè   fe÷ -restrictions). - - - Botè  SU anä ZEØ begiî processinç bù  translatinç  thå -commanä  fileó theù arå giveî intï slightlù differenô forms® -Botè dï parameteò substitution¬  extractinç parameteró  froí -thå  commanä  lineó  anä placinç theí intï thå texô  oæ  thå -commanä  streaí theù arå building®  SU buildó thå  commanä -streaí tï bå executeä oî disë drivå Á undeò thå currenô useò -number¬ anä ZEØ buildó thå commanä streaí iî memory. - - ZEØ  ió generallù preferreä tï  SUB®  Undeò  ZEX¬  thå -commanä  streaí ió executeä mucè morå quicklù thaî undeò SU -sincå ZEØ accesseó memorù foò thå nexô characteò whilå ZCPR³ -haó tï gï tï disk® ZEX¬ however¬ takeó uð memorù space¬ anä -thaô ió itó maiî drawback® Thå TPÁ (Transienô Prograí Area© -undeò ZEØ ió smalleò thaî whaô ió availablå tï commanä fileó -runninç undeò SUB®  Thió ió thå basiã trade-ofæ betweeî thå -twï Commanä Filå Processors. - - - Anotheò  differencå  betweeî SU anä ZEØ  ió  thaô  SU -commanä  streamó  arå  line-orienteä anä extracteä  onlù  bù -ZCPR3®  Thaô  is¬  SU buildó á commanä filå nameä  $$$.SU -likå SUBMIÔ does¬ anä ZCPR³ extractó á linå froí thå $$$.SU -filå  eacè  timå iô ió entered®  Wheî ZCPR³ ió  entereä  bù -eitheò  á  Colä Boot¬  Warí Boot¬  oò simplå RETurî  froí  á -loadeä program¬  iô checkó thå Multiplå Commanä Linå  Buffeò -foò  á pendinç command®  Iæ ZCPR³ findó á pendinç  command¬ -thå commanä ió executed®  Iæ not¬ ZCPR³ checkó thå Aº drivå -(currenô  user©  foò á $$$.SU file®  Iæ á $$$.SU filå  ió -found¬  ZCPR³ extractó thå nexô linå froí thå $$$.SU  file¬ -processeó  it¬  anä beginó executioî oæ iô froí thå Multiplå -Commanä Linå Buffer®  Finally¬  iæ thå $$$.SU filå ió  noô -found¬ ZCPR³ promptó thå useò foò input. - - Thaô  ió  ho÷  commanä streaí processinç undeò  SU  ió -performed®  ZEX¬  however¬ actó aó á combinatioî oæ SU anä -XSUB®  Oncå commanä streaí processinç beginó undeò ZEX¬ thå -ZEØ monitor¬ locateä undeò ZCPR³ witè thå associateä commanä -stream¬  supplieó  á  characteò eacè timå thå  BIOÓ  Consolå -Inpuô  Routinå ió called®  ZEØ extractó thå nexô  characteò -froí thå commanä stream¬  examineó iô tï seå iæ iô ió á  ZEØ -commanä anä executeó iô iæ so¬ anä returnó iô tï thå callinç -prograí iæ iô ió noô á ZEØ command. - - Iî á sense¬  ZCPR³ itselæ doeó noô realizå thaô ZEØ  ió -running® Neitheò dï thå transienô programó iî general® ZEØ -simplù  interceptó alì calló tï thå BIOÓ Consolå Inpuô  (anä -Inpuô Status© routinå anä provideó aî inpuô characteò iî itó -place®  Therå arå exceptionó tï thió case¬ buô theù wilì bå -discusseä later. - - Botè SU anä ZEØ fiô intï thå ZCPR³ Systeí nicely¬  anä -theù  caî  bå useä tï acô aó Extendeä Commanä Processoró  iæ -desired® Thió ió discusseä later. -:G -Command: GOTO 1.0 - -Syntax: - GOTO label - -;=label any_text - -Function: - - GOTÏ ió á ZCPR³ utility¬ designeä tï bå ruî froí withiî -á  ZEØ commanä file¬  whicè permitó branching®  Iô  acceptó -onlù onå argument¬  á label¬ whicè ió defineä withiî thå ZEØ -filå aó á speciaì commenô oæ thå form: - - ;=label - -Anù  texô whicè followó thå "label¢ phraså ió considereä  tï -be comment and is not processed. - - -Options: - None - -Comments: - - GOTÏ wilì ONLÙ worë correctlù iæ executeä withiî á  ZEØ -command file. GOTO will issue an error message otherwise. - - Withouô thå ZCPR³ Flo÷ Controì facility¬  GOTÏ woulä bå -oæ littlå value® Witè IF¬ however¬ GOTÏ ió extremelù usefuì -in setting up loops and other flow-control constructs. - - Selected Error Messages: - - "ZEØ  Noô  Running¢ meanó thaô GOTÏ waó  executeä  froí -outside a ZEX command file. - - "Labeì  xxø  Noô Founä -- Abortinç ZEX¢ meanó thaô  thå -referenceä labeì waó noô founä withiî thå commanä  file¬  sï -ZEX execution is terminated. - -Examples of Use: - - ZEX Command File 1: - - REG S1 0;note Register 1 = 0 - ;=start - XIF;note Exit all pending IFs - ECHO Hello, World - IF ~1 3;note IF Register 1 <> 3 - GOTO START - FI - - ZEX Command File 2: - - M80 =$1;note Assemble File - ; Strike ^C if Errors Exist - ^? - if ~nul $3;note IF there are 2 libs ... - L80 $1/N,$1,$2/S,$3/S,SYSLIB/S,/U/E;note link all - goto done - fi - if ~nul $2;note IF there is a 2nd arg ... - L8° $1/N,$1,$2/S,SYSLIB/S,/U/E;notå linë liâ $2 - else;note IF there is no 2nd arg ... - L80 $1/N,$1,SYSLIB/S,/U/E;note link - ;=done - fi - - - ZEX Command File 3: - - if NEC=$2 - echo Terminal is NEC - goto done - fi - if TTY=$2 - echo Terminal is TTY - goto done - fi - if DIABLO=$2 - echo Terminal is Diablo - else - echo Terminal is Undefined - fi - ;=done - xif;note Exit all pending IFs - ws $1;note Edit file - -:S -Command: SUB 3.0 - -Syntax: - - SUB or SUB // <-- Print Help Message - SUB /A Text <-- Abort $$$.SUB File - Processing at User's - Discretion - SUB /AB Text <-- Same as /A but Ring Bell - to Alert User - SUB /I <-- Enter Interactive Input - Mode - SUB filename params <-- As in Standard SUBMIT - - -Function: - - SU buildó á commanä filå oî disë (nameä $$$.SUB© whicè -ZCPR³  lookó  foò eacè timå iô ió readù foò á commanä  line® -Iæ  ZCPR³ findó sucè á file¬  iô extractó thå  nexô  commanä -from this file. - - SUB can also be used to sound alarms to the user. - -Options: - - As indicated above: - A - Permit abort - AB - Permit Abort and Ring Bell - I - Interactive Input - - -Comments: - - Thå  "SU  /A¢ anä "SU /AB¢ formó allo÷  thå  useò  tï -gracefullù  aborô á $$$.SU file®  ^à aô thå consolå caî bå -useä tï aborô sucè processinç aó undeò CP/M¬ buô thå /Á forí -allowó thå luxurù oæ startinç á commanä streaí anä  stoppinç -aô  á  criticaì  poinô tï allo÷ thå useò tï takå  hió  time¬ -inspecô  whaô  haó  happened¬  anä theî  decidå  whetheò  tï -proceeä oò not. - - Thå  "SU /I¢ forí eliminateó thå neeä foò thå useò  tï -uså  aî  editoò tï creatå á .SU file®  Iæ thå useò  haó  á -commanä  streaí hå wantó tï executå immediatelù anä  doesn'ô -carå tï dï iô again¬  hå caî uså thió option®  Iî response¬ -SU  allowó  hií  tï enteò hió  commanä  streaí  (sorry¬  nï -parameteò passing© á linå aô á time® Wheî iô ió alì entereä -(useò enteró aî emptù line)¬  thå $$$.SU filå ió builô  anä -executed. - - - Thå finaì form¬  "SU filenamå params"¬ ió identicaì iî -forí  tï  thå  SUBMIÔ  commanä  supplieä  witè  CP/M®   Thå -"filename¢  specifieó  thå  namå  oæ thå  .SU  filå  tï  bå -executed¬   anä  thå  parameteró  arå  associateä  witè  thå -substitutioî variableó oæ $1¬  $2¬ etc® Uð tï 2° parameteró -maù bå specified®  Thå sequencå "$$¢ placeó á "$¢ intï  thå -commanä  line¬  anä  thå characteò sequencå "^c¢ placeó  thå -indicateä controì characteò intï thå commanä linå (uparro÷ à -placeó Control-C). - - Thå SU commanä maù bå nesteä intï á $$$.SU file®  Iæ -á "SU filenamå params¢ commanä ió encountereä iî á  $$$.SU -file¬ SU runs¬ realizeó thaô thió haó happened¬ anä insertó -thå  indicateä  commanä file¬  witè parameteò  substitution¬ -intï  thå runninç commanä streaí aô thå  appropriatå  place® -Thió maù bå nesteä aó manù leveló deeð aó desired. - - - Undeò  ZCPR3¬  iæ  SU  ió executeä witè  thå  Multiplå -Commanä  Linå Facilitù invokeä anä morå commandó follo÷  thå -SU command¬  theî thå resô oæ thå Multiplå Commanä Linå  ió -inserteä aô thå enä oæ thå generateä $$$.SU file. - - Finally¬  SU followó thå ZCPR³ patè wheî searchinç foò -thå indicateä commanä file® Iô ió fullù integrateä intï thå -ZCPR³  Systeí  anä ió ablå tï emploù thå Externaì  Patè  anä -Multiplå Commanä Linå Buffeò featureó oæ ZCPR3. - - - -Selected Error Messages: - - "Param¢ erroò meanó thaô á parameteò waó referenceä anä -nonå waó giveî oî thå commanä line. - - "Linå Toï Long¢ meanó thaô thå inpuô line¬  afteò beinç -expandeä  witè  thå  inpuô parameters¬  waó  morå  thaî  12¶ -characters long. - - Á  morå completå lisô oæ erroò messageó ió giveî  undeò -the indicated section of the main menu. - - -Examples of Use: - - SUB cmdfile p1 p2 p3 - -- thå    filå   'cmdfile.SUB§    ió    processed¬ -substituting 'p1' for $1, 'p2' for $2, and 'p3' for $3 - - SUB /AB - -- durinç  thå executioî oæ á commanä  file¬  thió -commanä  causeó thå belì tï rinç aô thå consolå anä thå useò -is given a chance to abort execution - -:E - - SU provideó á numbeò oæ informativå diagnosticó tï thå -user®  Iî particular¬  wheî processinç á Commanä File¬ wheî -aî  erroò ió encountered¬  thå useò ió informeä oæ thå  linå -numbeò thå erroò occuró at. - - Thå  followinç summarizeó thå erroò messageó  presenteä -bù SUB: - - Disk Full - There is no room to write the $$$.SUB file - - Directory Full - There is no directory space for the $$$.SUB file - - Memory Full - There is not enough memory in which to build the - command stream to be placed into the $$$.SUB file - - SUB Error Messages, Con't - - SUBMIT File Not Found - The .SUB file specified in the command line could - not be found along the ZCPR3 path - - Parameter - Invalid Parameter Specified - - Too Many Parameters - More than 20 parameters were on the command line - - Line too Long - The current line in the command stream exceeds - 128 bytes - - SUBMIT File Empty - The .SUB file specified in the command line was - found to be empty - - SUB Error Messages, Con't - - Control Character - The ^c form was not followed by a letter A-Z - - -:Z - -Command: ZEX 3.0 - -Syntax: - - ZEX // <-- Print Help - - ZEX <-- Enter Interactive Mode - - ZEX filename params <-- Process .ZEX or .SUB - file as with SUBMIT - -Function: - - ZEØ  ió  á  memory-baseä commanä  filå  processor®  Iô -performó functionó likå SU anä XSU combined¬ anä itó inpuô -sourcå ió locateä iî memory¬  sï thaô itó executioî speeä ió -significantly greater. - - -Options: - - Aó indicateä above¬ therå arå nï optionó tï ZEX. - -Comments: - - Thå   Interactivå   Modå  oæ  ZEØ  executeó  likå   thå -Interactivå  Modå  oæ SUB®  Thå useò enteró  commanä  lineó -untiì  hå  ió satisfieä anä theî terminateó thå  procesó  bù -enterinç  aî emptù linå (simplù hittinç RETURN)®  ZEØ  theî -executeó thå commandó iî thå sequencå entered® Nï parameteò -passinç ió permitteä iî thió modå oæ operation. - - Thå   "ZEØ   filenamå   params¢  forí   ió   likå   thå -correspondinç  SU form®  ZEØ wilì searcè alonç  thå  ZCPR³ -Externaì Patè foò á commanä filå oæ thå forí filename.ZEØ oò -filename.SUB® Iæ á directorù ió entereä whicè containó botè -sucè files¬ thå filå oæ typå ZEØ wilì bå executed. - - - Oncå  ZEØ haó beguî execution¬  iô placeó á ZEØ Monitoò -jusô  undeò  ZCPR³ anä buildó thå commanä streaí  undeò  thå -monitor® Oncå complete¬ thå addresó oæ thå BDOÓ ió adjusteä -sï  thaô thå ZEØ monitoò anä itó commanä streaí wilì noô  bå -overwritteî  bù transienô programs¬  anä  executioî  begins® -Eacè  timå  thå BIOÓ Consolå Inpuô routinå  ió  called¬  ZEØ -supplieó thå inpuô character. - - Aó witè SUB¬ á ^à froí thå consolå wilì aborô executioî -oæ á ZEØ commanä stream®  Also¬  aó witè SUB¬  iæ á commanä -followó  ZEØ  iî á Multiplå Commanä Line¬  ZEØ appendó  thió -commanä tï thå commanä stream. - - - Unlikå  SUB¬  ZEØ  doeó noô permiô nestinç  oæ  commanä -files®   ZEØ  wilì  simplù  aborô  iæ  á  ZEØ  commanä   ió -encountereä iî thå commanä streaí iô ió processing. - - Unlikå  SUB¬  ZEØ supportó manù morå embeddeä commands® -Combininç thå facilitieó oæ SU anä XSU iî thió  case¬  thå -embeddeä  commandó oæ ZEØ reflecô thå XSUB-likå capabilitieó -oæ ZEØ aó welì aó somå ne÷ ideas. - - Theså   extendeä  controì  commandó  arå  discusseä  iî -anotheò informatioî section. - - -Selected Error Messages: - - None discussed - - -Examples of Use: - - ZEX - -- the user now enters a group of commands - - ZEX mycmds p1 p2 - -- processinç oæ thå filå 'mycmds.ZEX'¬ or¬ iæ noô -found¬ 'mycmds.SUB§ ió performed» 'p1§ ió substituteä foò $± -and 'p2' for $2 - -:D - - ZEX Directives - Control Commands - - The following summarizes the ZEX Control Commands: - - Cmd Meaning Cmd Meaning - | insert ^| insert - ^º reruî commanä streaí ^® togglå prinô suppress - ^# toggle ZEX messages ^$ define default params - ^? wait for user input ^/ ring bell and ^? - ^* ring bell ^" accept user input - ^< display chars only ^> stop display - ;; ZEX comment $n 1<=n<=9 for param - $$ $ $^ ^ - $| | ^c control char - - - Thió  summarù  ió alsï displayeä viá thå  built-iî  ZEØ -help. - - Thå  followinç commandó simplù inserô  characteró  intï -thå  ZEØ  commanä  streaí anä wilì noô bå discusseä  iî  anù -greateò detail. - - | inserts a ^| inserts a pair - $$ inserts a single $ $^ inserts a single ^ - $| inserts a single | ^c inserts a control character - - Thå ^ª commanä simplù causeó ZEØ tï rinç thå bell®  Iô -doeó noô inserô á BELÌ characteò intï thå commanä filå  likå -á ^Ç sequencå would® Iô simplù ringó thå belì anä continueó -processing. - - Thå ;» commanä ió á ZEØ comment® Iô anä alì characteró -followinç  iô uð tï anä includinç thå followinç ¢ characteò witè thå mosô significanô -biô  set®  Thió ió uniquå anä appearó onlù wheî thå  prompô -comeó uð oî mù system. - - Thå   followinç   exampleó   illustratå    applicationó -employinç them®  Commentó appeaò ouô tï thå side¬  prefixeä -bù <--. - - -B1>zex -ZEX, Version 1.3 -1: ^$ this is fun <-- Define 3 params -2: echo $1 $2 $3 -3: ^$ hello from happy acres <-- Define 4 params -4: echo $1 $2 $3 $4 -5: -(ZEX Active) <-- ZEX is running now -B1>echo this is fun - -THIS IS FUN -B1>echo hello from happy acres - -HELLO FROM HAPPY ACRES -B1> -(ZEX Completed) -By Your Command > - - -B1>ed demo.zex <-- Demo Command File - -NEW FILE - : *i - 1: ed demo.txt <-- Edit DEMO.TXT - 2: i <-- Insert text while in ED - 3: This is a test - 4: This is only a test - 5: This is a demo of ZEX Control - 6: ^Z <-- ^Z is 2 chars, xlated into - 7: b0lt <-- Ctrl-Z by ZEX - 8: 1l - 9: 0lt - 10: i <-- Input More Text - 11: ^" <-- Allow user to input text - 12: type demo.txt <-- When ZEX continues, this - 13: era demo.txt <-- is what it does next - 14: - : *e - -B1>zex demo <-- Run the command file -ZEX, Version 1.3 -(ZEX Active) -B1>ed demo.txt - -NEW FILE - : *i <-- ZEX is typing this in - 1: This is a test - 2: This is only a test - 3: This is a demo of ZEX Control - 4: - : *b0lt - 1: This is a test - 1: *1l - 2: *0lt - 2: This is only a test - 2: *i <-- Now user input begins - 2º É aí no÷ typinç thió linå oæ mù owî volitioî <-- User - 3: ZEX will allow me to continue doing this until - 4: it sees the ZCPR3 prompt - 5: <-- User types Ctrl-Z - 5: *e <-- User types "e" - -(ZEX Active) -B1>type demo.txt <-- ZEX resumes -This is a test -I am now typing this line of my own volition -ZEX will allow me to continue doing this until -it sees the ZCPR3 prompt -This is only a test -This is a demo of ZEX Control - -B1>era demo.txt -DEMO .TXT -B1> -(ZEX Completed) -By Your Command > - -B1>ed demo.mac <-- Now to use ZEX for - <-- program assembly -NEW FILE - : *i <-- User types program - 1: ext print - 2: - 3: call print - 4: db 'Hello, World ... It''s Another Day',0 - 5: ret - 6: - 7: end - 8: - : *e - - -B1>type a:m80.zex <-- M80.ZEX command file -; M80.SUB -- MACRO-80 Assembler and Linker -M80 =$1 -; Please Type $^C if Error(s) Exist - ^? -ERA $1.BAK -ERA $1.COM -L80 /P:100,$1,A:SYSLIB/S,$1/N,/U,/E -ERA $1.REL -; Assembly Complete - -B1>zex m80 demo <-- Run command file on pgm -ZEX, Version 1.3 -(ZEX Active) -B1>; M80.SUB -- MACRO-80 Assembler and Linker -B1>M80 =DEMO - -No Fatal errr(s) - -(ZEX Active) - -B1>; Please Type ^C if Error(s) Exist - <-- User can abort now - <-- if he wishes -B1>ERA DEMO.BAK -DEMO .BAK -B1>ERA DEMO.COM -No File -B1>L80 /P:100,DEMO,A:SYSLIB/S,DEMO/N,/U,/E - -Link-80 3.44 09-Dec-81 Copyright (c) 1981 Microsoft -Data 0100 01C5 < 197> - -35936 Bytes Free - -Data 0100 01C5 < 197> - -35936 Bytes Free -[0000 01C5 1] - -(ZEX Active) - -B1>ERA DEMO.REL -DEMO .REL -B1>; Assembly Complete -B1> -(ZEX Completed) -By Your Command>demo <-- Run pgm now -Hello, World ... It's Another Day -B1> - -:1 - - Thå followinç restrictionó arå applieä tï commanä fileó -processeä bù SU anä ZEX. - - SUB Restrictions - - 1®  Yoõ maù noô loç intï useò areaó otheò thaî thå onå -yoõ begaî processinç thå commanä filå in®  Iæ yoõ do¬ ZCPR³ -looseó  tracë oæ thå $$$.SU filå anä executioî  ió  aborteä -untiì  yoõ  reenteò thå originaì useò area¬  aô  whicè  timå -executioî resumes. - - 2®  Uð  tï  2°  parameteró arå permitteä  oî  thå  SU -commanä line. - - 3® Yoõ maù nesô SU commanä fileó tï anù depth. - - - - ZEX Restrictions - - 1®  Yoõ maù movå intï anù directorù yoõ desirå whilå á -ZEØ commanä streaí ió beinç executed. - - 2® Uð tï ¹ parameteró arå permitteä oî thå ZEØ commanä -line. - - 3® Yoõ maù NOÔ nesô ZEØ commanä files. - - -:2 - - Botè  SU anä ZEØ makå nicå Extendeä Commanä Processoró -undeò  ZCPR3®  Botè  uså  thå Externaì  Patè  anä  Multiplå -Commanä Linå Buffeò Facilitieó oæ ZCPR3¬  anä ZEØ ió furtheò -prompteä foò inpuô bù thå ZCPR³ prompô iæ desired. - - Tï refresè thå reader¬  anä Extendeä Commanä  Processoò -ió  á  prograí  invokeä bù ZCPR³ wheî iô failó tï  finä  thå -commanä alonç itó path® ZCPR3¬ upoî failinç tï finä thå COÍ -filå whicè correspondó tï thå commanä namå giveî tï it¬  caî -bå  seô uð tï eitheò searcè thå patè oò gï directlù  tï  thå -rooô oæ thå patè anä looë foò aî Extendeä Commanä Processor® -Iæ found¬ ZCPR³ simulateó á commanä tï thaô Extendeä Commanä -Processor¬  substitutinç  thå  user'ó  commanä linå  aó  thå -argumentó tï it. - - To illustrate, consider the following example: - - - MASM.ZEØ performó thå samå seô oæ commandó thaô M80.ZEØ -filå diä above¬ namely: - -; MASM.ZEX -- MACRO-80 Assembler and Linker -M80 =$1 -; Please Type $^C if Error(s) Exist - ^? -ERA $1.BAK -ERA $1.COM -L80 /P:100,$1,A:SYSLIB/S,$1/N,/U,/E -ERA $1.REL -; Assembly Complete - - Thå  commanä  "MASÍ DEMO¢ ió issued®  Witè ZEØ aó  thå -Extendeä Commanä Processor¬  ZCPR³ lookó alonç thå patè  foò -thå commanä MASM¬  failó tï finä it¬  anä theî simulateó thå -commanä  "ZEØ  MASÍ DEMO"®  Thå abovå commanä filå ió  theî -executeä witè DEMÏ aó itó passeä parameter. - - - ZEX¬  oò  anù  otheò program¬  caî bå installeä  aó  aî -Extendeä Commanä Processoò bù renaminç iô tï CMDRUN.COM. - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/CMDRUN.COM b/Source/Images/d_bp/u15/CMDRUN.COM deleted file mode 100644 index d882afb1..00000000 Binary files a/Source/Images/d_bp/u15/CMDRUN.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/CMDRUN.MAC b/Source/Images/d_bp/u15/CMDRUN.MAC deleted file mode 100644 index ae4eb21b..00000000 --- a/Source/Images/d_bp/u15/CMDRUN.MAC +++ /dev/null @@ -1,51 +0,0 @@ -; -; Program: CMDRUN -; Author: Richard Conn -; Version: N/A -; Date: 11 June 84 -; -TBUFF EQU 80H -z3env equ 0f400h - - ext z3init - ext print,pstr - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - CALL PRINT - DB 'Command Line: ',0 - LXI H,TBUFF+1 ;PT TO COMMAND LINE - JMP PSTR - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/COMMENT.COM b/Source/Images/d_bp/u15/COMMENT.COM deleted file mode 100644 index dfd54701..00000000 Binary files a/Source/Images/d_bp/u15/COMMENT.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/COMMENT.MAC b/Source/Images/d_bp/u15/COMMENT.MAC deleted file mode 100644 index 59f8edb7..00000000 --- a/Source/Images/d_bp/u15/COMMENT.MAC +++ /dev/null @@ -1,196 +0,0 @@ -; PROGRAM: COMMENT -; AUTHOR: Richard Conn -; VERSION: 2.0 -; DATE: 18 MAY 84 -; PREVIOUS VERSIONS: 1.0 (18 APR 83) - -vers equ 20 -z3env set 0f400h - -; -; COMMENT echoes lines, with simple character editing, to the user's -; console. This program is designed to facilitate communication between -; two users who see the same console via redirectable I/O. They can chat -; freely to each other by using this program. -; - -llen equ 65 ;number of chars allowed before auto newline - -fcb equ 5ch ;FCB - -ctrlc equ 'C'-'@' ;Abort Character -esc equ 1bh ;Escape (Abort Character) -cr equ 0dh ;New Line -lf equ 0ah ;Line Feed -bs equ 8 ;Back Space -del equ 7fh ;Delete Char -ctrlp equ 'P'-'@' ;^P -ctrlu equ 'U'-'@' ;^U -ctrlx equ 'X'-'@' ;^X - -; -; Externals -; - ext z3init - ext cin,cout,crlf,eprint,lout,lcrlf - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - call eprint - db 'COMMENT, Version ' - db (vers/10)+'0','.',(vers mod 10)+'0',0 - lda fcb+1 ;check for help request - cpi '/' ;help? - jnz cmt -; -; Help for COMMENT -; - call eprint - db cr,lf,' COMMENT' - db cr,lf,'Internal Commands:' - db cr,lf,' ^C or ESC - Abort' - db cr,lf,' ^P - Toggle Print' - db cr,lf,' BS or DEL - Delete Prev Char' - db cr,lf,' ^U or ^X - Delete Line' - db 0 - ret -; -; Beginning of Comment Routine -; -cmt: - call eprint - db cr,lf,'Strike ^C or ESC to Abort, ^P to Toggle Print' - db cr,lf,0 - xra a ;clear print flag - sta prflag - call comment ;print first prompt and set char count -; -; Main Character Input Loop -; -loop: - call cin ;input char - ani 7fh ;mask MSB - cpi ctrlc - rz - cpi esc - rz - cpi ctrlp ;toggle print flag - jz prtog - cpi cr ;new line? - jz newline - cpi bs ;back up? - jz back - cpi del ;back up? - jz back - cpi ctrlu ;erase line? - jz eraln - cpi ctrlx ;erase line? - jz eraln - call cout - cpi ' ' ;printable char? - jc loop - mov b,a ;save char in B - lda prflag ;print? - ora a ;0=no - mov a,b ;get char to print - cnz lout ;print char if PRFLAG is NZ - inr c ;increment char count - mvi a,llen ;check for nearing end of line - cmp c - cz comment - jmp loop -; -; Toggle print flag -; -prtog: - lda prflag ;flip flag - cma - sta prflag - ora a ;new line to printer if print flag now off - cz lcrlf - jmp loop -; -; Routine to begin a new line -; -newline: - call comment ;new line, print prompt, set char count to zero - jmp loop -; -; Back up one character -; -back: - mov a,c ;check for no chars - ora a - jz loop - call back1 ;backup routine - jmp loop ;continue -; -; General Routine for backing up -; -back1: - dcr c ;count down - mvi a,bs ;backspace - call cout - mvi a,' ' ;space - call cout - mvi a,bs ;backspace - jmp cout -; -; Erase Current Line -; -eraln: - mov a,c ;done? - ora a - jz loop - call back1 ;backup - jmp eraln -; -; Print User Prompt -; -comment: - call eprint - db cr,lf,'Comment> ',0 - lda prflag ;new line to printer if print flag on - ora a - cnz lcrlf - mvi c,0 ;set char count - ret - -; -; Buffers -; -prflag: - ds 1 ;print flag (0=off, 0FFH=on) - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/COMPARE.HLP b/Source/Images/d_bp/u15/COMPARE.HLP deleted file mode 100644 index dbc61716..00000000 --- a/Source/Images/d_bp/u15/COMPARE.HLP +++ /dev/null @@ -1,149 +0,0 @@ -; - - - - ZCPR3 File Comparison Utilities - - C - CRC - - D - DIFF - -:D - -Command: DIFF 2.0 - -Syntax: - - DIFF dir:ufn o... -or - DIFF dir:ufn1,dir:ufn2 o... - -Function: - - DIFÆ  ió useä tï comparå twï files®  Iô caî bå madå tï -simplù  statå  iæ  thå twï  fileó  arå  differenô  (stoppinç -immediatelù afteò thå firsô differencå ió located© oò iô caî -lisô alì oæ thå differenceó betweeî twï fileó oî á byte-for- -bytå basis. - - - The form: DIFF dir:ufn o... - -compareó  thå filå iî thå indicateä directorù witè thå  filå -bù thå samå namå iî thå currenô directory. - - The form: DIFF dir:ufn1,dir:ufn2 o... - -compares the two files indicated. - -Options: - - C - Compare Files Only and Stop at First Difference - M - Multiple Runs - When a comparison is complete, prompt the user - for new disks, allow him to change disks, and then - run the comparison again until the user says to stop - - -Comments: - - Iæ  useä  tï prinô ouô differences¬  DIFÆ presentó  thå -following information to the user: - - o Relative Offset from the beginning of the file - - o Byte values in the two files: - - - in Decimal - - in Hexadecimal - - in ASCII - -Selected Error Messages: - - "AFΠ Noô  Allowed¢ meanó thaô thå  useò  specifieä  aî -ambiguouó filå namå (onå containinç wilä cards)®  Botè filå -names must be unambiguous. - - -Examples of Use: - - DIFF text:myfile.txt - - prints differences between MYFILE.TXT in TEXT: - and MYFILE.TXT in current directory - - DIFF myfile.txt - - compares MYFILE.TXT against itself - - DIFF backup:myfile.txt mc - - compares MYFILE.TXT in BACKUP: with MYFILE.TXT - in the current directory; stops as soon as - a difference is found; when done, prompts - the user to change disks (BACKUP could be a - floppy, and this command is checking to see - thaô alì copieó oæ MYFILE.TXÔ oî several - disks are the same - -:C -Command: CRC 2.0 - -Syntax: - - CRC dir:afn1,dir:afn2,... o... - -Function: - - Thå  CRà Checë Utilitù distributeä witè ZCPR³  computeó -CRà valueó  foò  á lisô oæ files®  Iô useó  thå  samå  CRà -computatioî algorithí employeä bù Keitè Peterseî iî hió CRCË -program¬ anä thå valueó comå ouô thå same. - - Thå  CRà Checë  Utilitù computeó thå CRà valueó  oæ  á -selecteä seô oæ fileó anä printó ouô thå filå  names¬  theiò -sizeó (iî termó oæ Ë byteó anä numbeò oæ records)¬ anä theiò -CRà valueó iî hexadecimal®  Á counô oæ thå numbeò oæ lineó -oæ codå (assuminç texô files© anä á commenô associateä  witè -eacè  filå caî bå optionallù included®  Á lisô oæ ambiguouó -fileó nameó maù bå provideä tï CRC. - -Options: - - C - Comment Output; add comments to output listing - on disk or printer - D - Disk Output; send output to the disk file CRC.CRC - I - Inspect Files and Approve Each File to be reported - on before output is produced - L - Count Lines of Text and include in output (assume - all files are text files) - P - Printer Output; send output to the printer - - -Comments: - - CRà ió usefuì iî transferrinç fileó froí onå  sitå  tï -another®  Thå  CRà valueó oæ thå fileó caî bå computeä  anä -listeä aô onå site¬  transferred¬  anä compareä aô thå otheò -site. - - Thå  Ì optioî addó thå utilitù oæ trackinç codå sizå iî -terms of lines of code. - -Selected Error Messages: - - Self-Explanatory - - -Examples of Use: - - CRC *.MAC L - -- Compute CRCs of all *.MAC files in the current - directory; include lines-of-code count in - display - - - CRC *.* DLC - -- Compute CRCs of all files, include count of - lines of text and comments on each file, - and write output to disk in file named - CRC.CRC - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/CPSEL.COM b/Source/Images/d_bp/u15/CPSEL.COM deleted file mode 100644 index 1fbdeb46..00000000 Binary files a/Source/Images/d_bp/u15/CPSEL.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/CPSEL.MAC b/Source/Images/d_bp/u15/CPSEL.MAC deleted file mode 100644 index 322ecd4f..00000000 --- a/Source/Images/d_bp/u15/CPSEL.MAC +++ /dev/null @@ -1,365 +0,0 @@ -; -; PROGRAM: CPSEL -; VERSION: 1.0 -; DATE: 18 May 84 -; AUTHOR: Richard Conn -; PREVIOUS VERSIONS: None -; -version equ 10 -z3env SET 0f400h - -; -; CPSEL (CRT/Printer Select) is a utility which permits the user -; to dynamically select the CRT (of CRT 0 and CRT 1) and Printer (of -; Printers 0, 1, 2, and 3) from the current ZCPR3 Environment Descriptor. -; This dynamically changes the characteristics of the printer which is -; used by PRINT and the other utilities which read these buffers for their -; configuration data. -; - -; -; Operating System Buffers -; -fcb equ 5ch -tbuff equ 80h -cr equ 0dh -lf equ 0ah -tab equ 'I'-'@' - -; -; Special Equates -; -csel equ 2FH ;offset to CRT select byte -psel equ csel+1 ;offset to Printer select byte -cdata equ psel+1 ;offset to first CRT data record -cdsize equ 3 ;size of CRT data record -pdata equ cdata+2*cdsize ;offset to Printer data record -pdsize equ 4 ;size of Printer data record - -; -; SYSLIB and Z3LIB References -; - ext z3init,envptr - ext epstr,eprint,cout - ext padc - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - - call eprint - db 'CPSEL Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db 0 - - lxi h,tbuff+1 ;pt to buffer - lda fcb+1 ;check for help - cpi ' ' - jz help - cpi '/' - jnz start1 - -; -; Print help message -; -help: - call eprint - db cr,lf,' CPSEL cmd1 cmd2 cmd3,...' - db cr,lf,'Commands:' - db cr,lf,' Cc, c=0 or 1 -- Select CRT 0 or 1' - db cr,lf,' Pp, p=0,1,2,3 -- Select Printer 0, 1, 2, or 3' - db cr,lf,' Dd, d=A (All), C (CRT), P (Printer)' - db cr,lf,' -- Display Selection Values' - db 0 - - ret - -; -; Process Options -; -start1: - mov a,m ;get next char - ora a ;done? - rz - inx h ;pt to option - cpi ',' ;delimiter? - jz start1 - cpi ' ' ;delimiter? - jz start1 - cpi tab ;delimiter? - jz start1 - cpi '/' ;delimiter? - jz start1 - call cmdchk ;check for commands and run them - jmp start1 - -; -; Test and Run Commands -; -cmdchk: - mov b,a ;save command in B - lxi d,ctab ;pt to command table -cmd1: - ldax d ;get char - ora a ;end of table? - jz cmde ;print error message - cmp b ;match? - jz cmd2 ;process - inx d ;skip to next - inx d - inx d - jmp cmd1 -cmd2: - xchg ;get address - inx h - mov c,m ;get low - inx h - mov b,m ;get high - xchg ;restore hl - push b ;place address on stack - ret ;"run" command -; -; Command Not Found -; -cmde: - call eprint - db cr,lf,' Command Not Found: ',0 - mov a,b ;get char - jmp cout -; -; Command Table -; -ctab: - db 'C' ;select CRT - dw cselc - db 'D' ;display - dw disp - db 'P' ;select Printer - dw pselc - db 0 ;end of table -; -; Select CRT -; -cselc: - lxi d,csmsg ;CRT selection - mov a,m ;get digit - ora a ;error if null - jz error - inx h ;pt to next - sui '0' ;convert to binary - jc error - cpi 2 ;range check - jnc error - lxi d,csel ;offset for CRT select -; -; Select Device whose value is in A and Offset in DE -; -select: - push h ;save HL - lhld envptr ;pt to environment - dad d ;pt to buffer - mov m,a ;store value - pop h ;restore HL - ret -; -; Print Error Message -; -error: - call eprint - db cr,lf,' Range Error on ',0 - xchg ;HL pts to message - call epstr ;print message - xchg - ret - -; -; Select Printer -; -pselc: - lxi d,psmsg ;Printer selection - mov a,m ;get digit - ora a ;error if null - jz error - inx h ;pt to next - sui '0' ;convert to binary - jc error - cpi 4 ;range check - jnc error - lxi d,psel ;offset for Printer select - jmp select ;select device -; -; Display -; -disp: - mov a,m ;get option - ora a ;end of command? - jz dispall ;display all - inx h ;pt to next - cpi 'A' ;all? - jz dispall - cpi 'C' ;CRT? - jz dispcrt - cpi 'P' ;Printer? - jz dispprt - lxi d,dsmsg ;display select message - jmp error -; -; Display All -; -dispall: - call dispcrt ;display CRT and fall thru to display Printer -; -; Display Printer -; -dispprt: - call eprint - db cr,lf,' Current Printer Selection: ',0 - push h ;save HL - lhld envptr - lxi d,psel ;offset - dad d - mov a,m ;get selection - mov c,a ;selection in C - adi '0' ;convert to ASCII - call cout - mvi b,0 ;set up loop - lxi d,pdata ;offset to printer data - lhld envptr ;pt to environment - dad d ;pt to printer data -dploop: - call eprint - db cr,lf,' ',0 - mvi e,' ' ;leading space for not current printer - mov a,c ;see if at current printer - cmp b - jnz dpl1 - mvi e,'*' ;mark current printer -dpl1: - mov a,e - call cout - call eprint - db ' Prt ',0 - call comprt ;print common data elements - call eprint - db ' Form Feed? ',0 - mov a,m ;print form feed message - ora a - jz prno - call eprint - db 'Yes',0 - jmp pryes -prno: - call eprint - db 'No',0 -pryes: - inx h ;pt to next - inr b ;increment - mov a,b ;done? - cpi 4 ;limit - jnz dploop - pop h ;restore ptr - ret - -; -; Common Data Elements to Both Printer and CRT -; -comprt: - mov a,b ;get printer number - adi '0' ;to ASCII - call cout - call eprint - db ': Width = ',0 - mov a,m ;print line width - call padc - inx h - call eprint - db ' Actual/Text Lines = ',0 - mov a,m ;print number of actual lines - call padc - inx h - mvi a,'/' - call cout - mov a,m ;print number of text lines - inx h ;pt to next - jmp padc - -; -; Display CRT -; -dispcrt: - call eprint - db cr,lf,' Current CRT Selection: ',0 - push h ;save HL - lhld envptr - lxi d,csel ;offset - dad d - mov a,m ;get selection - mov c,a ;save in C - adi '0' ;convert to ASCII - call cout - mvi b,0 ;set up loop - lxi d,cdata ;offset to CRT data - lhld envptr ;pt to environment - dad d ;pt to printer data -dcloop: - call eprint - db cr,lf,' ',0 - mvi e,' ' ;leading space for not current printer - mov a,c ;see if at current printer - cmp b - jnz dpc1 - mvi e,'*' ;mark current printer -dpc1: - mov a,e - call cout - call eprint - db ' CRT ',0 - call comprt ;print common data elements - inr b ;increment - mov a,b ;done? - cpi 2 ;limit - jnz dcloop - pop h ;restore ptr to next command line element - ret - -; -; Error Messages -; -csmsg: - db 'CRT Selection',0 -dsmsg: - db 'Display Option',0 -psmsg: - db 'Prt Selection',0 - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/CRC.COM b/Source/Images/d_bp/u15/CRC.COM deleted file mode 100644 index 0b4c0f41..00000000 Binary files a/Source/Images/d_bp/u15/CRC.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/CRC.MAC b/Source/Images/d_bp/u15/CRC.MAC deleted file mode 100644 index 05c74649..00000000 --- a/Source/Images/d_bp/u15/CRC.MAC +++ /dev/null @@ -1,915 +0,0 @@ -; -; PROGRAM: CRC -; VERSION: 2.0 -; DATE: 16 Jan 83 -; AUTHOR: RICHARD CONN -; PREVIOUS VERSIONS: 1.2 (6 Jan 83), 1.1 (1 Jan 83), 1.0 (12 Dec 82) -; -VERS equ 20 -z3env SET 0f400h - -; -; CRC Command -- -; CRC is used to compute the CRC of one or more files. CRC -; permits ambiguous file names and supports an Inspect mode that -; allows the user to confirm each file before the computation is done. -; Additionally, there is a Disk Output Mode which allows the user to send -; the output from the operation to disk as well as to his screen with optional -; comments. -; -; The CRC command may be of the following forms: -; CRC dir:afn,dir:afn1,... o -; CRCs are computed for the indicated sets of files in the indicated -; directories. -; -; The option characters (o) are none or more of the following: -; C -- Comment Output; add comments if output is to disk -; D -- Disk Output; send output to disk file CRC.CRC -; I -- Inspect and approve each rename -; P -- Printer Output -; -; Examples: -; CRC A1:MYFILE.*,B2:HELLO.TXT <-- Compute CRCs of files -; CRC *.* DC <-- CRCs of all files in -; current user/disk with -; disk output and comments -; CRC *.* DCI <-- As above, but inspect and -; approve files first -; - -FALSE EQU 0 -TRUE EQU NOT FALSE - -ESIZE EQU 16 ; SIZE OF DIR ENTRY (FROM SYSLIB DIRF ROUTINE) - - EXT DIRQS ; DIRECTORY PROCESSOR - EXT DPARAMS ; DISK PARAMETERS - EXT DIRPACK ; DIR PACK ROUTINE - EXT FSIZE ; COMPUTE FILE SIZE - - EXT Z3INIT ; INIT BUFFERS - EXT ZFNAME ; FILE NAME PROCESSOR - EXT Z3LOG ; LOG INTO Z3 DU - - EXT FO0$OPEN ; OPEN FILE FOR BYTE-ORIENTED OUTPUT - EXT FO0$CLOSE ; CLOSE FILE - EXT F0$PUT ; WRITE BYTE TO FILE - - EXT F$MAKE ; CREATE FILE - EXT F$OPEN ; OPEN FILE - EXT F$READ ; READ BLOCK FROM FILE - EXT F$CLOSE ; CLOSE FILE - EXT F$DELETE ; DELETE FILE - - EXT CONDIN ; CONDITIONAL INPUT - - EXT MA2HC ; MEMORY STORE OF A AS 2 HEX CHARS - EXT MHLDC ; MEMORY STORE OF HL AS UP TO 5 DEC CHARS W/LEADING SP - - EXT BBLINE ; INPUT LINE EDITOR - EXT INITFCB ; INIT FCB - EXT BDOS ; BDOS ENTRY - EXT RETUD ; RETURN CURRENT USER/DISK - EXT PUTUD ; SAVE CURRENT USER/DISK - EXT GETUD ; RESTORE CURRENT USER/DISK - EXT LOGUD ; LOG INTO USER/DISK - EXT MOVEB ; COPY ROUTINE - EXT EPRINT ; PRINT STRING PTED TO BY RET ADR - EXT LOUT ; LST: OUTPUT ROUTINE - EXT COUT ; CONSOLE OUTPUT ROUTINE - EXT CIN ; CONSOLE INPUT ROUTINE - EXT CAPS ; CAPITALIZE ROUTINE - EXT CRLF ; NEW LINE ROUTINE - EXT CODEND ; CODE END COMPUTATION ROUTINE - -; -; CP/M EQUATES -; -CPM EQU 0 ; WARM BOOT -FCB EQU 5CH ; FCB -FCB2 EQU 6CH ; FCB 2 -TBUFF EQU 80H ; INPUT LINE BUFFER -CR EQU 13 ; -LF EQU 10 ; -CTRLC EQU 3 ; ^C - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -; -; DISK OUTPUT FCB -; -DSKFCB: - DB 0 - DB 'CRC ' ; FILE NAME - DB 'CRC' ; FILE TYPE - DS 4 - DS 16 - DS 4 ; 36 BYTES - -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -; -; DISK OUTPUT FCB -; -DSKFCB: - DB 0 - DB 'CRC ' ; FILE NAME - DB 'CRC' ; FILE TYPE - DS 4 - DS 16 - DS 4 ; 36 BYTES - -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env -; - LXI H,0 ; GET STACK PTR - DAD SP - SHLD STACK ; SAVE IT -; -; Compute Buffer Locations -; - CALL CODEND ; DETERMINE FREE SPACE - SHLD CMDLNE ; SET PTR TO COMMAND LINE - LXI D,100H ; BUFFER SIZE - DAD D ; COMMAND LINE - SHLD CRCFCB ; FCB FOR CRCS - DAD D - SHLD CMTLNE ; BUFFER FOR COMMENT LINE - DAD D - SHLD DIRBUF ; SET PTR TO DIRECTORY BUFFER - SPHL ; SET STACK PTR -; -; Save Location -; - CALL PUTUD ; SAVE CURRENT USER/DISK AWAY -; -; Print Banner -; - CALL EPRINT - DB 'CRC Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0',0 - LDA FCB+1 ; GET FIRST CHAR OF FILE NAME - CPI ' ' ; NO FILE SPEC? - JZ HELP - CPI '/' ; OPTION CAUGHT? - JNZ ECONT - -; PRINT HELP INFORMATION -HELP: - CALL EPRINT - DB CR,LF,' CRC dir:afn1,dir:afn2,... o...' - DB CR,LF,'Options:' - DB CR,LF,' C -- Comment Mode (Allow user to comment each entry ' - DB 'on disk)' - DB CR,LF,' D -- Disk Output (Send Output to Disk in file CRC.CRC)' - DB CR,LF,' I -- Inspect Mode (Give user approval option)' - DB CR,LF,' L -- Count Lines of Code' - DB CR,LF,' P -- Printer Output' - DB 0 - -; RETURN TO OS -RETURN: - CALL GETUD ; RESET DIR - LHLD STACK ; GET OLD STACK - SPHL ; SET IT - RET - -; -; SKIP UNTIL NON-BLANK -; -SBLANK: - MOV A,M ; LOOK FOR BLANK - INX H ; PT TO NEXT - CPI ' ' ; BLANK? - JZ SBLANK - DCX H ; BACK UP - RET - -; -; SKIP UNTIL BLANK OR EOL -; -SNBLANK: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CPI ' ' ; BLANK? - JZ SNB1 - ORA A ; EOL? - JNZ SNBLANK -SNB1: - DCX H ; BACK UP - RET - -; -; COPY BUFFER INTO TEMP BUFFER -; -ECONT: - LHLD CMDLNE ; PT TO COMMAND LINE - XCHG ; ... IN DE - LXI H,TBUFF+1 ; PT TO BUFFER - MVI B,80H ; BUFFER SIZE (MAX) - CALL MOVEB ; COPY INTO COMMAND LINE BUFFER - -; EXTRACT FLAGS IF PRESENT - XRA A ; A=0 - STA LOC ; SET NO LINES OF CODE COUNT - STA INSPECT ; SET NO INSPECT - STA COMMENT ; SET NO COMMENT MODE - STA PRTOUT ; SET NO PRINTER OUTPUT - STA DSKOUT ; SET NO DISK OUTPUT - LXI H,0 ; SET FILE COUNT - SHLD FILECNT - LHLD CMDLNE ; PT TO BUFFER -; -; SKIP TO FILE NAME STRING -; - CALL SBLANK ; SKIP OVER BLANKS -; -; SKIP TO END OF FILE NAME STRING -; - CALL SNBLANK ; SKIP OVER NON-BLANKS -; -; SKIP TO FIRST OPTION CHAR -; - CALL SBLANK ; SKIP OVER BLANKS - -; -; CHECK FOR LEADING SLASH ON OPTION AND SKIP IT IF SO -; -OPT: - CPI '/' ; OPTION CHAR? - JNZ OPTION - INX H ; SKIP SLASH -; PROCESS LIST OF OPTIONS -OPTION: - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ DSPEC - INX H ; PT TO NEXT CHAR - CPI ' ' ; SKIP OVER SPACES - JZ OPTION - CPI '/' ; IF OPTION LETTER, OBVIOUS ERROR, SO HELP - JZ HELP - CPI 'P' ; PRINTER OUTPUT? - JZ OPTPRT - CPI 'L' ; LINES OF CODE? - JZ OPTLOC - CPI 'C' ; COMMENT? - JZ OPTCMT - CPI 'I' ; INSPECT? - JZ OPTINS - CPI 'D' ; DISK OUTPUT? - JNZ HELP - -; SET DISK OUTPUT OPTION - MVI A,0FFH ; DISK OUTPUT - STA DSKOUT - JMP OPTION - -; SET PRINTER OUTPUT OPTION -OPTPRT: - MVI A,0FFH ; PRINTER OUTPUT - STA PRTOUT - JMP OPTION - -; SET LINES OF CODE OPTION -OPTLOC: - MVI A,0FFH ; LINES OF CODE COUNTER - STA LOC - JMP OPTION - -; SET COMMENT OPTION -OPTCMT: - MVI A,0FFH ; COMMENT MODE - STA COMMENT - JMP OPTION - -; SET INSPECT OPTION -OPTINS: - MVI A,0FFH ; INSPECT - STA INSPECT - JMP OPTION - -; -; EXTRACT DISK, USER, AND FILE NAME INFORMATION -; -DSPEC: - LDA DSKOUT ; DISK OUTPUT? - ORA A ; Z=NO - JZ DSPEC0 - LXI D,DSKFCB ; OUTPUT FCB - CALL INITFCB ; CLEAR FCB - CALL F$DELETE ; DELETE FILE - CALL INITFCB ; CLEAR FCB - CALL F$MAKE ; CREATE FILE - CALL FO0$OPEN ; OPEN FILE -DSPEC0: - LHLD CMDLNE ; PT TO FIRST BYTE - CALL SBLANK ; SKIP TO NON-BLANK -; -; MAJOR REENTRY POINT WHEN FILE SPECS ARE SEPARATED BY COMMAS -; HL PTS TO FIRST BYTE OF NEXT FILE SPEC -; -DSPEC1: - CALL GETUD ; RETURN TO HOME DIRECTORY - LXI D,FCB ; PT TO FCB IN DE, PT TO FIRST CHAR OF FILE NAME IN HL - MVI A,0 ; SCAN FOR DIR FORM BEFORE DU - CALL ZFNAME ; EXTRACT FILE NAME INTO FCB, AND GET DISK AND USER - SHLD NEXTCH ; SAVE PTR TO DELIMITER WHICH ENDED SCAN - -; -; LOAD DIRECTORY AND PERFORM FUNCTION -; -FCT: - LXI D,FCB ; PT TO FCB - CALL Z3LOG ; LOG INTO DIR - CALL RETUD ; SAVE DIRECTORY WE ARE IN - MOV A,B ; SAVE DISK - STA CDISK - MOV A,C ; SAVE USER - STA CUSER - LHLD DIRBUF ; PT TO DIRECTORY BUFFER - MVI A,11000000B ; SELECT SYS AND NON-SYS FILES - LXI D,FCB ; PT TO FCB - CALL INITFCB ; INIT THE FCB - CALL DIRQS ; LOAD DIR, SELECT FILES, PACK, AND ALPHABETIZE - CALL DPARAMS ; GET DISK PARAMETERS FOR FILE SIZE COMPUTATION - CALL ICHECK ; CHECK FOR INSPECT OPTION AND INSPECT IF SET - CALL HEADER ; PRINT COLUMN HEADER - CALL GETUD ; RETURN TO BASE USER/DISK - -; -; PERFORM FUNCTION; HL PTS TO FILE AND BC CONTAINS NUMBER OF FILES -; -FCTL: - MOV A,B ; CHECK FOR COMPLETION (COUNT = 0) - ORA C - JZ FCTL1 - DCX B ; COUNT DOWN - PUSH H ; SAVE PTR AND COUNT - PUSH B - CALL FUNCTION ; PERFORM FUNCTION - POP B ; GET COUNT AND PTR - POP H - LXI D,ESIZE ; PT TO NEXT ENTRY - DAD D - JMP FCTL - -; -; CHECK FOR NEXT FILE SPEC -; -FCTL1: - LHLD NEXTCH ; GET PTR - MOV A,M ; GET DELIM - CPI ',' ; ANOTHER FILE? - JNZ DRETURN - INX H ; PT TO CHAR AFTER COMMA - JMP DSPEC1 ; CONTINUE PROCESSING - -; -; FUNCTION COMPLETE -- EXIT -; -DRETURN: - CALL DCRLF ; NEW LINE - LDA DSKOUT ; DISK OUTPUT USED? - ORA A ; NZ=YES - CNZ FO0$CLOSE ; CLOSE FILE - JMP RETURN - -; -; EMERGENCY ABORT -; -ABORT: - CALL EPRINT - DB CR,LF,'** CRC Abort **',CR,LF,0 - CALL GETUD ; RETURN HOME - JMP DRETURN - -; -; PRINT COLUMN HEADER -; -HEADER: - CALL DPRINT - DB CR,LF,' Filename.Typ Size Recs CRC',0 - LDA LOC ; LINES OF CODE? - ORA A - JZ HDR1 - CALL DPRINT - DB ' Lines',0 -HDR1: - LDA COMMENT ; COMMENT FIELD ALSO? - ORA A ; 0=NO - RZ - CALL DPRINT - DB ' Comment',0 - RET -; -; FUNCTION -- COMPUTE CRCS OF SELECTED FILES -; -FUNCTION: - -; -; PRINT FILE NAME -; -CRCLP: - CALL DCRLF ;NEW LINE - PUSH H ;SAVE PTR - LHLD FILECNT ; INCREMENT FILE COUNT - INX H - SHLD FILECNT - CALL DVAL ;OUTPUT DECIMAL VALUE - POP H ;GET PTR - MVI A,' ' ;LEADING SPACE - CALL DOUT - CALL PRFN ; PRINT FILE NAME - MVI A,' ' ; SPACE SEPARATOR - CALL DOUT - CALL FSIZE ; COMPUTE SIZE IN DE - XCHG ; HL=SIZE - CALL DVAL ; OUTPUT VALUE - MVI A,'K' ; OUTPUT K - CALL DOUT - LHLD CRCFCB ; PT TO FCB - XCHG ; HL = PTR TO FIRST BYTE OF FILE FCB PART - MVI B,12 ; 12 BYTES - CALL MOVEB - XRA A ; ZERO FIRST BYTE - STAX D ; SELECT CURRENT DISK OF CRCFCB - JMP DOIT ; PERFORM FUNCTION - -; -; TEST FOR COMMENT AND DISK OUTPUT, AND ACCEPT COMMENT IF SET -; -CTEST: - LDA COMMENT ; GET FLAG - ORA A ; ZERO IF NONE - RZ - CALL EPRINT - DB ' ?',0 - XRA A ; DON'T CAPITALIZE - CALL BBLINE ; GET LINE FROM USER - XCHG ; SAVE HL - LHLD CMTLNE ; COPY INTO COMMENT LINE BUFFER FOR NOW - XCHG ; RESTORE HL AND NEW DE -CTEST1: - MOV A,M ; GET CHAR - STAX D ; PUT CHAR - ORA A ; END? - RZ - INX H ; PT TO NEXT - INX D - JMP CTEST1 - -; -; PRINT FILE NAME PTED TO BY HL -; OUTPUT TO CON: AND OPTIONALLY DISK -; -PRFN: - PUSH H ; SAVE PTR - INX H ; PT TO FILE NAME - MVI B,8 ; PRINT NAME - CALL PRNT - MVI A,'.' ; DECIMAL - CALL DOUT - MVI B,3 ; PRINT TYPE - CALL PRNT - POP H ; GET PTR - RET - -; -; PRINT CHARS PTED TO BY HL FOR B BYTES -; OUTPUT TO CON: AND OPTIONALLY DISK -; -PRNT: - MOV A,M ; GET CHAR - CALL DOUT - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ PRNT - RET - -; -; PRINT FILE NAME PTED TO BY HL -; OUTPUT TO CON: -; -PRFNC: - PUSH H ; SAVE PTR - INX H ; PT TO FILE NAME - MVI B,8 ; PRINT NAME - CALL PRNTC - MVI A,'.' ; DECIMAL - CALL COUT - MVI B,3 ; PRINT TYPE - CALL PRNTC - POP H ; GET PTR - RET - -; -; PRINT CHARS PTED TO BY HL FOR B BYTES -; OUTPUT TO CON: -; -PRNTC: - MOV A,M ; GET CHAR - CALL COUT - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ PRNTC - RET - -; -; CHECK FOR INSPECT OPTION AND INSPECT FILES IF SET -; FIRST FILE PTED TO BY HL, COUNT IN BC -; -ICHECK: - LDA INSPECT ; INSPECT? - ORA A ; 0=NO - RZ - CALL EPRINT - DB CR,LF,CR,LF,'** File Inspection **' - DB CR,LF,'Y(def)=Select N=Don''t Select' - DB CR,LF,'S=Skip Rest Q=Quit (Abort)' - DB CR,LF,0 - PUSH H ; SAVE POINTER TO FIRST FILE - PUSH B ; SAVE FILE COUNT -ICKL: - PUSH B ; SAVE COUNT - CALL CRLF ; NEW LINE - CALL PRFNC ; PRINT FILE NAME TO CONSOLE ONLY - CALL CRCQ ; CRC QUESTION - POP B ; GET COUNT - CPI 'S' ; SKIP REST? - JZ ISKIP - CPI 'Q' ; QUIT? - JZ QUIT - CPI 'N' ; NO? - JZ NODO - CALL EPRINT - DB ' Selected',0 - MOV A,M ; GET BYTE - ORI 80H ; SET MSB - MOV M,A ; PUT BYTE - JMP ICKNXT - -; DON'T CRC FILE -NODO: - CALL EPRINT - DB ' NOT Selected',0 - -; CONTINUE SCAN OF FILES -ICKNXT: - LXI D,ESIZE ; SIZE OF FILE ENTRY - DAD D ; PT TO NEXT ENTRY - DCX B ; COUNT DOWN - MOV A,B ; DONE? - ORA C - JNZ ICKL -ISKIP: - POP B ; RESTORE ORIGINAL COUNT - POP H ; RESTORE PTR TO FIRST FILE - CALL DIRPACK ; PACK DIRECTORY BASED ON SELECTION - CALL EPRINT - DB CR,LF,'** Inspection Complete **',CR,LF,0 - RET - -; -; PROMPT USER FOR INSPECT -; -CRCQ: - CALL EPRINT ; PRINT PROMPT - DB ' -- Select (Y/N/S/Q)? ',0 - CALL CIN ; GET RESPONSE - CALL CAPS ; CAPITALIZE - CALL COUT ; ECHO - RET - -; -; QUIT CRC PROGRAM -; -QUIT: - CALL EPRINT - DB ' Quit to Z3',0 - JMP DRETURN - -; -; COMPUTE CRC; NAME IN CRCFCB -; -DOIT: - LDA CDISK ; GOTO DIRECTORY OF FILE - MOV B,A - LDA CUSER - MOV C,A - CALL LOGUD ; LOG INTO FILE'S DIRECTORY - CALL CRCCLR ; CLEAR CRC ACCUMULATOR - LXI H,0 ; HL=0 - SHLD RECNT ; RESET RECORD COUNT - SHLD LOCNT ; RESET LINES OF CODE COUNT - LHLD CRCFCB ; PT TO FCB - XCHG ; ... IN DE - CALL INITFCB ; INIT IT - CALL F$OPEN ; OPEN IT FOR INPUT -DOITL: - CALL F$READ ; READ BLOCK INTO TBUFF - ORA A ; ERROR? - JNZ DOITD ; DONE IF SO - PUSH H ; SAVE HL - LHLD RECNT ; INCREMENT RECORD COUNT - INX H - SHLD RECNT - POP H - CALL CONDIN ; CHECK FOR ABORT - JZ DOITL0 - CPI CTRLC ; ABORT? - JZ ABORT ; QUICK ABORT -DOITL0: - LXI H,TBUFF ; PT TO FIRST BYTE - MVI B,128 ; 128 BYTES -DOITL1: - MOV A,M ; GET BYTE - CALL CRCUPD ; UPDATE CRC - LDA LOC ; COUNT LINES OF CODE? - ORA A ; 0=NO - JZ DOITL2 - MOV A,M ; GET BYTE - ANI 7FH ; MASK - CPI LF ; LINE FEED IS KEY - JNZ DOITL2 - PUSH H ; INCREMENT LOC COUNTER - LHLD LOCNT - INX H - SHLD LOCNT - POP H -DOITL2: - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ DOITL1 - JMP DOITL ; CONTINUE THRU FILE -DOITD: - CALL GETUD ; RETURN TO HOME DIRECTORY - CALL DPRINT ; SEPARATOR - DB ' ',0 - LHLD RECNT ; PRINT RECORD COUNT - CALL DVAL ; PRINT IN DECIMAL - CALL DPRINT - DB ' ',0 - CALL CRCDONE ; RETURN CRC IN HL - CALL HVAL ; PRINT VALUE AS HEX - LDA LOC ; LINES OF CODE? - ORA A - JZ DOITD1 - CALL DPRINT ; LEADING SPACES - DB ' ',0 - LHLD LOCNT ; GET COUNT - CALL DVAL ; PRINT AS DECIMAL -DOITD1: - CALL CTEST ; GET FOR AND INPUT COMMENT - LDA COMMENT ; CHECK FOR COMMENT AND OUTPUT IF SO - ORA A ; ZERO IF ONE NOT SELECTED - RZ - CALL DPRINT ; SEPARATOR - DB ' ',0 - LHLD CMTLNE ; OUTPUT COMMENT LINE -CMTLP: - MOV A,M ; GET CHAR - ORA A ; EOL? - RZ ; EXIT WHEN DONE - CALL DPOUT ; OUTPUT CHAR - INX H ; PT TO NEXT - JMP CMTLP - -; -; OUTPUT CHAR TO CONSOLE AND OPTIONALLY PRINTER OR DISK -; -DOUT: - PUSH PSW ; SAVE CHAR - PUSH B ; SAVE BC - MOV B,A ; CHAR IN B - CALL COUT ; OUTPUT TO CONSOLE -DOUT0: - LDA PRTOUT ; PRINTER OUTPUT? - ORA A ; Z=NO - JZ DOUT1 - MOV A,B ; GET CHAR - CALL LOUT ; OUTPUT TO PRINTER -DOUT1: - LDA DSKOUT ; DISK OUTPUT? - ORA A ; Z=NO - JZ DOUT2 - MOV A,B ; GET CHAR - CALL F0$PUT ; OUTPUT TO DISK -DOUT2: - POP B ; RESTORE REGS - POP PSW - RET - -; -; OUTPUT CHAR TO OPTIONALLY PRINTER OR DISK -; -DPOUT: - PUSH PSW ; SAVE CHAR - PUSH B ; SAVE BC - MOV B,A ; CHAR IN B - JMP DOUT0 ; USE DOUT ROUTINES - -; -; OUTPUT CHARS PTED TO BY RET ADR TO CONSOLE AND DISK OR PRINTER -; -DPRINT: - XTHL ; GET PTR AND SAVE HL AT SAME TIME -DPRL: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - ORA A ; END? - JZ DPRL1 - CALL DOUT ; OUTPUT IT - JMP DPRL -DPRL1: - XTHL ; SET RET ADR AND RESTORE HL - RET - -; -; NEW LINE TO ALL -; -DCRLF: - PUSH PSW ; SAVE PSW - MVI A,CR ; NEW LINE - CALL DOUT - MVI A,LF - CALL DOUT - POP PSW ; RESTORE PSW - RET - -; -; OUTPUT VALUE IN HL TO ALL IN HEX -; -HVAL: - PUSH H ; SAVE HL - PUSH D ; SAVE DE - LXI D,NUMBUF ; PT TO NUMBER BUFFER - MOV A,H - CALL MA2HC ; OUTPUT IN HEX - MOV A,L - CALL MA2HC - MVI A,' ' ; TRAILING SPACE - STAX D - JMP DVAL0 - -; -; OUTPUT HL AS UP TO 5 DECIMAL DIGITS TO ALL -; -DVAL: - PUSH H ; SAVE REGS - PUSH D - LXI D,NUMBUF ; PT TO BUFFER - CALL MHLDC ; OUTPUT IN DECIMAL -DVAL0: - LXI H,NUMBUF ; PT TO BUFFER - MVI D,5 ; 5 CHARS -DVAL1: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CALL DOUT ; OUTPUT IT - DCR D ; COUNT DOWN - JNZ DVAL1 - POP D ; RESTORE REGS - POP H - RET - -; -; **** START OF CRC ROUTINES **** -; - -; -; CRCCLR -- Clear CRC Accumulator -; -; No Registers are Affected -; -CRCCLR: - PUSH H ;SAVE HL - LXI H,0 ;INIT TO ZERO - SHLD CRCACC - POP H - RET - -; -; CRCDONE -- Return the CRC Value in HL -; -CRCDONE: - LHLD CRCACC ;GET VALUE - RET - -; -; CRCUPD -- Update CRC Accumulator -; -;An 8080 routine for generating a CYCLIC-REDUNDANCY-CHECK. -;Adapted from Keith Petersen's CRCK 4.2 program. -;By Fred Gutman. -;From 'EDN' magazine, June 5, 1979 issue, page 84. -; -; Byte to be updated is passed in A -; No Registers are Affected -; -CRCUPD: - PUSH H ;SAVE HL - PUSH B ;SAVE BC - PUSH PSW ;SAVE BYTE TO UPDATE - MOV B,A ;BYTE IN B - LHLD CRCACC ;GET REMAINDER - MOV A,H - ANI 128 ;Q-BIT MASK - PUSH PSW ;SAVE STATUS - DAD H ;2 X R(X) - MOV A,B ;GET BYTE - ADD L - MOV L,A - POP PSW - JZ CRCU1 ;IF Q-BIT IS ZERO -; - MOV A,H - XRI 0A0H ;MS HALF OF GEN. POLY - MOV H,A - MOV A,L - XRI 97H ;LS HALF OF GEN. POLY - MOV L,A -; -CRCU1: - SHLD CRCACC ;SAVE RESULT - POP PSW ;RESTORE REGS - POP B - POP H - RET - -; -; CRC Accumulator -; -CRCACC: - DS 2 ;2 BYTES - -; -; **** END OF CRC ROUTINES **** -; - -; -; BUFFERS -; -CDISK: - DS 1 ; DISK WHERE FILES ARE -CUSER: - DS 1 ; USER WHERE FILES ARE -LOC: - DS 1 ; LINES OF CODE FLAG (0=NO, 0FFH=YES) -INSPECT: - DS 1 ; INSPECT FLAG (0=NO, 0FFH=YES) -COMMENT: - DS 1 ; CONTROL FLAG (0=NO, 0FFH=YES) -DSKOUT: - DS 1 ; DISK OUTPUT (0=NO, 0FFH=YES) -PRTOUT: - DS 1 ; PRINTER OUTPUT (0=NO, 0FFH=YES) -LOCNT: - DS 2 ; LINES OF CODE COUNT -RECNT: - DS 2 ; RECORD COUNT -NEXTCH: - DS 2 ; PTR TO NEXT CHAR IN MULTIFILE COMMAND LINE -FILECNT: - DS 2 ; COUNT OF NUMBER OF FILES RENAMED -NUMBUF: - DS 5 ; NUMBER STORAGE BUFFER -DIRBUF: - DS 2 ; PTR TO DIRECTORY BUFFER -CRCFCB: - DS 2 ; PTR TO FCB FOR CRC -CMTLNE: - DS 2 ; PTR TO COMMENT LINE BUFFER -CMDLNE: - DS 2 ; PTR TO COMMAND LINE -STACK: - DS 2 ; OLD STACK PTR - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/DBRCPREL.LBR b/Source/Images/d_bp/u15/DBRCPREL.LBR deleted file mode 100644 index e280a712..00000000 Binary files a/Source/Images/d_bp/u15/DBRCPREL.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/DEBUGRCP.AQM b/Source/Images/d_bp/u15/DEBUGRCP.AQM deleted file mode 100644 index 7340947b..00000000 Binary files a/Source/Images/d_bp/u15/DEBUGRCP.AQM and /dev/null differ diff --git a/Source/Images/d_bp/u15/DEBUGRCP.ASM b/Source/Images/d_bp/u15/DEBUGRCP.ASM deleted file mode 100644 index 3c9e1793..00000000 --- a/Source/Images/d_bp/u15/DEBUGRCP.ASM +++ /dev/null @@ -1,1587 +0,0 @@ -; SYSTEM SEGMENT: DEBUG.RCP -; SYSTEM: ARIES-1 -; CUSTOMIZED BY: RICHARD CONN - -; -; PROGRAM: DEBUGRCP.ASM -; AUTHOR: RICHARD CONN -; VERSION: 1.0 -; DATE: 30 JUNE 84 -; PREVIOUS VERSIONS: NONE -; -VERS EQU 10 -RCPID EQU 'A' - -; -; DEBUGRCP is a resident debug command package for ZCPR3. As with -; all resident command processors, DEBUGRCP performs the following functions: -; -; 1. Assuming that the EXTFCB contains the name of the -; command, DEBUGRCP looks to see if the first character -; of the file name field in the EXTFCB is a question -; mark; if so, it returns with the Zero Flag Set and -; HL pointing to the internal routine which prints -; its list of commands -; 2. The resident command list in DEBUGRCP is scanned for -; the entry contained in the file name field of -; EXTFCB; if found, DEBUGRCP returns with the Zero Flag -; Set and HL pointing to the internal routine which -; implements the function; if not found, DEBUGRCP returns -; with the Zero Flag Reset (NZ) -; - -; -; Global Library which Defines Addresses for DEBUGRCP -; - MACLIB Z3BASE - -; -CTRLC EQU 'C'-'@' -BS EQU 08H -TAB EQU 09H -LF EQU 0AH -FF EQU 0CH -CR EQU 0DH -CTRLX EQU 'X'-'@' -; -WBOOT EQU BASE+0000H ;CP/M WARM BOOT ADDRESS -UDFLAG EQU BASE+0004H ;USER NUM IN HIGH NYBBLE, DISK IN LOW -BDOS EQU BASE+0005H ;BDOS FUNCTION CALL ENTRY PT -TFCB EQU BASE+005CH ;DEFAULT FCB BUFFER -FCB1 EQU TFCB ;1st and 2nd FCBs -FCB2 EQU TFCB+16 -TBUFF EQU BASE+0080H ;DEFAULT DISK I/O BUFFER -TPA EQU BASE+0100H ;BASE OF TPA -; -; SYSTEM Entry Point -; - org rcp ; passed for Z3BASE - - db 'Z3RCP' ; Flag for Package Loader -; -; **** Command Table for RCP **** -; This table is RCP-dependent! -; -; The command name table is structured as follows: -; -; ctable: -; DB 'CMNDNAME' ; Table Record Structure is -; DW cmndaddress ; 8 Chars for Name and 2 Bytes for Adr -; ... -; DB 0 ; End of Table -; -cnsize equ 4 ; NUMBER OF CHARS IN COMMAND NAME - db cnsize ; size of text entries -ctab: - db 'H ' ; Help for RCP - dw clist -ctab1: - db 'MU ' ; Memory Utility - dw mu -; - db 0 -; -; BANNER NAME OF RCP -; -rcp$name: - db 'DEBUG ' - db (vers/10)+'0','.',(vers mod 10)+'0' - db RCPID - db 0 - -; -; Command List Routine -; -clist: - lxi h,rcp$name ; print RCP Name - call print1 - lxi h,ctab1 ; print table entries - mvi c,1 ; set count for new line -clist1: - mov a,m ; done? - ora a - rz - dcr c ; count down - jnz clist1a - call crlf ; new line - mvi c,4 ; set count -clist1a: - lxi d,entryname ; copy command name into message buffer - mvi b,cnsize ; number of chars -clist2: - mov a,m ; copy - stax d - inx h ; pt to next - inx d - dcr b - jnz clist2 - inx h ; skip to next entry - inx h - push h ; save ptr - lxi h,entrymsg ; print message - call print1 - pop h ; get ptr - jmp clist1 -; -; Print String (terminated in 0 or MSB Set) at Return Address -; -vprint: -eprint: - xthl ; get address - call print1 - xthl ; put address - ret -; -; Print String (terminated in 0 or MSB Set) pted to by HL -; -print1: - mov a,m ; done? - inx h ; pt to next - ora a ; 0 terminator - rz - cpi dim ; standout? - jz print1d - cpi bright ; standend? - jz print1b - call cout ; print char - ora a ; set MSB - rm ; MSB terminator - jmp print1 -print1d: - call stndout ; dim - jmp print1 -print1b: - call stndend ; bright - jmp print1 -; -; New Line -; -crlf: - mvi a,cr - call cout - mvi a,lf ;fall thru -; -; Character Output -; -cout: - push psw - push b - push d - push h - mov e,a - mvi c,2 ; use BDOS - call bdos - pop h - pop d - pop b - pop psw - ret -; -; Get char in A -; -cin: - push h - push d - push b - mvi c,1 - call bdos - ani 7fh - push psw - mvi a,bs ;overwrite - call cout - pop psw - pop b - pop d - pop h - ret -; -; CLIST Messages -; -entrymsg: - db ' ' ; command name prefix -entryname: - ds cnsize ; command name - db 0 ; terminator - -; -; General Equates -; -bel equ 07h -bs equ 08h -cr equ 0dh -lf equ 0ah -fcb equ 5ch - -DIM EQU 1 -BRIGHT EQU 2 - -EOLCH EQU 0 ;END OF LINE CHAR -SEPCH EQU ',' ;SEPARATOR CHAR -EROW EQU 6 ;FIRST ROW OF EDITOR DISPLAY -ECOL EQU 4 ;FIRST COL OF EDITOR DISPLAY -ECOLC EQU ECOL+16*3+8 ;FIRST COL OF EDITOR CHAR DISPLAY -ECURS EQU '>' ;EDITOR CURSOR -PRROW EQU 22 ;PROMPT ROW -PRCOL EQU 10 ;PROMPT COLUMN -PRCOLI EQU PRCOL+15 ;PROMPT INPUT COL -ERROW EQU 23 ;ERROR MESSAGE ROW -ERCOL EQU 15 ;ERROR MESSAGE COLUMN - -; -; DEFINE FREE SPACE -; -MU: - LXI H,TBUFF ;DETERMINE ADDRESS - MVI M,126 ;126 CHARS INPUT ALLOWED - SHLD BUFFER ;SET PTR -; -; SET UP ARROW KEYS -; - LXI H,Z3ENV ;PT TO ENVIRONMENT DESCRIPTOR - LXI D,80H+10H ;PT TO ARROW KEY INFO - DAD D - LXI D,EDCURT ;PT TO CURSOR TABLE - MVI B,4 ;4 ARROW KEYS -ARROW: - MOV A,M ;GET CHAR - STAX D ;STORE CHAR - INX H ;PT TO NEXT - INX D ;PT TO NEXT ENTRY - INX D - INX D - DCR B ;COUNT DOWN - JNZ ARROW -; -; Initialize Terminal -; - call tinit -; -; Check for Command Line Parameter -; - lxi h,fcb+1 ;pt to first char - mov a,m ;get char - cpi ' ' ;no param? - jnz pcheck - lxi h,tpa ;pt to TPA - jmp mu3 -; -; We have a parameter -; -pcheck: - call hexin ;convert to binary - xchg ;HL=value - jmp mu3 -; -; Erase to EOL -; If fct not supported, send out B spaces and B backspaces -; -vereol: - call ereol ;try erase - rnz - push b ;save B - mvi a,' ' ;send spaces - call vereol1 - pop b ;get B - mvi a,bs ;send backspaces -vereol1: - call cout ;send char in A - dcr b - jnz vereol1 - ret -; -; Clear Screen -; If fct not supported, write 24 CRLFs -; -vcls: - call cls ;try clear - rnz - push b ;save B - mvi b,24 ;count -vcls1: - call crlf - dcr b - jnz vcls1 - pop b - ret -; -; Run MU3 -; HL contains starting address -; -mu3: - SHLD BLOCK ;SAVE PTR TO BLOCK -; -; REFRESH EDIT SCREEN -; -EDIT0: - CALL VCLS ;NEW SCREEN - CALL AT - DB 2,35 ;ROW 2, COL 35 - CALL VPRINT ;BANNER - DB 'MU RCP ' - DB (VERS/10)+'0','.',(VERS MOD 10)+'0',RCPID - DB 0 -; -; REENTER MU3 WITH PTRS RESET -; -MU3R: - XRA A ;A=0 - STA EINDEX ;SET INDEX TO 0 (FIRST ELEMENT) - CALL EDPLOT ;PLOT BUFFER DATA -; -; INPUT EDITOR COMMAND -; -EDITCMD: - CALL PRMSG ;POSITION AT PROMPT MESSAGE - DB 'MU Command?',0 - CALL PRINP ;POSITION AT PROMPT INPUT - DB 0 - CALL CIN ;GET CHAR - CALL CAPS ;CAPITALIZE - MOV B,A ;COMMAND IN B - LXI H,EDCURT ;PROCESS CURSOR COMMANDS FIRST - CALL CMD ;PROCESS COMMAND - LXI H,ECMDTBL ;EDITOR COMMAND TABLE - CALL CMD ;PROCESS COMMAND - CALL VPRINT ;ERROR MESSAGE - DB BEL,0 - JMP EDITCMD -; -; Position at Prompt Message and Print it -; -PRMSG: - CALL AT ;POSITION - DB PRROW,PRCOL - JMP VPRINT ;PRINT IT -; -; Position at Prompt Input and Print Prompt -; -PRINP: - CALL AT ;POSITION - DB PRROW,PRCOLI - JMP VPRINT ;PRINT IT -; -;INPUT ERROR -; -WHAT: - CALL VPRINT - DB BEL,0 - JMP EDITCMD -; -;Command Table Search and Execute -; -CMD: - MOV A,M ;CHECK FOR END OF TABLE - ORA A - RZ ;COMMAND NOT FOUND - CMP B ;MATCH? - JZ CMDRUN - INX H ;SKIP TO NEXT ENTRY IN TABLE - INX H - INX H - JMP CMD -; -;RUN COMMAND -; -CMDRUN: - INX H ;PT TO LOW ADDRESS - MOV E,M - INX H ;PT TO HIGH ADDRESS - MOV D,M - XCHG - POP PSW ;CLEAR STACK - PCHL ;RUN ROUTINE -; -;PLOT BUFFER DATA -; -EDPLOT: - MVI H,EROW-1 ;SET ROW - MVI L,ECOL ;SET COLUMN - CALL GOTOXY ;POSITION CURSOR - CALL VPRINT - DB DIM - DB ' 0 1 2 3 4 5 6 7 8 9 A B C D E F' - DB BRIGHT,0 - INR H ;NEXT ROW - CALL GOTOXY ;POSITION CURSOR - XCHG ;POSITION IN DE - LHLD BLOCK ;PT TO DATA - MVI B,8 ;8 LINES -; -;Print Next Line on Screen -; -EDIT00: - CALL STNDOUT ;GO DIM - MOV A,H ;OUTPUT ADDRESS - CALL PA2HC - MOV A,L - CALL PA2HC - CALL VPRINT - DB ':',BRIGHT,' ',0 - MVI C,16 ;16 ELEMENTS -EDIT01: - MOV A,M ;GET BYTE - CALL PA2HC ;PRINT AS HEX - CALL SPACE ;PRINT 1 SPACE - INX H ;PT TO NEXT - DCR C ;COUNT DOWN - JNZ EDIT01 - XCHG ;POSITION AGAIN - INR H ;NEXT ROW - CALL GOTOXY - XCHG - DCR B ;COUNT DOWN - JNZ EDIT00 - MVI H,EROW ;RESET ROW - MVI L,ECOLC ;RESET COL - CALL GOTOXY ;POSITION CURSOR - XCHG ;POSITION IN DE - LHLD BLOCK ;PT TO DATA - MVI B,8 ;8 LINES -EDIT02: - CALL BAR ;PRINT BAR - MVI C,16 ;16 ELEMENTS -EDIT03: - MOV A,M ;GET BYTE - ANI 7FH ;MASK MSB - CPI 7FH ;DON'T PRINT 7FH - JZ EDIT7F - CPI ' ' ;SPACE OR MORE? - JNC EDIT04 -EDIT7F: - MVI A,'.' ;PRINT DOT -EDIT04: - CALL COUT ;PRINT BYTE - INX H ;PT TO NEXT - DCR C ;COUNT DOWN - JNZ EDIT03 - CALL BAR ;PRINT ENDING BAR - XCHG ;POSITION AGAIN - INR H ;NEXT ROW - CALL GOTOXY - XCHG - DCR B ;COUNT DOWN - JNZ EDIT02 - CALL EDCUR ;POSITION CURSOR - RET -; -;EDITOR COMMAND TABLE -; -ECMDTBL: - DB CR ;NOP - DW EDITCMD - DB 'C'-'@' ;^C = EXIT MU3 - DW EDCC - DB 'R'-'@' ;^R = REFRESH - DW EDIT0 - DB 'E'-'@' ;^E=UP - DW EDUP - DB 'X'-'@' ;^X=DOWN - DW EDDOWN - DB 'D'-'@' ;^D=RIGHT - DW EDRIGHT - DB 'S'-'@' ;^S=LEFT - DW EDLEFT - DB ' ' ;NOP - DW EDITCMD - DB '+' ;ADVANCE - DW EDITPLUS - DB '-' ;BACKUP - DW EDITMINUS - DB 'A' ;ADDRESS - DW EDITADR - DB 'C' ;COMMAND LINE - DW EDITCL - DB 'N' ;CHANGE NUMBERS - DW EDITHEX - DB 'T' ;CHANGE TEXT - DW EDITALP - DB 0 ;END OF TABLE -; -; ARROW KEY DEFINITONS FROM TCAP -; -EDCURT: - DB 0 ;0 INDICATES NO ARROW KEYS - DW EDUP - DB 0 - DW EDDOWN - DB 0 - DW EDRIGHT - DB 0 - DW EDLEFT - DB 0 ;END OF TABLE -; -;Enter Command Line -; -EDITCL: - CALL VPRINT ;PROMPT INPUT - DB CR,LF,'Command Line? ',0 - CALL RDBUF ;INPUT TEXT - CALL PUTCL ;STORE COMMAND LINE - JMP CRLF ;NEW LINE -; -; STORE COMMAND LINE -; -PUTCL: - XCHG ;PTR TO NEW LINE IN DE - CALL GETCL1 ;GET COMMAND LINE DATA - MOV B,A ;CHAR COUNT IN B - XCHG ;HL PTS TO NEW LINE - PUSH H ;SAVE PTR TO NEXT LINE -PCL1: - MOV A,M ;GO TO END OF LINE - ORA A ;AT END? - JZ PCL2 - INX H ;PT TO NEXT - DCR B ;COUNT DOWN - JNZ PCL1 - POP H ;CLEAR STACK - RET ;COMMAND LINE TOO LONG - ABORT -; -; AT END OF NEW COMMAND LINE -; PTR TO FIRST CHAR OF NEW COMMAND LINE ON STACK -; HL PTS TO ENDING 0 OF NEW COMMAND LINE -; B = NUMBER OF CHARS REMAINING BEFORE COMMAND LINE OVERFLOW -; -PCL2: - XCHG ;DE PTS TO LAST BYTE - PUSH D ;SAVE PTR IN CASE OF ERROR - CALL GETCL2 ;PT TO TAIL OF COMMAND LINE BUFFER - MOV A,M ;GET FIRST CHAR OF TAIL - CPI ';' ;CONTINUATION? - JZ PCL3 - ORA A ;DONE? - JZ PCL3 - MVI A,';' ;SET CONTINUATION CHAR - STAX D - INX D - DCR B ;COUNT DOWN - JZ PCL4 ;OVERFLOW -; -; COPY TAIL ONTO END OF NEW COMMAND LINE -; -PCL3: - MOV A,M ;GET NEXT CHAR - STAX D ;STORE IT - INX H ;PT TO NEXT - INX D - ORA A ;DONE? - JZ PCL5 - DCR B ;COUNT DOWN - JNZ PCL3 -; -; COMMAND LINE TOO LONG -; -PCL4: - POP H ;GET PTR TO END OF OLD LINE - MVI M,0 ;STORE ENDING 0 - POP PSW ;CLEAR STACK - RET -; -; NEW COMMAND LINE OK -; -PCL5: - POP PSW ;CLEAR STACK - CALL GETCL1 ;GET PTR TO BUFFER - LXI D,4 ;PT TO FIRST CHAR IN BUFFER - XCHG - DAD D - XCHG - MOV M,E ;STORE ADDRESS - INX H - MOV M,D - POP H ;HL PTS TO FIRST CHAR OF NEW LINE -; -; COPY COMMAND LINE INTO BUFFER -; -PCL6: - MOV A,M ;COPY - STAX D - INX H - INX D - ORA A ;DONE? - JNZ PCL6 - RET -; -; GETCL1 -; -GETCL1: - LHLD Z3ENV+18H ;GET ADDRESS OF COMMAND LINE BUFFER - PUSH H ;SAVE IT - INX H ;GET SIZE IN A - INX H - MOV A,M - POP H - RET -; -; GETCL2 -; -GETCL2: - LHLD Z3ENV+18H ;GET ADDRESS OF COMMAND LINE BUFFER - MOV A,M ;GET ADDRESS OF NEXT CHAR - INX H - MOV H,M - MOV L,A ;HL PTS TO NEXT CHAR - MOV A,M ;GET IT - RET - -; -;Enter ASCII Chars -; -EDITALP: - CALL PRINP ;PROMPT INPUT - DB DIM,'Enter Text',BRIGHT - DB CR,LF,' --> ',0 - CALL RDBUF ;INPUT TEXT WITHOUT PROMPT - CALL EDPRCL ;CLEAR PROMPT LINE - LDA EINDEX ;PT TO POSITION - XCHG - LHLD BLOCK ;COMPUTE OFFSET - XCHG - ADD E - MOV E,A - MOV A,D - ACI 0 - MOV D,A ;DE PTS TO BYTE, HL PTS TO TEXT -EDITA1: - MOV A,M ;GET CHAR - CPI EOLCH ;EOL? - JZ EDITA2 ;REFRESH SCREEN - CALL GETAHV ;GET ASCII OR VALUE - STAX D ;UPDATE BYTE - INX H ;PT TO NEXT INPUT CHAR - INR E ;PT TO NEXT BUFFER BYTE - JNZ EDITA1 -EDITA2: - CALL EDPLOT ;REPLOT - JMP EDITCMD ;DONE-REFRESH SCREEN -; -;Enter Numbers -; -EDITHEX: - CALL PRINP ;PROMPT INPUT - DB DIM,'Enter Hex Numbers' - DB BRIGHT - DB CR,LF,' --> ',0 - CALL RDBUF ;INPUT TEXT WITHOUT PROMPT - CALL EDPRCL ;CLEAR PROMPT LINE - LDA EINDEX ;PT TO POSITION - XCHG - LHLD BLOCK ;COMPUTE OFFSET - XCHG - ADD E - MOV E,A - MOV A,D - ACI 0 - MOV D,A ;DE PTS TO BYTE, HL PTS TO TEXT -EDITH1: - MOV A,M ;GET HEX DIGIT - CPI EOLCH ;EOL? - JZ EDITA2 ;REFRESH SCREEN - CPI ' ' ;SKIP SPACES - JNZ EDITH2 - INX H ;SKIP SPACE - JMP EDITH1 -EDITH2: - PUSH D ;SAVE PTR - CALL HEXIN ;GET VALUE AND POSITION HL - MOV A,E ;... IN A - POP D ;GET PTR - STAX D ;PUT BYTE - INR E ;ADVANCE TO NEXT BYTE - JNZ EDITH1 - JMP EDITA2 ;DONE-REFRESH -; -;CLEAR PROMPT LINE -; -EDPRCL: - CALL PRINP ;PROMPT LINE - DB 0 - MVI B,40 ;40 POSITIONS - CALL VEREOL ;CLEAR TO EOL OR 40 CHARS - CALL AT ;USER INPUT - DB ERROW,1 - MVI B,79 ;79 POSITIONS - JMP VEREOL -; -;Input Address -; -EDITADR: - CALL VPRINT - DB 'Address? ',0 - CALL RDBUF ;GET USER INPUT - CALL SKSP ;SKIP LEADING SPACES - MOV A,M ;EMPTY LINE? - ORA A - JZ EDIT0 - CALL HEXIN ;CONVERT FROM HEX - XCHG ;HL = ADDRESS - SHLD BLOCK - JMP EDIT0 ;REENTER -; -;Advance to Next Block -; -EDITPLUS: - LHLD BLOCK ;ADVANCE TO NEXT BLOCK - LXI D,128 ;128 BYTES - DAD D - SHLD BLOCK - JMP MU3R -; -;Backup to Last Block -; -EDITMINUS: - LHLD BLOCK ;BACKUP TO LAST BLOCK - LXI D,-128 ;128 BYTES - DAD D - SHLD BLOCK - JMP MU3R -; -;Exit MU3 -; -EDCC: - CALL DINIT ;DEINIT TERM - JMP CRLF ;NEW LINE -; -;EDIT MOVE: UP -; -EDUP: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;BACKUP INDEX BY 16 - SUI 16 -; -;Common EDIT MOVE Routine - on input, A=new index -; -EDMOVE: - ANI 7FH ;MOD 128 - STA EINDEX - CALL EDCUR ;SET CURSOR - JMP EDITCMD -; -;EDIT MOVE: DOWN -; -EDDOWN: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;INCREMENT INDEX BY 16 - ADI 16 - JMP EDMOVE ;COMMON ROUTINE -; -;EDIT MOVE: RIGHT -; -EDRIGHT: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;INCREMENT INDEX BY 1 - INR A - JMP EDMOVE ;COMMON ROUTINE -; -;EDIT MOVE: LEFT -; -EDLEFT: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;DECREMENT INDEX BY 1 - DCR A - JMP EDMOVE ;COMMON ROUTINE -; -;EDIT SUBROUTINE: EDCUR -; Position Editor Cursor at EINDEX -;EDIT SUBROUTINE: EDCCUR -; Clear Editor Cursor at EINDEX -; -EDCUR: - PUSH H ;SAVE HL - MVI C,ECURS ;CURSOR CHAR - CALL EDSETCUR - CALL AT ;UPDATE DATA - DB 3,74 - LDA EINDEX ;PT TO BYTE AT CURSOR - LHLD BLOCK - ADD L - MOV L,A - MOV A,H - ACI 0 - MOV H,A ;HL PTS TO BYTE AT CURSOR - MOV A,M ;GET BYTE - CALL PA2HC ;PRINT AS HEX - CALL SPACE - MOV A,M ;GET BYTE - POP H ;RESTORE HL - ANI 7FH ;MASK - CPI 7FH ;7FH AS DOT - JZ EDC7F - CPI ' ' ;OUTPUT CHAR OR DOT - JNC COUT -EDC7F: - MVI A,'.' ;DOT - JMP COUT -EDCCUR: - MVI C,' ' ;CLEAR CURSOR -EDSETCUR: - CALL EDROW ;COMPUTE ROW - ANI 0FH ;COMPUTE COL MOD 16 - MOV B,A ;RESULT IN B - ADD A ;*2 - ADD B ;*3 - ADI ECOL+6 ;ADD IN COL - DCR A ;SUBTRACT 1 - MOV L,A ;COL POSITION SET - CALL GOTOXY ;POSITION CURSOR - MOV A,C ;OUTPUT CHAR - JMP COUT -; -;Compute Row from EINDEX -; -EDROW: - LDA EINDEX ;GET INDEX - MOV B,A ;SAVE IN B - RRC ;DIVIDE BY 16 - RRC - RRC - RRC - ANI 0FH ;MASK FOR LSB ONLY - ADI EROW ;COMPUTE ROW - MOV H,A ;ROW SET - MOV A,B ;GET INDEX - RET - -; -;PRINT A SPACE -; -SPACE: - MVI A,' ' - JMP COUT -; -;PRINT AN BARISK IN REV VIDEO -; -BAR: - CALL VPRINT - DB DIM,'|',BRIGHT,0 - RET -; -;Get value from input buffer -; -GETAHV: - MOV A,M ;GET NEXT CHAR - CPI '<' ;HEX ESCAPE? - RNZ ;NO, RETURN -;"<<" means one "<" - INX H - MOV A,M - CPI '<' - RZ -;Got hex - PUSH D - CALL HEXIN ;GET VALUE - CPI '>' ;PROPER DELIM? - MOV A,E ;GET VALUE - POP D - RZ -; -;ERROR CONDITION IN SUBROUTINE - CLEAR STACK AND FLAG ERROR -; -SERR: - POP PSW ;CLEAR STACK - JMP WHAT ;ERROR -; -;Input Number from Command Line -- Assume it to be Hex -; Number returned in DE -; -HEXIN: - LXI D,0 ;INIT VALUE - MOV A,M - CPI '#' ;DECIMAL? - JZ HDIN ;MAKE DECIMAL -; -HINLP: - MOV A,M ;GET CHAR - CALL CAPS ;CAPITALIZE - CPI CR ;EOL? - RZ - CPI EOLCH ;EOL? - RZ - CPI SEPCH - RZ - CPI ' ' ;SPACE? - RZ - CPI '-' ;'THRU'? - RZ - CPI '>' - RZ - INX H ;PT TO NEXT CHAR - CPI '0' ;RANGE? - JC SERR - CPI '9'+1 ;RANGE? - JC HINNUM - CPI 'A' ;RANGE? - JC SERR - CPI 'F'+1 ;RANGE? - JNC SERR - SUI 7 ;ADJUST FROM A-F TO 10-15 -; -HINNUM: - SUI '0' ;CONVERT FROM ASCII TO BINARY - XCHG - DAD H ;MULT PREVIOUS VALUE BY 16 - DAD H - DAD H - DAD H - ADD L ;ADD IN NEW DIGIT - MOV L,A - XCHG - JMP HINLP -; -HDIN: - INX H ;SKIP '#' -; -;Input Number in Command Line as Decimal -; Number is returned in DE -; -DECIN: - LXI D,0 - MOV A,M ; GET 1ST CHAR - CPI '#' ; HEX? - JNZ DINLP - INX H ; PT TO DIGIT - JMP HINLP ; DO HEX PROCESSING -; -DINLP: - MOV A,M ;GET DIGIT - CALL CAPS ;CAPITALIZE - CPI '0' ;RANGE? - RC - CPI '9'+1 ;RANGE? - RNC - SUI '0' ;CONVERT TO BINARY - INX H ;PT TO NEXT - PUSH H - MOV H,D - MOV L,E - DAD H ;X2 - DAD H ;X4 - DAD D ;X5 - DAD H ;X10 - ADD L ;ADD IN DIGIT - MOV L,A - MOV A,H - ACI 0 - MOV H,A - XCHG ;RESULT IN DE - POP H - JMP DINLP -; -; READ LINE FROM USER INTO INPUT LINE BUFFER -; -RDBUF: - LHLD BUFFER ;PT TO BUFFER - XCHG ;SET DE AS PTR TO BUFFER - MVI C,10 ;BDOS READLN - PUSH D ;SAVE PTR - CALL BDOS - POP H ;PT TO CHAR COUNT - INX H - MOV E,M ;GET CHAR COUNT - MVI D,0 - INX H ;PT TO FIRST CHAR - PUSH H ;SAVE PTR - DAD D ;PT TO AFTER LAST CHAR - MVI M,0 ;STORE ENDING 0 - POP H ;PT TO FIRST CHAR - RET - -; -; Capitalize char in A -; -caps: - ani 7fh - cpi 'a' ;range? - rc - cpi 'z'+1 - rnc - ani 5fh ;mask to caps - ret -; -; CLEAR SCREEN ON TERMINAL -; -cls: - push h ;save regs - push d - lxi h,z3env+80H ;pt to environment - mov a,m ;no terminal? - cpi ' '+1 - jc clserr - lxi d,14h ;pt to cls delay - dad d - mov d,m ;get it - inx h ;pt to cls string - inx h - inx h - mov a,m ;get first char of string - ora a ;if no string, error - jz clserr - call vidout ;output string with delay - pop d ;done - pop h - xra a ;return NZ - dcr a - ret -clserr: - pop d ;done - pop h - xra a ;return Z - ret - -; -; Erase to End of Line -; Return with A=0 and Zero Flag Set if not done -; -ereol: - push b ;save regs - push d - push h - lxi h,z3env+80h ;pt to environment - mov a,m ;no terminal? - cpi ' '+1 - jc err - lxi d,16h ;pt to ereol delay - dad d - mov d,m ;get it - inx h ;pt to cls string - call vidskp ;skip over it - call vidskp ;skip over CM string - mov a,m ;get first char of ereol string - ora a ;if no string, error - jz err - call vidout ;output string with delay - jmp noerr - -; -; GOTO XY -; HL = Row/Col, with Home=1/1 -; Return with A=0 and Zero Flag Set if not done -; -gotoxy: - push b ;save regs - push d - push h - lxi h,z3env+80h ;pt to environment - mov a,m ;no terminal? - cpi ' '+1 - jc err - lxi d,15h ;pt to CM delay - dad d - mov a,m ;get it - sta cmdelay ;save it - inx h ;pt to CL string - inx h - call vidskp ;skip CL string - mov a,m ;get first char of CM string - ora a ;if no string, error - jz err - xchg ;DE=address of CM string - pop h ;get coordinates in HL - push h - call gxy ;output xy string with delay - lda cmdelay ;pause - call videlay -noerr: - pop h ;done - pop d - pop b - xra a ;return NZ - dcr a - ret -err: - pop h ;done - pop d - pop b - xra a ;return Z - ret - -; -; Position Cursor at Location Specified by Return Address -; Usage: -; call at -; db row,col ;location -; -at: - xthl ;pt to address - push d ;save DE - mov d,m ;get row - inx h - mov e,m - inx h ;HL pts to return byte - xchg ;DE pts to return byte, HL contains screen loc - call gotoxy ;position cursor - xchg ;HL pts to return byte - pop d ;restore registers - xthl ;restore stack ptr - ret - -; -; GOTOXY -; On input, H=Row and L=Column to Position To (1,1 is Home) -; On input, DE=address of CM string -; -gxy: - dcr h ;adjust to 0,0 for home - dcr l - xra a ;set row/column - sta rcorder ;row before column - sta rcbase ;add 0 to base -; -; Cycle thru string -; -gxyloop: - ldax d ;get next char - inx d ;pt to next - ora a ;done? - rz - cpi '%' ;command? - jz gxycmd - cpi '\' ;escape? - jz gxyesc - call cout ;send char - jmp gxyloop - -; -; Escape - output following byte literally -; -gxyesc: - ldax d ;get next char - call cout ;output literally - inx d ;pt to next - jmp gxyloop -; -; Interpret next character as a command character -; -gxycmd: - ldax d ;get command char - inx d ;pt to next - cpi 'd' ;%d - jz gxyout1 - cpi '2' ;%2 - jz gxyout2 - cpi '3' ;%3 - jz gxyout3 - cpi '.' ;%. - jz gxyout4 - cpi '+' ;%+v - jz gxyout5 - cpi '>' ;%>xy - jz gxygt - cpi 'r' ;%r - jz gxyrev - cpi 'i' ;%i - jz gxyinc - call cout ;output char if nothing else - jmp gxyloop -; -; Set row/col home to 1,1 rather than 0,0 -; -gxyinc: - mvi a,1 ;set rcbase to 1 - sta rcbase - jmp gxyloop -; -; Reverse order of output to column then row (default is row then column) -; -gxyrev: - mvi a,1 ;set column and row order - sta rcorder - jmp gxyloop -; -; Command: >xy -; If value of row/col is greater than x, add y to it -; -gxygt: - call getval ;get value - mov c,a ;save value - ldax d ;get value to test - inx d ;pt to next - cmp c ;if carry, value>x - jnc gxygt1 - ldax d ;get value to add - add c - call putval ;put value back -gxygt1: - inx d ;pt to next - jmp gxyloop ;resume -; -; Command: +n -; Add n to next value and output -; -gxyout5: - ldax d ;get value to add - inx d ;pt to next - mov b,a ;save in B - call getval ;get value - add b ;add in B - call cout ;output value -rcmark: - lda rcorder ;mark output - ori 80h - sta rcorder - jmp gxyloop -; -; Command: . -; Output next value -; -gxyout4: - call getval ;get value - call cout ;output value - jmp rcmark -; -; Command: 3 -; Output next value as 3 decimal digits -; -gxyout3: - call getval ;get value - mvi b,100 ;output 100's - mvi c,1 ;leading zeroes - call digout -gxyot3: - mvi b,10 ;output 10's - mvi c,1 ;leading zeroes -gxyot2: - call digout - adi '0' ;output 1's - call cout - jmp rcmark -; -; Command: 2 -; Output next value as 2 decimal digits -; -gxyout2: - call getval ;get value - jmp gxyot3 -; -; Command: d -; Output next value as n decimal digits with no leading zeroes -; -gxyout1: - call getval ;get value - mvi b,100 ;output 100's - mvi c,0 ;no leading zeroes - call digout - mvi b,10 ;output 10's - mvi c,0 ;no leading zeroes - jmp gxyot2 -; -; Return next value in A -; -getval: - lda rcorder ;get order flag - ora a ;already output the first value? - jm getval2 - ani 1 ;look at lsb - jz getvalr ;if 0, row first -getvalc: - lda rcbase ;get base offset - add l ;get column - ret -getvalr: - lda rcbase ;get base offset - add h ;get row - ret -getval2: - ani 1 ;look at lsb - jz getvalc - jmp getvalr -; -; Store A as next value -; -putval: - mov c,a ;save value - lda rcorder ;get order flag - ora a ;already output the first value? - jm putval2 - ani 1 ;look at lsb - jz putvalr ;if 0, row first -putvalc: - mov l,c ;set column - ret -putvalr: - mov h,c ;set row - ret -putval2: - ani 1 ;look at lsb - jz putvalc - jmp putvalr -; -; Output A as decimal digit char -; B=Quantity to Subtract from A, C=0 if no leading zero -; -digout: - push d ;save DE - mvi d,'0' ;char -decot1: - sub b ;subtract - jc decot2 - inr d ;increment char - jmp decot1 -decot2: - add b ;add back in - push psw ;save result - mov a,d ;get digit - cpi '0' ;zero? - jnz decot3 - mov a,c ;get zero flag - ora a ;0=no zero - jz decot4 -decot3: - mov a,d ;get digit - call cout ;print it -decot4: - pop psw ;get A - pop d ;restore DE - ret -; -; GXY Buffers -; -rcorder: - ds 1 ;0=row/col, else col/row -rcbase: - ds 1 ;0=org is 0,0, else org is 1,1 -cmdelay: - ds 1 ;number of milliseconds to delay for CM - -; -; Begin Standout Mode -; Return with A=0 and Zero Flag Set if not done -; -stndout: - push b - push d - push h ;save regs - lxi h,z3env+80h ;pt to environment - mov a,m ;no terminal? - cpi ' '+1 - jc err - lxi d,17h ;pt to cls string - dad d - mvi d,0 ;no delay - call vidskp ;skip over CL string - call vidskp ;skip over CM string - call vidskp ;skip over CE string - mov a,m ;get first char of SO string - ora a ;if no string, error - jz err - call vidout ;output string with delay - jmp noerr - -; -; Terminate Standout Mode -; Return with A=0 and Zero Flag Set if not done -; -stndend: - push b - push d - push h ;save regs - lxi h,z3env+80h ;pt to environment - mov a,m ;no terminal? - cpi ' '+1 - jc err - lxi d,17h ;pt to cls string - dad d - mvi d,0 ;no delay - call vidskp ;skip over CL string - call vidskp ;skip over CM string - call vidskp ;skip over CE string - call vidskp ;skip over SO string - mov a,m ;get first char of SE string - ora a ;if no string, error - jz err - call vidout ;output string with delay - jmp noerr - -; -; Initialize Terminal -; Affect No Registers -; -tinit: - push h ;save regs - push d - push psw - lxi h,z3env+80h ;pt to environment - mov a,m ;no terminal? - cpi ' '+1 - jc tid - lxi d,17h ;pt to cls string - dad d - mvi d,0 ;no delay - call vidskp ;skip over CL string - call vidskp ;skip over CM string - call vidskp ;skip over CE string - call vidskp ;skip over SO string - call vidskp ;skip over SE string - mov a,m ;get first char of TI string - ora a ;if no string, error - jz tid - call vidout ;output string with delay -tid: - pop psw ;done - pop d - pop h - ret - -; -; De-Initialize Terminal -; Affect No Registers -; -dinit: - push h ;save regs - push d - push psw - lxi h,z3env+80h ;pt to environment - mov a,m ;no terminal? - cpi ' '+1 - jc tid - lxi d,17h ;pt to cls string - dad d - mvi d,0 ;no delay - call vidskp ;skip over CL string - call vidskp ;skip over CM string - call vidskp ;skip over CE string - call vidskp ;skip over SO string - call vidskp ;skip over SE string - call vidskp ;skip over TI string - mov a,m ;get first char of TE string - ora a ;if no string, error - jz tid - call vidout ;output string with delay - jmp tid - -; -; VIDOUT - Output video string pted to by HL -; Output also a delay contained in the D register -; -vidout: - mov a,m ;get next char - ora a ;done if zero - jz vid2 - inx h ;pt to next - cpi '\' ;literal value? - jnz vid1 - mov a,m ;get literal char - inx h ;pt to after it -vid1: - call cout ;output char - jmp vidout -vid2: - mov a,d ;output delay and fall thru to VIDELAY - -; -; VIDELAY pauses for the number of milliseconds indicated by the A -; register. VIDELAY assumes a ZCPR3 environment and uses it to determine -; processor speed. -; -videlay: - push psw ;save regs - push b - push d - push h - mov c,a ;save count in C - ora a ;no delay? - jz done - lxi h,z3env ;pt to environment - lxi d,2Bh ;offset to processor speed - dad d - mov a,m ;get processor speed - ora a ;zero? - jnz vidl1 - mvi a,4 ;assume 4 MHz -vidl1: - mov b,a ;processor speed in B -vidl2: - push b ;delay 1 ms - call delay - pop b - dcr c ;count down - jnz vidl2 -done: - pop h ;restore regs - pop d - pop b - pop psw - ret -; -; Delay 1 ms at Clock speed -; -delay: - call del1 ;delay 1 ms at 1MHz - dcr b ;count down clock speed - jnz delay - ret -; -; Delay 1 ms at 1MHz -; -del1: - mvi c,20 ;20 loops of 51 cycles each ~ 1000 cycles -del1a: - xthl ;18 cycles - xthl ;+18 = 36 cycles - dcr c ;+ 5 = 41 cycles - jnz del1a ;+10 = 51 cycles - ret - -; -; VIDSKP - Skip over video string pted to by HL; pt to byte after string -; -vidskp: - mov a,m ;get next char - inx h ;pt to next - ora a ;done if zero - rz - cpi '\' ;literal value? - jnz vidskp ;continue if not - inx h ;pt to after literal value - jmp vidskp - -; -; Print A as 2 Hex Chars -; -pa2hc: - push psw - push b - mov b,a ;value in B - rlc - rlc - rlc - rlc - call pa2hc1 - mov a,b ;get value - call pa2hc1 - pop b - pop psw - ret -pa2hc1: - ani 0fh - adi '0' ;to ASCII - cpi '9'+1 - jc pa2hc2 - adi 7 ;to letter -pa2hc2: - jmp cout - -; -; Skip Spaces -; -sksp: - mov a,m ;skip to non-space - cpi ' ' - rnz - inx h - jmp sksp - -; -;EDITOR BUFFERS -; -BLOCK: - DS 2 ;ADDRESS OF CURRENT BLOCK -BUFFER: - DS 2 ;PTR TO FREE SPACE -EINDEX: - DS 1 ;INDEX ENTRY -EDRUN: - DS 1 ;FLAG SAYING THAT EDITOR IS RUNNING - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/DEV.COM b/Source/Images/d_bp/u15/DEV.COM deleted file mode 100644 index e45fab2a..00000000 Binary files a/Source/Images/d_bp/u15/DEV.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/DEV.MAC b/Source/Images/d_bp/u15/DEV.MAC deleted file mode 100644 index 0b44fef8..00000000 --- a/Source/Images/d_bp/u15/DEV.MAC +++ /dev/null @@ -1,493 +0,0 @@ -; -; PROGRAM: DEV3 -; AUTHOR: RICHARD CONN -; VERSION: 1.0 -; DATE: 4 Apr 84 -; PREVIOUS VERSION: None -; DERIVATION: DEVICE2 of ZCPR2 -; -VERS EQU 10 -z3env SET 0f400h - -; -; DEV is a program which enables the user to manipulate the -; extended ZCPR3 redirectable device drivers. It allows the user to -; perform the following functions: -; -; o Display the Names of the Current Devices -; o Set One or More of the Current Devices -; o Ask for Help -; -; The format of the DEV command is: -; -; DEV or DEV // <-- Ask for Help -; DEV command,command,command ... <-- Issue Commands -; -; where "command" may take the following forms: -; -; DISPLAY ALL <-- Display Names of All Devices -; DISPLAY CON <-- Display Names of Consoles -; DISPLAY LST <-- Display Names of Printers -; DISPLAY RDR <-- Display Names of Readers -; DISPLAY PUN <-- Display Names of Punches -; -; CON:=name <-- Select Console -; LST:=name <-- Select Printer -; RDR:=name <-- Select Reader -; PUN:=name <-- Select Punch -; - -; -; Constants -; -tbuff equ 80h -cr equ 0dh -lf equ 0ah - -; -; SYSLIB Routines -; - ext z3init,getiop - ext cin,cout,epstr,eprint,cline,crlf - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Start of Program -; - - call getiop ;check for initialization - mov a,h - ora l ;must NOT be zero - jnz start0 - call banner - call eprint - db cr,lf,'DEV NOT Initialized with I/O Base',0 -abort: - call eprint - db ' -- Aborting',0 - ret - -start0: - call status ;check for drivers - jnz start1 - call banner - call eprint - db cr,lf,'Redirection Not Supported',0 - jmp abort - -start1: - lxi h,tbuff ;pt to input buffer - call cline ;extract and save command line - call sblank ;skip to non-blank - ora a ;EOL? - jz help ;select help - cpi '/' ;help? - jnz docmd ;run command subroutine - -; -; Print Help Message -; -help: - call banner - call eprint - db cr,lf,'DEV - Quick Redirectable I/O Device Selector' - db cr,lf,'Syntax:' - db cr,lf,' DEV or DEV // ' - db '<-- Ask for Help' - db cr,lf,' DEV Command,Command, ... ' - db '<-- Issue Commands' - db cr,lf,'where "command" may take the following forms:' - db cr,lf,' DISPLAY=ALL ' - db '<-- Display All Devices' - db cr,lf,' DISPLAY=CON ' - db '<-- Display Consoles' - db cr,lf,' DISPLAY=LST ' - db '<-- Display Printers' - db cr,lf,' DISPLAY=RDR ' - db '<-- Display Readers' - db cr,lf,' DISPLAY=PUN ' - db '<-- Display Punches' - db cr,lf - db cr,lf,' CON:=name <-- Select Console' - db cr,lf,' LST:=name <-- Select Printer' - db cr,lf,' RDR:=name <-- Select Reader' - db cr,lf,' PUN:=name <-- Select Punch' - db 0 - ret -; -; Print Banner -; -banner: - call eprint - db 'DEV, Version ' - db (vers/10)+'0','.',(vers mod 10)+'0',0 - ret -; -; Skip to Non-Blank Routine -; -sblank: - mov a,m ;get char - inx h ;pt to next - cpi ' ' ;blank? - jz sblank ;continue if so - dcx h ;pt to non-blank - ret - -; -; Skip until a delimiter encountered -; -sdelm: - mov a,m ;get char - inx h ;pt to next - cpi ' '+1 ; or less? - rc - cpi '=' - rz - cpi ',' - rz - jmp sdelm - -; -; DOCMD -- This subroutine processes the command line pted to by HL. -; It is the Main Line if a DEVICE command line is given, it is just -; a subroutine if the user is in interactive mode. -; -docmd: - call docmd1 ;do first command - call sdelm ;skip to delim - cpi ',' ;another command? - jz docmd - ret -docmd1: - mov a,m ;get command letter - cpi 'C' ;console assignment? - jz docon - cpi 'D' ;display? - jz dodisp - cpi 'L' ;LST:? - jz dolst - cpi 'P' ;PUN:? - jz dopun - cpi 'R' ;RDR:? - jz dordr -cerr: - call eprint - db cr,lf,'Error at -- ',0 - call epstr ;print rest - ret - -; -; Do LST: Assignment -; -dolst: - call eprint - db ' LST:',0 - mvi a,3 ;select LST: - jmp assign - -; -; Do PUN: Assignment -; -dopun: - call eprint - db ' PUN:',0 - mvi a,2 ;select PUN: - jmp assign - -; -; Do RDR: Assignment -; -dordr: - call eprint - db ' RDR:',0 - mvi a,1 ;select RDR: - jmp assign - -; -; Do CON: Assignment -; -docon: - call eprint - db ' CON:',0 - mvi a,0 ;select console -; -; Do Assignment in General -; -assign: - mov b,a ;save A in B - push b ;save BC - call sdelm ;skip to delimiter - pop b ;get BC - cpi ' ' - jz asgn0 - cpi '=' - jnz cerr -asgn0: - mov a,b ;get A back - sta logical ;save logical device number - shld name ;save ptr to mnemonic - mov b,a ;number in B - inr b ;add 1 for offset - call status ;get device status - dcx h ;pt to previous - dcx h -asgn1: - inx h ;pt to next - inx h - dcr b ;count down - jnz asgn1 - mov c,m ;get number of devices in C - mov a,c ;check for value of zero - ora a - jnz asgn2 - lhld name ;pt to error name - jmp cerr -asgn2: - lda logical ;get logical device number - mov b,a ;... in B - push b ;save device count - dcr c ;pt to previous - call namer ;get name - xchg ;name pted to by DE - lhld name ;user's name pted to by HL -asgn3: - ldax d ;get name of device - cpi ' '+1 ;done? - jc asgn3a - cmp m ;compare to user - jnz asgn4 - inx h ;pt to next - inx d - jmp asgn3 -asgn3a: - mov a,m ;get user - cpi ' '+1 ;done? - jc asgn3b - cpi ',' ;done? - jnz asgn4 -asgn3b: - pop b ;match -- C-1 is selected device - dcr c ;decrement - call select ;select device - lda logical ;get logical device in A - call current ;print name of device selected - lhld name ;pt to name for scan continuation - ret -asgn4: - pop b ;count down - dcr c ;count down - jnz asgn2 ;continue - lhld name ;pt to invalid name - call eprint - db cr,lf,' Invalid Name at -- ',0 - call epstr - lhld name ;pt to name for scan continuation - ret - -; -; Display Devices and Assignments -; -dodisp: - call sdelm ;skip to delimiter - ora a ;none=all - jz dispall - mov a,m ;get char after delimiter - cpi 'A' ;all? - jz dispall - cpi 'C' ;CON: - jz dispcon - cpi 'L' ;LST: - jz displst - cpi 'P' ;PUN: - jz disppun - cpi 'R' ;RDR: - jz disprdr - jmp cerr -dispall: - call dispcon ;successive displays - call disprdr - call eprint - db cr,lf,'Strike Any Key -- ',0 - call cin - call disppun - jmp displst -dispcon: - call eprint - db cr,lf,'CON:',0 - mvi a,0 ;select CON: - call disp - jmp curr -displst: - call eprint - db cr,lf,'LST:',0 - mvi a,3 ;select LST: - call disp - jmp curr -disprdr: - call eprint - db cr,lf,'RDR:',0 - mvi a,1 ;select RDR: - call disp - jmp curr -disppun: - call eprint - db cr,lf,'PUN:',0 - mvi a,2 ;select PUN: - call disp -; -; Print Name of Current Device -; -curr: - call crlf ;new line -current: - push h ;save ptr - mov b,a ;save number in B - push b ;save B - call eprint - db ' Assignment is ',0 - push b ;save B - call status ;get status - pop b ;get B - inr b ;add 1 for offset - dcx h ;back up -curr1: - inx h ;pt to next - inx h - dcr b ;count down - jnz curr1 - pop b ;get logical number in B - mov c,m ;get physical number in C - call pname0 ;print first part of name only - pop h ;get ptr - ret -; -; Print Names of All Physical Devices for a Logical Device -; -disp: - push h ;save char ptr - push psw ;save device number - call eprint - db ' Devices --',0 - mov b,a ;logical device in B - push b ;save for later - push b ;save it - call status ;get status report - pop b ;get logical device number - inr b ;add 1 for offset - dcx h ;back up - dcx h -disp1: - inx h ;pt to next - inx h - dcr b ;count down - jnz disp1 - pop b ;get B back - mov c,m ;get count of devices - mov a,c ;check for none - ora a - jz disp3 -disp2: - push b ;save values - dcr c ;pt to next name - call eprint - db cr,lf,' ',0 - call pnamer ;print name (B=logical, C=physical) - pop b ;get count - dcr c ;count down - jnz disp2 -disp3: - pop psw - pop h - ret -; -; Routine to Print Name of Selected Device -; B=logical number, C=physical number -; -pnamer: - push b ;save BC - call pname0 ;print first part of name - call eprint ;print separator - db ' - ',0 - call epstr ;print rest as string - pop b ;restore BC - ret -; -; Print first part of selected device name -; -pname0: - call namer ;get ptr to string - mvi b,8 ;at most 8 chars -pname1: - mov a,m ;get char - inx h ;pt to next char - cpi ' ' ;end of name? - jz pname2 - call cout ;print char - dcr b ;count down - jnz pname1 - ret -pname2: - mvi a,' ' ;print spaces - call cout - dcr b ;count down - jnz pname2 - ret - -; -; Basic Interface Routines -; -status: - lxi d,0 ;Offset 0 -runit: - call getiop ;device driver base - dad d - pchl -select: - lxi d,3 ;Offset 3 - jmp runit -namer: - lxi d,6 ;Offset 6 - jmp runit - -; -; Buffers -; -logical: - ds 1 ;Logical Device Number -name: - ds 2 ;Pointer to User-Supplied Name - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/DEV10.LBR b/Source/Images/d_bp/u15/DEV10.LBR deleted file mode 100644 index 21787d22..00000000 Binary files a/Source/Images/d_bp/u15/DEV10.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/DEVICE.COM b/Source/Images/d_bp/u15/DEVICE.COM deleted file mode 100644 index 01cd2c6f..00000000 Binary files a/Source/Images/d_bp/u15/DEVICE.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/DEVICE.MAC b/Source/Images/d_bp/u15/DEVICE.MAC deleted file mode 100644 index a3809ed7..00000000 --- a/Source/Images/d_bp/u15/DEVICE.MAC +++ /dev/null @@ -1,577 +0,0 @@ -; -; PROGRAM: DEVICE3 -; AUTHOR: RICHARD CONN -; VERSION: 1.0 -; DATE: 4 Apr 84 -; PREVIOUS VERSION: None -; DERIVATION: DEVICE2 from ZCPR2 -; -VERS EQU 10 -z3env SET 0f400h - -; -; DEVICE is a program which enables the user to manipulate the -; extended ZCPR3 redirectable device drivers. It allows the user to -; perform the following functions: -; -; o Display the Names of the Current Devices -; o Set One or More of the Current Devices -; o Ask for Help -; -; The format of the DEVICE command is: -; -; DEVICE <-- Enter Interactive Mode -; DEVICE // <-- Ask for Help -; -; In Interactive Mode, DEVICE commands are: -; -; DISPLAY ALL <-- Display Names of All Devices -; DISPLAY CON <-- Display Names of Consoles -; DISPLAY LST <-- Display Names of Printers -; DISPLAY RDR <-- Display Names of Readers -; DISPLAY PUN <-- Display Names of Punches -; -; CON: name <-- Select Console -; LST: name <-- Select Printer -; RDR: name <-- Select Reader -; PUN: name <-- Select Punch -; - -; -; Constants -; -fcb equ 5ch -cr equ 0dh -lf equ 0ah - -; -; SYSLIB Routines -; - ext z3init,getiop - ext cin,cout,epstr,eprint,cline,bline,codend,caps - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Start of Program -; - - call getiop ;check for initialization - mov a,h - ora l ;must NOT be zero - jnz start0 - call banner - call eprint - db cr,lf,'DEVICE NOT Initialized with I/O Base',0 -abort: - call eprint - db ' -- Aborting',0 - ret - -start0: - call status ;check for drivers - jnz start1 - call banner - call eprint - db cr,lf,'Redirection Not Supported',0 - jmp abort - -start1: - lda fcb+1 ;get first char of argument - cpi '/' ;help? - jnz command ;run command subroutine - -; -; Print Help Message -; -help: - call banner - call eprint - db cr,lf,'DEVICE - Interactive Redirectable I/O Driver Selection' - db cr,lf,'Syntax:' - db cr,lf,' DEVICE <-- Enter Interactive Mode' - db cr,lf,' DEVICE // <-- Print Help Message' - db 0 - ret -; -; Print General Help Message -; -genhelp: - call eprint - db 'Enter Command Character:' - db cr,lf,' D - Display all or selected devices' - db cr,lf,' C - Select Console Device' - db cr,lf,' L - Select List Device' - db cr,lf,' P - Select Punch Device' - db cr,lf,' R - Select Reader Device' - db cr,lf,' X - Exit Program' - db 0 - ret -; -; Print Display Help Message -; -disphelp: - call eprint - db cr,lf,'Enter Devices to Display:' - db cr,lf,' A - All' - db cr,lf,' C - Consoles' - db cr,lf,' L - Lists' - db cr,lf,' P - Punches' - db cr,lf,' R - Readers' - db 0 - ret -; -; Print Banner -; -banner: - call eprint - db 'DEVICE3, Version ' - db (vers/10)+'0','.',(vers mod 10)+'0',0 - ret -; -; Skip to Non-Blank Routine -; -sblank: - mov a,m ;get char - inx h ;pt to next - cpi ' ' ;blank? - jz sblank ;continue if so - dcx h ;pt to non-blank - ret - -; -; COMMAND -- This is an interactive mainline which allows user input, -; runs command lines via DOCMD, and permits Help and Comments -; -command: - call banner - call eprint - db ' - Interactive I/O Device Selection Utility' - db cr,lf,'Strike ? for Help' - db 0 -cloop: - call eprint - db cr,lf,'DEVICE3 Command? ',0 - lxi h,majcmd ;process major command - call ccheck ;look for and run command - mov a,b ;get char - call cout ;echo it - call eprint - db ' - Invalid Command',0 - jmp cloop -; -; Command Table for Major Commands -; -majcmd: - db '?' ;help - dw genhelp - db ' ' ;skip command - dw exit1 - db cr ;skip command - dw exit1 - db 'D' ;display devices - dw display - db 'C' ;Select Console - dw console - db 'L' ;Select List - dw list - db 'P' ;Select Punch - dw punch - db 'R' ;Select Reader - dw reader - db 'X' ;Exit - dw exit - db 0 ;end of table -; -; Display major command -; -display: - pop psw ;clear return address - call eprint - db 'Display Devices for ',0 - lxi h,discmd ;table of display commands - call ccheck - mov a,b - call cout ;print error command - call eprint - db ' - Invalid Command',cr,lf,0 - jmp display -; -; Display Command Table -; -discmd: - db '?' ;help - dw disphelp - db cr ;exit - dw exit1 - db ' ' ;exit - dw exit1 - db 'A' ;all - dw dispall - db 'C' ;console - dw dispcon - db 'L' ;list - dw displst - db 'P' ;punch - dw disppun - db 'R' ;reader - dw disprdr - db 0 ;end of table - -; -; Console major command -; -console: - call eprint - db 'Select Console ',0 - call getname - mvi a,0 ;select CON: - jmp assign -; -; List major command -; -list: - call eprint - db 'Select List ',0 - call getname - mvi a,3 ;select LST: - jmp assign -; -; Punch major command -; -punch: - call eprint - db 'Select Punch ',0 - call getname - mvi a,2 ;select PUN: - jmp assign -; -; Reader major command -; -reader: - call eprint - db 'Select Reader ',0 - call getname - mvi a,1 ;select RDR: - jmp assign -; -; Exit major command -; -exit: - call eprint - db 'Exit',0 - pop psw ;clear stack -exit1: - ret ;exit to OS or DEVICE (if entry at EXIT1) -; -; Check for Command in A in Table Pted to by HL -; -ccheck: - call cin ;get user input - call caps ;capitalize it - mov b,a ;save command in B -cc1: - mov a,m ;get command letter - ora a ;end of table? - rz - cmp b ;match? - jz cc2 - inx h ;skip to next - inx h - inx h - jmp cc1 -cc2: - inx h ;pt to address - mov e,m ;get low - inx h - mov d,m ;get high - lxi h,cloop ;set return address - xthl ;return address on stack - xchg ;address of routine in HL - pchl ;"call" routine -; -; Get Device Name from User -; Return with NZ if name input, else reissue command -; -getname: - call eprint - db ' [Enter a Device Name] ',0 - call codend ;pt to end of available code - mvi m,20 ;set length of line - mvi a,0ffh ;capitalize - call bline - call sblank ;skip to non-blank - mov a,m ;empty line? - ora a ;0=yes - jz gnabort ;abort input if so - shld name ;set ptr to name - ret ;NZ means name present -gnabort: - pop psw ;clear stack - ret ;return to main command processor - -; -; Do Assignment in General -; -assign: - mov b,a ;save A in B - sta logical ;save logical device number - inr b ;add 1 for offset - call status ;get device status - dcx h ;pt to previous - dcx h -asgn1: - inx h ;pt to next - inx h - dcr b ;count down - jnz asgn1 - mov c,m ;get number of devices in C - mov a,c ;check for value of zero - ora a - jnz asgn2 - call eprint - db cr,lf,' Invalid Device Name: ',0 - lhld name ;pt to error name - call epstr ;print name - ret -asgn2: - lda logical ;get logical device number - mov b,a ;... in B - push b ;save device count - dcr c ;pt to previous - call namer ;get name - xchg ;name pted to by DE - lhld name ;user's name pted to by HL -asgn3: - ldax d ;get name of device - cpi ' '+1 ;done? - jc asgn3a - cmp m ;compare to user - jnz asgn4 - inx h ;pt to next - inx d - jmp asgn3 -asgn3a: - mov a,m ;get user - cpi ' '+1 ;done? - jc asgn3b - cpi ',' ;done? - jnz asgn4 -asgn3b: - pop b ;match -- C-1 is selected device - dcr c ;decrement - call select ;select device - lda logical ;get logical device in A - call curr ;print name of device selected - lhld name ;pt to name for scan continuation - ret -asgn4: - pop b ;count down - dcr c ;count down - jnz asgn2 ;continue - lhld name ;pt to invalid name - call eprint - db cr,lf,'Invalid Name at -- ',0 - call epstr - lhld name ;pt to name for scan continuation - ret - -; -; Display Devices -; -dispall: - call eprint - db 'All Devices',cr,lf - db ' CON: Devices --',0 - call dc1 ;successive displays - call eprint - db cr,lf,' RDR: Devices --',0 - call dr1 - call eprint - db cr,lf,'Strike Any Key -- ',0 - call cin - call eprint - db cr,lf,' PUN: Devices --',0 - call dp1 - call eprint - db cr,lf,' LST: Devices --',0 - jmp dl1 -dispcon: - call eprint - db 'CON: Devices',0 -dc1: - mvi a,0 ;select CON: - call disp - jmp curr -displst: - call eprint - db 'LST: Devices',0 -dl1: - mvi a,3 ;select LST: - call disp - jmp curr -disprdr: - call eprint - db 'RDR: Devices',0 -dr1: - mvi a,1 ;select RDR: - call disp - jmp curr -disppun: - call eprint - db 'PUN: Devices',0 -dp1: - mvi a,2 ;select PUN: - call disp -; -; Print Name of Current Device -; -curr: - push h ;save ptr - mov b,a ;save number in B - push b ;save B - call eprint - db cr,lf,' Current Assignment: ',0 - push b ;save B - call status ;get status - pop b ;get B - inr b ;add 1 for offset - dcx h ;back up -curr1: - inx h ;pt to next - inx h - dcr b ;count down - jnz curr1 - pop b ;get logical number in B - mov c,m ;get physical number in C - call pname0 ;print first part of name only - pop h ;get ptr - ret -; -; Print Names of All Physical Devices for a Logical Device -; -disp: - push h ;save char ptr - push psw ;save device number - mov b,a ;logical device in B - push b ;save for later - push b ;save it - call status ;get status report - pop b ;get logical device number - inr b ;add 1 for offset - dcx h ;back up - dcx h -disp1: - inx h ;pt to next - inx h - dcr b ;count down - jnz disp1 - pop b ;get B back - mov c,m ;get count of devices - mov a,c ;check for none - ora a - jz disp3 -disp2: - push b ;save values - dcr c ;pt to next name - call eprint - db cr,lf,' ',0 - call pnamer ;print name (B=logical, C=physical) - pop b ;get count - dcr c ;count down - jnz disp2 -disp3: - pop psw - pop h - ret -; -; Routine to Print Name of Selected Device -; B=logical number, C=physical number -; -pnamer: - push b ;save BC - call pname0 ;print first part of name - call eprint ;print separator - db ' - ',0 - call epstr ;print rest as string - pop b ;restore BC - ret -; -; Print first part of selected device name -; -pname0: - call namer ;get ptr to string - mvi b,8 ;at most 8 chars -pname1: - mov a,m ;get char - inx h ;pt to next char - cpi ' ' ;end of name? - jz pname2 - call cout ;print char - dcr b ;count down - jnz pname1 - ret -pname2: - mvi a,' ' ;print spaces - call cout - dcr b ;count down - jnz pname2 - ret - -; -; Basic Interface Routines -; -status: - lxi d,0 ;Offset 0 -runit: - call getiop ;device driver base - dad d - pchl -select: - lxi d,3 ;Offset 3 - jmp runit -namer: - lxi d,6 ;Offset 6 - jmp runit - -; -; Buffers -; -logical: - ds 1 ;Logical Device Number -name: - ds 2 ;Pointer to User-Supplied Name - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/DEVICE10.LBR b/Source/Images/d_bp/u15/DEVICE10.LBR deleted file mode 100644 index 0d2eb318..00000000 Binary files a/Source/Images/d_bp/u15/DEVICE10.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/DIFF.COM b/Source/Images/d_bp/u15/DIFF.COM deleted file mode 100644 index 49eb4a89..00000000 Binary files a/Source/Images/d_bp/u15/DIFF.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/DIFF.MAC b/Source/Images/d_bp/u15/DIFF.MAC deleted file mode 100644 index 7b14b767..00000000 --- a/Source/Images/d_bp/u15/DIFF.MAC +++ /dev/null @@ -1,725 +0,0 @@ -; -; PROGRAM: DIFF -; AUTHOR: Richard Conn -; VERSION: 2.0 -; DATE: 18 MAY 84 -; PREVIOUS VERSIONS: 1.6 (16 JAN 83) -; PREVIOUS VERSIONS: 1.5 (9 JAN 83), 1.4 (6 JAN 83), 1.3 (4 JAN 83) -; PREVIOUS VERSIONS: 1.2 (19 DEC 82), 1.1 (8 DEC 82), 1.0 (24 JULY 82) -; DERIVATION: COMPARE, VERSION 1.1 -; -VERS EQU 20 -z3env SET 0f400h - -; -; DIFF is designed to provide the user with a convenient method -; to compare the contents of two files. It is invoked by one of two basic -; forms: -; -; DIFF filename.typ -; or -; DIFF file1.typ file2.typ -; -; The first form compares the file named "filename.typ" on drive A: -; to the file of the same name on drive B:; the second form compares the -; file named "file1.typ" on drive A: to the file named "file2.typ" on drive -; B:. Wild cards may NOT be used. The listing generated by the program gives -; relative offsets (in hex and decimal) as well as the different byte values -; in hex, decimal, and ASCII. -; - -; SIZE OF BUFFER -BLIMIT EQU 32 ; NUMBER OF 128-BYTE BLOCKS -BSIZE EQU BLIMIT*128 ; 4K - -; CP/M Constants -CPM equ 0 ; CP/M Warm Boot -BUFF equ CPM+80H ; Temporary Buffer -CR equ 0DH ; -LF equ 0AH ; -CTRLC EQU 'C'-'@' -CTRLX EQU 'X'-'@' - -; SYSLIB and Z3LIB ROUTINES - EXT Z3INIT,ZFNAME,GETCRT - EXT PHL4HC,PHLDC,PA2HC,PADC - EXT BDOS,INITFCB - EXT LOGUD,RETUD - EXT F$OPEN,F$CLOSE,F$READ - EXT CAPS,CIN,COUT,CRLF,MOVEB,PRINT - EXT CODEND - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env -; -; SET BUFFER LOCATIONS -; - CALL CODEND ; ALLOCATE BUFFER SPACE - SHLD INLINE ; SET PTR TO INPUT LINE - LXI D,100H ; BUFFER SIZE - DAD D - SHLD BUFF1 ; SOURCE 1 BUFFER - LXI D,BSIZE ; SIZE OF BUFFER - INR D ; ADD 1 - DAD D - SHLD BUFF2 ; SOURCE 2 BUFFER -; -; SET OPERATIONS FLAGS -; - XRA A ; A=0 - STA MULT ; SET NO MULTIPLE RUN - STA COMP ; SET NO COMPARE ONLY - CALL GETCRT ; GET CRT CHARACTERISTICS - INX H ; PT TO TEXT LINE COUNT - INX H - MOV A,M ; GET COUNT - STA LSET ; SET COUNTER -; -; EXTRACT COMMAND LINE INFORMATION -; - LHLD INLINE ; PT TO INPUT LINE BUFFER - XCHG ; ... IN DE - LXI H,BUFF+1 ; PROCESS OPTIONS IN BUFFER - MVI B,80H ; ARBITRARY 80H BYTES - CALL MOVEB - XCHG ; PT TO FIRST CHAR WITH HL - CALL SBLANK ; SKIP SPACES - ORA A ; EOL? - JZ PRHELP ; PRINT HELP IF SO - CPI '/' ; ASKING FOR HELP? - JZ PRHELP - LXI D,FCBS ; PT TO SOURCE FCB - MVI A,0 ; DIR BEFORE DU - CALL ZFNAME ; EXTRACT NAME AND DIRECTORY DATA - MOV A,M ; GET NEXT CHAR - CPI ',' - JZ START2 - PUSH H ; SAVE PTR - LXI H,FCBS+1 ; NO 2ND NAME, SO SET IT TO SAME AS FIRST - LXI D,FCBD+1 - MVI B,11 ; 11 BYTES - CALL MOVEB - CALL RETUD ; GET CURRENT USER/DISK - MOV A,B ; GET DISK - INR A ; A=1 - STA FCBD ; SET DISK - MOV A,C ; GET USER - STA FCBD+13 ; PT TO S1 FOR USER - POP H ; GET PTR - JMP START3 -START2: - INX H ; PT TO NEXT CHAR AFTER COMMA - LXI D,FCBD ; SET DEST FCB - MVI A,0 ; DIR BEFORE DU - CALL ZFNAME ; PROCESS NAME - LDA FCBD+1 ; CHECK FOR NO NAME - CPI ' ' ; SPACE MEANS NO NAME - JNZ START3 - PUSH H ; SAVE PTR - PUSH B ; SAVE USER/DISK - LXI H,FCBS+1 ; SET NAMES THE SAME - LXI D,FCBD+1 ; COPY SOURCE TO DEST - MVI B,11 ; 11 BYTES - CALL MOVEB - POP B ; RESTORE BC - POP H ; RESTORE PTR -START3: - CALL SBLANK ; SKIP SPACES - CALL OPTS ; PROCESS OPTIONS -START4: - LXI H,FCBS ; SET UP SOURCE FCB - CALL QCHECK ; NO AMBIGUOUS ENTRIES PERMITTED - LXI H,FCBD ; SET UP DESTINATION FCB - CALL QCHECK ; NO AMBIGUOUS ENTRIES PERMITTED - CALL RETUD ; GET CURRENT DU IN BC - LXI H,FCBS ; PT TO SOURCE DISK - MOV A,M ; GET SOURCE DISK - ORA A ; CURRENT? - JNZ START5 - MOV A,B ; SET CURRENT DISK - INR A ; ADJUST FOR A=1 -START5: - STA SDISK - MVI M,0 ; CLEAR SOURCE DISK - LDA FCBS+13 ; GET USER - STA SUSER - LXI H,FCBD ; GET DESTINATION DISK - MOV A,M ; GET DEST DISK - ORA A ; CURRENT? - JNZ START6 - MOV A,B ; SET CURRENT DISK - INR A ; ADJUST FOR A=1 -START6: - STA DDISK - MVI M,0 ; CLEAR DEST DISK - LDA FCBD+13 ; GET USER - STA DUSER -MLOOP: - CALL BANNER ; PRINT BANNER - CALL PRS1 ; PRINT SOURCE FILE NAMES - CALL PRS2 - LDA MULT ; MULTIPLE RUNS - ORA A - JZ MLOOP1 - CALL PRINT - DB CR,LF,' Type ^C to Abort or RETURN to Proceed - ',0 - CALL CIN ; GET RESPONSE - CALL CAPS ; CAPITALIZE - CPI CTRLC ; ABORT? - RZ - MVI C,13 ; RESET DISKS - CALL BDOS -MLOOP1: - CALL LOGS ; LOG IN SOURCE - LXI D,FCBS ; TRY TO OPEN SOURCE 1 - CALL INITFCB ; INIT FCB - CALL F$OPEN ; Z IF NO ERROR - JNZ FERR - CALL LOGD ; LOG IN DEST DISK/USER - LXI D,FCBD ; TRY TO OPEN SOURCE 2 - CALL INITFCB ; INIT FCB - CALL F$OPEN - JNZ FERR - XRA A ; A=0 - STA FIRST ; SET FLAG FOR FIRST ERROR - LXI H,0 ; INIT OFFSET - SHLD OFFSET - CALL VERIFY ; PERFORM VERIFICATION - LDA FIRST ; ANY ERRORS? - ORA A ; 0=NO ERRORS - JNZ MLOOP2 - CALL PRINT - DB CR,LF,' Files are Identical',0 -MLOOP2: - LDA MULT ; CHECK FOR MULTIPLE RUNS - ORA A ; 0=NO - RZ - CALL CRLF ; NEW LINES - CALL CRLF - JMP MLOOP -FERR: - CALL PRINT - DB CR,LF,' File Not Found -- ',0 - CALL PRFN - JMP MLOOP2 - -; -; PROCESS OPTIONS -; -OPTS: - MOV A,M ; GET NEXT OPTION CHAR - INX H ; PT TO NEXT - ORA A ; END OF LINE? - RZ - CPI ' ' ; SKIP SPACES - JZ OPTS - LXI D,OTAB ; PT TO OPTION TABLE - MOV B,A ; OPTION CHAR IN B -OPTS1: - LDAX D ; GET TABLE CHAR - ORA A ; OPTION NOT FOUND? - JZ OPTSE ; PROCESS ERROR - CMP B ; MATCH? - JZ OPTS2 - INX D ; SKIP TO NEXT - INX D - INX D - JMP OPTS1 -OPTS2: - XCHG ; USE HL - INX H ; GET ADDRESS - MOV A,M ; GET LOW - INX H - MOV H,M ; GET HIGH - MOV L,A ; PUT LOW - XCHG ; DE PTS TO OPTION ADDRESS, HL TO NEXT BYTE - LXI B,OPTS ; SET UP RETURN ADDRESS - PUSH B - PUSH D ; SET UP OPTION ADDRESS - RET ; "RUN" OPTION -OPTSE: - CALL PRHELP ; PRINT HELP MESSAGE - POP PSW ; CLEAR RETURN ADDRESS - RET ; RETURN TO OPSYS -; -; OPTION TABLE -; -OTAB: - DB 'C' ; COMPARE ONLY - DW SCOMPF - DB 'M' ; MULTIPLE RUN - DW SMULTF - DB 0 ; END OF TABLE -; -; SET COMPARE FLAG -; -SCOMPF: - MVI A,0FFH ; SET FLAG - STA COMP - RET -; -; SET MULTIPLE RUN FLAG -; -SMULTF: - MVI A,0FFH ; SET FLAG - STA MULT - RET -; -; SKIP TO NON-BLANK CHAR -; -SBLANK: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CPI ' ' ; BLANK? - JZ SBLANK - DCX H ; PT TO NON-BLANK - RET - -; -; PRINT HELP MESSAGE -; -PRHELP: - CALL BANNER ; PRINT BANNER - CALL PRINT - DB CR,LF,'Syntax:' - DB CR,LF,' DIFF ufn1,ufn2 o... -or- DIFF ufn o...' - db cr,lf,'Options:' - db cr,lf,' C Compare Files Only (Stop at First Difference)' - db cr,lf,' M Multiple Runs (Keep on prompting for disks)' - DB CR,LF,'Examples:' - DB CR,LF,' Command Files Compared' - DB CR,LF,' DIFF T.COM,A1: $$:T.COM, A1:T.COM' - DB CR,LF,' DIFF A:T.COM A$:T.COM, $$:T.COM' - DB CR,LF,' DIFF A:T.COM,ROOT: A$:T.COM, ROOT:T.COM' - DB CR,LF,' DIFF A:T.COM,B:S.COM A$:T.COM, B$:S.COM' - DB 0 - RET - -; -; CHECK FOR ANY QUESTION MARKS FROM HL+1 TO HL+11 -; AFFECT ONLY AF REGISTERS IF OK -; -QCHECK: - PUSH H ; SAVE HL - PUSH B ; SAVE BC - INX H ; PT TO FIRST CHAR - MVI B,11 ; 11 BYTES - MVI C,'?' ; SCAN FOR '?' -QC: - MOV A,M ; GET BYTE - CMP C ; '?'? - JZ QC1 - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ QC - POP B ; RESTORE - POP H - RET -QC1: - POP B ; RESTORE AND ABORT - POP H - POP D ; CLEAR RETURN ADDRESS - XCHG ; FCB PTR IN DE - CALL CRLF - CALL PRFN ; PRINT FILE NAME - CALL PRINT - DB ' AFN not Allowed',CR,LF,0 - RET - -; -; PRINT BANNER -; -BANNER: - CALL PRINT - DB 'DIFF Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0' - DB 0 - RET - -; -; PRINT NAMES OF SOURCE FILES -; PRS1 -- SOURCE FILE 1 -; PRS2 -- SOURCE FILE 2 -; -PRS1: - CALL PRINT - DB CR,LF,'Source 1 -- ',0 - LXI H,SDISK ; PT TO FIRST BYTE - CALL PRUD - LXI D,FCBS ; SOURCE FCB - JMP PRFN ; PRINT FILE NAME -PRS2: - CALL PRINT - DB CR,LF,'Source 2 -- ',0 - LXI H,DDISK ; PT TO FIRST BYTE - CALL PRUD - LXI D,FCBD ; DESTINATION FCB - JMP PRFN ; PRINT FILE NAME - -; -; MAIN VERIFY ROUTINE -; -VERIFY: - LHLD BUFF1 ; PT TO BUFFER 1 - PUSH H ; SAVE PTR - CALL LOGS ; LOG IN SOURCE 1 - LXI D,FCBS ; SOURCE 1 FCB - CALL LOAD ; READ IN BLOCK - LDA BCNT ; GET OLD BLOCK COUNT - STA BCNT1 ; SAVE IT - LHLD BUFF2 ; PT TO BUFFER 2 - PUSH H ; SAVE PTR - CALL LOGD ; LOG IN SOURCE 2 - LXI D,FCBD ; SOURCE 2 FCB - CALL LOAD ; READ IN BLOCK - POP D ; DE PTS TO BUFF 2 - POP H ; HL PTS TO BUFF 1 - LDA BCNT ; CHECK FOR NO BLOCK READ - MOV B,A - LDA BCNT1 - ORA B - RZ ; DONE IF NONE READ -; -; VERIFY LOADED BUFFERS BY COMPARING THEM AND PRINTING DIFFERENCES -; -VERBLOCK: - MVI B,128 ; SCAN ONE BLOCK -VERBL: - LDAX D ; GET BYTE - CMP M ; COMPARE - CNZ NOMATCH ; PRINT DIFFERENCE - PUSH H ; INC OFFSET - LHLD OFFSET - INX H - SHLD OFFSET - POP H - INX H ; PT TO NEXT - INX D - DCR B ; COUNT DOWN - JNZ VERBL - LDA BCNT ; COUNT DOWN - DCR A - STA BCNT - LDA BCNT1 - DCR A - STA BCNT1 - JZ VEREQ - LDA BCNT ; CHECK FIRST BUFFER COUNT - ORA A - JNZ VERBLOCK ; CONTINUE COMPARE IF NOT EMPTY -VEREQ: - LDA BCNT ; CHECK FOR BOTH DONE - MOV B,A - LDA BCNT1 - ORA B ; IF ZERO, BOTH DONE AT SAME TIME AND CONTINUE - JZ VERIFY - LDA BCNT1 ; CHECK FOR ONE DONE BEFORE THE OTHER - ORA A ; 2ND DONE? - MVI C,'2' ; GET LETTER - JZ DONE1 - MVI C,'1' ; GET LETTER -; ONE FILE IS SHORTER THAN THE OTHER -- SAY SO -DONE1: - CALL PRINT - DB CR,LF,' Source ',0 - MOV A,C - CALL COUT ; PRINT LETTER - CALL PRINT - DB ' has terminated prematurely',0 - JMP DABORT -; MATCH ERROR -NOMATCH: - LDA COMP ; GET COMPARE FLAG - ORA A ; NZ=SIMPLE COMPARE - JNZ CABORT - PUSH H ; SAVE REGS - PUSH D - PUSH B - LDA FIRST ; FIRST TIME THRU? - ORA A ; 0=YES - JZ NMAT0 - LDA LCNT ; CHECK FOR NEW SCREEN - ORA A ; ZERO IF DONE - JNZ NMAT1 - CALL PRINT - DB CR,LF,' DIFF Pause -- Strike RETURN to Continue, ' - DB '^C to Abort, or ^X to Advance - ',0 - CALL CIN ; GET RESPONSE - CALL CAPS - CPI CTRLC ; ABORT? - JZ NMAT00 - CPI CTRLX ; ADVANCE? - JNZ NMAT0 - POP B ; CLEAR REGS - POP D - POP H - POP D ; CLEAR STACK - CALL PRINT - DB CR,LF,' DIFF Advancing',0 - RET ; RETURN TO VERIFY CALLER -NMAT00: - POP B ; CLEAR REGS - POP D - POP H - POP D ; CLEAR STACK - POP D -DABORT: - CALL PRINT - DB CR,LF,' DIFF Aborting',0 - RET ; RETURN TO OPSYS -CABORT: - POP D ; CLEAR STACK - MVI A,1 ; SET ERROR FLAG - STA FIRST - CALL PRINT - DB CR,LF,' Files are Different',0 - RET ; RETURN TO VERIFY CALLER -NMAT0: - MVI A,0FFH ; CLEAR FIRST TIME FLAG - STA FIRST - CALL HEADER ; PRINT HEADING AND RETURN NEW LINE COUNT -NMAT1: - DCR A ; COUNT DOWN 1 LINE - STA LCNT ; NEW LINE COUNT - CALL CRLF - PUSH H ; SAVE HL - LHLD OFFSET ; PRINT OFFSET VALUE - CALL PHL4HC ; PRINT AS HEX - CALL SPACER ; PRINT SPACES - CALL PHLDC ; PRINT AS DEC - POP H ; RESTORE HL - CALL SPACER - CALL SPACER - MVI A,' ' - CALL COUT - MOV A,M ; GET SOURCE 1 VALUE - CALL PRVAL ; PRINT AS HEX, DEC, ASCII - CALL SPACER ; 10 SPACES - CALL SPACER - CALL SPACER - CALL SPACER - CALL SPACER - LDAX D ; GET SOURCE 2 VALUE - CALL PRVAL ; PRINT AS HEX, DEC, ASCII - POP B ; RESTORE REGS - POP D - POP H - RET - -; PRINT HEADER AND RETURN NEW LINE COUNT IN A -HEADER: - PUSH D ; SAVE REGS - PUSH H - CALL PRINT - DB CR,LF,' Rel Offset ',0 - LXI H,SDISK ; PRINT DISK/USER - CALL PRUD - LXI D,FCBS - CALL PRFN ; PRINT FILE NAME - CALL SPACER ; 5 SPACES - CALL SPACER - CALL SPACE1 - LXI H,DDISK ; PRINT DISK/USER - CALL PRUD - LXI D,FCBD - CALL PRFN ; PRINT FILE NAME - CALL PRINT - DB CR,LF,' Hex Dec Hex Dec Asc Hex Dec Asc',0 - LDA LSET ; SET LINE COUNT - SUI 1 ; ADJUST FOR HEADING AND FOOTER - STA LCNT - POP H - POP D ; RESTORE REGS - RET - -; PRINT A AS HEX, DEC, AND ASCII -PRVAL: - CALL SPACER ; 3 SPACES - CALL SPACE1 - CALL PA2HC ; PRINT AS HEX - CALL SPACER - CALL PADC ; PRINT AS DEC - CALL SPACER - ANI 7FH ; MASK OUT MSB - CPI 7FH ; DOT FOR - JZ PRDOT - CPI ' ' ; PRINT DOT IF LESS THAN - JNC COUT -PRDOT: - MVI A,'.' ; PRINT DOT - JMP COUT -; PRINT 2 SPACES -SPACER: - PUSH PSW ; SAVE A - MVI A,' ' ; - CALL COUT - POP PSW -SPACE1: - PUSH PSW - MVI A,' ' - CALL COUT - POP PSW - RET - -; -; LOAD BUFFER FROM FILE WHOSE FCB IS PTED TO BY DE -; ON OUTPUT, BCNT=NUMBER OF BLOCKS LOADED (UP TO BLIMIT) -; -LOAD: - XRA A ; A=0 - STA BCNT ; SET BLOCK COUNT - -; MAIN LOAD LOOP -LOAD1: - CALL F$READ ; READ A BLOCK - ORA A ; END OF FILE? - RNZ ; RETURN IF DONE - PUSH D ; SAVE FCB PTR - LXI D,BUFF ; PT TO BUFFER - MVI B,128 ; COPY 128 BYTES -LOAD2: - LDAX D ; GET BYTE READ - MOV M,A ; PUT BYTE - INX H ; PT TO NEXT - INX D - DCR B ; COUNT DOWN - JNZ LOAD2 - POP D ; GET FCB PTR - LDA BCNT ; GET BLOCK COUNT - INR A ; INCREMENT IT - STA BCNT ; SET IT - CPI BLIMIT ; LAST BLOCK READ? - JNZ LOAD1 - RET - -; -; LOG IN SOURCE (LOGS) AND DESTINATION (LOGD) DRIVES/USERS -; -LOGS: - LDA SDISK ; GET DISK - DCR A ; A=0 - MOV B,A - LDA SUSER ; GET USER - MOV C,A - CALL LOGUD ; LOG IN - RET -LOGD: - LDA DDISK ; GET DISK - DCR A ; A=0 - MOV B,A - LDA DUSER ; GET USER - MOV C,A - CALL LOGUD ; LOG IN - RET - -; -; PRINT DISK/USER PTED TO BY HL (2 BYTES) -; -PRUD: - MOV A,M ; GET DISK - ADI 'A'-1 ; CONVERT TO LETTER - CALL COUT - INX H ; PT TO USER - MOV A,M ; GET USER - CALL PADC ; PRINT AS DEC - CALL PRINT - DB ': ',0 - RET - -; -; PRINT FILE NAME WHOSE FCB IS PTED TO BY DE -; -PRFN: - PUSH H ; SAVE REGS - PUSH D - PUSH B - XCHG ; FN PTED TO BY HL - INX H ; PT TO FIRST CHAR - MVI B,8 ; 8 CHARS - CALL PRFN1 - MVI A,'.' - CALL COUT - MVI B,3 ; 3 CHARS FOR FILE TYPE - CALL PRFN1 - POP B ; RESTORE REGS - POP D - POP H - RET -PRFN1: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CALL COUT ; PRINT - DCR B ; COUNT DOWN - JNZ PRFN1 - RET - -; -; BUFFERS -; -BUFF1: - DS 2 ; PTR TO BUFFER 1 -BUFF2: - DS 2 ; PTR TO BUFFER 2 -OFFSET: - DS 2 ; RELATIVE OFFSET -FIRST: - DS 1 ; ERROR INDIC -LSET: - DS 1 ; NUMBER OF TEXT LINES ON SCREEN -LCNT: - DS 1 ; LINE COUNT -COMP: - DS 1 ; COMPARE FLAG (0=NO SIMPLE COMPARE) -MULT: - DS 1 ; MULTIPLE RUN FLAG (0=NO MULT RUNS) -SDISK: - DS 1 ; SOURCE DISK (MUST BE FOLLOWED BY SUSER) -SUSER: - DS 1 ; SOURCE USER -FCBS: - DS 36 ; SOURCE FCB -DDISK: - DS 1 ; DEST DISK (MUST BE FOLLOWED BY DUSER) -DUSER: - DS 1 ; DEST USER -FCBD: - DS 36 ; DESTINATION FCB -BCNT: - DS 1 ; BUFFER COUNT -BCNT1: - DS 1 ; SECOND BUFFER COUNT -INLINE: - DS 2 ; PTR TO INPUT LINE BUFFER - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/DIFF21.LBR b/Source/Images/d_bp/u15/DIFF21.LBR deleted file mode 100644 index 63a2aab0..00000000 Binary files a/Source/Images/d_bp/u15/DIFF21.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/DIR.COM b/Source/Images/d_bp/u15/DIR.COM deleted file mode 100644 index 82c0dc61..00000000 Binary files a/Source/Images/d_bp/u15/DIR.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/DIR.MAC b/Source/Images/d_bp/u15/DIR.MAC deleted file mode 100644 index 266690ef..00000000 --- a/Source/Images/d_bp/u15/DIR.MAC +++ /dev/null @@ -1,1465 +0,0 @@ -; -; Program: DIR -; Author: Richard Conn -; Version: 1.0 -; Date: 23 Mar 84 -; -VERS EQU 11 ; Changed manner of calculating disk size - ; Using all0 and all1 instead of drm - ; Added modified dirqs and fsize jww - ; Trial to list files vertically jww -; -;VERS EQU 10 ; Release -; -MONTH EQU 1 -DAY EQU 2 -YEAR EQU 85 -; -Z3ENV SET 0F400H ; Set zcpr3 environment descriptor address -; -; Equates -; -YES EQU 0FFH -NO EQU 0 -; -VIDEO EQU YES ; Enhanced video? -VOPT EQU YES ; Print signon and vers no -VERT EQU YES ; List files vertically (default) -; -FCB EQU 5CH -FCB2 EQU 6CH -CTRLC EQU 03H -CR EQU 0DH -LF EQU 0AH -; -; VLIB, Z3LIB and SYSLIB References -; - EXT Z3VINIT,TINIT,STNDOUT,STNDEND,BDOS - EXT CODEND,RETUD,PFN1,DFREE,DUTDIR,DPARAMS - EXT CRLF,COUT,PAFDC,PHLDC,PHLFDC,Z3LOG,FILLB,GETCRT,CIN -; -; Environment Definition -; - IF Z3ENV NE 0 -; -; External ZCPR3 Environment Descriptor -; - JMP START - DB 'Z3ENV' ; This is a zcpr3 utility - DB 1 ; External environment descriptor -Z3EADR: - DW Z3ENV -START: - LHLD Z3EADR ; Pt to zcpr3 environment -; - ELSE -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -Z3EADR: - JMP START - SYSENV -START: - LXI H,Z3EADR ; Pt to zcpr3 environment - ENDIF -; -; Start of Program -- Initialize ZCPR3 Environment -; - CALL Z3VINIT ; Initialize the zcpr3 env - CALL TINIT ; Initialize the terminal -; -; Make FCB Wild if No Entry -; - LXI H,FCB+1 ; Pt to first char - MOV A,M ; Get it - CPI ' ' ; Check for space - MVI B,11 ; Prepare to set 11 bytes - MVI A,'?' ; To "?" - CZ FILLB ; Do it if space -; -; Check for Help -; - LXI D,FCB+1 ; Pt to first char of fcb - LDAX D ; Get first char of fcb - CPI '/' - JNZ DOIT - CALL PRINT - DB 'DIR Vers ' - DB (VERS/10)+'0','.',(VERS MOD 10)+'0',CR,LF - DB ' Syntax: DIR dir:afn o',CR,LF - DB ' Options: A=All, S=Sys, H=Horiz, V=Vert, ' - DB 'T=File Type/Name Sor','t'+80H - RET -; -; Perform Directory Function -; -DOIT: - DCX D ; Pt to fcb - CALL Z3LOG ; Log into dir - XRA A ; Clear disk selection byte - STAX D -; -; Process Options in FCB2 -; - LXI H,FCB2+1 ; Pt to options - MVI B,8 ; Allow for up to 8 options - MVI C,10000000B ; Assume just normal files -OPTLOOP: - MOV A,M ; Get next char - INX H ; Advance - DCR B ; Count down - JZ SETDATA ; Done - set data - CPI ' ' - JZ OPTLOOP - CPI 'H' ; Select horizontal listing - JZ SETHORIZ - CPI 'V' ; Select vertical listing - JZ SETVERT - CPI 'T' ; File type? - JZ SETTYPE - CPI 'S' ; System? - JZ SETSYS - CPI 'A' ; System and normal? - JNZ OPTLOOP -; -; Select Both System and Normal Files -; - MVI A,11000000B ; Normal and system files - JMP SETSYS1 -; -; Select Horizontal listing -; -SETHORIZ: - MVI A,YES - STA HORIZ - JMP OPTLOOP -; -; Select Vertical listing -; -SETVERT: - MVI A,NO - STA HORIZ - JMP OPTLOOP -; -HORIZ: DB NOT VERT ; Horizontal listing flag -; -; Select File Type/Name Alphabetization -; -SETTYPE: - MOV A,C ; Get flag - ORI 00100000B - MOV C,A - JMP OPTLOOP -; -; Select Just System Files -; -SETSYS: - MVI A,01000000B ; System -SETSYS1: - PUSH PSW - MOV A,C - ANI 00111111B ; Mask out - MOV C,A - POP PSW - ORA C - MOV C,A - JMP OPTLOOP -; -; Set Selection Byte in A -; -SETDATA: - CALL DPARAMS ; Init parameters - CALL CODEND ; Pt to free area - MOV A,C ; Selection in a -; -; Load and Sort Directory -; - CALL DIRQS ; Quick load - SHLD DIRBEG ; Beginning of directory area - JNZ DISPLAY - CALL PRINT - DB ' Ovf','l'+80H - RET -; -; Display Directory -; -DISPLAY: - PUSH H ; Save ptr to first entry -; -; Init: -; Total of All File Sizes -; Number of Files Displayed -; Line Counter -; Entry Counter -; - IF VOPT ; Signon and version - PUSH B - IF VIDEO - CALL STNDOUT - ENDIF - MVI C,22 ; Print 22 spaces -DIS0: MVI A,' ' - CALL COUT - DCR C - JNZ DIS0 - CALL PRINT - DB 'DIRectory Version ' - DB VERS/10+'0','.',VERS MOD 10+'0' - DB ' ',MONTH/10+'0',MONTH MOD 10+'0','/' - DB DAY/10+'0',DAY MOD 10+'0','/' - DB YEAR/10+'0',YEAR MOD 10+'0' - DB CR,LF+80H - IF VIDEO - CALL STNDEND - ENDIF - POP B - ENDIF ; Vopt -; - LXI H,0 ; Set total size count - SHLD TOTCOUNT - LXI H,FCOUNT ; Save file count - MOV M,C - INX H - MOV M,B ; File count saved from bc - PUSH B ; Save file count - MOV H,B - MOV L,C ; Move it to hl - LXI D,4 - CALL DIVIDE ; Divide by four columns - JZ DIS1 - INX B ; Round up if remainder from division -DIS1: MOV H,B - MOV L,C ; Quotient to hl - CALL X16 - SHLD LINES - POP H ; Get file count - PUSH H ; And put it back - DCX H ; File count -1 points to last file - CALL X16 ; Multiply by 16 chars/line - XCHG ; Directory size to de - LHLD DIRBEG - DAD D - SHLD DIREND - POP B ; Get file count - POP H ; Pt to first entry - XRA A - STA LCOUNT ; Init line count - STA COUNT ; Init entry count - MOV A,B ; Check for done - ORA C - JZ PRREMAIN ; Print remaining space on disk and exit - CALL PRINT - DB ' '+80H ; Print first leading space -; -; Loop to Display File Entries -; -DISPLOOP: -; -; Print Separator if Within a Line -; - LDA COUNT ; See if new entry on line - ANI 3 - JZ DISPL1 -; -; Print Separator if Entry is Within a List -; - IF VIDEO - CALL STNDOUT - ENDIF - CALL PRINT ; Print separator - DB '|',' '+80H - IF VIDEO - CALL STNDEND - ENDIF -; -; Print Next Entry -; -DISPL1: - PUSH H ; Save key regs - PUSH B ; Hl pts to next entry, bc = count -; -; Print File Name -; - INX H ; Pt to file name - XCHG - CALL PFN1 ; Print file name - XCHG - DCX H ; Pt to first byte of file entry -; -; Print File Size and Increment Total of All File Sizes -; - PUSH H ; Save ptr to first byte of file entry - CALL FSIZE ; Compute file size (to de) - LHLD TOTCOUNT ; Increment total count - DAD D - SHLD TOTCOUNT - XCHG - CALL PHLDC ; Print file size - POP H ; Get ptr to first byte of file entry -; -; Check R/O Byte -; - MVI B,' ' ; Assume r/w - LXI D,9 ; Pt to r/o - DAD D - MOV A,M ; Get r/o byte - ANI 80H ; Look at it - JZ ROOUT - MVI B,'r' ; Set r/o -ROOUT: - MOV A,B ; Get char - CALL COUT -; -; Increment Entry Count and Issue New Line if Limit Reached -; - LDA COUNT ; Increment entry count - INR A - STA COUNT - LDA HORIZ ; Check horiz/vert listing - ORA A - JZ DISPL2 ; Vertical listing - LDA COUNT - ANI 3 ; New line? - CZ NEWLIN - JMP DISPL2 -; -; New Line - Increment Line Count and Issue Page Break if Limit Reached -; -NEWLIN: CALL PRNL - LDA LCOUNT ; Count down lines - INR A - STA LCOUNT - CALL GETCRT ; Get crt data - INX H ; Pt to text line count - INX H - DCR A ; Back up again - CMP M ; Compare - RNZ - XRA A ; Reset line count - STA LCOUNT - IF VIDEO - CALL STNDOUT - ENDIF - CALL PRINT - DB ' Pause -',' '+80H - IF VIDEO - CALL STNDEND - ENDIF - CALL CIN - CALL PRNL ; Print new line with leading space - CPI CTRLC ; Abort? - RNZ - POP PSW ; Clear the rest of the stack - POP PSW - POP PSW - RET ; To zcpr3 -; -; Advance to Next Entry -; -DISPL2: - POP B ; Restore count and ptr to current entry - POP H - LDA HORIZ ; Check horiz/vert listing - ORA A - JNZ DISP2 ; Horizontal - XCHG ; Pointer to de - LHLD LINES - DAD D ; Point to next entry - XCHG ; New pointer to de - LHLD DIREND - CALL SUBDE ; Check if new ptr is within the directory - XCHG ; New pointer to hl - JNC DISP3 ; New pointer is ok - LHLD DIRBEG ; Otherwise start new line - LXI D,16 ; Next line - DAD D - SHLD DIRBEG ; Save it - XRA A - STA COUNT ; Clear column count - PUSH H - PUSH B - CALL NEWLIN - POP B - POP H - JMP DISP3 -DISP2: LXI D,16 ; Skip to next entry - DAD D -DISP3: DCX B ; Count down - MOV A,B ; Done? - ORA C - JNZ DISPLOOP - LDA COUNT ; See if new line required - ANI 3 - CNZ CRLF ; New line if any entries on line -; -; Print Remaining Space on Disk and Exit -; -PRREMAIN: -; -; Print DU -; - IF VIDEO - CALL STNDOUT - ENDIF - MVI B,8 ; Space over 8 spaces - MVI A,' ' -SPACER: - CALL COUT - DCR B - JNZ SPACER - CALL RETUD ; Get du in bc - MOV A,B ; Print disk letter - ADI 'A' ; Convert to ascii - CALL COUT - MOV A,C ; Print user number - CALL PAFDC ; Print floating - CALL PRINT ; Print separator - DB ':'+80H - CALL DUTDIR ; See if matching dir - JZ PRREM1 -; -; Print DIR if any -; - MVI B,8 ; 8 chars max -PRREM0: - MOV A,M ; Get char - INX H ; Pt to next - CPI ' ' ; Space? - CNZ COUT ; Echo char - DCR B ; Count down - JNZ PRREM0 -; -; Print File Count -; -PRREM1: - LHLD FCOUNT ; Print number of files - CALL PRINT - DB ' --',' '+80H - CALL PHLFDC -; -; Print Total of All File Sizes -; - LHLD TOTCOUNT ; Print total count - CALL PRINT - DB ' files using',' '+80H - CALL PHLFDC ; Print as floating -; -; Print Amount of Free Space Remaining -; - CALL DFREE ; Compute amount of free space - XCHG ; In hl - CALL PRINT - DB 'k ','('+80H - CALL PHLFDC - CALL PRINT - DB 'k remain of',' '+80H - CALL DSIZE - CALL PHLFDC - CALL PRINT - DB 'k total',')'+80H - IF VIDEO - CALL STNDEND - ENDIF - RET -; -; Print New Line with Leading Space -; -PRNL: - CALL PRINT - DB CR,LF,' '+80H ; New line with leading space - RET -; -; Print Routine (String at Return Address) which is terminated by MSB -; -PRINT: - XTHL ; Pt to string and save hl - PUSH PSW -PRINT1: - MOV A,M ; Get next char - ANI 7FH ; Mask msb - CALL COUT - MOV A,M ; Get next char - INX H ; Pt to next - ANI 80H ; Check msb - JZ PRINT1 - POP PSW ; Get a - XTHL ; Restore return address and hl - RET -; -; DSIZE returns the size of the current disk in HL (k) -; -DSIZE: PUSH D - PUSH B -; - MVI C,31 ; Return dpb address in hl - CALL BDOS - INX H - INX H ; Point to bls - MOV A,M ; Bls in a - STA BLS - INX H - INX H - INX H ; Point to dsm - MOV E,M - INX H - MOV D,M ; Dsm in de - INX D ; Rel 1 - PUSH D ; Save dsm on stack - INX H ; Point to drm - INX H - INX H ; Point to all0 - MOV D,M - INX H ; Point to all1 - MOV E,M - XCHG ; Allocation vector in hl - LXI D,-1 ; Clear a counter -DS0: INX D - CALL SHLHL - JC DS0 - CALL SUBDE ; Get complement of count - POP D ; Get dsm from stack - DAD D ; Hl = groups available - LDA BLS ; Block shift factor - SUI 3 ; From bls in a - JZ DSX -DSIZ0: DAD H - DCR A - JNZ DSIZ0 -DSX: - POP B - POP D - RET -; -; DIVIDE divides HL by DE returning quotient in BC and remainder in HL -; Zero flag is set if no remainder -; -DIVIDE: LXI B,0 ; Clear quotient -DIV0: CALL SUBDE ; Subtract de from hl - JC DIV1 ; Overflow - INX B ; Increment quotient - JMP DIV0 ; Again.. -DIV1: DAD D ; Restore remainder in hl - MOV A,H ; Check for remainder - ORA L ; Equal zero - RET -; -; SUBDE subtracts DE from HL returning carry set if de > hl -; -SUBDE: MOV A,L - SUB E - MOV L,A - MOV A,H - SBB D - MOV H,A - RET -; -; X16 simply shifts HL left four times -; -X16: DAD H - DAD H - DAD H - DAD H - RET -; -; SHLHL shifts HL left into carry -; -SHLHL: ORA A ; Reset carry - MOV A,L - RAL - MOV L,A - MOV A,H - RAL - MOV H,A - RET -; -; SYSLIB Module Name: SDIRQS -; Author: Richard Conn -; Part of SYSLIB3 SDIR Series -; SYSLIB Version Number: 3.0 -; Module Version Number: 1.4 -; Module Entry Points: -; DIRQS -; Module External References: -; None -; - -;* -;* EQUATES -;* -CPM EQU 0 -BUFF EQU 80H ; Dma buffer -ESIZE EQU 16 ; 16 bytes/entry - -;* -;* GENERAL-PURPOSE DIRECTORY SELECT ROUTINE WITHOUT SIZING INFORMATION -;* THIS ROUTINE SCANS FOR THE FCB PTED TO BY DE AND LOADS ALL ENTRIES -;* WHICH MATCH IT INTO THE MEMORY BUFFER PTED TO BY HL. ON EXIT, -;* BC=NUMBER OF FILES IN BUFFER, AND HL PTS TO FIRST FILE IN BUFFER. -;* THE DIRECTORY BUFFER GENERATED BY DIRQ CONTAINS ENTRIES WHICH MAY NOT -;* BE USED TO COMPUTE THE SIZE OF THE FILES USING THE FSIZE ROUTINE. THE -;* DIRQS ROUTINE IS DESIGNED FOR THIS PURPOSE. THE BASIC TRADEOFF BETWEEN -;* THE TWO ROUTINES IS THE DIRQ RUNS FASTER THAN DIRQS, AND THIS IS NOTICABLE -;* IF THERE IS A SIGNIFICANT NUMBER OF FILES TO BE PROCESSED. -;* -;* THE DIRQ/DIRQS ROUTINES ARE INTENDED TO BE USED IN APPLICATIONS WHERE -;* THE ONLY THING DESIRED IS A DIRECTORY LOAD OF THE CURRENT DIRECTORY -;* (DISK AND USER). DIRF/DIRFS PROVIDE MORE FLEXIBILITY AT A GREATER COST -;* IN TERMS OF SIZE. -;* -;* INPUT PARAMETERS: -;* HL PTS TO BUFFER, DE PTS TO FCB, A IS SELECT FLAG: -;* Bit 7 - Select Non-Sys, Bit 6 - Select Sys -;* Bit 5 - Sort by File Name and Type (0) or other (1) -;* Bits 4-0 - Unused -;* OUTPUT PARAMETERS: -;* HL PTS TO FIRST FILE IN BUFFER -;* BC = NUMBER OF FILES -;* A=0 and Z Flag Set if TPA Overflow -;* DE UNCHANGED -;* -DIRQS: - PUSH D ; Save ptr to fcb - - STA SELFLG ; Save select flag for selection and alphabetization - SHLD HOLD ; Set ptr to hold buffer - LXI B,36 ; Allow 36 bytes - DAD B ; Hl now points to temp fcb - SHLD TFCB ; Set ptr to temp fcb - DAD D ; Hl now pts to scratch area - - PUSH D ; Save ptr to fcb - CALL DBUFFER ; Get ptrs - POP D ; Get ptr to fcb - PUSH H ; Save ptr to buffer - CALL DIRLOAD ; Load directory (fast load) - POP H ; Get ptr to buffer - - POP D ; Get ptr to fcb - - RZ ; Abort if tpa overflow - - PUSH PSW ; Save flag to indicate no tpa overflow - CALL DIRALPHA ; Alphabetize - POP PSW ; Get psw (tpa overflow flag) - RET - -;* -;* THIS ROUTINE ACCEPTS A BASE ADDRESS FOR THE DYNAMIC BUFFERS -;* REQUIRED, DETERMINES HOW MUCH SPACE IS REQUIRED FOR THE BUFFERS, -;* AND SETS THE ORDER PTR TO PT TO THE FIRST AND DIRBUF TO PT TO -;* THE SECOND (ORDER SPACE = DIRMAX*2 AND DIRBUF = DIRMAX * ESIZE) -;* ON INPUT, HL PTS TO AVAILABLE BASE -;* ON OUTPUT, HL PTS TO DIRBUF -;* A=0 AND ZERO FLAG SET IF CCP OVERRUN -;* -DBUFFER: - SHLD ORDER ; Pt to order table - CALL DPARAMS0 ; Get parameters - LHLD DIRMAX ; Number of entries in dir - XCHG ; In de - LHLD ORDER ; Add to order base - DAD D ; *1 - CALL MEMCHK ; Check for within range - DAD D ; Hl pts to dirbuf - CALL MEMCHK ; Check for within range - SHLD DIRBUF ; Set ptr and hl pts to directory buffer - XRA A ; Ok - DCR A ; Set flags (nz) - RET - -MEMCHK: - PUSH H ; Save regs - PUSH D - XCHG ; Next address in de - LHLD BDOS+1 ; Get address of bdos - MOV A,D ; Check for page overrun - CMP H - JNC MEMORUN ; Overrun if d>=h - POP D - POP H - RET -MEMORUN: - POP D ; Restore - POP H - POP PSW ; Clear stack - XRA A ; Return 0 - RET - -;* -;* THIS ROUTINE EXTRACTS DISK PARAMETER INFORMATON FROM THE DPB AND -;* STORES THIS INFORMATION IN: -;* BLKSHF <-- BLOCK SHIFT FACTOR (1 BYTE) -;* BLKMSK <-- BLOCK MASK (1 BYTE) -;* EXTENT <-- EXTENT MASK (1 BYTE) [NOT ANY MORE] -;* BLKMAX <-- MAX NUMBER OF BLOCKS ON DISK (2 BYTES) -;* DIRMAX <-- MAX NUMBER OF DIRECTORY ENTRIES (2 BYTES) -;* -DPARAMS0: -;* -;* VERSION 2.x OR MP/M -;* - MVI C,31 ; 2.x or mp/m...request dpb - CALL BDOS - INX H - INX H - MOV A,M ; Get block shift - STA BLKSHF ; Block shift factor - INX H ; Get block mask - MOV A,M - STA BLKMSK ; Block mask - INX H - INX H - MOV E,M ; Get max block number - INX H - MOV D,M - XCHG - INX H ; Add 1 for max number of blocks - SHLD BLKMAX ; Maximum number of blocks - XCHG - INX H - MOV E,M ; Get directory size - INX H - MOV D,M - XCHG - INX H ; Add 1 for number of entries - SHLD DIRMAX ; Maximum number of directory entries - RET - -;* -;* BUILD DIRECTORY TABLE AT DIRBUF -;* THIS IS THE OPTIMAL DIRECTORY LOAD ROUTINE; IT ONLY LOADS UNIQUE -;* FILE NAMES FROM DISK, BUT THE INFORMATION IS NOT SUFFICIENT -;* TO COMPUTE THE FILE SIZES -;* ON INPUT, HL PTS TO DIRECTORY BUFFER (16 x N MAX) -;* DE PTS TO FCB (ONLY 12 BYTES NEEDED) -;* ON OUTPUT, BC IS NUM OF FILES -;* A=0 AND ZERO FLAG SET IF TPA OVERFLOW -;* -DIRLOAD: - SHLD DSTART ; Set start of buffer area - INX D ; Pt to file name - LHLD TFCB ; Pt to tfcb - MVI M,0 ; Select current disk - INX H ; Pt to file name in tfcb - MVI B,11 ; 11 chars -DLLOOP: - LDAX D ; Copy - MOV M,A - INX H ; Pt to next - INX D - DCR B ; Count down - JNZ DLLOOP - MVI M,'?' ; Select all extents - INX H ; Pt to next char - MVI M,0 - INX H - MVI M,'?' ; And all modules - INX H - MVI B,21 ; 23 chars - XRA A ; Zero rest of tfcb -DLLOOP1: - MOV M,A ; Store zero - INX H ; Pt to next - DCR B ; Count down - JNZ DLLOOP1 - -;* -;* THIS SECTION OF CODE INITIALIZES THE COUNTERS USED -;* - LXI H,0 ; Hl=0 - SHLD FCOUNT0 ; Total files on disk = 0 -;* -;* NOW WE BEGIN SCANNING FOR FILES TO PLACE INTO THE MEMORY BUFFER -;* - MVI C,17 ; Search for file - JMP DIRLP1 -DIRLP: - CALL PENTRY ; Place entry in dir - JZ DIROVFL ; Memory overflow error - MVI C,18 ; Search for next match -DIRLP1: - LHLD TFCB ; Pt to fcb - XCHG - CALL BDOS - CPI 255 ; Done? - JNZ DIRLP -;* -;* NOW WE ARE DONE WITH THE LOAD -- SET UP RETURN VALUES -;* -DIRDN: - XRA A ; Load ok - DCR A ; Set flags (nz) -DIRDNX: - LHLD FCOUNT0 ; Get total number of files - MOV B,H ; In bc - MOV C,L - RET -;* -;* MEMORY OVERFLOW ERROR -;* -DIROVFL: - XRA A ; Load error - JMP DIRDNX - -;* -;* PENTRY -- -;* PLACE ENTRY IN DIRECTORY BUFFER IF NOT AN ERASED ENTRY -;* -;* ON INPUT, A=0-3 FOR ADR INDEX IN BUFF OF ENTRY FCB -;* FCOUNT0=NUMBER OF FILES IN DIR SO FAR -;* ON OUTPUT, FCOUNT0=NUMBER OF FILES IN DIR SO FAR -;* A=0 AND ZERO FLAG SET IF MEMORY OVERFLOW ERROR -;* -PENTRY: - RRC ; Multiply by 32 for offset computation - RRC - RRC - ANI 60H ; A=byte offset - LXI D,BUFF ; Pt to buffer entry - MOV L,A ; Let hl=offset - MVI H,0 - DAD D ; Hl=ptr to fcb -;* -;* HL=ADR OF FCB IN BUFF -;* - CALL ATTEST ; Test attributes - JZ PEDONE ; Skip if attribute not desired - -;* -;* SCAN DIRECTORY ENTRIES AS LOADED SO FAR FOR ANOTHER ENTRY BY THE SAME -;* NAME; IF FOUND, SET THAT ENTRY TO BE THE ENTRY WITH THE LARGER EX -;* AND RETURN WITH THE ZERO FLAG SET, INDICATING NO NEW FILE; IF NOT -;* FOUND, RETURN WITH ZERO FLAG RESET (NZ) -;* - CALL DUPENTRY ; Check for duplicate and select ex - JZ PEDONE ; Skip if duplicate - -;* -;* COPY FCB PTED TO BY HL INTO DIRECTORY BUFFER -;* - XCHG ; Save ptr in de - LHLD DIRBUF ; Pt to next entry location - XCHG ; Hl pts to fcb, de pts to next entry location - MVI B,ESIZE ; Number of bytes/entry - CALL SDMOVE ; Copy fcb into memory buffer - XCHG ; Hl pts to next entry - SHLD DIRBUF ; Set ptr - XCHG ; Ptr to next entry in de - LHLD BDOS+1 ; Base address of bdos in hl - MOV A,H ; Get base page of bdos - SUI 9 ; Compute 1 page in front of base page of ccp - CMP D ; Is ptr to next entry beyond this? - RZ - -;* INCREMENT TOTAL NUMBER OF FILES - LHLD FCOUNT0 ; Total files = total files + 1 - INX H - SHLD FCOUNT0 - -;* DONE WITH PENTRY AND NO ERROR -PEDONE: - XRA A ; No error - DCR A ; Set flags (nz) - RET - -;* -;* CHECK ATTRIBUTES OF FILE ENTRY PTED TO BY HL AGAINST SELFLG -;* IF SYSTEM FILE AND SYSTEM ATTRIBUTE SET, RETURN NZ -;* IF NORMAL FILE AND NORMAL ATTRIBUTE SET, RETURN NZ -;* -ATTEST: - PUSH H ; Save ptr - LXI B,10 ; Pt to system attribute - DAD B - MOV A,M ; Get system attribute - POP H ; Restore ptr - ANI 80H ; Check for sys - LDA SELFLG ; Get selection flag - JZ ATDIR - ANI 01000000B ; Check system attribute - RET -ATDIR: - ANI 10000000B ; Check normal attribute - RET - -;* -;* SCAN DIRECTORY ENTRIES AS LOADED SO FAR FOR ANOTHER ENTRY BY THE SAME -;* NAME; IF FOUND, SET THAT ENTRY TO BE THE ENTRY WITH THE LARGER EX -;* AND RETURN WITH THE ZERO FLAG SET, INDICATING NO NEW FILE; IF NOT -;* FOUND, RETURN WITH ZERO FLAG RESET (NZ) -;* ON INPUT, HL PTS TO ENTRY TO SCAN FOR, FCOUNT0 = NUMBER OF ENTRIES SO FAR, -;* AND (DSTART) = STARTING ADDRESS OF DIRECTORY LOADED -;* ON OUTPUT, A=0 AND ZERO FLAG SET IF DUPLICATE ENTRY FOUND; A=0FFH AND NZ -;* IF NO DUP ENTRY FOUND -;* ONLY HL NOT AFFECTED -;* -DUPENTRY: - PUSH H ; Save ptr to entry to scan for - XCHG ; Ptr in de - LHLD FCOUNT0 ; Check count - MOV A,H ; No entries? - ORA L - JZ NODUP ; No duplicate entry return - MOV B,H ; Bc=number of entries - MOV C,L - LHLD DSTART ; Hl pts to first entry -DUPELOOP: - PUSH B ; Save count - PUSH H ; Save ptrs - PUSH D - INX H ; Pt to fn - INX D - MVI B,11 ; Compare fn and ft - CALL COMP - JNZ NODUPL ; Continue looking for another entry -; DUPLICATE ENTRIES HAVE BEEN IDENTIFIED AT THIS POINT - MOV C,M ; Extent in low order - INX H - INX H - MOV B,M ; Module in high order - PUSH B ; Save entry size a moment - XCHG ; Point hl to target - MOV E,M ; Extent in low order - INX H - INX H - MOV D,M ; Module in high order - POP H ; Dir in hl, target in de - XCHG - CALL SUBDE ; Subtract dir size from target size - POP D ; Get ptrs - POP H - JC DUPSMALL ; Target is smaller -; NEW TARGET IS LARGER THAN STORED ENTRY - XCHG ; Hl pts to target, de pts to dir entry - MVI B,ESIZE ; Number of bytes to move - CALL SDMOVE ; Move it -; NEW TARGET IS SMALLER THAN STORED ENTRY -DUPSMALL: - POP B ; Clear count from stack - XRA A ; Indicate dup found - POP H ; Restore ptr to entry to scan for - RET -; NO DUPLICATE FOUND; ADVANCE TO NEXT ENTRY -NODUPL: - POP D ; Restore ptrs - POP H - LXI B,ESIZE ; Hl pts to current entry in buffer, so add esize to it - DAD B - POP B ; Get count - DCX B ; Count down - MOV A,B ; Check for done - ORA C - JNZ DUPELOOP -; NO DUPLICATE FOUND -NODUP: - XRA A ; Indicate dup not found - DCR A ; Set flags (nz) - POP H ; Restore ptr to entry to scan for - RET - -;* -;* DIRALPHA -- ALPHABETIZES DIRECTORY PTED TO BY HL; BC CONTAINS -;* THE NUMBER OF FILES IN THE DIRECTORY AND A = SORT FLAG -;* (0=SORT BY FILE NAME/TYPE, <>0 = SORT BY FILE TYPE/NAME) -;* -DIRALPHA: - MOV A,B ; Any files? - ORA C - RZ - PUSH H ; Save regs - PUSH D - PUSH B - SHLD DIRBUF ; Save ptr to directory - PUSH H ; Save hl - MOV H,B ; Hl=bc=file count - MOV L,C - SHLD N ; Set "N" - POP H -;* -;* SHELL SORT -- -;* THIS SORT ROUTINE IS ADAPTED FROM "SOFTWARE TOOLS" -;* BY KERNIGAN AND PLAUGHER, PAGE 106. COPYRIGHT, 1976, ADDISON-WESLEY. -;* ON ENTRY, BC=NUMBER OF ENTRIES -;* -SORT: - XCHG ; Pointer to directory in de - LHLD ORDER ; Pt to order table -;* -;* SET UP ORDER TABLE; HL PTS TO NEXT ENTRY IN ORDER TABLE, DE PTS TO NEXT -;* ENTRY IN DIRECTORY, BC = NUMBER OF ELEMENTS REMAINING -;* -SORT1: - MOV M,E ; Store low-order address - INX H ; Pt to next order byte - MOV M,D ; Store high-order address - INX H ; Pt to next order entry - PUSH H ; Save ptr - LXI H,ESIZE ; Hl=number of bytes/entry - DAD D ; Pt to next dir1 entry - XCHG ; De pts to next entry - POP H ; Get ptr to order table - DCX B ; Count down - MOV A,B ; Done? - ORA C - JNZ SORT1 -;* -;* THIS IS THE MAIN SORT LOOP FOR THE SHELL SORT IN "SOFTWARE TOOLS" BY K&P -;* - -;* -;* SHELL SORT FROM "SOFTWARE TOOLS" BY KERNINGHAN AND PLAUGER -;* - LHLD N ; Number of items to sort - SHLD GAP ; Set initial gap to n for first division by 2 - -;* FOR (GAP = N/2; GAP > 0; GAP = GAP/2) -SRTL0: - ORA A ; Clear carry - LHLD GAP ; Get previous gap - MOV A,H ; Rotate right to divide by 2 - RAR - MOV H,A - MOV A,L - RAR - MOV L,A - -;* TEST FOR ZERO - ORA H - JZ SDONE ; Done with sort if gap = 0 - - SHLD GAP ; Set value of gap - SHLD I ; Set i=gap for following loop - -;* FOR (I = GAP + 1; I <= N; I = I + 1) -SRTL1: - LHLD I ; Add 1 to i - INX H - SHLD I - -;* TEST FOR I <= N - XCHG ; I is in de - LHLD N ; Get n - MOV A,L ; Compare by subtraction - SUB E - MOV A,H - SBB D ; Carry set means i > n - JC SRTL0 ; Don't do for loop if i > n - - LHLD I ; Set j = i initially for first subtraction of gap - SHLD J - -;* FOR (J = I - GAP; J > 0; J = J - GAP) -SRTL2: - LHLD GAP ; Get gap - XCHG ; In de - LHLD J ; Get j - MOV A,L ; Compute j - gap - SUB E - MOV L,A - MOV A,H - SBB D - MOV H,A - SHLD J ; J = j - gap - JC SRTL1 ; If carry from subtractions, j < 0 and abort - MOV A,H ; J=0? - ORA L - JZ SRTL1 ; If zero, j=0 and abort - -;* SET JG = J + GAP - XCHG ; J in de - LHLD GAP ; Get gap - DAD D ; J + gap - SHLD JG ; Jg = j + gap - -;* IF (V(J) <= V(JG)) - CALL ICOMPARE ; J in de, jg in hl - -;* ... THEN BREAK - JC SRTL1 - -;* ... ELSE EXCHANGE - LHLD J ; Swap j, jg - XCHG - LHLD JG - CALL ISWAP ; J in de, jg in hl - -;* END OF INNER-MOST FOR LOOP - JMP SRTL2 - -;* -;* SORT IS DONE -- RESTRUCTURE DIR1 IN SORTED ORDER IN PLACE -;* -SDONE: - LHLD N ; Number of entries - MOV B,H ; In bc - MOV C,L - LHLD ORDER ; Ptr to ordered pointer table - SHLD PTPTR ; Set ptr ptr - LHLD DIRBUF ; Ptr to unordered directory - SHLD PTDIR ; Set ptr dir buffer - -;* FIND PTR TO NEXT DIR1 ENTRY -SRTDN: - LHLD PTPTR ; Pt to remaining pointers - XCHG ; In de - LHLD PTDIR ; Hl pts to next dir entry - PUSH B ; Save count of remaining entries - -;* FIND PTR TABLE ENTRY -SRTDN1: - LDAX D ; Get current pointer table entry value - INX D ; Pt to high-order pointer byte - CMP L ; Compare against dir1 address low - JNZ SRTDN2 ; Not found yet - LDAX D ; Low-order bytes match -- get high-order pointer byte - CMP H ; Compare against dir1 address high - JZ SRTDN3 ; Match found -SRTDN2: - INX D ; Pt to next ptr table entry - DCX B ; Count down - MOV A,C ; End of table? - ORA B - JNZ SRTDN1 ; Continue if not - -;* FATAL ERROR -- INTERNAL ERROR; POINTER TABLE NOT CONSISTENT -FERR$PTR: - MVI E,7 ; Ring bell - MVI C,2 ; Output - CALL BDOS - JMP CPM - -;* FOUND THE POINTER TABLE ENTRY WHICH POINTS TO THE NEXT UNORDERED DIR1 ENTRY -;* MAKE BOTH POINTERS (PTR TO NEXT, PTR TO CURRENT UNORDERED DIR1 ENTRY) -;* POINT TO SAME LOCATION (PTR TO NEXT DIR1 ENTRY TO BE ORDERED) -SRTDN3: - LHLD PTPTR ; Get ptr to next ordered entry - DCX D ; De pts to low-order pointer address - MOV A,M ; Make ptr to next unordered dir1 pt to buffer for - STAX D ; Dir1 entry to be moved to next unordered dir1 pos - INX H ; Pt to next ptr address - INX D - MOV A,M ; Make high point similarly - STAX D - -;* COPY NEXT UNORDERED DIR1 ENTRY TO HOLD BUFFER - MVI B,ESIZE ; B=number of bytes/entry - LHLD HOLD ; Pt to hold buffer - XCHG - LHLD PTDIR ; Pt to entry - PUSH B ; Save b=number of bytes/entry - CALL SDMOVE - POP B - -;* COPY TO-BE-ORDERED DIR1 ENTRY TO NEXT ORDERED DIR1 POSITION - LHLD PTPTR ; Point to its pointer - MOV E,M ; Get low-address pointer - INX H - MOV D,M ; Get high-address pointer - LHLD PTDIR ; Destination address for next ordered dir1 entry - XCHG ; Hl pts to entry to be moved, de pts to dest - PUSH B ; Save b=number of bytes/entry - CALL SDMOVE - POP B - XCHG ; Hl pts to next unordered dir1 entry - SHLD PTDIR ; Set pointer for next loop - -;* COPY ENTRY IN HOLD BUFFER TO LOC PREVIOUSLY HELD BY LATEST ORDERED ENTRY - LHLD PTPTR ; Get ptr to ptr to the destination - MOV E,M ; Get low-address pointer - INX H - MOV D,M ; High-address pointer - LHLD HOLD ; Hl pts to hold buffer, de pts to entry dest - CALL SDMOVE ; B=number of bytes/entry - -;* POINT TO NEXT ENTRY IN POINTER TABLE - LHLD PTPTR ; Pointer to current entry - INX H ; Skip over it - INX H - SHLD PTPTR - -;* COUNT DOWN - POP B ; Get counter - DCX B ; Count down - MOV A,C ; Done? - ORA B - JNZ SRTDN - POP B ; Restore regs - POP D - POP H - RET ; Done - -;* -;* SWAP (Exchange) the pointers in the ORDER table whose indexes are in -;* HL and DE -;* -ISWAP: - PUSH H ; Save hl - LHLD ORDER ; Address of order table - 2 - MOV B,H ; In bc - MOV C,L - POP H - DCX H ; Adjust index to 0...n-1 from 1...n - DAD H ; Hl pts to offset address indicated by index - ; Of original hl (1, 2, ...) - DAD B ; Hl now pts to pointer involved - XCHG ; De now pts to pointer indexed by hl - DCX H ; Adjust index to 0...n-1 from 1...n - DAD H ; Hl pts to offset address indicated by index - ; Of original de (1, 2, ...) - DAD B ; Hl now pts to pointer involved - MOV C,M ; Exchange pointers -- get old (de) - LDAX D ; -- get old (hl) - XCHG ; Switch - MOV M,C ; Put new (hl) - STAX D ; Put new (de) - INX H ; Pt to next byte of pointer - INX D - MOV C,M ; Get old (hl) - LDAX D ; Get old (de) - XCHG ; Switch - MOV M,C ; Put new (de) - STAX D ; Put new (hl) - RET -;* -;* ICOMPARE compares the entry pointed to by the pointer pointed to by HL -;* with that pointed to by DE (1st level indirect addressing); on entry, -;* HL and DE contain the numbers of the elements to compare (1, 2, ...); -;* on exit, Carry Set means ((DE)) < ((HL)), Zero Set means ((HL)) = ((DE)), -;* and Non-Zero and No-Carry means ((DE)) > ((HL)) -;* -ICOMPARE: - PUSH H ; Save hl - LHLD ORDER ; Address of order - 2 - MOV B,H ; In bc - MOV C,L - POP H - DCX H ; Adjust index to 0...n-1 from 1...n - DAD H ; Double the element number to point to the ptr - DAD B ; Add to this the base address of the ptr table - XCHG ; Result in de - DCX H ; Adjust index to 0...n-1 from 1...n - DAD H ; Do the same with the original de - DAD B - XCHG - -;* -;* HL NOW POINTS TO THE POINTER WHOSE INDEX WAS IN HL TO BEGIN WITH -;* DE NOW POINTS TO THE POINTER WHOSE INDEX WAS IN DE TO BEGIN WITH -;* FOR EXAMPLE, IF DE=5 AND HL=4, DE NOW POINTS TO THE 5TH PTR AND HL -;* TO THE 4TH POINTER -;* - MOV C,M ; Bc is made to point to the object indexed to - INX H ; By the original hl - MOV B,M - XCHG - MOV E,M ; De is made to point to the object indexed to - INX H ; By the original de - MOV D,M - MOV H,B ; Set hl = object pted to indirectly by bc - MOV L,C - -;* -;* COMPARE DIR ENTRY PTED TO BY HL WITH THAT PTED TO BY DE; -;* NO NET EFFECT ON HL, DE; RET W/CARRY SET MEANS DE) - -wherå  C Direct Output to Console - >L Direct Output to List (Printer) - >P Direct Output to Punch - - Data Dump: - = Dump both Word Table (Symbols) and Format - =F Dump current Format Specification - =S Dump current Word Table (Symbol Table) - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/DPROG.MAC b/Source/Images/d_bp/u15/DPROG.MAC deleted file mode 100644 index bbc20064..00000000 --- a/Source/Images/d_bp/u15/DPROG.MAC +++ /dev/null @@ -1,1125 +0,0 @@ -; -; PROGRAM: DPROG -; AUTHOR: Richard Conn -; VERSION: 1.0 -; DATE: 28 July 84 -; PREVIOUS VERSIONS: None -; -vers equ 10 -z3env equ 0f400h - -; -; DPROG is used to program the user's terminal, printer, or punch -; with data from the file specified in the command line. DPROG will -; automatically search for the file along the path starting at the -; indicated (or implied) DU. -; - -; -; Basic Equates -; -opsys equ 0 -fcb equ 5ch -tbuff equ 80h -cr equ 0dh -ff equ 0ch -lf equ 0ah -ctrlc equ 'C'-'@' -ctrls equ 'S'-'@' -ctrlz equ 'Z'-'@' -bel equ 7 -bs equ 8 -tab equ 9 - -; -; DPROG Constants -; -COMMENT equ ';' ;denotes a comment line -WORD equ '-' ;denotes a word definition -SYM equ '=' ;symbol table dump command -DEV equ '>' ;device assignment -INP equ '<' ;input forms (pause, string, delay) -wordl equ 16 ;length of word -fmt equ '(' ;begin format definition -fmtch equ '%' ;format escape char -endfmt equ ')' ;end format definition -quote equ '"' ;quote string -literal equ '\' ;literal interpretation follows -control equ '^' ;control char follows - -; -; SYSLIB Routines -; - ext condin,cin,cout,lout,pout - ext z3init,pfind,z3log - ext moveb,hmovb,logud,pfn1,caps - ext f$open,f$read,f$close - ext eval,pafdc,pa2hc - ext codend - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env -; -; Initial Routines -; - call helpck ;check for help - call bufinit ;initialize buffers -; -; Load File -; - call locfile ;locate file - call logud ;enter directory of file - call load ;load file -; -; Perform Program -; - call program ;program the user's terminal - ret - -; -; Initialize Buffers -; -bufinit: - call codend ;address of free space - shld format ;format string - xchg - lxi h,deffmt ;set default format (char) - mvi b,40 ;allow 40 chars - call moveb - xchg ;HL pts to format buffer - inr h ;next page - shld locstk ;set location stack - shld tos ;set top of stack - mvi m,0 - inx h - mvi m,0 ;zero stack - dcx h - inr h ;next page - shld free ;free area - mvi a,'C' ;assign console as output device - sta outdev - ret - -; -; Check for Help -; -helpck: - lxi h,fcb+1 ;pt to fcb name - mov a,m ;get it - cpi '/' ;help if slash - rnz - pop psw ;clear stack - call eprint - db 'DPROG, Version ' - db (vers/10)+'0','.',(vers mod 10)+'0' - db cr,lf,' Syntax:' - db cr,lf,' DPROG <-- STD.DPG' - db cr,lf,' DPROG filename <-- filename.DPG' - db cr,lf,' DPROG filename.typ <-- filename.typ' - db 0 - ret - -; -; Find File -; If found, return BC=DU and NZ -; -locfile: - lxi d,fcb ;pt to FCB - call z3log - lxi d,fcb+1 ;pt to file name - lxi h,defname ;pt to default file name - mvi b,8 ;8 chars - ldax d ;any type? - cpi ' ' ;none if space - cz moveb - lxi d,fcb+9 ;pt to file type - lxi h,deftype ;pt to default file type - mvi b,3 ;3 chars - ldax d ;any type? - cpi ' ' ;none if space - cz moveb - lxi d,fcb ;pt to FCB - mvi a,0ffh ;search current - call pfind ;search for file - rnz ;get file if found -; -; Abort Attempt to Load File -; -abort: - pop psw ;clear stack - call eprint - db cr,lf,' File ',0 - lxi d,fcb+1 ;pt to file name - call pfn1 - call eprint - db ' NOT Found',0 - ret - -; -; Load File -; -load: - lxi d,fcb ;pt to fcb - call f$open ;open file for input - jnz abort ;abort attempt - lhld free ;buffer area -load1: - lxi d,fcb ;pt to fcb - call f$read ;read next block - jnz load2 ;done, so mark and close - lxi d,tbuff ;copy into buffer - xchg ;copy into buffer at DE from TBUFF at HL - mvi b,128 ;128 bytes - call moveb - lxi h,80h ;pt to next buffer - dad d - jmp load1 -load2: - mvi m,ctrlz ;mark EOF - inr h ;next page - mvi l,0 - shld words ;mark beginning of word definition area - shld nxtword ;mark next word - mvi m,0 ;mark no words - jmp f$close ;close input file - -; -; Program the User's Terminal -; -program: - lhld free ;pt to first char -prog1: - call capa ;capitalize - cpi ctrlz ;done? - rz - cpi CR ;eol? - jz skipl - cpi WORD ;word definition? - jz defword - cpi SYM ;symbol table or format definition dump? - jz dump - cpi DEV ;assign device? - jz device - cpi INP ;input form? - jz input - push h ;save HL -prog2: - call output ;output line at HL - call locpop ;pop stack if any - jnz prog2 ;continue if any element on stack - pop h ;restore HL -; -; Skip to next line -; -skipl: - mov a,m ;get char - call capa ;capitalize - cpi CR ;new line? - jz skipl1 - cpi LF ;new line? - jz skipl1 - cpi CTRLZ ;EOF? - rz - inx h ;pt to next - jmp skipl -skipl1: - mov a,m ;get it - inx h ;pt to next - ani 7fh ;mask - cpi CR ;continue? - jz skipl1 - cpi LF ;continue? - jz skipl1 - dcx h ;pt to non-eol char - jmp prog1 ;continue with next line -; -; Input Form -; -input: - inx h ;pt to next char - call cin ;get any char - ani 7fh ;mask - cpi ctrlc ;abort? - jz opsys - jmp skipl ;continue -; -; Assign Device -; -device: - inx h ;pt to char - call capa ;capitalize - cpi 'C' ;console? - jz setdev - cpi 'L' ;list? - jz setdev - cpi 'P' ;punch? - jz setdev - push psw - call eprint - db cr,lf,bel,' Invalid Device Assignment: ',0 - pop psw - call cout ;print char - dcx h ;back up - jmp skipl ;continue -; -; Perform assignment -; -setdev: - sta outdev ;assign - jmp skipl ;continue -; -; Define Word -; -defword: - inx h ;pt to first char of word - call bufword ;store word in buffer - shld nextch ;save ptr to next char - call wscan ;scan for word - jz defnew ;new word defined - xchg ;ptr to high-order in DE - lhld nextch ;get ptr to word definition - xchg ;word defn in DE, word adr high in HL - mov m,d ;store new address - dcx h - mov m,e - xchg ;HL pts to word - jmp skipl ;skip out line -; -; New Word -; -defnew: - lhld nxtword ;pt to next word - xchg - lxi h,wordbf ;pt to buffer - mvi b,wordl ;number of chars max - call hmovb ;copy into buffer and advance HL - lhld nextch ;get address - xchg - mov m,e ;put low - inx h - mov m,d ;put high - inx h ;set ptr to next word - mvi m,0 ;store zero - shld nxtword ;set ptr - xchg ;HL pts to word definition - jmp skipl ;skip to next line - -; -; Dump Format String or Word Table -; -dump: - inx h ;pt to option - call capa ;check for format display option - cpi 'F' ;format? - jz dfmt ;dump format if so - cpi 'S' ;symbols? - jz dsym - dcx h ;pt to current - call dumpsym ;dump symbols - call dumpfmt ;dump format - jmp skipl ;continue -; -; Dump Format -; -dfmt: - call dumpfmt ;do dump - jmp skipl ;continue -; -; Dump Words -; -dsym: - call dumpsym ;do dump - jmp skipl ;continue -; -; Dump Words in Symbol Table -; -dumpsym: - push h ;save HL - call eprint - db cr,lf,' >> Word Definitions <<',0 - lhld words ;dump word table -sym1: - mov a,m ;get next - ora a - jz symexit - call eprint - db cr,lf,' ',0 - call prword ;print word - mov e,m ;get low - inx h - mov d,m ;get high - inx h ;pt to next word - push h ;save ptr - call eprint - db ' >',0 - xchg ;HL pts to word -sym2: - mov a,m ;get next char - cpi CR ;done? - jz sym3 - cpi TAB ;translate tab to space - jnz sym2out - mvi a,' ' ;space instead of tab -sym2out: - call chout - inx h - jmp sym2 -sym3: - call eprint - db '<',0 - pop h ;pt to next word - jmp sym1 -symexit: - pop h ;pt to char - ret -; -; Output Format String -; -dumpfmt: - push h ;save ptr - call eprint - db cr,lf,' Format: (',0 - lhld format ;pt to string - call epstr ;print it - call eprint - db ')',cr,lf,0 - pop h ;get ptr - ret - -; -; Print Word at HL (advance HL) -; -prword: - mvi b,wordl ;number of chars -prw1: - mov a,m ;get char - call chout - inx h - dcr b - jnz prw1 - ret -; -; Routine to Output a Line -; -output: - call sksp ;skip spaces - cpi COMMENT ;done? - rz - cpi CR ;done? - rz - cpi LF ;done? - rz - cpi CTRLZ ;done? - rz - cpi fmt ;format definition? - jz outfmt - cpi quote ;chars? - jz outch - call bufword ;store word in buffer - shld nextch ;save ptr to next char after word - call wscan ;scan for word in table - jz badword ;word not defined - call locpush ;push location onto stack - xchg ;HL pts to continuation location - jmp output ;continue -; -; Output Quoted String -; -outch: - inx h ;pt to next char -outch1: - mov a,m ;get it - ani 7fh ;mask - cpi CR ;done? - jz outcherr - cpi LF ;done? - jz outcherr - cpi CTRLZ ;done? - jz outcherr - cpi quote ;end of quote? - jz outch2 - call charout ;output char in whatever form - jmp outch1 ;continue -outcherr: - call eprint - db cr,lf,bel,' Premature End of Quote',cr,lf,0 - jmp output -outch2: - inx h ;pt to after quote - jmp output ;continue -; -; Output char in A and set HL to next char on exit -; -charout: - cpi control ;control char follows? - jz charo0 - cpi literal ;literal follows? - jz charo1 -; -; Normal Char in A -; -charnxt: - inx h ;pt to next char - jmp formatout ;output with format -; -; Output control char -; -charo0: - inx h ;pt to char - call capa ;get char - sui '@' ;convert to control - jc ctrlerr - cpi 20h - jnc ctrlerr - inx h ;pt to next - jmp formatout -ctrlerr: - call eprint - db cr,lf,bel,' Invalid Control Character',cr,lf,0 - ret -; -; Output Literal Format -; -charo1: - inx h ;pt to char - call capa ;get char - cpi 'B' ;BS? - jz c1bs - cpi 'D' ;DEL? - jz c1del - cpi 'E' ;ESCAPE? - jz c1esc - cpi 'L' ;CRLF? - jz c1nl - cpi 'N' ;LF? - jz c1lf - cpi 'R' ;CR? - jz c1cr - cpi 'T' ;TAB? - jz c1tab - cpi '0' ;digit? - jc charol ;literal if not - cpi '9'+1 ;range? - jc numout - cpi ' ' ;less than space? - jnc charol - call eprint - db cr,lf,bel,' Invalid Literal Argument',cr,lf,0 - ret - -; -; Output Char in A literally -; -charol: - mov a,m ;get char - ani 7fh ;don't cap this way - inx h ;pt to next - jmp formatout -; -; Output Number -; -numout: - call eval ;convert to binary in DE - mov a,e ;char binary value - jmp formatout ;output with format -; -; Output BS -; -c1bs: - mvi a,bs - jmp charnxt -; -; Output TAB -; -c1tab: - mvi a,tab - jmp charnxt -; -; Output CR -; -c1cr: - mvi a,cr - jmp charnxt -; -; Output DEL -; -c1del: - mvi a,7fh - jmp charnxt -; -; Output ESCAPE -; -c1esc: - mvi a,1bh - jmp charnxt -; -; Output LF -; -c1lf: - mvi a,lf - jmp charnxt -; -; Output CRLF -; -c1nl: - mvi a,cr - call formatout ;output CR - mvi a,lf - jmp charnxt - -; -; Output Char in A According to Format -; -formatout: - push h ;save ptr to next char - push b ;save BC - mov b,a ;char in B - lhld format ;pt to format string -fout1: - mov a,m ;get next char - ani 7fh ;mask - jz foutx ;exit if end of string - cpi fmtch ;expression form? - jz fout2 - cpi literal ;literal? - jz flit -; -; Output char in A and advance -; -fch: - call chout ;output char - inx h ;pt to next - jmp fout1 -; -; Output Value in B according to format -; -fout2: - inx h ;pt to format type - mov a,m ;get char - inx h ;pt to next - ani 7fh ;mask - call caps - ora a ;none? - jz fout1 ;error condition - % at end of string - cpi 'C' ;char? - jz foch - cpi 'D' ;floating decimal chars - jz fod - cpi '2' ;2 decimal chars - jz fo2 - cpi '3' ;3 decimal chars - jz fo3 - cpi 'X' ;2 hex chars - jz fox - push psw - call eprint - db cr,lf,bel,' Invalid Format Char: ',0 - pop psw - call cout - call crlf - jmp fout1 ;continue - -; -; Output value in B as char -; -foch: - mov a,b ;get value - call chout ;output it - jmp fout1 ;continue -; -; Output value in B as floating decimal -; -fod: - mov a,b ;get value - call pafdc ;output - jmp fout1 ;continue -; -; Output value in B as hex -; -fox: - mov a,b ;get value - call pa2hc ;output - jmp fout1 ;continue -; -; Output value in B as 3 decimal chars -; -fo3: - mvi c,100 ;100's - call dec ;output and fall thru to FO2 -; -; Output value in B as 2 decimal chars -; -fo2: - mvi c,10 ;10's - call dec - mov a,b ;get value - adi '0' ;convert - call chout - jmp fout1 ;continue -; -; Subtracting Output -; Output value in B as 100's or 10's digit (leading 0 allowed) -; -dec: - push d ;save DE - mov a,b ;get value - mvi d,'0' ;set digit -dec1: - sub c ;subtract - jc dec2 - inr d ;increment digit - jmp dec1 -dec2: - add c ;add back in - mov b,a - mov a,d ;output digit - call chout - pop d ;restore DE - ret -; -; Exit Format String Output -; -foutx: - pop b ;restore BC - pop h ;restore ptr to next char - ret -; -; Literal Format Output -; -flit: - inx h ;pt to char - call capa ;get char - cpi 'B' ;BS? - jz f1bs - cpi 'D' ;DEL? - jz f1del - cpi 'E' ;ESCAPE? - jz f1esc - cpi 'L' ;CRLF? - jz f1nl - cpi 'N' ;LF? - jz f1lf - cpi 'R' ;CR? - jz f1cr - cpi 'T' ;TAB? - jz f1tab - cpi '0' ;digit? - jc fchck ;literal if not - cpi '9'+1 ;range? - jnc fchck -; -; Output Number -; - call eval ;convert to binary in DE - mov a,e ;char binary value - jmp fch ;output -; -; Check for Valid Literal -; -fchck: - cpi ' ' ;not valid if less than space - jnc fch - call eprint - db cr,lf,bel,' Invalid Literal Argument',cr,lf,0 - jmp fout1 -; -; Output BS -; -f1bs: - mvi a,bs - jmp fch -; -; Output TAB -; -f1tab: - mvi a,tab - jmp fch -; -; Output CR -; -f1cr: - mvi a,cr - jmp fch -; -; Output DEL -; -f1del: - mvi a,7fh - jmp fch -; -; Output ESCAPE -; -f1esc: - mvi a,1bh - jmp fch -; -; Output LF -; -f1lf: - mvi a,lf - jmp fch -; -; Output CRLF -; -f1nl: - mvi a,cr - call chout ;output CR - mvi a,lf - jmp fch - -; -; Define New Output Format -; -outfmt: - inx h ;pt to format char - xchg - lhld format ;pt to format area - xchg -; -; Get next char for format string -; -outf1: - mov a,m ;get next char - ani 7fh ;mask - cpi endfmt ;end of format? - jz outf2 - cpi CR ;end of line? - jz outf3 - cpi LF ;end of line? - jz outf3 - cpi CTRLZ ;end of file? - jz outf3 - stax d ;store char - inx h ;pt to next - inx d - cpi literal ;literal denotation? - jnz outf1 ;continue if not -; -; Literal flag, so store next char exactly as-is without interpretation -; - mov a,m ;get next char - ani 7fh ;mask - stax d ;store it literally - inx h ;pt to next - inx d - jmp outf1 -; -; Format String Stored - Terminate it -; -outf2: - inx h ;pt to next char -outf3: - xra a ;terminate format string - stax d - jmp output - -; -; Invalid Word - So State -; -badword: - call eprint - db cr,lf,bel,' Invalid Word Reference: ',0 - lxi h,wordbf ;pt to buffer - call prword ;print word - lhld nextch ;continue - jmp output -; -; Element must be a word - resolve it -; -bufword: - lxi d,wordbf ;buffer to store word in - mvi b,wordl ;length -; -; Build Word into WORDBF -; -bword1: - call capa ;get char - cpi ' '+1 ;end? - jc bword3 - stax d ;store char - inx h ;pt to next - inx d - dcr b ;count down - jnz bword1 -; -; Word is longer than WORDL - skip trailing chars -; -bword2: - mov a,m ;skip chars to delimiter - ani 7fh ;mask - cpi ' '+1 - jc bword4 - inx h ;pt to next - jmp bword2 -; -; Word is built into WORDBF - space fill it -; -bword3: - mvi a,' ' ;space - stax d ;store char - inx d ;pt to next - dcr b ;count down - jnz bword3 -; -; Word is Stored -; HL pts to next char after the Word -; -bword4: - ret -; -; Scan for Word in Table -; Return with Zero Set if Not Resolved -; If Resolved, DE=address of word -; -wscan: - lhld words ;pt to first word in table -wscan1: - mov a,m ;abort if empty table - ora a - rz - lxi d,wordbf ;pt to buffer - mvi b,wordl ;size of buffer - push h ;save HL -wscan2: - ldax d ;get char - cmp m ;compare - jnz wscan3 - inx h ;pt to next - inx d - dcr b ;count down - jnz wscan2 - mov e,m ;get address in DE - inx h - mov d,m - pop psw ;clear stack - xra a ;return NZ - dcr a - ret -wscan3: - pop h ;get address of current word in table - lxi d,wordl+2 ;advance to next word - dad d - jmp wscan1 - -; -; Push Address in NEXTCH onto Location Stack -; -locpush: - push h ;save regs - push d - lhld nextch ;get address - xchg ;... in DE - lhld tos ;get top of stack - mov m,e ;store address - inx h - mov m,d - inx h - shld tos ;new top of stack - pop d ;restore regs - pop h - ret -; -; Pop Address from Top of Stack -; -locpop: - lhld locstk ;local stack - xchg - lhld tos ;check to see if nothing on stack - mov a,e ;if lows are same, nothing on stack - cmp l - rz - dcx h ;pt to top element - mov d,m ;get high - dcx h - mov e,m ;get low - shld tos ;new top of stack - xchg ;address in HL - xra a ;return with NZ - dcr a - ret -; -; Skip to Non-Space -; -sksp: - mov a,m ;get char - ani 7fh ;mask - call issp ;test for space - rnz ;not space, so return - inx h ;pt to next - jmp sksp -; -; Test char in A for space char -; Ret with Z if yes -; -issp: - push h ;save HL - push b ;save BC - lxi h,sptab ;pt to table - mov b,a ;char in B -issp1: - mov a,m ;get next char - ora a ;end of table? - jz issp3 - cmp b ;match? - jz issp2 - inx h ;pt to next - jmp issp1 -issp2: - mov a,b ;restore char - pop b ;restore regs - pop h - ret ;Z flag is set -issp3: - xra a ;set NZ - dcr a - jmp issp2 -; -; Output New Line -; -crlf: - push psw ;save A - mvi a,cr ;CR - call chout - mvi a,lf ;LF - call chout - pop psw ;get A - ret -; -; Output Char in A with XON/XOFF Flow Control -; -chout: - push psw ;save char - call condin ;conditional input - jz chout1 - cpi ctrls ;pause? - jnz chout1 - call cin ;wait for following char -chout1: - pop psw ;get char - push b ;save BC - mov c,a ;char in C - lda outdev ;get output device - cpi 'C' ;console? - jz chcon - cpi 'L' ;printer? - jz chlst - cpi 'P' ;punch? - jz chpun -; -; Output to Console -; -chcon: - mov a,c ;get char - call cout - pop b - ret -; -; Output to List -; -chlst: - mov a,c ;get char - call lout - pop b - ret -; -; Output to Punch -; -chpun: - mov a,c ;get char - call pout - pop b - ret -; -; Print String Pted to by HL -; -epstr: - mov a,m ;get char - inx h ;pt to next - ani 7fh ;mask MSB - rz ;done - call chout ;print char - jmp epstr -; -; Print String at Return Address -; -eprint: - xthl ;save HL and pt to string - call epstr ;print string - xthl ;restore HL and new exec adr - ret -; -; Input Char, Mask, and Capitalize -; -capa: - mov a,m ;get char - ani 7fh ;mask - jmp caps ;capitalize - -; -; Space Table -; -sptab: - db ' ',tab,bs,ff,',','.',0 ;space chars - -; -; Data Area -; -defname: - db 'STD ' ;default file name -deftype: - db 'DPG' ;default file type -deffmt: - db '%C',0 ;default format string -outdev: - ds 1 ;output device (C=console, L=list, P=punch) -outdev1: - ds 1 ;save area for output device -wordbf: - ds wordl ;current word buffer -format: - ds 2 ;address of format string -free: - ds 2 ;address of free area -words: - ds 2 ;address of scratch area -nxtword: - ds 2 ;pointer to next word -nextch: - ds 2 ;pointer to next char -locstk: - ds 2 ;pointer to location stack -tos: - ds 2 ;pointer to top of stack - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/DPROG12.LBR b/Source/Images/d_bp/u15/DPROG12.LBR deleted file mode 100644 index 0a7c4840..00000000 Binary files a/Source/Images/d_bp/u15/DPROG12.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/DU3.COM b/Source/Images/d_bp/u15/DU3.COM deleted file mode 100644 index 14641e60..00000000 Binary files a/Source/Images/d_bp/u15/DU3.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/DU3.HLP b/Source/Images/d_bp/u15/DU3.HLP deleted file mode 100644 index 4d536d3d..00000000 --- a/Source/Images/d_bp/u15/DU3.HLP +++ /dev/null @@ -1,1131 +0,0 @@ -; - -- DU3 -- - - GENERAL INFORMATION - 1 - Invoking DU3 and DU3 Installation - 2 - DU3 Command Summary - 3 - The DU3 Editor - 4 - Examples of Command Use - µ - Interpretinç thå DU³ Directorù Display - - COMMAND DETAILS - A - Logging Disks and Examining Disk Parameters - B - Positioning and Reading Data - C - Searching for Data - D - Saving and Restoring Data - E - Viewing Data - F - Altering Data - G - Manipulating Macros and the @ Command - H - Miscellanea -:1 - - DU³ ió invokeä bù á commanä linå oæ thå followinç form: - - DU3 - -wherå Get Saved Block - B Get Block from Queue - G Get Current Group - Gn Get Group N - - ---- Queue Control ---- - Q Print Queue Statistics QZ Zero (Empty) Queue - QSfile Save Queue as File - - - ---- Data Searching ---- -Ff Find File f =string Search for String -Un Set User Area for Find - - ---- Login/Disk Reset ---- -Ld Log in Disk N New Disk Reset - - ---- Printer Output ---- -P Toggle Printer - - ---- Command Manipulation ---- -@ Exec Prev Command *nn Repeat Command Line - - ---- Statistics/Help ---- -# Display Disk Stats ? Display Help Info - - ---- Halt/Sleep ---- -! Halt and Wait for User Zn Sleep n Seconds - -:A - - Thå followinç commandó arå discusseä iî thió sectioî oæ -thå HELÐ file: - - L -- Log in Disk - N -- New Disk (Reset Disk System) - M -- Map Disk Directory - U -- Select User Number - # -- Print Disk and Queue Statistics - - - - L[d] - - Thå simplå "L¢ commanä re-logó iî thå currenô disk® Thå -useò maù pulì ouô á disk¬  puô iî á new¬ anä "L¢ jusô tï loç -iô in® Thå forí "Ld"¬ wherå ä ió á valiä drivå letteò (likå -"LB")¬ ió useä tï loç iî á specifiã disë anä permiô thå useò -tï worë oî thaô particulaò disë froí thió timå foreword. - - Example (actual DU3 session): - -DU3 B1? l - -DU3 B1? la - -DU3 A1? lb - - - N - - Thió  telló DU³ thaô thå useò jusô puô iî á  ne÷  disk® -Foò   thoså  BIOÓ  implementationó  thaô  neeä  tï  bå  tolä -specificallù (Reset© thaô á disë changå haó beeî  made¬  uså -thió  commanä  everù  timå á disë ió changeä  whilå  DU³  ió -running. - - Example: - -DU3 B1? n - - Noteº  Therå waó á significanô delaù beforå thå prompô -returned® Á completå disë systeí reseô tooë place. - - - - M[n] - - Dumpó  á  mað oæ thå grouð allocationó  foò  files®  Mî -showó whicè filå ió allocateä tï grouð "n". - - Example (actual DU3 session, edited): - -DU3 B1? m -0010-0010 07 STD .MSG 00 : 0011-0011 07 TALK .SUM 00 -0012-0012 07 Z2CON .WSH 00 : 0013-0013 00 LDIR .C 00 -0014-0014 00 COMMAND .LBR 01 : 0015-0015 00 LDIR .C 00 - < Detail Left Out > -004B-004B 08 MASTER .CAT 03 : 004C-0050 00 COMMAND .LBR 05 -0051-0051 00 COMMAND .LBR 07 : 0052-0052 00 UNERA15 .COM 00 -0053-0053 08 MENU .CPR 00 : 0054-0057 00 COMMAND .LBR 07 -Type Any Character to Continue or ^C to Abort - -DU3 B1? m54 -0054-0057 00 COMMAND .LBR 07 : -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - - The entries are divided as follows: - -0010-0010 07 STD .MSG 00 : 0011-0011 07 TALK .SUM 00 - ^ ^ ^ ^ - | | Filename Extent - | User Number - Group Range - - Uu - - Logó useò 'u§ foò nexô Æ (Finä File© command. - - Example (actual DU3 session): - -DU3 B1? u7 - -DU3 B7? u1 - - - # - - Prints the disk parameters: - -. Current Disk Drive . Number of Tracks on Disk -. Size of Group in Blocks . Number of Sectors Per Track -. Number of Groups on Disk . Number of Directory Entries -. Number of System Tracks - - Prints the queue statistics: - -. Size of Queue . Space Available - -:B - - Thå followinç commandó arå discusseä iî thió sectioî oæ -thå HELÐ file: - - G -- Position to Group - S -- Position to Sector - T -- Position to Track - R -- Read Block - W -- Write Block - + -- Advance to Next Logical Sector - - -- Backup to Last Logical Sector - - - - G[nn] - - Positioî  tï grouð nî anä reaä block®  Iæ thå forí  ió -simplù "G"¬ sho÷ thå currenô position. - - Example (actual DU3 session): - -DU3 B1? g0 -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - -DU3 B1? g4 -Group = 0004:00, Track = 122, Sector = 129, Physical Sector = 129 - -DU3 B1? g -Group = 0004:00, Track = 122, Sector = 129, Physical Sector = 129 - -DU3 B1? g0 -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - - - Tnn and Snn - - "Tnn¢  doeó  á  seeë tï tracë nî buô doeó  noô  reaä  á -block®  "Snn¢  positionó tï sectoò nî oî thå currenô  tracë -anä readó thå blocë there® Examplå (actuaì DU³ session): - -DU3 B1? t124 -Group = 0015:00, Track = 124, Sector = 1, Physical Sector = 1 - -DU3 B1? s24 -Group = 0015:17, Track = 124, Sector = 24, Physical Sector = 24 - - - R and W - - Ò  readó thå blocë currentlù positioneä tï intï memory® -Notå Ò (Read© ió impliciô iî thå G¬  +¬  anä - commands¬ buô -NOÔ iî thå Ó anä Ô commands. - - × writeó bacë thå currenô blocë (NOTEº  maù noô bå useä -afteò aî Æ command¬ aó CP/Í waó useä tï finä thå filå iî thå -directory). - - Examples: - -DU3 B1? r - -DU3 B1? w - - - +[nn] and -[nn] - - "+¢ advanceó ± sectoò (iæ belo÷ tracë 2¬  thió advanceó -tï nexô numericaì sectoò anä iæ ² oò more¬ advanceó baseä oî -thå system'ó sectoò skewinç algorithm¬  i.e®  sï « wilì  geô -thå  nexô  logicaì sectoò oæ thå file)®  "-¢ backupó  uð  ± -sectoò iî thå samå sense. - - Notå « anä - maù takå aî amountº foò example¬ +1µ stepó -iî  1µ  sectors®  Notå  alsï thaô "-¢ issueä  aô  thå  firsô -logicaì  sectoò  oæ thå disë wilì wrað bacë tï thå lasô  anä -"+¢ issueä aô lasô sectoò wilì wrað forwarä tï thå first. - - Examples (actual DU3 session): - -DU3 B1? g0 -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - - DU3 B1? d -00 07535444 20202020 204D5347 00000002 |.STD MSG....| -10 10000000 00000000 00000000 00000000 |................| -20 004C4449 52202020 20432020 00000038 |.LDIR C ...8| -30 13001500 00000000 00000000 00000000 |................| -40 0843504D 55472020 20434154 01000046 |.CPMUG CAT...F| -50 1C001E00 38003D00 41004300 45000000 |....8.=.A.C.E...| -60 00434F4D 4D414E44 204C4252 01000080 |.COMMAND LBR....| -70 14001600 17001800 19001A00 1B001D00 |................| - -DU3 B1? +d -Group = 0000:01, Track = 122, Sector = 2, Physical Sector = 2 -00 0754414C 4B202020 2053554D 00000049 |.TALK SUM...I| -10 11002300 24000000 00000000 00000000 |..#.$...........| -20 00554E45 52413135 2041534D 00000060 |.UNERA15 ASM...`| -30 3E003F00 40000000 00000000 00000000 |>.?.@...........| -40 075A3249 4E532020 20575348 0000002A |.Z2INS WSH...*| -50 21002500 00000000 00000000 00000000 |!.%.............| -60 075A3243 4F4E2020 20575348 0000003F |.Z2CON WSH...?| -70 12002200 00000000 00000000 00000000 |..".............| - -DU3 B1? +d -Group = 0000:02, Track = 122, Sector = 3, Physical Sector = 3 -00 07445532 20202020 2042414B 00000057 |.DU3 BAK...W| -10 26002800 29000000 00000000 00000000 |&.(.)...........| -20 04535441 52545550 20C3CF4D 0000001E |.STARTUP COM....| -30 27000000 00000000 00000000 00000000 |'...............| -40 00434F4D 4D414E44 204C4252 03000080 |.COMMAND LBR....| -50 1F002000 30003100 32003300 34003500 |.. .0.1.2.3.4.5.| -60 00434F4D 4D414E44 204C4252 05000080 |.COMMAND LBR....| -70 36003700 39004C00 4D004E00 4F005000 |6.7.9.L.M.N.O.P.| - -DU3 B1? +2 -Group = 0000:04, Track = 122, Sector = 5, Physical Sector = 5 - - -DU3 B1? d -00 084D4153 54455220 20434154 01000080 |.MASTER CAT....| -10 2D002F00 3A003B00 3C004200 44004600 |-./.:.;.<.B.D.F.| -20 00464958 54455820 2041534D 0100001E |.FIXTEX ASM....| -30 65006600 69006B00 6C000000 00000000 |e.f.i.k.l.......| -40 00554E45 52413135 20434F4D 00000007 |.UNERA15 COM....| -50 52000000 00000000 00000000 00000000 |R...............| -60 084D454E 55202020 20C35052 00000008 |.MENU CPR....| -70 53000000 00000000 00000000 00000000 |S...............| - -DU3 B1? -3d -Group = 0000:01, Track = 122, Sector = 2, Physical Sector = 2 -00 0754414C 4B202020 2053554D 00000049 |.TALK SUM...I| -10 11002300 24000000 00000000 00000000 |..#.$...........| -20 00554E45 52413135 2041534D 00000060 |.UNERA15 ASM...`| -30 3E003F00 40000000 00000000 00000000 |>.?.@...........| -40 075A3249 4E532020 20575348 0000002A |.Z2INS WSH...|| -50 21002500 00000000 00000000 00000000 |!.%.............| -60 075A3243 4F4E2020 20575348 0000003F |.Z2CON WSH...?| -70 12002200 00000000 00000000 00000000 |..".............| -:C - - The commands for searching for data on the disk are: - - Ffilename.typ -- find all dir entries for file - - =string -- find next occurrance of string - - - - Ffilename.typ - - Prinô directorù foò filå "filename.typ"®  Thió commanä -presentó  thå  directorù  entrieó foò  alì  extentó  oæ  thå -indicateä  file®  Seå thå sectioî oî "Interpretinç thå  DU³ -Directorù   Display¢  foò  infï  oî  ho÷  tï  interpreô  thå -informatioî presented. - - Example (actual DU3 session): - -DU3 B1? fz80.mac -40 015A3830 20202020 204D4143 0000000E |.Z80 MAC....| -50 9A000000 00000000 00000000 00000000 |................| -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - -DU3 B1? ftest.txt -++ File Not Found ++ -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - - - =string - - Thió commanä performó á searcè foò thå indicateä  ASCIÉ -text¬  startinç aô currenô sector® ®  Biô ·  ió -ignoreä unlesó .?.@.A.B.C.D.| -20 075A3243 4F4E2020 20575320 06000077 |.Z2CON WS ...w| -30 45014601 47014801 00000000 00000000 |E.F.G.H.........| -40 E5444953 4B4F5554 20434F4E 00000020 |eDISKOUT CON... | -50 97000000 00000000 00000000 00000000 |................| -60 07445532 20202020 20484C50 01000006 |.DU3 HLP....| -70 98009900 9B009C00 9D000000 00000000 |................| - - -DU3 B1? +=DU3,d -Group = 0000:11, Track = 122, Sector = 18, Physical Sector = 18 -= at 24 -Group = 0000:11, Track = 122, Sector = 18, Physical Sector = 18 -00 E547454E 494E5320 204D4143 01000080 |eGENINS MAC....| -10 D700EF00 F000F400 F500F600 F700F800 |W.o.p.t.u.v.w.x.| -20 E5445532 20202020 2041534D 01000080 |eDU3 ASM....| -30 EC00ED00 EE00FA00 07010B01 0E011301 |l.m.n.z.........| -40 04445532 20202020 20C3CF4D 0000004E |.DU3 COM...N| -50 F100F200 F3000000 00000000 00000000 |q.r.s...........| -60 E547454E 494E5320 204D4143 02000039 |eGENINS MAC...9| -70 F9000F01 00000000 00000000 00000000 |y...............| - -:D - - Thå followinç commandó arå discusseä iî thió sectioî oæ -thå HELÐ file: - - < -- Save Current Block - > -- Restore Saved Block - B -- Load Current Block from Head of Queue - G -- Copy Group from Head of Queue and Write - Q -- Print Queue Statistics - QZ -- Zero (Clear) Queue - QS -- Save Queue as a File - - - - < and > - - "<¢  saveó  currenô blocë iî aî internaì  savå  buffer® -">¢  copieó thå internaì savå buffeò intï thå currenô  blocë -areá (buô doeó NOÔ writå iô ouô tï disk). - - B - - "B¢ extractó thå blocë aô thå heaä oæ thå  DU³ -Queuå anä placeó iô intï thå workinç buffeò area. - - G[nn] - - "G¢ copieó thå grouð aô thå heaä oæ thå  DU³ -Queuå  ontï  disk®  Iæ  nî ió specifieä (aó  iî  "Gnn")¬  theî  thå indicateä grouð ió reaä froí oò  writteî -to®  Iæ  nî  ió  noô given¬  theî thå  grouð  thå  useò  ió -currentlù positioneä tï ió affected. - - Q, QZ, and QSfile - - Ñ reportó thå statuó oæ thå DU³ Queue¬  namelù ho÷ manù -blockó  arå  storeä iî iô anä ho÷ mucè  spacå  remains®  QÚ -zeroeó  (clears© thå DU³ Queue®  "QSfilename.typ¢ saveó thå -DU³ Queuå oî disë iî thå currenô useò areá aó thå  indicateä -file. - Examples (actual DU3 session): - -DU3 B1? g0 -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - -DU3 B1? d -00 07535444 20202020 204D5347 00000002 |.STD MSG....| -10 10000000 00000000 00000000 00000000 |................| -20 004C4449 52202020 20432020 00000038 |.LDIR C ...8| -30 13001500 00000000 00000000 00000000 |................| -40 0843504D 55472020 20434154 01000046 |.CPMUG CAT...F| -50 1C001E00 38003D00 41004300 45000000 |....8.=.A.C.E...| -60 00434F4D 4D414E44 204C4252 01000080 |.COMMAND LBR....| -70 14001600 17001800 19001A00 1B001D00 |................| - -DU3 B1? < - -DU3 B1? ch0-7f e5 - - DU3 B1? d -00 E5E5E5E5 E5E5E5E5 E5E5E5E5 E5E5E5E5 |eeeeeeeeeeeeeeee| -10 E5E5E5E5 E5E5E5E5 E5E5E5E5 E5E5E5E5 |eeeeeeeeeeeeeeee| -20 E5E5E5E5 E5E5E5E5 E5E5E5E5 E5E5E5E5 |eeeeeeeeeeeeeeee| -30 E5E5E5E5 E5E5E5E5 E5E5E5E5 E5E5E5E5 |eeeeeeeeeeeeeeee| -40 E5E5E5E5 E5E5E5E5 E5E5E5E5 E5E5E5E5 |eeeeeeeeeeeeeeee| -50 E5E5E5E5 E5E5E5E5 E5E5E5E5 E5E5E5E5 |eeeeeeeeeeeeeeee| -60 E5E5E5E5 E5E5E5E5 E5E5E5E5 E5E5E5E5 |eeeeeeeeeeeeeeee| -70 E5E5E5E5 E5E5E5E5 E5E5E5E5 E5E5E5E5 |eeeeeeeeeeeeeeee| - -DU3 B1? >,d -00 07535444 20202020 204D5347 00000002 |.STD MSG....| -10 10000000 00000000 00000000 00000000 |................| -20 004C4449 52202020 20432020 00000038 |.LDIR C ...8| -30 13001500 00000000 00000000 00000000 |................| -40 0843504D 55472020 20434154 01000046 |.CPMUG CAT...F| -50 1C001E00 38003D00 41004300 45000000 |....8.=.A.C.E...| -60 00434F4D 4D414E44 204C4252 01000080 |.COMMAND LBR....| -70 14001600 17001800 19001A00 1B001D00 |................| - - -DU3 B1? q -** Queue Status Summary ** -0 Blocks in Queue -249 Blocks Left in Queue -Address of Head of Queue: 3E00 Hex -Address of Tail of Queue: 3E00 Hex - -DU3 B1? <1a> - - Use W to write changes to disk. - - Ranges may be specified: - -CHaddr-addr byte or CAaddr-addr byte - Changes a range of bytes to the same value - - Examples (actual DU3 session): - -DU3 B7? g0 -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - -DU3 B7? d -00 07535444 20202020 204D5347 00000002 |.STD MSG....| -10 10000000 00000000 00000000 00000000 |................| -20 004C4449 52202020 20432020 00000038 |.LDIR C ...8| -30 13001500 00000000 00000000 00000000 |................| -40 0843504D 55472020 20434154 01000046 |.CPMUG CAT...F| -50 1C001E00 38003D00 41004300 45000000 |....8.=.A.C.E...| -60 00434F4D 4D414E44 204C4252 01000080 |.COMMAND LBR....| -70 14001600 17001800 19001A00 1B001D00 |................| - - -DU3 B7? d0-#f -00 07535444 20202020 204D5347 00000002 |.STD MSG....| - -DU3 B7? h0-#f -00 07535444 20202020 204D5347 00000002 - -DU3 B7? a0-#f -00 |.STD MSG....| - -DU3 B7? fdu2.hlp -20 07445532 20202020 20484C50 01000039 |.DU3 HLP...9| -30 28009800 99009B00 9C009D00 00000000 |(...............| -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - -DU3 B7? g28 -Group = 0028:00, Track = 125, Sector = 273, Physical Sector = 273 - - -DU3 B7? d -00 496E766F 6B696E67 20445533 20616E64 |Invoking DU3 and| -10 20445533 20496E73 74616C6C 6174696F | DU3 Installatio| -20 6E0D0A44 55332043 6F6D6D61 6E642053 |n..DU3 Command S| -30 756D6D61 72790D0A 436F6D6D 616E6473 |ummary..Commands| -40 20666F72 204C6F67 67696E67 20446973 | for Logging Dis| -50 6B732061 6E642045 78616D69 6E696E67 |ks and Examining| -60 20446973 6B205061 72616D65 74657273 | Disk Parameters| -70 0D0A436F 6D6D616E 64732066 6F722050 |..Commands for P| - -DU3 B7? v -Invoking DU3 and DU3 Installation -DU3 Command Summary -Commands for Logging Disks and Examining Disk Parameters -Commands for P -Group = 0028:00, Track = 125, Sector = 273, Physical Sector = 273 - - -DU3 B7? v3 -Invoking DU3 and DU3 Installation -DU3 Command Summary -Commands for Logging Disks and Examining Disk Parameters -Commands for Positioning and Reading Data -Commands for Searching for Data -Commands for Saving and Restoring Data -Commands for Viewing data -Commands for Altering Data -Commands for Manipulating Macros and the @ Command -Miscellanea -Examples of command use -Interpret -Group = 0028:02, Track = 125, Sector = 275, Physical Sector = 275 - - -DU3 B7? g28 -Group = 0028:00, Track = 125, Sector = 273, Physical Sector = 273 - -DU3 B7? d -00 496E766F 6B696E67 20445533 20616E64 |Invoking DU3 and| -10 20445533 20496E73 74616C6C 6174696F | DU3 Installatio| -20 6E0D0A44 55332043 6F6D6D61 6E642053 |n..DU3 Command S| -30 756D6D61 72790D0A 436F6D6D 616E6473 |ummary..Commands| -40 20666F72 204C6F67 67696E67 20446973 | for Logging Dis| -50 6B732061 6E642045 78616D69 6E696E67 |ks and Examining| -60 20446973 6B205061 72616D65 74657273 | Disk Parameters| -70 0D0A436F 6D6D616E 64732066 6F722050 |..Commands for P| - - -DU3 B7? ch0-10 0 - -DU3 B7? d -00 00000000 00000000 00000000 00000000 |................| -10 00445533 20496E73 74616C6C 6174696F |.DU3 Installatio| -20 6E0D0A44 55332043 6F6D6D61 6E642053 |n..DU3 Command S| -30 756D6D61 72790D0A 436F6D6D 616E6473 |ummary..Commands| -40 20666F72 204C6F67 67696E67 20446973 | for Logging Dis| -50 6B732061 6E642045 78616D69 6E696E67 |ks and Examining| -60 20446973 6B205061 72616D65 74657273 | Disk Parameters| -70 0D0A436F 6D6D616E 64732066 6F722050 |..Commands for P| - -DU3 B7? ca11 This is a test - -DU3 B7? d0-#1f -00 00000000 00000000 00000000 00000000 |................| -10 00546869 73206973 20612074 6573746F |.This is a testo| - -:G - - Macros - - Á Macrï ió á short-hanä thå useò caî emploù tï definå á -commanä  sequence®  Ratheò thaî havinç tï typå aî  involveä -commanä oveò anä oveò again¬  thå DU³ macrï facilitù  allowó -thå  useò tï assigî thió commanä sequencå tï á numbeò (°  tï -9© anä theî executå iô bù simplù presentinç thió numbeò aó á -command®  Thå  followinç commandó arå associateä witè  thió -facility. - - :ntext and n - - ":n¢  defineó thå texô followinç thå digiô 'n§ tï -bå á Macro®  Aó always¬ ° <½ î <½ 9® Thå macrï definitionó -maù  bå  createä  anä redefineä aô will®  Iæ  á  macrï  haó -alreadù  beeî defineä foò thå indicateä number¬  iô wilì  bå -overwritteî bù thå executioî oæ thió command®  "n"¬ wherå ° -<½ î <½ 9¬ executeó thå indicateä macro. - - - :Pn and :PA - - ":Pn"¬  wherå  ° <½ î <½ 9¬  printó thå texô  oæ  Macrï -Numbeò n® ":PA¢ printó thå texô oæ alì 1° macros. - - @ and :P@ - - "@¢  executeó  thå previouó commanä linå thaô  diä  noô -contaiî  thå  "@¢  Command®  Thió provideó aî easù  waù  tï -repeaô thå lasô commanä linå typed® Foò example: - - g0 <-- go to Group 0 - ch0-7f e5,< <-- Initialize the first block and Save - >,w,+ <-- Read in the Saved Block, Write it - out to disk, and advance to next - logical block - @ <-- Do the Previous Command Again - @ <-- And Again - - - ":P@¢  printó thå previouó commanä linå (anä  doeó  noô -changå it). - - Examples (edited DU3 session): - -DU3 B7? g0 -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - -DU3 B7? :1+,d0-#1f - -DU3 B7? :p1 -Macro Definitions -- -1: +,d0-#1f - -DU3 B7? 1 -Group = 0000:01, Track = 122, Sector = 2, Physical Sector = 2 -00 0754414C 4B202020 2053554D 00000049 |.TALK SUM...I| -10 11002300 24000000 00000000 00000000 |..#.$...........| - - -DU3 B7? 1 -Group = 0000:02, Track = 122, Sector = 3, Physical Sector = 3 -00 07444953 4B4F5554 20434F4E 00000000 |.DISKOUT CON....| -10 00000000 00000000 00000000 00000000 |................| - -DU3 B7? 1 -Group = 0000:03, Track = 122, Sector = 4, Physical Sector = 4 -00 04584449 52202020 20C3CF4D 00000054 |.XDIR COM...T| -10 2C002E00 48000000 00000000 00000000 |,...H...........| - -DU3 B7? g0,d0-#1f -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 -00 07535444 20202020 204D5347 00000002 |.STD MSG....| -10 10000000 00000000 00000000 00000000 |................| - -DU3 B7? 1 -Group = 0000:01, Track = 122, Sector = 2, Physical Sector = 2 -00 0754414C 4B202020 2053554D 00000049 |.TALK SUM...I| -10 11002300 24000000 00000000 00000000 |..#.$...........| - - -DU3 B7? :pa -Macro Definitions -- -0: - -1: +,d0-#1f - -2: - - < Detail Left Out > - -9: - - -DU3 B7? g0,d0-#1f,1,1,1 -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 -00 07535444 20202020 204D5347 00000002 |.STD MSG....| -10 10000000 00000000 00000000 00000000 |................| -Group = 0000:01, Track = 122, Sector = 2, Physical Sector = 2 -00 0754414C 4B202020 2053554D 00000049 |.TALK SUM...I| -10 11002300 24000000 00000000 00000000 |..#.$...........| -Group = 0000:02, Track = 122, Sector = 3, Physical Sector = 3 -00 07444953 4B4F5554 20434F4E 00000000 |.DISKOUT CON....| -10 00000000 00000000 00000000 00000000 |................| -Group = 0000:03, Track = 122, Sector = 4, Physical Sector = 4 -00 04584449 52202020 20C3CF4D 00000054 |.XDIR COM...T| -10 2C002E00 48000000 00000000 00000000 |,...H...........| - - -DU3 B7? @ - -Command -- -g0,d0-#1f,+,d0-#1f,+,d0-#1f,+,d0-#1f -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 -00 07535444 20202020 204D5347 00000002 |.STD MSG....| -10 10000000 00000000 00000000 00000000 |................| -Group = 0000:01, Track = 122, Sector = 2, Physical Sector = 2 -00 0754414C 4B202020 2053554D 00000049 |.TALK SUM...I| -10 11002300 24000000 00000000 00000000 |..#.$...........| -Group = 0000:02, Track = 122, Sector = 3, Physical Sector = 3 -00 07444953 4B4F5554 20434F4E 00000000 |.DISKOUT CON....| -10 00000000 00000000 00000000 00000000 |................| -Group = 0000:03, Track = 122, Sector = 4, Physical Sector = 4 -00 04584449 52202020 20C3CF4D 00000054 |.XDIR COM...T| -10 2C002E00 48000000 00000000 00000000 |,...H...........| - -:H - - ? - - "?¢ giveó á commanä summarù anä telló thå useò whaô thå -currenô  valueó arå foò Processoò Clocë Speeä anä Lineó  peò -Pagå  oî CONº  aó welì aó thå addresó foò thå Grouð  Storagå -Buffeò (wherå thå DU³ Queuå begins). - - - *[nn] - - "*nn¢  repeató thå currenô commanä linå (aó entereä  sï -far© nî times®  Thió commanä defaultó tï "forever¢ iæ nî ió -noô specified® 'nn§ maù bå ² tï 65535. - - - ! - - "!¢   haltó   processinç  oæ   commands¬   displayó   á -continuatioî messagå tï thå user¬  anä waitó foò thå useò tï -typå anù key® Typinç á Control-à abortó commanä processing® -Thió commanä ió usefuì iî stoppinç loopó tï givå thå useò aó -mucè timå aó hå wantó tï revie÷ thå display. - - - P - - "P¢  toggleó thå printeò switcè oî anä off®  Iô allowó -thå  useò  tï turî oî anä ofæ á recordinç  oæ  youò  consolå -output. - - X - - "X¢ exiôs bacë tï ZCPR3. - - - Z[nn] - - "Znn¢ causeó thå prograí tï sleep¬ oò pause¬ anä maù bå -useä tï looë aô á dumð quicklù iî á loopinç commanä line® Ú -ió  ±  sec®  Znî  ió nî secondó oî  aî  î  MHú  8080®  Thå -processoò  speeä  ió specifieä withiî thå ZCPR³  Environmenô -Descriptor. - - - ^C - - "^C" exits to ZCPR3 and Warm Boots. - - Examples (actual DU3 session): - - -DU3 B7? g0 -Group = 0000:00, Track = 122, Sector = 1, Physical Sector = 1 - -DU3 B7? d0-#f,+,!,* -00 07535444 20202020 204D5347 00000002 |.STD MSG....| -Group = 0000:01, Track = 122, Sector = 2, Physical Sector = 2 - -Type Any Character to Continue or ^C to Abort - -00 0754414C 4B202020 2053554D 00000049 |.TALK SUM...I| -Group = 0000:02, Track = 122, Sector = 3, Physical Sector = 3 - -Type Any Character to Continue or ^C to Abort - -00 07444953 4B4F5554 20434F4E 00000000 |.DISKOUT CON....| -Group = 0000:03, Track = 122, Sector = 4, Physical Sector = 4 - -Type Any Character to Continue or ^C to Abort - -00 04584449 52202020 20C3CF4D 00000054 |.XDIR COM...T| -Group = 0000:04, Track = 122, Sector = 5, Physical Sector = 5 - -Type Any Character to Continue or ^C to Abort - - -DU3 B7? g1 -Group = 0001:00, Track = 122, Sector = 33, Physical Sector = 33 - -DU3 B7? d0-#f,+,*3 -00 E5482020 20202020 2042414B 00000004 |eH BAK....| -Group = 0001:01, Track = 122, Sector = 34, Physical Sector = 34 -00 E5535542 32202020 2042414B 0100007B |eSUB2 BAK...{| -Group = 0001:02, Track = 122, Sector = 35, Physical Sector = 35 -00 E5434420 20202020 204D4143 00000047 |eCD MAC...G| -Group = 0001:03, Track = 122, Sector = 36, Physical Sector = 36 - -DU3 B7? ^C -B7> - -:3 - - DU³ containó á built-in¬  screen-orienteä editor® Thió -editoò deriveó itó screen-orienteä functionó froí thå  ZCPR³ -TCAP¬  sï  thå  DU³ Editoò shoulä bå invokeä onlù  oî  ZCPR³ -Systemó  whicè  arå supportinç á valiä TCAÐ foò  thå  user'ó -terminal. - - - E - - Thå  commanä  "E¢  invokeó thå editor®  Iæ  anù  otheò -commandó  follo÷  Å oî thå samå  line¬  theså  commandó  arå -flushed®  Thå  DU³ Editoò ió á completå subsysteí undeò DU³ -iî  itó owî right®  Iô provideó á varietù oæ  user-friendlù -editinç  featureó  foò thå manipulatioî oæ datá  withiî  thå -currenô sectoò (block© aó welì aó allowinç thå useò tï issuå -anù  DU³ commanä linå hå desires¬  returninç tï  thå  editoò -wheî iô ió completed. - - - Thå  DU³  Editoò presentó á screeî displaù tï thå  useò -whicè  ió structureä tï includå á linå showinç thå  contentó -oæ  thå  sectoò aô thå cursor¬  severaì lineó  oæ  hex/ASCIÉ -(similaò  tï thå Ä commanä output© whicè displaù thå  entirå -sector¬ á menõ oæ commands¬ á cursoò (whicè initiallù pointó -tï thå firsô bytå iî á sector)¬ anä á commanä prompt. - - Thå  useò  maù  emploù  thå  WordStaò  cursoò  movemenô -commandó  tï  movå thå cursoò abouô iî thå  currenô  sector® -Theså commandó are: - - ^E = Cursor UP - ^ - ^S = Cursor LEFT <-+-> ^D = Cursor RIGHT - v - ^X = Cursor DOWN - - ^R refreshes the screen display. - - - Thå followinç commandó arå alsï availablå undeò thå DU³ -Editor: - - A = Enter ASCII Text into block starting at cursor - H = Enter Hex/Dec Numbers into block starting at cursor - - + = Advance to Next Logical Sector and Edit - - = Backup to Last Logical Sector and Edit - - ^W = Write the Current Sector to Disk - - C = Issue Any DU3 Command Line - - X = Exit to DU3 - ^C = Exit to ZCPR3 - - - Alì  oæ theså commandó arå self-explanatorù excepô  foò -thå Á anä È commands. - - Thå  Á  commanä ió useä tï enteò ASCIÉ  texô  intï  thå -sectoò startinç aô thå cursoò position® Iî responså tï thió -command¬  thå DU³ Editoò wilì prompô thå useò foò input® Hå -maù  theî  typå  anù  texô hå wisheó  followeä  bù  strikinç -RETURN® Thió texô ió entereä literallù intï thå sector® Iæ -iô overflowó thå enä oæ thå sector¬ iô ió truncated® Iæ thå -useò  wisheó  tï  embeä  hexadecimaì  values¬  likå  0Ä  foò -Carriagå Return¬ hå maù uså thå forí ""® Example: - - this is a test<0D><0A> - - - Thå  È commanä ió useä tï enteò á grouð oæ  hexadecimaì -anä  decimaì valueó intï thå sectoò startinç aô  thå  cursoò -position®  Numberó  separateä bù spaceó arå typeä iî bù thå -user®  Iæ thå useò wisheó tï enteò á valuå iî decimal¬  thå -forí "#nn¢ ió used® Example: - - 1 2 3 3A b7 #25 - - - Thå  Editoò  ió onå oæ thå mosô  powerfuì  capabilitieó -withiî  DU3®   Iô  ió  highlù  recommendeä  thaô  thå  useò -experimenô   witè   iô  anä  becomå  acquainteä   witè   itó -capabilities® - -:4 - Examples - - - Multiple commands may be separated by ",". - - Anù valiä commanä strinç maù bå placeä aó aî operanä oæ -thå originaì DU³ command¬ i.e.: - - A>DU3 G0,D,G2,=OK<1A>,D - - - Exampleº  thå followinç commandó wilì eraså thå   disë -directorù tï alì E5's: - - lb log in b drive - g0 position to dir. - ch0-7f e5 fill with e5 - < save the sector - >,w,+,/16 restore, write, next, - repeat 16 - - This could be shortened to: - - lb,g0,ch0-7f e5,< - >,w,+,/16 - - - Thå followinç twï macroó can bå defined: - - Macro 0 -- - :0g0,ch0-7f e5,< - Macro 1 -- - :1>,w,+,/16 - - Foò  thå  useò tï initializå thå directorù oî Drivå  Aº -anä  theî  oî  Drivå B:¬  thå followinç  commandó  coulä  bå -issued: - - la,0 <-- Log in A and Initialize first block - 1 <-- Perform write - lb,0 <-- Log in B and Initialize first block - 1 <-- Perform write - n,0 <-- Declare New Disk and Initialize first - block - 1 <-- Perform write - -:5 - Interpretation of Directory Data Presented by DU3 - - Thå  followinç explainó thå formaô oæ á CP/Í  directorù -entrù  aó  showî bù DU3¬  usinç eitheò thå  Æ  (Finä  File© -command¬  oò  jusô doinç Ä (Dump© oæ thå directorù sectors¬ -whicè  arå  locateä iî groupó ° anä ± oî  á  singlå  densitù -disk® Samplå resulô oæ "FSID.COM¢ command: - -First 40 00534944 20202020 20434F4D 0000003A |.SID COM...:| -line || ||| | || || | | - || ||^----hex file name-----^ || || ^file name^ - || || || || in ASCII - || || extent-^^ || - || || || - || || file size in sectors-^^ - || || - || ^^-00 = file active - || E5 = file erased - ^^-displacement of line in directory sector - - -Second 50 33343536 3738393A 00000000 00000000 |3456789:........| -line | | - ^---allocation group numbers-------^ - - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/DU3.MAC b/Source/Images/d_bp/u15/DU3.MAC deleted file mode 100644 index d774afcf..00000000 --- a/Source/Images/d_bp/u15/DU3.MAC +++ /dev/null @@ -1,4446 +0,0 @@ -; 03/01/85 Richard Conn: Replaced fixed in EDPLOT that was somehow lost -; (see lines suffixed by -; -; 01/18/85 Modified by Jay Sage to incorporate a set of permanent -; macros. These macros can be invoked by the command tail -; when DU is invoked. They are copied from a space of 128 -; bytes near the beginning of the code. The area is -; identified by a string of text to facilitate patching. -; The macros are listed one after another, separated by -; carriage return characters. Macros that are not to be -; defined must be present as carriage returns alone or the -; program will fail. -; -; PROGRAM: DU3 -; AUTHOR: RICHARD CONN -; DERIVATION: DUTIL is derived from DU Version 7.5 -; DU2 is derived from DUTIL Version 1.1 -; DU3 is derived from DU2 Version 1.1 -; VERSION: 1.0 -; DATE: 20 June 84 -; PREVIOUS VERSIONS: None -; NOTE: DU3 must be assembled using M80 (or equiv) -; -VERS EQU 13 -Z3ENV EQU 0F400H - -; -; DU3 is derived from -- -; DU.ASM V7.5 Revised 1/23/81 -; DISK UTILITY - By Ward Christensen -; -; Principal Authors of DU V7.5 are -- -; WLC KBP RGF BRR -; -; Key comments from DU V7.5 and DU3 follow -- -; -;This version of DU is compatible with CP/M 2.x -;and does not require alteration for various hardware -;configurations. It adjusts itself automatically to -;the correct number of sectors, tracks, directory size, -;etc. It has been tested on 5-1/4" and 8" floppy, and -;10 megabyte hard disk systems. -; -;Because of the automatic adaption feature, no conditional -;assembly options are included. -; -;************************************************* -;* * -;* This program has been heavily modified * -;* to allow it to work without modification * -;* on all versions of CP/M 2.x. * -;* One known possible problem involves the * -;* system tracks on some systems, and results * -;* from the system sectors being skewed. There * -;* is NO way for a program executing under CP/M * -;* to know about this. This program assumes the * -;* standard convention of no skew being used on * -;: the system tracks. This usually isn't a prob- * -;* lem because the SYSGEN program can be used to * -;* get the system from the disk so that it can * -;* be modified. * -;* * -;* Ron Fowler * -;* * -;************************************************* -; - -; -; SYSLIB and Z3LIB References -; - ext z3vinit,envptr,cls,at,tinit,dinit,stndout,stndend,gotoxy - ext getspeed,getcrt,getmdisk,getmuser - ext codend - -; -;System equates -; -BASE EQU 0 ;SET TO 4200H FOR HEATH OR TRS-80 ALTCPM -; -;CP/M Key Areas -; -FCB EQU BASE+5CH ;CP/M FCB -BDOS EQU BASE+5 ;CP/M BDOS ENTRY POINT -TBUFF EQU BASE+80H ;CP/M TEMPORARY DISK I/O BUFFER -TPA EQU BASE+100H ;CP/M TRANSCIENT PROGRAM AREA -; -; Some Key Variables in DU3 -; -EOLCH equ ',' ;Marks logical end of line -SEPCH equ ' ' ;Argument Separator -MULCH equ '*' ;Multiplication Command -DIM equ 1 ;Enter DIM Mode for ILPRT -BRIGHT equ 2 ;Enter BRIGHT Mode for ILPRT - -; -;CP/M BDOS Function Codes -; -PRINT EQU 9 -GVERS EQU 12 -RESETDK EQU 13 ;RESET SYSTEM -SELDK EQU 14 ;SELECT DISK -CLOSEF EQU 16 ;CLOSE FILE -SRCHF EQU 17 ;SEARCH FIRST -SRCHN EQU 18 ;SEARCH NEXT -DELF EQU 19 ;DELETE FILE -WRITEF EQU 21 ;WRITE BLOCK TO FILE -MAKEF EQU 22 ;CREATE FILE -SUSER EQU 32 ;SELECT USER -GETDSK EQU 25 -GETDPB EQU 31 -; -;CP/M 1.4 Offsets and Some Key Values -; -TRNOFF EQU 15 ;CP/M 1.4 OFFSET FROM BASE - ;OF BDOS TO SECTRAN ROUTINE -SKWOFF EQU 1AH ;CP/M 1.4 OFFSET TO SKEW TABLE -S2OFF EQU 14 ;OFFSET INTO FCB FOR S2 BYTE -DPBOFF EQU 3AH ;CP/M 1.4 OFFSET TO DPB WITHIN BDOS -S2MASK EQU 0FH ;MASK FOR EXTENDED RC BITS OF S2 -DPBLEN EQU 15 ;SIZE OF CP/M 2.x DISK PARM BLOCK -; -;Define ASCII characters -; -CR EQU 0DH ;CARRIAGE RETURN -LF EQU 0AH ;LINE FEED -TAB EQU 09H ;TAB -BS EQU 08H ;BACKSPACE - -; -; MACROS INCLUDE: -; -; DJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO -; -DJNZ MACRO ?N ;;DECREMENT B AND JUMP ON NO ZERO - DCR B - JNZ ?N - ENDM -; -; END OF MACROS -; - - -; -;Beginning of Program -; -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env - -; -; Space Added for Initial Macro Definitions -- block added by -; - ;label to help locate when patching - - db 'INITIAL MACROS:' - -imac0: db 'G0,D',cr ;macro 0 - db '-D',cr ;macro 1 - db '+D',cr ;macro 2 - db cr ;macro 3 - db cr ;macro 4 - db cr ;macro 5 - db cr ;macro 6 - db cr ;macro 7 - db cr ;macro 8 - db cr ;macro 9 - - ;fill rest of 128 bytes with nulls - - if imac0 + 128 - $ gt 0 - rept imac0 + 128 - $ - db 0 - endm - endif - -; End of Block Added by - -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3vinit ;initialize the ZCPR3 Env and the VLIB Env - call tinit ;init terminal - LXI H,0 ;GET PTR TO CP/M STACK - DAD SP ;HL=SP - SHLD DUTSTK ;SAVE IT -; - call codend ;get free space - lxi d,100h ;open area - dad d ;large stack area - shld savbuf - dad d ;100H for SAVBUF - push h ;save ptr - mvi m,126 ;allow 126-char input line - inx h - inx h ;ptr to INBUF - shld inbuf - pop h ;pt to beginning - lxi d,400h ;large area for expansion - dad d - shld pinbuf ;ptr to PINBUF - dad d - shld ctemp ;ptr to CTEMP - dad d - shld ctempx ;ptr to CTEMPX - shld mtabl ;ptr to MACRO TABLE - lxi d,100h*10 ;10 macros - dad d - shld gbuff ;group save buffer - shld direct ;directory load buffer -; - lhld savbuf ;top of stack - sphl ; SET STACK -; - call getspeed - sta clock ;set clock speed - call getcrt ;get CRT data - inx h ;pt to screen size - mov a,m ;get it - sta pagsiz ;set page size - call getmdisk ;get max disk - sta mdisk ;and set it - call getmuser ;get max user - sta muser ;and set it -; -;Set up local jumps to BIOS -; -START1: - LHLD BASE+1 ;WARM BOOT POINTER - LXI D,3 ;READY FOR ADD - DAD D - SHLD VCONST+1 ;CON: Status - DAD D - SHLD VCONIN+1 ;CON: Input - DAD D - SHLD VCONOT+1 ;CON: Output - DAD D - SHLD VLIST+1 ;LST: Output - DAD D ;Skip PUNCH - DAD D ;Skip RDR - DAD D - SHLD VHOME+1 ;Home Disk - DAD D - SHLD VSELDK+1 ;Select Disk - DAD D - SHLD VSETRK+1 ;Set Track - DAD D - SHLD VSTSEC+1 ;Set Sector - DAD D - SHLD SETDMA+1 ;Set DMA Address - DAD D - SHLD VREAD+1 ;Read Block From Disk - DAD D - SHLD VWRITE+1 ;Write Block To Disk - DAD D ;Skip LISTST - DAD D - SHLD VSCTRN+1 ;CP/M 2.x Sector Translation Table -; JMP HELLO -; -;Initialization Complete -- Print Signon Message and Begin Command Processing -; -HELLO: - CALL GETSTP ;SET UP CP/M PARAMETERS - CALL INITP ;INITIALIZE BUFFER PARAMETERS - CALL ILPRT - DB 'DU3 - Disk Utility III, Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0' - DB CR,LF,CR,LF - DB DIM,'Type ? for Help',BRIGHT - DB CR,LF,0 -; -;Clear Editor Reference -; - XRA A - STA EDRUN ;EDITOR NOT RUNNING -; -;Save initial command line in INBUF -; - LXI H,TBUFF ;PT TO COMMAND LINE BUFFER - MOV A,M ;GET CHAR COUNTER - ora a ;check for no tail - jnz ctail ;if not, no need to increment - inr a ;allow for blank otherwise present -ctail: ; - INX H ;PT TO FIRST CHAR - ADD L ;COMPUTE LOCATION OF AFTER LAST CHAR - MOV L,A - MOV A,H - ACI 0 - MOV H,A - MVI M,CR ;SET ENDING CR - LHLD INBUF ;PT TO BUFFER - XCHG ;... IN DE - LXI H,TBUFF+2 ;PT TO INPUT LINE (1 changed to 2 ) - MVI B,128 ;COPY BUFFER - CALL MOVE -; -;Establish Initial Position -; - LXI D,0 ;GROUP 0 - CALL DEGROUP ;POSITION TO GROUP - CALL INQSUB ;PRINT POSITION -; -;Check for initial command -; - LHLD INBUF ;INPUT BUFFER - MOV A,M - CPI CR - JZ PRMPTR ;NO INITIAL COMMAND FROM COMMAND LINE - INX H ;PT TO FIRST CHAR -; -;Got initial command, set it up -; - MOV A,M ;GET FIRST CHAR - CPI '/' ;IF SLASH, PRINT INITIAL HELP (TOOLSET CONVENTION) - JZ IHELP ;PRINT INITIAL HELP INFO - XRA A - STA IHFLG ;SET NO INITIAL HELP -; line replaced -; JMP PRMPTI ;PROCESS AS THOUGH COMMAND LINE WAS TYPED - jmp prmpts ;allow processing of macros in command line -; -;Input Command Line From User at Console -; -PRMPTR: - XRA A ;A=0 - STA IHFLG ;Set No Initial Help - LDA EDRUN ;Check for Editor Running - ORA A - JNZ EDIT0 ;Reenter Editor - CALL SINBUF ;Save old INBUF into PINBUF -PRMPTE: - CALL RDBUF ;Read Input Line -PRMPTS: ;Entry when Command Line has Input - CALL EXMAC ;Expand Macros -; -;Begin Processing Command Line in INBUF -; At this point, HL points to next character to process -; -PRMPTI: - MVI A,0FFH ;SET INFINITE LOOP COUNT - STA TOGO ;LOOP COUNT FOR MULTIPLE LOOPS - STA TOGO+1 -; -;Minor Command Loop; This is the entry point for each individual command in -; a Command Line; Commands may be separated by semicolons in this manner -; -PROMPT EQU $ -SETSTK: - SHLD STKSAV ;SAVE HL FOR STACK LOAD - LHLD SAVBUF ;RESET STACK - SPHL - LHLD STKSAV ;RESTORE HL - XRA A ;ZERO 2-UP PRINT FOR DUAL-COLUMN PRINT - STA TWOUP ;..SWITCH - MVI A,1 - STA FTSW ;TELL SEARCH NOT TO INCR - PUSH H - LXI H,TBUFF ;SET NO-READ INPUT BUFFER ADDRESS - SHLD BUFAD ;FOR RDBYTE - POP H - CALL CTLCS ;ABORT? - JZ PRMPTR ;..YES, READ BUFFER -; -;Do we have to position in directory after find? -; - LDA FINDFL - ORA A - JNZ POSDIR ;POSITION IN DIRECTORY -; -;Begin Command Evaluation -- Check for EOL and Capitalize -; - MOV A,M ;GET NEXT CHAR IN COMMAND LINE - INX H ;POINT TO FOLLOWING CHAR - CPI CR ;END OF LINE PHYSICALLY? - JZ PRMPTR ;INPUT NEW COMMAND LINE IF SO - CPI EOLCH ;END OF LINE LOGICALLY? - JZ PROMPT ;PROCESS NEXT ELEMENT IF SO - CALL UPCASE ;CAPITALIZE COMMAND - STA DUMTYP ;TYPE OF DUMP (A,D,H) - LXI D,CMDTBL ;PT TO COMMAND TABLE - CALL CMD ;PROCESS - JMP WHAT ;ERROR RETURN -; -;Command dispatcher -; If command not found, abort with error message -; If command file, process command with HL pting to next command char and -; A containing command letter -; -CMD: - PUSH H ;SAVE HL - MOV B,A ;COMMAND IN B - XCHG ;HL PTS TO COMMAND TABLE -CMDLP: - MOV A,M ;GET COMMAND - ORA A ;0=END OF TABLE - JZ CMDER - CMP B ;COMPARE COMMAND - JZ CMDGO - INX H ;PT TO ADR - INX H - INX H ;PT TO NEXT CMND - JMP CMDLP -CMDGO: - INX H ;PT TO ADDRESS LOW - MOV E,M - INX H ;PT TO ADDRESS HIGH - MOV D,M - POP H ;RESTORE HL - POP PSW ;CLEAR RETURN ADDRESS - MOV A,B ;COMMAND BACK INTO A - PUSH D ;PLACE ADDRESS ON STACK - RET ;"RUN COMMAND" -CMDER: - POP H ;RESTORE HL - MOV A,B ;RESTORE COMMAND CHAR IN CASE CMD RUN - RET ;... IMMEDIATELY AGAIN ON A NEW TABLE -; -;Macro Expansion Routine -- Expand Macros -; -EXMAC: - LHLD CTEMP ;BUILD INTO TEMPORARY BUFFER - XCHG - LHLD INBUF ;PT TO INPUT LINE -EXMAC1: - MOV A,M ;GET CHAR - CPI '0' ;SKIP IF LESS THAN '0' - JC EXMAC2 - CPI '9'+1 ;CHECK FOR RANGE - JNC EXMAC2 - INX H ;PT TO NEXT CHAR - PUSH H ;SAVE PTR TO NEXT CHAR IN LINE - SUI '0' ;CONVERT TO BINARY (0-9) - MOV B,A ;RESULT IN B - MVI C,0 - LHLD MTABL ;PT TO BASE OF MACROS - DAD B ;PT TO MACRO - CALL COPYM ;COPY MACRO INTO LINE - DCX D ;BACK UP OVER - POP H ;GET PTR TO NEXT CHAR IN COMMAND LINE -EXMAC2: - MOV A,M ;GET CHAR - STAX D ;PUT CHAR - INX H ;PT TO NEXT - INX D - CALL MTEST ;TEST FOR END OF BUFFER - CPI CR ;DONE? - JZ EXMAC3 - CPI EOLCH ;LOGICAL EOL? - JNZ EXMAC2 - JMP EXMAC1 ;PROCESS NEXT COMMAND -EXMAC3: - LHLD CTEMP ;COPY COMMAND LINE BACK - XCHG - LHLD INBUF ;INTO INBUF - XCHG - CALL COPYCR ;COPY TO - LHLD INBUF ;PT TO INBUF - RET ;EXPANSION COMPLETE -; -;Copy Macro Into Command Line Buffer -; -COPYM: - MOV A,M ;GET CHAR - STAX D ;PUT CHAR - INX H ;PT TO NEXT - INX D - CALL MTEST ;CHECK FOR LIMIT - CPI CR ;END OF MACRO? - JNZ COPYM - RET -; -;Test for Buffer Full -; -MTEST: - PUSH H ;SAVE HL - PUSH PSW ;SAVE A - LHLD CTEMPX ;CHECK FOR END OF BUFFER - MOV A,H ;GET PAGE - CMP D ;CHECK PAGE - JZ MACERR - POP PSW ;GET A - POP H ;GET HL - RET -; -;Macro Command Expansion Error -; -MACERR: - CALL ILPRT - DB CR,LF,'Error -- Macro Expanded Command Line too Long',0 - JMP PRMPTR ;NEW COMMAND -; -;Save INBUF into PINBUF for later processing by '@' command -; -SINBUF: - LHLD PINBUF ;PT TO PINBUF (PREVIOUS INBUF) - XCHG - LHLD INBUF ;PT TO INBUF -; -;Copy (HL) to (DE) until Encountered -; -COPYCR: - MOV A,M ;GET CHAR - STAX D ;PUT CHAR - INX H ;PT TO NEXT - INX D - CPI CR ;DONE? - JNZ COPYCR - RET - -; -;Command Not Found Error -; -WHAT: - POP H ; RESTORE HL - CALL ILPRT - DB DIM,'Invalid Command at or after ',BRIGHT,0 - MOV A,B ;GET COMMAND LETTER - CALL TYPE ;PRINT IT - JMP PRMPTR -; -;Memory full error -; -MEMFUL: - CALL ILPRT - DB '+++ Out of memory +++' - DB CR,LF,0 - JMP PRMPTR -; -;COMMAND: E -;Edit Current Block -; -EROW EQU 6 ;FIRST ROW OF EDITOR DISPLAY -ECOL EQU 4 ;FIRST COL OF EDITOR DISPLAY -ECOLC EQU ECOL+16*3+2 ;FIRST COL OF EDITOR CHAR DISPLAY -ECURS EQU '>' ;EDITOR CURSOR -; -EDIT: - CALL SINBUF ;SAVE COMMAND LINE AS PREVIOUS - MVI A,0FFH - STA EDRUN ;EDITOR IS RUNNING -; -; SET UP ARROW KEYS -; - LHLD ENVPTR ;PT TO ENVIRONMENT DESCRIPTOR - LXI D,80H+10H ;PT TO ARROW KEY INFO - DAD D - LXI D,EDCURT ;PT TO CURSOR TABLE - MVI B,4 ;4 ARROW KEYS -EDITA: - MOV A,M ;GET CHAR - STAX D ;STORE CHAR - INX H ;PT TO NEXT - INX D ;PT TO NEXT ENTRY - INX D - INX D - DJNZ EDITA ;COUNT DOWN -; -; REENTER EDIT WITH PTRS RESET -; REFRESH EDIT SCREEN -; -EDIT0: - CALL CLS ;NEW SCREEN - CALL AT - DB 2,32 ;ROW 2, COL 32 - CALL ILPRT ;BANNER - DB 'DU3 Block Editor',0 - MVI H,EROW+9 ;POSITION FOR COMMAND DISPLAY - MVI L,1 - CALL GOTOXY ;POSITION CURSOR - CALL ILPRT ;PRINT COMMAND SUMMARY - DB ' -- Movement --' - DB ' -------------- Operation ---------------',CR,LF - DB ' ^E ' - DB DIM,'Enter: ',BRIGHT,'A',DIM,' ASCII Chars',BRIGHT - DB ' +',DIM,' Next Sector',BRIGHT,CR,LF - DB ' ^ ' - DB DIM,' ',BRIGHT,'H',DIM,' Hex Numbers',BRIGHT - DB ' -',DIM,' Last Sector',BRIGHT,CR,LF - DB ' ^S <-+-> ^D ' - DB ' ' - DB ' ^C',DIM,' Exit DU3 ',BRIGHT - DB CR,LF - DB ' v ' - DB 'C',DIM,' DU3 Command Line ',BRIGHT - DB ' ^R',DIM,' Rescreen ',BRIGHT,CR,LF - DB ' ^X ' - DB 'X',DIM,' Exit Editor to DU3',BRIGHT - DB ' ^W',DIM,' Write Block',BRIGHT - DB 0 - CALL AT - DB 2,65 - CALL ILPRT - DB DIM,'Position:',BRIGHT,0 -; JMP EDITCMD -; -; REFRESH SCREEN DISPLAY DATA ONLY -; -EDITR: - XRA A ;A=0 - STA EINDEX ;SET INDEX TO 0 (FIRST ELEMENT) - STA EDERR ;SET NO PREVIOUS ERROR - CALL AT ;POSITION CURSOR - DB EROW-2,ECOL - CALL INQSUB ;PRINT POSITION DATA - CALL EDPLOT ;PLOT BUFFER DATA -; -; INPUT EDITOR COMMAND -; -EDITCMD: - CALL EDERCL ;CLEAR EDITOR INVALID COMMAND MESSAGE -EDITCMD1: - CALL AT ;POSITION FOR COMMAND LINE - DB 22,10 - CALL ILPRT - DB DIM,'Edit Command? ',BRIGHT,BS,0 - CALL CONIN ;GET CHAR - CALL UPCASE ;CAPITALIZE - MOV B,A ;COMMAND IN B - LXI D,EDCURT ;PROCESS CURSOR COMMANDS FIRST - CALL CMD ;PROCESS COMMAND - LXI D,ECMDTBL ;EDITOR COMMAND TABLE - CALL CMD ;PROCESS COMMAND - MVI A,0FFH ;SET ERROR FLAG - STA EDERR - CALL AT ;CLEAR ERROR MESSAGE - DB 23,15 - CALL ILPRT - DB 'Invalid Command',0 - JMP EDITCMD1 -; -;Clear Editor Invalid Command Message -; -EDERCL: - LDA EDERR ;PREVIOUS ERROR? - ORA A ;0=NO - RZ - XRA A ;CLEAR FLAG - STA EDERR - CALL AT ;CLEAR ERROR MESSAGE - DB 23,15 - CALL ILPRT - DB ' ',0 - RET -; -;PLOT BUFFER DATA -; -EDPLOT: - MVI H,EROW ;SET ROW - MVI L,ECOL-1 ;SET COLUMN - CALL GOTOXY ;POSITION CURSOR - XCHG ;POSITION IN DE - LXI H,TBUFF ;PT TO DATA - MVI B,8 ;8 LINES -EDIT00: - MVI C,16 ;16 ELEMENTS - CALL SPACE ;PRINT LEADING SPACE -EDIT01: - MOV A,M ;GET BYTE - CALL HEX ;PRINT AS HEX - CALL SPACE ;PRINT 1 SPACE - INX H ;PT TO NEXT - DCR C ;COUNT DOWN - JNZ EDIT01 - XCHG ;POSITION AGAIN - INR H ;NEXT ROW - CALL GOTOXY - XCHG - DCR B ;COUNT DOWN - JNZ EDIT00 - MVI H,EROW ;RESET ROW - MVI L,ECOLC ;RESET COL - CALL GOTOXY ;POSITION CURSOR - XCHG ;POSITION IN DE - LXI H,TBUFF ;PT TO DATA - MVI B,8 ;8 LINES -EDIT02: - CALL ASTER ;PRINT BAR - MVI C,16 ;16 ELEMENTS -EDIT03: - MOV A,M ;GET BYTE - ANI 7FH ;MASK MSB - CPI 7FH ;7FH IS DOT - JZ EDIT7F - CPI ' ' ;SPACE OR MORE? - JNC EDIT04 -EDIT7F: - MVI A,'.' ;PRINT DOT -EDIT04: - CALL TYPE ;PRINT BYTE - INX H ;PT TO NEXT - DCR C ;COUNT DOWN - JNZ EDIT03 - CALL ASTER ;PRINT ENDING BAR - XCHG ;POSITION AGAIN - INR H ;NEXT ROW - CALL GOTOXY - XCHG - DCR B ;COUNT DOWN - JNZ EDIT02 - CALL EDCUR ;POSITION CURSOR - RET -; -;EDITOR COMMAND TABLE -; -ECMDTBL: - DB CR ;NOP - DW EDITCMD - DB 'C'-'@' ;^C = EXIT DU3 - DW EDCC - DB 'R'-'@' ;^R = REFRESH - DW EDIT0 - DB 'E'-'@' ;^E=UP - DW EDUP - DB 'X'-'@' ;^X=DOWN - DW EDDOWN - DB 'D'-'@' ;^D=RIGHT - DW EDRIGHT - DB 'S'-'@' ;^S=LEFT - DW EDLEFT - DB 'W'-'@' ;WRITE BLOCK - DW EDITWR - DB ' ' ;NOP - DW EDITCMD - DB '+' ;ADVANCE - DW EDITPLUS - DB '-' ;BACKUP - DW EDITMINUS - DB 'A' ;CHANGE ALPHA - DW EDITALP - DB 'C' ;COMMAND LINE - DW EDITCL - DB 'H' ;CHANGE HEX - DW EDITHEX - DB 'X' ;EXIT - DW EDITX - DB 0 ;END OF TABLE -; -; ARROW KEY DEFINITONS FROM TCAP -; -EDCURT: - DB 0 ;0 INDICATES NO ARROW KEYS - DW EDUP - DB 0 - DW EDDOWN - DB 0 - DW EDRIGHT - DB 0 - DW EDLEFT - DB 0 ;END OF TABLE -; -;EDITOR BUFFERS -; -EINDEX: - DS 1 ;INDEX ENTRY -EDERR: - DS 1 ;ERROR FLAG -EDRUN: - DS 1 ;FLAG SAYING THAT EDITOR IS RUNNING -; -;Write Block to Disk -; -EDITWR: - CALL EDERCL ;CLEAR ERROR LINE - CALL WRITE ;WRITE BLOCK - CALL AT - DB 23,15 ;MESSAGE - CALL ILPRT - DB 'Block Written',0 - MVI A,0FFH ;SET ERROR - STA EDERR - JMP EDITCMD1 -; -;Enter ASCII Chars -; -EDITALP: - CALL EDERCL ;CLEAR ERROR LINE - CALL AT - DB 22,35 - CALL ILPRT - DB DIM,'Enter Text ( for Hex)',BRIGHT - DB CR,LF,' --> ',0 - CALL RDBUF1 ;INPUT TEXT WITHOUT PROMPT - CALL EDPRCL ;CLEAR PROMPT LINE - LDA EINDEX ;PT TO POSITION - LXI D,TBUFF ;COMPUTE OFFSET - ADD E - MOV E,A - MOV A,D - ACI 0 - MOV D,A ;DE PTS TO BYTE, HL PTS TO TEXT -EDITA1: - MOV A,M ;GET CHAR - CPI CR ;EOL? - JZ EDITA2 ;REFRESH SCREEN - CALL GETVAL ;GET ASCII OR VALUE - STAX D ;UPDATE BYTE - INX H ;PT TO NEXT INPUT CHAR - INR E ;PT TO NEXT BUFFER BYTE - JNZ EDITA1 -EDITA2: - CALL EDPLOT ;REPLOT - JMP EDITCMD1 ;DONE-REFRESH SCREEN -; -;Enter Numbers -; -EDITHEX: - CALL EDERCL ;CLEAR ERROR LINE - CALL AT - DB 22,35 - CALL ILPRT - DB DIM,'Enter Hex Numbers (#nn for Dec)' - DB BRIGHT - DB CR,LF,' --> ',0 - CALL RDBUF1 ;INPUT TEXT WITHOUT PROMPT - CALL EDPRCL ;CLEAR PROMPT LINE - LDA EINDEX ;PT TO POSITION - LXI D,TBUFF ;COMPUTE OFFSET - ADD E - MOV E,A - MOV A,D - ACI 0 - MOV D,A ;DE PTS TO BYTE, HL PTS TO TEXT -EDITH1: - MOV A,M ;GET HEX DIGIT - CPI CR ;EOL? - JZ EDITA2 ;REFRESH SCREEN - CPI ' ' ;SKIP SPACES - JNZ EDITH2 - INX H ;SKIP SPACE - JMP EDITH1 -EDITH2: - PUSH D ;SAVE PTR - CALL HEXIN ;GET VALUE AND POSITION HL - MOV A,E ;... IN A - POP D ;GET PTR - STAX D ;PUT BYTE - INR E ;ADVANCE TO NEXT BYTE - JNZ EDITH1 - JMP EDITA2 ;DONE-REFRESH -; -;CLEAR PROMPT LINE -; -EDPRCL: - CALL AT ;PROMPT LINE - DB 22,35 - MVI B,40 ;40 POSITIONS - CALL EDPCL - CALL AT ;USER INPUT - DB 23,1 - MVI B,79 ;79 POSITIONS -EDPCL: - CALL SPACE ;CLEAR PROMPT LINE WITH SPACES - DCR B - JNZ EDPCL - RET -; -;Enter Command Line from Editor -; -EDITCL: - CALL EDERCL ;CLEAR ERROR LINE - CALL CRLF ;NEW LINE - JMP PRMPTE ;GET COMMAND LINE FROM USER -; -;Advance to Next Block -; -EDITPLUS: - CALL NXTSEC ;ADVANCE SECTORS -EDITP1: - PUSH H - LHLD CURSEC - XCHG - CALL SETSEC ;SET SECTOR - LHLD CURTRK - XCHG - CALL SETTRK ;SET TRACK - POP H - CALL READ ;READ IN BLOCK - CALL CLCSUB ;CALCULATE GROUP DATA - JMP EDITR ;REFRESH DATA -; -;Backup to Last Block -; -EDITMINUS: - CALL LSTSEC ;BACKUP BLOCK - JMP EDITP1 -; -;Exit EDIT Mode -; -EDITX: - XRA A - STA EDRUN ;EDITOR IS NOT RUNNING NOW - CALL EDERCL ;CLEAR ERROR LINE - JMP PRMPTR -; -;Exit DU3 -; -EDCC: - CALL EDERCL ;CLEAR ERROR LINE - JMP EXIT -; -;EDIT MOVE: UP -; -EDUP: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;BACKUP INDEX BY 16 - SUI 16 -; -;Common EDIT MOVE Routine - on input, A=new index -; -EDMOVE: - ANI 7FH ;MOD 128 - STA EINDEX - CALL EDCUR ;SET CURSOR - JMP EDITCMD -; -;EDIT MOVE: DOWN -; -EDDOWN: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;INCREMENT INDEX BY 16 - ADI 16 - JMP EDMOVE ;COMMON ROUTINE -; -;EDIT MOVE: RIGHT -; -EDRIGHT: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;INCREMENT INDEX BY 1 - INR A - JMP EDMOVE ;COMMON ROUTINE -; -;EDIT MOVE: LEFT -; -EDLEFT: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;DECREMENT INDEX BY 1 - DCR A - JMP EDMOVE ;COMMON ROUTINE -; -;EDIT SUBROUTINE: EDCUR -; Position Editor Cursor at EINDEX -;EDIT SUBROUTINE: EDCCUR -; Clear Editor Cursor at EINDEX -; -EDCUR: - PUSH H ;SAVE HL - MVI C,ECURS ;CURSOR CHAR - CALL EDSETCUR - CALL AT ;UPDATE DATA - DB 2,75 - LDA EINDEX ;PT TO BYTE AT CURSOR - LXI H,TBUFF - ADD L - MOV L,A - MOV A,H - ACI 0 - MOV H,A ;HL PTS TO BYTE AT CURSOR - MOV A,M ;GET BYTE - CALL HEX ;PRINT AS HEX - CALL SPACE - MOV A,M ;GET BYTE - POP H ;RESTORE HL - ANI 7FH ;MASK - CPI 7FH ;7FH IS DOT - JZ EDC7F - CPI ' ' ;OUTPUT CHAR OR DOT - JNC TYPE -EDC7F: - MVI A,'.' ;DOT - JMP TYPE -EDCCUR: - MVI C,' ' ;CLEAR CURSOR -EDSETCUR: - CALL EDROW ;COMPUTE ROW - ANI 0FH ;COMPUTE COL MOD 16 - MOV B,A ;RESULT IN B - ADD A ;*2 - ADD B ;*3 - ADI ECOL ;ADD IN COL - DCR A ;SUBTRACT 1 - MOV L,A ;COL POSITION SET - CALL GOTOXY ;POSITION CURSOR - MOV A,C ;OUTPUT CHAR - JMP TYPE -; -;Compute Row from EINDEX -; -EDROW: - LDA EINDEX ;GET INDEX - MOV B,A ;SAVE IN B - RRC ;DIVIDE BY 16 - RRC - RRC - RRC - ANI 0FH ;MASK FOR LSB ONLY - ADI EROW ;COMPUTE ROW - MOV H,A ;ROW SET - MOV A,B ;GET INDEX - RET -; -;COMMAND: @ -;Repeat Previous Command Line -; -PCMD: - MOV A,M ;GET NEXT CHAR - CPI CR ;SHOULD BE - JZ PCMD1 - CALL ILPRT - DB CR,LF,'Warning: Remainder of Command Line after "@" Deleted',0 -PCMD1: - CALL ILPRT - DB CR,LF,DIM,'Command --',BRIGHT,CR,LF,0 - LHLD INBUF ;COPY INTO INBUF - XCHG - LHLD PINBUF ;GET PREVIOUS COMMAND -PCMD2: - MOV A,M ;GET CHAR - STAX D ;PUT CHAR - INX H ;PT TO NEXT - INX D - CPI CR ;END OF LINE? - PUSH PSW ;SAVE FLAG - CALL TYPE ;PRINT CHAR - POP PSW ;GET FLAG - JNZ PCMD2 - MVI A,LF ; - CALL TYPE - LHLD INBUF ;RESTART COMMAND PROCESSING - JMP PRMPTI ;INCLUDE LOOP CAPABILITY -; -;COMMAND: : -;Define or Print Macro -;:n Defines Macro n, 0<=n<=9; ::n Prints Macro n, 0<=n<=9 -; -MAC: - MOV A,M ;GET NEXT CHAR - CALL UPCASE ;CAPITALIZE - CPI 'P' ;PRINT MACRO? - JNZ MACROD ;IF NOT, DEFINE MACRO - INX H ;PT TO MACRO NUMBER - MOV A,M ;GET IT - CALL UPCASE ;CAPITALIZE - CPI '@' ;PRINT PREVIOUS COMMAND? - JZ PCPR - PUSH PSW ;SAVE A - call cls - cz crlf - CALL ILPRT - DB DIM,'Macro Definitions --',BRIGHT,0 - POP PSW ;GET A - CPI 'A' ;PRINT ALL MACROS? - JZ AMACPR - CALL MNUM ;CHECK FOR VALID NUMBER AND RETURN # IN D - INX H ;PT TO CHAR AFTER MACRO NUMBER - CALL MACPR ;PRINT MACRO WHOSE NUMBER IS IN D - JMP PROMPT -; -;Print Previous Command -; -PCPR: - INX H ;PT TO CHAR AFTER '@' - LXI D,PROMPT ;SET UP RET ADR - PUSH D ;RETURN ADR ON STACK - PUSH H ;SAVE PTR - CALL ILPRT - DB DIM,'Previous Command Line Definition --',BRIGHT - DB CR,LF,'@: ',0 - LHLD PINBUF ;PT TO PREVIOUS COMMAND - JMP MPRINT ;USE MACRO PRINT FACILITY -; -;Print All Macros -; -AMACPR: - INX H ;PT TO CHAR AFTER 'A' - MVI D,0 ;SET FOR FIRST MACRO -AMPRL: - CALL MACPR ;PRINT MACRO WHOSE NUMBER IS IN D - INR D ;INCREMENT MACRO NUMBER - MOV A,D ;GET VALUE - CPI 10 ;DONE? - JNZ AMPRL - JMP PROMPT ;CONTINUE PROCESSING -; -;Print Macro Whose Number (0-9) is in D -; -MACPR: - PUSH H ;SAVE PTR - CALL ILPRT ;PRINT HEADER - DB CR,LF,DIM,0 - MOV A,D ;GET NUMBER - ADI '0' ;CONVERT TO ASCII - CALL TYPE ;PRINT - CALL ILPRT - DB ': ',BRIGHT,0 - LHLD MTABL ;PT TO TABLE OF MACROS - MVI E,0 ;PAGE OFFSET OF ZERO; MACRO NUMBER ALREADY IN D - DAD D ;PT TO MACRO -MPRINT: - MOV A,M ;GET CHAR - INX H ;PT TO NEXT - CPI CR ;END OF MACRO? - PUSH PSW ;SAVE FLAG - CALL TYPE ;PRINT CHAR - POP PSW ;GET FLAG - JNZ MPRINT - MVI A,LF ; - CALL TYPE - POP H ;GET PTR TO NEXT CHAR - RET -; -;Check char in A for valid Macro Number (0-9), print error message if -; not, return number in D if so -; -MNUM: - SUI '0' ;CONVERT TO 0-9 - JC MNERR ;ERROR IF LESS - CPI 10 ;RANGE? - JNC MNERR - MOV D,A ;RESULT IN D - RET -MNERR: - CALL ILPRT - DB CR,LF,'Invalid Macro Number Specified in Command',0 - JMP PRMPTR ;NEW COMMAND -; -;Define Macro -; -MACROD: - CALL MNUM ;CHECK NUMBER AND RETURN IN D - INX H ;PT TO CHAR AFTER MACRO NUMBER - PUSH H ;SAVE PTR - LHLD MTABL ;PT TO MACRO TABLE - MVI E,0 ;SET EVEN PAGE - DAD D ;PT TO MACRO ENTRY IN HL - XCHG ;... IN DE - POP H ;PT TO MACRO TEXT - CALL COPYCR ;COPY TO - JMP PRMPTR ;NEW COMMAND -; -;COMMAND: ! -;Delay for user input -; -UWAIT: - CALL WAIT ; USE WAIT ROUTINE - JMP PROMPT -; -;COMMAND: # -;Print disk statistics -; -STATS: - PUSH H ;SAVE POINTER TO NEXT COMMAND - call cls - cz crlf - CALL ILPRT - DB DIM - DB ' -- Queue Information --',BRIGHT,CR,LF - DB CR,LF - DB 0 - CALL QSTATS ;PRINT STATUS INFO - CALL ILPRT - DB CR,LF - DB DIM - DB ' -- Disk Information --',BRIGHT,CR,LF - DB CR,LF - DB DIM,'Disk Drive: ',BRIGHT,0 - LDA DRIVE - ADI 'A' ;CONVERT TO ASCII - CALL TYPE ;PRINT DRIVE LETTER - CALL ILPRT - DB CR,LF,DIM,'Tracks: ',BRIGHT,0 - LHLD MAXTRK ;PRINT NUMBER OF TRACKS - INX H - CALL DEC - CALL ILPRT - DB CR,LF,DIM,'Sectors/Track: ',BRIGHT,0 - LHLD SPT ;PRINT NUMBER OF SECTORS/TRACK - CALL DEC - CALL ILPRT - DB CR,LF,DIM,'Group Size: ',BRIGHT,0 - LDA BLM ;PRINT SIZE OF A GROUP - INR A - MOV L,A - MVI H,0 - CALL DEC - CALL ILPRT - DB DIM,' Blocks/Group',BRIGHT - DB CR,LF,DIM,'Total Groups: ',BRIGHT,0 - LHLD DSM ;PRINT TOTAL NUMBER OF GROUPS ON A DISK - CALL DEC - CALL ILPRT - DB CR,LF,DIM,'Directory Entries: ',BRIGHT,0 - LHLD DRM ;PRINT NUMBER OF DIRECTORY ENTRIES - INX H - CALL DEC - CALL ILPRT - DB CR,LF,DIM,'System Tracks: ',BRIGHT,0 - LHLD SYSTRK ;PRINT NUMBER OF SYSTEM TRACKS - CALL DEC - CALL SWAIT - POP H ;RESTORE POINTER TO NEXT COMMAND - JMP PROMPT -; -;COMMAND: N -;The following command resets the disk -;system thru CP/M, and may be usable for -;changing the disk density or format. -;This can only be done if your BIOS resets -;the auto-density select parameters at -;every track-zero access. -; -NEWDSK: - PUSH H ;SAVE POINTER TO NEXT LETTER - MVI C,RESETDK ;BDOS RESET DISK FUNCTION - CALL BDOS - LDA DRIVE ;RESELECT CURRENT DRIVE - MOV C,A - POP H - CALL SELECT - JMP PROMPT -; -;COMMAND: Q -;Queue Control -; -QUEUER: - MOV A,M ;GET 2ND ARGUMENT - CALL UPCASE ;CAPITALIZE - CPI EOLCH ;END OF LINE? - JZ QSTAT ;STATUS REPORT - CPI CR ;END OF LINE? - JZ QSTAT - INX H ;PT TO AFTER KEY CHAR - PUSH H ;SAVE PTR - CPI 'Z' ;ZERO QUEUE? - JZ QZERO - CPI 'S' ;SAVE QUEUE? - JZ QFSAVE - POP H ;GET PTR - CALL ILPRT - DB 'Invalid Queue Command',CR,LF,0 - JMP PRMPTR ;ABORT LINE ON ERROR -; -; Zero the Queue -; -QZERO: - LHLD DIRECT ;ZERO QUEUE - SHLD QNXT ;SET NEXT - SHLD QLST ;SET LAST - LXI H,0 ;ZERO COUNT - SHLD QCNT - POP H ;GET PTR AND FALL THRU TO QSTAT -; -; Print Status of Queue -; -QSTAT: - PUSH H ;SAVE PTR TO NEXT CHAR - call cls - cz crlf - CALL ILPRT - DB DIM - DB '** Queue Status Summary **' - DB BRIGHT - DB CR,LF,0 - CALL QSTATS ;PRINT STATUS - POP H ;RESTORE PTR - JMP PROMPT -QSTATS: - LHLD QCNT ;GET SIZE OF QUEUE - CALL PRQCNT ;PRINT DATA - CALL PRQSPAC ;PRINT SPACE AVAILABLE INFO - CALL ILPRT - DB CR,LF - DB DIM,'Group Save Buffer Address: ',BRIGHT,0 - PUSH H - LHLD GBUFF ;BC=ADDRESS - MOV B,H - MOV C,L - POP H - CALL HEXB1 ;PRINT AS HEX - CALL ILPRT - DB ' Hex',CR,LF - DB 0 - CALL ILPRT - DB DIM,'Address of Head of Queue: ',BRIGHT,0 - LHLD QNXT ;PRINT ADDRESS OF HEAD OF QUEUE - MOV B,H ;... ADDRESS IN BC - MOV C,L - CALL HEXB1 ;PRINT IN HEX - CALL ILPRT - DB ' Hex',CR,LF - DB DIM,'Address of Tail of Queue: ',BRIGHT,0 - LHLD QLST ;PRINT ADDRESS OF TAIL OF QUEUE - MOV B,H - MOV C,L - CALL HEXB1 - CALL ILPRT - DB ' Hex',CR,LF,0 - RET -; -; Print Amount of Space Left in Queue -; -PRQSPAC: - LXI B,-1 ;SET COUNT - LHLD QLST ;GET PTR TO QUEUE TAIL -QSTAT1: - INX B ;INCREMENT COUNT - LXI D,80H ;PT TO NEXT QUEUE ELEMENT - DAD D - XCHG ;WRAP AROUND - CALL QWRAP - LHLD QNXT ;GET PTR TO FIRST ELEMENT - XCHG - MOV A,H ;COMPARE - CMP D - JNZ QSTAT1 - MOV A,L - CMP E - JNZ QSTAT1 - MOV H,B ;HL=BLOCK COUNT - MOV L,C - CALL DEC ;PRINT AS DECIMAL - CALL ILPRT - DB DIM,' Blocks Left in Queue',BRIGHT,CR,LF,0 - RET -; -; Save Queue as a File -; -QFSAVE: - MOV A,M ;GET FIRST CHAR OF FILE NAME - CPI EOLCH ;EOL? - JZ WHAT - CPI CR ;EOL? - JZ WHAT - LXI D,FCB ;START TO FILL FCB - XRA A ;A=0 - STAX D ;SELECT DEFAULT DRIVE - INX D ;PT TO FILE NAME - MVI B,8 ;SAVE FILE NAME - CALL MVNAME - MVI B,3 ;SAVE FILE TYPE - CALL MVNAME - PUSH H ;SAVE PTR TO NEXT CHAR - LHLD QCNT ;ANY ELEMENTS IN QUEUE? - MOV A,H - ORA L - JZ QEMPTY - PUSH H ;SAVE QUEUE COUNT - CALL NORITE ;CAN'T WRITE NOW - LXI D,FCB ;PT TO FCB - CALL FCBINIT ;INIT FCB - MVI C,DELF ;DELETE FILE - PUSH D ;SAVE DE - CALL BDOS - POP D - CALL FCBINIT ;INIT FCB AGAIN - MVI C,MAKEF ;CREATE FILE - CALL BDOS - POP B ;GET QUEUE COUNT IN BC - LHLD QNXT ;PT TO NEXT BLOCK IN QUEUE -QFS1: - PUSH B ;SAVE COUNT - LXI D,TBUFF ;COPY INTO TBUFF - MVI B,128 ;128 BYTES - CALL MOVE - XCHG ;PT TO NEXT QUEUE BLOCK IN DE - CALL QWRAP ;WRAP AROUND - PUSH D ;SAVE PTRS - LXI D,FCB ;PT TO FCB - MVI C,WRITEF ;WRITE BLOCK TO FILE - CALL BDOS - POP H ;GET PTR TO NEXT BLOCK - POP B ;GET COUNT - DCX B ;COUNT DOWN - MOV A,B ;DONE? - ORA C - JNZ QFS1 - LXI D,FCB ;CLOSE FILE - MVI C,CLOSEF - CALL BDOS - CALL ILPRT - DB 'Queue Saved in File',CR,LF,0 - POP H ;PT TO NEXT CHAR - JMP PROMPT -FCBINIT: - PUSH D ;SAVE PTR - LXI H,12 ;SKIP TO EX FIELD - DAD D - MVI B,24 ;ZERO 36 BYTES - XRA A ;A=0 -FCBIN1: - MOV M,A ;STORE ZEROES - INX H - DJNZ FCBIN1 - POP D ;RESTORE PTR - RET -; -;COMMAND: * -;Repeat buffer contents -; -REPEAT: - CALL DECIN ;NN SPECIFIED? - MOV A,D - ORA E - JZ NNN ;NO -- SET FOR INFINITE LOOP OR SIMPLE REPEAT - LHLD TOGO ;LOAD LOOP FLAG - INX H ;TEST FOR FIRST TIME - MOV A,H - ORA L ;WAS IT 0FFFFH?; IF SO, WE HAVE NEW VALUE - JNZ NNN ;NO: COUNTING - XCHG ;GET COUNT - SHLD TOGO ;SET COUNT -; -NNN: - LHLD TOGO ;GET CURRENT COUNT - XCHG ;DE=CURRENT COUNT, HL=COUNT LIMIT - LHLD INBUF ;PT TO FIRST CHAR FOR REPEAT - INX D ;TEST FOR 0FFFFH - MOV A,D ;IF 0FFFFH, INX D MADE DE=0 - ORA E - JZ PROMPT ;CONTINOUS LOOP IF 0FFFFH - DCX D ;COUNT DOWN - DCX D ;MAKE UP FOR PREV INX D - XCHG - SHLD TOGO ;SET NEW COUNT (1 LESS THAN BEFORE) - MOV A,H ;ALL DONE? - ORA L - XCHG ;GET BACK INBUF PTR IN HL - JNZ PROMPT ;KEEP GOING IF NOT YET ZERO - JMP PRMPTR ;ALL DONE -; -;COMMAND: U -;Set CP/M 2.x user number -; -USER: - CALL DECIN ;GET REQUESTED USER NO. - LDA MUSER ;GET MAX USER - MOV B,A ;... IN B - MOV A,E - CMP B ;VALID? - JNC USRERR - MOV A,D ;HIGH-ORDER BYTE MUST BE ZERO FOR VALID NUMBER - ORA A - JNZ USRERR - MOV A,E ;SAVE USER NUMBER - STA UNUM - MVI C,SUSER ;SET USER NUMBER - PUSH H ;SAVE CHAR POINTER - CALL BDOS ;SET USER NO. - POP H - JMP PROMPT -USRERR: - CALL ILPRT - DB 'User Number Out of Range',CR,LF,0 - JMP PRMPTR -; -;COMMAND: P -;Toggle print flag -; -PRNTFF: - LDA PFLAG ;TOGGLE PRINT FLAG - XRI 1 - STA PFLAG - JMP PROMPT -; -;COMMAND: Z -;Sleep routine, in seconds -; -SLEEP: - CALL DECIN ;GET COUNT IF ANY - MOV A,E ;ANY? - ORA A - JNZ SLEPLP - MVI E,1 ; 1 SEC DEFAULT -; -SLEPLP: - LDA CLOCK ; GET CLOCK SPEED - MOV D,A -; -SLEEP1: - LXI B,41700 ; APPROX 1 SEC @ 1MHz -; -SLEEP2: - DCX B ;COUNT DOWN FOR 1 MHz [5 CYCLES] - MOV A,B ;[5 CYCLES] <-- TOTAL TIME: 24 CYCLES - ORA C ;[4 CYCLES] <-- (24 MU-SECS AT 1MHz) - JNZ SLEEP2 ;[10 CYCLES] - PUSH D - CALL CTLCS ;ABORT? - POP D - JZ PRMPTR - DCR D ;COUNT DOWN FOR CLOCK SPEED - JNZ SLEEP1 - DCR E ;COUNT DOWN NUMBER OF REQUESTED SECONDS - JNZ SLEPLP - JMP PROMPT -; -;Check for control-C or S -; -CTLCS: - CALL CONST ;CHAR AVAILABLE? - ORA A - JNZ GETC - ORI 1 ;NO CHAR, RETURN NZ - RET -; -GETC: CALL CONIN ;INPUT CHAR - ANI 1FH ;ALLOW ASCII - CPI 'S'-40H ;WAIT FOR NEXT CHAR IF ^S OR S OR s - CZ CONIN - CPI 'C'-40H ;CHECK FOR ^C OR C OR c - RET ;0 SET IF CTL-C -; -;Initialize Memory Buffers -; -INITP: - XRA A ;A=0 - STA HEXAD ;CLEAR ADDRESS - STA HEXAD+1 - STA PFLAG ;SET NO PRINT - STA SAVEFL ;SET NO SAVE DONE - STA WRFLG ;MAY NOT WRITE - STA DIRPOS ;SET NO DIRECTORY POSITION - STA FINDFL ;SET NO POSITION - INR A ;A=1 - STA FTSW ;SET SEARCH WITHOUT INCREMENT - STA NOTPOS ;NOT POSITIONED - LXI H,0 ;HL=0 - SHLD QCNT ;SET NO ELEMENTS IN QUEUE - SHLD MFPTR ;SET NO MULTI FILE PTR - SHLD CURTRK ;SET TRACK 0 - INX H ;HL=1 - SHLD CURSEC ;SET LOGICAL SECTOR 1 - SHLD PHYSEC ;SET PHYSICAL SECTOR 1 - LHLD PINBUF ;SET PREVIOUS COMMAND TO NIL - MVI M,CR ;CLEAR PREVIOUS COMMAND - LHLD DIRECT ;SET FIRST AND LAST QUEUE ELEMENT PTRS - SHLD QNXT - SHLD QLST - - ; Initialize Default Macros -- new block by - - LHLD MTABL ;CLEAR MACRO TABLE - MVI B,10 ;10 ENTRIES - lxi d,imac0 ;point to beginning of default macro table - -initp1: push h ;save pointer to start of each macro - -initp2: ldax d ;get next initial macro character - mov m,a ;store it in macro table - inx d - inx h - cpi cr ;end of macro? - jnz initp2 - - pop h ;retrieve pointer to start of this macro - dcr b ;see if we've done all macros - rz ;if so, return - inr h ;point to next macro - jmp initp1 - -;INITP1: -; MVI M,CR ;STORE -; INR H ;PT TO NEXT PAGE -; DJNZ INITP1 -; RET - -; End of Block Changed by - -; -;Set up flags, etc, at initialization -;Find our way at initialization -; -GETSTP: - PUSH H - LHLD INBUF ;PT TO INPUT BUFFER - MVI M,CR ;INITIALIZE INPUT BUFFER - POP H - MVI C,SUSER ;GET USER NUMBER - MVI E,0FFH ;GET USER - CALL BDOS - STA UNUM ;SET USER NUMBER - MVI C,GETDSK - CALL BDOS ;GET CURRENT DISK - MOV C,A ;WE HAVE TO SELECT - JMP SELECT ;TO GET THE DPH -; -;COMMAND: L -;Log in the selected disk -; -LOGIN: - CALL DOLOG - JMP PROMPT -; -DOLOG: - MOV A,M ;DISK REQUESTED? - LXI D,0 - CPI CR ;NO REQUEST OF PHYSICAL EOL - JZ LGNODK - CPI EOLCH ;NO REQUEST IF LOGICAL EOL - JZ LGNODK - CALL UPCASE ;CAPITALIZE - INX H ;POINT TO NEXT CHAR - SUI 'A' ;CONVERT TO 0-15 - MOV C,A ;DISK NUMBER IN C - LDA MDISK ;GET MAX DISK - MOV B,A ;... IN B - MOV A,C - CMP B - JC SELECT - CALL ILPRT - DB 'Disk Letter Out of Range',CR,LF,0 - JMP PRMPTR -; -;Select Disk Whose Number is in C (A=0, B=1, etc) -; -SELECT: - PUSH H ;SAVE PTR TO NEXT COMMAND LETTER - MOV A,C - STA DRIVE ;REMEMBER LATER WHERE WE ARE -; -VSELDK: CALL $-$ ;ADDR FILLED IN BY 'INIT' - MOV A,H - ORA L - JZ WHAT ;SELECT ERROR - MOV E,M ;GET THE SECTOR TABLE PNTR - INX H - MOV D,M - INX H - XCHG - SHLD SECTBL ;SET THE SECTOR TABLE PTR - LXI H,8 ;OFFSET TO DPBPTR - DAD D - MOV A,M ;PICK UP DPB POINTER - INX H ; TO USE - MOV H,M ; AS PARAMETER - MOV L,A ; TO LOGIT - CALL LOGIT - LHLD SYSTRK ;RESET TRACK AND SECTOR - XCHG ; TO DIRECTORY - CALL SETTRK ; ON EVERY - LXI D,1 ; LOGIN - CALL SETSEC ; CHANGE - LHLD PHYSEC ;THIS LOGIC WILL TELL - MOV A,H ; IF FIRST SEC - ORA L ; IS PHYSICAL 0 - STA FIRST0 - CALL CLCSUB ;CALCULATE WHAT GROUP/GRPDISP WE ARE IN - POP H ;GET PTR TO NEXT LETTER -; -LGNODK: - CALL NORITE ;SET NO DISK I/O DONE (NO POSITION) - RET -; -;Read in the disk directory -; -REDDIR: - PUSH H ;SAVE PTR TO NEXT LETTER - CALL NORITE ;POSITIONING LOST - LHLD SYSTRK ;SAVE CURRENT TRACK - SHLD CURTRK - LXI H,1 ;SET SECTOR 1 - SHLD CURSEC - LHLD DRM ;GET DIR SIZE FROM DPB - INX H ;MAKE 1-RELATIVE - CALL ROTRHL - CALL ROTRHL ;DIVIDE BY 4 (4 NAMES/SECTOR) - MOV B,H ;BC=NUMBER OF BLOCKS TO READ - MOV C,L - XCHG - LHLD DIRECT ;DMA ADDR - XCHG ;... IN DE -; -;Read Disk Directory Loop -; -RDIRLP: - PUSH B ;SAVE REGS - PUSH D - MOV B,D ;BC=DMA ADDRESS - MOV C,E - LDA BDOS+2 ;CHECK MEM AVAIL - DCR A ;ARE WE RNNING INTO BDOS? - CMP D - JC MEMFUL ;MEMORY FULL ERROR IF SO - CALL SETDMA ;SET DMA ADDRESS TO THAT IN BC - LHLD CURTRK ;SET TRACK - XCHG - CALL SETTRK - LHLD CURSEC ;SET SECTOR - XCHG - CALL SETSEC - CALL READ ;READ DIRECTORY BLOCK - CALL NXTSEC ;INCREMENT TO NEXT SECTOR - POP D - POP B - LXI H,80H ;ADVANCE TO NEXT DMA ADDRESS - DAD D - XCHG ;DE=NEXT DMA ADDRESS - DCX B ;COUNT DOWN DIRECTORY BLOCKS - MOV A,B - ORA C - JNZ RDIRLP - LXI B,TBUFF ;RESET DMA ADDRESS TO TBUFF - CALL SETDMA - POP H ;GET PTR TO NEXT CHAR - RET -; -;COMMAND: M -;Map the directory -; -MAP: - PUSH H ;SAVE PTR - LHLD QCNT ;GET COUNT - MOV A,H - ORA L - POP H - JZ MAP1 ;PROCEED IF QUEUE EMPTY - CALL ILPRT ;PRINT ABORT MESSAGE - DB CR,LF,'MAP not permitted -- Block Queue would be overlaid',0 - JMP PRMPTR -MAP1: - CALL PAGSET ;SET PAGING COUNTER - XRA A - STA ONLY1 ;SET FLAG FOR ALL GROUPS (NOT ONLY 1) - CALL REDDIR ;READ IN DIRECTORY - MVI C,0 ;INIT START GRP # - LDA AL0 ;READ DIR GRP BITS - CALL COLECT ;COLLECT COUNT OF DIR GRPS.. - LDA AL1 ;..IN REGISTER C - CALL COLECT - MVI B,0 ;BC NOW HAS A DEFAULT START GRP # - CALL HEXIN ;GET SPECIFIED GROUP IF ANY - PUSH H ;SAVE INBUF PTR - MOV A,E ;GET START - ORA D ;NOTHING? - JZ MAPDF ;..YES, DFLT - MVI A,0FFH ;SET FLAG FOR ONLY 1 GROUP - STA ONLY1 - MOV B,D ;GET VALUE IN BC - MOV C,E -; -MAPDF: - CALL HEXB ;PRINT FIRST GROUP NUMBER - MVI A,'-' ;PRINT SEPARATOR - CALL TYPE - MVI A,' ' ;SET NO DUPLICATES - STA DUPFLG - CALL GETGRP ;GET GRP(C) TO HL -; -MAPCNT: - INX B ;NEXT GRP # - PUSH H - LHLD DSM ;GET HIGHEST GRP # - INX H ;PLUS 1 FOR COMPARISON - MOV A,L ;WHEN BC REACHES DSM+1.. - CMP C ;..THEN WE HAVE EXCEEDED.. - JNZ MAPC1 ;..THE DISK CAPACITY.. - MOV A,H - CMP B -; -MAPC1: - POP H - JZ MAPEND ;..AND WE ARE DONE - PUSH H - CALL GETGRP ;GET ANOTHER - POP D ;SEE IF SAME - CALL CTLCS ;ABORT? - JZ MAPND2 - MOV A,D - CMP H - JNZ MAPDIF - MOV A,E - CMP L - JZ MAPCNT ;SAME, CONTINUE -; -;Different file encountered -; -MAPDIF: - DCX B - CALL HEXB ;PRINT ENDING GROUP NUMBER - INX B - XCHG - CALL MAPNAM ;PRINT FILE NAME - LDA ONLY1 ;ONLY 1 NAME TO BE PRINTED? - ORA A ;0=NO - JNZ MAPND1 - JMP MAPDF -; -;End of map -; -MAPEND: - DCX B ;GET LAST - CALL HEXB ;PRINT LAST GROUP NUMBER - CALL MAPNAM ;PRINT FILE NAME - CALL WAIT ;DELAY FOR USER -MAPND1: - POP H - CALL CRLF ;NEW LINE -; -;End of map - reposition to previous group -; -MAPND2: - PUSH H - LHLD GROUP ;POINT TO GROUP IN DE - XCHG - JMP POSGP2 -; -;Print file name pointed to by HL -; -MAPNAM: - CALL SPACE ;LEADING SPACE - MOV A,H - ORA L ;NONE? - JZ NONAME - MOV A,M ;SEE IF ALLOC - CPI 0E5H ;FREE? - MVI A,' ' ;MARK ALLOCATED - JNZ MPNSP1 - MVI A,'(' ;MARK NOT ALLOCATED (ERASED FILE) -; -MPNSP1: - CALL TYPE ;PRINT ALLOCATION INDICATOR (SPACE OR '(') - PUSH H ;SAVE POINTER - MOV A,M - CALL HEX ;SHOW USER NUMBER - CALL SPACE - INX H ;SKIP USER BYTE - PUSH B - MVI B,8 ;PRINT FILE NAME - CALL MAPN2 - MVI A,'.' ;PRINT DECIMAL SEPARATOR - CALL TYPE - MVI B,3 ;PRINT FILE TYPE - CALL MAPN2 - LDA DUPFLG ;DUPLICATE? - CALL TYPE ;SPACE OR STAR - POP B - MOV A,M ;GET EXT - CALL HEX ;PRINT EXTENT NUMBER - POP H - MOV A,M - CPI 0E5H ;DELETED ENTRY? - MVI A,' ' ;PRINT ENDING SPACE - JNZ MPNSP2 - MVI A,')' ;PRINT ALLOCATION FLAG -; -MPNSP2: - CALL TYPE ;")" IF ERASED FILE OR SPACE IF NOT - JMP FLIP -; -NONAME: - CALL ILPRT - DB DIM,' ++ Free ++ ',BRIGHT,0 -; -FLIP: - LDA TWOUP ;FLIP FLAG FOR TWO ENTRIES PER LINE - XRI 1 - STA TWOUP - JZ PAGER ;NEW LINE WITH PAGING IF REQUIRED -; -DELIM: - MVI A,':' ;PRINT DELIMITER BETWEEN ADJACENT ENTRIES ON LINE - CALL TYPE - JMP SPACE -; -;Print name pted to by HL, length in B -; -MAPN2: - MOV A,M - ANI 7FH ;STRIP POSSIBLE 2.x ATTRIBUTE BIT - INX H - CPI ' ' ;PRINTABLE? - JC MAPN2H ;..NO, IN HEX - CPI 7EH ;7E IS LEADIN ON SOME CRTS - JC MAPN2A -; -MAPN2H: - CALL BHEX ;PRINT A AS HEX CHARS - JMP MAPN2Z -; -MAPN2A: - CALL TYPE ;PRINT AS CHAR -; -MAPN2Z: - DJNZ MAPN2 - RET -; -;Find which file group (BC) belongs to -; -GETGRP: - LHLD DRM ;MAX DIR ENTRY # - INX H ;MAKE 1-RELATIVE - SHLD FILECT - LXI H,0 - SHLD MFPTR ;SET MULTI-FILE (MORE THAN ONE USER) PTR - LHLD DIRECT ;PT TO DIRECTORY -; -GETGLP: - PUSH H ;SAVE POINTER TO NAME - MOV A,M ;PICK UP DN BYTE - CPI 0E5H ;ERASED? - JZ GETGNF - LXI D,14 ;NOW GET RECORD COUNT - DAD D ; S2 PORTION .. - MOV A,M ; IS 0 IN CP/M 1.4 - ANI 0FH - MOV E,A - INX H - MOV A,M - ORA E - JZ GETGNF - MVI E,16 ;FIRST SET FOR 8-BIT GRPS - LDA DSM+1 - ORA A - JZ SMALGP - MVI E,8 ;NOPE, BIG GROUPS -; -SMALGP: - MOV D,A ;SAVE GRP SIZE INDICATOR -; -GETGL2: - INX H ;POINTING INTO DM FIELD - CALL GRPCMP ;COMPARE BC GP # AGAINST 1 DM FLD - JNZ NOTGOT ;JUMP IF NOT FOUND -; -;Found the file -; - PUSH H ;SAVE GROUP PTR - LHLD MFPTR - MOV A,H ;ANY ENTRIES? - ORA L - POP H ;GET PTR - XTHL ;SAVE ENTRY START AND SAVE PTR - JZ MPFRST ;IF ZERO, THEN FIRST ENTRY - MVI A,'*' ;SET MULTI FLAG - STA DUPFLG -MPFRST: - SHLD MFPTR ;SAVE POINTER - XTHL ;RESTORE ENTRY START AND GET PTR -NOTGOT: - DCR E ;COUNT DOWN - JNZ GETGL2 ;GO TEST SOME MORE -; -GETGNF: - POP H ;NOT THIS ONE - LXI D,32 ;SO GO TO NEXT - DAD D - XCHG - LHLD FILECT ;THERE IS LIMIT TO EVERYTHING - DCX H - SHLD FILECT - MOV A,H - ORA L - XCHG ;RE-ALIGN - JNZ GETGLP -; -;Set the allocation address, if any -; - LHLD MFPTR ;GET ADDRESS - RET -; -;COMMAND: < -;Save the current sector -; Special Form of -;Restore the current sector -; Special Form >S gets next block from queue -; Special Form >G gets next group from queue -; -RESTOR: - MOV A,M ;CHECK FOR SPECIAL FORM - CALL UPCASE ;CAPITALIZE - CPI 'B' ;BLOCK SAVE? - JZ QRESTOR - CPI 'G' ;GROUP SAVE? - JZ RESTRG - LDA SAVEFL ;SAVE DONE PREVIOUSLY? - ORA A - JZ NOSAVE ;NONE TO SAVE - PUSH H - LHLD SAVBUF ;COPY FROM SAVBUF - LXI D,TBUFF ;INTO TBUFF - MVI B,128 ;128 BYTES - CALL MOVE - POP H ;GET PTR TO NEXT CHAR - JMP PROMPT -; -; Restore Sector from Queue -; -QRESTOR: - INX H ;PT TO NEXT CHAR - PUSH H ;SAVE PTR ON STACK - LHLD QCNT ;GET ELEMENT COUNT - MOV A,H ;EMPTY? - ORA L - JZ QEMPTY ;ABORT IF EMPTY - DCX H ;COUNT DOWN - SHLD QCNT - CALL PRQCNT ;PRINT COUNT - LHLD QNXT ;PT TO NEXT ELEMENT IN QUEUE - LXI D,TBUFF ;COPY INTO TBUFF - MVI B,128 ;128 BYTES - CALL MOVE - XCHG ;DE=PTR TO NEXT ELEMENT IN QUEUE - CALL QWRAP ;CHECK FOR WRAP AROUND - XCHG ;HL PTS TO NEXT ELEMENT IN QUEUE - SHLD QNXT ;SAVE PTR - POP H ;RESTORE PTR - JMP PROMPT -QEMPTY: - CALL ILPRT - DB 'Error -- Queue Empty',CR,LF,0 - POP H ;RESTORE NEXT CHAR PTR - JMP PRMPTR -; -;Write Group Loaded in GBUFF to Disk -; -RESTRG: - CALL COMG ;GET GROUP NUMBER FROM COMMAND LINE AND POS - PUSH H - CALL ILPRT - DB 'Writing to Group ',0 - LHLD GROUP ;GET GROUP NUMBER - MOV B,H ;VALUE IN BC - MOV C,L - CALL HEXB ;PRINT IN HEX - CALL ILPRT - DB CR,LF,0 - LHLD QNXT ;NEXT PTR USED FOR WRITE - SHLD QPTR - POP H - MVI A,0FFH ;WRITE FUNCTION - STA CPYFCT ;COPY FUNCTION FOR GROUP COPY ROUTINE - JMP COPYG ;GROUP COPY ROUTINE -; -NOSAVE: - CALL ILPRT - DB '++ No "<" Save Command Issued ++' - DB CR,LF,0 - JMP PRMPTR -; -;Move (HL) to (DE) length in B -; -MOVE: - MOV A,M - STAX D - INX H - INX D - DJNZ MOVE - RET -; -NORITE: - XRA A ;GET 0 - STA WRFLG ;CAN'T WRITE NOW - RET -; -;No match in search, try next char -; -SRNOMT: - POP H - CALL CTLCS ;ABORT? - JNZ SEARCH ;..YES - LHLD INBUF - MVI M,CR - JMP CLCGRP ;SHOW WHERE STOPPED -; -;COMMAND: = -;Search for character string -; -SEARCH: - PUSH H ;SAVE STRING POINTER -; -SRCHL: - CALL RDBYTE ;GET A BYTE - MOV B,A ;SAVE IT - MOV A,M ;CHECK NEXT MATCH CHAR. - CPI '<' ;WILL IT BE HEX? - MOV A,B ;RESTORE DISK CHAR - JZ SRCHL1 - ANI 7FH ;NEXT CHAR IS ASCII...STRIP BIT 7 -; -SRCHL1: - PUSH PSW - CALL GETVAL ;GET SEARCH VALUE - MOV B,A - POP PSW - CMP B ;MATCH? - JNZ SRNOMT ;NO MATCH - INX H - MOV A,M ;DONE? - CPI CR ;END OF LINE? - JZ SREQU - CPI EOLCH ;LOGICAL EOL? - JNZ SRCHL -; -;Got match -; -SREQU: - CALL ILPRT - DB '= at ',0 - LDA BUFAD - ANI 7FH - CALL HEX - CALL CRLF - JMP CLCGRP -; -;Get value from input buffer -; -GETVAL: - MOV A,M ;GET NEXT CHAR - CPI '<' ;HEX ESCAPE? - RNZ ;NO, RETURN -;"<<" means one "<" - INX H - MOV A,M - CPI '<' - RZ -;Got hex - PUSH D - CALL HEXIN ;GET VALUE - CPI '>' ;PROPER DELIM? - MOV A,E ;GET VALUE - POP D - JNZ WHAT ;ERROR - RET -; -;Read a byte at a time from disk -; -RDBYTE: - PUSH H - LDA FTSW ;FIRST READ? - ORA A - JNZ READ1 - LHLD BUFAD - MOV A,L - ORA A ;IN BUFFER? - JM NORD ;YES, SKIP READ -; -;Have to read -; - CALL NXTSEC ;ADVANCE TO NEXT BLOCK -; -READ1: - XRA A - STA FTSW ;NOT FIRST READ - LHLD CURSEC - XCHG - CALL SETSEC - LHLD CURTRK - XCHG - CALL SETTRK - CALL READ - CALL CLCSUB - LXI H,TBUFF -; -NORD: - MOV A,M - INX H - SHLD BUFAD - POP H - RET -; -;COMMAND: V -;View the file in ASCII starting at -;current sector, stepping thru the disk -; -VIEW: - LDA WRFLG - ORA A - JZ BADDMP - CALL DECIN ;GET DISPL IF ANY - PUSH H - MOV A,E - ORA A - JNZ VIEWLP - INR E ;DFLT=1 -; -VIEWLP: - LXI H,TBUFF ;TO DATA -; -VEWCHR: - CALL CTLCS ;ABORT? - JZ VEWEND - MOV A,M ;GET NEXT CHAR - CPI 1AH ;EOF? - JZ VEWEOF - ANI 7FH ;MASK - CPI 7EH ;ESC CHAR FOR H1500 - JNC VIEWHX ;SHOW RUBOUT AND TILDE AS HEX - CPI ' ' - JNC VIEWPR - CPI CR ;CR PASS - JZ VIEWPR - CPI LF ;LF PASS - JZ VIEWPR - CPI TAB ;TAB PASS - JZ VIEWPR -; -VIEWHX: - MOV A,M ;NOT ASCII...PRINT AS - CALL BHEX - JMP VIEWNP -; -VIEWPR: - CALL TYPE -; -VIEWNP: - INR L - JNZ VEWCHR - DCR E - JZ VEWEND - PUSH D ;SAVE COUNT - CALL NXTSEC - LHLD CURSEC - XCHG - CALL SETSEC - LHLD CURTRK - XCHG - CALL SETTRK - CALL READ - POP D ;RESTORE COUNT - JMP VIEWLP -; -VEWEOF: - CALL ILPRT - DB CR,LF,DIM,' ++ EOF ++',BRIGHT,CR,LF,0 -; -VEWEND: - POP H - CALL CRLF - JMP CLCGRP -; -;COMMAND: A or D -;Dump in hex or ASCII -; -DUMP: - LDA WRFLG - ORA A - JNZ DUMPOK -; -BADDMP: - CALL ILPRT - DB '++ Can''t dump, no sector read ++',CR,LF,0 -; -EXPL: - CALL ILPRT - DB 'Use G command following F,',CR,LF - DB 'or R or S following T',CR,LF,0 - JMP PRMPTR -; -DUMPOK: - MOV A,M ;GET NEXT CHAR - CPI EOLCH ;LOGICAL EOL? - JZ DUMPDF ;DFLT - CPI CR ;PHYSICAL EOL? - JNZ DMPNDF -; -;Use default -; -DUMPDF: - LXI B,TBUFF - LXI D,0FFH - JMP DUMP1 -; -DMPNDF: - CALL DISP - MOV B,D - MOV C,E - CPI CR - JZ DUMP1 - CPI EOLCH - JZ DUMP1 - INX H ;SKIP SEPCH - CALL DISP -; -;BC = start, DE = end -; -DUMP1: - PUSH H ;SAVE COMMAND POINTER - MOV H,B - MOV L,C -; -DUMPLP: - CALL DUMPHL ;PERFORM DUMP OF DIR ENTRY AT HL - POP H ;RESTORE HL - JMP PROMPT -; -; PERFORM DUMP AT HL -; -DUMPHL: - CALL STNDOUT ;DIM - MOV A,L - ANI 7FH - CALL HEX ;PRINT HEX VALUE - CALL STNDEND ;BRIGHT - CALL SPACE - CALL SPACE - LDA DUMTYP - CPI 'A' - JZ DUMPAS - PUSH H ;SAVE START -; -; DUMP 16 BYTES STARTING AT HL (CHECK FOR DE TERMINATION) -; -DHEX: - MOV A,M - CALL HEX ;PRINT HEX VALUE PTED TO BY HL - MOV A,L - ANI 3 - CPI 3 ;EXTRA SPACE EVERY 4 - CZ SPACE - MOV A,L - ANI 7 - CPI 7 ;TWO EXTRA SPACES EVERY 8 - CZ SPACE - MOV A,E ;CHECK FOR END OF BYTES TO DUMP - CMP L - JZ DPOP - INX H - MOV A,L ;CHECK FOR END OF 16 BYTES - ANI 0FH - JNZ DHEX -; -DPOP: - CALL CTLCS ;ABORT? - JZ PRMPTR - LDA DUMTYP ;CHECK FOR ASCII ALSO - CPI 'H' - JZ DNOAS ;HEX ONLY - POP H ;GET START ADDR -; -; DUMP ASCII CHARS - HL PTS TO FIRST BYTE -; -DUMPAS: - CALL ASTER ;PRINT FIRST ASTERISK TO SEPARATE TEXT -; -DCHR: - MOV A,M ;GET CHAR - ANI 7FH - CPI ' ' - JC DPER - CPI 7FH ;TRAP DEL - JC DOK -; -DPER: - MVI A,'.' ;PRINT PRINTING CHAR -; -DOK: - CALL TYPE ;PRINT CHAR - MOV A,E ;CHECK FOR END OF DUMP - CMP L - JZ DEND - INX H - MOV A,L ;CHECK FOR END OF 16 BYTES - ANI 0FH - JNZ DCHR -; -; END OF ASCII DUMP -; -DEND: - CALL ASTER ;PRINT ENDING ASTERISK - CALL CRLF ;NEW LINE - PUSH D - CALL CTLCS ;ABORT? - POP D - JZ PRMPTR - MOV A,E ;DONE WITH DUMP? - CMP L - JNZ DUMPHL - RET -; -; NO ASCII DUMP -; -DNOAS: - POP B ;CLEAR STACK (START ADDRESS OF DUMP) - CALL CRLF ;NEW LINE - MOV A,E ;DONE WITH DUMP? - CMP L - JNZ DUMPHL - RET -; -;COMMAND: G -;Position -; -POS: - PUSH PSW - MOV A,M - CPI EOLCH ;LOGICAL EOL? - JZ POSINQ - CPI CR ;PHYSICAL EOL? - JNZ POSOK -; -POSINQ: - POP PSW - JMP INQ -; -POSOK: - POP PSW - CPI 'T' ;TRACK? - JZ POSTKD - CPI 'S' ;SECTOR? - JZ POSSCD - CPI 'G' ;GROUP? - JZ POSGPH - JMP WHAT ;ERROR OTHERWISE -; -;Position to Track -; -POSTKD: - CALL DECIN ;GET NUMBER IN DECIMAL -; -POSTRK: - PUSH H - LHLD MAXTRK ;CHECK FOR BEYOND END OF DISK - CALL SUBDE - POP H - JC OUTLIM - CALL SETTRK ;SET TRACK - CALL NORITE ;TRACK DOESN'T READ - MVI A,1 - STA NOTPOS ;SHOW NOT POSITIONED - JMP CLCGRP -; -;Position to Sector -; -POSSCD: - CALL DECIN ;GET NUMBER IN DECIMAL - MOV A,D - ORA E - JZ WHAT ;DON'T ALLOW SECTOR 0 -; -POSSEC: - PUSH H - LHLD SPT ;CHECK FOR WITHIN RANGE - CALL SUBDE - POP H - JC WHAT - CALL SETSEC ;SET SECTOR - CALL READ ;READ - XRA A - STA NOTPOS ;POSITIONED OK -; -;Calculate Group Number/Group Displacement and Print -; -CLCGRP: - CALL CLCSUB - JMP INQ -; -;Calculate group from track and sector -; On exit, GROUP = Group Number and GRPDIS = Displacement within Group -; -CLCSUB: - PUSH H - LHLD SYSTRK - XCHG - LHLD CURTRK - CALL SUBDE ;COMPUTE RELATIVE TRACK NUMBER (SKIP SYSTEM TRACKS) - XCHG - LHLD SPT ;MULTIPLY BY NUMBER OF SECTORS/TRACK - CALL MULT - XCHG ;DE=TOTAL NUMBER OF SECTORS IN TRACKS - LHLD CURSEC ;GET SECTOR OFFSET FROM BEGINNING OF TRACK - DCX H - DAD D ;HL=TOTAL NUMBER OF SECTORS WITH OFFSET - LDA BLM - MOV B,A - MOV A,L - ANA B - STA GRPDIS ;DISPLACEMENT WITHIN GROUP - LDA BSH - MOV B,A -; -CLCLOP: - CALL ROTRHL - DJNZ CLCLOP - SHLD GROUP ;GROUP NUMBER - POP H - RET -; -;Position in the directory after a find -;(Does not work in CP/M-2.x) -; -POSDIR: - PUSH H ;SAVE INBUF - LHLD BSH - XRA A - STA FINDFL ;CANCEL POS REQ - LDA DIRPOS ;GET POSITION - RAR - RAR - PUSH PSW - ANA H - STA GRPDIS - POP PSW -; -POSDLP: - RAR - DCR L - JNZ POSDLP - ANI 1 ;GET GROUP - MOV L,A ;SETUP FOR POSGP2 - MVI H,0 - SHLD GROUP - XCHG -; -POSGP2: - CALL GTKSEC ;CONVERT GROUP TO SECTOR/TRACK - CALL SETTRK ;SET TRACK - XCHG - CALL SETSEC ;SET SECTOR - CALL READ ;READ BLOCK - XRA A - STA NOTPOS ;NOW POSITIONED - POP H - JMP INQ -; -;Position to Group -; -POSGPH: - CALL HEXIN ;GET PARAMETER -; -;Position to Group Numbered in DE and Print Position -; -POSGRP: - CALL DEGROUP ;GOTO GROUP - JC OUTLIM - JMP INQ ;PRINT POSITION -; -;Position to Group Numbered in DE -; Return with Carry Set if Out of Limits -; -DEGROUP: - PUSH H - LHLD DSM ;CHECK FOR WITHIN BOUNDS - CALL SUBDE - POP H - RC - PUSH H ;SAVE HL - XCHG - SHLD GROUP ;SET GROUP NUMBER - XCHG - XRA A - STA GRPDIS ;SET ZERO DISPLACEMENT - CALL GTKSEC ;CONVERT GROUP TO SECTOR/TRACK - CALL SETTRK ;SET TRACK - XCHG - CALL SETSEC ;SET SECTOR - CALL READ ;READ BLOCK - XRA A ;SET NC AND FLAG - STA NOTPOS ;NOW POSITIONED - POP H - RET -; -;Convert Group Number in DE to Sector and Track; also, GRPDIS = Offset in Grp -; On exit, DE = Track Number, HL = Sector Number -; -GTKSEC: - MOV H,D ;HL=GROUP NUMBER - MOV L,E - LDA BSH ;GET NUMBER OF SECTORS IN GROUP -; -GLOOP: - DAD H - DCR A - JNZ GLOOP - LDA GRPDIS ;ADD IN DISPLACEMENT WITHIN GROUP - ADD L ;CAN'T CARRY - MOV L,A -; -;Divide by number of sectors, quotient=track, remainder=sector -; - XCHG ;DE=TOTAL NUMBER OF SECTORS - LHLD SPT ;GET NUMBER OF SECTORS/TRACK - CALL NEG ;HL = -SECTORS/TRACK - XCHG - LXI B,0 ;SET TRACK COUNTER TO ZERO -; -DIVLP: - INX B ;INCREMENT TRACK COUNT - DAD D ;SUBTRACT SECTORS/TRACK FROM SECTORS TOTAL - JC DIVLP - DCX B ;ADJUST TRACK COUNT - XCHG - LHLD SPT ;ADD SECTORS/TRACK BACK IN TO ADJUST - DAD D ;HL=NUMBER OF SECTORS ON LAST TRACK OF GROUP - PUSH H - LHLD SYSTRK ;ADD IN NUMBER OF SYSTEM TRACKS - DAD B - XCHG ;DE=TRACK NUMBER - POP H - INX H ;HL=SECTOR NUMBER - RET -; -;COMMAND: F -;Find Directory Entry for specified file -; -POSFIL: - CALL NORITE - MVI A,1 - STA FINDFL ;SO WE POSITION LATER - LXI D,FCB - XRA A ;LOGGED IN DISK - STAX D - INX D - MVI B,8 - CALL MVNAME - MVI B,3 - CALL MVNAME - MVI A,'?' - STAX D ;LOOK IN ALL EXTENTS - MVI A,'D' ;SET TYPE OF DUMP TO FULL - STA DUMTYP - PUSH H ;SAVE PTR TO NEXT CHAR - LXI D,FCB - MVI C,SRCHF - CALL BDOS - INR A - JNZ FLOK - STA DIRPOS ;GRP 0 IF NOT FOUND - CALL ILPRT - DB '++ File Not Found ++',CR,LF,0 - POP H ;RESTORE PTR TO NEXT CHAR - JMP PROMPT -; -FLOK: - DCR A - STA DIRPOS ;SAVE POS. IN DIR - ANI 3 - MOV L,A - MVI H,0 - DAD H ;X32 BYTES/ENTRY - DAD H - DAD H - DAD H - DAD H - LXI D,TBUFF - DAD D ;HL POINTS TO ENTRY - LXI D,32 - XCHG - DAD D - XCHG - CALL DUMPHL ;PRINT DIR ENTRY - LXI D,FCB ;LOOK FOR NEXT EXTENT - MVI C,SRCHN - CALL BDOS - INR A - JNZ FLOK - POP H ;RESTORE PTR TO NEXT CHAR - JMP PROMPT -; -MVNAME: - MOV A,M ;GET NEXT CHAR OF FILE NAME/TYPE - CPI '.' ;END OF FILE NAME? - JZ MVIPAD ;PAD OUT IF SO - CPI CR ;END OF ENTRY? - JZ PAD ;PAD OUT IF SO - CPI EOLCH ;END OF ENTRY? - JZ PAD ;PAD OUT IF SO - CALL UPCASE ;CAPITALIZE - STAX D ;STORE - INX H ;PT TO NEXT - INX D - DJNZ MVNAME - MOV A,M ;CHECK FOR ERROR - CPI CR ;OK IF EOL - RZ - CPI EOLCH ;OK IF LOGICAL EOL - RZ - INX H - CPI '.' ;OK IF DECIMAL - RZ - JMP WHAT -; -MVIPAD: - INX H -; -PAD: - MVI A,' ' ;PRINT PADDING SPACES - STAX D - INX D - DJNZ PAD - RET -; -;COMMAND: + -;Advance to Next Logical Sector -; -PLUS: - LXI D,1 ;DFLT TO 1 SECT - MOV A,M ;GET NEXT CHAR - CPI CR ;CR? - JZ PLUSGO ;..YES, DFLT TO 1 - CPI EOLCH - JZ PLUSGO - CALL DECIN ;GET # - MOV A,D - ORA E - JNZ PLUSGO - LXI D,1 ;SET 1 IF VALUE OF ZERO -; -PLUSGO: - CALL NXTSEC ;ADVANCE TO NEXT LOGICAL SECTOR - DCX D ;MORE TO GO? - MOV A,D - ORA E - JNZ PLUSGO ;..YES -; -;Ok, incremented to sector. Setup and read -; -PLUSMI: - PUSH H - LHLD CURSEC - XCHG - CALL SETSEC ;SET SECTOR - LHLD CURTRK - XCHG - CALL SETTRK ;SET TRACK - POP H - CALL READ ;READ IT - JMP CLCGRP ;CALCULATE GROUP AND DISPLAY -; -;COMMAND: - -;Back up to previous sector -; -MINUS: - LXI D,1 ;SET DFLT - MOV A,M ;GET CHAR - CPI CR ;CR? - JZ MINGO ;..YES, DFLT=1 - CPI EOLCH - JZ MINGO - CALL DECIN ;..NO, GET ## - MOV A,D - ORA E - JNZ MINGO - LXI D,1 ;ASSUME 1 -; -MINGO: - CALL LSTSEC ;BACK UP ONE SECTOR - DCX D ;COUNT DOWN ON NUMBER OF TIMES TO BACKUP - MOV A,D - ORA E - JNZ MINGO - JMP PLUSMI ;READ BLOCK -; -;Go to last sector -; Wrap around to last sector of previous track or last sector of -; last track, as necessary -; -LSTSEC: - PUSH H - LHLD CURSEC ;BACK UP SECTOR - DCX H - MOV A,H - ORA L - JNZ LSEC1 - LHLD CURTRK ;BEYOND SECTOR ZERO, SO BACK UP TRACK - MOV A,H - ORA L - JNZ LSEC0 - LHLD MAXTRK ;WRAP TO END OF DISK - SHLD CURTRK - LHLD MAXSEC - JMP LSEC1 -; -LSEC0: - DCX H - SHLD CURTRK - LHLD SPT ;GET NUMBER OF SECTORS/TRACK -; -LSEC1: - SHLD CURSEC ;SET NEW CURRENT SECTOR - POP H - RET -; -;Go to next sector -; On exit, CURSEC = Current Sector and CURTRK = Current Track -; -NXTSEC: - PUSH H - PUSH D - LHLD CURSEC ;INCREMENT CURRENT SECTOR - INX H - XCHG - LHLD SPT ;CHECK TO SEE IF BEYOND END OF TRACK - CALL SUBDE - XCHG - JNC NEXTOK - LHLD CURTRK ;BEYOND END OF TRACK, SO INCR CURRENT TRACK - INX H - XCHG - LHLD MAXTRK ;SEE IF BEYOND END OF DISK - CALL SUBDE - JNC TRASK - LXI D,0 ;WRAP TO START OF DISK -; -TRASK: - XCHG - SHLD CURTRK ;SET NEW CURRENT TRACK - LXI H,1 ;SET SECTOR 1 -; -NEXTOK: - SHLD CURSEC ;SET NEW CURRENT SECTOR - POP D - POP H - RET -; -;Tell what group, displacement, track, sector, physical sector -; -INQ: - CALL INQSUB - JMP PROMPT -; -;Position inquiry subroutine -;Executed via: G S or T (with no operands) -; -INQSUB: - PUSH H - LHLD SYSTRK ;CHECK IF IN SYSTEM TRACKS - XCHG - LHLD CURTRK - CALL SUBDE - JC NOGRP - CALL ILPRT ;PRINT GROUP NUMBER IF NOT IN SYSTEM TRACKS - DB DIM,'Group = ',BRIGHT,0 - LHLD GROUP - MOV B,H - MOV C,L - CALL HEXB ;PRINT GROUP NUMBER IN BC - MVI A,':' - CALL TYPE - LDA GRPDIS - CALL HEX ;PRINT GROUP DISPLACEMENT IN A - MVI A,',' - CALL TYPE -; -NOGRP: - CALL ILPRT ;PRINT TRACK NUMBER - DB DIM,' Track = ',BRIGHT,0 - LHLD CURTRK - CALL DEC ;TRACK NUMBER IN DECIMAL - CALL ILPRT ;PRINT SECTOR NUMBER - DB DIM,', Sector = ',BRIGHT,0 - LHLD CURSEC - CALL DEC ;SECTOR NUMBER IN DECIMAL - CALL ILPRT ;PRINT PHYSCIAL SECTOR NUMBER - DB DIM,', Physical Sector = ',BRIGHT,0 - LHLD PHYSEC - CALL DEC ;PHYSICAL SECTOR NUMBER IN DECIMAL - CALL CRLF - POP H - RET -; -;COMMAND: C -;Change Contents of Current Block -; -CHG: - MOV A,M ;GET TYPE (HEX, ASCII) - CALL UPCASE - PUSH PSW ;SAVE "H" OR "A" - INX H - CALL HEXIN ;GET DISP IN HEX - CALL DISP1 ;VALIDATE DISP TO DE - INX H - LXI B,0 ;SHOW NO 'THRU' ADDR - CPI '-' ;TEST DELIM FR. DISP - JNZ CHGNTH ;NO THRU - PUSH D ;SAVE FROM - CALL HEXIN - CALL DISP1 ;GET THRU - INX H ;SKIP END DELIM - MOV B,D - MOV C,E ;BC = THRU - POP D ;GET FROM - JMP CHGAH -; -CHGNTH: - CPI SEPCH - JNZ WHAT -; -CHGAH: - POP PSW - CPI 'H' ;HEX? - JZ CHGHEX - CPI 'A' ;ASCII? - JNZ WHAT -; -;Change ASCII -; -CHGALP: - MOV A,M ;GET CHAR - CPI CR - JZ PROMPT - CPI EOLCH - JZ PROMPT -; -;The following print of the deleted byte is commented out; if leading -; semicolons are removed, deleted bytes will be printed -; -; LDAX D ;GET BYTE THAT IS REPLACED -; CPI ' ' -; JC CHGAHX -; CPI 7EH ;DON'T PRINT ESC CHAR FOR H1500 -; JNC CHGAHX -; JMP CHGA2 -; -;CHGAHX: -; CALL BHEX -; JMP CHGA3 -; -;CHGA2: -; CALL TYPE -; -;End of print of delete bytes -; -CHGA3: - SHLD BACK ;IN CASE "THRU" - CALL GETVAL ;GET ASCII OR VALUE - STAX D ;UPDATE BYTE - INX H ;PT TO NEXT INPUT CHAR -; -;See if 'THRU' requested -; - MOV A,C - ORA A - JZ CHANTH - CMP E ;DONE?.. - JZ PROMPT ;..YES - LHLD BACK -; -CHANTH: - INR E - JNZ CHGALP - MOV A,M - CPI CR - JZ PROMPT - CPI EOLCH - JZ PROMPT - JMP WHAT -; -;Change hex -; -CHGHCM: - INX H -; -CHGHEX: - MOV A,M ;GET HEX DIGIT - CPI CR - JZ PROMPT - CPI EOLCH - JZ PROMPT - CPI SEPCH ;DELIM? - JZ CHGHCM - PUSH D - SHLD HEXAD ;IN CASE 'THRU' - CALL HEXIN ;POSITIONS TO DELIM - MOV A,E ;GET VALUE - POP D ;..ADDR -; -;The following comments out the echo of the deleted byte; removing the -; leading semicolons restores the echo -; -; PUSH PSW ;SAVE VALUE -; LDAX D ;GET OLD -; CALL HEX ;ECHO IN HEX -; POP PSW ;GET NEW -; -;End of echo of bytes -; - STAX D ;SAVE NEW BYTE - MOV A,C ;SEE IF 'THRU' - ORA A - JZ CHHNTH ;..NO. - CMP E ;..YES, DONE? - JZ PROMPT - LHLD HEXAD ;..NO: MORE -; -CHHNTH: - INR E - JNZ CHGHEX - MOV A,M - CPI CR - JZ PROMPT - CPI EOLCH - JZ PROMPT - JMP WHAT -; -;COMMAND: R -;Read Current Block into TBUFF -;COMMAND: RG -;Read Specified Group into GBUFF -; -DOREAD: - LDA NOTPOS ;POSITIONED? - ORA A - JNZ CANTRD - CALL READ ;READ BLOCK - JMP PROMPT -; -CANTRD: - CALL ILPRT - DB '++ Can''t read - not positioned ++',CR,LF - DB 'Position by:',CR,LF - DB ' Track then Sector, or',CR,LF - DB ' Group',CR,LF,0 - JMP PROMPT -; -;COMMAND: W -;Write Current Block to Disk -;COMMAND: WG -;Write Specified Group from GBUFF -; -DORITE: - CALL WRITE ;DO WRITE - JMP PROMPT -; -;Print Byte in A as Hex Digits -; -BHEX: - PUSH PSW - MVI A,'<' - CALL TYPE - POP PSW - CALL HEX - MVI A,'>' - CALL TYPE - RET -; -;Print Number in BC as Hex Digits -; HEXB does not print MS Byte if DSM shows small disk size -; HEXB1 prints BC regardless -; -HEXB: - LDA DSM+1 - ORA A - JZ HEXX -HEXB1: - MOV A,B - CALL HEX -; -HEXX: - MOV A,C -; -;Print Byte in A as 2 Hex Digits -; -HEX: - PUSH PSW - RAR ;GET HIGH NYBBLE - RAR - RAR - RAR - CALL NIBBL ;PRINT IT - POP PSW ;GET LOW NYBBLE -; -NIBBL: - ANI 0FH ;MASK LOW NYBBLE - CPI 10 ;0-9? - JC HEXNU - ADI 7 ;CONVERT TO A-F -; -HEXNU: - ADI '0' ;CONVERT TO ASCII - JMP TYPE ;PRINT IT -; -;Decimal output routine -; Print Number in HL as decimal digits -; -DEC: - PUSH B - PUSH D - PUSH H - XRA A ;SET NO LEADING DIGIT - STA DDIG - LXI B,10000 - CALL DPRT - DAD B - LXI B,1000 - CALL DPRT - DAD B - LXI B,100 - CALL DPRT - DAD B - LXI B,10 - CALL DPRT - DAD B - MOV A,L ;ALWAYS PRINT LSD - ADI '0' ;ASCII - CALL TYPE - POP H - POP D - POP B - RET -DPRT: - PUSH B ;SAVE BC - MVI D,0FFH ;SET -1 -DPRTL: - INR D ;ADD 1 TO OUTPUT DIGIT - MOV A,L ;L-C - SUB C - MOV L,A - MOV A,H ;H-B - SBB B - MOV H,A - JNC DPRTL - POP B ;RESTORE BC - LDA DDIG ;GET LEADING DIGIT FLAG - ORA D ;CHECK FOR ZERO STILL - STA DDIG ;SET FLAG - MOV A,D ;GET DIGIT TO PRINT - RZ ;ABORT IF BOTH ZERO - ADI '0' ;ASCII - JMP TYPE -DDIG: DS 1 ;TEMP FOR DEC USE ONLY -; -;Print -; -SPACE: - MVI A,' ' - JMP TYPE -; -;Print a dim '|' -; -ASTER: - CALL STNDOUT ;DIM - MVI A,'|' - CALL TYPE - JMP STNDEND ;BRIGHT -; -;Inline print routine -; Print Chars ending in 0 pted to by Return Address; return to byte after -; -ILPRT: - XTHL ;PT TO STRING -ILPLP: - CALL CTLCS ;ABORT? - JZ PRMPTR - MOV A,M ;GET CHAR -; CPI 1 ;PAUSE? -- ^A -; JNZ ILPOK -; CALL CONIN ;WAIT FOR ANY CHAR -; CPI 3 ;ABORT? -; JZ PRMPTR -; JMP ILPNX -; -;ILPOK: - CPI DIM ;GOTO DIM? - JZ ILPDIM - CPI BRIGHT ;GOTO BRIGHT? - JZ ILPBRI - CALL TYPE ;PRINT CHAR - JMP ILPNX -ILPDIM: - CALL STNDOUT ;ENTER STANDOUT MODE - JMP ILPNX -ILPBRI: - CALL STNDEND ;EXIT STANDOUT MODE -; -ILPNX: - INX H ;PT TO NEXT - MOV A,M ;GET IT - ORA A ;DONE? - JNZ ILPLP - INX H ;PT TO BYTE AFTER ENDING 0 - XTHL ;RESTORE HL AND RET ADR - RET -; -;DISP calls DECIN, and validates a sector -;displacement, then converts it to an address -; -DISP: - CALL DECIN -DISP1: - PUSH PSW ;SAVE DELIMITER - MOV A,D - ORA A - JNZ BADISP - MOV A,E - ORA A - JM BADISP - ADI 80H ;TO POINT TO BUFFER AT BASE+80H - MOV E,A - MVI D,BASE/256 - POP PSW ;GET DELIM - RET -; -BADISP: - CALL ILPRT - DB '++ Bad Displacement (Not 0-7FH) ++' - DB CR,LF,0 - JMP PRMPTR -; -;Input Number from Command Line -- Assume it to be Hex -; Number returned in DE -; -HEXIN: - LXI D,0 ;INIT VALUE - MOV A,M - CPI '#' ;DECIMAL? - JZ HDIN ;MAKE DECIMAL -; -HINLP: - MOV A,M ;GET CHAR - CALL UPCASE ;CAPITALIZE - CPI CR ;EOL? - RZ - CPI EOLCH ;EOL? - RZ - CPI SEPCH - RZ - CPI ' ' ;SPACE? - RZ - CPI '-' ;'THRU'? - RZ - CPI '>' - RZ - INX H ;PT TO NEXT CHAR - CPI '0' ;RANGE? - JC WHAT - CPI '9'+1 ;RANGE? - JC HINNUM - CPI 'A' ;RANGE? - JC WHAT - CPI 'F'+1 ;RANGE? - JNC WHAT - SUI 7 ;ADJUST FROM A-F TO 10-15 -; -HINNUM: - SUI '0' ;CONVERT FROM ASCII TO BINARY - XCHG - DAD H ;MULT PREVIOUS VALUE BY 16 - DAD H - DAD H - DAD H - ADD L ;ADD IN NEW DIGIT - MOV L,A - XCHG - JMP HINLP -; -HDIN: - INX H ;SKIP '#' -; -;Input Number in Command Line as Decimal -; Number is returned in DE -; -DECIN: - LXI D,0 - MOV A,M ; GET 1ST CHAR - CPI '#' ; HEX? - JNZ DINLP - INX H ; PT TO DIGIT - JMP HINLP ; DO HEX PROCESSING -; -DINLP: - MOV A,M ;GET DIGIT - CALL UPCASE ;CAPITALIZE - CPI '0' ;RANGE? - RC - CPI '9'+1 ;RANGE? - RNC - SUI '0' ;CONVERT TO BINARY - INX H ;PT TO NEXT - PUSH H - MOV H,D - MOV L,E - DAD H ;X2 - DAD H ;X4 - DAD D ;X5 - DAD H ;X10 - ADD L ;ADD IN DIGIT - MOV L,A - MOV A,H - ACI 0 - MOV H,A - XCHG ;RESULT IN DE - POP H - JMP DINLP -; -;Read in a console buffer -; -RDBUF: - CALL ILPRT ;PRINT PROMPT - DB CR,LF,'DU3 ',0 - LDA DRIVE ;GET DRIVE NUMBER - ADI 'A' ;CONVERT TO ASCII - CALL TYPE - LDA UNUM ;DISPLAY USER NUMBER - MOV L,A ;VALUE IN HL - MVI H,0 - CALL DEC ;PRINT IN DECIMAL - CALL ILPRT ;PRINT PROMPT - DB '? ',0 -; -;ENTRY POINT TO READ BUFFER WITHOUT PROMPT -; -RDBUF1: - LHLD INBUF ;USE CP/M READLN - DCX H - DCX H - XCHG - MVI C,10 - PUSH D - CALL BDOS - POP D - INX D ;PT TO CHAR COUNT - LDAX D ;GET CHAR COUNT - MOV B,A ;CHAR COUNT IN B - INX D ;PT TO INPUT LINE - XCHG ;... IN HL - ADD L ;ADD CHAR COUNT TO HL - MOV L,A - MOV A,H - ACI 0 - MOV H,A - MVI A,CR ;STORE ENDING CR - MOV M,A ;SET CR - CALL TYPE ;ECHO IT - MVI A,LF ;ECHO.. - CALL TYPE ;..LF - LHLD INBUF ;SET PTR TO FIRST CHAR IN LINE - RET -; -;Set paging flag for page routine -; -PAGSET: - LDA PAGSIZ ;GET SIZE OF PAGE - STA PAGFLG ;SET FLAG - RET -; -;Page output -; -PAGER: - LDA PAGFLG ;GET FLAG - CPI 2 ;2 LINES LEFT? - JZ WAIT ;SAME AS USER DELAY - DCR A ;COUNT DOWN - STA PAGFLG - JMP CRLF -; -;Delay Routine -; -SWAIT: - CALL AT - DB 23,5 ;POSITION CURSOR - JMP WAIT0 -WAIT: - CALL CRLF ;NEW LINE -WAIT0: - PUSH H - CALL ILPRT - DB DIM,'Type Any Character to Continue or ^C to Abort - ',BRIGHT,0 - POP H - CALL CONIN ;GET RESPONSE - CPI 'C'-40H ;^C? - JZ WAIT1 - CALL CRLF ;NEW LINE - CALL PAGSET ;RESET PAGE COUNT - RET -WAIT1: - LDA IHFLG ;INITIAL HELP? - ORA A ;0=NO - JZ PRMPTR ;ABORT TO COMMAND PROMPT - JMP EXIT1 ;ABORT TO CP/M -; -;CRLF Routine -; -CRLF: - MVI A,CR - CALL TYPE - MVI A,LF - JMP TYPE -; -;Convert to Upper Case -; -UPCASE: - ANI 7FH ;MASK OUT MSB - CPI 60H ;LESS THAN SMALL A? - RC ;RETURN IF SO - ANI 5FH ;MAKE UPPER CASE - RET -; -;CON: Status Routine -; -CONST: - PUSH B - PUSH D - PUSH H -VCONST: - CALL $-$ ;ADDR FILLED IN BY 'INIT' - POP H - POP D - POP B - RET -; -;CON: Input Routine -; -CONIN: - PUSH B - PUSH D - PUSH H -VCONIN: - CALL $-$ ;ADDR FILLED IN BY 'INIT' - POP H - POP D - POP B - RET -; -;Console out with TAB expansion -; Char in A -; -TYPE: - PUSH B ;SAVE REGS - PUSH D - PUSH H - MOV C,A ;FOR OUTPUT ROUTINE - CPI TAB - JNZ TYPE2 -;Tabulate -TYPTAB: - MVI A,' ' ;PRINT SPACE - CALL TYPE - LDA TABCOL ;GET COL COUNT - ANI 7 ;DONE? - JNZ TYPTAB - JMP TYPRET -; -;Filter out control characters to -;prevent garbage during view of file -; -TYPE2: - CPI ' ' - JNC TYPEQ - CPI CR - JZ TYPEQ - CPI LF - JNZ TYPNCR -; -TYPEQ: -; -;CON: Output Routine -; -VCONOT: CALL $-$ ;ADDR FILLED IN BY 'INIT' -; -;Update column used in tab expansion -; - MOV A,C ;GET CHAR - CPI CR - JNZ TYPNCR - MVI A,0 ;RESET TAB COLUMN IF - STA TABCOL - JMP TYPLST -; -TYPNCR: - CPI ' ' ;CTL CHAR? - JC TYPLST ;..NO CHANGE IN COL - LDA TABCOL ;INCR TAB COUNT - INR A - STA TABCOL -; -TYPLST: - LDA PFLAG ;CHECK FOR PRINTER OUTPUT - ANI 1 - CNZ LIST ;FROM C REG -; -TYPRET: - POP H ;RESTORE REGS - POP D - POP B - RET -; -;LST: Output Routine -; Char in C -; -LIST: - PUSH B ;SAVED REGS - PUSH D - PUSH H -VLIST: - CALL $-$ ;ADDR FILLED IN BY 'INIT' - POP H - POP D - POP B - RET -; -;Home Disk Routine -; -HOME: - PUSH H -VHOME: - CALL $-$ ;ADDR FILLED IN BY 'INIT' - POP H - RET -; -;Set track # in DE -; -SETTRK: - PUSH H - LHLD MAXTRK ;CHECK FOR WITHIN BOUNDS - CALL SUBDE ;IF TRACK # IN DE > MAX, THEN ERROR - POP H - JC OUTLIM - XCHG ;RESET CURRENT TRACK - SHLD CURTRK - XCHG - MOV B,D ;BC=TRACK NUMBER - MOV C,E - PUSH H -; -VSETRK: - CALL $-$ ;ADDR FILLED IN BY 'INIT' - POP H - RET -; -;Set Sector Number in DE -; -SETSEC: - PUSH H - PUSH D - LHLD SYSTRK ;GET NUMBER OF SYSTEM TRACKS - XCHG - SHLD CURSEC ;SET CURRENT SECTOR - LHLD CURTRK ;GET CURRENT TRACK - CALL SUBDE ;SEE IF WE ARE IN THE SYSTEM TRACKS - POP B ;BC=SECTOR NUMBER - MOV H,B ;HL=SECTOR NUMBER - MOV L,C - JNC NOTSYS ;IF NO CARRY FOR SUBDE, WE ARE NOT IN SYSTEM TRACKS - LDA FIRST0 ;SEE IF FIRST SEC 0 - ORA A - JNZ GSTSEC ;NO, JUMP AWAY - DCX H ;YES, SO DECREMENT - JMP GSTSEC ;REQUESTED, THEN GO -; -;Not in System Tracks, so Skew Factor is effective -; -NOTSYS: - LHLD SECTBL ;GET PTR TO SECTOR TABLE - XCHG ;... IN DE - DCX B ;DECREMENT SECTOR NUMBER BY 1 -; -VSCTRN: - CALL $-$ ;ADDR FILLED IN BY 'INIT' - LDA SPT+1 ;IF SPT<256 (HI-ORD = 0) - ORA A ; THEN FORCE 8-BIT TRANSLATION - JNZ GSTSEC ; ELSE KEEP ALL 16 BITS - MOV H,A -GSTSEC: - SHLD PHYSEC - MOV B,H - MOV C,L -; -VSTSEC: - CALL $-$ ;ADDR FILLED IN BY 'INIT' - POP H ;RESTORE PTR TO NEXT CHAR - RET -; -;Out of Disk Track Limit -; -OUTLIM: - CALL ILPRT - DB '++ Not Within Tracks 0-',0 - PUSH H - LHLD MAXTRK ;PRINT MAX TRACK NUMBER - CALL DEC - POP H - CALL ILPRT - DB ' ++',CR,LF,0 - CALL NORITE ;NOT POSITIONED - JMP PRMPTR -; -;Set DMA Address -; -SETDMA: - JMP $-$ ;ADDR FILLED IN BY 'INIT' -; -;Read Next Block into DMA Address -; -READ: - MVI A,1 ;SET FLAG - STA WRFLG - PUSH H ;SAVE PTR TO NEXT CHAR -; -VREAD: - CALL $-$ ;ADDR FILLED IN BY 'INIT' - ORA A ;ERROR? - JZ READOK - CALL ILPRT - DB '++ READ Failed, Sector may be Invalid ++' - DB CR,LF,0 -; -READOK: - POP H ;GET PTR TO NEXT CHAR - RET -; -;Write Block in DMA Address to Disk -; -WRITE: - LDA WRFLG ;READ ALREADY PERFORMED? - ORA A ;ERROR IF NOT - JNZ PWRITE -; -BADW: - CALL ILPRT - DB '++ Cannot Write Unless Read Issued ++' - DB CR,LF,0 - JMP EXPL -; -;Do Write -; -PWRITE: - PUSH H ;SAVE PTR TO NEXT CHAR - MVI C,1 ;FORCE WRITE TYPE 1 IN CASE 2.x DEBLOCK USED -; -VWRITE: - CALL $-$ ;ADDR FILLED IN BY 'INIT' - ORA A ;ERROR? - JZ WRITOK - CALL ILPRT - DB '++ WRITE Failed ++',CR,LF,0 -; -WRITOK: - POP H - RET -; -;Help; HELP is entry point for HELP (?) command, HELP1 is entry point for -; Initial Help Command, and IHELP is entry point for HELP (/) from command -; line -; -IHELP: - call cls - cz crlf - call helpban - CALL ILPRT - DB DIM,'Introductory HELP on DU3 (Disk Utility)',BRIGHT,CR,LF - DB ' The DU3 program is designed to provide the user with' - DB CR,LF - DB 'the ability to manipulate information on the disk as easily' - DB CR,LF - DB 'as the DDT and SID utilities allow the user to manipulate' - DB CR,LF - DB 'information in memory.',CR,LF - DB ' The following is a summary of the commands available to' - DB CR,LF - DB 'the DU3 user. This same list is invoked internally by the' - DB CR,LF - DB '? Command of DU3. For additional information on disk' - DB CR,LF - DB 'structures and how to use DU3 in general, refer to the' - DB CR,LF - DB 'file DU3.HLP.',CR,LF,0 - MVI A,0FFH ;A=0FFH - STA IHFLG ;SET INITIAL HELP - CALL SWAIT - JMP HELP1 ;PROCESS NORMALLY -HELP: - XRA A ;A=0 - STA IHFLG ;SET NO INITIAL HELP -HELP1: - call cls - cz crlf - call helpban ;print help banner - CALL ILPRT - DB 'Operands in brackets [...] are optional' - DB CR,LF,CR,LF - DB ' @ ',DIM,'Repeat Previous Non-@ Command Line' - DB BRIGHT,CR,LF - DB ' +[nn] ',DIM,'Step In [nn (decimal)] Sectors' - DB BRIGHT,CR,LF - DB ' -[nn] ',DIM,'Step Out [nn (decimal)] Sectors' - DB BRIGHT,CR,LF - DB DIM - DB ' Note: + or - need not be followed by a "," to ' - DB 'delimit commands.' - DB BRIGHT - DB CR,LF - DB ' # ',DIM,'Print Disk Parameters for Current Drive' - DB BRIGHT - DB CR,LF - DB ' =xxx ',DIM - DB 'Search for ASCII xxx from Current Sector' - DB BRIGHT - DB CR,LF - DB DIM - DB ' Note: upper/lower case matters. Use for hex:' - DB BRIGHT - DB CR,LF - DB DIM - DB ' To find "IN 0" use: =<0> or' - DB BRIGHT - DB CR,LF - DB DIM - DB ' "(tab)H,0(CR)(LF)" use: =<9>H,0' - DB BRIGHT - DB CR,LF - DB ' *[nn] ',DIM,'Repeat [nn (decimal) times]' - DB BRIGHT,CR,LF - DB ' ! ',DIM,'Pause for User',BRIGHT,CR,LF - DB ' :ntext ',DIM,'Define ''text'' to be Macro n' - DB BRIGHT,CR,LF - DB ' n ',DIM,'Perform Macro n, 0<=n<=9',BRIGHT,CR,LF - DB ' :Pn ',DIM,'Print Macro n, 0<=n<=9',BRIGHT - DB CR,LF - DB ' :Px ',DIM - DB 'Print All Macros if x=A or Print Prev Line if x=@' - DB BRIGHT - DB 0 - CALL SWAIT - call cls - cz crlf - call helpban - CALL ILPRT - DB ' A[ff,tt] ',DIM,'ASCII Dump',BRIGHT - DB CR,LF - DB ' C ',DIM,'Change:',BRIGHT - DB CR,LF - DB ' CHaddr byte byte... (hex)' - DB CR,LF - DB ' ',DIM,'or',BRIGHT - DB ' CAaddr data... (Ascii)' - DB CR,LF - DB DIM - DB ' Allowed for imbedded hex.' - DB BRIGHT - DB CR,LF - DB ' ',DIM,'or',BRIGHT - DB ' CHfrom-thru byte e.g. ch0-7f e5' - DB CR,LF - DB ' ',DIM,'or',BRIGHT,' CAfrom-thru byte' - DB CR,LF - DB ' D[ff,tt] ',DIM,'Dump (Hex and ASCII)',BRIGHT - DB CR,LF - DB ' E ',DIM,'DU3 Editor',BRIGHT,CR,LF - DB ' ',DIM,' Note: Rest of Command Line ' - DB 'is Flushed',BRIGHT,CR,LF - DB ' Ffn.ft ',DIM,'Find File',BRIGHT - DB CR,LF - DB ' Gnn ',DIM,'CP/M Allocation Group nn (hex)' - DB BRIGHT,CR,LF - DB ' H[ff,tt] ',DIM,'Hex Dump',BRIGHT - DB CR,LF - DB ' L[d] ',DIM,'Log in Current Drive or Drive d' - DB BRIGHT,CR,LF - DB ' M[nn] ',DIM,'Map [from group nn (hex)]' - DB BRIGHT - DB 0 - CALL SWAIT - call cls - cz crlf - call helpban - CALL ILPRT - DB ' N ',DIM,'Load New Disk',BRIGHT,CR,LF - DB ' P ',DIM,'Toggle Printer Switch',BRIGHT,CR,LF - DB ' Q ',DIM,'Queue Status;',BRIGHT,CR,LF - DB ' QZ ',DIM,'Zero (Empty) Queue',BRIGHT,CR,LF - DB ' QSfn.ft ',DIM,'Save Queue as a File on Disk',BRIGHT - DB CR,LF - DB ' < ',DIM,'Save Current Block into Temp',BRIGHT - DB CR,LF - DB ' > ',DIM,'Restore Temp Block',BRIGHT,CR,LF - DB ' B ',DIM,'Restore Queue Block',BRIGHT,CR,LF - DB ' G[n] ',DIM,'Restore Queue Group',BRIGHT,CR,LF - DB ' Snn ',DIM,'Sector nn (decimal)',BRIGHT,CR,LF - DB ' Tnn ',DIM,'Track nn (decimal)',BRIGHT,CR,LF - DB ' Unn ',DIM,'Set User nn (decimal) for Find command' - DB BRIGHT,CR,LF - DB ' V[nn] ',DIM,'View [nn (decimal)] ASCII Blocks',BRIGHT - DB CR,LF - DB ' R ',DIM,'Read Current Block',BRIGHT,CR,LF - DB ' W ',DIM,'Write Current Block',BRIGHT,CR,LF - DB ' X ',DIM,'Exit Program',BRIGHT,CR,LF - DB ' Z[nn] ',DIM,'Sleep [nn (decimal) seconds]',BRIGHT - DB 0 - CALL SWAIT - call cls - cz crlf - call helpban - CALL ILPRT - DB DIM,'Command Line is of the form: ',BRIGHT,'DU3 du?',CR,LF - DB ' ',DIM,'"d" is Logged-In Disk, "u" is Current User' - DB BRIGHT,CR,LF - DB CR,LF - DB 'Ctrl-C ',DIM,'Cancel a function',BRIGHT,CR,LF - DB 'Ctrl-S ',DIM,'Suspend output',BRIGHT,CR,LF - DB '"," ',DIM,'Separate commands',BRIGHT,CR,LF - DB CR,LF - DB DIM,'Examples:',BRIGHT,' g0 ',DIM,'and',BRIGHT - DB ' +,d,z2,*' - DB CR,LF - DB DIM,'Causes:',BRIGHT,CR,LF - DB ' 1. Position to group 0',CR,LF - DB ' 2. Loops on step in, dump, sleep 2 sec',CR,LF - DB ' until control-c is typed',CR,LF,CR,LF - DB '"nn" usage varies with command as follows:',CR,LF - DB ' +, -, *, T, S, U, V, Z ',DIM,'nn in Decimal' - DB BRIGHT,CR,LF - DB ' ',DIM,'(use #nn for Hex)' - DB BRIGHT,CR,LF - DB ' G, M ',DIM,'nn in Hexadecimal' - DB BRIGHT,CR,LF - DB ' ',DIM,'(use #nn for Decimal)' - DB BRIGHT,CR,LF - DB CR,LF - DB '"ff" and "tt" are in Hexadecimal (use #ff or #tt for Decimal)' - DB 0 - CALL SWAIT - LDA IHFLG ;INITIAL HELP? - ORA A ;0=NO - JNZ EXIT1 ;RETURN TO CP/M IF SO - JMP PRMPTR ;NEW LINE INPUT IF NOT -helpban: - call ilprt - DB ' ',DIM,'-- DU3 Command Summary --',BRIGHT - DB CR,LF,CR,LF,0 - ret -; -;COMMAND: X -;Exit to CP/M -; -EXIT: - call dinit ;deinit terminal - JMP BASE ;WARM BOOT -; -;Quick Exit to CP/M -; -EXIT1: - LHLD DUTSTK ;GET CP/M STACK PTR - SPHL ;SET SP - RET - -; -;******************************** -;* * -;* Utility Subroutines * -;* * -;******************************** -; -GRPCMP: - MOV A,C - INR D - DCR D - JZ CMP8 - CMP M - INX H - RNZ - MOV A,B -; -CMP8: - CMP M - RET -; -;2's complement HL ==> HL -; -NEG: - MOV A,L - CMA - MOV L,A - MOV A,H - CMA - MOV H,A - INX H - RET -; -;HL/2 ==> HL -; -ROTRHL: - ORA A - MOV A,H - RAR - MOV H,A - MOV A,L - RAR - MOV L,A - RET -; -;Collect the number of '1' bits -;in A as a count in C -; -COLECT: - MVI B,8 ;NUMBER OF BITS -; -COLOP: - RAL - JNC COSKIP - INR C -; -COSKIP: - DCR B - JNZ COLOP - RET -; -;HL-DE ==> HL -; Carry Flag is Significant -; -SUBDE: - MOV A,L - SUB E - MOV L,A - MOV A,H - SBB D - MOV H,A - RET -; -;Quick Kludge multiply -;HL*DE ==> HL -; -MULT: - PUSH B - PUSH D - XCHG - MOV B,D - MOV C,E - MOV A,B - ORA C - JNZ MULCON - LXI H,0 ;FILTER SPECIAL CASE - JMP MLDONE ; OF MULTIPLY BY 0 -; -MULCON: - DCX B - MOV D,H - MOV E,L -; -MULTLP: - MOV A,B - ORA C - JZ MLDONE - DAD D - DCX B - JMP MULTLP -; -MLDONE: - POP D - POP B - RET -; -;Routine to fill in disk params -;with every drive change -; -LOGIT: - LXI D,DPB ; THEN MOVE TO LOCAL - MVI B,DPBLEN ; WORKSPACE - CALL MOVE - LXI H,GRPDIS - MOV A,M - PUSH PSW - LDA BLM - MOV M,A - PUSH H - LHLD DSM - XCHG - CALL GTKSEC - SHLD MAXSEC - XCHG - SHLD MAXTRK - POP H - POP PSW - MOV M,A - RET - -;*********************************** -; -; DU3 Command Table -; -;*********************************** -CMDTBL: - DB ' ' ;null command - DW PROMPT -; - DB ':' - DW MAC -; - DB '@' - DW PCMD -; - DB '+' - DW PLUS -; - DB '-' - DW MINUS -; - DB '=' - DW SEARCH -; - DB '<' - DW SAVE -; - DB '>' - DW RESTOR -; - DB '#' - DW STATS -; - DB '?' - DW HELP -; - DB MULCH - DW REPEAT -; - DB '!' - DW UWAIT -; - DB 'A' - DW DUMP -; - DB 'C' - DW CHG -; - DB 'D' - DW DUMP -; - DB 'E' - DW EDIT -; - DB 'F' - DW POSFIL -; - DB 'G' - DW POS -; - DB 'H' - DW DUMP -; - DB 'L' - DW LOGIN -; - DB 'M' - DW MAP -; - DB 'N' - DW NEWDSK -; - DB 'P' - DW PRNTFF -; - DB 'Q' - DW QUEUER -; - DB 'R' - DW DOREAD -; - DB 'S' - DW POS -; - DB 'T' - DW POS -; - DB 'U' - DW USER -; - DB 'V' - DW VIEW -; - DB 'W' - DW DORITE -; - DB 'X' - DW EXIT -; - DB 'Z' - DW SLEEP -; - DB 0 ; End of Table -;************************************* - -; -;Temporary storage area -; -clock: - ds 1 ;clock speed -pagsiz: - ds 1 ;page size -muser: - ds 1 ;max user -mdisk: - ds 1 ;max disk -STKSAV: - DS 2 ;SAVE HL VALUE -DUTSTK: - DS 2 ;OLD CP/M STACK POINTER; TOP OF DU3 STACK -BUFAD: - DS 2 ;FORCES INITIAL READ -QCNT: - DS 2 ;NUMBER OF SECTORS IN QUEUE -QNXT: - DS 2 ;PTR TO NEXT SECTOR IN QUEUE -QLST: - DS 2 ;PTR TO LAST SECTOR IN QUEUE -QPTR: - DS 2 ;G-P QUEUE PTR -HEXAD: - DS 2 ;TO RE-FETCH A VALUE -TOGO: - DS 2 ;REPEAT COUNT (FFFF=CONT) -TWOUP: - DS 1 -UNUM: - DS 1 ;NUMBER OF CURRENT USER -ONLY1: - DS 1 ;FLAG TO PRINT ONLY 1 MAP ENTRY (0=NO) -MFPTR: - DS 2 ;MULTI FILE PTR FOR GETGRP -PAGFLG: - DS 1 ;LINE COUNTER FOR PAGING -PFLAG: - DS 1 ;1=PRINT -GROUP: - DS 2 ;GROUP NUMBER -GRPDIS: - DS 1 ;DISPLACEMENT INTO GROUP -SAVEFL: - DS 1 ;SAVE FLAG -CURTRK: - DS 2 ;CURRENT TRACK NUMBER -CURSEC: - DS 2 ;CURRENT SECTOR NUMBER -PHYSEC: - DS 2 ;CURRENT PHYSICAL SECTOR NUMBER -TABCOL: - DS 1 ;TAB COLUMN -CPYFCT: - DS 1 ;GROUP COPY FUNCTION; 0=READ, 0FFH=WRITE -FILECT: - DS 2 ;FILE COUNT -DIRPOS: - DS 1 ;POSITION IN DIRECTORY -FINDFL: - DS 1 ;1=MUST POSITION AFTER FIND -FTSW: - DS 1 ;SEARCH W/O INCREMENT -NOTPOS: - DS 1 ;INITIALLY NOT POSITIONED -WRFLG: - DS 1 ;MAY NOT WRITE UNTIL '+', '-', -; OR 'G' COMMAND -TGRP: - DS 2 ;TEMPORARY GROUP FLAG -FIRST0: - DS 1 ;SETS TO 0 IF FIRST SEC # IS 0 -DRIVE: - DS 1 ;DRIVE NUMBER -MAXTRK: - DS 2 ;MAX TRACK NUMBER -MAXSEC: - DS 2 ;MAX SECTOR NUMBER -SECTBL: - DS 2 ;POINTER TO SECTOR SKEW TABLE -; -IHFLG: - DS 1 ;0=NOT AT INITIAL HELP, 0FFH=AT INITIAL HELP -DUPFLG: - DS 1 ;SPACE OR STAR TO INDICATE MULTIPLE USERS -BACK: - DS 2 ;TO BACK UP IN "CA0-7F,X" -DUMTYP: - DS 1 -; -;The disk parameter block -;is moved here from CP/M -; -DPB EQU $ ;DISK PARAMETER BLOCK (COPY) -SPT: - DS 2 -BSH: - DS 1 -BLM: - DS 1 -EXM: - DS 1 -DSM: - DS 2 -DRM: - DS 2 -AL0: - DS 1 -AL1: - DS 1 -CKS: - DS 2 -SYSTRK: - DS 2 -; -;End of disk parameter block -; -SAVBUF: - DS 2 -INBUF: - DS 2 ;INPUT LINE BUFFER -PINBUF: - DS 2 ;PREVIOUS CONTENTS OF INPUT BUFFER -CTEMP: - DS 2 ;BUILD NEW COMMAND LINE BUFFER -CTEMPX: - DS 2 ;END OF CTEMP -MTABL: - DS 2 ;10 PAGES FOR 10 MACROS -GBUFF: - DS 2 -DIRECT: - DS 2 -; - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/DU312.LBR b/Source/Images/d_bp/u15/DU312.LBR deleted file mode 100644 index ec5d7797..00000000 Binary files a/Source/Images/d_bp/u15/DU312.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/ECHO.COM b/Source/Images/d_bp/u15/ECHO.COM deleted file mode 100644 index e2f9423f..00000000 Binary files a/Source/Images/d_bp/u15/ECHO.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ECHO.MAC b/Source/Images/d_bp/u15/ECHO.MAC deleted file mode 100644 index cbd4f7ea..00000000 --- a/Source/Images/d_bp/u15/ECHO.MAC +++ /dev/null @@ -1,181 +0,0 @@ -; -; Program: ECHO -; Author: Richard Conn -; Version: 1.0 -; Date: 22 Mar 84 -; -version equ 10 -z3env SET 0F400H ;base address of ZCPR3 Environment Descriptor - -; -; The purpose of ECHO is two-fold: -; 1) to provide a convenient way of sending messages to -; the console during the execution of a command file or multiple command -; line; for example: -; -; echo Assembling;m80 =$1;^E -; if input;echo Linking;l80 /P:100,$1,A:SYSLIB/S,$1/N,/E;fi -; -; as a single multiple command line will print the informative messages of -; "ASSEMBLING" and "LINKING" during the respective phases of the commands -; -; 2) to provide a convenient way to send escape sequences -; to the CRT and printer; ECHO does no character translation, using direct -; BIOS calls, so sequences used to program intelligent devices can be -; issued by running echo and typing in those sequences -; - -; -; Z3LIB and SYSLIB References -; - ext z3init,print - -; -; Equates -; -wboot equ 00h -tbuff equ 80h -fcb1 equ 5ch -cr equ 0dh -ff equ 0ch -lf equ 0ah - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Check for Help -; - lda fcb1+1 ;get first char - cpi '/' ;if slash, then print help - jnz echo - call print - db 'ECHO, Version ' - db (version/10)+'0','.',(version mod 10)+'0',cr,lf - db 'Syntax:',cr,lf - db ' ECHO text <-- send text to console',cr,lf - db ' ECHO $text <-- send text to printer',cr,lf - db ' ECHO $text^L <-- send text to printer',cr,lf - db ' terminated by CR,LF,FF' - db 0 - ret -; -; Run ECHO Routine -; -ECHO: - LXI H,TBUFF+1 ;PT TO FIRST CHAR -ECHO1: - MOV A,M ;SKIP LEADING SPACES - INX H ;PT TO NEXT - CPI ' ' - JZ ECHO1 - MOV B,A ;CHAR IN B - CPI '$' ;PRINT FLAG? - JZ ECHO2 - DCX H ;PT TO CHAR -; -; LOOP TO ECHO CHARS -; -ECHO2: - MOV A,M ;GET CHAR - ORA A ;EOL? - JZ ECHO4 - CPI FF ;FORM FEED? - JZ ECHO3 -ECHO2C: - CALL ECHOUT ;SEND CHAR - INX H ;PT TO NEXT - JMP ECHO2 -; -; FORM FEED - SEND NEW LINE FOLLOWED BY FORM FEED IF PRINTER OUTPUT -; -ECHO3: - MOV A,B ;CHECK FOR PRINTER OUTPUT - CPI '$' - JNZ ECHOFF ;SEND FORM FEED NORMALLY IF NOT PRINTER - CALL ECHONL ;SEND NEW LINE - MVI A,FF ;SEND FORM FEED - JMP ECHOUT -; -; SEND FORM FEED CHAR TO CONSOLE -; -ECHOFF: - MVI A,FF ;GET CHAR - JMP ECHO2C -; -; END OF PRINT LOOP - CHECK FOR PRINTER TERMINATION -; -ECHO4: - MOV A,B ;CHECK FOR PRINTER OUTPUT - CPI '$' - RNZ ;DONE IF NO PRINTER OUTPUT -; -; OUTPUT A NEW LINE -; -ECHONL: - MVI A,CR ;OUTPUT NEW LINE ON PRINTER - CALL ECHOUT - MVI A,LF ;FALL THRU TO ECHOUT -; -; OUTPUT CHAR TO PRINTER OR CONSOLE -; -ECHOUT: - MOV C,A ;CHAR IN C - PUSH H ;SAVE HL - PUSH B ;SAVE BC - LXI D,0CH-3 ;OFFSET FOR CONSOLE OUTPUT - MOV A,B ;CHECK FOR PRINTER - CPI '$' - JNZ ECHOUT1 - INX D ;ADD 3 FOR PRINTER OFFSET - INX D - INX D -; -; OUTPUT CHAR IN C WITH BIOS OFFSET IN DE -; -ECHOUT1: - CALL BIOUT ;BIOS OUTPUT - POP B ;RESTORE BC,HL - POP H - RET - -; -; OUTPUT CHAR IN C TO BIOS WITH OFFSET IN DE -; -BIOUT: - LHLD WBOOT+1 ;GET ADDRESS OF WARM BOOT - DAD D ;PT TO ROUTINE - PCHL ;JUMP TO IT - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ERASE.COM b/Source/Images/d_bp/u15/ERASE.COM deleted file mode 100644 index 7862e266..00000000 Binary files a/Source/Images/d_bp/u15/ERASE.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ERASE.MAC b/Source/Images/d_bp/u15/ERASE.MAC deleted file mode 100644 index 6b63b062..00000000 --- a/Source/Images/d_bp/u15/ERASE.MAC +++ /dev/null @@ -1,493 +0,0 @@ -; PROGRAM: ERASE -; VERSION: 5.0 -; DATE: 18 MAY 84 -; AUTHOR: RICHARD CONN -; PREVIOUS VERSION: 4.0 (16 JAN 83) -; PREVIOUS VERSION: 3.3 (6 JAN 83), 3.2 (7 DEC 82) -; PREVIOUS VERSION: 3.1 (9 NOV 82), 3.0 (18 OCT 82), 2.0 (18 NOV 81) -; PREVIOUS VERSION: 1.2 (12 APR 81), 1.3 (25 OCT 81), 1.4 (26 OCT 81) -; PREVIOUS VERSION: 1.0 (14 JUN 80), 1.1 (19 OCT 80) -VERS equ 50 -z3env SET 0f400h - -; -; ERASE COMMAND -- -; Erase files specified in command line. Command is of the form -- -; ERASE DIR:FILENAME.TYP,... ISR -; If I option is given, Inspection of each file is performed and -; the user is given the option to erase the file or not. If S option is -; given, System files are included in erase procedure. Drive specification -; is optional. If R option is given, R/O files are erased without prompting. -; - -FALSE EQU 0 -TRUE EQU NOT FALSE - -ESIZE EQU 16 ; SIZE OF DIR ENTRY (FROM SYSLIB DIRQ ROUTINE) - - EXT DIRQ ; DIRECTORY PROCESSOR - - EXT Z3INIT ; INIT Z3 ENV - EXT ZFNAME ; FILE NAME PARSER - EXT Z3LOG ; LOG INTO Z3 FCB SPEC - - EXT PUTUD ; SAVE CURRENT DU - EXT GETUD ; GET CURRENT DU - EXT PHLDC ; PRINT HL AS DECIMAL CHARS - EXT EPRINT ; PRINT ROUTINE - EXT COUT ; CONSOLE OUTPUT ROUTINE - EXT CIN ; CONSOLE INPUT ROUTINE - EXT CAPS ; CAPITALIZE ROUTINE - EXT CRLF ; NEW LINE ROUTINE - EXT FILLB ; FILL ROUTINE - EXT CODEND ; CODE END COMPUTATION ROUTINE - -; -; CP/M EQUATES -; -CPM EQU 0 ; WARM BOOT -BDOS EQU 5 ; BDOS ENTRY -FCB EQU 5CH ; FCB -BUFF EQU 80H ; INPUT LINE BUFFER -CR EQU 13 ; -LF EQU 10 ; - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env -; - LXI H,0 ; GET STACK PTR - DAD SP - SHLD STACK ; SAVE IT -; -; Compute Buffer Locations -; - CALL CODEND ; DETERMINE FREE SPACE - SHLD CMDLNE ; SET PTR TO COMMAND LINE - LXI D,100H ; BUFFER SIZE - DAD D ; COMMAND LINE - SHLD ERAFCB ; FCB FOR ERASE - DAD D - SHLD DIRBUF ; SET PTR TO DIRECTORY BUFFER - SPHL ; SET STACK PTR -; -; Save Location -; - CALL PUTUD ; SAVE AWAY CURRENT DU - -; -; Print Banner -; - CALL EPRINT - DB 'ERASE Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0',0 - LDA FCB+1 ; GET FIRST CHAR OF FILE NAME - CPI '/' ; OPTION CAUGHT? - JNZ ECONT - -; PRINT HELP INFORMATION -HELP: - CALL EPRINT - DB CR,LF,' ERASE dir:filename.typ,dir:fn.ft,... o...' - DB CR,LF,'Options:' - DB CR,LF,' I -- Inspect Mode' - DB CR,LF,' R -- Erase R/O Files without prompting user' - DB CR,LF,' S -- Include System Files' - DB 0 - JMP RETURN - -; RETURN TO OS -RETURN: - CALL GETUD ; RESET USER IF NECESSARY -RETX: - LHLD STACK ; GET OLD STACK - SPHL ; SET IT - RET - -; COPY BUFFER INTO TEMP BUFFER -ECONT: - LHLD CMDLNE ; PT TO COMMAND LINE - XCHG ; ... IN DE - LXI H,BUFF+1 ; PT TO BUFFER - MVI B,80H ; BUFFER SIZE (MAX) - CALL MOVEB ; COPY INTO COMMAND LINE BUFFER - -; EXTRACT FLAGS IF PRESENT - XRA A ; SET NO INSPECT, NO R/O, AND NO SYSTEM FILES - STA INSPECT - STA READONLY - MVI A,80H ; SELECT NON-SYS - STA SYSTEM - LXI H,0 ; SET FILE COUNT - SHLD FILECNT - LHLD CMDLNE ; PT TO BUFFER - -; SKIP TO FILE NAME STRING -SBLANK: - MOV A,M ; SKIP TO NON-BLANK - CPI ' ' ; ? - JNZ SBL1 - INX H ; PT TO NEXT CHAR - JMP SBLANK - -; SKIP TO END OF FILE NAME STRING -SBL1: - MOV A,M ; SKIP TO OR EOL - ORA A ; DONE? - JZ OPT - CPI ' ' ; - JZ OPT - INX H ; PT TO NEXT - JMP SBL1 - -; CHECK FOR LEADING SLASH ON OPTION AND SKIP IT IF SO -OPT: - CPI '/' ; OPTION CHAR? - JNZ OPTION - INX H ; SKIP SLASH - -; PROCESS LIST OF OPTIONS -OPTION: - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ DSPEC - INX H ; PT TO NEXT CHAR - CPI ' ' ; SKIP OVER SPACES - JZ OPTION - CPI '/' ; IF OPTION LETTER, OBVIOUS ERROR, SO HELP - JZ HELP - CPI 'I' ; INSPECT? - JZ OPTINS - CPI 'R' ; READ/ONLY? - JZ OPTRO - CPI 'S' ; SYSTEM FILES? - JNZ HELP - -; SET SYS SELECTION - MVI A,0C0H ; SET FOR SYS AND NON-SYS FILES - STA SYSTEM - JMP OPTION - -; SET INSPECT OPTION -OPTINS: - MVI A,0FFH ; INSPECT - STA INSPECT - JMP OPTION - -; SET R/O OPTION -OPTRO: - MVI A,0FFH ; SET R/O - STA READONLY - JMP OPTION - -; EXTRACT DISK, USER, AND FILE NAME INFORMATION -DSPEC: - LHLD CMDLNE ; PT TO BEFORE FIRST BYTE - DCX H ; PT TO BEFORE FIRST BYTE FOR FOLLOWING INX -DSPEC0: - INX H ; PT TO BYTE - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ HELP - CPI ' ' ; ? - JZ DSPEC0 -; -; MAJOR REENTRY POINT WHEN FILE SPECS ARE SEPARATED BY COMMAS -; HL PTS TO FIRST BYTE OF NEXT FILE SPEC -; -DSPEC1: - CALL GETUD ; RETURN HOME - LXI D,FCB ; PT TO FCB IN DE, PT TO FIRST CHAR OF FILE NAME IN HL - MVI A,0 ; SCAN FOR DIR FORM BEFORE DU - CALL ZFNAME ; EXTRACT FILE NAME INTO FCB, AND GET DISK AND USER - SHLD NEXTCH ; SAVE PTR TO DELIMITER WHICH ENDED SCAN - LXI H,FCB+1 ; SEE IF FILE NAME IS ALL WILD - MVI B,11 ; 11 BYTES -WTEST: - MOV A,M ; GET BYTE - INX H ; PT TO NEXT - CPI '?' ; WILD? - JNZ NOWILD - DCR B ; COUNT DOWN - JNZ WTEST - LDA INSPECT ; INSPECT? - ORA A ; 0=NO - JNZ NOWILD - CALL EPRINT - DB CR,LF,'Erase All Files? ',0 - CALL CIN ; GET RESPONSE - CALL CAPS ; CAPITALIZE - CALL COUT ; ECHO - CPI 'Y' ; YES? - JZ NOWILD - CALL EPRINT - DB CR,LF,'Aborting',0 - JMP RETX -NOWILD: - LXI D,FCB ; PT TO FCB - CALL Z3LOG ; LOG INTO DIRECTORY - -; LOAD DIRECTORY AND ERASE FILES -ERASE: - LHLD DIRBUF ; PT TO DIR BUFFER - LDA SYSTEM ; GET SYS/NON-SYS FLAGS - LXI D,FCB ; PT TO FCB - CALL DIRQ ; LOAD DIR, SELECT FILES, PACK, AND ALPHABETIZE - -; ERASE DIR FILES; HL PTS TO FIRST FILE, BC=FILE COUNT - CALL ERAFILES - -; CHECK FOR NEXT FILE SPEC - LHLD NEXTCH ; GET PTR - MOV A,M ; GET DELIM - CPI ',' ; ANOTHER FILE? - JNZ ERADONE - INX H ; PT TO CHAR AFTER COMMA - JMP DSPEC1 ; CONTINUE PROCESSING - -; ERASE COMPLETE -- PRINT COUNT AND EXIT -ERADONE: - CALL PRCOUNT ; PRINT FILE COUNT - JMP RETURN - -; ERASE SELECTED FILES -ERAFILES: - MOV A,B ; CHECK FOR ANY FILES LOADED - ORA C - RZ - -; PRINT FILE NAME -ERAFLP: - PUSH B ; SAVE ENTRY COUNT - CALL CRLF ; NEW LINE - PUSH H ; SAVE PTR TO FCB - INX H ; PT TO FILE NAME - MVI B,8 ; PRINT NAME - CALL PRNT - MVI A,'.' ; DECIMAL - CALL COUT - MVI B,3 ; PRINT TYPE - CALL PRNT - POP H ; GET PTR - -; CHECK FOR INSPECTION AND INSPECT IF SET - LDA INSPECT ; GET FLAG - ORA A ; 0=NO - JZ ERAIT - -; PROMPT USER FOR ERASE - CALL ERAQ ; ERASE QUESTION - CPI 'Q' ; QUIT? - JZ QUIT - CPI 'Y' ; YES? - JZ ERAIT - -; DON'T ERASE FILE -ERANO: - CALL EPRINT - DB ' NOT Erased',0 - JMP ERATEST - -; PROMPT USER FOR ERASE -ERAQ: - CALL EPRINT ; PRINT PROMPT - DB ' -- Erase (Y/N/Q=Quit/other=N)? ',0 - CALL CIN ; GET RESPONSE - CALL CAPS ; CAPITALIZE - CALL COUT ; ECHO - RET - -; QUIT ERASE PROGRAM -QUIT: - CALL PRCOUNT ; PRINT COUNT OF FILES ERASED - JMP RETURN - -; ERASE FILE -ERAIT: - PUSH H - LXI D,9 ; PT TO R/O ATTRIBUTE - DAD D - MOV A,M ; GET R/O ATTRIBUTE - POP H ; RESTORE PTR - ANI 80H ; R/O? - JZ ERAIT1 ; R/W - PROCEED - LDA READONLY ; GET R/O ERASE FLAG - ORA A ; 0=QUERY - JNZ ERAIT0 ; ERASE WITHOUT QUESTION IF FLAG SET - CALL EPRINT ; NOTIFY USER AND PROMPT - DB CR,LF,' File is R/O',0 - CALL ERAQ ; ASK QUESTION - CPI 'Q' ; QUIT? - JZ QUIT - CPI 'Y' ; ERASE R/O - JNZ ERATEST ; DO NOT ERASE IF NOT YES - -; ERASE R/O FILE -ERAIT0: - PUSH H ; SAVE PTR TO FILE ENTRY - LXI D,9 ; PT TO R/O ATTRIBUTE - DAD D - MOV A,M ; GET ATTRIBUTE - ANI 7FH ; MAKE R/W - MOV M,A - POP H ; GET PTR TO FCB - PUSH H ; SAVE PTR AGAIN - XCHG ; DE PTS TO FCB - XRA A ; MAKE SURE CURRENT DISK IS SELECTED - STAX D - MVI C,30 ; SET FILE ATTRIBUTES - CALL BDOS - POP H - -; ERASE R/W FILE -ERAIT1: - PUSH H ; SAVE PTR TO FILE NAME TO ERASE - INX H ; PT TO FIRST BYTE OF NAME - PUSH H ; SAVE HL - LHLD ERAFCB ; SET UP FCB - XCHG ; ... IN DE - POP H ; GET HL - PUSH D ; SAVE PTR - XRA A ; A=0 - STAX D ; CURRENT DISK - INX D ; PT TO FIRST CHAR - MVI B,11 ; COPY 11 BYTES - CALL MOVEB ; COPY HL TO DE FOR 11 BYTES - XCHG ; HL PTS TO REST OF FCB - MVI B,24 ; FILL REST OF FCB WITH ZEROES - XRA A ; A=0 - CALL FILLB - POP D ; GET PTR - MVI C,19 ; DELETE FILE - CALL BDOS - CALL EPRINT - DB ' Erased',0 - LHLD FILECNT ; INCREMENT COUNT - INX H - SHLD FILECNT - POP H ; GET PTR TO DIRECTORY ENTRY - -; PT TO NEXT ENTRY -ERATEST: - LXI D,ESIZE ; PT TO NEXT ENTRY - DAD D - POP B ; GET COUNT - DCX B ; COUNT DOWN - MOV A,B ; CHECK FOR ZERO - ORA C - JNZ ERAFLP - -; RETURN TO CALLER - RET - -; -; COPY HL TO DE FOR B BYTES -; -MOVEB: - MOV A,M ; GET BYTE - STAX D ; PUT BYTE - INX H ; PT TO NEXT - INX D - DCR B ; COUNT DOWN - JNZ MOVEB - RET - -; -; PRINT CHARS PTED TO BY HL FOR B BYTES -; -PRNT: - MOV A,M ; GET CHAR - CALL COUT - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ PRNT - RET - -; -; PRINT COUNT OF NUMBER OF FILES ERASED -; -PRCOUNT: - CALL CRLF ; NEW LINE - LHLD FILECNT ; GET COUNT - MOV A,L ; CHECK FOR NONE - ORA H - JZ PRNO - CALL PHLDC ; PRINT DECIMAL COUNT - JMP PRMS -PRNO: - CALL EPRINT - DB 'No',0 -PRMS: - LHLD FILECNT ; 1 FILE ERASED? - MOV A,H ; HIGH ZERO? - ORA A - JNZ PRMULT - MOV A,L ; LOW ONE? - CPI 1 - JZ PRSING -PRMULT: - CALL EPRINT - DB ' Files Erased',0 - RET -PRSING: - CALL EPRINT - DB ' File Erased',0 - RET - -; -; BUFFERS -; -INSPECT: - DS 1 ; INSPECT FLAG (0=NO, 0FFH=YES) -SYSTEM: - DS 1 ; SYSTEM FLAG (0=NO, 80H=YES) -READONLY: - DS 1 ; READ/ONLY FLAG (0=QUERY FOR R/O, 0FFH=DON'T) -USER: - DS 1 ; NEW USER, OR 0FFH IF NO CHANGE -CURUSER: - DS 1 ; CURRENT USER NUMBER -NEXTCH: - DS 2 ; PTR TO NEXT CHAR IN MULTIFILE COMMAND LINE -FILECNT: - DS 2 ; COUNT OF NUMBER OF FILES ERASED -ERAFCB: - DS 2 ; PTR TO FCB FOR ERASE -CMDLNE: - DS 2 ; PTR TO COMMAND LINE -DIRBUF: - DS 2 ; PTR TO DIRECTORY BUFFER -STACK: - DS 2 ; OLD STACK PTR - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ERROR1.COM b/Source/Images/d_bp/u15/ERROR1.COM deleted file mode 100644 index 3c50b652..00000000 Binary files a/Source/Images/d_bp/u15/ERROR1.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ERROR1.MAC b/Source/Images/d_bp/u15/ERROR1.MAC deleted file mode 100644 index 2527df91..00000000 --- a/Source/Images/d_bp/u15/ERROR1.MAC +++ /dev/null @@ -1,309 +0,0 @@ -; -; Program: ERROR1 -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; This error handler displays the error line to the user and -; provides him with four options as to how to process this line: -; 1. Replace the command in error with a new command -; 2. Skip the command in error and resume execution -; with the next command -; 3. Replace the command line as it now stands -; 4. Throw away the command line and resume user -; control -; -; This program is transportable from one ZCPR3 system to another -; provided it is reassembled with the correct address for the ZCPR3 -; Environment Descriptor (Z3ENV) or DDT is used to patch this address -; (which is the first two bytes after the opening JMP). If an external -; ZCPR3 Environment Descriptor is not available, one will have to be -; provided by setting the Z3ENV equate to 0 and providing SYSENV.LIB in -; the current directory at assembly time. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -cmtch equ ';' ;comment character -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext z3init - ext print,pstr,codend,capine,bbline,crlf,moveb - ext erradr,puter1,puterc ;Error Handler Routines - ext qprint ;Quiet Mode Prints - ext getefcb,getcl1,qerror ;Z3 Messages et al - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment -; -; Print Banner -; - call qprint - db 'ERROR1, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,0 -; -; Determine if Program Invoked as an Error Handler or By the User -; - call qerror ;error? - jz handler ;handle error -; -; Invoked by the User, so Install as an Error Handler -; - call getefcb ;pt to external FCB - jz start1 ;proceed if external FCB not available -; -; Make Name Invoked by User the Name of the Error Handler -; - inx h ;pt to first char - lxi d,ername ;pt to name of error handler message - mvi b,8 ;at most 8 bytes - call moveb ;copy into buffer -; -; Make Command Line in Buffer the Error Handler -; -start1: - lxi h,ername ;make name in buffer the error handler - call puterc ;set command - mvi a,0ffh ;set error code - call puter1 ;set message - call print - db ' Error Handler Installed',0 - ret -; -; Handle Error -; -handler: - call erradr ;get address of error line - xchg ;HL pts to free area, DE pts to error line - call codend ;get ptr to free area - shld badcmd ;save ptr to bad command -; -; Extract Bad Command and Store It in Memory Starting at BADCMD -; DE pts to bad command, HL pts to location to store it at -; -savebad: - ldax d ;get next char - mov m,a ;put it - ora a ;done? - jz sbad1 - cpi cmtch ;check for comment - jz sbad1 - inx h ;pt to next - inx d - jmp savebad -; -; Set ending 0 in bad command buffer and check for continuation -; -sbad1: - mvi m,0 ;store ending zero - inx h ;pt to next - cpi cmtch ;more? - jnz sbad2 - inx d ;pt to rest of command -sbad2: - shld restcmd ;save rest of command line -; -; Extract Rest of Command Line and Store It in Memory Starting at RESTCMD -; -saverest: - ldax d ;get next - mov m,a ;put it - inx h ;pt to next - inx d - ora a ;done? - jnz saverest - shld scratch ;save ptr to scratch area -; -; Prompt User for Action -; -prompt: - call print - db cr,lf,'Error Line is:',cr,lf,' ',0 - call erradr ;get address of error line - call pstr - call print - db cr,lf,cr,lf,'Options are: ' - db cr,lf,' 1. Replace Command in Error with a New Command' - db cr,lf,' Replace ',0 - lhld badcmd - call pstr - call print - db cr,lf,' 2. Advance to Next Command and Resume Processing' - db cr,lf,' Advance to ',0 - lhld restcmd - call pstr - call print - db cr,lf,' 3. Replace Entire Line with a New Line' - db cr,lf,' Replace ',0 - call erradr ;pt to error line - call pstr - call print - db cr,lf,' 4. Throw Away Entire Line and Continue' - db cr,lf,' Throw Away ',0 - call erradr ;pt to error line - call pstr - call print - db cr,lf,cr,lf,'Select Option - ',0 - call capine - call crlf - cpi '1' ;option 1 - jz replace ;replace command in error - cpi '2' ;option 2 - jz advance ;advance to next command - cpi '3' ;option 3 - jz newline ;enter new line - cpi '4' ;option 4 - jz flush ;throw away line - call print - db cr,lf,'Invalid Option - Retry',cr,lf,0 - jmp prompt -; -; Replace Command in Error -; -replace: - call print - db 'Replacement Command?',cr,lf,' ',0 - lhld restcmd ;pt to rest of command line in DE - xchg - mvi a,0ffh ;capitalize - call bbline ;get line from user - call build ;build and run command - jmp prompt ;continue if error -; -; Advance to Rest of Command Line -; -advance: - lhld restcmd ;pt to it - xchg - lxi h,empty ;HL pts to empty command, DE pts to tail - call build ;build and run command - jmp prompt ;continue if error -; -; Enter New Line -; -newline: - call print - db 'New Command?',cr,lf,' ',0 - mvi a,0ffh ;capitalize - call bbline ;get line from user - lxi d,empty ;HL pts to user command, DE pts to empty command - call build ;build and run command - jmp prompt ;continue if error -; -; Flush Commands -; -flush: - ret ;simply exit if no more commands -; -; Build New Command Line in SCRATCH Area and Run it by returning to ZCPR3 -; On input, HL pts to header, DE pts to tail -; -build: - lxi b,1 ;set char count (1 for ending zero) - push d ;save ptr to tail - push h ;save ptr to header - lhld scratch ;pt to scratch area - pop d ;get ptr to header - ldax d ;get first char - ora a ;any there? - cnz copy ;copy line into buffer - pop d ;get ptr to tail - ldax d ;anything there? - ora a - jz bldt ;terminate build if not - mvi m,cmtch ;begin with semicolon - inx h ;pt to next - call copy -bldt: - mvi m,0 ;store ending zero -; -; Store Command Line into MCL Buffer -; - call getcl1 ;pt to command line - cmp c ;check for char count within range - rc - mov a,b ;check for line too long - ora a ;line too long? - rnz ;error if so - lxi d,4 ;pt to first char - push h ;save ptr to current - dad d - pop d ;get ptr to current - xchg ;DE pts to first char position, HL pts to CL buffer - mov m,e ;set address to resume processing - inx h - mov m,d - lhld scratch ;pt to new line - xchg ;in DE, while HL pts to first char position - call copy ;copy it - mov m,a ;store ending zero - pop d ;clear stack - ret ;resume processing -; -; Copy string pted to by DE into buffer pted to by HL -; -copy: - ldax d ;get next char - ora a ;done? - rz - mov m,a ;store it - inx b ;increment count - inx h ;pt to next - inx d - jmp copy -; -; Buffers -; -ername: - db 'ERROR1 ',0 ;name of error handler -empty: - db 0 ;empty command line -badcmd: - ds 2 ;ptr to bad command extracted -restcmd: - ds 2 ;ptr to tail of bad command line -scratch: - ds 2 ;ptr to scratch area used to build new lines - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ERROR2.COM b/Source/Images/d_bp/u15/ERROR2.COM deleted file mode 100644 index 3becfeb2..00000000 Binary files a/Source/Images/d_bp/u15/ERROR2.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ERROR2.MAC b/Source/Images/d_bp/u15/ERROR2.MAC deleted file mode 100644 index 9b8be7b8..00000000 --- a/Source/Images/d_bp/u15/ERROR2.MAC +++ /dev/null @@ -1,368 +0,0 @@ -; -; Program: ERROR2 -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; This error handler displays the error line to the user and -; provides him with four options as to how to process this line: -; 1. Replace the command in error with a new command -; 2. Skip the command in error and resume execution -; with the next command -; 3. Replace the command line as it now stands -; 4. Throw away the command line and resume user -; control -; -; Unlike ERROR1, ERROR2 is screen-oriented, using the Z3TCAP -; for support. -; -; This program is transportable from one ZCPR3 system to another -; provided it is reassembled with the correct address for the ZCPR3 -; Environment Descriptor (Z3ENV) or DDT is used to patch this address -; (which is the first two bytes after the opening JMP). If an external -; ZCPR3 Environment Descriptor is not available, one will have to be -; provided by setting the Z3ENV equate to 0 and providing SYSENV.LIB in -; the current directory at assembly time. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -cmtch equ ';' ;comment character -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext z3vinit - ext print,pstr,codend,capine,bbline,crlf,moveb - ext erradr,puter1,puterc ;Error Handler Routines - ext qprint ;Quiet Mode Prints - ext getenv,getefcb,getcl1,qerror ;Z3 Messages et al - ext at,cls,stndout,stndend,gotoxy,vprint,gxymsg ;VLIB Routines - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3vinit ;initialize the ZCPR3 Environment -; -; Print Banner -; - call qprint - db 'ERROR2, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,0 -; -; Determine if Program Invoked as an Error Handler or By the User -; - call qerror ;error? - jz handler ;handle error -; -; Invoked by the User, so Install as an Error Handler -; - call getenv ;must have a Z3TCAP entry - lxi d,80h ;pt to Z3TCAP - dad d - mov a,m ;must not be space or less - cpi ' '+1 - jnc start0 - call print - db cr,lf,' No Z3TCAP - Aborting',0 - ret -; -; Determine Name of Routine -; -start0: - call getefcb ;pt to external FCB - jz start1 ;proceed if external FCB not available -; -; Make Name Invoked by User the Name of the Error Handler -; - inx h ;pt to first char - lxi d,ername ;pt to name of error handler message - mvi b,8 ;at most 8 bytes - call moveb ;copy into buffer -; -; Make Command Line in Buffer the Error Handler -; -start1: - lxi h,ername ;make name in buffer the error handler - call puterc ;set command - mvi a,0ffh ;set error code - call puter1 ;set message - call print - db ' Error Handler Installed',0 - ret -; -; Handle Error -; -handler: - call erradr ;get address of error line - xchg ;HL pts to free area, DE pts to error line - call codend ;get ptr to free area - shld badcmd ;save ptr to bad command -; -; Extract Bad Command and Store It in Memory Starting at BADCMD -; DE pts to bad command, HL pts to location to store it at -; -savebad: - ldax d ;get next char - mov m,a ;put it - ora a ;done? - jz sbad1 - cpi cmtch ;check for comment - jz sbad1 - inx h ;pt to next - inx d - jmp savebad -; -; Set ending 0 in bad command buffer and check for continuation -; -sbad1: - mvi m,0 ;store ending zero - inx h ;pt to next - cpi cmtch ;more? - jnz sbad2 - inx d ;pt to rest of command -sbad2: - shld restcmd ;save rest of command line -; -; Extract Rest of Command Line and Store It in Memory Starting at RESTCMD -; -saverest: - ldax d ;get next - mov m,a ;put it - inx h ;pt to next - inx d - ora a ;done? - jnz saverest - shld scratch ;save ptr to scratch area -; -; Prompt User for Action -; -prompt: - call cls ;clear screen - call gxymsg - db 3,22 - db '>>>> ',1,'VIDEO ERROR HANDLER',2,' <<<<',0 - call gxymsg - db 5,28 - db '-- Error Line --',0 - call at - db 6,10 - call stndout ;reverse video - call erradr ;get address of error line - call pstr - call stndend ;normal video - mvi h,10 ;position cursor - mvi l,15 - shld infoxy - call gxymsg - db 8,30 - db '-- Options --',0 - call atinfo - call vprint - db '1. Replace Command in Error with a New Command',0 - call atinfo - call vprint - db ' Replace ',1,0 - lhld badcmd - call pstr - call atinfo - call atinfo - call vprint - db 2,'2. Advance to Next Command and Resume Processing',0 - call atinfo - call vprint - db ' Advance to ',1,0 - lhld restcmd - call pstr - call atinfo - call atinfo - call vprint - db 2,'3. Replace Entire Line with a New Line',0 - call atinfo - call vprint - db ' Replace ',1,0 - call erradr ;pt to error line - call pstr - call atinfo - call atinfo - call vprint - db 2,'4. Throw Away Entire Line and Continue',0 - call atinfo - call vprint - db ' Throw Away ',1,0 - call erradr ;pt to error line - call pstr - call stndend -userin: - call gxymsg - db 22,20 - db 'Select Option - ',0 - call capine - cpi '1' ;option 1 - jz replace ;replace command in error - cpi '2' ;option 2 - jz advance ;advance to next command - cpi '3' ;option 3 - jz newline ;enter new line - cpi '4' ;option 4 - jz flush ;throw away line - call print - db 8,' Invalid Option - Retry',0 ;backspace over error - jmp userin -; -; Position at INFOXY and advance ptr to next line -; -atinfo: - lhld infoxy ;pt to next position - call gotoxy ;go there - inr h ;next line - shld infoxy - ret -; -; Replace Command in Error -; -replace: - call print - db ' Replacement Command?',cr,lf,' ',0 - lhld restcmd ;pt to rest of command line in DE - xchg - mvi a,0ffh ;capitalize - call bbline ;get line from user - call build ;build and run command - jmp prompt ;continue if error -; -; Advance to Rest of Command Line -; -advance: - lhld restcmd ;pt to it - xchg - lxi h,empty ;HL pts to empty command, DE pts to tail - call build ;build and run command - jmp prompt ;continue if error -; -; Enter New Line -; -newline: - call print - db ' New Command?',cr,lf,' ',0 - mvi a,0ffh ;capitalize - call bbline ;get line from user - lxi d,empty ;HL pts to user command, DE pts to empty command - call build ;build and run command - jmp prompt ;continue if error -; -; Flush Commands -; -flush: - ret ;simply exit if no more commands -; -; Build New Command Line in SCRATCH Area and Run it by returning to ZCPR3 -; On input, HL pts to header, DE pts to tail -; -build: - lxi b,1 ;set char count (1 for ending zero) - push d ;save ptr to tail - push h ;save ptr to header - lhld scratch ;pt to scratch area - pop d ;get ptr to header - ldax d ;get first char - ora a ;any there? - cnz copy ;copy line into buffer - pop d ;get ptr to tail - ldax d ;anything there? - ora a - jz bldt ;terminate build if not - mvi m,cmtch ;begin with semicolon - inx h ;pt to next - call copy -bldt: - mvi m,0 ;store ending zero -; -; Store Command Line into MCL Buffer -; - call getcl1 ;pt to command line - cmp c ;check for char count within range - rc - mov a,b ;check for line too long - ora a ;line too long? - rnz ;error if so - lxi d,4 ;pt to first char - push h ;save ptr to current - dad d - pop d ;get ptr to current - xchg ;DE pts to first char position, HL pts to CL buffer - mov m,e ;set address to resume processing - inx h - mov m,d - lhld scratch ;pt to new line - xchg ;in DE, while HL pts to first char position - call copy ;copy it - mov m,a ;store ending zero - pop d ;clear stack - ret ;resume processing -; -; Copy string pted to by DE into buffer pted to by HL -; -copy: - ldax d ;get next char - ora a ;done? - rz - mov m,a ;store it - inx b ;increment count - inx h ;pt to next - inx d - jmp copy -; -; Buffers -; -ername: - db 'ERROR2 ',0 ;name of error handler -empty: - db 0 ;empty command line -infoxy: - ds 2 ;xy-coordinate for display -badcmd: - ds 2 ;ptr to bad command extracted -restcmd: - ds 2 ;ptr to tail of bad command line -scratch: - ds 2 ;ptr to scratch area used to build new lines - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ERROR3.COM b/Source/Images/d_bp/u15/ERROR3.COM deleted file mode 100644 index 50755b22..00000000 Binary files a/Source/Images/d_bp/u15/ERROR3.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ERROR3.MAC b/Source/Images/d_bp/u15/ERROR3.MAC deleted file mode 100644 index 49e79a21..00000000 --- a/Source/Images/d_bp/u15/ERROR3.MAC +++ /dev/null @@ -1,154 +0,0 @@ -; -; Program: ERROR3 -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; This error handler displays the name of the COM file which was -; not found and then flushes the command line, returning control to the -; user. -; -; This program is transportable from one ZCPR3 system to another -; provided it is reassembled with the correct address for the ZCPR3 -; Environment Descriptor (Z3ENV) or DDT is used to patch this address -; (which is the first two bytes after the opening JMP). If an external -; ZCPR3 Environment Descriptor is not available, one will have to be -; provided by setting the Z3ENV equate to 0 and providing SYSENV.LIB in -; the current directory at assembly time. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -cmtch equ ';' ;comment character -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext z3init - ext print,pstr,codend,moveb - ext erradr,puter1,puterc ;Error Handler Routines - ext getefcb,getcl1,qerror ;Z3 Messages et al - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment -; -; Determine if Program Invoked as an Error Handler or By the User -; - call qerror ;error? - jz handler ;handle error -; -; Invoked by the User, so Install as an Error Handler -; - call getefcb ;pt to external FCB - jz start1 ;proceed if external FCB not available -; -; Make Name Invoked by User the Name of the Error Handler -; - inx h ;pt to first char - lxi d,ername ;pt to name of error handler message - mvi b,8 ;at most 8 bytes - call moveb ;copy into buffer -; -; Make Command Line in Buffer the Error Handler -; -start1: - lxi h,ername ;make name in buffer the error handler - call puterc ;set command - mvi a,0ffh ;set error code - call puter1 ;set message - call print - db 'ERROR3, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,' Error Handler Installed',0 - ret -; -; Handle Error -; -handler: - call erradr ;get address of error line - xchg ;HL pts to free area, DE pts to error line - call codend ;get ptr to free area -; -; Extract Bad Command and Store It in Memory Starting at CODEND -; DE pts to bad command, HL pts to location to store it at -; -savebad: - ldax d ;get next char - mov m,a ;put it - ora a ;done? - jz sbad1 - cpi cmtch ;check for comment - jz sbad1 - cpi ' ' ;check for space - jz sbad1 - inx h ;pt to next - inx d - jmp savebad -; -; Set ending 0 in bad command buffer and print error message and command -; -sbad1: - mvi m,0 ;store ending zero - call print - db ' File ',0 - call codend ;pt to name - call pstr - call print - db '.COM Not Found',0 - call getcl1 ;pt to command line buffer - lxi d,4 ;pt to first char position - push h ;save current ptr - dad d - mvi m,0 ;zero command line - xchg ;DE pts to command line - pop h - mov m,e ;store address - inx h - mov m,d - ret - -; -; Buffers -; -ername: - db 'ERROR3 ',0 ;name of error handler - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ERROR4.COM b/Source/Images/d_bp/u15/ERROR4.COM deleted file mode 100644 index 1aaf537d..00000000 Binary files a/Source/Images/d_bp/u15/ERROR4.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ERROR4.MAC b/Source/Images/d_bp/u15/ERROR4.MAC deleted file mode 100644 index 364ba928..00000000 --- a/Source/Images/d_bp/u15/ERROR4.MAC +++ /dev/null @@ -1,179 +0,0 @@ -; -; Program: ERROR4 -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; This error handler prints the name of the COM file which was not -; found and then advances to the next entry (assuming a multiple command -; line) and resumes with the next command in the line. -; -; This program is transportable from one ZCPR3 system to another -; provided it is reassembled with the correct address for the ZCPR3 -; Environment Descriptor (Z3ENV) or DDT is used to patch this address -; (which is the first two bytes after the opening JMP). If an external -; ZCPR3 Environment Descriptor is not available, one will have to be -; provided by setting the Z3ENV equate to 0 and providing SYSENV.LIB in -; the current directory at assembly time. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -cmtch equ ';' ;comment character -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext z3init - ext print,pstr,codend,moveb - ext erradr,puter1,puterc ;Error Handler Routines - ext getefcb,getcl1,qerror ;Z3 Messages et al - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment -; -; Determine if Program Invoked as an Error Handler or By the User -; - call qerror ;error? - jz handler ;handle error -; -; Invoked by the User, so Install as an Error Handler -; - call getefcb ;pt to external FCB - jz start1 ;proceed if external FCB not available -; -; Make Name Invoked by User the Name of the Error Handler -; - inx h ;pt to first char - lxi d,ername ;pt to name of error handler message - mvi b,8 ;at most 8 bytes - call moveb ;copy into buffer -; -; Make Command Line in Buffer the Error Handler -; -start1: - lxi h,ername ;make name in buffer the error handler - call puterc ;set command - mvi a,0ffh ;set error code - call puter1 ;set message - call print - db 'ERROR4, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,' Error Handler Installed',0 - ret -; -; Handle Error -; -handler: - call erradr ;get address of error line - xchg ;HL pts to free area, DE pts to error line - call codend ;get ptr to free area -; -; Extract Bad Command and Store It in Memory Starting at CODEND -; DE pts to bad command, HL pts to location to store it at -; -savebad: - ldax d ;get next char - mov m,a ;put it - ora a ;done? - jz sbad1 - cpi cmtch ;check for comment - jz sbad1 - cpi ' ' ;check for space - jz sbad1 - inx h ;pt to next - inx d - jmp savebad -; -; Set ending 0 in bad command buffer and print error message and command -; -sbad1: - mvi m,0 ;store ending zero - call print - db ' File ',0 - call codend ;pt to name - call pstr - call print - db '.COM Not Found',0 -; -; Advance to Next Entry in Error Line -; - call erradr ;pt to error -sbad2: - mov a,m ;skip to comment or eol - ora a ;eol? - jz sbad3 - inx h ;pt to next - cpi cmtch ;comment? - jnz sbad2 -; -; Set Up Command Line Pointer -; -sbad3: - push h ;save ptr to error text - call getcl1 ;pt to command line buffer - lxi d,4 ;pt to first char position - xchg - dad d - xchg ;DE pts to command line - mov m,e ;store address - inx h - mov m,d - pop h ;HL pts to next command, DE pts to cmd line -; -; Set Up Command Line Contents -; -sbad4: - mov a,m ;copy - stax d - inx h ;pt to next - inx d - ora a ;done? - jnz sbad4 - ret - -; -; Buffers -; -ername: - db 'ERROR4 ',0 ;name of error handler - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ERRORX.COM b/Source/Images/d_bp/u15/ERRORX.COM deleted file mode 100644 index 9446a567..00000000 Binary files a/Source/Images/d_bp/u15/ERRORX.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ERRORX.MAC b/Source/Images/d_bp/u15/ERRORX.MAC deleted file mode 100644 index 14b1993c..00000000 --- a/Source/Images/d_bp/u15/ERRORX.MAC +++ /dev/null @@ -1,69 +0,0 @@ -; -; Program: ERRORX -; Author: Richard Conn -; Version: 1.0 -; Date: 29 Mar 84 -; -version equ 10 -z3env SET 0f400H - -; -; ERRORX disengages the current error handler. No error handler -; is available after ERRORX executes. -; - -; -; SYSLIB and Z3LIB References -; - ext z3init,puter1,print - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Turn Off Message -; - mvi a,0 ;turn off error handler - call puter1 ;use SYSLIB routine - -; -; Print Message -; - call print - db 'ERRORX Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db ' -- Error Handler Disengaged',0 - ret - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/FILES.BBS b/Source/Images/d_bp/u15/FILES.BBS deleted file mode 100644 index 4ce23a7e..00000000 --- a/Source/Images/d_bp/u15/FILES.BBS +++ /dev/null @@ -1,363 +0,0 @@ - CP/M CDROM, Sep. 1994. Walnut Creek CDROM. - ------------------------------------------- - ZCPR3 software from Echelon - path: \zsys\simtel20\zcpr3 - ------------------------------------------- -ALIAS-1.LBR -ALIAS-2.LBR -ALIAS.COM -ALIAS.HLP -ALIAS.HQP -ALIAS.ZEX -ALIAS.ZQX -ALIAS0.MAC -ALIAS0.MQC -ALIAS1.MAC -ALIAS1.MQC -CD.COM -CD.MAC -CD.MQC -CLEAND15.LBR -CLEANDIR.COM -CLEANDIR.MAC -CLEANDIR.MQC -CLNDR13B.LBR -CMD.COM -CMD.MAC -CMD.MQC -CMDFILES.HLP -CMDFILES.HQP -CMDRUN.COM -CMDRUN.MAC -CMDRUN.MQC -COMMENT.COM -COMMENT.MAC -COMMENT.MQC -COMPARE.HLP -COMPARE.HQP -CPSEL.COM -CPSEL.MAC -CPSEL.MQC -CRC.COM -CRC.MAC -CRC.MQC -DBRCPREL.LBR -DEBUGRCP.AQM -DEBUGRCP.ASM -DEV.COM -DEV.MAC -DEV.MQC -DEV10.LBR -DEVICE.COM -DEVICE.MAC -DEVICE.MQC -DEVICE10.LBR -DIFF.COM -DIFF.MAC -DIFF.MQC -DIFF21.LBR -DIR.COM -DIR.MAC -DIR.MQC -DIR14.LBR -DIRS.HLP -DIRS.HQP -DPGFILE.LBR -DPROG.COM -DPROG.HLP -DPROG.HQP -DPROG.MAC -DPROG.MQC -DPROG12.LBR -DU3.COM -DU3.HLP -DU3.HQP -DU3.MAC -DU3.MQC -DU312.LBR -ECHO.COM -ECHO.MAC -ECHO.MQC -ERASE.COM -ERASE.MAC -ERASE.MQC -ERROR1.COM -ERROR1.MAC -ERROR1.MQC -ERROR2.COM -ERROR2.MAC -ERROR2.MQC -ERROR3.COM -ERROR3.MAC -ERROR3.MQC -ERROR4.COM -ERROR4.MAC -ERROR4.MQC -ERRORX.COM -ERRORX.MAC -ERRORX.MQC -FINDF.COM -FINDF.MAC -FINDF.MQC -FINDF26.LBR -FINDF26A.LBR -GOTO.COM -GOTO.MAC -GOTO.MQC -GRDEMO.LBR -HELP.COM -HELP.HLP -HELP.HQP -HELP.MAC -HELP.MQC -HELPCK.COM -HELPCK.MAC -HELPCK.MQC -HELPPR.COM -HELPPR.MAC -HELPPR.MQC -HELPSYS.HLP -HELPSYS.HQP -IF.COM -IF.HLP -IF.HQP -IF.MAC -IF.MQC -IFSTAT.COM -IFSTAT.MAC -IFSTAT.MQC -IO.HLP -IO.HQP -LDR-UPD.COM -LDR-UPD.MSG -LDR.COM -LDR.MAC -LDR.MQC -LDR15.LBR -LGET11.LBR -LLF11.LBR -LUZ3.LBR -LX12.LBR -LX14.LBR -MCOPY.COM -MCOPY.MAC -MCOPY.MQC -MCOPY44.LBR -MCOPY45B.LBR -MENU.COM -MENU.HLP -MENU.HQP -MENU.MAC -MENU.MQC -MENUCK.COM -MENUCK.MAC -MENUCK.MQC -MKDIR.COM -MKDIR.MAC -MKDIR.MQC -MU3.COM -MU3.HLP -MU3.HQP -MU3.MAC -MU3.MQC -NDIRS.HLP -NDIRS.HQP -NEWTCAP.Z80 -NEWTCAP.ZZ0 -NOTE.COM -NOTE.MAC -NOTE.MQC -PAGE.COM -PAGE.MAC -PAGE.MQC -PATH.COM -PATH.MAC -PATH.MQC -PATH31.LBR -PPAL.DOC -PRINT.COM -PRINT.MAC -PRINT.MQC -PRINTHLP.LBR -PROTECT.COM -PROTECT.MAC -PROTECT.MQC -PWD.COM -PWD.MAC -PWD.MQC -QUIET.COM -QUIET.MAC -QUIET.MQC -READ.ME -READ.MQ -RECORD.COM -RECORD.MAC -RECORD.MQC -REG.COM -REG.MAC -REG.MQC -RENAME.COM -RENAME.MAC -RENAME.MQC -RENAME31.LBR -SAK.COM -SAK.MAC -SAK.MQC -SETFILE.COM -SETFILE.MAC -SETFILE.MQC -SF.COM -SF.Z80 -SH.COM -SH.HLP -SH.HQP -SH.MAC -SH.MQC -SH11.LBR -SHCTRL.COM -SHCTRL.MAC -SHCTRL.MQC -SHDEFINE.COM -SHDEFINE.MAC -SHDEFINE.MQC -SHFILE.COM -SHFILE.MAC -SHFILE.MQC -SHOW.COM -SHOW.MAC -SHOW.MQC -SHSET.COM -SHSET.MAC -SHSET.MQC -SHUTILS2.LBR -SHVAR.COM -SHVAR.MAC -SHVAR.MQC -SHVAR11.LBR -SUB.COM -SUB.MAC -SUB.MQC -SYSENV.AQM -SYSENV.ASM -SYSENV.LIB -SYSENV.LQB -SYSFCP.AQM -SYSFCP.ASM -SYSFCP1.LIB -SYSFCP1.LQB -SYSFCP11.LBR -SYSFCP2.LIB -SYSFCP2.LQB -SYSIOP.AQM -SYSIOP.ASM -SYSNDR.AQM -SYSNDR.ASM -SYSNDR.LIB -SYSNDR.LQB -SYSRCP.AQM -SYSRCP.ASM -SYSRCP.HLP -SYSRCP.HQP -SYSRCP1.LIB -SYSRCP1.LQB -SYSRCP11.LBR -SYSRCP2.LIB -SYSRCP2.LQB -SYSRCP3.LIB -SYSRCP3.LQB -SYSRCP4.LIB -SYSRCP4.LQB -T3M-HI2.Z80 -T3M-HI2.ZZ0 -T3T-24-1.Z80 -T3T-24-1.ZQ0 -TCCHECK.COM -TCCHECK.MAC -TCCHECK.MQC -TCMAKE.COM -TCMAKE.MAC -TCMAKE.MQC -TCSELECT.COM -TCSELECT.MAC -TCSELECT.MQC -UNERASE.COM -UNERASE.MAC -UNERASE.MQC -VF-BOX11.LBR -VF41.IQF -VF41H.LBR -VF42A.LBR -VFILER.COM -VFILER.HLP -VFILER.HQP -VFILER.MAC -VFILER.MQC -VFILR4-1.LBR -VFILR4-2.LBR -VMENU.COM -VMENU.HLP -VMENU.HQP -VMENU.MAC -VMENU.MQC -VMENU24.LBR -VMENUCK.COM -VMENUCK.MAC -VMENUCK.MQC -VMENUFUN.LBR -WHEEL.COM -WHEEL.MAC -WHEEL.MQC -WYSE.DPG -XD.COM -XD.MAC -XD.MQC -XDIR.COM -XDIR.MAC -XDIR.MQC -Z3BASE1.LIB -Z3BASE1.LQB -Z3BASE2.LIB -Z3BASE2.LQB -Z3FILES.PH1 -Z3FILES.PH2 -Z3FILES.PQ2 -Z3FILES2.PH2 -Z3FILES2.PQ2 -Z3HDR1.LIB -Z3HDR1.LQB -Z3HDR2.LIB -Z3HDR2.LQB -Z3LDRBUG.LBR -Z3LOC.COM -Z3LOC.MAC -Z3LOC.MQC -Z3LOC11.LBR -Z3RES.HLP -Z3RES.HQP -Z3TCAP.AQM -Z3TCAP.ASM -Z3TCAP.HLP -Z3TCAP.HQP -Z3TCAP.TCP -Z3TCAP.TQP -Z3TCAP22.LBR -Z3UTIL1.HLP -Z3UTIL1.HQP -Z3UTIL2.HLP -Z3UTIL2.HQP -Z3UTIL3.HLP -Z3UTIL3.HQP -ZCPR3.AQM -ZCPR3.ASM -ZCPR3.HLP -ZCPR3.HQP -ZCPR3.INS -ZCPR3.IQS -ZCPR3DIR.BQG -ZCPR3DIR.BUG -ZEX.AQM -ZEX.ASM -ZEX.COM -ZEX.ZEX -ZEX.ZQX -ZSYSTEM.INS diff --git a/Source/Images/d_bp/u15/FINDF.COM b/Source/Images/d_bp/u15/FINDF.COM deleted file mode 100644 index 52362f8b..00000000 Binary files a/Source/Images/d_bp/u15/FINDF.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/FINDF.MAC b/Source/Images/d_bp/u15/FINDF.MAC deleted file mode 100644 index d606ca23..00000000 --- a/Source/Images/d_bp/u15/FINDF.MAC +++ /dev/null @@ -1,1050 +0,0 @@ -; PROGRAM: FINDF -; AUTHOR: RICHARD CONN -; VERSION: 2.0 -; DATE: 18 May 84 -; PREVIOUS VERSIONS: 1.1 (25 July 83), 1.0 (24 JULY 83) -; -VERS EQU 20 ;version number -z3env SET 0f400h - -; -; FINDF searches through all of the known disks for one or more -; files matching the passed file specification. AFNs (Ambiguous File Names) -; are permitted. FINDF is invoked by the following command line: -; FINDF afn,afn,afn,... o -; where "afn" refers to the file sought and "o" is none or more of: -; S - Include System Files -; - -; -; System equates: -; -BOOT EQU 0000H ;CP/M WARM BOOT JUMP VECTOR -BDOS EQU BOOT+05H ;CP/M BDOS CALL JUMP VECTOR -TBUFF EQU BOOT+80H ;DISK I/O BUFFER -FCB EQU BOOT+5CH ;DEFAULT FILE CONTROL BLOCK -CR EQU 'M'-'@' ;CTL-M FOR CARRIAGE RETURN -LF EQU 'J'-'@' ;CTL-J FOR LINE FEED -CTRLC EQU 'C'-'@' ;ABORT -CTRLS EQU 'S'-'@' ;PAUSE -ESIZE EQU 12 ;12 BYTES/DIR ENTRY - -; -; SYSLIB and Z3LIB Routines -; - ext z3init,codend - ext cout,crlf,print,padc - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - LXI H,0 ;SAVE STACK PTR - DAD SP - SHLD STACK - CALL CODEND ;DETERMINE FREE SPACE - SHLD FNTAB ;FILE NAME TABLE - LXI D,512 ;1/2 K SPACE - DAD D - SHLD SCRATCH ;BEGINNING OF SCRATCH AREA - SPHL ;AND TOP OF STACK - CALL GTBIOS ;GET BIOS JUMP TABLE - CALL HELLO ;SIGN ON MESSAGE - CALL HELPCHK ;CHECK FOR AND PRINT HELP MESSAGE - CALL OPTCHK ;BUILD FILE NAME TABLE AND PROCESS OPTIONS - CALL CRLF ;NEW LINE - CALL FIND ;DO THE SEARCHES - CALL BYE ;SIGN OFF MESSAGE -RETURN: - LHLD STACK ;QUIET RETURN - SPHL - RET -; -; ** Main Routines ** -; - -; -; SAY WHO WE ARE -; -HELLO: - CALL PRINT - DB 'FINDF, Version ' - DB (VERS/10)+'0','.',(VERS MOD 10)+'0' - DB 0 - RET -; -; CHECK FOR HELP REQUEST -; -HELPCHK: - LDA FCB+1 ;GET 1ST BYTE OF FILENAME - CPI '/' ;HELP? - JZ HCK1 - CPI ' ' ;MAKE SURE IT IS NON-BLANK - RNZ ;OK - KEEP GOING -; -; IF NO FILE NAME IS SPECIFIED, ABORT WITH NOTICE -; -HCK1: - CALL PRINT - db cr,lf,'Syntax:' - DB CR,LF,' FINDF afn,afn,afn,... o' - db cr,lf,'Options:' - DB CR,LF,' S - Include System Files' - DB 0 - JMP RETURN -; -; CHECKS FOR S OPTION IN COMMAND LINE AND EXTRACTS FILE NAMES INTO TABLE -; -OPTCHK: - XRA A ;TURN OFF FLAGS - STA SYSTEM ;NO SYSTEM FILES - STA FFLAG ;NO FILES FOUND - STA ECOUNT ;NO ENTRIES - STA FNCOUNT ;NO FILE NAMES - LHLD FNTAB ;PT TO TABLE - XCHG ;... IN DE - LXI H,TBUFF+1 ;SCAN THRU TBUFF, BUILDING A FILE NAME TABLE - CALL SBLANK ;SKIP BLANKS -FNLOOP: - PUSH D ;SAVE TABLE PTR - CALL GETFN ;EXTRACT FILE NAME - POP D - PUSH H - LXI H,11 ;PT TO NEXT TABLE ENTRY - DAD D - XCHG - POP H - LDA FNCOUNT ;INCREMENT COUNT - INR A - STA FNCOUNT - MOV A,M ;GET TERMINATING CHAR - INX H ;PT TO NEXT - CPI ',' ;ANOTHER FOLLOWS? - JZ FNLOOP - DCX H ;POINT BACK TO DELIM - CALL SBLANK ;SKIP TO NON-BLANK -OPTCK1: - MOV A,M ;GET OPTION - CALL DELCHK ;DONE IF DELIM - RZ - CPI 'S' ;SYSTEM? - JZ OPTCKS - CALL PRINT - DB CR,LF,'Invalid Option -- ',0 - MOV A,M - CALL COUT - JMP HCK1 -OPTCKS: - MVI A,0FFH ;SET FLAG - STA SYSTEM - INX H - JMP OPTCK1 -GETFN: - PUSH D ;FILL TARGET FCB - MVI B,11 ;11 BYTES - MVI A,' ' ;SPACE FILL -GETFN0: - STAX D ;PUT SPACE - INX D - DCR B - JNZ GETFN0 - POP D ;PT TO ENTRY AGAIN - CALL SCANCOL ;SCAN FOR COLON - MVI B,8 ;8 CHARS MAX - CALL GETFN1 ;GET AND FILL ENTRY - MOV A,M ;GET CHAR - CPI '.' ;DELIM? - RNZ ;DONE - INX H ;PT TO AFTER PERIOD - MVI B,3 ;3 CHARS MAX AND DO IT AGAIN -GETFN1: - MOV A,M ;GET CHAR - CPI '.' ;END OF FIELD? - JZ GETFN3 - CALL DELCHK ;CHECK DELIMITER - RZ - CPI '*' ;WILD? - JZ GETFNQ - STAX D ;STORE CHAR - INX H ;PT TO NEXT - INX D - DCR B ;COUNT DOWN - JNZ GETFN1 -GETFN2: - MOV A,M ;FLUSH CHARS TO DELIM - CALL DELCHK ;CHECK FOR DELIMITER - RZ - INX H ;PT TO NEXT - JMP GETFN2 -GETFN3: - INX D ;PT TO AFTER FIELD - DCR B ;COUNT DOWN - JNZ GETFN3 - RET -GETFNQ: - MVI A,'?' ;FILL WITH QUESTION MARKS - STAX D - INX D - DCR B - JNZ GETFNQ - JMP GETFN2 ;SKIP TO DELIM -DELCHK: - ORA A ;END OF LINE? - RZ - CPI '.' ;END OF FIELD? - RZ - CPI ',' ;END OF ENTRY? - RZ - CPI ' ' - RET -SBLANK: - MOV A,M ;SKIP TO NON-BLANK - CPI ' ' - RNZ - INX H - JMP SBLANK -SCANCOL: - PUSH D ;SAVE TABLE PTR - PUSH H ;SAVE PTR -SCOL1: - MOV A,M ;GET CHAR - INX H ;PT TO NEXT - CPI ':' ;COLON? - JZ SCOLX - CALL DELCHK ;CHECK FOR DELIMITER - JNZ SCOL1 -SCOL2: - POP H ;RESTORE - POP D - RET -SCOLX: - XCHG ;DE PTS TO AFTER COLON - POP H ;GET OLD PTR - XCHG ;REPLACE IT - POP D ;GET TABLE PTR - RET -; -; LOOK THROUGH DIRECTORY -; -FIND: - XRA A ;SELECT FIRST DISK - STA FCB - CALL NXTDISK ;GET INFO THE FIRST TIME -FIND1: - RZ ;ABORT IF ERROR -FIND2: - CALL NXTSEC ;GET A DIRECTORY SECTOR - JZ FIND3 ;RETURNS ZERO FLAG IF NO MORE - CALL CHKENT ;CHECK IT OUT - JMP FIND2 ;KEEP IT UP TILL DONE -FIND3: - CALL DIRALPHA ;SORT ENTRIES - CALL PRFILES ;PRINT SORTED ENTRIES - LDA FCB ;NEXT DISK - INR A - STA FCB - CALL NXTDISK ;SELECT NEXT DISK - JMP FIND1 - -; -; SIGN OFF -; -BYE: - MVI C,13 ;RESET SYSTEM - CALL BDOS - LDA FFLAG ;GET FILE FOUND FLAG - ORA A ;NO FILES FOUND? - JNZ RETURN - CALL PRINT - DB CR,LF,'NO Files Found',0 - JMP RETURN -; -; CHECKS THE CURRENT 4 DIRECTORY ENTRIES AGAINST ARGUMENT -; IF MATCH, REWRITES SECTOR WITH REACTIVATED 1ST BYTES -; -CHKENT: - MVI B,4 ;NUMBER OF ENTRIES PER SECTOR - LXI H,TBUFF ;BEGINNING OF BUFFER -CKLUP: - PUSH B - MOV A,M - CPI 0E5H ;CHECK FOR UNUSED - JZ CKINC - XRA A ;A=0 - STA CLPFLG ;SET FLAG FOR NO ENTRIES FOUND - LDA FNCOUNT ;GET NUMBER OF FILE NAMES TO LOOK THRU - MOV B,A ;... IN B - PUSH H - LHLD FNTAB ;PT TO TABLE - XCHG ;... IN DE - POP H -CKLUP1: - PUSH B ;SAVE COUNT - PUSH H ;SAVE BEGINNING ADDRESS - PUSH D - CALL COMPAR ;COMPARE WITH ARGUMENT AND SAVE IF MATCH - POP D - LXI H,11 ;PT TO NEXT ENTRY - DAD D - XCHG - POP H - POP B - DCR B ;COUNT DOWN - JNZ CKLUP1 -CKINC: - POP B - LXI D,32 ;LENGTH OF ENTRY - DAD D - DCR B - JNZ CKLUP - LHLD DIRMAX - DCX H ;REDUCE SECTORS LEFT - SHLD DIRMAX - LHLD SECTOR ;POINT TO NEXT SECTOR - INX H - SHLD SECTOR - XCHG - LHLD MAXSEC ;REACHED LIMIT? - INX H ;ONE MORE - MOV A,H ;CHECK HIGH - CMP D - RNZ - MOV A,L ;CHECK LOW - CMP E - RNZ - LHLD TRACK ;NEXT TRACK - INX H - SHLD TRACK - LXI H,1 ;FIRST SECTOR OF NEXT TRACK - SHLD SECTOR - RET -; -; COMPARE 11 BYTES OF DIRECTORY ENTRY AGAINST ARGUMENT; RNZ IF NOT MATCHED -; DE PTS TO TABLE ENTRY TO COMPARE TO -; -COMPAR: - LDA CLPFLG ;GET FOUND FLAG - ORA A ;0=NO - RNZ - SHLD TEMP ;Hold pointer in case of match - INX H - XCHG - MVI B,11 -CMPR1: - LDAX D ;GET DIRECTORY ENTRY CHARACTER - ANI 7FH ;STRIP ANY FLAGS - CMP M - JZ CMPR2 - MOV A,M - CPI '?' - RNZ -CMPR2: - INX D - INX H ;BUMP TO NEXT CHARACTER - DCR B - JNZ CMPR1 ;LOOP FOR 11 CHARACTERS - PUSH D ;SAVE ENTRY PTR - LDAX D ;GET EXTENT IN B - MOV B,A - LDA EXTENT ;GET EXTENT MASK - CMP B - POP D ;GET ENTRY PTR - JC CMPR4 ;NO MATCH - LDA SYSTEM ;INCLUDE SYSTEM FILES? - ORA A ;0=NO - JNZ CMPR3 - DCX D ;BACK UP 2 BYTES - DCX D - LDAX D ;GET T2 - ANI 80H ;CHECK FOR SYS - RNZ -CMPR3: - LHLD TEMP ;CHECK FOR USER LIMIT - MVI A,31 ;MAX USER - CMP M ;BEYOND MAX? - JC CMPR4 - LHLD FCOUNT ;INCREMENT COUNT - INX H - SHLD FCOUNT - LHLD DSTART ;GET PTR TO NEXT ENTRY - XCHG - LHLD TEMP - MVI B,ESIZE ;COPY ENTRY - CALL MOVE - XCHG - SHLD DSTART ;PTR TO NEXT ENTRY - XCHG - LHLD BDOS+1 ;CHECK FOR MEMORY OVERFLOW - MOV A,H - SUI 10 ;BELOW CCP - CMP D ;PT BEYOND LIMIT? - JC MOVFL - MVI A,0FFH ;SET FOUND FLAG - STA FFLAG - XRA A - RET ;RETURNS 'ZERO' FLAG SET FOR MATCH -CMPR4: - MVI A,0FFH ;NO MATCH - ORA A - RET -MOVFL: - CALL PRINT - DB CR,LF,'ABORT -- Not Enough Memory for Buffers',0 - JMP RETURN -; -; ADVANCE TO NEXT DISK -; -NXTDISK: - LXI B,TBUFF ;SET DMA ADDRESS - CALL SETDMA - LDA FCB - MOV C,A - MVI B,0 - CALL SELDSK ;MAKE SURE DRIVE IS - MOV A,H ; SELECTED - ORA L - RZ ;ERROR RETURN - SHLD DPH ;SAVE THE ADDRESS - LXI D,10 ;PT TO DPB - DAD D - MOV E,M ;GET DPB ADDRESS IN HL - INX H - MOV D,M - XCHG - MOV E,M ;NUMBER OF SECTORS/TRACK - INX H ;AS 2-BYTE QUANTITY IN DE - MOV D,M - INX H - XCHG - SHLD MAXSEC ;SET MAX SECTORS/TRACK - XCHG - INX H - INX H - MOV A,M ;GET EXM - STA EXTENT - INX H ;PT TO DRM - INX H - INX H - MOV E,M ;GET NUMBER OF - INX H ; DIRECTORY ENTRIES - MOV D,M - XCHG - INX H ;ACCOUNT FOR - 1 - SHLD DSTART ;SAVE NUMBER OF DIRECTORY ENTRIES - CALL SHFHL2 ;SHIFT 'HL' RIGHT 2 - SHLD DIRMAX ;SAVE NUMBER DIRECTORY SECTORS - LXI H,5 ;NOW POINT TO SYSTEM - DAD D ; TRACK OFFSET - MOV A,M ;PICK UP NUMBER OF - INX H - MOV H,M - MOV L,A - SHLD TRACK - LXI H,1 ;SET SECTOR - SHLD SECTOR - LDA ECOUNT ;LAST NEW LINE? - ANI 3 - CNZ CRLF - CALL PRINT - DB 'Disk ',0 - LDA FCB - ADI 'A' - CALL COUT - CALL PRINT - DB ' --',CR,LF,0 - LHLD SCRATCH ;PT TO SCRATCH AREA - SHLD ORDER ;ADDRESS OF ORDER TABLE - XCHG - LHLD DSTART ;GET NUMBER OF DIRECTORY ENTRIES - DAD H ;DOUBLE FOR NUMBER OF BYTES IN ORDER TABLE - DAD D ;PT TO FIRST BYTE OF DIRBUF - SHLD DIRBUF ;SET PTR - SHLD DSTART ;SET LOOP PTR - LXI H,0 ;SET FILE COUNT - SHLD FCOUNT - XRA A ;SET COUNT - STA ECOUNT - CMA ;FLIP - ORA A ;OK TO CONTINUE - RET -; -; GET BIOS JUMPS VECTORS FOR EASY REFERENCE -; -GTBIOS: - LHLD BOOT+1 ;POINTS TO BIOS JUMP TABLE+3 - LXI D,WBOOT ;WHERE WE WILL KEEP A COPY - MVI B,16*3 ;MOVE 48 BYTES AND FALL THRU TO MOVE -; -; GENERAL PURPOSE MOVE ROUTINE -; FROM 'HL' TO 'DE' FOR COUNT OF 8 -; -MOVE: - MOV A,M ;GET A BYTE - STAX D ;PUT A BYTE - INX D ;INCREMENT TO NEXT - INX H - DCR B ;COUNT DOWN - JNZ MOVE - RET -; -; READS NEXT SECTOR (GROUP OF FOUR DIRECTORY ENTRIES) -; RETURNS WITH ZERO FLAG SET IF NO MORE -; -NXTSEC: - LHLD DIRMAX ;SEE IF MORE SECTORS - MOV A,H - ORA L - RZ ;RETURNS ZERO FLAG IF NO MORE - LHLD TRACK ;SET TRACK - MOV B,H - MOV C,L - CALL SETTRK - LHLD SECTOR ;SET SECTOR - MOV B,H - MOV C,L - CALL TRNSLT - CALL SETSEC - CALL READ ;READ A SECTOR - ANI 1 ;REVERSE SENSE OF ERROR FLAG - XRI 1 ;RETURNS WITH ZERO FLAG SET - RET ;IF BAD READ -; -; PRINT FILES IN DIRBUF -; -PRFILES: - LHLD FCOUNT ;GET COUNT - MOV A,H ;ANY? - ORA L - RZ - MOV B,H ;COUNT IN BC - MOV C,L - LHLD DIRBUF ;PT TO FIRST ONE -PRFLOOP: - PUSH B ;SAVE COUNT - PUSH H ;SAVE PTR - CALL PRINTFCB ;PRINT FCB - POP H ;GET REGS BACK - POP B - LXI D,ESIZE ;PT TO NEXT - DAD D - DCX B ;COUNT DOWN - MOV A,B - ORA C - JNZ PRFLOOP - MVI A,0FFH ;SET OK - ORA A - RET -; -; FCB PRINTING ROUTINE -; -PRINTFCB: - CALL PRINT ;2 SPACES - DB ' ',0 - MOV A,M ;GET USER NUMBER - CALL PADC ;PRINT IT - MVI A,':' - CALL COUT - INX H -PR0: - MVI B,8 - CALL PR1 - MVI A,'.' - CALL COUT - MVI B,3 - CALL PR1 - LDA ECOUNT ;INCREMENT COUNT - INR A - STA ECOUNT - ANI 3 ;EVERY 4 - CZ CRLF ;NEW LINE - RET -PR1: - MOV A,M - ANI 7FH - CALL COUT - INX H - DCR B - JNZ PR1 - RET -; -; SHIFT REGS 'HL' RIGHT 2 BITS LOGICAL -; -SHFHL2: - CALL SHFHL ;ROTATE RIGHT 1 BIT AND FALL THRU -SHFHL: - XRA A ;CLEAR CARRY - MOV A,H - RAR ;SHIFTED BIT IN CARRY - MOV H,A - MOV A,L - RAR - MOV L,A - RET -; -; TRANSLATE REG 'BC' FROM LOGICAL TO PHYSICAL SECTOR NUMBER -; -TRNSLT: - LHLD DPH ;GET PTR TO DPH - MOV E,M ;GET ADDRESS OF XLT - INX H - MOV D,M - CALL SECTRAN ;USE BIOS ROUTINE - MOV C,L ;RETURN VALUE IN BC - MOV B,H - RET - -; -; DIRALPHA -- ALPHABETIZES DIRECTORY PTED TO BY HL; BC CONTAINS -; THE NUMBER OF FILES IN THE DIRECTORY -; -DIRALPHA: - LHLD FCOUNT ; GET FILE COUNT - MOV A,H ; ANY FILES? - ORA L - RZ - SHLD N ; SET "N" - MOV B,H ; BC=COUNT - MOV C,L - LHLD DIRBUF ; PT TO DIRECTORY -; -; SHELL SORT -- -; THIS SORT ROUTINE IS ADAPTED FROM "SOFTWARE TOOLS" -; BY KERNIGAN AND PLAUGHER, PAGE 106. COPYRIGHT, 1976, ADDISON-WESLEY. -; ON ENTRY, BC=NUMBER OF ENTRIES AND HL=ADDRESS OF FIRST ENTRY -; -SORT: - XCHG ; POINTER TO DIRECTORY IN DE - LHLD ORDER ; PT TO ORDER TABLE -; -; SET UP ORDER TABLE; HL PTS TO NEXT ENTRY IN ORDER TABLE, DE PTS TO NEXT -; ENTRY IN DIRECTORY, BC = NUMBER OF ELEMENTS REMAINING -; -SORT1: - MOV M,E ; STORE LOW-ORDER ADDRESS - INX H ; PT TO NEXT ORDER BYTE - MOV M,D ; STORE HIGH-ORDER ADDRESS - INX H ; PT TO NEXT ORDER ENTRY - PUSH H ; SAVE PTR - LXI H,ESIZE ; HL=NUMBER OF BYTES/ENTRY - DAD D ; PT TO NEXT DIR1 ENTRY - XCHG ; DE PTS TO NEXT ENTRY - POP H ; GET PTR TO ORDER TABLE - DCX B ; COUNT DOWN - MOV A,B ; DONE? - ORA C - JNZ SORT1 -; -; THIS IS THE MAIN SORT LOOP FOR THE SHELL SORT IN "SOFTWARE TOOLS" BY K&P -; - -; -; SHELL SORT FROM "SOFTWARE TOOLS" BY KERNINGHAN AND PLAUGER -; - LHLD N ; NUMBER OF ITEMS TO SORT - SHLD GAP ; SET INITIAL GAP TO N FOR FIRST DIVISION BY 2 - -; FOR (GAP = N/2; GAP > 0; GAP = GAP/2) -SRTL0: - ORA A ; CLEAR CARRY - LHLD GAP ; GET PREVIOUS GAP - MOV A,H ; ROTATE RIGHT TO DIVIDE BY 2 - RAR - MOV H,A - MOV A,L - RAR - MOV L,A - -; TEST FOR ZERO - ORA H - JZ SDONE ; DONE WITH SORT IF GAP = 0 - - SHLD GAP ; SET VALUE OF GAP - SHLD I ; SET I=GAP FOR FOLLOWING LOOP - -; FOR (I = GAP + 1; I <= N; I = I + 1) -SRTL1: - LHLD I ; ADD 1 TO I - INX H - SHLD I - -; TEST FOR I <= N - XCHG ; I IS IN DE - LHLD N ; GET N - MOV A,L ; COMPARE BY SUBTRACTION - SUB E - MOV A,H - SBB D ; CARRY SET MEANS I > N - JC SRTL0 ; DON'T DO FOR LOOP IF I > N - - LHLD I ; SET J = I INITIALLY FOR FIRST SUBTRACTION OF GAP - SHLD J - -; FOR (J = I - GAP; J > 0; J = J - GAP) -SRTL2: - LHLD GAP ; GET GAP - XCHG ; ... IN DE - LHLD J ; GET J - MOV A,L ; COMPUTE J - GAP - SUB E - MOV L,A - MOV A,H - SBB D - MOV H,A - SHLD J ; J = J - GAP - JC SRTL1 ; IF CARRY FROM SUBTRACTIONS, J < 0 AND ABORT - MOV A,H ; J=0? - ORA L - JZ SRTL1 ; IF ZERO, J=0 AND ABORT - -; SET JG = J + GAP - XCHG ; J IN DE - LHLD GAP ; GET GAP - DAD D ; J + GAP - SHLD JG ; JG = J + GAP - -; IF (V(J) <= V(JG)) - CALL ICOMPARE ; J IN DE, JG IN HL - -; ... THEN BREAK - JC SRTL1 - -; ... ELSE EXCHANGE - LHLD J ; SWAP J, JG - XCHG - LHLD JG - CALL ISWAP ; J IN DE, JG IN HL - -; END OF INNER-MOST FOR LOOP - JMP SRTL2 - -; -; SORT IS DONE -- RESTRUCTURE DIR1 IN SORTED ORDER IN PLACE -; -SDONE: - LHLD N ; NUMBER OF ENTRIES - MOV B,H ; ... IN BC - MOV C,L - LHLD ORDER ; PTR TO ORDERED POINTER TABLE - SHLD PTPTR ; SET PTR PTR - LHLD DIRBUF ; PTR TO UNORDERED DIRECTORY - SHLD PTDIR ; SET PTR DIR BUFFER - -; FIND PTR TO NEXT DIR1 ENTRY -SRTDN: - LHLD PTPTR ; PT TO REMAINING POINTERS - XCHG ; ... IN DE - LHLD PTDIR ; HL PTS TO NEXT DIR ENTRY - PUSH B ; SAVE COUNT OF REMAINING ENTRIES - -; FIND PTR TABLE ENTRY -SRTDN1: - LDAX D ; GET CURRENT POINTER TABLE ENTRY VALUE - INX D ; PT TO HIGH-ORDER POINTER BYTE - CMP L ; COMPARE AGAINST DIR1 ADDRESS LOW - JNZ SRTDN2 ; NOT FOUND YET - LDAX D ; LOW-ORDER BYTES MATCH -- GET HIGH-ORDER POINTER BYTE - CMP H ; COMPARE AGAINST DIR1 ADDRESS HIGH - JZ SRTDN3 ; MATCH FOUND -SRTDN2: - INX D ; PT TO NEXT PTR TABLE ENTRY - DCX B ; COUNT DOWN - MOV A,C ; END OF TABLE? - ORA B - JNZ SRTDN1 ; CONTINUE IF NOT - -; FATAL ERROR -- INTERNAL ERROR; POINTER TABLE NOT CONSISTENT -FERR$PTR: - CALL PRINT - DB 0DH,0AH,'DIRALPHA -- Pointer Error',0 - JMP RETURN - -; FOUND THE POINTER TABLE ENTRY WHICH POINTS TO THE NEXT UNORDERED DIR1 ENTRY -; MAKE BOTH POINTERS (PTR TO NEXT, PTR TO CURRENT UNORDERED DIR1 ENTRY) -; POINT TO SAME LOCATION (PTR TO NEXT DIR1 ENTRY TO BE ORDERED) -SRTDN3: - LHLD PTPTR ; GET PTR TO NEXT ORDERED ENTRY - DCX D ; DE PTS TO LOW-ORDER POINTER ADDRESS - MOV A,M ; MAKE PTR TO NEXT UNORDERED DIR1 PT TO BUFFER FOR - STAX D ; DIR1 ENTRY TO BE MOVED TO NEXT UNORDERED DIR1 POS - INX H ; PT TO NEXT PTR ADDRESS - INX D - MOV A,M ; MAKE HIGH POINT SIMILARLY - STAX D - -; COPY NEXT UNORDERED DIR1 ENTRY TO HOLD BUFFER - MVI B,ESIZE ; B=NUMBER OF BYTES/ENTRY - LHLD PTDIR ; PT TO ENTRY - LXI D,HOLD ; PT TO HOLD BUFFER - PUSH B ; SAVE B=NUMBER OF BYTES/ENTRY - CALL MOVE - POP B - -; COPY TO-BE-ORDERED DIR1 ENTRY TO NEXT ORDERED DIR1 POSITION - LHLD PTPTR ; POINT TO ITS POINTER - MOV E,M ; GET LOW-ADDRESS POINTER - INX H - MOV D,M ; GET HIGH-ADDRESS POINTER - LHLD PTDIR ; DESTINATION ADDRESS FOR NEXT ORDERED DIR1 ENTRY - XCHG ; HL PTS TO ENTRY TO BE MOVED, DE PTS TO DEST - PUSH B ; SAVE B=NUMBER OF BYTES/ENTRY - CALL MOVE - POP B - XCHG ; HL PTS TO NEXT UNORDERED DIR1 ENTRY - SHLD PTDIR ; SET POINTER FOR NEXT LOOP - -; COPY ENTRY IN HOLD BUFFER TO LOC PREVIOUSLY HELD BY LATEST ORDERED ENTRY - LHLD PTPTR ; GET PTR TO PTR TO THE DESTINATION - MOV E,M ; GET LOW-ADDRESS POINTER - INX H - MOV D,M ; HIGH-ADDRESS POINTER - LXI H,HOLD ; HL PTS TO HOLD BUFFER, DE PTS TO ENTRY DEST - CALL MOVE ; B=NUMBER OF BYTES/ENTRY - -; POINT TO NEXT ENTRY IN POINTER TABLE - LHLD PTPTR ; POINTER TO CURRENT ENTRY - INX H ; SKIP OVER IT - INX H - SHLD PTPTR - -; COUNT DOWN - POP B ; GET COUNTER - DCX B ; COUNT DOWN - MOV A,C ; DONE? - ORA B - JNZ SRTDN - RET ; DONE - -; -; SWAP (Exchange) the pointers in the ORDER table whose indexes are in -; HL and DE -; -ISWAP: - PUSH H ; SAVE HL - LHLD ORDER ; ADDRESS OF ORDER TABLE - 2 - MOV B,H ; ... IN BC - MOV C,L - POP H - DCX H ; ADJUST INDEX TO 0...N-1 FROM 1...N - DAD H ; HL PTS TO OFFSET ADDRESS INDICATED BY INDEX - ; OF ORIGINAL HL (1, 2, ...) - DAD B ; HL NOW PTS TO POINTER INVOLVED - XCHG ; DE NOW PTS TO POINTER INDEXED BY HL - DCX H ; ADJUST INDEX TO 0...N-1 FROM 1...N - DAD H ; HL PTS TO OFFSET ADDRESS INDICATED BY INDEX - ; OF ORIGINAL DE (1, 2, ...) - DAD B ; HL NOW PTS TO POINTER INVOLVED - MOV C,M ; EXCHANGE POINTERS -- GET OLD (DE) - LDAX D ; -- GET OLD (HL) - XCHG ; SWITCH - MOV M,C ; PUT NEW (HL) - STAX D ; PUT NEW (DE) - INX H ; PT TO NEXT BYTE OF POINTER - INX D - MOV C,M ; GET OLD (HL) - LDAX D ; GET OLD (DE) - XCHG ; SWITCH - MOV M,C ; PUT NEW (DE) - STAX D ; PUT NEW (HL) - RET -; -; ICOMPARE compares the entry pointed to by the pointer pointed to by HL -; with that pointed to by DE (1st level indirect addressing); on entry, -; HL and DE contain the numbers of the elements to compare (1, 2, ...); -; on exit, Carry Set means ((DE)) < ((HL)), Zero Set means ((HL)) = ((DE)), -; and Non-Zero and No-Carry means ((DE)) > ((HL)) -; -ICOMPARE: - PUSH H ; SAVE HL - LHLD ORDER ; ADDRESS OF ORDER - 2 - MOV B,H ; ... IN BC - MOV C,L - POP H - DCX H ; ADJUST INDEX TO 0...N-1 FROM 1...N - DAD H ; DOUBLE THE ELEMENT NUMBER TO POINT TO THE PTR - DAD B ; ADD TO THIS THE BASE ADDRESS OF THE PTR TABLE - XCHG ; RESULT IN DE - DCX H ; ADJUST INDEX TO 0...N-1 FROM 1...N - DAD H ; DO THE SAME WITH THE ORIGINAL DE - DAD B - XCHG - -; -; HL NOW POINTS TO THE POINTER WHOSE INDEX WAS IN HL TO BEGIN WITH -; DE NOW POINTS TO THE POINTER WHOSE INDEX WAS IN DE TO BEGIN WITH -; FOR EXAMPLE, IF DE=5 AND HL=4, DE NOW POINTS TO THE 5TH PTR AND HL -; TO THE 4TH POINTER -; - MOV C,M ; BC IS MADE TO POINT TO THE OBJECT INDEXED TO - INX H ; ... BY THE ORIGINAL HL - MOV B,M - XCHG - MOV E,M ; DE IS MADE TO POINT TO THE OBJECT INDEXED TO - INX H ; ... BY THE ORIGINAL DE - MOV D,M - MOV H,B ; SET HL = OBJECT PTED TO INDIRECTLY BY BC - MOV L,C - -; -; COMPARE DIR ENTRY PTED TO BY HL WITH THAT PTED TO BY DE; -; NO NET EFFECT ON HL, DE; RET W/CARRY SET MEANS DE -LF EQU 0AH ; -BEL EQU 'G'-'@' ; ^G -FF EQU 'L'-'@' ; ^L = FORM FEED -CTRLZ EQU 'Z'-'@' ; ^Z -CTRLC EQU 'C'-'@' ; ^C - -; -; HELP Control Characters -; -IHCHAR EQU ';' ; FLAG INDICATING INDEXED BY USER -SECTCHAR EQU ':' ; DEFINED TO BE COLON -BACKUPCHAR EQU 'L' ; BACK UP TO PREVIOUS FRAME CHAR -STRTCHAR EQU 'S' ; JUMP TO START OF INFORMATION CHAR -MENUCHAR EQU 'M' ; CHAR TO ABORT TO MENU -CPMABORTCHAR EQU CTRLC ; CHAR TO EXIT -LRCHAR EQU '^' ; RETURN TO PREVIOUS HELP LEVEL -ROOTCHAR EQU '.' ; RETURN TO ROOT OF HELP -PRCHAR EQU 'P' ; PRINT CURRENT FRAME -CPRCHAR EQU 'P'-'@' ; PRINT CURRENT INFORMATION SECTION - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3vinit ;initialize the ZCPR3 Env and the VLIB Env - jmp startx -; -; DEFAULT FILE NAME -; -HELPDIR: -DEFFN: - DB 'HELP ' ; BOTH HELP FILE AND HELP DIR SAME NAME -DEFTYP: - DB 'HLP' - -; -; Start of Program -; -STARTX: - LXI H,0 ; GET SP - DAD SP - SHLD STACK - CALL CODEND ; DETERMINE FREE MEMORY SPACE - SHLD HLPNSTK ; SET PTR TO HELP NAME STACK - LXI D,200H ; ALLOW 25+ ELEMENT HELP NAME STACK AND LARGE STACK - DAD D - SHLD HLPBUF - SPHL ; SET STACK - - LDA BDOS+2 ; BASE PAGE OF BDOS - SUI 10 ; 2K + 2 PAGES - STA TPAEND - - XRA A ; A=0 - STA HLPLVL ; SET HELP LEVEL TO 0 (NO RETURN FILE) - - LXI D,FCB ; PT TO FCB - CALL Z3LOG ; LOG INTO IT FOR DEFAULT - CALL PUTUD ; SAVE HOME - - LXI H,FCB+1 ; CHECK FOR FILE NAME - MOV A,M - CPI '/' ; OPTION CAUGHT? - JZ STRT0 - CPI ' ' ; NONE? - JNZ STRT1 -; -; INSERT 'HELP.HLP' INTO FCB OR CLEAR FCB -; -STRT0: - LXI D,DEFFN ; PT TO DEFAULT NAME - MVI B,11 ; 11 BYTES - XCHG - CALL MOVE ; MOVE (HL) TO (DE) FOR (B) BYTES - -; -; START/RESTART HELP PROGRAM (START ON INITIAL ENTRY, RESTART ON NODE LOAD) -; -STRT1: - LHLD HLPBUF ; RESET STACK - SPHL -; -; CHECK FOR WILD CARDS IN FILE NAME -- ERROR IF SO -; - LXI H,FCB+1 ; PT TO FIRST BYTE OF FILE NAME - MVI B,11 ; 11 BYTES -FCBWCK: - MOV A,M ; GET BYTE - ANI 7FH ; MASK - CPI '?' ; WILD? - JZ FCBWERR - INX H ; PT TO NEXT - DCR B - JNZ FCBWCK -; -; CHECK FOR FILE TYPE -; - LXI H,FCB+9 ; CHECK FOR FILE TYPE - - IF NOT FORCEHLP - MOV A,M ; CHECK FOR FILE TYPE SPECIFIED - CPI ' ' ; NONE? - JNZ STRT2 - ENDIF -; -; PLACE DEFAULT FILE TYPE OF '.HLP' IN FCB -; - LXI D,DEFTYP ; DEFAULT FILE TYPE - MVI B,3 - XCHG - CALL MOVE ; MOVE (HL) TO (DE) FOR (B) BYTES - -; -; FIND FILE -; -STRT2: -; -; LOOK INTO DIRECTORY PTED TO BY USER (OR CURRENT IF USER DID NOT SPEC ONE) -; - LXI D,FCB ; PT TO FCB -; CALL Z3LOG ; LOG INTO DIRECTORY - CALL INITFCB ; RESET FCB - CALL RETUD ; GET HOME LOCATION - CALL F$EXIST ; IS FILE THERE? - JNZ STRT3 -; -; LOOK ALONG PATH FROM CURRENT DIR (NOT INCLUDING CURRENT) -; - CALL GETUD ; RETURN HOME - LXI D,FCB ; PT TO FCB - MVI A,0 ; DON'T SEARCH CURRENT DIR ALSO - CALL PFIND ; SEARCH FOR FILE - JNZ STRT3 ; FILE FOUND, SO PROCESS -; -; LOOK IN HELP FILE DIRECTORY -; - LXI H,HELPDIR ; LOOK FOR HELP DIRECTORY - CALL DIRTDU ; CONVERT TO DU IN BC - JNZ LOGHLP ; LOG INTO DU IN BC IF FOUND - MVI B,HDISK ; LOG INTO HELP DIRECTORY - MVI C,HUSER -LOGHLP: - CALL LOGUD - LXI D,FCB ; PT TO FCB - CALL F$EXIST ; LOOK FOR FILE - JNZ STRT3 ; FILE FOUND -; -; FILE NOT FOUND -; - CALL EPRINT - DB CR,LF,' File Not Found',0 - JMP HLPEXIT - -; -; FILE CONTAINS WILD CARDS -; -FCBWERR: - CALL EPRINT - DB CR,LF,' AFN Not Allowed',0 - JMP HLPEXIT - -; -; LOAD HELP FILE INFORMATION -; ON INPUT, BC=DIRECTORY -; -STRT3: - CALL LOGUD ; LOG INTO DIRECTORY - LXI D,FCB ; OPEN FILE - CALL F$OPEN - LHLD HLPBUF ; PT TO BUFFER - SHLD NEXTADR ; SET PTR -; -; READ RECORDS UNTIL EOF -; -STRT4: - CALL READ ; READ INFO - JZ STRT4 ; NOT DONE IF ZERO RETURN - LXI D,FCB ; CLOSE FILE - CALL F$CLOSE - CALL GETUD ; RESTORE CURRENT DISK AND USER IF CHANGED - -; -; START OF HELP PROGRAM -; -HELP: - LHLD HLPBUF ; PT TO BUFFER - SPHL ; SET STACK - MVI A,0 ; SET NO FRAME - STA FRNUM - MOV A,M ; NO HEADER SECTION? - ANI 7FH ; MASK OUT MSB - CPI SECTCHAR - JNZ HELP1 ; HEADER SECTION EXISTS - CALL CLS ; NEW SCREEN - CALL PRINFO ; PRINT HELP INFO PTED TO BY HL - LDA HLPLVL ; CHECK TO SEE IF WE ARE NOT AT LEVEL 0 - ORA A ; 0=LEVEL 0 - JZ HLPEXIT ; ABORT IF SO - JMP LRURN ; GO TO PREVIOUS LEVEL IF NOT - -; -; EXIT POINT FOR ANY EXIT FROM THE REST OF THE HELP PROGRAM -; -HLPEXIT: - CALL GETUD ; RESET CALLING DISK/USER NUMBER - LHLD STACK ; GET CP/M SP - SPHL - RET ; DONE - -; -; PRINT HEADER INFORMATION AND SELECT AN OPTION -; -HELP1: - CALL PRHEADER ; PRINT HEADER - PUSH B ; SAVE C (NUMBER OF VALID SELECTIONS) - CALL CRLF1 ; NEW LINE - CALL STNDOUT ; GOTO DIM - CALL PRLEVEL ; PRINT LEVEL NUMBER - CALL EPRINT - DB 'Enter Selection ',0 - CALL PRP1 ; PRINT LEVEL MOVEMENT PROMPT - CALL STNDEND ; GOTO BRIGHT - POP B ; GET C - CALL CIN ; GET RESPONSE - CALL CAPS ; CAPITALIZE - PUSH PSW - CALL CLS ; CLEAR SCREEN - POP PSW - CPI CTRLC ; EXIT - JZ HLPEXIT - CPI ROOTCHAR ; GO TO ROOT - JZ GOROOT - CPI LRCHAR ; RETURN TO PREVIOUS LEVEL - JZ LRURN - MOV B,A ; USER INPUT IN B - LDA HTYPE ; TYPE OF HELP FILE - CPI IHCHAR ; INDEXED BY USER? - JZ HELP5 ; FIND INFORMATION SECTION VIA INDEX SCAN - MOV A,B ; FIND INFORMATION SECITON VIA COUNT - SUI 'A'-1 ; ADJUST FOR COUNT - MOV B,A ; SAVE COUNT - JZ BADRESPONSE - JNC HELP2 -; -; INVALID RESPONSE -; -BADRESPONSE: - CALL SAK ; RING BELL - JMP HELP1 - -; -; VALID RESPONSE -- LOOK FOR AND PRINT INFORMATION SECTION -; -HELP2: - INR C ; 1 MORE THAN NUMBER OF POSSIBLE SELECTIONS - CMP C ; GREATER THAN NUMBER OF POSSIBLE SELECTIONS? - JNC BADRESPONSE - LHLD FIRSTENTRY ; GET PTR TO FIRST ENTRY - -; -; PRINT INFORMATION WHEN COUNT IS ZERO -; -HELP3: - DCR B ; COUNT DOWN SELECTIONS - JNZ HELP4 - CALL PRINFO ; PRINT INFO PTED TO BY HL - JMP HELP1 -; -; LOCATE NEXT INFORMATION SECTION -; -HELP4: - CALL FINDI ; SKIP TO NEXT INFORMATION SECTION - CPI CTRLZ ; END OF FILE? - JNZ HELP3 ; CONTINUE LOOPING IF NOT ELSE FALL THRU TO HELPERR -; -; ERROR -- REACHED END OF HELP FILE -; -HELPERR: - CALL EPRINT - DB CR,LF,' EOF on Help File',0 - JMP HELP1 - -; -; LOCATE NEXT INFORMATION SECTION VIA INDEX SCAN -; -HELP5: - LHLD FIRSTENTRY ; PT TO FIRST ENTRY -; -; LOOK FOR USER INDEX -; -HELP6: - PUSH H ; SAVE PTR TO THIS LINE -HELP7: - INX H ; SKIP OVER SECTION CHAR - MOV A,M ; GET CHAR - ANI 7FH ; MASK OUT MSB - CALL CAPS ; CAPITALIZE - CPI ' ' ; SKIP SPACES - JZ HELP7 - CPI SECTCHAR ; NEW SECTION? - JZ HELP8 ; FIND NEXT SECTION - CPI CR ; END OF LINE? - JZ HELP8 ; FIND NEXT SECTION - CPI CTRLZ ; EOF? - JZ HELP8 - CMP B ; CHECK FOR USER INPUT - JNZ HELP7 - POP H ; FOUND IT -- PRINT IT - INX H ; SKIP OVER SECTION CHAR -HELP7A: - MOV A,M ; SKIP TO BEGINNING FOR 1ST LINE - INX H ; PT TO NEXT - ANI 7FH - CPI CTRLZ ; TRAP EOF - JZ BADRESPONSE - CPI SECTCHAR ; FILE SPECIFIED? - JZ HELP7B ; PROCESS IT - CPI LF ; BEGIN NEW LINE - JZ HELP7C - CPI CR ; AT END OF INDEX LINE? - JNZ HELP7A - MOV A,M ; GET LF - ANI 7FH - CPI LF ; SKIP FOLLOWING LF IF ANY - JNZ HELP7C - INX H ; SKIP LF - JMP HELP7C -; -; LOAD NEXT HELP LEVEL -; -HELP7B: - DCX H ; PT TO SECTION CHAR - DCX H ; PT TO BEFORE SECTION CHAR FOR PRINFO -; -; PROCESS HELP LEVEL OR LOAD AND PROCESS NEXT LEVEL PTED TO BY HL -; -HELP7C: - CALL PRINFO ; PRINT INFORMATION SECTION - JMP HELP1 ; RESUME -HELP8: - POP H ; PT TO INFO SECTION - CALL FINDI ; FIND NEXT INFO SECTION - CPI CTRLZ ; EOF? - JNZ HELP6 ; KEEP LOOKING - JMP BADRESPONSE - -; -; SKIP TO NEXT INFORMATION SECTIONS -; RETURN WITH A=SECTCHAR IF FOUND OR A=^Z IF NOT -; -FINDI: - MOV A,M ; ? - ANI 7FH ; MASK OUT MSB - INX H ; PT TO NEXT BYTE - CPI CTRLZ - RZ - CPI LF ; LINE FEED? - JZ FINDI1 - CPI CR ; ? - JNZ FINDI - MOV A,M ; MAKE SURE LF - ANI 7FH - CPI LF - JNZ FINDI1 - INX H ; SKIP OVER LF -FINDI1: - MOV A,M ; GET CHAR - ANI 7FH ; MASK OUT MSB - CPI SECTCHAR ; NEW SECTION? - JNZ FINDI ; CONTINUE LOOPING - RET - -; -; HELP SUPPORT ROUTINE SECTION -; - -; -; PRINT ERROR MSG PTED TO BY DE; ENDS IN 0 -; -PRMSG: - XCHG ; MSG PTED TO BY HL - CALL EPSTR - XCHG - RET - -; -; MOVE BYTES PTED TO BY HL TO AREA PTED TO BY DE; B BYTES TO MOVE -; -MOVE: - MOV A,M ; GET BYTE - ANI 7FH ; MASK OFF MSB -- IN CASE A WS FILE - STAX D ; PUT BYTE - INX H ; PT TO NEXT - INX D - DCR B - JNZ MOVE - RET - -; -; READ RECORD FROM DISK; NEXTADR CONTAINS ADDRESS TO READ TO -; ON RETURN, BDOS ERROR CODE IS IN A (0=NO ERROR) -; -READ: - LXI D,FCB ; PT TO FCB - CALL F$READ ; READ NEXT RECORD - PUSH PSW ; SAVE RETURN CODE - LHLD NEXTADR ; PT TO LOAD ADDRESS - LDA TPAEND ; CHECK AGAINST END PAGE OF TPA - CMP H ; IF AT SAME PAGE, YES - JZ READERROR - LXI D,BUFF ; PT TO BUFFER TO LOAD FROM - MVI B,128 ; NUMBER OF BYTES TO MOVE - XCHG - CALL MOVE - XCHG - MVI M,CTRLZ ; STORE ENDING CTRLZ IN CASE OF EOF - POP PSW ; GET RETURN CODE - ORA A ; DONE? <>0 IF SO -; -; READ DONE -- SAVE PTR TO NEXT BLOCK -; - SHLD NEXTADR ; SET NEXT ADDRESS - RET - -READERROR: - CALL EPRINT - DB CR,LF,' Mem Full',0 - JMP HLPEXIT - -; -; PRINT ONE LINE OF INFO SECTION; HL PTS TO LINE UPON ENTRY; -; HL PTS TO FIRST CHAR OF NEXT LINE UPON EXIT -; -PRLINE: - MOV A,M ; GET CHAR - ANI 7FH ; MASK OUT MSB - CPI CR ; EOL? - JZ CRLF - CPI LF ; LINE FEED? (WS FILE) - JZ CRLF0 - CPI CTRLZ ; END OF FILE? - JZ CRLFC ; DONE IF SO - INX H ; PT TO NEXT - CPI DIM ; GOTO STANDOUT MODE? - JZ PRLDIM - CPI NOTDIM ; GOTO NORMAL MODE? - JZ PRLNDIM - CALL COUT ; PRINT CHAR - JMP PRLINE -PRLDIM: - CALL STNDOUT ; ENTER STANDOUT MODE - JMP PRLINE -PRLNDIM: - CALL STNDEND ; END STANDOUT MODE - JMP PRLINE -; -; PRINT CRLF, PT TO FIRST CHAR OF NEXT LINE, AND PAGE IF NECESSARY -; -CRLF: - INX H ; PT TO LF -CRLF0: - INX H ; PT TO 1ST CHAR OF NEXT LINE -CRLFC: - CALL CRLF1 ; PRINT CRLF - LDA LCOUNT ; GET LINE COUNT - DCR A - STA LCOUNT - RNZ ; OK -- CONTINUE - MOV A,M ; SET MSB OF FIRST CHAR OF NEXT LINE - ORI 80H - MOV M,A ; MSB IS SET FOR LATER BACKUP - CALL PRPROMPT ; PRINT PROMPT AND PROCESS COMMON OPTIONS - CPI BACKUPCHAR ; BACK UP? - JZ FBACKUP - CPI STRTCHAR ; JUMP TO START OF INFO - JZ INFOSTRT -FRESUME: - SHLD STRTFRAME - JMP SETLCOUNT -; -; PRINT PROMPT AND PROCESS COMMON OPTIONS -; -PRPROMPT: - CALL STNDOUT ; GOTO DIM - CALL PRLEVEL ; PRINT LEVEL NUMBER - LDA FRNUM ; INCREMENT FRAME NUMBER - INR A - STA FRNUM - CALL PRP1 ; PRINT FUNDAMENTAL LEVEL DATA PROMPT - CALL EPRINT - DB MENUCHAR,'=Menu ' ; ABORT TO MENU CHAR - DB STRTCHAR,'=Start ' ; JUMP TO START OF INFORMATION CHAR - DB BACKUPCHAR,'=Last ' ; BACK UP TO PREVIOUS FRAME CHAR - DB PRCHAR,'=Print ' ; PRINT CURRENT FRAME - DB 0 - CALL STNDEND ; GOTO BRIGHT - CALL CIN ; GET RESPONSE - CALL CAPS - PUSH PSW - CALL CLS ; CLEAR SCREEN - POP PSW - POP D ; CLEAR STACK - CPI MENUCHAR ; ABORT? - JZ HELP ; START OVER IF SO - CPI CPMABORTCHAR ; ABORT TO OS - JZ HLPEXIT - CPI PRCHAR ; PRINT FRAME? - JZ LIST0INFO - CPI CPRCHAR ; PRINT INFORMATION SECTION? - JZ LIST1INFO - CPI ROOTCHAR ; GO TO ROOT - JZ GOROOT - CPI LRCHAR ; RETURN TO HIGHER LEVEL - JZ LRURN - PUSH D ; RESTORE STACK - RET - -; -; PRINT FUNDAMENTAL LEVEL PROMPT -; -PRP1: - LDA HLPLVL ; DON'T PRINT IF AT LEVEL 0 - ORA A - RZ - CALL EPRINT - DB LRCHAR,'=Level ' ; RETURN TO HIGHER NODE - DB ROOTCHAR,'=Root ' ; RETURN TO ROOT - DB 0 - RET - -; -; JUMP TO START OF INFORMATION -; -INFOSTRT: - LHLD STRTINFO ; PT TO START OF INFO - MVI A,1 ; RESET FRAME COUNT - STA FRNUM - JMP FRESUME ; CONTINUE PROCESSING - -; -; BACK UP TO PREVIOUS FRAME -; -FBACKUP: - CALL BOICHECK ; AT BEGINNING OF INFORMATION? - JZ INFOSTRT -FB1: - DCX H ; BACK UP UNTIL BYTE WITH MSB SET IS FOUND - MOV A,M ; GET BYTE - ANI 80H - JZ FB1 - LDA FRNUM ; DECREMENT FRAME NUMBER - DCR A ; BACK UP TO CURRENT FRAME NUMBER - DCR A ; BACK UP TO PREVIOUS FRAME NUMBER - STA FRNUM - JMP FRESUME ; CONTINUE PROCESSING -; -; PRINT CR AND LF ONLY -; -CRLF1: - MVI A,CR ; PRINT CR - CALL COUT - MVI A,LF ; PRINT LF - JMP COUT - -; -; SET LCOUNT VARIABLE TO SCREEN SIZE -; -SETLCOUNT: - PUSH H ; SAVE HL - CALL GETCRT ; GET CRT DATA - INX H ; PT TO LINE COUNT - MOV A,M ; GET LINE COUNT - POP H ; RESTORE HL - DCR A ; 1 LESS FOR PROMPT - STA LCOUNT - RET - -; -; PRINT THE HEADER SECTION AND LOAD FIRSTENTRY PTR -; ON RETURN, C=NUMBER OF POSSIBLE SELECTIONS -; -PRHEADER: - MVI A,0 ; SET NO FRAME - STA FRNUM - CALL SETLCOUNT - LDA LCOUNT - SUI 3 ; -3 lines for top and bottom - STA LCOUNT - MVI A,'A' ; INIT SELECTION CHAR - STA SELCHAR - CALL CLS ; CLEAR SCREEN - CALL EPRINT - DB 'HELP ' - db (vers/10)+'0','.',(vers mod 10)+'0' - DB ' ',0 - LXI D,FCB+1 ; PT TO FCB - CALL PFN2 ; PRINT WITH NO SPACES - CALL EPRINT - db ' Index',CR,LF,CR,LF,0 - MVI C,0 ; COUNT NUMBER OF SELECTIONS - LHLD HLPBUF ; PT TO BUFFER - MOV A,M ; GET FIRST CHAR - STA HTYPE ; SET TYPE OF HELP FILE - CPI IHCHAR ; INDEXED HELP TYPE? - JNZ PH1 - INX H ; SKIP OVER INDEX HELP TYPE FLAG -; -; PRINT LINE UNTIL FIRST INFORMATION SECTION FOUND -; -PH1: - MOV A,M ; GET CHAR - ANI 7FH ; MASK OUT MSB - CPI SECTCHAR - JZ PH2 - CPI CTRLZ ; EOF? -- ABORT - JZ HLPEXIT - INR C ; INCREMENT SELECTION COUNT - LDA HTYPE ; CHECK FOR INDEX - CPI IHCHAR - JZ PH1A ; SKIP LETTERS IF INDEXED - LDA SELCHAR ; DISPLAY SELECTION CHAR - CALL COUT - INR A ; INCR CHAR - STA SELCHAR - CALL EPRINT - DB '. ',0 -PH1A: - CALL PRLINE ; PRINT HEADER LINE - JMP PH1 -; -; SAVE PTR TO FIRST ENTRY -; -PH2: - SHLD FIRSTENTRY - LDA LCOUNT ; GET COUNT OF REMAINING LINES - MOV B,A ; ... IN B - ORA A ; ANY LEFT? - RZ -PH3: - CALL CRLF1 ; NEW LINE - DCR B - JNZ PH3 - RET - -; -; PRINT AN INFORMATION SECTION -; INFORMATION SECTION IS PTED TO BY HL -; -PRINFO: - SHLD STRTINFO ; SET START OF INFORMATION POINTER - CALL LDNOD ; LOAD NEW NODE IF DUAL SECTCHAR - SHLD STRTFRAME ; SET FRAME POINTER - MOV A,M ; SET MSB - ORI 80H - MOV M,A - CALL SETLCOUNT - MVI A,1 ; A=1 - STA FRNUM ; SET FRAME NUMBER -PI1: - CALL PRLINE ; PRINT LINE FROM INFO FILE - MOV A,M ; DONE? - ANI 7FH ; MASK OUT MSB - CPI CTRLZ ; EOF? - JZ PI2 - CPI SECTCHAR ; NEXT SECTION - JZ PI2 - CPI FF ; FORM FEED? - JNZ PI1 - INX H ; PT TO CHAR AFTER FORM FEED - CALL FORMFEED ; FEED SCREEN - JMP PI1 -; -; FORM FEED SCREEN -; -FORMFEED: - LDA LCOUNT ; GET LINE COUNT - MOV B,A ; ... IN B -FEEDLOOP: - PUSH B ; SAVE B - CALL CRLFC ; NEW LINE - POP B ; GET B - DCR B - JNZ FEEDLOOP - RET - -; -; END OF INFO -; -PI2: - MOV A,M ; SET MSB OF NEXT BYTE - ORI 80H - MOV M,A -PI2A: - CALL CRLF1 ; NEW LINE - LDA LCOUNT ; COUNT DOWN - DCR A - STA LCOUNT - JNZ PI2A -PI2MSG: - CALL EPRINT ; PRINT END OF INFORMATION INDICATOR - DB 'EOI ',0 - CALL PRPROMPT ; PRINT PROMPT AND PROCESS COMMON OPTIONS - CPI BACKUPCHAR ; BACK UP FROM EOI? - JZ PI2BACKUP - CPI STRTCHAR ; START OF INFO? - JZ PI2STRT - JMP SETLCOUNT ; RESET LINE COUNT IN CASE OF ALL - -; -; JUMP TO START OF INFO FROM EOI -; -PI2STRT: - LHLD STRTINFO ; PT TO START OF INFO - CALL FRESUME ; RESET POINTERS - MVI A,1 ; RESET FRAME COUNT - STA FRNUM - JMP PI1 ; CONTINUE PROCESSING - -; -; BACK UP TO PREVIOUS FRAME FROM EOI -; -PI2BACKUP: - CALL BOICHECK ; AT BEGINNING OF INFORMATION? - JZ PI2STRT -PI2BACK: - CALL FB1 ; BACK UP TO PREVIOUS FRAME - JMP PI1 ; CONTINUE PROCESSING - -; -; CHECK FOR POSITION AT BEGINNING OF INFORMATION SECTION -; IF SO, PRINT BACKUP ERROR MSG AND RETURN W/ZERO SET -; -BOICHECK: - LHLD STRTINFO ; START ADDRESS - XCHG ; ... IN DE - LHLD STRTFRAME ; FRAME ADDRESS - MOV A,D ; EQUAL? - CMP H - RNZ - MOV A,E - CMP L - RNZ - CALL SAK ; ERROR BELL - XRA A ; ZERO FLAG SET - STA FRNUM ; SET FRAME NUMBER - RET - -; -; THIS BODY OF CODE LISTS INFORMATION FROM HELP2 TO THE -; PRINTER -; - -; -; LIST ONE LINE OF INFO SECTION; HL PTS TO LINE UPON ENTRY; -; HL PTS TO FIRST CHAR OF NEXT LINE UPON EXIT -; -LISTLINE: - MOV A,M ; GET CHAR - ANI 7FH ; MASK OUT MSB - CPI CR ; EOL? - JZ LCRLF - CPI LF ; LINE FEED? (WS FILE) - JZ LCRLF0 - CPI CTRLZ ; END OF FILE? - JZ LCRLFC ; DONE IF SO - CALL LSTOUT ; PRINT CHAR - RZ ; ABORT - INX H ; PT TO NEXT - JMP LISTLINE - -; -; LIST CRLF, PT TO FIRST CHAR OF NEXT LINE, AND PAGE IF NECESSARY -; -LCRLF: - INX H ; PT TO LF -LCRLF0: - INX H ; PT TO 1ST CHAR OF NEXT LINE -LCRLFC: - CALL LCRLF1 ; PRINT CRLF - LDA LCOUNT ; GET LINE COUNT - DCR A - STA LCOUNT - JNZ LNOABT ; OK -- CONTINUE - CALL LFORMFEED ; ADVANCE TO NEXT PAGE -SETPLC: - PUSH H ; SAVE HL - CALL GETPRT ; GET PRINTER DATA - INX H ; PT TO TEXT LINE COUNT - INX H - MOV A,M ; GET TEXT LINE COUNT - STA LCOUNT ; SET LINE COUNT - POP H ; RESTORE HL - RET -LCRLF1: - MVI A,CR ; SEND TO PRINTER - CALL LSTOUT - RZ ; ABORT - MVI A,LF ; FALL THRU TO LSTOUT - -; -; PRINT CHARACTER IN A ON PRINTER; AFFECT NO REGISTERS -; -LSTOUT: - PUSH H ; SAVE REGS - PUSH D - PUSH B - MOV E,A ; CHAR IN E - MVI C,5 ; BDOS PRER OUTPUT ROUTINE - CALL BDOS - MVI E,0FFH ; CONDITIONAL INPUT - MVI C,6 ; DIRECT CONSOLE I/O - CALL BDOS - POP B ; RESTORE REGS - POP D - POP H - CPI CTRLC ; ABORT? - RET -LNOABT: - MVI A,0FFH ; SET NO ABORT RETURN - ORA A ; SET FLAGS - RET - -; -; LIST THE CURRENT INFORMATION SECTION -; INFORMATION SECTION IS PTED TO BY STRTINFO -; -; LIST0INFO -- LIST CURRENT FRAME ONLY -; LIST1INFO -- LIST CURRENT INFORMATION SECTION -; -LIST0INFO: - LHLD STRTFRAME ; LIST CURRENT FRAME ONLY - MVI A,0FFH ; SET FLAG - STA LFRFLAG ; LIST FRAME ONLY - JMP LIST2INFO -LIST1INFO: - LHLD STRTINFO ; PREPARE TO LIST ENTIRE INFO SECTION - XRA A ; CLEAR FRAME LIST FLAG - STA LFRFLAG -LIST2INFO: - CALL LISTINFO ; DO PRINT - CALL CLS ; CLEAR SCREEN - CALL LFORMFEED ; FORM FEED PRINTER - LHLD STRTFRAME ; RETURN TO FRAME WE WERE ON - CALL FRESUME - LDA FRNUM ; ADJUST FRAME NUMBERING - DCR A - STA FRNUM - JMP PI1 ; RESUME AT PI1 -; -; MAIN PRINT ROUTINE -; -LISTINFO: - CALL CLS ; PRINT FRAME OR INFO SECTION - CALL EPRINT - DB CR,LF,' Printing ',0 - CALL SETPLC ; SET PRINTER LINE COUNT -LI1: - CALL LISTLINE ; LIST LINE FROM INFO FILE - CPI CTRLC ; ABORT? - RZ ; FEED PRINTER AND EXIT - MOV A,M ; DONE? - ANI 7FH ; MASK OUT MSB - CPI CTRLZ ; EOF? - RZ ; RESUME IF AT END OF INFO - CPI SECTCHAR ; NEXT SECTION - RZ ; RESUME IF AT END OF INFO - CPI FF ; FORM FEED? - JNZ LI1 - LDA LFRFLAG ; LIST FRAME ONLY? - ORA A ; 0=NO - RNZ - INX H ; PT TO CHAR AFTER FORM FEED - CALL LCRLFC ; NEW LINE - MVI B,10 ; PRINT SEPARATOR -LI2: - MVI A,'-' ; DASHES - CALL LSTOUT - RZ ; ABORT? - DCR B ; COUNT DOWN - JNZ LI2 - CALL LCRLFC ; 2 NEW LINES - CALL LCRLFC - JMP LI1 - -; -; FORM FEED PRINTER -; -LFORMFEED: - CALL LCRLF1 ; NEW LINE - MVI A,FF ; OUTPUT FORM FEED - CALL LSTOUT - JMP SETPLC ; RESET LINE COUNT - -; -; END OF BODY OF CODE WHICH LISTS INFORMATION FROM HELP2 TO -; THE PRINTER -; - -; -; AT THE BEGINNING OF AN INFORMATION SECTION (HL PTS TO FIRST CHAR) -; CHECK TO SEE IF ANOTHER SECTCHAR FOLLOWS, AND, IF SO, LOAD THE -; SPECIFIED FILE AS A NEW NODE AND BEGIN PROCESSING IT -; -LDNOD: - INX H ; PT TO POSSIBLE 2ND SECTCHAR - MOV A,M ; GET IT - DCX H ; PREP FOR RETURN - ANI 7FH ; MASK MSB - CPI SECTCHAR ; ANOTHER ONE? - RNZ ; PROCESS NORMALLY IF NOT -; -; WE HAVE A NEW NODE -- CHECK TO SEE IF WE CAN NEST AGAIN -; - LDA HLPLVL ; GET CURRENT HELP LEVEL - CPI 25 ; AT MAXIMUM? - JNZ LDNOD1 - CALL CLS ; NEW SCREEN - CALL EPRINT - db cr,lf,' Node Level Limit',0 - JMP HLPEXIT - -; -; WE HAVE NOT REACHED LEVEL LIMIT, SO CONTINUE -; AT THIS TIME, A=HELP LEVEL INDEX AND HL = PTR TO CURRENT SECTION (::) -; -LDNOD1: -; -; SAVE CURRENT HELP FILE NAME FOR RETURN -; - INX H ; PT TO SECTION SECTCHAR - INX H ; NOW POINTING TO FILE NAME - PUSH H ; SAVE PTR - CALL COMPTR ; HL=POINTER TO STACK ELT INDEXED BY A - XCHG ; DE=ADDRESS OF NEXT ELEMENT -; -; COPY CURRENT NODE ELEMENT NAME INTO NEXT STACK ELEMENT -; - LXI H,FCB+1 ; PT TO FILE NAME - MVI B,11 ; 11 BYTES - CALL MOVE -; -; INCREMENT HELP LEVEL -; - LDA HLPLVL ; GET OLD LEVEL - INR A ; SET NEW LEVEL - STA HLPLVL -; -; SET UP FCB FOR NEW FILE -; - POP H ; GET PTR TO NEW FILE NAME - LXI D,FCB+1 ; PT TO FCB NAME - MVI B,8 ; 8 CHARS MAX - CALL LDFCB ; PLACE INTO FCB WITH ERROR CHECKING - MVI B,3 ; 3 CHARS MAX FOR TYPE - CPI '.' ; CONTINUE IF FILE TYPE PRESENT - CZ LDFCB ; PLACE INTO FCB WITH ERROR CHECKING -; -; PRINT LOADING HELP FILE MESSAGE -; -PLHFM: - CALL EPRINT - DB CR,LF,' Loading HELP File ',0 - LXI D,FCB+1 ; PRINT FILE NAME - CALL PFN2 - JMP STRT1 ; LOAD NEW HELP FILE - -; -; LOAD FCB PTED TO BY DE WITH "NORMAL" FILE NAME PTED TO BY HL FOR B BYTES -; -LDFCB: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CPI '.' ; DONE IF DECIMAL - JZ LDFCB2 - CPI ' '+1 ; DONE IF <= - JC LDFCB2 - CALL CAPS ; CAPITALIZE - STAX D ; STORE CHAR - INX D ; PT TO NEXT - DCR B - JNZ LDFCB -LDFCB1: - MOV A,M ; CHECK FOR ERROR - ANI 7FH ; MASK MSB - INX H ; PT TO NEXT CHAR - CPI '.' ; OK IF '.' - RZ - CPI ' '+1 ; OK IF <= - RC - JMP LDFCB1 -LDFCB2: - MOV C,A ; SAVE CHAR THAT TERMINATED STRING -LDFCB3: - MVI A,' ' ; FILL REST OF FCB - STAX D ; STORE - INX D ; PT TO NEXT - DCR B - JNZ LDFCB3 - MOV A,C ; GET CHAR THAT TERMINATED STRING - RET - -; -; GO TO ROOT -; -GOROOT: - LDA HLPLVL ; AT ROOT? - ORA A ; 0=YES - JZ HELP ; RETURN TO HELP - MVI A,0 ; SET ROOT INDEX - JMP GORET - -; -; RETURN TO PREVIOUS HELP LEVEL -; -LRURN: - LDA HLPLVL ; ARE WE AT THE LOWEST LEVEL? - ORA A ; 0=YES - JNZ LRET - CALL SAK ; ERROR BELL - JMP HELP - -; -; SET NEW HELP LEVEL -; -LRET: - DCR A ; DOWN 1 AND FALL THRU TO GORET - -; -; GO TO HELP LEVEL INDEXED IN A -; -GORET: - STA HLPLVL ; SET NEW HELP LEVEL - CALL COMPTR ; HL=POINTER TO TARGET HELP FILE NAME - LXI D,FCB+1 ; COPY ELEMENT INTO FCB - MVI B,11 ; 11 BYTES - CALL MOVE - JMP PLHFM ; PRINT LOADING MESSAGE AND LOAD - -; -; COMPUTE POINTER TO HELP NAME ENTRY INDEXED BY HELP LEVEL IN A -; -COMPTR: - MOV L,A ; VALUE IN HL - MVI H,0 ; COMPUTE OFFSET AS INDEX*11 - MOV E,L ; DE=HL - MOV D,H - DAD H ; *2 - DAD H ; *4 - DAD H ; *8 - DAD D ; *9 - DAD D ; *10 - DAD D ; *11 - XCHG ; RESULT IN DE - LHLD HLPNSTK ; PT TO BASE OF HELP NAMES - DAD D ; ADD IN OFFSET - RET - -; -; PRINT LEVEL NUMBER -; -PRLEVEL: - LDA HLPLVL ; DON'T PRINT LEVEL 0 - ORA A ; 0? - JZ PRFRAME - CALL EPRINT - DB 'Level ',0 - LDA HLPLVL ; GET NUMBER - CALL PAFDC ; PRINT AS DECIMAL - LDA FRNUM ; GET FRAME NUMBER - ORA A ; SET FLAGS - MVI A,'/' ; PREP TO PRINT SLASH - CNZ COUT ; PRINT SLASH IF FRAME IS NON-ZERO -PRFRAME: - LDA FRNUM ; GET NUMBER - ORA A - MVI A,' ' ; PREP TO PRINT SPACE ON EXIT - JZ COUT - LDA FRNUM ; GET FRAME NUMBER AGAIN - CALL PAFDC ; PRINT AS DECIMAL - CALL EPRINT - DB ': ',0 - RET - -; -; RING ERROR BELL -; -SAK: - MVI A,BEL - JMP COUT - -; -; BUFFER SECTION -; -HTYPE: - DS 1 ; TYPE OF HELP FILE (IF = IHCHAR, IT IS INDEXED BY USR) -LFRFLAG: - DS 1 ; LIST FRAME ONLY FLAG (FOR PRINT FUNCTION) -TPAEND: - DS 1 ; END PAGE ADDRESS OF TPA -STRTINFO: - DS 2 ; PTR TO START OF CURRENT INFORMATION BLOCK -STRTFRAME: - DS 2 ; PTR TO START OF CURRENT FRAME -SELCHAR: - DS 1 ; SELECTION TABLE OPTION CHAR -FIRSTENTRY: - DS 2 ; PTR TO FIRST ENTRY OF INFORMATION SECTION -LCOUNT: - DS 1 ; LINE COUNT BUFFER -NEXTADR: - DS 2 ; NEXT LOAD ADDRESS -HLPLVL: - DS 1 ; NUMBER OF HELP LEVEL CURRENT NODE IS AT (0=BOTTOM) -FRNUM: - DS 1 ; NUMBER OF CURRENT FRAME -HLPNSTK: - DS 2 ; PTR TO STACK OF HELP FILE NAMES OF EACH LEVEL -HLPBUF: - DS 2 ; PTR TO HELP BUFFER -STACK: - DS 2 ; OPSYS STACK PTR - - END diff --git a/Source/Images/d_bp/u15/HELPCK.COM b/Source/Images/d_bp/u15/HELPCK.COM deleted file mode 100644 index 0a3c4980..00000000 Binary files a/Source/Images/d_bp/u15/HELPCK.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/HELPCK.MAC b/Source/Images/d_bp/u15/HELPCK.MAC deleted file mode 100644 index 643147f1..00000000 --- a/Source/Images/d_bp/u15/HELPCK.MAC +++ /dev/null @@ -1,520 +0,0 @@ -; -; PROGRAM NAME: HELPCK -; AUTHOR: RICHARD CONN -; DATE: 18 MAY 84 -; VERSION: 1.0 -; PREVIOUS VERSIONS: None -; DERIVATION: HELP.MAC 5.0 (18 MAY 84) -; NOTE: FOR USE WITH ZCPR3 ONLY -; -VERS EQU 10 -Z3ENV SET 0F400H - -; -; HELPCK performs a syntax check on HLP files. Refer -; to the file HELP.HLP for more details. -; - -FALSE EQU 0 -TRUE EQU NOT FALSE - -; -; USER EQUATES: -; Set this to TRUE if all files must be of type HLP -; -FORCEHLP EQU TRUE ; TRUE IF FILES MUST BE OF TYPE HLP - -; -; Address of Help File Buffer (Make Same as HELP.COM Buffer) -; Used to Test for Memory Overflow -; -HLPBUF EQU 0F00H ; I GOT THIS BY PEEKING AT MEM - ; AFTER RUNNING HELP ON A FILE - -; -; SYSLIB ROUTINES -; - EXT Z3INIT,Z3LOG,GETPRT - EXT PUTUD,GETUD - EXT SCTLFL,SPRINT,SOUT,CAPS,SADC,SHLDC,LOUT,SFN2 - EXT INITFCB,F$EXIST,F$OPEN,F$READ,F$CLOSE - -; -; CP/M Constants -; -UDFLAG EQU 4 ; ADDRESS OF USER/DISK FLAG -BDOS EQU 5 ; ADDRESS OF BDOS ENTRY POINT -FCB EQU 5CH ; ADDRESS OF FILE CONTROL BLOCK -FCB2 EQU 6CH ; 2ND FCB -BUFF EQU 80H ; ADDRESS OF DMA BUFFER - -CR EQU 0DH ; -LF EQU 0AH ; -BEL EQU 'G'-'@' ; ^G -FF EQU 'L'-'@' ; ^L = FORM FEED -CTRLZ EQU 'Z'-'@' ; ^Z -CTRLC EQU 'C'-'@' ; ^C - -; -; HELP Control Characters -; -IHCHAR EQU ';' ; FLAG INDICATING INDEXED BY USER -SECTCHAR EQU ':' ; DEFINED TO BE COLON -PRCHAR EQU 'P' ; PRINTER OUTPUT - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - - MVI A,1 ; SELECT CONSOLE ONLY - STA SCTLFL ; SET SWITCHED OUTPUT FLAG - LDA FCB2+1 ; LOOK FOR PRINT OPTION - CPI 'P' - JNZ START1 - MVI A,81H ; SELECT CONSOLE AND PRINTER - STA SCTLFL - -START1: - LDA BDOS+2 ; BASE PAGE OF BDOS - SUI 10 ; 2K + 2 PAGES - STA TPAEND - - XRA A ; A=0 - STA ITYPE ; SET NON-INDEXED FOR TYPE OF FILE - - CALL PUTUD ; SAVE HOME - - CALL SPRINT - DB 'HELPCK Version ' - db (vers/10)+'0','.',(vers mod 10)+'0',0 - - LXI H,FCB+1 ; CHECK FOR FILE NAME - MOV A,M - CPI '/' ; OPTION CAUGHT? - JZ STRT0 - CPI ' ' ; NONE? - JNZ STRT1 -; -; PRINT HELP MESSAGE -; -STRT0: - CALL SPRINT - DB CR,LF,'Syntax:' - DB CR,LF,' HELPCK dir:filename.typ o <-- Check File' - DB CR,LF,' HELPCK dir:filename o <-- Check filename.HLP' - DB CR,LF,'Options:' - DB CR,LF,' P = Output to Printer' - DB 0 - RET - -; -; BEGIN HELP CHECK PROGRAM -; -STRT1: -; -; CHECK FOR WILD CARDS IN FILE NAME -- ERROR IF SO -; - LXI H,FCB+1 ; PT TO FIRST BYTE OF FILE NAME - MVI B,11 ; 11 BYTES -FCBWCK: - MOV A,M ; GET BYTE - ANI 7FH ; MASK - CPI '?' ; WILD? - JZ FCBWERR - INX H ; PT TO NEXT - DCR B - JNZ FCBWCK -; -; CHECK FOR FILE TYPE -; - LXI H,FCB+9 ; CHECK FOR FILE TYPE - - IF NOT FORCEHLP - MOV A,M ; CHECK FOR FILE TYPE SPECIFIED - CPI ' ' ; NONE? - JNZ STRT2 - ENDIF -; -; PLACE DEFAULT FILE TYPE OF '.HLP' IN FCB -; - LXI D,DEFTYP ; DEFAULT FILE TYPE - MVI B,3 - XCHG - CALL MOVE ; MOVE (HL) TO (DE) FOR (B) BYTES - -; -; READ IN FILE -; -STRT2: - CALL SPRINT - DB ' Help File: ',0 - LXI D,FCB+1 ; PT TO NAME - CALL SFN2 - LXI D,FCB ; PT TO FCB - CALL Z3LOG ; LOG INTO DIRECTORY - CALL INITFCB ; RESET FCB - CALL F$EXIST ; IS FILE THERE? - JNZ STRT3 -; -; FILE NOT FOUND -; - CALL SPRINT - DB CR,LF,' File Not Found',0 - RET - -; -; FILE CONTAINS WILD CARDS -; -FCBWERR: - CALL SPRINT - DB CR,LF,' AFN Not Allowed',0 - RET - -; -; LOAD HELP FILE INFORMATION -; -STRT3: - LXI D,FCB ; OPEN FILE - CALL F$OPEN - LXI H,HLPBUF ; PT TO BUFFER - SHLD NEXTADR ; SET PTR -; -; READ RECORDS UNTIL EOF -; -STRT4: - CALL READ ; READ INFO - JZ STRT4 ; NOT DONE IF ZERO RETURN - LXI D,FCB ; CLOSE FILE - CALL F$CLOSE - CALL GETUD ; RESTORE CURRENT DISK AND USER IF CHANGED - -; -; START OF HELP PROGRAM -; -HELP: - MVI A,1 ; SET NUMBER OF INFO SECTION - STA INFONUM - LXI H,HLPBUF ; PT TO FIRST CHAR - MOV A,M ; NO HEADER SECTION? - ANI 7FH ; MASK OUT MSB - CPI SECTCHAR - JNZ HELP1 ; HEADER SECTION EXISTS -; -; CHECK NON-INDEXED HELP FILE -; - CALL SPRINT - DB CR,LF,' Help File is Not Indexed',0 - CALL CKINFO ; CHECK HELP INFO PTED TO BY HL - RET -; -; CHECK INDEXED HELP FILE -; -HELP1: - STA ITYPE ; SET INDEX TYPE - CPI IHCHAR ; INDEXED BY USER? - JNZ HELP1A - CALL SPRINT - DB CR,LF,' Help File is User-Indexed',0 - JMP HELP1B -HELP1A: - CALL SPRINT - DB CR,LF,' Help File is Indexed by HELP',0 -HELP1B: - CALL CKHEADER ; CHECK HEADER -; -; CHECK INFORMATION SECTIONS OF INDEXED HELP FILE -; -HELP2: - CALL CKINFO ; CHECK INFO SECTION - PUSH PSW ; SAVE FLAG - LDA INFONUM ; INCREMENT NUMBER OF INFORMATION SECTION - INR A - STA INFONUM - POP PSW - CPI CTRLZ ; DONE? - JNZ HELP2 - LDA ITYPE ; USER INDEXED? - CPI IHCHAR - JZ HELP3 - LDA INFONUM ; GET COUNT OF INFO SECTIONS - DCR A ; ADJUST TO CORRECT NUMBER - MOV B,A ; SAVE IN B - CALL SPRINT - DB CR,LF,CR,LF,' Information Section Count is ',0 - LDA IDXNUM ; GET NUMBER OF INDEX ENTRIES - CMP B - JZ HELP2A - CALL SPRINT - DB 'Incorrect',0 - JMP HELP3 -HELP2A: - CALL SPRINT - DB 'Correct',0 -HELP3: - CALL SPRINT - DB CR,LF,' HELPCK Done',CR,LF,0 - LDA SCTLFL ; CHECK FOR PRINTER SELECTED - ANI 80H - RZ ; DONE IF NO PRINTER OUTPUT - CALL GETPRT ; GET PRINTER DATA - INX H ; PT TO FF FLAG - INX H - INX H - MOV A,M ; GET FLAG - ORA A ; 0=NO FF - RZ - MVI A,FF ; OUTPUT FF - JMP LOUT - -; -; MOVE BYTES PTED TO BY HL TO AREA PTED TO BY DE; B BYTES TO MOVE -; -MOVE: - MOV A,M ; GET BYTE - ANI 7FH ; MASK OFF MSB -- IN CASE A WS FILE - STAX D ; PUT BYTE - INX H ; PT TO NEXT - INX D - DCR B - JNZ MOVE - RET - -; -; READ RECORD FROM DISK; NEXTADR CONTAINS ADDRESS TO READ TO -; ON RETURN, BDOS ERROR CODE IS IN A (0=NO ERROR) -; -READ: - LXI D,FCB ; PT TO FCB - CALL F$READ ; READ NEXT RECORD - PUSH PSW ; SAVE RETURN CODE - LHLD NEXTADR ; PT TO LOAD ADDRESS - LDA TPAEND ; CHECK AGAINST END PAGE OF TPA - CMP H ; IF AT SAME PAGE, YES - JZ READERROR - LXI D,BUFF ; PT TO BUFFER TO LOAD FROM - MVI B,128 ; NUMBER OF BYTES TO MOVE - XCHG - CALL MOVE - XCHG - MVI M,CTRLZ ; STORE ENDING CTRLZ IN CASE OF EOF - POP PSW ; GET RETURN CODE - ORA A ; DONE? <>0 IF SO -; -; READ DONE -- SAVE PTR TO NEXT BLOCK -; - SHLD NEXTADR ; SET NEXT ADDRESS - RET - -READERROR: - POP PSW ; CLEAR PSW - POP PSW ; CLEAR RET ADR - CALL SPRINT - DB CR,LF,' Memory Full',0 - RET - -; -; CHECK HEADER -; -CKHEADER: - MVI A,0 ; SET LINE COUNT - STA IDXNUM -CKH1: - MOV A,M ; CHECK FOR DONE - CPI SECTCHAR ; DONE? - JZ CKH2 - CPI CTRLZ ; EOF? - JZ CKH3 - CALL SKPLINE ; SKIP TO NEXT LINE - LDA IDXNUM ; INCREMENT LINE COUNT - INR A - STA IDXNUM - JMP CKH1 -CKH2: - CALL SPRINT - DB CR,LF,' Lines in Header: ',0 - LDA IDXNUM ; GET COUNT - CALL SADC - RET -CKH3: - CALL SPRINT - DB CR,LF,' Premature EOF at Header',0 - RET - -; -; CHECK INFORMATION SECTION PTED TO BY HL -; -CKINFO: - CALL SPRINT - DB CR,LF,CR,LF,' Information Section ',0 - LDA INFONUM ; GET NUMBER OF INFO SECTION - CALL SADC ; PRINT IT - MOV A,M ; CHECK FOR VALID SECTION CHAR - ANI 7FH - CPI SECTCHAR - JZ CKINFO1 - CALL SPRINT - DB CR,LF,' Info Section Does Not Begin with :',0 -CKINFO1: - INX H ; PT TO FIRST CHAR - LDA ITYPE ; TYPE OF INFO SECTION - CPI IHCHAR ; USER-INDEXED? - JZ CKINFO2 - MOV A,M ; CHECK FOR EXTERNAL FILE REFERENCE - CPI SECTCHAR - JNZ CKINFO1C - INX H ; PT TO FIRST CHAR OF FILE NAME -CKIHF: - CALL SPRINT - DB CR,LF,' External Help File: ',0 - PUSH H ; SAVE HL -CKINFO1A: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - ANI 7FH - CALL CAPS - CPI ' '+1 ; CHECK FOR RANGE - JC CKINFO1B - CALL SOUT ; PRINT CHAR - JMP CKINFO1A -CKINFO1B: - POP H ; RESTORE HL - CALL SKPLINE ; SKIP TO EOL - JMP CKINFO3 -CKINFO1C: - CALL SKPLINE ; SKIP TO EOL - CALL EMPCK ; CHECK FOR EMPTY - JMP CKINFO3 -CKINFO2: - CALL SPRINT - DB CR,LF,' User Indices: ',0 -CKI2A: - MOV A,M ; GET CHAR - ANI 7FH - INX H ; PT TO NEXT - CPI SECTCHAR ; EXTERNAL HELP FILE? - JZ CKIHF - CPI LF - JZ CKI2C - CPI ' ' - JZ CKI2A - CPI CR - JZ CKI2B - CALL CAPS ; CAPITALIZE - CALL SOUT ; PRINT INDEX - MVI A,' ' ; FOLLOWING SPACE - CALL SOUT - JMP CKI2A -CKI2B: - MOV A,M ; CHECK FOR LF - ANI 7FH - CPI LF - JZ CKI2C - INX H ; SKIP LF -CKI2C: - CALL EMPCK ; CHECK FOR EMPTY -CKINFO3: - PUSH H - LXI H,1 ; SET LINE COUNTER - SHLD LCOUNT - POP H -CKINFO4: - MOV A,M ; CHECK FOR NEW INFO SECTION - CPI SECTCHAR - JZ CKISUM - CPI CTRLZ ; EOF? - JZ CKISUM - CALL SKPLINE ; SKIP TO NEXT LINE - PUSH H ; INCREMENT LINE COUNT - LHLD LCOUNT - INX H - SHLD LCOUNT - POP H - JMP CKINFO4 -CKISUM: - PUSH H - CALL SPRINT - DB CR,LF,' Number of Lines: ',0 - LHLD LCOUNT - CALL SHLDC - POP H - RET - -; -; CHECK TO SEE IF AT EOF OR INFO SECTION AND PRINT EMPTY MESSAGE IF SO -; -EMPCK: - MOV A,M ; GET CHAR - ANI 7FH - CPI CTRLZ ; EOF? - JZ EMPCK1 - CPI SECTCHAR - RNZ -EMPCK1: - CALL SPRINT - DB CR,LF,' Information Section is Empty',0 - RET - -; -; SKIP TO END OF CURRENT LINE -; -SKPLINE: - MOV A,M ; GET CHAR - ANI 7FH ; MASK - CPI CTRLZ ; EOF? - RZ - INX H ; PT TO NEXT - CPI LF - RZ - JMP SKPLINE - -; -; BUFFER SECTION -; -DEFTYP: - DB 'HLP' ; DEFAULT TYPE OF HELP FILE -ITYPE: - DS 1 ; TYPE OF HELP FILE (IF = IHCHAR, IT IS INDEXED BY USR) -TPAEND: - DS 1 ; END PAGE ADDRESS OF TPA -LCOUNT: - DS 2 ; LINE COUNTER -INFONUM: - DS 1 ; INFORMATION SECTION NUMBER -IDXNUM: - DS 1 ; INDEX NUMBER -FIRSTENTRY: - DS 2 ; PTR TO FIRST ENTRY OF INFORMATION SECTION -NEXTADR: - DS 2 ; NEXT LOAD ADDRESS - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/HELPPR.COM b/Source/Images/d_bp/u15/HELPPR.COM deleted file mode 100644 index 97639218..00000000 Binary files a/Source/Images/d_bp/u15/HELPPR.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/HELPPR.MAC b/Source/Images/d_bp/u15/HELPPR.MAC deleted file mode 100644 index 95aa7106..00000000 --- a/Source/Images/d_bp/u15/HELPPR.MAC +++ /dev/null @@ -1,1381 +0,0 @@ -; -; PROGRAM: HELPPR -; AUTHOR: Richard Conn -; VERSION: 1.0 -; DATE: 18 May 84 -; PREVIOUS VERSIONS: None -; DERIVATION: PHELP 2.0 (28 Apr 83) -; -VERS equ 10 -z3env SET 0f400h - -FALSE EQU 0 -TRUE EQU NOT FALSE - -timeok equ FALSE ;TRUE if TIME enabled, FALSE if not - -; -; HELPPR is used to print out a HLP file. It breaks pages on each -; information section and ignores form feeds, so the data is presented -; in a sequential fashion. It is very convenient to provide online -; documentation in the form of HLP files, and this utility allows the user -; to readily print out this documentation. HELPPR is preferred over PRINT -; for printing HLP files because of its knowledge of their structure and -; its special way of handling them. -; -; HELPPR is invoked by a command line of the following form: -; HELPPR file1,file2,...,filen o... -; where each "filen" is an ambiguous file name and "o" is zero or more of -; the following options: -; H@head@ Heading Text -; The user may specify the text of the heading to -; appear at the top of every page -; I Inspect Files -; The user approves each file to be printed -; before the printing process begins -; L Toggle Line Numbering -; Each line may or may not begin with a line number -; Snnnn Skip to Specified Page -; Printing begins at the indicated page -; T Toggle Time Display -; Time/Date information is optionally included -; in the page header -; - -; -; BASIC SYSLIB ROUTINES NEEDED BY HELPPR -; -C$ESIZE EQU 16 ; SIZE OF DIR ENTRY (FROM SYSLIB DIRF ROUTINE) - - EXT DIRQS ; DIRECTORY PROCESSOR - - EXT Z3INIT ; INIT BUFFERS - EXT ZFNAME ; FILE NAME PROCESSOR - EXT Z3LOG ; LOG INTO DIR - - EXT INITFCB ; INIT FCB - EXT RETUD ; RETURN CURRENT USER/DISK - EXT PUTUD ; SAVE CURRENT USER/DISK - EXT GETUD ; RESTORE CURRENT USER/DISK - EXT EPRINT ; PRINT STRING PTED TO BY RET ADR - EXT PADC ; PRINT A AS DECIMAL CHARS - EXT COUT ; CONSOLE OUTPUT ROUTINE - EXT CST ; CONSOLE STATUS ROUTINE - EXT CIN ; CONSOLE INPUT ROUTINE - EXT CAPS ; CAPITALIZE ROUTINE - EXT CRLF ; NEW LINE ROUTINE - EXT CODEND ; CODE END COMPUTATION ROUTINE - - EXT F$OPEN ; FILE OPEN - EXT F$READ ; BLOCK READ - EXT F$CLOSE ; FILE CLOSE - - ext getprt - ext eval10 - ext lcrlf - ext lpstr - ext lprint - ext lout - ext lhldc - ext condin - ext moveb -; - if timeok - ext time - endif -; - -; -; Insert Function-Required Library References Here -; - -; -; CP/M EQUATES -; -CPM EQU 0 ; WARM BOOT -BDOSE EQU CPM+5 ; BDOS ENTRY -FCB EQU CPM+5CH ; FCB -TBUFF EQU CPM+80H ; INPUT LINE BUFFER -DEL EQU 7FH ; -CR EQU 13 ; -FF EQU 12 ; -LF EQU 10 ; -CTRLC EQU 'C'-'@' ; ^C -CTRLG EQU 'G'-'@' -CTRLH EQU 'H'-'@' -CTRLI EQU 'I'-'@' -CTRLS EQU 'S'-'@' -CTRLX EQU 'X'-'@' -CTRLZ EQU 'Z'-'@' -eold equ 0FFH ;End of Load Indicator - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - jmp startx -; -; **** Special Initial Value Area for User Installation -; -LWIDTH: - DB 132 ; PRINTER LINE WIDTH -LTPP: - DB 44 ; LINES OF TEXT PER PAGE -LSPP: - DB 5 ; LINES TO SKIP PER PAGE -LFF: - DB 1 ; FORM FEED FLAG -; -; NOTE: LTPP + LSPP + 2 (HEADER SIZE) = TOTAL LINES PER PAGE ON PRINTER -; -DLNUMFL: - DB 0 ; LINE NUMBER FLAG (DEFAULT TO NO) -DTIMEPFL: - DB 0FFH ; TIME PRINT FLAG (DEFAULT TO YES) -DINSPECT: - DB 0 ; INSPECT FILES (DEFAULT TO NO) -; -; WORKING BUFFERS -; -LNUMFL: - DB 0 ; LINE NUMBER FLAG -TIMEPFL: - DB 0FFH ; TIME PRINT FLAG -INSPECT: - DB 0 ; INSPECT FLAG -SKIPFL: - DB 0 ; SKIP FLAG (DEFAULT TO NO) -SKIPNUM: - DS 2 ; PAGE NUMBER TO SKIP TO -LNUM: - DS 2 ; CURRENT LINE NUMBER -PNUM: - DS 2 ; CURRENT PAGE NUMBER -HBUF: - DS 2 ; BUFFER FOR HEADING -; - if timeok -TIMEBF: - DS 100 ; BUFFER FOR TIME STAMP - endif -; -; Start of Program -; -STARTX: - LXI H,0 ; GET STACK PTR - DAD SP - SHLD V$STACK ; SAVE IT - XRA A ; A=0 - STA V$INSPECT ; TURN OFF FILE INSPECTION - CALL PUTUD ; SAVE CURRENT USER/DISK AWAY - call codend ; determine free space - shld V$CMDLNE ; set command line ptr - lxi d,100h ; arbitrary size - dad d - shld HBUF ; ptr to heading buffer - dad d - shld dirbuf ; ptr to dir buffer - sphl ; new stack - -; -; Save Command Line -; - lhld V$CMDLNE ; save command line - LXI D,TBUFF+1 ; SAVE COMMAND LINE - xchg - mvi b,80h ; 128 bytes - call moveb - -; -; Setup Printer Data -; - call getprt - mov a,m ;get width - sta lwidth - inx h - inx h - mov a,m ;get lines of text per page - sta ltpp - mov b,a ;save in B - dcx h - mov a,m ;get lines per page - sub b ;compute difference - sta lspp ;lines to skip per page - inx h - inx h - mov a,m ;get form feed flag - sta lff - -; -; Banner of Program -; - CALL BANNER ; PRINT BANNER -; -; Check for Help Request -; - LDA FCB+1 ; GET FIRST CHAR OF FILE NAME - CPI ' ' ; NO FILE SPEC? - JZ T$HELPENT - CPI '/' ; OPTION CAUGHT? - JNZ T$ECONT - -; -; Print Help Information -; -T$HELPENT: - CALL HELP ; PRINT PROGRAM'S HELP MESSAGE - -; -; RETURN TO OS -; -T$RETURN: - CALL DINIT ; DEINIT PROGRAM - LHLD V$STACK ; GET OLD STACK - SPHL ; SET IT - RET - -; -; PROGRAM'S INIT ROUTINE -; -T$ECONT: - CALL INIT ; PROG INIT ROUTINE -; -; EXTRACT FLAGS IF PRESENT -; - LXI H,0 ; SET FILE COUNT - SHLD V$FILECNT - LHLD V$CMDLNE ; PT TO BUFFER -; -; SKIP TO FILE NAME STRING -; - CALL T$SBLANK ; SKIP OVER BLANKS -; -; SKIP TO END OF FILE NAME STRING -; - CALL T$SNBLANK ; SKIP OVER NON-BLANKS -; -; CHECK FOR LEADING SLASH ON OPTION AND SKIP IT IF SO -; -T$OPT: - CPI '/' ; OPTION CHAR? - JNZ T$OPTION - INX H ; SKIP SLASH -; -; PROCESS LIST OF OPTIONS -; -T$OPTION: - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ T$DSPEC - INX H ; PT TO NEXT CHAR - CPI ' ' ; SKIP OVER SPACES - JZ T$OPTION - MOV C,A ; COMMAND IN C - LXI D,OPTAB ; PT TO OPTION TABLE -T$OPTL: - LDAX D ; GET OPTION LETTER - ORA A ; END OF TABLE? - JZ T$HELPENT ; HELP IF SO - CMP C ; MATCH? - JZ T$OPTM ; PROCESS IF SO - INX D ; PT TO NEXT ENTRY - INX D - INX D - JMP T$OPTL -; -; PROCESS OPTION -; -T$OPTM: - PUSH H ; SAVE HL ON STACK - LXI H,T$OPTION ; GET RETURN ADDRESS - XTHL ; ... ON STACK AND RESTORE HL - INX D ; PT TO ADDRESS - LDAX D ; GET ADDRESS LOW - MOV B,A ; ... IN B - INX D - LDAX D ; GET ADDRESS HIGH - MOV D,A ; ... IN D - MOV E,B ; LOW IN E - PUSH D ; PUT ADDRESS ON STACK - MOV A,C ; COMMAND IN A - RET ; "CALL" OPTION ROUTINE -; -; BEGIN MOVING THROUGH FILE NAMES, SEPARATED BY COMMAS -; -T$DSPEC: - LHLD V$CMDLNE ; PT TO FIRST BYTE - CALL T$SBLANK ; SKIP TO NON-BLANK -; -; MAJOR REENTRY POINT WHEN FILE SPECS ARE SEPARATED BY COMMAS -; HL PTS TO FIRST BYTE OF NEXT FILE SPEC -; -T$DSPEC1: - shld hltemp ; save HL - lhld dirbuf ; reset stack - sphl - lhld hltemp ; restore HL - CALL GETUD ; RESET USER IF NECESSARY - LXI D,V$NTFCB ; PT TO FCB IN DE, PT TO 1ST CHAR OF FN IN HL - MVI A,0 ; DIR before DU - CALL ZFNAME ; EXTRACT FILE NAME INTO FCB, AND GET DISK AND USER - - push b ;save disk/user - push h ;save others - push d - lxi h,hlptyp ;optionally set default HLP type - lxi d,V$NTFCB+9 ;check for any specified - ldax d ;' ' means none - cpi ' ' - jnz hlpskp - mvi b,3 ;3 chars - call moveb -hlpskp: - pop d ;restore others - pop h - pop b ;restore disk/user - SHLD V$NEXTCH ; SAVE PTR TO DELIMITER WHICH ENDED SCAN - -; -; LOAD DIRECTORY AND PERFORM FUNCTION -; -T$FCT: - LXI D,V$NTFCB ; PT TO FCB - CALL Z3LOG ; LOG INTO ACCOUNT - LHLD DIRBUF ; PT TO DIR BUFFER - MVI A,11000000B ; SELECT SYS AND NON-SYS FILES - LXI D,V$NTFCB ; PT TO FCB - CALL INITFCB ; INIT THE FCB - CALL DIRQS ; LOAD DIR, SELECT FILES, PACK, AND ALPHABETIZE -; -; DETERMINE BEGINNING OF SCRATCH AREA (SCRATCH) AND SIZE IN PAGES (BCNT) -; - PUSH H ; SAVE PTR AND COUNT - PUSH B - LXI D,C$ESIZE ; SET PTR TO NEXT FREE BLOCK -T$FCTFRE: - MOV A,B ; DONE? - ORA C - JZ T$FCTFR1 - DAD D ; PT TO NEXT - DCX B ; COUNT DOWN - JMP T$FCTFRE -T$FCTFR1: - INR H ; NEXT PAGE - MVI L,0 - SHLD V$SCRATCH ; SET PTR TO SCRATCH AREA - XCHG ; PTR IN DE - LHLD BDOSE+1 ; COMPUTE BLOCK BUFFER SIZE - MOV A,H ; ADJUST FOR ZCPR3 - SUI 10 - SUB D ; A=SIZE IN BLOCKS - STA V$BCNT ; SET BLOCK COUNT - POP B ; RESTORE AND SAVE REGS - POP H -; -; ALLOW USER TO INSPECT FILES -; - PUSH H - PUSH B - CALL T$ICHECK ; CHECK FOR INSPECT OPTION AND INSPECT IF SET - POP B ; RESTORE COUNT AND PTR - POP H - -; -; PERFORM FUNCTION; HL PTS TO FILE AND BC CONTAINS NUMBER OF FILES -; -T$FCTL: - MOV A,B ; CHECK FOR COMPLETION (COUNT = 0) - ORA C - JZ T$FCTL1 - DCX B ; COUNT DOWN - SHLD HLTEMP ; SET STACK - LHLD DIRBUF - SPHL - LHLD HLTEMP - PUSH B ; SAVE COUNT AND PTR - PUSH H - MOV A,M ; SELECTED FILE? - ORA A ; 0=YES - CZ FUNCTION ; PERFORM FUNCTION -; -; ENTRY POINT TO SKIP TO NEXT FILE IN LIST -; -E$FCTLNXT: - LHLD DIRBUF ; RESTORE STACK - LXI D,-4 ; 4 DOWN - DAD D - SPHL - POP H ; RESTORE PTR - POP B ; RESTORE COUNT - LXI D,C$ESIZE ; PT TO NEXT ENTRY - DAD D - JMP T$FCTL - -; -; CHECK FOR NEXT FILE SPEC -; -T$FCTL1: - CALL GETUD ; RETURN TO BASE USER/DISK - LHLD V$NEXTCH ; GET PTR - MOV A,M ; GET DELIM - CPI ',' ; ANOTHER FILE? - JNZ T$RETURN - INX H ; PT TO CHAR AFTER COMMA - JMP T$DSPEC1 ; CONTINUE PROCESSING -; -; INSPECT FILES -- THIS ROUTINE IS TO PERFORM A FILE INSPECTION -; ON INPUT, HL PTS TO FIRST 16-BYTE ENTRY AND BC=NUMBER OF ENTRIES -; -T$ICHECK: - MOV A,B ;ANY FILES? - ORA C ;0=NO - RZ - PUSH H ;SAVE PTRS - PUSH B - LXI D,C$ESIZE ;SIZE OF ENTRY -T$ICHK1: - MVI M,0 ;CLEAR MSBYTES - DAD D ;PT TO NEXT - DCX B ;COUNT DOWN - MOV A,B ;DONE? - ORA C - JNZ T$ICHK1 - POP B ;RESTORE PTRS - POP H - LDA V$INSPECT ;INSPECT? - ORA A ;0=NO - RZ - CALL EPRINT - DB CR,LF,' File Inspect Mode' - db cr,lf,' Cmd Function Cmd Function' - DB CR,LF,' Y(def) Select File Q Select Rest of Files' - DB CR,LF,' N Don''t Select S Skip Rest of Files' - db cr,lf,0 -T$ICHK2: - CALL EPRINT - DB CR,LF,'Select ',0 - CALL E$PRFN ;PRINT FILE NAME - CALL EPRINT - DB ' -- (Y/N/Q/S)? ' - DB 0 - CALL CIN ;GET RESPONSE - CALL CAPS ;CAPITALIZE - CALL COUT ;ECHO - CPI 'Q' ;SELECT REST? - JZ T$ICHKYR - CPI 'S' ;SKIP REST - JZ T$ICHKNR - CPI 'N' ;NO TO THIS ONE? - JNZ T$ICHK3 - MVI M,0FFH ;SET NO FLAG IN FILE FCB -T$ICHK3: - DAD D ;PT TO NEXT ONE - DCX B ;COUNT DOWN - MOV A,B ;DONE? - ORA C - JNZ T$ICHK2 - RET -; CHECK REST OF FILES AS SELECTED -T$ICHKYR: - CALL EPRINT - DB CR,LF,' Rest of Files Selected',0 - RET -; CHECK REST OF FILES AS NOT SELECTED -T$ICHKNR: - MVI M,0FFH ;SET NO FLAG - DAD D ;PT TO NEXT - DCX B ;COUNT DOWN - MOV A,B ;DONE? - ORA C - JNZ T$ICHKNR - CALL EPRINT - DB CR,LF,' Rest of Files NOT Selected',0 - RET -; -; UTILITIES -; T$SBLANK -- SKIP BLANKS PTED TO BY HL UNTIL NON-BLANK ENCOUNTERED; HL -; T$SNBLANK -- SKIP NON-BLANKS PTED TO BY HL UNTIL BLANK OR EOL; HL -; E$PRFN -- PRINT FILE NAME PTED TO BY HL; AFFECT NOTHING - -; -; SKIP UNTIL NON-BLANK -; -T$SBLANK: - MOV A,M ; LOOK FOR BLANK - INX H ; PT TO NEXT - CPI ' ' ; BLANK? - JZ T$SBLANK - DCX H ; BACK UP - RET - -; -; SKIP UNTIL BLANK OR EOL -; -T$SNBLANK: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CPI ' ' ; BLANK? - JZ T$SNB1 - ORA A ; EOL? - JNZ T$SNBLANK -T$SNB1: - DCX H ; BACK UP - RET - -; -; PRINT FILE NAME PTED TO BY HL -; OUTPUT TO CON: -; -E$PRFN: - PUSH H ; SAVE REGS - PUSH B - CALL RETUD ; GET CURRENT USER/DISK - MOV A,B ; GET DISK NUMBER - ADI 'A' ; CONVERT TO LETTER - CALL COUT ; PRINT LETTER - MOV A,C ; GET USER NUMBER - CALL PADC ; PRINT USER NUMBER - CALL EPRINT - DB ': ',0 - INX H ; PT TO FILE NAME - MVI B,8 ; PRINT NAME - CALL T$PRNT - MVI A,'.' ; DECIMAL - CALL COUT - MVI B,3 ; PRINT TYPE - CALL T$PRNT - POP B ; GET REGS - POP H - RET - -; -; PRINT CHARS PTED TO BY HL FOR B BYTES -; OUTPUT TO CON: -; -T$PRNT: - MOV A,M ; GET CHAR - CALL COUT - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ T$PRNT - RET - -;*********************************************** -;* Application-Specific Section -;*********************************************** - -;**************************************************** -;* -;* Function-Specific Routines -;* These routines need to be customized for the -;* specific function being performed. These, in -;* effect, implement the function. Other Entry Points -;* useful to the programmer are: -;* E$FCTLNXT -- Clean Abort of Current -;* Processing and Skip -;* to Next File in List; -;* This is a Clean Way to -;* Abort FUNCTION for the -;* Next File -;* E$PRFN -- Print File Name Pted to -;* by HL; No Regs Affected -;* -;**************************************************** - -; -; **** EMERGENCY ABORT -; -ABORT: - CALL EPRINT - db cr,lf,' HELPPR Abort' - DB 0 - mvi a,cr ; new line - call lout - mvi a,lf - call lout - CALL GETUD ; RETURN HOME - JMP T$RETURN -; -; **** BANNER -- PRINT BANNER FOR PROGRAM (PROGRAM NAME ET AL) -; -BANNER: - CALL EPRINT - db 'HELPPR Version ' - db (vers/10)+'0','.',(vers mod 10)+'0' - DB 0 - RET -; -; **** HELP -- PRINT PROGRAM'S HELP MESSAGE -; -HELP: - CALL EPRINT - db cr,lf,'Syntax:' - db cr,lf,' HELPPR afn1,afn2,... o...' - db cr,lf,'Options:' - db cr,lf,' H@head@ -- Use "head" as header on every page' - db cr,lf,' I -- Inspect Files for Printing' - db cr,lf,' L -- Number Each Line' - db cr,lf,' Onn -- Offset Each Line by nn Spaces' - db cr,lf,' Snn -- Skip to Page nn and Start Printing' - db cr,lf,' T -- Toggle Time Display' - DB 0 - RET -; -; **** PROGRAM INIT ROUTINE -; THIS ROUTINE IS USED BY THE PROGRAM TO PERFORM ANY NECESSARY -; INITIALIZATIONS -; -INIT: - lxi h,dlnumfl ;copy defaults into buffers - lxi d,lnumfl - mvi b,3 ;3 bytes - call moveb - xra a ;A=0 - sta skipfl ;set no skip - sta offset ;set no offset - push h - lhld hbuf ;pt to heading buffer - mov m,a ;store zero to set no heading - pop h -; - if timeok - call time ;get time string - lxi d,timebf ;store in buffer -initt: - mov a,m ;get byte - stax d - inx h ;pt to next - inx d - ora a ;done? - jnz initt - endif -; - RET -; -; **** FUNCTION COMPLETE -- CLEANUP AND EXIT -; FILL THIS IN WITH CLEANUP CODE FOR EXIT -; -DINIT: - RET -; -; **** OPTION TABLE USED TO PROCESS COMMAND LINE -; EACH OPTION IS A CAPITAL LETTER OR SPECIAL CHAR FOLLOWED BY -; AN ADDRESS; THE TABLE IS TERMINATED BY A BINARY ZERO -; -OPTAB: - DB 'I' ; FILE INSPECTION OPTION - DW OPTINSP ; REMOVE THESE TWO LINES AND THE FOLLOWING ROUTINE - ; IF YOU DO NOT WANT FILE INSPECTION OPTION IN - ; COMMAND LINE - db 'H' ;heading - dw opthead - db 'L' ;line numbers - dw optln - db 'O' ;offset - dw optoffs - db 'S' ;skip - dw optskip -; - if timeok - db 'T' ;time display - dw opttime - endif -; - DB 0 ; END OF TABLE -; -; **** OPTION ROUTINES -; EACH ROUTINE IS PROVIDED THE OPTION CHARACTER IN THE A REGISTER -; AND A POINTER TO THE NEXT CHARACTER IN THE COMMAND LINE IN THE -; HL REGISTER PAIR; ONLY HL NEED TO BE PRESERVED (WITH OPTIONAL -; ADVANCEMENT TO THE NEXT OPTION) ON EXIT -; -OPTINSP: - MVI A,0FFH ; TURN ON FILE INSPECTION OPTION - STA V$INSPECT ; THIS IS PROVIDED AS A SAMPLE ROUTINE - ; AND FOR THE INDICATED FUNCTION - RET -; -; Set Page Offset -; -optoffs: - call eval10 ;get number - mov a,e ;get low-order byte - sta offset ;set offset - ret -; -; Option: H (Set Heading) -; -opthead: - xchg - lhld hbuf ;pt to heading buffer - xchg - mov a,m ;get delim - ora a ;none? - rz - mov b,a ;delim in B - inx h ;pt to next char -opthd1: - mov a,m ;get next char - ora a ;done? - jz opthd3 - cmp b ;done? - jz opthd2 - stax d ;save char - inx h ;pt to next - inx d - jmp opthd1 -opthd2: - inx h ;skip over delim -opthd3: - xra a ;store ending 0 - stax d - ret -; -; Option: L (Set Line Numbering) -; -optln: - lda lnumfl ;flip flag - cma - sta lnumfl - ret -; -; Option: S (Skip Lines) -; -optskip: - mvi a,0ffh ;set flag - sta skipfl - call eval10 ;get number - xchg - shld skipnum ;set page number to skip to - xchg ;HL pts to next char - mov a,d ;see if page number was zero - ora e - rnz - xra a ;if zero, turn off skip flag - sta skipfl - ret -; - if timeok -; -; Set Time Flag -; -opttime: - lda timepfl ;flip flag - cma - sta timepfl - ret -; - endif -; -; **** FUNCTION -- MAIN FUNCTION OF TEMPLATE -; ON ENTRY, HL PTS TO NAME OF FILE (16 BYTES) AND USER IS LOGGED INTO -; DIRECTORY CONTAINING INDICATED FILE -; -FUNCTION: -; -; HELP FILE PRINT Routine -- Print the Help File Whose Name is Pointed to by -; HL; we are already logged into the correct directory -; - call prinit ;init print buffers - call fload ;load buffer initially - call prhead ;print heading line - lhld V$SCRATCH ;pt to first char in file - shld nxtln ;set pointer to next line - mvi a,0ffh ;first line - sta firstf - call prline ;print first line (special case) - xra a ;not first line now - sta firstf -fprloop: - call prline ;print line of file - jnz fprloop ;done if EOF - call page ;advance to top of next page - ret -; -; Init Print Buffers and Print File Name -; -prinit: - lxi d,tfcb ;set up FCB - mvi b,12 ;12 bytes - call moveb - lxi h,0 ;HL=0 - shld lnum ;set line number - inx h ;HL=1 - shld pnum ;set page number - lda ltpp ;set line count - sta lcount - call eprint - db cr,lf,' Printing Help File ',0 - lxi h,tfcb ;pt to FCB - call e$prfn ;print file name - ret -; -; FILE LOAD (FLOAD) Routine -- Initial Load of memory buffer -; -fload: - lxi d,tfcb ;pt to file fcb - call initfcb ;init file's fcb - call f$open ;open file for input - jz fload1 ;open was OK - call eprint - db cr,lf,' File ',0 - xchg ;HL pts to FCB - call e$prfn ;print file name - call eprint - db ' NOT Found',0 - pop d ;clear return address - ret ;abort printout of this file -; -; This is an entry point for further memory loads of the file -; -fload1: - lda V$BCNT ;get number of blocks to load - mov c,a ;... in C - lhld V$SCRATCH ;get address of first block to load into - shld nxtblk ;set pointer to next block to load -fload2: - call rdblk ;read a block (128 bytes) - jnz eof ;eof encountered? - call rdblk ;read another block (128 bytes) - jnz eof ;eof encountered? - dcr c ;count down - jnz fload2 - lhld nxtblk ;pt to next byte to load - mvi m,eold ;mark end of load - ret -eof: - lxi d,tfcb ;close file - call f$close - lhld nxtblk ;ensure ^Z - mvi m,ctrlz - ret -rdblk: - lxi d,tfcb ;pt to FCB - call f$read ;read next block - ora a ;error? - rnz - lhld nxtblk ;get ptr to next block - xchg ; as dest - lxi h,tbuff ;ptr to DMA address - mvi b,128 ;copy 128 bytes -rdblk1: - mov a,m ;get byte - ani 7fh ;mask out msb - stax d ;put byte - inx h ;pt to next - inx d - dcr b ;count down - jnz rdblk1 - xchg ;new nxtblock - shld nxtblk - ret - -; -; Line Print Routine -; Print Next Line with Optional Disk Load -; Input Parameter is NXTLN, which is the address of the first char -; on the next line -; Output Parameter is Zero Flag, with Z meaning done with print, NZ -; meaning more yet to print -; -prline: - lhld lnum ;increment line number - inx h - shld lnum -prl0: - lhld nxtln ;pt to first char of next line - lda firstf ;first char? - ora a ;0=no - jnz prl01 - mov a,m ;get first char of line - cpi ':' ;new information section? - cz page ;page eject with heading -prl01: - call proffs ;print offset - mvi c,0 ;init char count - mov a,m ;get first char of line - cpi ctrlz ;EOF? - cnz prlnum ;print line number (optional) -prl1: - mov a,m ;get char - cpi eold ;end of load? - jz prload - cpi ctrlz ;eof? - jz prexit - inx h ;pt to next char - cpi ctrli ;tab? - jz prtab - cpi cr ;? - jz prldn - cpi ff ;form feed? - jz prldn - cpi lf ;end of line? - jz prl1 - cpi ctrlh ;back space? - jz prbs - cpi ctrlg ;ring bell? - jz prbell - cpi del ;delete char? - jz prl1 ;skip it - cpi ' ' ;other control char? - jc prl1 ;skip if other control char - call prout ;print char - inr c ;increment char count - call eoltest ;check to see if at end of line and newline if so - jmp prl1 -; -; End of Load Reached -- Load More of File from Disk -; -prload: - push b ;save char count - call fload1 ;use load routine - pop b ;get char count - lhld V$SCRATCH ;next byte is here - jmp prl1 ;continue processing -; -; Tabulate -; -prtab: - mvi a,' ' ;space - call prout - inr c ;new char - call eoltest ;process EOL - mov a,c ;done? - ani 7 - jnz prtab ;continue tabulation - jmp prl1 ;continue processing -; -; Exit with Zero Flag Set if Done -; -prexit: - xra a ;set zero flag - ret -; -; Carriage Return -- End of Routine -; -prldn: - mov a,m ;skip to non-LF - cpi lf - jnz prldn1 - inx h ;skip to first char of next line -prldn1: - mvi a,cr ;output - call prout - mvi a,lf ;output - call prout ;echo LF to printer - shld nxtln ;set ptr to first char of next line - mvi a,0ffh ;set not done - ora a ;set flags - ret -; -; Backspace on Printer -; -prbs: - mov a,c ;check for beginning of line - ora a - jz prl1 ;continue if at BOL - mvi a,ctrlh ;backspace - call prout - dcr c ;back up char position - jmp prl1 ;continue -; -; Ring Bell on Printer -; -prbell: - call prout ;ring the bell - jmp prl1 ;continue without advancing char position -; -; Test for End of Line and Process if so -; -eoltest: - lda offset ;get offset - mov b,a ;... in B - lda lwidth ;get line width - sub b ;subtract offset - sui 4 ;4 chars less for continuation mark - mov b,a ;result in B - lda lnumfl ;line numbering (lines are 7 chars shorter if so) - ora a ;0=no - jz eolt1 - mov a,b ;reduce by 7 for line numbers - sui 7 - mov b,a -eolt1: - mov a,b ;get line width - cmp c ;there? - rnz ;continue if not - mov a,m ;get next char - cpi cr ;new line next? - rz ;continue if so - cpi ctrlh ;backspace next? - rz ;continue if so - mvi b,3 ;look ahead 3 chars - push h -eolt2: - inx h ;pt to next - mov a,m ;get char - cpi cr ;EOL? - jz eolt3 - dcr b ;count down - jnz eolt2 - jmp eolt4 -eolt3: - pop h ;restore ptr - ret -eolt4: - pop h ;restore ptr - mvi a,' ' ;print continuation chars - call prout - mvi a,'<' - call prout - mvi a,'<' - call prout - mvi a,cr ;new line - call prout - mvi a,lf - call prout - mvi c,0 ;reset char position - lda skipfl ;skipping? - ora a ;0=no - rnz - call proffs ;print offset - lda lnumfl ;printing line numbers? - ora a ;0=no - rz - call lprint - db ' : ',0 - ret -; -; Output a character to the printer -; A = Character -; -prout: - mov b,a ;char in B - call condin ;check for abort - jz prout1 - cpi ctrlc ;abort? - jz abort - cpi ctrlx ;abort this one file? - jz cxabort -prout1: - lda skipfl ;skipping? - ora a ;set flags (Z=no skip=print char) - mov a,b ;restore char - cz lout ;send character to printer - cpi lf ;special tests if it is a line feed - rnz ;done if non-LF char - lda lcount ;decrement line counter - dcr a - sta lcount - rnz -; -; Paging Required -; Skip to top of next page; reset LCOUNT (Lines Left on Page Count); -; print header -; -prout0: - lda ltpp ;get number of text lines per page - sta lcount ;set as new line count - push h ;save ptr - lhld pnum ;increment page number - inx h - shld pnum - lda lspp ;get number of lines to skip per page - call lineskp ;skip lines - pop h ;restore ptr - mov a,m ;check next character - cpi ctrlz ;EOF? - cnz prhead ;print 2-line heading if NOT EOF - ret -; -; Abort current file with final page eject -; -cxabort: - lda lcount ;get count of remaining lines - call lineskp ;skip lines - lda lff ;form feed? - ora a ;NZ=yes - jnz e$fctlnxt ;continue with next file since already FF - lda lspp ;number of lines to skip per page - call lineskp ;skip lines - jmp e$fctlnxt ;continue with next file -; -; Skip out rest of page -; Form Feed Function -; -page: - lda lff ;form feed? - ora a ;NZ=yes - jnz prout0 ;PROUT0 will FF - lda lcount ;get count of remaining lines - call lineskp ;skip lines - jmp prout0 ;process top of new page -; -; Skip out lines on page -; A = number of lines to skip -; -lineskp: - mov b,a ;line count in B - ora a ;any? - rz - lda skipfl ;skipping? - ora a - rnz - lda lff ;form feed? - ora a ;NZ=yes - jnz lines2 -lines1: - mvi a,cr ;output new line to printer - call lout - mvi a,lf - call lout - dcr b ;count down - jnz lines1 - ret -lines2: - mvi a,cr ;output new line - call lout - mvi a,ff ;output form feed - jmp lout - -; -; Print Line Number (optional) -; -prlnum: - lda skipfl ;skipping? - ora a ;0=no - rnz - lda lnumfl ;get flag - ora a ;0=don't number lines - rz - push h ;save ptr - lhld lnum ;get line number - call lhldc ;print line number - call lprint ;print separator - db ': ',0 - pop h ;restore ptr - ret -; -; Print 2-line heading and control skipping -; -prhead: - push h ;save ptr - lda skipfl ;currently skipping? - ora a ;0=no - cnz skiptst ;test for shut off - call proffs ;print offset - call prpnum ;print page heading and number - call e$prfname ;print file name -; - if timeok ;time available? - lda timepfl ;print time? - ora a ;0=no - cnz prtime ;print time - endif -; - push h ;get first char of heading - lhld hbuf - mov a,m - pop h - ora a ;0=no - cnz prhdg ;print heading - pop h ;restore ptr - lda skipfl ;skipping? - ora a - rnz - call lcrlf ;new line - jmp lcrlf -; -; Test for completion of skipping -; -skiptst: - lhld pnum ;get page number - xchg ;... in DE - lhld skipnum ;get page to skip to - mov a,h ;compare them - cmp d - rnz - mov a,l - cmp e - rnz - xra a ;A=0 to stop skipping - sta skipfl ;set flag - ret -; -; Print Page Number -; -prpnum: - lda skipfl ;skipping? - ora a - rnz - call lprint ;print header - db 'Page ',0 - lhld pnum ;print current page number - call lhldc ;print as decimal - ret -; -; Print File Name -; -e$prfname: - lda skipfl ;skipping? - ora a - rnz - call lprint ;print separator - db ' -- Help File: ',0 - lxi h,tfcb+1 ;pt to first char - mvi b,8 ;8 chars - call lfn1 - mvi a,'.' - call lout - mvi b,3 ;3 chars - call lfn1 - ret -lfn1: - mov a,m ;get char - ani 7fh ;mask - call lout ;send to printer - inx h ;pt to next - dcr b ;count down - jnz lfn1 - ret -; -; Print Separator -; -prdash: - call lprint - db ' -- ',0 - ret -; - if timeok -; -; Print Time -; -prtime: - lda skipfl ;skipping? - ora a - rnz - call prdash ;print separator - lxi h,timebf ;pt to time stamp - call lpstr ;print - ret -; - endif -; -; Print Header -; -prhdg: - lda skipfl ;skipping? - ora a - rnz - call prdash ;print separator - lhld hbuf ;pt to heading - call lpstr ;print - ret - RET -; -; Print Line Offset -; -proffs: - lda skipfl ;skipping? - ora a - rnz - push b ;save BC - lda offset ;get offset - ora a ;any? - jz proff2 - mov c,a ;offset in C -proff1: - mvi a,' ' ;space over - call prout - dcr c ;count down - jnz proff1 -proff2: - pop b - ret -; -; **** HELPPR BUFFERS -; -offset: - ds 1 ;line offset -hltemp: - ds 2 ;temporary save area for HL -dirbuf: - ds 2 ;ptr to directory -firstf: - ds 1 ;first line in file flag -tfcb: - ds 36 ;FCB for current file -nxtblk: - ds 2 ;ptr to next block to load -nxtln: - ds 2 ;ptr to next line to read -lcount: - ds 1 ;count of text lines left on page -hlptyp: - db 'HLP' ;file type of HLP file - -;*********************************************** -;* End of Application-Specific Section -;*********************************************** - -; -; BUFFERS -; -V$DISK: - DS 1 ; HOME DISK NUMBER -V$USER: - DS 1 ; HOME USER NUMBER -V$CDISK: - DS 1 ; CURRENT DISK NUMBER -V$CUSER: - DS 1 ; CURRENT USER NUMBER -V$CMDLNE: - DS 2 ; PTR TO COMMAND LINE STRING -V$NEXTCH: - DS 2 ; PTR TO NEXT CHAR IN MULTIFILE COMMAND LINE -V$FILECNT: - DS 2 ; COUNT OF NUMBER OF FILES RENAMED -V$SCRATCH: - DS 2 ; ADDRESS OF FIRST BYTE OF SCRATCH AREA -V$BCNT: - DS 1 ; NUMBER OF PAGES IN SCRATCH AREA -V$INSPECT: - DS 1 ; INSPECT FLAG -V$NTFCB: - DS 36 ; FCB FOR NEW FILE -; -; Stack -; -V$STACK: - DS 2 ; OLD STACK PTR - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/HELPSYS.HLP b/Source/Images/d_bp/u15/HELPSYS.HLP deleted file mode 100644 index a69131bc..00000000 --- a/Source/Images/d_bp/u15/HELPSYS.HLP +++ /dev/null @@ -1,793 +0,0 @@ -; - HELP - The Online Documentation System for ZCPR3 - - W - Welcome to the HELP Command - - -- HELP Subsystem -- -- Using HELP -- - 1 - HELP Command U - How to Use HELP - 2 - HELPCK Command M - Moving Around in HELP - 3 - HELPPR Command P - Help Command Prompts - E - HELP Error Messages - O - Printing Help Files - - -- Writing HELP Files -- - H - How to Write HELP Files - V - Accessing Video Attributes - T - HELP File Tree Structure - S - Sample HELP Files - -:1 - -Command: HELP 5.0 - -Syntax: - HELP <-- display HELP.HLP -or - HELP filename.typ <-- display HELP file - (iæ 'typ§ omitted¬ HLÐ ió used) - -Function: - - HELР displayó HELÐ fileó iî aî interactivå waù tï  thå -useò oî hió consolå CRT®  Iô ió alsï ablå tï prinô selecteä -screens or information sections on the printer. - -Options: - None - - -Comments: - See text - -Selected Error Messages: - See appropriate information section - -Examples of Use: - - HELP - -- display HELP.HLP - - HELP myfile - -- display myfile.HLP - - HELP myfile.txt - -- display myfile.txt - -:2 - -Command: HELPCK 1.0 - -Syntax: - - HELPCK dir:ufn o <-- default file type is HLP - -Function: - - HELPCË ió useä tï checë thå syntaø oæ á HELÐ file®  Iô -analyzeó  thå file¬  providinç á varietù oæ  statisticó  anä -reportinç  oî  structuraì errors®  Theså reportó includå  á -listinç oæ thå optionó iæ thå filå ió user-indexed¬ anä thió -listinç caî bå manuallù checkeä bù thå useò tï seå thaô  alì -optionó  arå  includeä  anä nï  additional¬  hiddeî  optionó -exist. - -Options: - P - Send report to Printer - - -Comments: - - None - -Selected Error Messages: - - Messages as self-explanatory - -Examples of Use: - - HELPCK myhelp - -- report on myhelp.HLP - -:3 - -Command: HELPPR 1.0 - -Syntax: - - HELPPR afn1,afn2,... o... - -Function: - - HELPPÒ  ió useä tï prinô ouô á HELР file®  Iô  breakó -pageó  oî  eacè informatioî sectioî anä ignoreó  forí  feedó -(useä  tï  separatå frames)¬  sï thå datá ió presenteä iî  á -sequentiaì  fashion®  Thió  tooì  ió  usefuì  iî  providinç -printouts of HELP files in a reasonable format. - - -Options: - - H@head@ Heading Text which appears at the top of - each page - I Inspect Files (select) before printing - L Number each line - Occ Offset each line by cc spaces - Snn Skip to page nn before beginning print - T (If TIMELIB installed) turn off time display - -Comments: - - HELPÒ  ió preferreä oveò PRINÔ foò printinç HELР fileó -becauså  oæ HELPPR'ó knowledgå oæ thå internaì structurå  oæ -HELP files and its special way of formatting their printout. - - -Selected Error Messages: - - Error Messages are Self-explanatory - -Examples of Use: - - HELPPR myfile1,myfile2 o5 - -- prinô  myfile1.HLÐ anä myfile2.HLÐ offseô bù  µ -spaces on each line - - HELPPR myfile s5 - -- print myfile.HLP starting at the 5th page - -:W - - Welcome to the HELP Command - - Welcomå  tï  thå HELÐ Command¡  Thå HELÐ Commanä  ió -designeä tï assisô you¬  thå ZCPR³ user¬  iî thå uså oæ -ZCPR³   iî  generaì  anä  specifiã  ZCPR³  commandó   iî -particular®  Iô ió designeä aó aî  interactive¬  on- -linå assistancå system. - - HELР pulló iî fileó nameä .HLÐ froí disë anä -displayó  theså tï thå useò iî á pageä mode®  Theså  fileó -arå oæ twï basiã typeó -- indexeä anä non-indexed. - - - Indexeä fileó arå thoså HELÐ fileó whicè starô witè  aî -index®  Thió  ió aî examplå oæ aî indexeä  file®  Wheî -HELР loadó aî indexeä file¬  iô displayó thió indeø tï -thå  useò  anä allowó hií tï selecô entrieó  froí  it®  Thå -useò  maù selecô aó manù entrieó aó hå desireó iî anù  ordeò -hå  desireó bù simplù typinç thå letteò oæ hió  selection® -Oncå thå useò haó madå hió selection¬  HELÐ wilì looë uð thå -bodù  oæ texô hå selecteä anä displaù iô tï hií iî á  pageä -mode®  Wheî thå useò haó finisheä readinç hió selection¬ -HELР theî  returnó  hií tï  thå  indeø  menu®  Typinç  á -Control-à wilì returî thå useò tï ZCPR3. - - Therå  arå  twï  typeó oæ indexeä  HELР fileó  - user- -indexeä anä HELP-indexed®  Á user-indexeä HELÐ filå ió  onå -iî  whicè  thå writeò oæ thå HELÐ filå ió alloweä tï  creatå -thå imagå oæ thå indeø oî hió screeî iî thå forí whicè  wilì -bå displayeä tï thå useò oæ thå HELÐ file®  Thió ió á user- -indexeä  HELÐ file® - - - Á  HELP-indexeä HELÐ filå ió onå whicè containó á  lisô -oæ thå optionó aô thå beginninç oæ it¬  anä HELÐ createó thå -menu¬  assigninç sequentiaì letteró (A¬  B¬ etc© tï thå menõ -options. - - Non-indexeä  fileó arå thoså HELÐ fileó whicè dï noô -starô  witè  aî  index®   Iî  sucè  cases¬   HELР wilì -immediatelù  displaù thå contentó oæ thå filå tï  thå  useò -and¬  wheî thå useò haó finisheä lookinç aô it¬  HELÐ wilì -returî tï ZCPR3. - - - HELÐ ió menu-driven¬  anä alì thå commandó availablå tï -thå useò aô anù giveî timå arå displayeä tï him® - - Thå  versioî  oæ  HELÐ describeä iî thió  HLР filå  ió -designeä tï worë witè thå ZCPR³ systeí anä takå advantagå oæ -somå oæ itó speciaì features. - - - Richard Conn -:U - - How to Use the HELP Command - - The HELP Command is executed in one of three ways: - - (1) by just typing 'HELP' - (2) by typing 'HELP FILENAME', where FILENAME - is the name of a disk file named FILENAME.HLP - (3) by typing 'HELP FILENAME.TYP', where - FILENAME.TYP is the name of a file created in - the format of a help file - - Iæ thå useò typeó jusô 'HELP'¬ hå wilì revie÷ thå filå -HELP.HLP¬ whicè shoulä contaiî á brieæ summarù oæ ho÷ tï uså -thå HELÐ command®  Foò alì otheò formó oæ thå HELÐ command¬ -thå  useò  wilì  seå thå specifieä  helð  filå  information® -Generallù  speaking¬  thå namå oæ thå helð filå  shoulä  bå -indicativå  oæ itó subject¬  likå CPM.HLÐ shoulä  contaiî -helð informatioî oî ZCPR3. - - - The HELP File Search Hierarchy - - Wheneveò  HELÐ lookó foò á specifieä HELÐ Filå (eitheò -froí  thå HELÐ Commanä oò froí aî  Informatioî  Sectioî -whicè specifieó á Nodå [seå later])¬  HELÐ wilì perforí -á  searcè  foò  thå indicateä file®  Thió searcè  goeó  aó -follows: - - 1®  Undeò  ZCPR3¬  HELÐ wilì follo÷ thå  command- -searcè  path®   Aó  such¬  HELР wilì  searcè  thå  currenô -directorù (disë anä user© first. - - 2® Iæ thå HLÐ filå ió noô founä undeò thå currenô -directory¬ HELÐ wilì searcè alonç thå ZCPR³ patè foò it. - - -(Continued Next Frame) - -HELP File Search Hierarchy, Continued - - 3®  Iæ  thå HLÐ filå ió noô founä alonç thå ZCPR³ -path¬  theî HELÐ wilì looë iî thå directorù nameä "HELP¢ foò -thå indicateä file® Thió ió á majoò differencå betweeî HELÐ -anä otheò ZCPR³ utilities. - - 4®  Iæ thå HLÐ filå ió noô found¬ HELÐ wilì prinô -aî erroò message. - - -:M - - Moving Around within the HELP Command - - Oncå  thå  useò ió runninç HELP¬  hå ió giveî á seô  oæ -commandó  bù  whicè hå caî displaù thå particulaò  itemó  oæ -informatioî hå ió interesteä in. - - Afteò issuinç thå HELÐ command¬ thå useò wilì comå uð -iî  onå  oæ  twï modeó (dependinç oî thå typå oæ  HELР filå -referenced)®  Iî  Indexeä  Mode¬  á  Menõ  oæ  topicó  ió -displayeä tï thå useò anä hå caî selecô thå desireä topiã -bù  typinç thå characteò iî fronô oæ thå topiã  title»  iî -Non-Indexeä Mode¬  nï menõ ió displayeä anä thå entirå -filå ió vieweä aó onå Informatioî Section. - - - Aî  Informatioî  Sectioî  ió  á  collectioî  oæ  screeî -displayó  (onå  screeî  fulì  oæ  text©  calleä  Frames® -Typically¬ aî Informatioî Sectioî shoulä contaiî á logicaì -groupinç oæ relateä datá oî á particulaò topic® Iî Indexeä -Mode¬  eacè Menõ topiã referó tï aî Informatioî Section®  Bù -selectinç á topic¬  thå useò ió placeä intï aî  Informatioî -Section®  Iî Non-Indexeä Mode¬  thå entirå HELÐ filå ió onå -Informatioî Section. - - - Moving From the Menu - - Aô  thå Menõ oæ á HELÐ file¬  thå useò haó twï  basiã -options®  Theså  optionó  arå tï selecô á Menõ  topiã  tï -revie÷ oò tï exiô tï ZCPR3® Iæ á Menõ topiã ió selected¬ -thå useò ió placeä intï thaô Informatioî Section. - - Á  thirä  optioî  aô  thå  Menõ oæ  á  HELР filå  ió -sometimeó  available®  Thió  optioî ió tï movå uð  tï  thå -previouó  HELР Level®  Somå Informatioî  Sectionó  arå -entirå HELÐ fileó iî theiò owî right¬ whicè caî bå accesseä -independentlù  oæ thå HELÐ filå thå useò ió  currentlù  in® -Iæ  thå useò enteró onå oæ theså Informatioî  Sections¬  thå -namå  oæ  thå currenô HELÐ filå ió saveä anä thå  ne÷  HELÐ -filå ió loaded®  Wheî thió happens¬ thå useò ió placeä aô -thå  nexô  HELР Leveì  (aî  ascendinç  number¬  wherå  thå -originaì  HELÐ filå ió aô HELÐ Leveì 0¬  á HELÐ filå calleä -froí thió leveì ió aô HELÐ Leveì 1¬  etc.)®  Wheî thå useò -ió aô á loweò HELÐ Leveì (useò ió NOÔ aô HELÐ Leveì 0)¬  hå -haó thå optioî tï movå tï thå nexô higheò HELÐ Level. - - Thå  concepô oæ movinç betweeî HELÐ Leveló  ió  deriveä -froí  thå  concepô  oæ á Treå datá structurå  froí  Computeò -Science®  Iî thió concept¬ thå useò startó aô thå rooô oæ -thå  treå anä theî climbó uð anä dowî thå treå tï  variouó -levels¬ oò nodes® Froí eacè node¬ thå useò maù onlù movå -uð oò dowî thå treå -- hå can'ô crosó oveò tï á nodå aô thå -samå leveì withouô firsô movinç dowî thå treå anä theî bacë -up® Tï illustrate¬ consideò thå following: - - - Node A Node B HELP Level - _________ ____________ 5 - \ Node C / - -------------- 4 - \ Node D Node E - ------------ ---------------- 3 - \ Node F / Node G - --------------------------- ----------- 2 - \ Node H / Node I - -------------------------- ------- 1 - \ Node J / -Root of Tree --> -------------------------- 0 - - - Iî thå abovå example¬  thå useò musô alwayó starô  aô -thå  rooô oæ thå treå (Nodå J)®  Thió ió analogouó tï  HELÐ -Leveì 0¬ whicè ió wherå thå useò ió placå wheî hå issueó thå -HELÐ Command® Tï geô tï Nodå C¬ foò example¬ thå useò haó -tï climâ thå treå froí Nodå Ê tï Nodå È tï Nodå Æ tï Nodå Ä -tï  Nodå C®  Thió woulä bå likå thå useò enterinç ´  Node- -Typå  Informatioî Sections¬  iî whicè differenô HELР fileó -arå successivelù loaded. - - No÷ thaô thå useò ió aô Nodå C¬ let'ó saù thaô hå wantó -tï gï tï Nodå E®  Undeò thå HELÐ System¬ therå arå twï wayó -tï dï this: - 1®  Jumð  ofæ oæ thå treå anä theî climâ bacë -uð tï Nodå E®  Here¬  thå useò woulä jumð froí Nodå à tï -Nodå  Ê anä theî gï tï Nodå È tï Nodå Æ tï Nodå  E®  Undeò -HELP¬  thå  useò  caî  dï thió bù exitinç tï ZCPR3  anä  theî -reissuinç  thå HELÐ Commanä oò bù issuinç thå  Rooô  Commanä -(.)»  oncå aô thå rooô oæ thå tree¬ hå theî climbó iô -agaiî bù enterinç thå appropriatå Informatioî Sections. - - 2®  Climâ dowî thå treå anä theî bacë up®  Thå -useò  woulä  movå froí Nodå à tï Nodå Ä tï Nodå Æ  anä  theî -bacë  uð  tï Nodå E®  Thå HELÐ useò caî gï tï thå  previouó -leveì bù issuinç thå Uð Leveì (^© command® Iî thió example¬ -hå woulä Uð Leveì twicå anä theî gï bacë down. - - - Moving Within An Information Section - - Oncå thå useò ió withiî á textuaì Informatioî  Section¬ -hå  haó severaì capabilitieó foò movinç withiî thió  sectioî -anä ouô oæ thió section. - - First¬ tï movå ouô oæ aî Informatioî Section¬ thå useò -caî  returî  tï  thå  menõ (iæ thå  currenô  HELР filå  ió -Indexed© oò returî tï ZCPR3® Additionally¬ iæ thå useò ió -noô  oî  thå  rooô (HELÐ Leveì 0)¬  hå  caî  returî  tï  thå -previouó  HELÐ Leveì (Uð Level)®  Iæ thå useò ió noô iî  aî -Indexeä  HELР file¬  movinç  forwarä  beyonä  thå  Enä  oæ -Informatioî  (EOI©  wilì returî hií tï ZCPR³ iæ hå  ió  aô -HELР Leveì  ° oò returî hií tï thå previouó HELР Leveì  iæ -not. - - - Tï  movå  withiî aî Informatioî Section¬  thå  datá  ió -arrangeä  sequentially®  Consequently¬  thå useò caî  movå -Forwarä tï thå nexô Frame¬  Backwarä tï thå previouó Frame¬ -oò tï thå beginninç oæ thå Informatioî Section®  Thå useò -cannoô movå backwarä beyonä thå beginninç oæ thå Informatioî -Section¬  anä á belì ió sounded®  Also¬ iæ thå useò trieó -tï movå forwarä beyonä thå Enä oæ Informatioî (EOI)¬  hå ió -eitheò returneä tï thå Menu¬  returneä tï ZCPR3¬ oò returneä -tï thå previouó HELÐ Leveì aó describeä above. - -:P - HELP Command Prompts - - Thå   followinç  arå  thå  basiã  promptó  foò  useò -commanä whicè HELÐ displayó tï thå user. - -^C=ZCPR3 ^=Level .=Root M=Menu S=Start L=Last P=Print - - \ \ \ \ \ \ \__Print Info/Frame - \ \ \ \ \ \__Goto Last (Previous) Frame - \ \ \ \ \__Goto Start of Info Section - \ \ \ \__Goto Menu of HELP File - \ \ \__Goto Root if NOT at Level 0 - \ \ (this is displayed only if NOT at Level 0) - \ \__Goto Previous Level - \ (this is displayed only if NOT at Level 0) - \__Return to ZCPR3 - - EOÉ ^C=ZCPR3 ^=Leveì .=Rooô M=Menõ S=Starô L=Lasô P=Prinô - - \ \________\_______\________\_______\_______\_______\__Same as - \ Above - \__User is at the End of Information (end of Information Section) - -Type ^C=ZCPR3 ^=Level .=Root or Enter Selection - - \ \ \ \__Enter letter of desired - \ \ \ Information Section - \ \ \__Goto Root - \ \ (this is displayed only if NOT at Level 0) - \ \__Goto Previous Level - \ (this is displayed only if NOT at Level 0) - \__Return to ZCPR3 - - Preceedinç eacè oæ thå abovå promptó ió aî indicatoò -oæ  thå HELÐ Leveì anä Framå Numbeò thå useò ió  currentlù -at® Thió indicatoò maù takå thå followinç forms: - - - \__The user is at the Menu of Level 0 - -fff: - \__Current Frame Number within Information Section - (the user is at Level 0) - -Level lll/ - \__Current Level Number (The user is at a Menu Frame) - (this is displayed only if the user is NOT at Level 0) - -Level lll/fff: - \ \__Current Frame Number within Information Section - \__Current Level Number - (this is displayed only if the user is NOT at Level 0) - - - Summary of User Commands - - Cmd Meaning - ^ Go to Previous Level - . Go to Root Level - M Go to Menu of Current HELP File - S Go to Start of Information Section - L Go to Previous Frame - CR (Carriage Return or Space) Go to Next Frame - ^C (Control-C) Return to ZCPR3 - P Print Current Screen Display (Frame) or Information Section - -:O - Printing HELP Files - - Printinç HELÐ Fileó caî bå donå iî twï basiã wayó -- bù -usinç  thå  HELPPÒ Utilitù oæ ZCPR³ oò bù  usinç  thå  Prinô -functioî containeä withiî thå HELÐ Utilitù itself. - - Thå  HELPPÒ  Utilitù  ió useä tï prinô aî  entirå  Helð -File®  Iô actó á loô likå thå PRINÔ command¬  anä iô haó  á -varietù  oæ  options¬  includinç  thå abilitù  tï  plaî  foò -printeò  outpuô anä tï supporô paginç anä otheò "appearance- -enhancing¢ features. - - Thå  Prinô  Functioî  withiî HELР ió  useä  foò  quicë -printouts® Iô doeó noô pagå oò perforí anythinç morå exotiã -thaî  simplù  printinç ouô whaô ió containeä iî á parô oæ  á -Helð File®  Wheî thå Ð optioî ió given¬  thå currenô screeî -ió printeä immedately® Thå useò maù alsï issuå á ^Ð commanä -(noô  displayeä  oî  anù menu)¬  iî whicè  caså  thå  entirå -informatioî sectioî hå ió currentlù iî ió printed. - - - Thió Prinô Functioî ió provideä aó á conveniencå tï thå -user® Iô allowó thå useò tï revie÷ thå Helð File¬ and¬ wheî -hå  seeó á particulaò screeî displaù oò informatioî  sectioî -whicè  hå  valueó enougè tï wanô tï havå arounä  foò  futurå -referencå iî hardcopù form¬ hå caî simplù telì HELÐ tï prinô -it®  Thió capabilitù ió intendeä tï supporô thå concepô  oæ -establishinç  HLÐ fileó aó á convenienô anä flexiblå waù  tï -pasó  documentatioî  oæ programó tï thå useò oî  disë  whilå -simultaneouslù  allowinç hií tï easilù prinô iô ouô iæ iô ió -oæ significanô interesô tï him. - - - Foò instance¬  á HLÐ filå whicè referó tï á ne÷ prograí -maù  contaiî  aî  Informatioî Sectioî  oò  onå  Framå  whicè -containó á commanä summary®  Thå useò caî simplù prinô thió -withouô havinç thå prinô thå entirå HLÐ file. - - Aó anotheò example¬ thå HELÐ subsysteí maù bå useä bù á -homemakeò tï keeð heò recipeó on®  Organizeä usinç thå treå -structurå   intï  reasonablå  catagorieó  (sucè  aó  roasts¬ -desserts¬ etc)¬ whilå reviewinç thå recipeó shå maù finä onå -shå wisheó tï trù foò thå evening'ó meaì oò tï pasó oî tï  á -friend® Iæ thå recipå coveró onlù onå screen¬ á Framå Prinô -ió verù convenient. - -:E - HELP Error Messages - - Thå  followinç  arå thå erroò messageó  issueä  bù -HELÐ anä theiò meanings: - -File not Found - The specified HELP File cannot be found. - -AFN Not Allowed - Thå  specifieä  HELÐ Filå ió  ambiguouó  (containó  thå -characteò "*¢ oò "?")® Thió ió noô allowed. - - - The user issued an invalid command. - -EOF on HELP File - Iî searchinç foò aî Informatioî Section¬  HELÐ raî intï -thå  enä  oæ  thå HELÐ File®  Thå Indexeä HELР Filå  ió -improperlù structureä (morå indeø entrieó thaî  Informatioî -Sections). - -Node Level Limit - Thå  limiô  oæ  thå  nestinç  oæ  thå  HELР Leveló  ió -exceeded® HELÐ limitó thå numbeò oæ HELÐ Leveló thaô caî bå -traverseä  tï 1° (default¬  whicè caî bå changed)¬  anä aî -attempô waó madå tï enteò HELÐ Leveì 1± (oò defaulô « 1). - -Mem Full - Thå  selecteä HELÐ Filå ió toï largå tï loaä  intï  thå -availablå memorù iî thå user'ó computeò system®  Thå HELÐ -Filå  shoulä  bå reduceä iî size»  usinç HELР Leveló  (Nodå -references© iî thå Informatioî Sectionó ió á gooä waù tï dï -this. - -:H - How to Write HELP Files - - Fileó useä bù thå HELÐ prograí arå eitheò simplå CP/M- -standarä   fileó  oæ  ASCIÉ  texô  oò  ASCIÉ   fileó -generateä  bù  thå Worä Staò  texô  editor/formatter® -Theså  files¬  aó mentioneä above¬  arå oæ twï basiã  typesº -indexeä  anä non-indexed¬  anä eacè typå ió relateä tï thå -otheò anä ió oæ thå samå basiã format. - - Grouping of Information - - Informatioî  displayeä  tï thå useò ió groupeä  bù  thå -indeø  iî  indexeä HELÐ fileó anä maù alsï bå  groupeä  bù -lineó beginninç witè Forí Feeä (^L©  characters®  Groupinç -ió  aî effectivå waù tï logicallù organizå informatioî  sï -thaô  meaninç  wilì bå morå cleaò tï thå useò anä  unitó  oæ -informatioî wilì noô pasó betweeî screeî displays. - - - Thå informatioî displayeä tï thå useò ió organizeä intï -logicaì   unitó  calleä  Informatioî  Sectionó  anä   screeî -displayó  (onå screeî fulì oæ text© calleä  Frames®  Usinç -texô  editors¬  thå  useò caî creatå hió owî HELÐ fileó  anä -organizå  hió informatioî aó hå desireó foò displaù  tï  thå -HELÐ user. - - - Non-Indexed HELP Files - - Non-indexeä  HELР fileó arå simplå ASCIÉ  fileó  whicè -starô  witè  á coloî (:© aó thå firsô characteò oæ thå  filå -anä  consisô oæ ASCIÉ texô (witè eacè linå terminateä  bù  á -carriagå  returî anä linå feeä characteò combination)®  Thå -informatioî  iî  sucè á helð filå consistó  oæ  alì  texô -afteò thå leadinç coloî uð tï eitheò thå terminatinç end- -of-filå marë (control-Z© oò á ne÷ linå whicè startó witè á -colon. - - - Indexed HELP Files - - Indexeä  HELР fileó arå simplå ASCIÉ fileó whicè  dï -noô starô witè á coloî (:© aó thå firsô characteò oæ  thå -file®  Aî  indexeä  HELÐ filå maù bå HELP-indexeä oò  user- -indexed. - - Thå  HELP-indexeä  HELÐ filå consistó oæ onå oò  morå -normaì  ASCIÉ  texô lineó aó thå firsô lineó  oæ  thå  filå -followeä  bù  informatioî sectionó whicè begiî witè  á  linå -whoså  firsô  characteò ió á coloî anä enä witè  eitheò -thå  firsô linå oæ thå nexô informatioî sectioî  oò  thå -enä  oæ  thå file®  Theså openinç lineó (beforå  thå  firsô -informatioî section© forí thå indeø entries¬  anä HELР wilì -labeì theså lineó witè A¬  B¬ etc¬ durinç thå displaù oæ thå -index. - - - Thå  user-indexeä HELÐ filå containó á semicoloî (;© aó -thå  firsô characteò iî thå file®  Thå texô whicè  follows¬ -startinç  oî thå nexô line¬  ió displayeä literallù  tï  thå -useò aó thå menu®  Eacè informatioî sectioî ió denoteä bù á -linå  startinç witè á coloî (:)»  thå coloî ió followeä bù á -serieó  oæ  characteró (spaceó arå noô  significanô  betweeî -them© whicè arå thå indeø letters®  Wheî thå useò runó HELÐ -oî  thió filå anä typeó á selectioî  letter¬  HELР searcheó -througè  thå file¬  lookinç foò aî informatioî sectioî whoså -linå  containó  thå characteò typeä bù  thå  user®  Iæ  thå -characteò  waó á letter¬  iô ió automaticallù capitalizeä bù -HELР (iî  botè thå useò inpuô anä thå  informatioî  sectioî -lines). - - Á  coloî (:© ió noô á valiä optioî letter¬  sincå  thió -characteò haó á speciaì meaninç tï HELÐ (seå later)®  Iæ  á -coloî ió encountereä iî aî informatioî sectioî headinç line¬ -the scan for option characters stops for that line. - - - Tree Structures within Indexed HELP Files - - Thå  Indexeä  HELР Filå ió  divideä  intï  Informatioî -Sections¬  wherå  eacè  Informatioî Sectioî startó  witè  á -coloî  (:)®  Therå  arå  twï basiã  typeó  oæ  Informatioî -Section: - - 1®   Informatioî   Sectionó  containinç  textuaì -material»  thió typå oæ Informatioî Sectioî simplù  containó -readinç  materiaì  whicè ió organizeä intï Frames¬  wherå  á -Framå ió equaì tï onå screeî display. - - 2®  Informatioî  Sectionó whicè referencå  otheò -HELÐ files. - - - Iî  HELP-indexeä HELÐ files¬  thió typå oæ  Informatioî -Sectioî  beginó  witè twï colonó (::© insteaä oæ onå aó  iî -(1© above»  thå twï colonó arå immediatelù followeä bù  thå -namå  oæ thå HELÐ filå (thå HELÐ filå typå maù bå optionallù -specified). - - Iî  user-indexeä HELÐ files¬  thió typå oæ  Informatioî -Sectioî  containó thå indeø characteró followeä á coloî  (:© -anä thå namå oæ thå HELÐ filå (thå filå typå ió optional). - - Tï illustrate¬  thå followinç outlineó thå structurå oæ thå -twï typeó oæ Informatioî Sections: - - - HELP-Indexed HELP File Example - - :Title for Type 1 Information Section - - : [next Information Section] - - Figure: A Text (Type 1) Information Section - - - ::HLPFILE <-- for HLPFILE.HLP - : [next Information Section] - - ::HLPFILE.TYP <-- for HLPFILE.TYP - : [next Information Section] - - Figure: Examples of Node (Type 2) Information Sections - - - - User-Indexed HELP File Example - - ; - - [ Menu ] - - :x - [ Information Displayed for Selection X ] - :a - [ Information Displayed for Selection A ] - :1 b - [ Information Displayed for Selections 1 or B ] - :f :HELPFILE [ HELPFILE.HLP is invoked by Selection F ] - : z - [ Information Displayed for Selection Z ] - -:V - - Accessing Video Attributes - - Thå  displayó  generateä bù HELР arå  screen-oriented® -Undeò  ZCPR³  witè  á properly-installeä TCAÐ entrù  iî  thå -Environmenô   Descriptor¬   HELР  ió  ablå   tï   highlighô -informatioî  oî thå screeî anä creatå "flashy¢  displayó  bù -using the clear screen feature of the user's terminal. - - Uså  oæ  thå cleaò screeî featurå ió  automatic®  Eacè -frame is preceeded by a clear screen. - - Thå  writeò  oæ  á  HELР filå  caî  turî  oî  anä  ofæ -highlightinç  oæ texô anywherå iî thå HELÐ filå bù  embeddeä -the following commands into the text: - - ^A (binary 1) - turn on highlighting - ^B (binary 2) - turn off highlighting - - - Iô  ió  recommendeä thaô iæ highlightinç ió  turneä  oî -then it should be turned off in the same line. Example: - - ^Athis is highlighted^B while this is not - -generates: - - this is highlighted while this is not - - - Thió  HELÐ filå ió aî examplå oæ onå whicè  extensivelù -uses highlighting. This is also a user-indexed HELP file. - - -:T - The Tree Structure of HELP - - -- Basic HELP File -- - |Info Sect 1 |Info Sect 2 |Info Sect 3 |Info Sect 4 | - | Text | HELP File | Text | HELP File | - / \ / \ - -- SubHelp File 1 -- -- SubHelp File 2 -- - |Info Sect 1 |Info Sect 2 | |Info Sect 1 |Info Sect2| - | Text | HELP File | | Text | Text | - / \ - -- SubSubHelp File 1 -- - |Info Sect 1 |Info Sect 2 |Info Sect 3 | - | Text | HELP File | HELP File | - / \ / \ - -- Sub3Help File 1 -- -- Sub3Help File 2 -- - |Info Sect | |Info Sect 1 |Info Sect 2| - | Text | | Text | HELP File | - / \ - -- Sub4Help File -- - |Info Sect 1 |Info Sect 2| - | Text | Text | - - Thå  abovå  diagraí  ió meanô tï illustratå  ho÷  treå -structureó caî bå implementeä undeò HELP®  Á ne÷ nodå  oæ -thå  treå  ió createä wheneveò á HELÐ filå ió referenceä  bù -aî Informatioî Sectioî (aó opposeä tï simplù havinç texô iî -thå Informatioî Section)® Eacè nodå becomeó thå baså oæ -á ne÷ tree¬  whicè itselæ maù contaiî referenceó tï  otheò -HELÐ files. - - Froí thå previouó diagram¬  SubHelð Leveì ³ containó -twï  HELР files®  Theså caî bå entereä froí  Informatioî -Sectioî ² anä Informatioî Sectioî ³ oæ SubHelð Leveì 2® Bù -simplù enterinç onå oæ theså twï Informatioî Sections¬ thå -appropriatå  HELÐ filå ió loadeä anä thå useò ió placeä  aô -thå nexô level® Froí theså HELÐ files¬ thå useò maù movå -withiî  thå  HELÐ filå itselæ oò movå uð  tï  thå  previouó -leveì (naturally¬  thå useò alwayó haó thå optioî tï exiô tï -ZCPR3). - -:S - - Sample HELP Files Illustrating Use of Tree Structure - - Thå  followinç Frameó sho÷ thå sourcå tï threå HELÐ -Files¬  nameä DEMO.HLP¬ DEMO2.HLP¬ anä DEMO3.HLP® DEMO.HLÐ -ió provideó thå Rooô Nodå tï á treå whicè includeó DEMO2.HLÐ -anä DEMO3.HLÐ aó subnodes®  Additionally¬  DEMO3.HLÐ haó á -subnodå whicè referenceó DEMO.HLP¬  sï wå havå á  recursivå -treå structure. - - - DEMO.HLP - TEST 1 - OK <-- Menu - TEST 2 - SIMPLE NEST - TEST 3 - INVOLVED NEST - TEST 4 - OK - :TEST 1 <-- First Info Section (Text) - THIS - IS - TEST - 1 - ::DEMO2 <-- 2nd Info Section (Node) - ::DEMO3 <-- 3rd Info Section (Node) - :TEST 4 <-- 4th Info Section (Text) - TO BE, OR NOT TO BE, THAT IS THE QUESTION! - ... - TO TAKE ARMS AGAINST A SEA OF TROUBLES AND BY OPPOSING END THEM. - TO DIE, TO SLEEP ... TO SLEEP, PERCHANCE TO DREAM. - AYE, THERE'S THE RUB! FOR IN THAT SLEEP, WHAT DREAMS MAY COME! - - DEMO2.HLP - :TEST 2 <-- No Menu -- 1 Info Section - THIS - IS - TEST - 2 - - DEMO3.HLP - TEST 3A <-- Menu - TEST 3B - TEST 3C - :TEST 3A <-- First Info Section (Text) - THIS - IS - TEST - 3A - the rain in Spain falls mainly in the plain - - :TEST 3B <-- 2nd Info Section (Text) - THIS - IS - TEST - 3B - ::demo <-- 3rd Info Section (Node) - - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/IF.COM b/Source/Images/d_bp/u15/IF.COM deleted file mode 100644 index d6fb8eaa..00000000 Binary files a/Source/Images/d_bp/u15/IF.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/IF.HLP b/Source/Images/d_bp/u15/IF.HLP deleted file mode 100644 index 46bddf6e..00000000 --- a/Source/Images/d_bp/u15/IF.HLP +++ /dev/null @@ -1,458 +0,0 @@ -; - - - -- Flow Commands -- - - - -- IF Commands -- -- IF Condition Summaries -- - 1 Transient IF T Transient IF - 2 Resident IF R Resident IF - - - -- Others -- - 3 IF Status Display - 4 ELSE - 5 FI - 6 XIF - -:1 - -Command: IF 1.1 - -Syntax: - - IF cond args -or - IF ~cond args - -Function: - - IÆ  testó thå indicateä conditioî tï seå iæ iô ió TRUE¬ -and¬  iæ  so¬  setó  thå Flo÷ Statå tï  TRUÅ  (allowinç  thå -followinç commandó tï execute)®  Iæ thå conditioî ió FALSE¬ -thå  Flo÷ Statå ió seô tï FALSÅ (allowinç onlù Flo÷ Commandó -to execute). - - -Options: - - Option Meaning - T TRUE (Flow State is Set to TRUE) - F FALSE (Flow State is Set to FALSE) - - EMPTY afn,... If all files in the indicated list - are EMPTY (size is 0K), then Flow - State is Set to TRUE - - ERROR If the ZCPR3 Error Flag is Set, then - Flow State is Set to TRUE - - EXIST afn,... If all files in the indicated list - exist, then Flow State is Set to TRUE - - INPUT User input is enabled, and if the user - strikes T, Y, , or , the - Flow State is Set to TRUE - - NULL afn If there is no 'afn' (field is blank), - then the Flow State is Set to TRUE - - TCAP If a Z3TCAP is installed, the Flow State - is Set to TRUE - - WHEEL If the Wheel Byte is Set, the Flow State - is Set to TRUE - - reg value If the indicated register (0-9) has the - indicateä valuå (0-255)¬ thå Flow - State is Set to TRUE - - afn1=afn2 If the two AFNs are identical in name - (11 char FILENAME.TYP are same), the - Flow State is Set to TRUE - -Comments: - - Iî alì cases¬  iæ thå indicateä conditioî ió TRUE¬  thå -Flo÷  Statå ió Seô tï TRUE»  iæ thå indicateä  conditioî  ió -FALSE, the Flow State is Set to FALSE. - - Thió  commanä  ió invokeä iæ thå currenô  Flo÷  Commanä -Packagå  haó  thå IF.COÍ facilitù enabled®  Iæ thió ió  thå -case¬  wheneveò aî IÆ commanä ió issued¬  thå FCÐ wilì  loaä -IF.COÍ  froí thå ROOÔ directorù intï memorù anä executå  it® -Thå  commanä taiì ió passeä tï IF.COM¬  anä IF.COÍ actó aó á -conventionaì COÍ filå froí thaô poinô forward®  Alì bufferó -arå  loadeä correctlù (FCBó aô 5CÈ anä 6CH¬  TBUFÆ  aô  80H¬ -etc). - - - Á  leadinç  tildá  (~©  characteò  beforå  á  conditioî -negateó  thå effecô oæ thå condition®  Iæ thå conditioî  ió -FALSE¬  thå  Flo÷  Statå  ió Seô tï  TRUE¬  anä  vice-versa® -Example: - - "IF ~T" is the same as "IF F" - "IF ~NULL arg" is TRUE if 'arg' is non-blank - "IF ~EXIST afn,..." is TRUE if 'afn,...' do NOT - exist (AFN and AFN ... must each not exist) - - Foò eacè conditioî given¬ onlù thå firsô twï characteró -are significant (eg, NU for NULL). - -Selected Error Messages: - - "Nï  IÆ  Conditioî  Given¢  meanó  thaô  thå  conditioî -expressed was not one of the valid conditions. - - -Examples of Use: - - IF NULL $1 - - if the indicated parameter (from within a SUBMIT - or ZEX command file) is not provided, set the - Flow State to TRUE - - IF ~EXIST ZEX.ASM,ZEX.ZEX - - if any one of these files does not exist, the - Flow State is set to TRUE - - IF EXIST ZEX.ASM,ZEX.ZEX - - if any one of these files does not exist, the - Flow State is set to FALSE (ie, all files - must exist for a TRUE Flow State) - - - IF NEC=$1 - - if the first passed parameter is the same as - the file name "NEC.", then the Flow State - is Set to TRUE - - IF 5 5 - - if Register 5 = 5, the Flow State is Set to TRUE - -:2 - -Command: IF (as implemented in SYSFCP 1.0) - -Syntax: - - IF cond arg -or - IF ~cond arg - -Function: - - IÆ  testó thå indicateä conditioî tï seå iæ iô ió TRUE¬ -and¬  iæ  so¬  setó  thå Flo÷ Statå tï  TRUÅ  (allowinç  thå -followinç commandó tï execute)®  Iæ thå conditioî ió FALSE¬ -thå  Flo÷ Statå ió seô tï FALSÅ (allowinç onlù Flo÷ Commandó -to execute). - - Thå IÆ commanä describeä herå ió residenô withiî SYSFCÐ -1.0 when the COMIF equate is set to FALSE. - - -Options: - - Option Meaning - T The Flow State is Set to TRUE - F The Flow State is Set to FALSE - - EMPTY afn If the indicated file is empty (size is - 0K), the Flow State is Set to TRUE - - ERROR If the ZCPR3 System Error Flag is SET, - the Flow State is Set to TRUE - - EXIST afn If the indicated file exists, the Flow - State is Set to TRUE - - INPUT The user is prompted for input, and if - he responds with T, Y, , or , - the Flow State is Set to TRUE - - - NULL afn If the 2nd FCB (afn) is blank, the Flow - State is Set to TRUE - - TCAP If the ZCPR3 TCAP entry is available, - the Flow State is Set to TRUE - - WHEEL If the Wheel Byte is TRUE, the Flow - State is Set to TRUE - - reg val If the indicated register (0-9) contains - the indicated value (0-255), the - Flow State is Set to TRUE - - afn1=afn2 If the two AFNs are the same, the Flow - State is Set to TRUE - - -Comments: - - Iî alì cases¬  iæ thå indicateä conditioî ió TRUE¬  thå -Flo÷  Statå ió Seô tï TRUE»  iæ thå indicateä  conditioî  ió -FALSE, the Flow State is Set to FALSE. - - Thió  commanä  ió invokeä iæ thå currenô  Flo÷  Commanä -Packagå  haó thå IF.COÍ facilitù disabled®  Iæ thió ió  thå -case¬ wheneveò aî IÆ commanä ió issued¬ thå FCÐ wilì resolvå -iô internally. - - Eacè  oæ thå optionó oæ thå Residenô IÆ maù oò maù  noô -bå enabled®  Theså optionó arå installation-dependent¬  anä -thå SHO× commanä wilì displaù thå availablå optionó foò  anù -installation. - - - Á  leadinç  tildá  (~©  characteò  beforå  á  conditioî -negateó  thå effecô oæ thå condition®  Iæ thå conditioî  ió -FALSE¬  thå  Flo÷  Statå  ió Seô tï  TRUE¬  anä  vice-versa® -Example: - - "IF ~T" is the same as "IF F" - "IF ~NULL arg" is TRUE if 'arg' is non-blank - "IF ~EXIST afn" is TRUE if 'afn' does NOT - exist - - Foò eacè conditioî given¬ onlù thå firsô twï characteró -are significant (eg, NU for NULL). - -Selected Error Messages: - - None - - -Examples of Use: - - IF NULL $1 - - if the indicated parameter (from within a SUBMIT - or ZEX command file) is not provided, set the - Flow State to TRUE - - IF ~EXIST ZEX.ASM - - if any ZEX.ASM does not exist, the - Flow State is set to TRUE - - IF NEC=$1 - - if the first passed parameter is the same as - the file name "NEC.", then the Flow State - is Set to TRUE - - IF 5 5 - - if Register 5 = 5, the Flow State is Set to TRUE - -:3 - -Command: IFSTAT 1.0 - -Syntax: - - IFSTAT - -Function: - - IFSTAÔ ió useä tï displaù thå currenô IÆ level® IFSTAÔ -wilì  reporô  witè á Leveì Numbeò froí ± tï ¸  (IFó  maù  bå -nesteä uð tï ¸ leveló deep© oò iô wilì replù witè "Nï Activå -IF". - -Options: - - None - - -Comments: - - Thå Flo÷ Statå MUSÔ bå TRUÅ foò IFSTAÔ tï run¬ sincå iô -is a COM file like any other. - -Selected Error Messages: - - None - -Examples of Use: - - IFSTAT - -- the current IF level is displayed - -:T - Summary of Transient IF Conditions - - Option Meaning - T TRUE (Flow State is Set to TRUE) - F FALSE (Flow State is Set to FALSE) - - EMPTY afn,... If all files in the indicated list - are EMPTY (size is 0K), then Flow - State is Set to TRUE - - ERROR If the ZCPR3 Error Flag is Set, then - Flow State is Set to TRUE - - EXIST afn,... If all files in the indicated list - exist, then Flow State is Set to TRUE - - INPUT User input is enabled, and if the user - strikes T, Y, , or , the - Flow State is Set to TRUE - - NULL afn If there is no 'afn' (field is blank), - then the Flow State is Set to TRUE - - TCAP If a Z3TCAP is installed, the Flow State - is Set to TRUE - - WHEEL If the Wheel Byte is Set, the Flow State - is Set to TRUE - - reg value If the indicated register (0-9) has the - indicateä valuå (0-255)¬ thå Flow - State is Set to TRUE - - afn1=afn2 If the two AFNs are identical in name - (11 char FILENAME.TYP are same), the - Flow State is Set to TRUE - -:R - Summary of Resident IF Conditions - - Option Meaning - T The Flow State is Set to TRUE - F The Flow State is Set to FALSE - - EMPTY afn If the indicated file is empty (size is - 0K), the Flow State is Set to TRUE - - ERROR If the ZCPR3 System Error Flag is SET, - the Flow State is Set to TRUE - - EXIST afn If the indicated file exists, the Flow - State is Set to TRUE - - INPUT The user is prompted for input, and if - he responds with T, Y, , or , - the Flow State is Set to TRUE - - - NULL afn If the 2nd FCB (afn) is blank, the Flow - State is Set to TRUE - - TCAP If the ZCPR3 TCAP entry is available, - the Flow State is Set to TRUE - - WHEEL If the Wheel Byte is TRUE, the Flow - State is Set to TRUE - - reg val If the indicated register (0-9) contains - the indicated value (0-255), the - Flow State is Set to TRUE - - afn1=afn2 If the two AFNs are the same, the Flow - State is Set to TRUE - -:4 - -Command: ELSE (from SYSFCP 1.0) - -Syntax: - - ELSE anytext - -Function: - - Iæ  thå currenô Flo÷ Statå ió TRUE¬  ELSÅ toggleó iô tï -FALSE. - - Iæ thå currenô Flo÷ Statå ió FALSÅ anä thå previouó  IÆ -Leveì  ió  iî á TRUÅ State¬  ELSÅ toggleó thå Flo÷ Statå  tï -TRUE®  Iæ thå previouó IÆ Leveì ió iî á FALSÅ  State¬  ELSÅ -does nothing. - -Options: - - None (any text may follow the verb ELSE) - -Comments: - - None - -Selected Error Messages: - - No error messages are generated - -Examples of Use: - - IF NEC=$1 - < statements > - ELSE - < statements > - FI - -:5 - -Command: FI (from SYSFCP 1.0) - -Syntax: - - FI anytext - -Function: - - FÉ  terminateó  thå currenô IÆ Level®  Iæ therå ió  nï -current IF level, FI does nothing. - -Options: - None (any text may follow the verb FI) - -Comments: - None - -Selected Error Messages: - None - -Examples of Use: - - IF EXIST MYFILE.ASM - < statements > - ELSE - < statements > - FI - -:6 - -Command: XIF (from SYSFCP 1.0) - -Syntax: - - XIF anytext - -Function: - - Iæ  thå  currenô  Flo÷ Statå ió  TRUE¬  XIÆ  exitó  alì -pendinç  IFs®  Iô  reduceó  thå IÆ Leveì tï  °  (nï  IÆ  iî -effect). - - If the current Flow State is FALSE, XIF does nothing. - -Options: - None - - -Comments: - None - -Selected Error Messages: - None - -Examples of Use: - - ;=LOOP - XIF - - IF 1 3 - GOTO LOOP - FI - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/IF.MAC b/Source/Images/d_bp/u15/IF.MAC deleted file mode 100644 index 65259389..00000000 --- a/Source/Images/d_bp/u15/IF.MAC +++ /dev/null @@ -1,542 +0,0 @@ -; -; Program: IF -; Author: Richard Conn -; Modified By: Charles McManis -; Version: 1.2 -; Date: 11 Feb 85 -; Previous Versions: 1.1 (22 Apr 84) -; -version equ 12 - -; -; IF is intended to be invoked from the IF routine in an FCP. -; This program implements the IF conditional tests and sets the next level -; of IF to be TRUE or FALSE. -; -; Modified on 02/11/85 to accept ambiguous file names and match them. This -; allows aliases to add file extensions if they are needed, for instance -; if there is an alias LDIR that gets a directory of an .LBR file, it -; previously had to be defined as an example : -; -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -noise equ 0 ;set to 1 for noisey (message) operation -negchar equ '~' ;negation prefix char -bdos equ 5 -fcb1 equ 5ch -fcb2 equ 6ch -tbuff equ 80h -cr equ 0dh -lf equ 0ah -bel equ 07h - -; -; External Z3LIB and SYSLIB Routines -; - ext z3init,strtzex,stopzex,geter1,getreg,ift,iff,getenv - ext eval10,print,capine,codend,sksp,sknsp,zfname,cout - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment - jmp ifstart -; -; Condition Table -; -condtab: - db 'T ' ;TRUE - dw ifctrue - db 'F ' ;FALSE - dw ifcfalse - db 'EM' ;file empty - dw ifcempty - db 'ER' ;error message - dw ifcerror - db 'EX' ;file exists - dw ifcex - db 'IN' ;user input - dw ifcinput - db 'NU' ;null argument - dw ifcnull - db 'TC' ;Z3TCAP Entry Loaded - dw ifctcap - db 'WH' ;Wheel Byte - dw ifcwheel - db 0 - -; -; FCP Extension Command: IF -; -ifstart: -; -; Advance to Next Line if Noisey -; - IF NOISE - mvi a,lf - call cout - ENDIF ;NOISE -; -; Test for Equal Sign in Line and Process FCB1=FCB2 form if so -; - lxi h,tbuff+1 ;pt to buffer -ifteq: - mov a,m ;look for = - inx h ;pt to next - ora a ;done if EOL - jz ifck0 - cpi '=' ;equal? - jnz ifteq - lxi h,fcb1+1 ;= found, so compare FCB1 and FCB2 - lxi d,fcb2+1 - mvi b,11 ;11 chars -ifteq1: - ldax d ;compare -; ** Such a small change really. - cpi '?' ; see if an AFN was specified - jz okchar ; always match a ? - mov c,a ; save it in C temporarily - mov a,m ; get the other character - cpi '?' ; see if it is a ? - jz okchar ; if so accept it as a match - cmp c -; ** This allows IF $1=* and IF $1=*.?q? etc -; cmp m ; this guy is no longer needed. - jnz ifcf ;FALSE if no match -okchar: - inx h ;advance - inx d - dcr b ;count down - jnz ifteq1 - jmp ifct ;TRUE if match -; -; Test Condition in FCB1 and file name in FCB2 -; Execute condition processing routine -; -ifck0: - lxi d,fcb1+1 ;pt to first char in FCB1 - ldax d ;get it - cpi '/' ;help? - jz ifhelp - cpi ' ' ;also help - jz ifhelp - sta negflag ;set negate flag - cpi negchar ;is it a negate? - jnz ifck1 - inx d ;pt to char after negchar -ifck1: - call regtest ;test for register value - jnz runreg - call condtest ;test of condition match - jnz runcond ;process condition - IF NOISE - call print - db ' No IF Condition Given',0 - ret - ELSE ;NOT NOISE - mvi a,bel - jmp cout - ENDIF ;NOISE -; -; Print Help Message -; -ifhelp: - IF NOT NOISE - mvi a,lf ;leading new line - call cout - ENDIF ;NOT NOISE - call print - db 'IF, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db ' - Conditional Test' - db cr,lf,'Syntax:' - db cr,lf,' IF condition arguments -or- IF ~condition arguments' - db cr,lf,'where a leading "~" negates the effect of the ' - db 'IF Condition' - db cr,lf,'Possible IF Conditions are:' - db cr,lf,' T Always TRUE' - db cr,lf,' F Always FALSE' - db cr,lf,' EMPTY T if Files are Empty' - db cr,lf,' ERROR T if Error Flag Set' - db cr,lf,' EXIST T if Files Exist' - db cr,lf,' INPUT T if User Hits T, Y, CR, or SP' - db cr,lf,' NULL arg T if No Arg Follows' - db cr,lf,' TCAP T if ZCPR3 TCAP Available' - db cr,lf,' WHEEL T if Wheel Byte Set' - db cr,lf,' reg value T if Register reg = value' - db cr,lf,' fcb1=fcb2 T if the Two FCB values are =' - db cr,lf,'Only first 2 letters of keywords are required' - db cr,lf,'The leading "~" is effective with all conditions except' - db ' fcb1=fcb2' - db 0 - ret -; -; Process register - register value is in A -; -runreg: - push psw ;save value - call getnum ;extract value in FCB2 as a number - pop psw ;get value - cmp b ;compare against extracted value - jz ifctrue ;TRUE if match - jmp ifcfalse ;FALSE if non-match -; -; Process conditional test - address of conditional routine is in HL -; -runcond: - pchl ;"call" routine pted to by HL - -; -; Condition: NULL (2nd file name) -; -ifcnull: - lda fcb2+1 ;get first char of 2nd file name - cpi ' ' ;space = null - jz ifctrue - jmp ifcfalse - -; -; Condition: TCAP -; -ifctcap: - call getenv ;get ptr to ZCPR3 environment descriptor - lxi d,80h ;pt to TCAP entry - dad d - mov a,m ;get first char - cpi ' '+1 ;space or less = none - jc ifcfalse - jmp ifctrue - -; -; Condition: WHEEL -; -ifcwheel: - call getenv ;get ptr to ZCPR3 environment descriptor - lxi d,29h ;pt to Wheel Byte address - dad d - mov a,m ;get low - inx h - mov h,m ;get high - mov l,a ;put low - mov a,m ;get Wheel Byte - ora a ;0=not wheel - jz ifcfalse - jmp ifctrue - -; -; Condition: TRUE -; IFCTRUE enables an active IF -; Condition: FALSE -; IFCFALSE enables an inactive IF -; -ifctrue: - call negtest ;test for negate - jz ifcf ;make IF FALSE -ifct: - IF NOISE - call print - db ' IF T',0 - ENDIF ;NOISE - call ift ;make IF TRUE - rnz - jmp ifovfl -ifcfalse: - call negtest ;test for negate - jz ifct ;make IF TRUE -ifcf: - IF NOISE - call print - db ' IF F',0 - ENDIF ;NOISE - call iff ;make IF FALSE - rnz -ifovfl: - IF NOISE - call print - db ' IF Overflow',0 - ret - ELSE ;NOT NOISE - mvi a,bel - jmp cout - ENDIF ;NOISE - -; -; Condition: INPUT (from user) -; -ifcinput: - IF NOT NOISE - mvi a,lf ;new line - call cout - ENDIF ;NOT NOISE - call stopzex ;suspend ZEX input - call print - db ' IF True? ',0 - call capine - call strtzex ;resume ZEX input - cpi 'T' ;true? - jz ifctrue - cpi 'Y' ;yes? - jz ifctrue - cpi cr ;new line? - jz ifctrue - cpi ' ' ;space? - jz ifctrue - jmp ifcfalse - -; -; Condition: EXIST filename.typ -; List of Files Permitted -; -ifcex: - call skip2 ;skip to 2nd token - jz ifctrue ;declare TRUE if none -; -; Extract Next File -; -ifcex1: - lxi d,fcb1 ;pt to FCB - call zfname ;convert text - push h ;save ptr to next char -; -; Log Into to DU and Search for File -; - call tlog ;log into DU - lxi d,fcb1 ;pt to fcb - mvi c,17 ;search for first - call bdos - inr a ;set zero if error -; -; Abort as FALSE if File Not Found -; - pop h ;get ptr to next char - jz ifcfalse -; -; Advance to Next File, if Any -; - mov a,m ;more to follow? - inx h - cpi ',' - jz ifcex1 -; -; All Files Exist if No More Files -; - jmp ifctrue ;all found, so TRUE - -; -; Condition: EMPTY filename.typ -; -ifcempty: - call skip2 ;skip to 2nd token - jz ifctrue ;TRUE if none -; -; Select Next File -; -ifcem1: - lxi d,fcb1 ;pt to FCB1 - call zfname ;convert - push h ;save ptr to next -; -; Log into DU and Try to Open File -; - call tlog ;log into FCB1's DU - lxi d,fcb1 ;pt to fcb1 - mvi c,15 ;open file - push d ;save fcb ptr - call bdos - pop d - inr a ;not found? -; -; File is Empty if Not Found -; - jz ifemt -; -; Try to Read one Record from File -; - mvi c,20 ;try to read a record - call bdos - ora a ;0=OK -; -; File is Empty if Can't Read Record -; - jnz ifemt ;NZ if no read - pop h ;file not empty -; -; File Exists and Contains Something -; - jmp ifcfalse ;so EMPTY condition is FALSE -; -; File is Empty - Advance -; -ifemt: - pop h ;pt to next char - mov a,m ;get next char - inx h - cpi ',' ;more to come? - jz ifcem1 -; -; Done and True if No More Files - All are Empty -; - jmp ifctrue ;all empty, so TRUE - -; -; Condition: ERROR -; -ifcerror: - call geter1 ;get error byte - jz ifctrue - jmp ifcfalse - -; -; **** Support Routines **** -; - -; -; Save TBUFF and skip to 2nd token -; -skip2: - lxi d,tbuff+1 ;pt to first char - call codend ;pt to free area -skip2a: - ldax d ;get next char - mov d - ora a ;done? - jnz skip2a - call codend ;skip over spaces - call sksp - call sknsp ;skip over 1st token - call sksp ;skip over spaces - mov a,m ;get 1st char of 2nd token - ora a ;return with Z if none - ret - -; -; Convert chars in FCB2 into a number in B -; -getnum: - lxi h,fcb2+1 ;pt to first char - call eval10 ;evaluate - mov b,a ;value in B - ret - -; -; Log into DU in FCB1 -; -tlog: - lda fcb1 ;get disk - ora a ;current? - jnz tlog1 - mvi c,25 ;get disk - call bdos - inr a ;increment for following decrement -tlog1: - dcr a ;A=0 - mov e,a ;disk in E - mvi c,14 - call bdos - lda fcb1+13 ;pt to user - mov e,a - mvi c,32 ;set user - jmp bdos - -; -; Test of Negate Flag = negchar -; -negtest: - lda negflag ;get flag - cpi negchar ;test for No - ret - -; -; Test FCB1 against a single digit (0-9) -; Return with register value in A and NZ if so -; -regtest: - ldax d ;get digit - sui '0' - jc zret ;Z flag for no digit - cpi 10 ;range? - jnc zret ;Z flag for no digit - mov b,a ;register number in B - call getreg ;get register value - mov b,a ;save value - xra a ;set NZ - dcr a - mov a,b ;get register value - ret -zret: - xra a ;set Z - ret - -; -; Test FCB1 against condition table (must have 2-char entries) -; Return with routine address in HL if match and NZ flag -; -condtest: - lxi h,condtab ;pt to table -condt1: - mov a,m ;end of table? - ora a - rz - ldax d ;get char - mov b,m ;get other char in B - inx h ;pt to next - inx d - cmp b ;compare entries - jnz condt2 - ldax d ;get 2nd char - cmp m ;compare - jnz condt2 - inx h ;pt to address - mov a,m ;get address in HL - inx h - mov h,m - mov l,a ;HL = address - xra a ;set NZ for OK - dcr a - ret -condt2: - lxi b,3 ;pt to next entry - dad b ; ... 1 byte for text + 2 bytes for address - dcx d ;pt to 1st char of condition - jmp condt1 - -; -; Buffers -; -negflag: - ds 1 ;negation flag - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/IFSTAT.COM b/Source/Images/d_bp/u15/IFSTAT.COM deleted file mode 100644 index a76adaed..00000000 Binary files a/Source/Images/d_bp/u15/IFSTAT.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/IFSTAT.MAC b/Source/Images/d_bp/u15/IFSTAT.MAC deleted file mode 100644 index bab8a9d1..00000000 --- a/Source/Images/d_bp/u15/IFSTAT.MAC +++ /dev/null @@ -1,86 +0,0 @@ -; -; Program: IFSTAT -; Author: Richard Conn -; Version: 1.0 -; Date: 22 Apr 84 -; Previous Versions: None -; -version equ 10 - -; -; IFSTAT is used to display the current IF level. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -fcb equ 5ch -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext z3init,iftest,eprint,cout - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment - lda fcb+1 ;check for help - cpi '/' - jz prhelp - call iftest ;get number of current IF - jnz prnum ;print number - call eprint - db ' No Active IF',0 - ret -prnum: - call eprint - db ' Current IF Level: ',0 - adi '0' ;convert to ASCII - jmp cout - -; -; Print Help Message -; -prhelp: - call eprint - db 'IFSTAT, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db ' - Display Current IF Level' - db cr,lf,'Syntax: IFSTAT' - db 0 - ret - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/IO.HLP b/Source/Images/d_bp/u15/IO.HLP deleted file mode 100644 index a238f917..00000000 --- a/Source/Images/d_bp/u15/IO.HLP +++ /dev/null @@ -1,390 +0,0 @@ -; - - - Redirectable I/O Under ZCPR3 and SYSIO - - -- Concepts -- - 1 - ZCPR3 and SYSIO - 2 - ZCPR3 and I/O Redirection - - -- Commands -- - C - CPSEL - D - DEVICE - E - DEV - L - LDR - R - RECORD - -:1 - Redirectable I/O Under ZCPR3 - - Thå concepô oæ redirectablå I/Ï involveó thå assignmenô -oæ  physicaì  deviceó tï logicaì devices®  ZCPR³  anä  CP/Í -supporô fouò logicaì devices: - - CON: - Console - An I/O Device for User/System Commo - LST: - Printer - An Output-Only Device for Printouts - RDR: - Reader - An Input-Only Device - PUN: - Punch - An Output-Only Device - - Undeò CP/M¬  therå arå onlù fouò physicaì deviceó whicè -maù bå assigneä tï eacè oæ thå fouò logicaì devices®  Undeò -ZCPR3¬  therå  maù  bå aó manù physicaì deviceó  aó  desireä -whicè maù bå assigneä tï eacè oæ thå fouò logicaì devices. - - Á  "physicaì  device¢  iî thå traditionaì  senså  ió  á -conventionaì  I/Ï device¬  likå á CRÔ oò á Printer®  Iî thå -senså oæ ZCPR3¬  iô ió á devicå driver¬ oò bodù oæ software¬ -whicè  ió  communicateä witè viá thå  BIOS®  Thió  bodù  oæ -software¬ iî turn¬ maù communicatå witè anù devicå OÒ SEÔ OÆ -DEVICEÓ thaô iô wishes. - - SYSIÏ  ió  á  samplå seô oæ  Redirectablå  I/Ï  Driveró -designeä  tï bå useä witè ZCPR³ oî mù system®  Undeò SYSIO¬ -some of thå "physicaì devices¢ implemented are: - -CON: Devices - TTY - CRT - CRT Input and CRT/Remote Computer Output - CRT and Modem Input and CRT and Modem Output - in Parallel - CRT Input and CRT/Modem Output - -LST: Devices - TTY - CRT - Modem - Remote Computer - -RDR: and PUN: Devices - Clock - - - Aó yoõ caî see¬  thå "physicaì devices¢ undeò ZCPR³ caî -bå  combinationó  oæ  actuaì devices®  Thå  CRÔ  Inpuô  anä -CRT/Remotå Computeò Outpuô device¬  foò instance¬ ió useä tï -allo÷  á remotå computeò recorä screeî displayó whicè gï  tï -thå CRT. - - Undeò ZCPR3¬ aó manù sets¬ oò packages¬ oæ Redirectablå -I/Ï  Driveró  aó desireä caî bå created®  Eacè packagå  caî -givå  thå  useò  differenô  typeó  oæ   capabilities®   Foò -instance¬  onå  packagå caî bå likå thå abovå examplå  whilå -anotheò packagå caî providå Disë Recordinç capability¬  sucè -aó CRÔ Inpuô anä CRT/Disë Filå Output. - - - Thå  ZCPR³  Systeí oæ Programó containó fouò  utilitieó -designeä  tï  supporô thå Redirectablå  I/Ï  System®  Theså -utilitieó anä theiò functionó are: - - LDR -- Load a Redirectable I/O Package - DEVICE -- Display and Select Physical I/O Devices - DEV -- Shorthand form of DEVICE - RECORD -- Turn on and off the Recording Facility - - Thió  HELÐ Filå discusseó theså utilitieó anä ho÷  theù -arå intendeä tï bå used. - - Implementatioî  detailó foò I/Ï Packageó arå lefô tï  á -studù  oæ thå sourcå codå oæ thå samplå I/Ï Packagå anä  thå -ZCPR3 book. - -:L - Loading Redirectable I/O Drivers -- LDR - - Onå  oæ  thå manù functionó oæ LDÒ ió tï  loaä  aî  I/Ï -Packagå  intï thå propeò memorù buffer®  LDÒ performó  thió -function when given a file specification of type IOP: - - LDR myio.iop - -will load MYIO.IOP as an I/O Package. - - LDÒ  performó  á structurå checë beforå  approvinç  thå -load. - -:D - -Command: DEVICE3 1.0 (DEVICE) - -Syntax: - - DEVICE <-- Enter Interactive Command Mode - -Function: - - DEVICÅ  ió  useä  tï allo÷ thå  useò  tï  interactivelù -displaù   thå  nameó  oæ  thå  availablå  physicaì   deviceó -(actually¬  devicå  drivers©  whicè maù bå assigneä  tï  thå -logicaì  deviceó anä tï allo÷ thå useò tï assigî á  physicaì -devicå tï á logicaì devicå bù name. - - -Options: - None - -Comments: - - DEVICÅ  onlù runó iî aî interactivå mode®  Iô respondó -tï   single-characteò  commands¬   completinç  thå   commanä -sequences in response and prompting the user. - - The following commands are recognized by DEVICE: - - D - Display Device Names - - C - Select Console Device (CON:) - L - Select List Device (LST:) - P - Select Punch Device (PUN:) - R - Select Reader Device (RDR:) - - X - Exit - - - Thå Displaù Devicå Nameó commanä (D© askó thå useò  foò -the devices to display. His responses are: - - A - All - C - Consoles - L - Lists - P - Punches - R - Readers - - Thå  Exiô commanä exitó tï ZCPR³ withouô promptinç  foò -confirmation. - - Thå otheò fouò commandó (C¬ L¬ P¬ anä R© assigî deviceó -IMMEDIATELY®  Thå  useò typeó thå namå oæ thå devicå tï  bå -assigned®  Iæ hå strikeó á returî iî responså tï thå devicå -name prompt, the command is aborted. - - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - DEVICE - -- invoke utility - -:E - -Command: DEV 1.0 - -Syntax: - - DEV command,command,... - -Function: - - DEÖ  ió á utilitù whicè enableó thå useò tï  manipulatå -thå  ZCPR³ redirectablå I/Ï devicå drivers®  Iô allowó  thå -useò  tï displaù thå nameó oæ thå currenô deviceó anä selecô -them. - - Unlikå itó counterpart¬  DEVICE¬  DEÖ acceptó alì inpuô -from the command line and is not interactive. - -Options: - None - - Comments: - - Anù DEÖ commanä maù takå thå followinç forms® Onlù thå -first letters are significant in the these commands: - - DISPLAY ALL <-- Display names of all devices - DISPLAY CON <-- Display consoles - DISPLAY LST <-- Display printers - DISPLAY PUN <-- Display punches - DISPLAY RDR <-- Display readers - - D A is the same as DISPLAY ALL. - - Thå  fulì  devicå namå musô bå giveî iî  thå  followinç -commands®   Onlù  thå  firsô  characteò  anä  thå  '=§  arå -significant in the rest of the command. - - CON:=name LST:=name PUN:=name RDR:=name - - C=name is the same as CON:=name. - -Selected Error Messages: - - "DEÖ  NOÔ  Initializeä witè I/Ï Base¢ meanó  thaô  thió -ZCPR3 System does not support Redirectable I/O. - - "Redirectioî  Noô  Supported¢  meanó  thaô  thå  loadeä -drivers in the I/O Package do not support redirection. - -Examples of Use: - - DEV C=CRT,L=TTY - -- assign CRT to CON: and TTY to LST: - - -:R - -Command: RECORD 3.0 - -Syntax: - - RECORD ON or OFF <-- Console Recording -or - RECORD ON or OFF PRINTER <-- Printer Recording - -Function: - - RECORÄ  ió useä tï controì thå Disë Outpuô Facilitù  oæ -thå Redirectablå I/Ï Drivers® Copieó oæ Consolå anä Printeò -outputó  caî  bå createä iî disë fileó bù thå  uså  oæ  thió -facility¬  anä  iô  maù bå extendeä intï á numbeò  oæ  otheò -applicationó aó well. - - -Options: - - ON - Enable Recording - OFF - Disable Recording - - P - Reference Printer - -Comments: - - Foò  RECORÄ  tï  perforí  itó  function¬   iô  musô  bå -implementeä iî thå Redirectablå I/Ï Drivers®  Thió ió  lefô -aó aî exerciså foò thå reader® Thå Redirectablå I/Ï Driveró -supplieä  witè ZCPR³ havå simplå RETurî instructionó aó  thå -subroutineó executeä bù thå RECORÄ functions. - - - Fouò  routineó  arå  accesseä iî thå  Redirectablå  I/Ï -Driveò packagå tï controì thå RECORÄ function® Theù are: - - COPEN -- Enable Recording Console Output - LOPEN -- Enable Recording List Output - CCLOSE -- Disable Recording Console Output - LCLOSE -- Disable Recording List Output - - RECORÄ ió indirectlù tieä intï DEVICE® Invokinç RECORÄ -itselæ  doeó  noô  necessarilù starô thå  recordinç  procesó -immediately®   Twï  functionó  musô  takå  placå  tï  begiî -recordinç outpuô ontï disë files: - - 1) RECORD has to turn the appropriate Driver ON - 2) DEVICE has to select the appropriate Driver - - - Bù turninç RECORÄ OFÆ durinç á recordinç  session¬  thå -outpuô  filå  ió closeä anä availablå foò  otheò  uses®  Iæ -RECORÄ  ió lateò turneä ON¬  thå outpuô filå maù bå  deleteä -(iæ thå samå filå ió selecteä tï recorä into)®  However¬ iæ -á  ne÷  devicå ió selecteä whilå RECORÄ ió OΠ (say¬  DEVICÅ -CON:=CRÔ ió issued)¬ theî recordinç ió SUSPENDEÄ (NOÔ turneä -off©  untiì thå recordinç devicå ió  selecteä  again®  Witè -thió  capability¬  iæ iô lookó likå thå recordinç sessioî ió -noô  goinç well¬  recordinç caî bå  suspended¬  thå  probleí -fixed¬ anä theî recordinç caî bå resumed. - - Thió  combineä  systeí oæ DEVICÅ anä RECORÄ provideó  á -flexiblå outpuô recordinç system®  Iî addition¬  thå outpuô -recordinç neeä noô necessarilù gï tï á disë file®  Iô coulä -bå seô uð tï senä CONº  outpuô tï thå CRÔ and¬ say¬ á Remotå -Computeò foò processing. - - -Selected Error Messages: - - "I/Ï Driveò Addresó NOÔ Defined¢ meanó thaô therå ió nï -I/O Package in this ZCPR3 System. - - "Disë  Driveò  Modulå NOÔ Loaded¢ meanó  thaô  thå  I/Ï -Package does not support the RECORD facility. - - "Nï  I/Ï  Driveò Modulå Loaded¢ meanó thaô LDÒ haó  noô -been run to load an *.IOP file. - -Examples of Use: - - RECORD ON - - turn on recording for the console - - RECORD ON P - - turn on recording for the printer - -:2 - - - Redirectable I/O and the ZCPR3 System - - Thå   ZCPR³  Systeí  caî  functioî  witè   oò   withouô -Redirectablå  I/Ï  aó  implementeä bù thå  Redirectablå  I/Ï -Driveò  Packageó  anä  thå  LDR¬  DEV¬  DEVICE¬  anä  RECORÄ -programs®  Obviously¬  thå  ZCPR³ Systeí ió madå mucè  morå -flexiblå bù employinç theså facilities. - - DEVICÅ anä RECORÄ arå tieä directlù tï thå Redirectablå -I/Ï  Packageó themselves®  Theù don'ô uså anù oæ thå  otheò -featureó  oæ  thå ZCPR³ Systeí tï speaë  of¬  anä  theù  arå -installeä bù Z3INS. - - - Thå  programó controllinç thå Redirectablå I/Ï  Driveró -arå tieä togetheò iî thió manner: - - LDR loads the drivers - DEVICE controls the drivers - DEV controls the drivers - RECORD enables and disables the recording - facilities of the drivers - -:C - -Command: CPSEL 1.0 - -Syntax: - - CPSEL cmd1,cmd2,... - -Function: - - CPSEÌ  (CRT/Printeò  SELect© ió á ZCPR³  utilitù  whicè -permitó thå useò tï dynamicallù selecô thå CRÔ (oæ CRÔ ° anä -CRÔ  1© anä Printeò (oæ Printeró 0¬  1¬  2¬  anä 3© froí thå -currenô  ZCPR³  Environmenô  Descriptor®  Thió  dynamicallù -changeó thå characteristicó oæ thå printeò anä CRÔ whicè arå -used by other ZCPR3 utilities, such as PRINT. - -Options: - None - - -Comments: - - The commands may be any of the following: - - Cc, c=0 or 1 -- Select CRT 0 or CRT 1 - - Pp, p=0-3 -- Select Printer 0-3 - - Dd, d=A (All), C (CRT), P (Printer) - -- Display Selection Values - - Thå valueó affecteä bù theså selectionó includå  numbeò -oæ  lineó  anä  columnó oî thå CRÔ anä numbeò oæ  lineó  anä -columnó oî thå printer®  Thå abilitù oæ thå printeò tï forí -feed is also included. - - -Selected Error Messages: - None - -Examples of Use: - - CPSEL DA - - display all devices - - CPSEL C1,P3,DA - - Select CRT 1 and Printer 3; display all devices - when done - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/LDR-UPD.COM b/Source/Images/d_bp/u15/LDR-UPD.COM deleted file mode 100644 index 84f7f6ed..00000000 Binary files a/Source/Images/d_bp/u15/LDR-UPD.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/LDR-UPD.MSG b/Source/Images/d_bp/u15/LDR-UPD.MSG deleted file mode 100644 index c6339fe4..00000000 --- a/Source/Images/d_bp/u15/LDR-UPD.MSG +++ /dev/null @@ -1,16 +0,0 @@ - -Date: Thursday, 9 August 1984 11:33-MDT -From: Richard Conn -To: All -Re: LDR-UPD.COM for ZCPR3 - - I have uploaded a version of LDR.COM which matches the LDR.MAC -file. I really apologize for the mixup I made between the old object -of LDR and the release (final) object of LDR. The source file -(LDR.MAC) is current. - - Rick - -PS CRCs check from the upload, but the CRC is not the same as the one -on the distribution list, which matches the bad LDR.COM. I will send -out the correct LDR.COM in the Phase 2 release. diff --git a/Source/Images/d_bp/u15/LDR.COM b/Source/Images/d_bp/u15/LDR.COM deleted file mode 100644 index d2c4cb64..00000000 Binary files a/Source/Images/d_bp/u15/LDR.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/LDR.MAC b/Source/Images/d_bp/u15/LDR.MAC deleted file mode 100644 index 36f66240..00000000 --- a/Source/Images/d_bp/u15/LDR.MAC +++ /dev/null @@ -1,606 +0,0 @@ -; -; PROGRAM: LDR -; AUTHOR: RICHARD CONN -; VERSION: 1.0 -; DATE: 27 FEB 84 -; PREVIOUS VERSIONS: 0.1 (3 Feb 84), 0.2 (22 Feb 84), 1.1 (28 Sep 84) -; -;VERSION EQU 10 - -;VERSION EQU 11 ; Version 1.1 by Joe Wright 28 Sept 84 - - ; This version modified to allow loading the .ENV - ; file the first time, when there is no environment - ; descriptor in memory. The program now takes - ; the environment address from the .ENV file so - ; that subsequent files are also loaded correctly. - ; ie. LDR SYS.ENV,SYS.RCP,etc. Note that .ENV must - ; be the first declared file until LDR is installed - ; to your environment. jww - -VERSION EQU 12 ; Version 1.2 by Dave Lucky 31 Dec 84 - - ; This version modified to correct exit regs from - ; SDLOAD subroutine. The Source and Destination - ; registers on entry were HL and DE, respectively. - ; On exit, they were DE and HL. The calling routine - ; (SETDATA) went amuck when calculating number of NDR - ; records using bogus DE. Also, corrected the SETDATA - ; routine from using the incorrect address of the NDR - ; entry size field as well as its contents acquired - ; from the GETNDR routine. - -EXTENV EQU 1 ; 1 for External Environ, 0 for Internal Environ - -; -; LDR is a general-purpose package loader for ZCPR3. It is -; invoked by the following form: -; -; LDR -; -; For example: -; LDR DEFAULT.RCP,SYSIO.IOP -; -; No default file types are assumed on the list of packages, and -; each package specified must be unambigous and have a type of RCP or IOP -; (for Resident Command Package or Input/Output Package). LDR -; checks to make sure that the files are valid packages and then loads -; them into memory at the correct locations, checking for package boundary -; overflow. -; -; - -; -; ZCPR3 Header -; - MACLIB Z3BASE.LIB - -; -; System Equates -; -bdos equ 5 -fcb equ 5ch -tbuff equ 80h -rcpflg equ 1 ; package type is RCP -iopflg equ 2 ; package type is IOP -fcpflg equ 3 ; package type is FCP -ndrflg equ 4 ; package type is NDR -envflg equ 5 ; package type is ENV -tcapflg equ 6 ; package type is Z3T -cr equ 0dh -lf equ 0ah - - ext z3init,envptr - ext retud,getud,putud,logud - ext getrcp,getfcp,getiop,getndr - ext f$open,f$close,f$read - ext print,pfn2 - ext hmovb,moveb,fillb - ext cline,sksp,zfname - -; -; Environments -; -origin: -; - if extenv ; if external environment ... -; -; External Environment Definition -; - jmp z3ldr - db 'Z3ENV' ; this is an environment - db 1 ; class 1 environment (external) -envloc: - dw z3env ; ptr to environment -z3ldr: - lhld envloc ; HL pts to environment - - else ; if internal environment ... -; -; Internal Environment Definition -; - MACLIB SYSENV.LIB -envloc: - jmp z3ldr - SYSENV ; define environment -z3ldr: - lxi h,envloc ; HL pts to environment - - endif - -; -; Beginning of LDR -; - call z3init ; initialize environment pointer - call banner ; print banner - lxi h,tbuff ; pt to command line - call cline ; save command line as string - call sksp ; skip over spaces - mov a,m ; get offending char - cpi '/' ; help? - jz help - ora a ; help? - jz help -; -; Main Loop - HL pts to next file name in list -; -z3ldr1: - lxi d,fcb ; pt to fcb - call zfname ; extract file name and data - inx d ; pt to file name - call print - db cr,lf,' Loading ',0 - call pfn2 ; print file name - push h ; save ptr - call pkload ; load file - pop h ; get ptr - mov a,m ; get char - inx h ; pt to next char - cpi ',' ; another file in list? - jz z3ldr1 - ret -; -; Print Help Message -; -help: - call print - db cr,lf,' LDR Syntax:' - db cr,lf,' LDR ' - db cr,lf,' where entries in the list may be any of these types:' - db cr,lf - db cr,lf,' FCP - Flow Cmnd Package ENV - Z3 Environ' - db cr,lf,' IOP - Input/Output Package NDR - Z3 Named Dir' - db cr,lf,' RCP - Resident Cmnd Package Z3T - Z3TCAP Entry' - db cr,lf,lf,' The ENV file must be first if LDR is not installed.' - db cr,lf,0 - ret -; -; Load package named in FCB -; -pkload: - call setdata ; load data buffers from environment in case of change - call cktype ; check for valid file type - jz typerr ; abort if error - call open ; open file, read in first block, check for valid - jz getud ; abort if error - -; Check if ENV. If so, get Z3ENV and call z3init - - push h ; save package pointer from cktype - lxi d,fcb+9 ; fcb type - lxi h,envtyp ; ENV? - call comptyp ; compare types - pop h ; get package pointer - jnz pkld ; not ENV, proceed normally -; -; File type is ENV. Get Z3ENV address from file and re-initialize -; - lxi h,tbuff ; first sector in tbuff - lxi d,1bh ; offset to Z3ENV - dad d ; point hl to it - mov e,m ; get Z3ENV - inx h - mov d,m ; got it - xchg ; in hl - call z3init ; set new environment - -pkld: call load ; load package into memory at correct location - call close ; close up process - call getud ; return home -; -; Check for IOP and return if not -; - lda pktype ; init package if IOP - cpi iopflg - rnz -; -; Init IOP -; - lhld packadr ; get address - lxi d,9 ; 4th JMP into it - dad d - push h ; address on stack - ret ; "CALL" routine and return to OS -; -; Load Data Buffers from Environment -; -setdata: - lhld envptr ; get environment descriptor address - shld envadr - lxi d,80H ; pt to Z3TCAP - dad d - shld tcapadr - call getrcp ; get RCP data - lxi d,rcpdata ; load - call sdload - call getiop ; get IOP data - lxi d,iopdata ; load - call sdload - call getfcp ; get FCP data - lxi d,fcpdata ; load - call sdload - lxi h,ndridat ; init NDR data in case no entry - lxi d,ndrdata - mvi b,9 ; 9 bytes (1-jmp, 5-ID, 2-adr, 1-size) - call moveb - call getndr ; get NDR data - mov b,a ; save entry count ;1284DL - mov a,h ; no NDR data? - ora l - rz - mov a,b ; restore entry count ;1284DL - call sdload ; with DE -> ndrdata ;1284DL - push d ; save ptr to entry count ;1284DL - mvi h,0 ; HL = value - mov l,a ; A = entry count - dad h ; *2 - mov d,h ; DE = value * 2 - mov e,l - dad h ; *4 - dad h ; *8 - dad h ; *16 - dad d ; *18 - mov a,h ; /128 - rlc - ani 0feh - mov h,a - mov a,l - rlc - ani 1 - ora h ; A = value * 18 / 128 - inr a ; +1 - pop d ; get ptr - stax d ; save value - ret -; -; Load 3 bytes pted to by HL into memory pted to by DE+6 -; -; Input Regs: ;1284DL -; HL = Source ;1284DL -; DE = Destination ;1284DL -; ;1284DL -; Output Regs: ;1284DL -; HL = Source ;1284DL -; DE = Destination+8 ;1284DL -; ;1284DL -sdload: - push h ; save ptr to data - lxi h,6 ; add 6 to DE to pt to proper buffer - dad d ; HL pts to buffer - pop d ; DE contains address - mov m,e ; store address - inx h - mov m,d - inx h - mov m,a ; store size data - xchg ; swap Source / Destination regs ;1284DL - ret -; -; Print Banner -; -banner: - call print - db cr,lf,'ZCPR3 LDR, Version ' - db (VERSION/10)+'0','.',(VERSION MOD 10)+'0',0 - ret -; -; Check for Valid Package File Type -; Return with Zero Flag Set if error -; If validated, PKTYPE contains package type and HL pts to data -; -cktype: - lxi d,fcb+9 ; pt to file type - lxi h,rcptyp ; see if RCP - mvi b,rcpflg ; RCP code - call comptyp ; compare - jz cktok ; OK if match - lxi h,ioptyp ; see if IOP - mvi b,iopflg ; IOP code - call comptyp ; compare - jz cktok ; OK if match - lxi h,fcptyp ; see if FCP - mvi b,fcpflg ; FCP code - call comptyp ; compare - jz cktok ; OK if match - lxi h,ndrtyp ; see if NDR - mvi b,ndrflg ; NDR code - call comptyp ; compare - jz cktok ; OK if match - lxi h,envtyp ; see if ENV - mvi b,envflg ; ENV code - call comptyp ; compare - jz cktok ; OK if match - lxi h,tcaptyp ; see if Z3TCAP - mvi b,tcapflg ; Z3T code - call comptyp ; compare - jz cktok - mvi b,0 ; invalid type -cktok: - mov a,b ; set package type - sta pktype - ora a ; set NZ if no error - ret -comptyp: - push d ; save regs - push b - mvi b,3 ; 3 bytes -compt1: - ldax d ; get FCB char - ani 7fh ; mask - cmp m ; compare - jnz compt2 - inx h ; pt to next - inx d - dcr b ; count down - jnz compt1 -compt2: - pop b ; restore regs - pop d - ret -typerr: - call prf ; print file name and string - db ' is not a Valid Type',0 - ret -; -; Open File and Load First Block into TBUFF -; Validate Package Structure and Return with Zero Flag Set if Error -; On input, HL pts to data buffer -; If no error, HL points to load address and B is number of 128-byte -; pages allowed in buffer -; -open: - call putud ; save location - call retud ; get UD in BC - lda fcb ; get disk - ora a ; default? - jz open0 - mov b,a ; disk in B (A=1) - dcr b ; adjust to A=0 -open0: - lda fcb+13 ; get user - mov c,a ; user in C - call logud ; log into UD - xra a ; clear disk - sta fcb - -; -; Disallow Ambiguous File Name -; - call ambchk ; check for ambiguous file name - jz amberr ; abort if any ambiguity -; -; Open File -; - lxi d,fcb ; pt to FCB - call f$open ; open file - jnz fnferr ; abort if file not found -; -; Read First 128-byte Block -; - call f$read ; read in first block - jnz fempty ; abort if file empty -; -; Validate Package -; Package Data Area is structured as follows: -; DB numjmps ; number of jumps at beginning of package -; DB 'Z3xxx' ; package ID (always 5 chars) -; DW address ; address of memory buffer -; DB size ; number of 128-byte blocks in memory buffer -; - xchg ; DE pts to package data - ldax d ; get number of jumps - inx d ; pt to package ID - mov b,a ; jump count in B -; -; Validate Package - MUST have proper number of JMPs -; - lxi h,tbuff ; check jumps -open1: - mov a,b ; at limit of jumps? - ora a - jz open2 - dcr b ; count down - mov a,m ; check for JMP - cpi 0C3H ; JMP? - jnz strerr ; structure error - inx h ; pt to next - inx h - inx h - jmp open1 -; -; Check Package ID - must match -; -open2: - mvi b,5 ; check package ID -open3: - ldax d ; get byte - cpi ' ' ; no ID if space - jz open4 - cmp m ; check - jnz strerr ; structure error -open4: - inx d ; pt to next - inx h - dcr b ; count down - jnz open3 -; -; Extract Package Address -; - ldax d ; get low-order address - mov l,a ; put in HL - inx d - ldax d ; get high-order address - mov h,a - inx d -; -; Check for Valid Package Address -; - mov a,h ; must not be zero - ora l - jz adrerr -; -; Extract 128-byte Block Count -; - ldax d ; get block count - mov b,a ; put in B - xra a ; set flags - dcr a ; NZ - ret -; -; Ambiguous File Name Check -; Returns with Z Set if Ambiguous -; -ambchk: - lxi d,fcb+1 ; check for ambiguous file name - mvi b,11 ; 11 chars -ambchk1: - ldax d ; get char - ani 7fh ; mask - cpi '?' - rz - inx d ; pt to next - dcr b ; count down - jnz ambchk1 - dcr b ; set NZ flag - ret - -; -; Error Messages -; -amberr: - call prf ; print file name and message - db ' is Ambiguous',0 -erret: - xra a ; set error code - ret -adrerr: - call prf ; print file name and message - db ' Not Known to Environ',0 - jmp erret -fnferr: - call prf ; print file name and message - db ' Not Found',0 - jmp erret -fempty: - call prf ; print file name and message - db ' Empty',0 - jmp erret -strerr: - call prf ; print file name and message - db ' Contains a Format Flaw',0 - jmp erret -prf: - call print - db cr,lf,' File ',0 - lxi d,fcb+1 - call pfn2 - jmp print - -; -; Close File -; -close: - lxi d,fcb ; pt to FCB - jmp f$close ; close file - -; -; Load File Into Buffer -; -load: - shld packadr ; save package address in case of error - xchg ; DE pts to buffer, B = Max Blocks -load1: - push b ; save count - lxi h,tbuff ; pt to buffer - mvi b,128 - call hmovb ; copy TBUFF into Buffer - push d ; save ptr to next block in buffer - lxi d,fcb ; pt to fcb - call f$read ; read next block - pop d ; get ptr - pop b ; get count - rnz ; done if NZ - dcr b ; count down - jnz load1 -; -; Buffer Full -; - call prf - db ' is too Large',0 - lhld packadr ; clear package - mvi b,128 ; NOPs - xra a - call fillb - lxi b,128 ; pt to after last NOP - dad b - mvi b,3 ; copy 3 bytes - xchg ; DE pts to empty space - lxi h,ercode ; store error code - jmp moveb -; -; Error Code to be Stored if Package Load Fails -; -ercode: - xra a ; 3 bytes - dcr a ; A=0FFH and NZ Flag Set - ret - -; -; Buffers -; -ndridat: - db 0 ; no JMPs - db ' ' ; no ID stored - dw 0 ; address - db 0 ; (z3ndirs*18)/128+1 size -rcptyp: - db 'RCP' ; file type of RCP file -rcpdata: - db 0 ; 0 JMPs - db 'Z3RCP' ; ID - dw 0 ; address - db 0 ; size -ioptyp: - db 'IOP' ; file type of IOP file -iopdata: - db 16 ; 16 JMPs - db 'Z3IOP' ; ID - dw 0 ; address - db 0 ; size -fcptyp: - db 'FCP' ; file type of FCP file -fcpdata: - db 0 ; 0 JMPs - db 'Z3FCP' ; ID - dw 0 ; address - db 0 ; size -ndrtyp: - db 'NDR' ; file type of NDR file -ndrdata: - db 0 ; no JMPs - db ' ' ; no ID stored - dw 0 ; address - db 0 ; (z3ndirs*18)/128+1 size -envtyp: - db 'ENV' ; file type of ENV file -envdata: - db 1 ; 1 JMP - db 'Z3ENV' ; ID -envadr: - dw 0 ; address - db 2 ; 2 128-byte blocks max -tcaptyp: - db 'Z3T' ; file type of Z3TCAP file -tcapdata: - db 0 ; no JMPs - db ' ' ; no ID stored -tcapadr: - dw 0 ; address - db 1 ; 1 128-byte block max -pktype: - ds 1 ; package type (0=error) -packadr: - ds 2 ; package address - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/LDR15.LBR b/Source/Images/d_bp/u15/LDR15.LBR deleted file mode 100644 index 43154924..00000000 Binary files a/Source/Images/d_bp/u15/LDR15.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/LGET11.LBR b/Source/Images/d_bp/u15/LGET11.LBR deleted file mode 100644 index 093c3e3d..00000000 Binary files a/Source/Images/d_bp/u15/LGET11.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/LLF11.LBR b/Source/Images/d_bp/u15/LLF11.LBR deleted file mode 100644 index 939aed04..00000000 Binary files a/Source/Images/d_bp/u15/LLF11.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/LUZ3.LBR b/Source/Images/d_bp/u15/LUZ3.LBR deleted file mode 100644 index 1e422607..00000000 Binary files a/Source/Images/d_bp/u15/LUZ3.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/LX12.LBR b/Source/Images/d_bp/u15/LX12.LBR deleted file mode 100644 index efb0d9fe..00000000 Binary files a/Source/Images/d_bp/u15/LX12.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/LX14.LBR b/Source/Images/d_bp/u15/LX14.LBR deleted file mode 100644 index 785e99be..00000000 Binary files a/Source/Images/d_bp/u15/LX14.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/MCOPY.COM b/Source/Images/d_bp/u15/MCOPY.COM deleted file mode 100644 index 0f88cd19..00000000 Binary files a/Source/Images/d_bp/u15/MCOPY.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/MCOPY.MAC b/Source/Images/d_bp/u15/MCOPY.MAC deleted file mode 100644 index 2dd8892c..00000000 --- a/Source/Images/d_bp/u15/MCOPY.MAC +++ /dev/null @@ -1,1072 +0,0 @@ -; PROGRAM: MCOPY -; AUTHOR: RICHARD CONN -; VERSION: 4.0 -; DATE: 18 MAY 84 -; PREVIOUS VERSIONS: 3.0 (16 JAN 83) -; PREVIOUS VERSIONS: NUMEROUS - -VERS equ 42 ; Use 16k buffer 14 Dec 84 jww - ; Fix some bugs Joe Wright 28 Aug 84 - ; 1. Add check for directory full after f$make - -z3env SET 0F400H - -; -; MCOPY is a program which repeatedly copies a file from drive -; A: onto drive B:. It prompts the user to mount a disk in drive B:, -; copies the file from drive A: to drive B:, verifies the copy (if not -; overridden), and then performs the function again. -; -; MCOPY performs its function in the following steps: -; 1. MCOPY determines the attributes -; of the destination file (if it exists) and clears them (file becomes -; R/W and DIR) -; 2. MCOPY deletes the destination file (if it exists) -; 3. MCOPY copies the source file to the destination -; 4. MCOPY determines the attributes -; of the source file and makes the attributes of the destination file -; identical to those of the source -; 5. MCOPY reads both the source and destination files and -; compares them byte-for-byte -; - -; SPECIAL Constants -PLIM EQU 4*16 ; SIZE OF BUFFER IN PAGES (4 * nK) [may be changed] -ESIZE EQU 16 ; NUMBER OF BYTES/ENTRY - -; CP/M Constants -WB EQU 0 ; CP/M WARM BOOT -BDOSE EQU WB+5 ; BDOS ENTRY POINT -FCB EQU WB+5CH ; SPECIFIED FCB -BUFF EQU WB+80H ; DEFAULT BUFFER AND INPUT LINE -SDMA EQU 26 ; SET DMA ADDRESS - -; ASCII Constants, et al -ON EQU 0FFH ; ON CODE -OFF EQU 0 ; OFF CODE -CR EQU 0DH ; -LF EQU 0AH ; -CTRLC EQU 'C'-'@' ; ^C -CTRLZ EQU 'Z'-'@' ; ^Z -OPTC EQU '/' ; OPTION DELIMITER - -; -; LOAD @DE MACRO -; -LDED MACRO ?ADR - XCHG - LHLD ?ADR - XCHG - ENDM - -; -; SYSLIB ROUTINES -; - EXT Z3INIT,ZFNAME,GETQUIET - EXT COMPHD,RETUD,LOGUD,PUTUD,GETUD - EXT DIRQ,DIRPACK,DIRTDU - EXT INITFCB,F$EXIST - EXT CRCCLR,CRCUPD,CRCDONE - EXT BDOS,CIN,COUT,CONDIN - EXT F$DELETE,F$OPEN,F$MAKE,F$CLOSE,F$READ,F$WRITE - EXT PADC,EPSTR,EPRINT - EXT MOVEB,CAPS,CRLF - EXT CODEND - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - jmp startx - -; -; USER-DEFINABLE INITIAL FLAG CONDITIONS -; THE DEFAULT CONDITIONS FOR MCOPY MAY BE READILY PATCHED BY THE USER -; VIA DDT FOR HIS DESIRED DEFAULT VALUES -; -DVERFLG: - DB ON ; SET VERIFY -DINSP: - DB OFF ; SET NO INSPECT -DNCOPY: - DB OFF ; SET NO MULTIPLE COPIES BY DEFAULT -DDDISK: - DB 'B'-'A' ; DEFAULT DESTINATION DISK IS B -DDUSER: - DB 0 ; DEFAULT DESTINATION USER IS 0 -BACKDIR: - DB 'BACKUP ' ; NAME OF BACKUP DIRECTORY - -; -; BEGINNING OF MCOPY PROGRAM -; -STARTX: -; -; PRINT BANNER -; - CALL EPRINT - DB 'MCOPY Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0',0 -; -; SET UP DYNAMIC BUFFERS -; - LXI H,0 ; GET SP - DAD SP - SHLD STACK ; SAVE IT - CALL CODEND ; DETERMINE FREE SPACE - SHLD INLINE ; PTR TO INPUT LINE - INR H - SHLD FCBT ; PTR TO FCB TEMP - INR H - SHLD FCBS ; PTR TO SOURCE FCB - INR H - SHLD FCBD ; PTR TO DEST FCB - INR H - SHLD FREEBUF ; FREE SPACE BUFFER - -; -; SET DEFAULT FLAGS -; - CALL GETQUIET ; GET QUIET FLAG - STA QUIET - LDA DVERFLG ; VERIFY - STA VERFLG - LDA DINSP ; INSPECT - STA INSP - LDA DNCOPY ; MULTIPLE COPIES - STA NCOPY - -; -; CHECK FOR BACKUP DIRECTORY AND ESTABLISH IT AS DEFAULT -; IF NO BACKUP DIRECTORY, SELECT DEFAULT STORED -; - LXI H,BACKDIR ; PT TO DIRECTORY NAME - CALL DIRTDU - JZ DEFBACK ; NAME NOT FOUND, SO SELECT DEFAULT - MOV A,B ; SET DEST DISK - STA DDISK - MOV A,C ; SET DEST USER - STA DUSER - JMP BACKSET -DEFBACK: - LDA DDDISK ; GET DEFAULT DEST DISK - STA DDISK ; SET DEST DISK - LDA DDUSER ; GET DEFAULT DEST USER - STA DUSER ; SET DEST USER -; -; OBTAIN AND SAVE CURRENT USER AND DISK -; -BACKSET: - CALL PUTUD ; SAVE POSITION - CALL RETUD ; GET USER/DISK - MOV A,B ; SAVE DISK - STA CDISK - LHLD INLINE ; INPUT LINE SAVE BUFFER - XCHG ; ... IN DE - LXI H,BUFF+1 ; PT TO COMMAND LINE CHAR COUNT - MVI B,128 ; SAVE 128 BYTES (ARBITRARY) - CALL MOVEB - XCHG ; HL PTS TO INPUT LINE -; -; SET OTHER FLAGS -; - XRA A ; A=0 - STA EXIST ; TURN OFF EXIST TEST -; -; CHECK FOR EMPTY COMMAND LINE AND PROCESS COMMAND MODE IF SO -; ON ENTRY, HL PTS TO FIRST CHAR OF STRING FROM CLINE -; -START1: - MOV A,M ; GET CHAR - ORA A ; EOL? - JZ MHELP ; PRINT HELP MESSAGE IF NO INPUT - INX H ; PT TO NEXT - CPI ' ' ; JUST SPACES? - JZ START1 -; -; COMMAND LINE WAS NOT EMPTY -- CHECK FOR HELP REQUEST -; - DCX H ; PT TO FIRST CHAR - CPI '/' ; IF OPENING OPTION, MUST BE HELP - JZ MHELP -; -; SEE IF OPTIONS ARE AVAILABLE IN THE COMMAND LINE -; - SHLD MFPTR ; SET PTR TO FIRST CHAR OF FILE NAME SPECS -; -; SKIP TO END OF FILE NAME SPECS -; -START2: - MOV A,M ; SKIP TO OR EOL - INX H ; PT TO NEXT - CPI ' '+1 ; OR LESS? - JNC START2 - ORA A ; AT EOL? - JZ MCOPY0 ; PERFORM DEFAULT MCOPY FUNCTION IF AT EOL -; -; SCAN FOR OPTION -; -OPTION: - MOV A,M ; GET OPTION CHAR - ORA A ; EOL? - JZ MCOPY0 ; DO MCOPY - INX H ; PT TO NEXT - PUSH H ; SAVE PTR - LXI H,OPTTAB ; PT TO OPTION TABLE - CALL CMDER ; PROCESS COMMAND - POP H ; GET PTR - JMP OPTION - -; -; COMMAND PROCESSOR -- COMMAND LETTER IN A, HL PTS TO TABLE -; -CMDER: - PUSH B ; SAVE BC - MOV B,A ; COMMAND IN B -CMDER1: - MOV A,M ; GET COMMAND LETTER - ORA A ; DONE? - JZ CMDER2 - CMP B ; MATCH? - JNZ CMDER3 -CMDER2: - INX H ; PT TO ADDRESS - MOV E,M ; GET IT IN DE - INX H - MOV D,M - XCHG ; HL PTS TO COMMAND ADDRESS - POP B ; RESTORE BC - PCHL ; RUN COMMAND -CMDER3: - INX H ; SKIP TO NEXT ENTRY IN TABLE - INX H - INX H - JMP CMDER1 - -; OPTION COMMAND TABLE -OPTTAB: - DB ' ' ; DONE - DW OPTS - DB OPTC ; SKIP OPTC - DW OPTS - DB 'E' ; EXIST TEST - DW OPTE - DB 'I' ; INSPECT - DW OPTI - DB 'M' ; MULTIPLE COPY - DW OPTM - DB 'Q' ; QUIET - DW OPTQ - DB 'V' ; VERIFY - DW OPTV - DB 0 ; END OF TABLE - DW OHELP - -; INVALID OPTION CHAR -- CLEAR STACK (RET ADR AND HL) AND PRINT HELP -OHELP: - POP H ; CLEAR RET ADR - POP H ; CLEAR HL - -; PRINT HELP MESSAGE -MHELP: - CALL EPRINT - DB CR,LF,'Syntax:' - DB cr,lf,' MCOPY dir:=dir:filename.typ,... o...' - db cr,lf,'Options:' - DB cr,lf,' E -- Existence Test' - DB cr,lf,' I -- Inspect Files' - DB cr,lf,' M -- Multiple Copy' - DB cr,lf,' Q -- Toggle Quiet' - DB cr,lf,' V -- No Verify' - DB 0 - RET ; RETURN TO ZCPR3 - -; VERIFY FLAG TOGGLE OPTION -OPTV: - LDA VERFLG ; GET FLAG - CMA ; FLIP IT - STA VERFLG ; PUT FLAG -; SKIP OPTION -OPTS: - RET - -; EXIST TEST TOGGLE OPTION -OPTE: - LDA EXIST ; GET FLAG - CMA ; FLIP IT - STA EXIST ; PUT FLAG - RET - -; NCOPY FLAG TOGGLE OPTION -OPTM: - LDA NCOPY ; GET FLAG - CMA ; FLIP IT - STA NCOPY ; PUT FLAG - RET - -; INSPECT FLAG TOGGLE OPTION -OPTI: - LDA INSP ; GET FLAG - CMA ; FLIP IT - STA INSP ; PUT FLAG - RET - -; QUIET FLAG TOGGLE OPTION -OPTQ: - LDA QUIET ; GET FLAG - CMA ; FLIP IT - STA QUIET ; PUT FLAG - RET - -; -; **** MCOPY of COMMAND LINE **** -; -MCOPY0: - LHLD FREEBUF ; STACK RESET - SPHL - LDA NCOPY ; MULTIPLE COPIES? - ORA A ; 0=NO - JZ NOPAUSE - CALL SAKCHK ; STRIKE ANY KEY CHECK - JZ CPM ; WARM BOOT IF ABORT -NOPAUSE: - CALL COPY ; DO THE COPY -CPM: - LHLD STACK ; RESET STACK - SPHL - RET ; RETURN TO OPSYS -CPMA: - CALL EPRINT - DB CR,LF,'Abort',0 - JMP CPM - -; -; **** Begin Multiple Copy Procedure **** -; -COPY: - LHLD MFPTR ; PT TO FIRST FILE NAME - SHLD NXTPTR ; SET PTR TO NEXT FILE NAME - XRA A ; A=0 - STA VERCNT ; ZERO ERROR COUNT - LDA EXIST ; IF EXIST, THEN MUST NOT BE QUIET - ORA A ; 0=NO EXIST - JZ MCOPY - XRA A ; SET NO QUIET - STA QUIET -; -; **** MAIN COPY LOOP **** -; -MCOPY: - LHLD NXTPTR ; GET PTR TO NEXT FILE NAME - MOV A,M ; GET FIRST CHAR - CPI ' '+1 ; DONE IF OR LESS - JNC MCOPY1 ; CONTINUE WITH PROCEDURE -; -; MCOPY OF FILE SPECS IS NOW DONE -; DONE WITH COPY PROCEDURE -- CONTINUE? -; -COPYT: - LDA VERFLG ; VERIFY? - ORA A ; 0=NO - JZ COPYT1 - CALL CRLF ; NEW LINE - LDA VERCNT ; GET ERROR COUNT - CALL PADC ; PRINT AS DECIMAL - CALL EPRINT - DB ' Errors',0 -COPYT1: - LDA NCOPY ; MULTIPLE COPIES? - ORA A ; 0=NO - RZ - CALL SAKCHK ; CHECK FOR STRIKE OF ANY KEY - RZ ; RETURN IF ABORT - JMP COPY ; COPY AGAIN FROM THE BEGINNING -; -; BEGIN COPY OF FILE GROUP -; -MCOPY1: - CPI ',' ; SKIP COMMA SEPARATOR IF THERE - JNZ MCPY0 - INX H ; PT TO CHAR AFTER COMMA -MCPY0: - MOV A,M ; GET NEXT CHAR - CPI ' '+1 ; CHECK FOR ERROR - JC FORMERR - CALL GETUD ; RETURN HOME - LDED FCBS ; PT TO SOURCE FCB - MVI A,0 ; DIR BEFORE DU - CALL ZFNAME ; EXTRACT FILE NAME DATA - CALL DUCVRT ; CONVERT DU INTO BC - MOV A,M ; GET DELIMITER - CPI '=' ; IF '=', WE HAVE A NEW DISK/USER - JNZ MCOPY2 ; FORM IS DIRS:FN.FT IF NO '=' -; -; FORM IS DIRD:=DIRS:FN.FT, SO SET DEST DISK/USER -; - MOV A,B ; GET DISK - STA DDISK ; SET NEW DEFAULT DISK - MOV A,C ; GET USER - STA DUSER ; SET NEW DEFAULT USER -; -; NOW DERIVE DIRS:FN.FT FORM AFTER THE '=' -; -MCPY2: - INX H ; PT TO CHAR BEYOND '=' - MOV A,M ; GET CHAR - CPI ' '+1 ; FORMAT ERROR? - JC FORMERR - LDED FCBS ; LOAD FCB - MVI A,0 ; DIR BEFORE DU - CALL ZFNAME ; GET SOURCE NAME - CALL DUCVRT ; CONVERT TO DU IN BC -; -; SAVE PTR TO NEXT CHAR AFTER DIRS:FN.FT, AND SET SOURCE DISK/USER -; -MCOPY2: - SHLD NXTPTR ; SAVE PTR TO NEXT CHAR - MOV A,B ; GET DISK - STA SDISK ; SET NEW DEFAULT DISK - MOV A,C ; GET USER - STA SUSER ; SET NEW DEFAULT USER -MCPY22: - LDA DDISK ; DEST DIR MUST NOT EQUAL SOURCE DIR - MOV B,A - LDA SDISK - CMP B - JNZ MCPYOK - LDA DUSER - MOV B,A - LDA SUSER - CMP B - JNZ MCPYOK - CALL EPRINT - DB CR,LF,'Src=Dest Err',0 - RET -MCPYOK: - CALL EPRINT - DB CR,LF,'Copy ',0 - LDA SDISK ; GET NUMBER - ADI 'A' ; CONVERT TO LETTER - CALL COUT ; PRINT - LDA SUSER ; PRINT USER NUMBER - CALL PADC - MVI A,':' ; SEPARATOR - CALL COUT - MVI A,' ' - CALL COUT - LHLD FCBS ; PRINT FILE SPEC - INX H ; PT TO FILE NAME - CALL PRFN - CALL EPRINT - DB ' to ',0 - LDA DDISK ; GET NUMBER - ADI 'A' ; CONVERT TO LETTER - CALL COUT ; PRINT - LDA DUSER ; PRINT USER NUMBER - CALL PADC - MVI A,':' - CALL COUT - MVI C,13 ; RESET DISK SYSTEM - CALL BDOS - CALL LOGS ; LOG IN SOURCE USER/DISK - LDED FCBS ; PT TO SOURCE FCB - CALL INITFCB ; INIT FCB - LHLD FREEBUF ; PT TO BUFFER AREA - MVI A,0C0H ; SELECT NON-SYS AND SYS FILES - CALL DIRQ ; LOAD DIR, SELECT FILES, SORT, ETC - JZ TPAOVFL ; TPA OVERFLOW ERROR? - LDA INSP ; INSPECT FILES? - ORA A ; 0=NO - CNZ INSPF ; INSPECT FILES IF OPTION SELECTED - MOV A,B ; CHECK FOR ANY FILES TO COPY - ORA C ; 0=NONE - JNZ MCPY24 -MCPY23: - CALL EPRINT - DB CR,LF,' NO Files -- ^C to Abort ',0 - CALL CIN ; GET RESPONSE - CPI 'C'-'@' ; ABORT? - JZ COPYT ; END TEST - JMP MCOPY ; CONTINUE WITH NEXT -MCPY24: - PUSH H ; SAVE PTR AND COUNT - PUSH B - LXI D,ESIZE ; SKIP TO END OF LOADED FILES AND MARK BEGINNING OF - ; WORK AREA -MCPY25: - DAD D ; PT TO NEXT - DCX B ; COUNT DOWN - MOV A,B ; DONE? - ORA C - JNZ MCPY25 - MVI A,PLIM ; SET PAGE LIMIT - STA PAGLIM - SHLD WORKBF ; SAVE PTR TO BEGINNING OF WORK BUFFER - LDA BDOSE+2 ; GET BASE PAGE OF BDOS - SUI 10 ; GET BELOW BASE PAGE OF CCP - SUB H ; COMPUTE SIZE OF BUFFER AREA - CPI PLIM ; PLIM PAGES LEFT? - JNC PAGOK - STA PAGLIM ; SET PAGE LIMIT -PAGOK: - POP B ; RESTORE PTRS - POP H -; -; MAIN COPYING LOOP -; FILE NAMES ARE PTED TO BY HL AND BC=NUMBER OF FILES -; -MCPY26: - PUSH H ; SAVE REGS - PUSH B - CALL ABORTCK ; CHECK FOR ABORT -MCPY27: - CALL MCOPYX ; COPY SOURCE (HL) TO DESTINATION USING WORK BUFFER - CALL PRDONE ; PRINT DONE MESSAGE - CALL ABORTCK ; CHECK FOR ABORT - LDA LSTCPY ; LAST FILE COPIED? - ORA A ; 0=NO - JZ MCPY28 - LDA VERFLG ; VERIFY? - ORA A ; 0=NO - CNZ MCOPYV ; DO VERIFY -MCPY28: - POP B ; GET REGS - POP H - LXI D,ESIZE ; PT TO NEXT FILE - DAD D ; HL PTS TO NEXT FILE - DCX B ; COUNT DOWN - MOV A,B - ORA C - JNZ MCPY26 - JMP MCOPY ; COPY NEXT FILE SPEC -; -; CHECK FOR ABORT -; -ABORTCK: - CALL CONDIN ; CONDITIONAL INPUT - RZ - CPI CTRLC ; ABORT? - JZ CPMA - RET -; -; PRINT DONE MESSAGE -; -PRDONE: - LDA QUIET ; CHECK FOR QUIET - ORA A ; NZ=QUIET - RNZ - CALL EPRINT - DB ' Done',0 - RET -; -; COPY SOURCE FILE PTED TO BY HL TO DESTINATION -; -MCOPYX: - XRA A ; SET NO COPY OF LAST FILE - STA LSTCPY ; SET FLAG - LDED FCBS ; SET SOURCE FCB - MVI B,12 ; 12 BYTES - CALL MOVEB - CALL INITFCB ; INIT SOURCE FCB - LDED FCBD ; SET DESTINATION FCB - MVI B,12 ; 12 BYTES - CALL MOVEB - CALL DRW ; CLEAR ATTRIBUTES IN FCB - CALL INITFCB ; INIT DESTINATION FCB - CALL LOGD ; LOG IN DESTINATION - CALL EPRINT - DB CR,LF,' File ',0 - LHLD FCBD ; PRINT FILE NAME - INX H ; PT TO FILE NAME - CALL PRFN - LDED FCBD ; PT TO FCB - CALL F$EXIST ; DOES DEST EXIST? - JZ FNF ; FILE NOT FOUND IF ZERO - LDA QUIET ; QUIET? - ORA A ; 0=NO - JNZ FFND - CALL EPRINT - DB ' Replace',0 -FFND: - CALL EATEST ; EXIST APPROVED TEST? - RZ ; NOT APPROVED, SO ABORT - CALL DESTRW ; MAKE DESTINATION R/W IF NOT ALREADY - CALL F$DELETE ; DELETE FILE - CALL INITFCB ; REINIT FCB - JMP FNF1 ; CREATE NEW FILE AND CONTINUE -FNF: - LDA QUIET ; QUIET? - ORA A ; 0=NO - JNZ FNF1 - CALL EATEST ; EXIST APPROVED? - RZ ; NO? -FNF1: - CALL EPRINT - DB ' ...',0 - MVI A,0FFH ; SET COPY OF LAST FILE - STA LSTCPY ; SET FLAG - CALL F$MAKE ; CREATE NEW FILE - inr a ; check for full directory - jz dirful ; report it -; -; OPEN SOURCE FILE IN PREP FOR COPY -; - CALL CRCCLR ; CLEAR CRC VALUE - CALL LOGS ; LOG IN SOURCE DISK - LDED FCBS ; INIT FCB - CALL INITFCB - CALL F$OPEN ; OPEN FILE -; -; THIS LOOP, WHICH STARTS AT MCPYX, COPIES THE FILE FROM SOURCE TO DEST -; -MCPYX: - CALL LOGS ; LOG IN SOURCE - LDED FCBS ; PT TO SOURCE FCB - LHLD WORKBF ; PT TO BUFFER TO COPY INTO - CALL LOAD ; LOAD FILE INTO WORKBF - LDA BCNT ; IF COUNT=0, THEN DONE - ORA A - JZ MC2DONE -; -; COPY TO DISK -; -MCPYD: - CALL LOGD ; LOG IN DESTINATION - LHLD WORKBF ; PT TO BUFFER -MCPYD1: - CALL SETDMA ; SET DMA ADDRESS PTED TO BY HL - LXI D,128 ; INCR HL BY 128 - DAD D ; HL PTS TO NEXT BLOCK - LDED FCBD ; WRITE TO DESTINATION FILE - CALL F$WRITE - ORA A ; OK? - JNZ MCPYDERR - -; COUNT DOWN TO NEXT BLOCK - LDA BCNT ; GET BLOCK COUNT - DCR A ; COUNT DOWN - STA BCNT - JNZ MCPYD1 - LDA CONT ; CONTINUE? - ORA A ; CONT IF NOT ZERO - JNZ MCPYX -; -; END OF COPY LOOP -; -MC2DONE: - CALL LOGS ; LOG IN SOURCE - LDED FCBS ; CLOSE SOURCE - CALL F$CLOSE - CALL LOGD ; LOG IN DESTINATION - LDED FCBD ; CLOSE DESTINATION - CALL F$CLOSE - CALL CRCDONE ; GET CRCK VALUE - SHLD CRCVAL ; SAVE CRC VALUE -; -; SET ATTRIBUTES OF DESTINATION TO BE THE SAME AS THOSE OF SOURCE -; - CALL LOGS ; LOG IN SOURCE DRIVE - LDED FCBS ; FIND SOURCE - MVI C,17 ; SEARCH FOR FIRST - CALL BDOS - RLC ; MULTIPLY BY 32 TO GET OFFSET - RLC - RLC - RLC - RLC - ANI 0E0H ; MASK OUT LSB - MOV L,A ; VALUE IN L - MVI H,0 - LXI D,BUFF ; ADD IN BUFFER BASE - DAD D - XCHG ; PT TO FCBT IN DE - LHLD FCBT - XCHG - MVI B,16 ; MOVE 16 BYTES - CALL MOVEB - CALL LOGD ; LOG IN DESTINATION DRIVE - CALL INITFCB ; INIT FCB PTED TO BY DE (FCBT) - MVI C,30 ; SET FILE ATTRIBUTES - CALL BDOS - RET ; MCOPYX RETURN - -; -; CONVERT Z3 FCB DU INTO DU IN BC -; -DUCVRT: - PUSH H ; SAVE REGS - PUSH D - LDAX D ; GET DISK - ORA A ; CURRENT? - JNZ DUCV1 - LDA CDISK ; GET CURRENT - INR A ; ADD 1 FOR A=1 -DUCV1: - DCR A ; A=0 - MOV B,A - LXI H,13 ; OFFSET TO USER - DAD D - MOV C,M ; GET USER - POP D ; RESTORE REGS - POP H - RET - -; FORMAT ERROR -FORMERR: - CALL EPRINT - DB CR,LF,' Error: ',0 - CALL EPSTR ; PRINT ERROR - RET - -; TPA OVERFLOW -TPAOVFL: - CALL EPRINT - DB CR,LF,'TPA Ovfl',0 - JMP CPM - -; WRITE ERROR -MCPYDERR: - CALL EPRINT - DB CR,LF,'Disk Full',0 - JMP CPM - -; Directory Full Error -dirful: - call eprint - db cr,lf,'Directory Full',0 - jmp cpm - -; TEST FOR EXISTENCE REQUIREMENT AND GET USER RESPONSE -EATEST: - LDA EXIST ; EXISTENCE TEST ON? - ORA A ; 0=NO - JZ EAT1 - CALL EPRINT - DB ' -- (Y/N)? ',0 - CALL CIN ; GET RESPONSE - CALL CAPS - CPI CR ; YES? - JZ EAT1 ; COPY IF SO - CALL COUT - CPI 'N' ; NO? - JNZ EAT1 ; COPY IF NOT NO - XRA A ; ZERO FOR NOT APPROVED - RET -EAT1: - MVI A,0FFH ; SET NZ FOR APPROVED - ORA A ; SET FLAGS - RET -; -; MAKE DESTINATION FCB ENTRY R/W AND DIR -; -DRW: - PUSH D - LHLD FCBD ; CLEAR ATTRIBUTES OF DEST - LXI D,9 - DAD D - POP D - MOV A,M ; GET IT - ANI 7FH ; CLEAR IT - MOV M,A - INX H ; SAME TO NEXT - MOV A,M ; GET IT AND CLEAR IT - ANI 7FH - MOV M,A - RET -DESTRW: - CALL DRW ; MAKE ATTRIBUTES R/W AND NON-SYS - LDED FCBD ; SET ATTRIBUTES - MVI C,30 - CALL BDOS - RET - -; -; LOAD BUFFER PTED TO BY HL FROM FILE WHOSE FCB IS PTED TO BY DE -; ON OUTPUT, BCNT=NUMBER OF BLOCKS LOADED (UP TO 128) AND -; CONT=0 IF DONE OR 128 IF NOT DONE -; -LOAD: - XRA A ; A=0 - STA BCNT ; SET BLOCK COUNT - STA CONT ; TURN OFF CONTINUATION FLAG - -; MAIN COPY LOOP -MCPY: - CALL SETDMA ; SET DMA TO BLOCK PTED TO BY HL - CALL F$READ ; READ BLOCK - ORA A ; END OF FILE? - RNZ ; RETURN - PUSH D ; SAVE PTR TO FCB - XCHG ; SAVE PTR TO DESTINATION BUFFER IN DE - LHLD BDOSE+1 ; GET TOP OF TPA - XCHG ; ... IN DE, DEST IN HL - MOV A,H ; IF SAME PAGE, WE ARE IN OVERFLOW - CMP D ; D MUST BE > H - JNC TPAOVFL ; OVERFLOW IF D<=H - MVI B,128 ; UPDATE CRC FOR 128 BYTES -MCPYCRC: - MOV A,M ; GET BYTE - CALL CRCUPD ; UPDATE CRC - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ MCPYCRC - POP D ; GET PTR TO FCB - LDA BCNT ; GET BLOCK COUNT - INR A ; INCREMENT IT - STA BCNT ; SET IT - MOV B,A ; BLOCK COUNT IN B - LDA PAGLIM ; GET PAGE LIMIT - ADD A ; DOUBLE IT FOR BLOCKS - CMP B ; BUFFER FULL? - JNZ MCPY - STA CONT ; SET CONTINUATION FLAG - RET - -; -; SET DMA ADDRESS TO THAT PTED TO BY HL -; -SETDMA: - PUSH H ; SAVE REGS - PUSH D - PUSH B - XCHG ; ADDRESS IN DE - MVI C,SDMA - CALL BDOSE - POP B ; RESTORE REGS - POP D - POP H - RET - -; -; VERIFY PHASE -; -MCOPYV: - LDA QUIET ; CHECK FOR QUIET - ORA A ; NZ=QUIET - JNZ MCPYV - CALL EPRINT - DB ' Verify ...',0 -MCPYV: - CALL CRCCLR ; CLEAR CRCK VALUE - CALL LOGD ; LOG IN DESTINATION - LDED FCBD ; CLEAR DESTINATION FCB - CALL INITFCB ; INIT FCB - CALL F$OPEN ; OPEN FILE - -; **** MAIN VERIFY LOOP **** -VERLOOP: - LHLD WORKBF ; LOAD INPUT BUFFER FROM DESTINATION - LDED FCBD - CALL LOAD ; LOAD AND COMPUTE CRC VALUE - LDA BCNT ; DONE IF NO BYTES LOADED - ORA A - JZ VERCRC - LDA CONT ; CONTINUE? - ORA A ; 0=NO - JNZ VERLOOP -; VERIFY DONE -VERCRC: - LHLD CRCVAL ; GET OLD CRC VALUE - XCHG ; ... IN DE - CALL CRCDONE ; UPDATE COMPLETE - CALL COMPHD ; COMPARE HL TO DE - JZ PRDONE ; PRINT DONE MESSAGE OR FALL THRU TO ERROR MSG - -; VERIFY ERROR -VERERR: - LXI H,VERCNT ; INCREMENT ERROR COUNT - INR M - CALL EPRINT - DB ' Error',0 - RET - -; -; **** MCOPY Utilities **** -; - -; -; CHECK TO SEE IF USER WANTS TO CONTINUE -; -SAKCHK: - CALL EPRINT - DB ' ^C to Quit - ',0 - CALL CIN ; GET RESPONSE - CALL CRLF ; NEW LINE - CALL CAPS ; CAPITALIZE - CPI 'C'-'@' ; ^C? - RET -; -; ALLOW USER TO INSPECT FILES FOR COPY -; FIRST FILE NAME PTED TO BY HL, BC = NUMBER OF FILES -; ON EXIT, BC = NUMBER OF SELECTED FILES -; -INSPF: - CALL EPRINT - DB CR,LF,' Inspect -- ' - db 'Yes, No (def), Skip Rest' - db 0 - PUSH H ; SAVE PTR TO FIRST FILE - PUSH B ; SAVE FILE COUNT - LXI D,ESIZE ; ENTRIES ARE ESIZE BYTES APART -INSPF0: - MOV A,M ; MARK FILE FOR NO COPY - ANI 7FH ; CLEAR MSB FOR NO COPY - MOV M,A - DAD D ; PT TO NEXT - DCX B ; COUNT DOWN - MOV A,B ; DONE? - ORA C - JNZ INSPF0 - POP B ; RESTORE AND SAVE AGAIN - POP H - PUSH H - PUSH B -INSPF1: - PUSH H ; SAVE PTR TO FILE - INX H ; PT TO FN - CALL CRLF ; NEW LINE - CALL PRFN ; PRINT IT - POP H ; GET PTR TO FILE - CALL EPRINT - DB ' - (Y/N/S)? ',0 - CALL CIN ; GET RESPONSE - CALL CAPS ; CAPITALIZE - CALL COUT ; ECHO - CPI 'S' ; SKIP? - JZ INSPFA - CPI 'Y' ; Yes? - JNZ INSPF2 - MOV A,M ; GET USER NUMBER - ORI 80H ; MARK FILE - MOV M,A ; SET USER NUMBER -INSPF2: - LXI D,ESIZE ; PT TO NEXT FILE - DAD D - DCX B ; COUNT DOWN - MOV A,B ; DONE? - ORA C - JNZ INSPF1 -INSPFA: - POP B ; GET COUNT - POP H ; GET PTR TO FIRST FILE - JMP DIRPACK ; REPACK DIRECTORY - -; -; LOG IN SOURCE USER/DISK -; -LOGS: - LDA SUSER ; USER - MOV C,A ; ... IN C - LDA SDISK ; DISK - MOV B,A ; ... IN B - JMP LOGUD ; LOG IN USER/DISK - -; -; LOG IN DESTINATION USER/DISK -; -LOGD: - LDA DUSER ; USER - MOV C,A ; ... IN C - LDA DDISK ; DISK - MOV B,A ; ... IN B - JMP LOGUD ; LOG IN USER/DISK - -; -; PRINT FILE NAME -; -PRFN: - PUSH H ; SAVE REGS - PUSH B - MVI B,8 ; PRINT 8 CHARS - CALL PRFN1 - MVI A,'.' ; DOT - CALL COUT - MVI B,3 ; PRINT 3 CHARS - CALL PRFN1 - POP B ; GET REGS - POP H - RET -PRFN1: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CALL COUT ; PRINT IT - DCR B ; COUNT DOWN - JNZ PRFN1 - RET - -; -; **** BUFFERS **** -; - -; POINTERS -MFPTR: DS 2 ; PTR TO FIRST CHAR OF NEXT FN SPEC -NXTPTR: DS 2 ; PTR TO NEXT FN SPEC IN LINE -WORKBF: DS 2 ; PTR TO BEGINNING OF WORK BUFFER - -; FLAGS COPIED FROM DEFAULTS -VERFLG: DS 1 ; VERIFY -INSP: DS 1 ; INSPECT -QUIET: DS 1 ; QUIET -NCOPY: DS 1 ; MULTIPLE COPY - -; DISKS AND USERS -CDISK: DS 1 ; CURRENT DISK -SDISK: DS 1 ; SOURCE DISK -SUSER: DS 1 ; SOURCE USER -DDISK: DS 1 ; DESTINATION DISK -DUSER: DS 1 ; DESTINATION USER - -; CRC VALUE -CRCVAL: DS 2 ; CRC CHECK VALUE - -; FCBS -FCBS: DS 2 ; SOURCE FCB -FCBD: DS 2 ; DESTINATION FCB -FCBT: DS 2 ; PTR TO TEMPORARY FCB FOR ATTRIBUTE SETTINGS - -; COUNTS AND FLAGS -PAGLIM: DS 1 ; MAX NUMBER OF PAGES IN WORK BUFFER -LSTCPY: DS 1 ; LAST FILE WAS COPIED FLAG -EXIST: DS 1 ; TEST FOR EXISTENCE FLAG -VERCNT: DS 1 ; ERROR COUNT -BCNT: DS 1 ; BLOCK COUNT -CONT: DS 1 ; CONTINUE FLAG (0=NO, 0FFH=YES) - -; DYNAMIC BUFFERS -INLINE: - DS 2 ; INPUT LINE BUFFER -FREEBUF: - DS 2 ; FREE SPACE BUFFER -STACK: - DS 2 ; OPSYS STACK PTR - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/MCOPY44.LBR b/Source/Images/d_bp/u15/MCOPY44.LBR deleted file mode 100644 index 3d6cc490..00000000 Binary files a/Source/Images/d_bp/u15/MCOPY44.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/MCOPY45B.LBR b/Source/Images/d_bp/u15/MCOPY45B.LBR deleted file mode 100644 index 7bcd7619..00000000 Binary files a/Source/Images/d_bp/u15/MCOPY45B.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/MENU.COM b/Source/Images/d_bp/u15/MENU.COM deleted file mode 100644 index c1397ab3..00000000 Binary files a/Source/Images/d_bp/u15/MENU.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/MENU.HLP b/Source/Images/d_bp/u15/MENU.HLP deleted file mode 100644 index 57485deb..00000000 --- a/Source/Images/d_bp/u15/MENU.HLP +++ /dev/null @@ -1,893 +0,0 @@ -; - - - The ZCPR3 MENU Shell - - -- ZCPR3 Utilities -- - 1 - MENU - 2 - MENUCK - - -- Using MENU -- -- Programming MENU -- - U - Using MENU P - Programming *.MNU Files - S - Summary of User Cmds C - *.MNU Internal Commands - E - MENU Error Messages M - Programming Cmd Summary - Z - MENU and ZCPR3 - -:1 - -Command: MENU 3.2 - -Syntax: - MENU <-- run MENU.MNU -or - MENU ufn <-- run menu contained in file - -Function: - - MENÕ  ió thå ZCPR³ menõ front-enä processor®  Iô ió  á -ZCPR³  Shelì whicè readó á *.MNÕ filå anä processeó commandó -froí it. - -Options: - None - -Comments: - MENÕ  ió á truå ZCPR³ Shell®  Iô ió describeä iî  thió -HELP file. - Selected Error Messages: - - "Nï  Commanä Line¢ meanó thaô thå ZCPR³ Systeí doeó noô -supporô  aî externaì Commanä Linå Buffer®  MENÕ  musô  havå -thió tï run. - - "Nï  Shelì Stack¢ meanó thaô thå ZCPR³ Systeí doeó  noô -support a Shell Stack. MENU must have this to run. - - "Shelì  Stacë Full¢ meanó thaô thå Shelì Stacë ió  fulì -and MENU cannot push itself onto the stack. - - "Shelì  Stacë  Entrù Size¢ meanó thaô thå  Shelì  Stacë -elements are too short for MENU to store its parameters. - - "TPÁ  Full¢ meanó thaô therå ió noô enougè rooí iî  thå -TPA to load the *.MNU file. - -Examples of Use: - See this HELP file - - MENÕ  ió thå ZCPR³ Menu-Orienteä Commanä  Preprocessor® -Iô  actó aó á front-enä tï ZCPR3¬  providinç á menu-orienteä -useò interfacå tï ZCPR3® Itó functioî caî bå representeä bù -thå followinç diagram: - ------ ------ ------ ------ - |M | |Z | |B | |P | - User | E | | C | | D | | g | - Menu ---->| N |--->| P |--->| O |--->| m | - Command | U| | R| | S| | s| - | | | 2| | | | | - ------ ------ ------ ------ - - Thå  "Useò Menõ Command¢ ió á singlå characteò thaô thå -useò  strikeó  whicè instructó MENÕ tï perforí  á  function® -Oncå  MENÕ  beginó processinç thió  function¬  iô  buildó  á -commanä  linå  foò  ZCPR3¬  optionallù askinç thå  useò  foò -furtheò  inpuô (sucè aó á filå name)¬  anä theî  passeó  thå -commanä  linå tï ZCPR³ viá thå Commanä Linå  Buffer®  ZCPR³ -theî runó thå commanä linå returnó tï MENU. - - MENÕ  buildó  commanä lineó baseä oî simplå inpuô  froí -thå user®  Thå useò neeä neveò kno÷ whaô thå actuaì commanä -linå is® Thå commanä linå itselæ ió alwayó oæ thå form: - - - - Aó aî example¬ á commanä builô bù MENÕ tï ruî XDIÒ witè -useò  inpuô foò á filå namå specification¬  coulä looë  likå -thå following: - - XDIR - - - Wheî  MENÕ ió executed¬  iô lookó foò thå filå MENU.MNÕ -iî thå currenô directory®  Iæ iô findó one¬ iô loadó iô anä -beginó  processing®  Iæ  iô doeó noô finä  one¬  iô  simplù -exits®  Á  filå namå maù bå specifieä iî thå  MENÕ  commanä -line to select a file other than MENU.MNU. - - Thå  MENU.MNÕ  filå caî contaiî uð tï 25µ menuó  tï  bå -processeä  bù MENU®  Thå MENÕ wilì begiî processinç aô  thå -firsô menõ iî MENU.MNU. - - - MENÕ itselæ ió á COÍ file¬ likå anù otheò prograí undeò -ZCPR3®  Unlikå mosô otheò programs¬  however¬  iô generateó -commanä lineó tï bå executeä bù ZCPR³ anä storeó itó  returî -commanä iî thå Shelì Stack® Iî thió waù á looð ió seô up: - - -->--+->- MENU ->- ZCPR3 ->-+ - ^ v - | | - +-<- Command Line -<---+ - - Onlù  MENÕ  itselæ caî terminatå thió  loop®  Iæ  thå  MENÕ -programmeò  wishes¬  hå caî seô uð thå MENU.MNU filå sï thaô thió -looð  wilì neveò bå exited¬  oò hå caî seô uð thå filå  tï  allo÷ -anyonå  tï exiô aô anù timå oò jusô á speciaì persoî whï knowó  á -passworä  tï  exiô  wheî  hå  wisheó  to®  Therå  ió  á  loô  oæ -flexibilitù  designeä intï thå system¬  anä iô wilì bå  discusseä -later in the section on programming MENU.MNU files. - - Á  MENU.MNÕ  filå  caî bå seô uð tï executå  anù  ZCPR³ -commanä oò sequencå oæ commands® Thå MENU.MNÕ filå caî alsï -bå seô uð tï noô allo÷ thå useò tï leavå MENU¬  tï allo÷ hií -tï leavå MENÕ aô will¬ oò tï allo÷ hií tï leavå MENÕ onlù iæ -hå knowó á password. - - Thió  HELÐ filå ió divideä intï twï basiã  parts®  Thå -infï sectionó oî "Usinç MENU¢ anä "Summarù oæ MENÕ Commands¢ -arå designeä tï bå reaä bù á persoî wantinç tï uså MENÕ  buô -noô  wantinç  tï learî ho÷ MENÕ workó oò ho÷ tï prograí  it® -Theså  sectionó  describå  ho÷  tï movå  froí  onå  menõ  tï -another¬  ho÷ tï issuå MENÕ commands¬  anä ho÷ tï leavå MENÕ -iæ thå optioî ió presenteä tï him. - - Thå  otheò  sectionó  oæ thió HELР filå  describå  thå -programminç  aspectó oæ MENÕ anä arå intendeä tï bå useä  aó -aî  onlinå  referencå foò thå  MENÕ  programmer®  Thå  MENÕ -commanä  programminç summarù ió especiallù usefuì iî thaô iô -provideó á summarù oæ thå commandó whicè thå MENÕ programmeò -maù issuå tï MENÕ withiî á *.MNU file. -:U - - Wheî  MENÕ ió firsô invoked¬  onå oæ threå thingó  wilì -happen: - - 1©  Á  MENÕ  wilì appeaò anä bå pageä uð  tï  filì  thå - screen» á commanä prompô wilì appeaò aô thå bottoí - oæ thå menu - - 2©  Á MENÕ wilì appeaò anä noô bå pageä uð tï filì  thå - screen» á commanä prompô wilì appeaò aô thå bottoí - oæ thå menu - - 3©  Á commanä prompô wilì appeaò witè nï menõ (thió  ió - called the Expert Mode) - - Iæ  aô  anù timå á Menõ Displaù ió garbleä oò thå  useò -desireó  tï seå thå currenô Menõ (aó sometimeó happenó  wheî -yoõ arå iî Experô Mode)¬  jusô strikå thå RETURΠ key®  Thå -RETURÎ keù refresheó thå menõ aô alì times. - - - Thå  prompô  whicè appearó aô thå bottoí oæ  youò  Menõ -displaù haó thå followinç generaì form: - -Command (=Menu,^C=ZCPR3,*=1st Menu,<=Prev Menu,>=Next Menu) - - - Therå caî bå uð tï 25µ menuó iî onå MENU.MNÕ file® Thå -MENÕ commanä prompô varieó tï reflecô this®  Foò  instance¬ -iæ  onlù onå Menõ waó presenô anä thå optioî tï aborô ouô oæ -MENÕ  tï  ZCPR³ waó noô available¬  theî  thå  Menõ  Commanä -prompô woulä takå itó simplesô form¬ lookinç like: - -Command (=Menu) - - - Strikå thå RETURÎ keù aô thió timå tï refresè thå  Menõ -Displaù oò strikå thå characteò oæ á Menõ Option® Theså arå -thå onlù choices¬  anä strikinç á characteò whicè ió noô thå -RETURÎ keù oò á menõ optioî resultó iî thå belì sounding. - - - Iæ  thå thå optioî tï exiô tï ZCPR³ waó  availablå  anä -therå  ió  onlù  onå Menõ iî thå  MENU.MNÕ  file¬  theî  thå -commanä linå wilì looë likå this: - -Command (=Menu,^C=ZCPR3) - - - Thå  optioî oæ abortinç tï ZCPR³ bù strikinç  Control-à -(holä  dowî  oî thå Control¬  oò CTRL¬  keù anä  strikå  thå -letteò  C© ió no÷ available®  Thió wilì returî tï ZCPR³ anä -exiô MENU. - - Onå brieæ notå oî optioî letteró beforå goinç  on®  Iæ -onå  oæ  youò optionó ió á letteò iî thå rangå froí Á tï  Z¬ -theî caså ió noô significant¬  anä yoõ caî invokå thå optioî -A¬ say¬ bù strikinç aî upper- oò lower-caså A. - - - Iæ therå ió morå thaî onå menõ iî thå *.MNÕ  file¬  thå -commanä linå optionó becomå slightlù morå complex¬  buô theù -arå stilì quitå easù tï follow. - - Iî  thå followinç examples¬  assumå thaô thå optioî  tï -exiô  tï  ZCPR³ ió off¬  sï thå "^C=ZCPR3¢ optioî  wilì  NOÔ -appear. - - Froí thå firsô menõ iî thå file¬  thå commanä linå wilì -looë likå thå following: - -Command (=Menu,>=Next Menu) - - - Tï advancå tï thå nexô menu¬  strikå thå ">¢ oò thå ".¢ -character®  Oî mosô keyboards¬ ">¢ ió thå shifô oæ thå "."¬ -sï  MENÕ permitó easù movemenô withouô havinç tï worrù abouô -shiftinç thå keyboarä alì thå time. - - - Iæ aô thå lasô menõ iî thå file¬  thå commanä linå wilì -looë likå thå following: - -Command (=Menu,*=1st Menu,<=Prev Menu) - - - Thió  allowó  thå useò tï strikå thå "*¢  characteò  tï -jumð  bacë tï thå firsô menõ iî hió *.MNÕ file®  Iæ "<¢  oò -",¢ ió stucë ("<¢ ió usuallù thå shifô oæ thå ",")¬ theî thå -useò wilì bacë uð onå menõ tï thå previouó menõ iî thå file. - - Iæ thå useò ió somewherå iî thå middlå oæ thå  MENU.MNÕ -file¬ hió commanä linå wilì looë likå this: - -Command (=Menu,*=1st Menu,<=Prev Menu,>=Next Menu) - - - Again¬  "*¢ wilì gï directlù tï thå firsô menu¬  "<¢ oò -",¢ wilì gï tï thå previouó menu¬  anä ">¢ oò ".¢ wilì gï tï -thå  nexô  menu®  Strikinç thå RETURÎ keù wilì refresè  thå -menõ display. - - Onå lasô optioî thå useò haó undeò MENÕ involveó accesó -tï  á Systeí Menu®  Thió menõ ió speciaì iî thaô  therå  ió -onlù onå waù tï geô tï iô -- viá thå "$¢ command. - - Thå  Systeí  Menõ ió intendeä tï givå privelegeä  useró -accesó tï speciaì commandó thaô thå resô oæ thå useró  can'ô -run®  Iæ  á Systeí Menõ ió available¬  MENÕ wilì responä tï -thå "$¢ commanä witè thå prompt: - - Pass? - - Thå  useò  ió giveî onå chancå tï typå iî  thå  correcô -passworä  tï enteò thå Systeí Menu®  Iæ hå  ió  wrong¬  thå -messagå "Passworä Error¢ wilì appeaò anä hå wilì bå returneä -tï thå menõ hå camå from®  Iæ hå ió correct¬  hå wilì enteò -thå Systeí Menu®  Physically¬ thå Systeí Menõ ió alwayó thå -lasô menõ iî thå file¬ anä itó commanä prompô is: - -Command (=Menu,*=1st Menu,<=Prev Menu) - - - Iæ thå useò ió aô thå menõ jusô beforå thå Systeí Menu¬ -thå ">¢ wilì noô functioî tï allo÷ hií tï enteò it¬ eveî thï -therå  technicallù ió á "Nexô Menu"®  Thå ">¢ optioî iî thå -commanä  linå  wilì noô appear®  Thå onlù waù  tï  enteò  á -Systeí Menõ ió thrõ thå "$¢ command. - - Iî  summary¬  movinç  abouô withiî MENÕ ió quitå  easy® -"*¢  moveó thå useò tï thå firsô menu¬  "<¢ tï thå  previouó -menu¬ ">¢ tï thå nexô menu¬ anä "$¢ tï thå Systeí Menu. - -:S - - The full Menu Command Line looks like the following: - -Command (=Menu,^C=ZCPR3,*=1st Menu,<=Prev Menu,>=Last Menu) - - - The Menu Commands are: - - Command Function - - Refresh Menu Display (RETURN Key) - ^C Exit to ZCPR3 (Control-C) - * Jump to the First Menu - < or , Jump to the Previous Menu - > or . Jump to the Next Menu - $ Jump to the System Menu (Password Required) - other Menu Option or Invalid Command; letters are - automatically capitalized, so a=A - -:P - - Programming *.MNU Files - - Thå  *.MNÕ  filå  ió simplù á texô filå  whicè  maù  bå -createä   witè  anù  conventionaì  CP/Í  editor¬   includinç -WordStar®  MENÕ  ignoreó  thå Mosô Significanô Biô  oæ  alì -bytes¬ sï editoró likå WordStar¬ whicè occasionallù seô thió -bit¬ caî bå used. - - Alì *.MNÕ fileó havå thå samå generaì  structure®  Thå -firsô  linå ió eitheò á globaì optioî linå oò thå  beginninç -oæ á menõ display®  Iæ á globaì optioî line¬ iô beginó witè -thå  characteò  "-"¬   anä  thió  characteò  ió  immediatelù -followeä  bù  globaì optioî characters®  Thå globaì  optioî -line¬ theî lookó likå this: - --options - - Afteò thå globaì optioî line¬  iæ any¬  comeó thå firsô -menu® Eacè menõ ió structureä aó follows: - - #options - - # - menu commands - - The following are two sample Menu File structures: - - -options #options - #options - # - # commands - commands ## - #options - - # - commands - ## - Therå arå fouò optioî characters®  Iî usinç them¬ caså -ió noô significant® Theså optioî characteró are: - - Option Function - C Display Command Line to User - D Display Menu to User - P Page Out Menu Display - X Allow User to Exit to ZCPR3 - - Thå à optioî displayó thå commanä linå builô bù MENÕ tï -thå user®  Thió optioî ió primarilù intendeä foò  debugginç -purposes¬  tï  allo÷ thå programmeò tï seå whaô commandó arå -beinç built®  Iô ió instructivå tï thå user¬  however¬  anä -maù bå employeä foò thaô purposå aó well. - - Thå  Ä optioî displayó thå menõ tï thå  user®  Iæ  thå -displaù  functioî ió noô turneä on¬  wå arå iî Experô  Mode¬ -anä  thå  commandó  arå availablå withouô  á  menõ  display® -RETURN¬  oæ  course¬  caî  bå useä tï invokå thå displaù  iæ -necessary. - - Thå Ð optioî pageó ouô thå menõ display®  Iæ thå  pagå -functioî  ió engaged¬  theî thå MENÕ prograí outputó  ¢  oò  ".¢ tï gotï thå nexô menõ (Menõ 2) - ^à tï gotï ZCPR3 - - In the second menu, the user may strike: - - "3" to goto Menu 3 - "*" or "<" or "," to goto Menu 1 - ">" or "." to goto Menu 3 - ^C to goto ZCPR3 - - In the third menu, the user may strike: - - "2" or "<" or "," to goto Menu 2 - "*" to goto Menu 1 - - ! Opt - Thå "!¢ optioî causeó MENÕ tï pauså anä asë thå useò tï -"Strikå  Anù Key¢ beforå continuinç afteò thå  commanä  linå -haó  beeî processed®  Iî thió way¬  iæ á commanä  generateó -informatioî  tï  bå reaä bù thå useò beforå MENÕ clearó  hió -screen¬  thå "!¢ optioî maù bå useä tï givå thå useò alì thå -timå hå wantó tï reaä thió display. - - "prompt" - Embeddeä  withiî anù commanä linå maù bå á  prompô  foò -user input. This prompt takes the form of - - "prompt to user" - -Wheî  encountered¬  MENÕ  wilì advancå tï thå nexô linå  anä -prinô thå texô containeä withiî thå quotes®  MENÕ wilì theî -waiô foò thå useò tï inpuô anù texô hå desireó followeä bù á -RETURN®   Aô  thió  point¬  thå  texô  thå  useò  inpuô  ió -capitalizeä anä placeä intï thå commanä linå aô thå poinô oæ -the prompt. - - Iæ  thå  prompô  appearó aô thå enä oæ á  MENÕ  commanä -line¬  thå trailinç quotå ió noô required®  Aó manù promptó -aó desireä maù appeaò withiî á MENÕ commanä line® Examples: - - "prompt" - -dxp - # - A - Run XDIR without Pause or Input - B - Run XDIR and Pause before Returning to MENU - C - Run XDIR, Allow User Input, and Pause before - Returning to MENU - M - Run MCOPY, Allow User Input of Dest Dir, Allow - User Input of Source Dir and File, and Pause - before returning to MENU - Z - Run Any ZCPR3 Command and Pause before - Returning to MENU - # - m!mcopy "Destination Dir? "="Source DIR:AFN? " - z!"Enter Command Line -- - axdir - b!xdir - c!xdir "Enter Ambiguous File Name -- - ## - - "prompt" - Notå  thå Spacå righô beforå thå "Prompô forí iî thå  Ã -command®  Thió spacå ió significanô tï keeð thå commanä anä -useò  inpuô froí runninç together®  Thió "ruî together¢  ió -desireä  foò thå Ú command®  Alsï notå thå duaì prompô  foò -the M command. - - Witè thå Í command¬  thå followinç promptó wilì  appeaò -(and sample input): - - Destination Dir? BACKUP: - Source DIR:AFN? *.TXT - -and the following command line is built: - - MCOPY BACKUP:=*.TXT - - Variables - Thå commanä texô whicè ió specifieä iî thå MENÕ commanä -linå  caî contaiî embeddeä variableó whicè MENÕ wilì  expanä -wheî thå commanä linå ió processed®  Theså variables¬ whicè -arå  denoteä  bù á dollaò sigî ($© followeä bù  onå  oò  twï -characters, are defined as follows: - - Variable Expands as - -------- ---------- - $D Current Disk - $U Current User Area - $Fn FILENAME.TYP for ZCPR3 System File n - $Nn FILENAME for ZCPR3 System File n - $Tn TYP for ZCPR3 System File n - $$ Place a single $ in command line - - Theså  variableó  caî alsï bå useä iî thå menõ  displaù -itself¬  anä  theiò  valueó  wilì bå  substituteä  wheî  thå -display is generated. Example: - - Variables - -dpx - # - Menu to Run M80 Assembler - Current File: $F1 - Directory: $D$U - F - Define File - E - Edit $F1 P - Page $F1 - A - Assemble $F1 - # - fsetfile 1 "Filename? " - eedit $f1 - azex m80 $n1 - ppage $f1 - ## - - Variables -Notes: - - 1® Thå ZCPR³ utilitù SETFILÅ ió useä tï definå thå namå -oæ  á  ZCPR³  Systeí  File®  Therå arå  fouò  Systeí  Fileó -available¬  anä theù caî bå referenceä bù $F± tï $F4¬ $N± tï -$N4, and $T1 to $T4. - - 2® Thå Á commanä showó thå executioî oæ ZEX® MENÕ ió á -truå ZCPR³ Shell¬  and¬  aó such¬ ZEØ commandó caî bå issueä -froí iô anä wilì ruî oî toð oæ it®  Thå prompô foò thå  ZEØ -command lines will be "Menu>". - - 3®  Assuminç thaô "MYFILE.MAC¢ ió assigneä tï thå ZCPR³ -Systeí Filå ± anä thå useò ió loggeä intï disë  useò 1¬ thå -followinç  screeî  showó ho÷ thå displaù anä  thå  resultinç -commanä lineó wilì bå expandeä wheî executioî occurs: - - Variables - Display - - Menu to Run M80 Assembler - Current File: MYFILE.MAC - Directory: B1 - F - Define File - E - Edit MYFILE.MAC P - Page MYFILE.MAC - A - Assemble MYFILE.MAC - - - Command Lines - Menu Command Expansion - - fsetfile 1 "Filename? " SETFILE 1 "Filename? " - eedit $f1 EDIT MYFILE.MAC - azex m80 $n1 ZEX M80 MYFILE - ppage $f1 PAGE MYFILE.MAC - - Highlighting - Jusô  likå  thå HELÐ utilitù caî takå advantagå oæ  thå -highlightinç facilitù provideä iî thå Z3TCAP¬  sï caî  MENU® -Foò thoså ZCPR³ Systemó witè á properly-installeä TCAP¬ MENÕ -wilì  uså  thå  cleaò screeî commanä tï refresè  thå  user'ó -screeî  anä  highlightinç  caî bå enableä  anä  disableä  bù -embeddinç  ^Á (tï turî oî highlighting© anä ^ (tï turî  ofæ -highlighting© intï thå *.MNÕ file. - - Iô ió recommendeä thaô wheî highlightinç ió turneä  on¬ -iô  shoulä  bå turneä ofæ iî thå samå linå  foò  consistencù -sake and appearance. - - Example: - - Highlighting - # - ^AThis is highlighted^B and this is not - # - -wilì appeaò witè "Thió ió highlighted¢ iî á highlighteä modå -likå this: - - This is highlighted and this is not - - - Closing - Closing Notes - - Aó  manù commandó aó thå printablå ASCIÉ characteò  seô -(withouô lower-caså letteró anä thå MENÕ commanä characters© -wilì allo÷ arå permitteä bù MENU®  Thå text¬  however¬  foò -eacè  menõ musô bå ablå tï fiô oî á screeî witè thå  commanä -prompô  aô  thå  bottom®  Thió meanó thaô thå  texô  cannoô -exceeä 2² lines. - - MENÕ  fitó iî nicelù tï thå ZCPR³ Systeí  oæ  programs® -Thå informatioî sectioî oî "MENU'ó Relationshið tï thå ZCPR³ -System¢  explainó ho÷ MENÕ anä thå otheò ZCPR³ programó worë -together. - - Thå  followinç  ASCIÉ  characteró maù NOÔ  bå  useä  aó -commandó sincå theù arå useä elsewhere: - - # % , . < > * - -:M - - MENU Programming Command Summary - - Eacè  MENÕ commanä occupieó onlù onå  line¬  anä  blanë -lineó  iî thå commanä grouð arå noô permitted®  Thå commanä -linå ió structureä aó follows: - - l[o][command] - -where: - l is the single character used to invoke the command - note that it may be upper- or lower-case - o is an opening option, which is one of: - :nn -- go to Menu nn - ! -- have MENU wait when the command is finished - command is an optional ZCPR3 command; note that if - the option is ":nn", then a command here makes no - sense - - The MENU commands are: - - Command Function - - :nn Goto Menu nn, where the first menu is Menu 1 - ! Wait after command line is executed before - processing the menu - "Prompt" Prompt the user for input and accept it - -The MENU variables are: - - Variable Expands to - - $D Current Disk - $U Current User - $Fn FILENAME.TYP for System File n - $Nn FILENAME for System File n - $Tn TYP for System File n - $$ $ - -Noteº Systeí Fileó caî bå defineä bù thå SETFILÅ command. - -The Highlighting Embedded Characters are: - ^A Turn ON Highlighting - ^B Turn OFF Highlighting - -Noteº  Iô ió recommendeä thaô iæ highlightinç ió turneä  on¬ -it should be turned off in the same line. - - - -Thå  followinç ASCIÉ characteró maù NOÔ bå useä aó  commandó -sincå theù arå useä elsewhere: - - # % , . < > * - - - -:Z - - MENU's Relationship to the ZCPR3 System - - MENU¬  likå mosô oæ thå ZCPR³ utilities¬ interactó witè -thå systeí aó á wholå anä cannoô bå useä witè systemó  otheò -thaî ZCPR3® Iî particular¬ MENÕ requireó thå ZCPR³ Multiplå -Commanä  Linå  Buffeò  anä  Shelì  Stacë  facilitieó  tï  bå -availablå  tï iô anä cannoô ruî withouô them®  MENÕ invokeó -commanä  lineó  viá thå Commanä Linå Buffeò anä  returnó  tï -itselæ thrõ thå Shelì Stack®  Iô alsï useó thå ZCPR³ Systeí -Fileó foò somå oæ itó variableó anä thå Z3TCAÐ facilitù  foò -itó screeî manipulatioî (highlighting). - - MENU is installed by Z3INS. - - - Also¬ CÄ (Changå Directory© anä STARTUÐ (or¬ SÔ foò CD© -caî  comå  intï plaù witè MENU®  Wheî CÄ logó intï  tï  ne÷ -directory¬  iô  lookó foò thå filå ST.COÍ anä executeó iô iæ -therå  ió one®  SÔ ió simplù STARTUÐ renamed¬  anä  STARTUÐ -wilì  loaä thå Multiplå Commanä Linå Buffeò witè  á  commanä -linå anä theî terminate. - - Froí  thå poinô oæ vie÷ oæ MENU¬  thå commanä loadeä bù -SÔ  coulä bå MENU®  Thå effecô oæ thió ió tï  automaticallù -enteò  MENÕ  wheî  thå  useò employó CÄ  tï  enteò  á  giveî -directory. - - Hence¬  bù usinç CD¬  á useò caî enteò á directorù  anä -suddenlù  finä  himselæ  iî á menõ insteaä oæ aô  thå  ZCPR³ -commanä  level®  Thió  ió  gooä foò  applicationó  wherå  á -directorù  ió  seô  asidå foò á specifiã  purposå  anä  onlù -certaiî  operationó  arå  tï bå performeä  iî  it¬  sucè  aó -cataloginç diskó oò handlinç accounts. - - - No÷  thaô  MENÕ ió runninç foò thå  directory¬  á  MENÕ -commanä  coulä bå anotheò CÄ tï anotheò  directory®  Oò  iô -coulä simplù bå á DUº form® Example: - - #dp - A - Enter ZCPR Directory - B - Enter A0: - # - acd zcpr: - ba0: - # - - Here¬  iæ Á ió issued¬ theî CÄ wilì movå intï ZCPRº anä -executå ST.COÍ iæ therå ió onå there®  Iæ  ió issued¬  thå -useò  ió loggeä intï A0:®  MENÕ ió thå nexô commanä iî botè -caseó (commanä lineó arå "CÄ ZCPR;MENU¢ anä "A0:;MENU")¬  sï -MENÕ automaticallù reinvokeó anä lookó foò MENU.MNU®  Iæ iô -findó it¬ wå arå iî anotheò MENÕ system¬ and¬ iæ iô doesn't¬ -wå arå bacë tï ZCPR³ commanä level. - - Undeò thå Á option¬ iæ CÄ findó ST.COM¬ SÔ wilì executå -itó functioî and¬  unlesó thió functioî popó thå Shelì Stacë -(SHPOÐ command)¬ MENÕ wilì reinvokå afteò iô ió complete. - - Undeò  thå  option¬  wå wilì ruî MENÕ nexô anä  simplù -exiô iæ á MENU.MNÕ filå ió noô found. - -:E - - MENU Error Messages - - Iî ordeò tï makå MENÕ aó smalì aó possible¬  thå  erroò -messageó  havå beeî reduceä tï á minimum®  MENÕ provideó  á -minimuí indicatioî thaô somethinç ió wronç anä aborts. - - Thå  prograí  MENUCË  ió  designeä  tï  telì  yoõ  morå -specificallù  whaô  ió  wrong®  MENUCË ió  á  *.MNÕ  Syntaø -Checker¬ anä iô lookó foò alì sortó oæ erroò conditionó thaô -caî occuò iî á *.MNÕ file. - - MENÕ provideó thå followinç minimaì erroò messages: - - - Message Meaning - - No Shell Stack Shell Stack Not Available - No Command Line Command Line Buffer Not Avail - Shell Stack Full Shell Stack is Full - Shell Stack Entry - Size Shell Stack Entries are too - short for MENU cmd line - File x.typ Not - Found Menu File Not Found - TPA Full Memory is Full - User Command is in Error - Password Error Invalid Password Given - Structure Error *.MNU File Structure Error - -:2 - -Command: MENUCK 1.0 - -Syntax: - MENUCK dir:ufn <-- default file type is MNU - -Function: - - MENUCË  ió useä tï checë thå syntaø oæ á *.MNÕ filå foò -thå ZCPR³ Menõ Shell¬  MENU® MENÕ ió optimizeä foò sizå anä -speed¬  and¬  iî deepinç iô small¬ built-iî diagnosticó werå -reduceä  tï thå minimum®  MENUCË ió intendeä tï bå useä  tï -analyzå  *.MNÕ fileó anä providå informativå diagnosticó  oî -any syntactical errors with them. - -Options: - None - - -Comments: - - MENUCË  checkó tï seå iæ thå sizå oæ thå *.MNÕ filå  ió -toï largå foò thå TPÁ availablå tï thå MENÕ  command®  Thió -is an additional check beyond the normal syntax check. - - MENUCË  identifieó  thå  locatioî  oæ  erroró  bù  linå -number. The first line in the file is line number 1. - -Selected Error Messages: - - Self-Explanatory. - -Examples of Use: - - MENUCK MYMENU - -- perform check on MYMENU.MNU - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/MENU.MAC b/Source/Images/d_bp/u15/MENU.MAC deleted file mode 100644 index a53fa4a8..00000000 --- a/Source/Images/d_bp/u15/MENU.MAC +++ /dev/null @@ -1,1510 +0,0 @@ -; -; PROGRAM: MENU -; AUTHOR: RICHARD CONN -; VERSION: 3.2 -; DATE: 10 June 84 -; PREVIOUS VERSIONS: 3.1 (28 Mar 84), 3.0 (18 Mar 84) -; DERIVATION. MENU 1.4 for ZCPR2 -; -VERS EQU 32 - -; -; MENU is the ZCPR3 Menu Processor. It loads, looks for the MENU.MNU -; file, and then displays it to the user (optionally) and prompts him for -; a single-character command. The ZCPR3 Multiple Command Line Buffer must -; be installed for MENU to work, and MENU uses this buffer to chain to the -; programs selected by the user and return to itself at the proper place. -; -; MENU supports multiple menus within one MENU.MNU file. When a command -; is invoked, MENU returns to the menu the command came from. -; -; MENU will ONLY RUN on ZCPR3 systems with the Multiple Command Line -; Buffer Option enabled. -; - -; -; Menu Constants -; -sysmenu equ 0 ;System Menu Enabled? 0=no, 1=yes - -; 1 Special Menu Command Chars -RNM EQU '>' ;NEXT MENU -RNMP EQU '.' ;NEXT MENU PRIME (ALTERNATE) -RLM EQU '<' ;LAST MENU -RLMP EQU ',' ;LAST MENU PRIME (ALTERNATE) -RFM EQU '*' ;FIRST MENU -; - if sysmenu -RSM EQU '$' ;SYSTEM MENU (PASSWORD REQUIRED) - ; THIS IS SAME AS CONTROL CHAR - endif ;sysmenu - -; 2 Internal Menu Control Chars -MCMD EQU ':' ;COMMAND TO JUMP TO ANOTHER MENU -PCHAR EQU '"' ;INDICATES AUTO PROMPT FOR SPECIFIC CMD -MINDIC EQU '#' ;MENU SECTION INDICATOR -MFIRST EQU '%' ;FIRST MENU INDICATOR -GOPTION EQU '-' ;GLOBAL OPTION INDICATOR -WOPTION EQU '!' ;ACTIVATES WAIT UPON RETURN - -; 3 Menu Option Chars -COPTION EQU 'C' ;DISPLAY COMMAND LINE TO USER -DOPTION EQU 'D' ;DISPLAY MENU TO USER -POPTION EQU 'P' ;PAGE OUT MENU DISPLAY TO USER -XOPTION EQU 'X' ;DISABLE ZCPR3 RETURN - -; 4 Miscellaneous -IBUFSZ EQU 254 ;SIZE OF INPUT LINE BUFFER -VARFLAG EQU '$' ;VARIABLE FLAG - ;(FOLLOWED BY D,U,Fn,Nn,Tn) -CMDSEP EQU ';' ;ZCPR3 COMMAND SEPARATOR - -; -; Enter/Exit Standout Mode (Recommended that these values not be changed) -; -DIM EQU 'A'-'@' ; ^A TO ENTER STANDOUT -NOTDIM EQU 'B'-'@' ; ^B TO EXIT STANDOUT - -; -; MACRO Library of Definitions -; - MACLIB Z3BASE.LIB - -; -; ZCPR3 CONSTANTS -; -wboot equ 0 -bentry equ 5 -fcb equ 5ch -tbuff equ 80h -BEL equ 7 -CR equ 0dh -LF equ 0ah -CTRLC equ 'C'-'@' -TAB equ 'I'-'@' -CTRLZ equ 'Z'-'@' - -; -; MACROS TO PROVIDE Z80 EXTENSIONS -; MACROS INCLUDE: -; -; BR - JUMP RELATIVE -; BRC - JUMP RELATIVE IF CARRY -; BRNC - JUMP RELATIVE IF NO CARRY -; BRZ - JUMP RELATIVE IF ZERO -; BRNZ - JUMP RELATIVE IF NO ZERO -; BJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO -; PUTRG - SAVE REGISTERS -; GETRG - RESTORE REGISTERS -; - -; -; -; Z80 MACRO EXTENSIONS -; -BR MACRO ?N ;;JUMP RELATIVE - IF I8080 ;;8080/8085 - JMP ?N - ELSE ;;Z80 - .Z80 - JR ?N - .8080 - ENDIF ;;I8080 - ENDM -; -BRC MACRO ?N ;;JUMP RELATIVE ON CARRY - IF I8080 ;;8080/8085 - JC ?N - ELSE ;;Z80 - .Z80 - JR C,?N - .8080 - ENDIF ;;I8080 - ENDM -; -BRNC MACRO ?N ;;JUMP RELATIVE ON NO CARRY - IF I8080 ;;8080/8085 - JNC ?N - ELSE ;;Z80 - .Z80 - JR NC,?N - .8080 - ENDIF ;;I8080 - ENDM -; -BRZ MACRO ?N ;;JUMP RELATIVE ON ZERO - IF I8080 ;;8080/8085 - JZ ?N - ELSE ;;Z80 - .Z80 - JR Z,?N - .8080 - ENDIF ;;I8080 - ENDM -; -BRNZ MACRO ?N ;;JUMP RELATIVE ON NO ZERO - IF I8080 ;;8080/8085 - JNZ ?N - ELSE ;;Z80 - .Z80 - JR NZ,?N - .8080 - ENDIF ;;I8080 - ENDM -; -BJNZ MACRO ?N ;;DECREMENT B AND JUMP RELATIVE ON NO ZERO - IF I8080 ;;8080/8085 - DCR B - JNZ ?N - ELSE ;;Z80 - .Z80 - DJNZ ?N - .8080 - ENDIF ;;I8080 - ENDM -; -PUTRG MACRO - PUSH H ;;SAVE REGISTERS IN ORDER - PUSH D - PUSH B - ENDM -; -GETRG MACRO - POP B ;;RESTORE REGISTERS IN ORDER - POP D - POP H - ENDM -; -; END OF Z80 MACRO EXTENSIONS -; - -; -; Externals from SYSLIB -; - ext z3vinit,cls,stndout,stndend - ext getcl1,putcl,getsh2,qshell,retud,getefcb,shpush,shpop - ext getshm,putshm,moveb,getfn2,pfn1,getcrt,getzrun,putzex,putcst - ext eprint,cin,cout,caps,crlf,pafdc,madc,bline,initfcb,sksp - ext f$open,f$close,f$read,codend,hmovb - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3vinit ;initialize the ZCPR3 Env and the VLIB Env - jmp strt -; -; This is the FCB which defines the default name of the MENU.MNU file -; - if sysmenu -ppass: - db 'SYSTEM ',0 ;system password - endif ;sysmenu -; -menufcb: - db 0 ;FCB for MENU.MNU - db 'MENU ' - db 'MNU' - ds 4 -scratch: ;this doubles as a scratch area - ds 16 ;buffer definition is at end of program - ds 4 ;36 bytes total - -; -; Start of Program -; -strt: -; -; Check for Shell Stack -; - call getsh2 ;get shell status - brnz strt0 ;skip over shell init - call eprint - db ' No Shell Stack',0 - ret -; -; See if Command Line Available -; -strt0: - call getcl1 ;get line - brnz strt01 - call eprint - db ' No Command Line',0 - ret -; -; See if this program was invoked as a shell -; -strt01: - call qshell ;find out from ZCPR3 environment - push psw ;save status - xra a ;A=0 - call putcst ;put command status (normal = 0) - pop psw ;restore status - jz menu ;do not push onto stack if invoked as a shell -; -; Set Name of Shell from External FCB if Possible or From Default if Not -; -setshn: - call retud ;get run address - lxi h,shdisk ;pt to shell disk - mov a,b ;get disk - adi 'A' ;convert to letter - mov m,a ;set disk letter - inx h ;pt to user 10's - mov a,c ;get user number - mvi b,10 ;subtract 10's - mvi d,'0' ;set char -setshn1: - sub b ;subtract - brc setshn2 - inr d ;increment digit - br setshn1 -setshn2: - add b ;get 1's - mov m,d ;set 10's digit for user - inx h ;pt to 1's digit - adi '0' ;compute 1's digit - mov m,a ;set 1's digit - call getefcb ;get ptr to external fcb - brz strt02 ;no external FCB, so use default name - inx h ;pt to program name - lxi d,shname ;pt to string - mvi b,8 ;8 chars - call moveb ;copy into buffer -; -; Check for File Name and Set It If Given -; -strt02: - lxi h,fcb+1 ;pt to file name - lxi d,menufcb+1 - mvi b,11 ;11 chars - mov a,m ;get first char - cpi ' ' - cnz moveb ;copy if one present -; -; Set File Name in MENUFCB into Line -; - lxi h,menufcb+1 ;set shell file name - lxi d,shfile ;pt to shell file - mvi b,8 ;8 chars -strt03: - mov a,m ;get next char - cpi ' ' ;done? - brz strt04 - stax d ;put char - inx d ;pt to next -strt04: - inx h ;pt to next - bjnz strt03 - mvi a,'.' ;put dot - stax d - inx d ;pt to next - mvi b,3 ;file type -strt05: - mov a,m ;copy - stax d - inx h ;pt to next - inx d - bjnz strt05 - xra a ;store zero - stax d - -; -; Set Menu Number -; - mvi b,1 ;shell message 1 - xra a ;menu 0 - call putshm ;set message - -; -; Push Name of Shell onto Stack -; - lxi h,shdisk ;pt to name of shell - call shpush ;push shell onto stack - brnz strt2 -; -; Shell Successfully Installed -; - call eprint - db ' Shell Installed',0 - ret -; -; Shell Stack Push Error -; -strt2: - cpi 2 ;shell stack full? - brnz strt3 -; -; Shell Stack is Full -; - call eprint - db ' Shell Stack Full',0 - ret -; -; Shell Stack Entry Size is too small for command line -; -strt3: - call eprint - db ' Shell Stack Entry Size',0 - ret -; -; Check for ZEX Execution and Pass ZEX if So -; -menu: - call getzrun ;is ZEX running? - brz runmenu ;process menu if not - br menuz1 ;skip new line -menuzex: - call crlf ;new line -menuz1: - call eprint - db 'Menu> ',0 - mvi a,1 ;tell ZEX that it is prompted - call putzex - call codend ;set up buffer - mvi m,ibufsz ;set size - mvi a,0FFH ;capitalize - call bline ;get line from ZEX - xra a ;A=0 - call putzex ;resume ZEX normally - call sksp ;skip over leading spaces - mov a,m ;check for comment - cpi ';' - brz menuzex - xchg ;DE pts to command line - xra a ;don't display command - sta cpflag - jmp runcmnd ;run command pted to by DE -; -; Begin Menu Processing -; -runmenu: - call eprint - db 'MENU Version ' - db (vers/10)+'0','.',(vers mod 10)+'0',0 -; -; Check for Wait Flag and Wait if So -; - mvi b,0 ;get shell message 0 - call getshm - ani 80h ;check for wait flag - cnz sak ;Strike Any Key -; -; Open Menu File -; - lxi h,fcb ;copy FCB into MENU FCB - lxi d,menufcb - mvi b,36 ;36 bytes - push d ;save ptr - call moveb - pop d ;pt to MENU.MNU FCB - call initfcb ;init fcb - call f$open ;open file - brz menu1 ;abort if no menu - call eprint - db CR,LF,' File ',0 - lxi d,menufcb+1 - call pfn1 - call eprint - db ' Not Found',0 - jmp shpop -; -; Load MENU.MNU from disk -; -menu1: - call codend ;get address of buffer for menu load -mload: - lxi d,menufcb ;pt to FCB - call f$read ;read in next block - ora a ;error? - brnz mloaddn ;load done if error - lxi d,tbuff ;copy from TBUFF into memory pted to by HL - xchg ;HL is source, DE is dest - mvi b,128 ;128 bytes - call hmovb - lhld bentry+1 ;get address of top of TPA - mov a,h ;set to bottom of ZCPR3 - sui 10 - cmp d ;about to overflow ZCPR3? - brnc mload1 ;continue if not - call eprint - db CR,LF,' TPA Full',0 - ret -mload1: - xchg ;HL pts to next byte to load to - br mload ;continue load - - -; -; Init Flags and Clear MSB of all bytes in Menu File -; -mloaddn: - call f$close ;close input file - mvi m,CTRLZ ;ensure EOF mark - lxi d,80H ;pt to next block - dad d - shld ibuff ;set ptr to input line buffer - mvi m,ibufsz ;set size - dad d ;allow 256 bytes - dad d - shld expline ;set ptr to expand line - xra a ;A=0 - sta cflag ;turn off command display - sta dflag ;turn off menu display - sta pflag ;disallow paging - sta cpmok ;turn off ZCPR3 return flag - call codend ;pt to beginning of file - push h ;save ptr -menul1: - mov a,m ;get byte - ani 7FH ;mask out MSB - mov m,a ;put byte - inx h ;pt to next - cpi CTRLZ ;EOF? - brnz menul1 ;continue if not -; -; Mark all Menu Sections -; - pop h ;HL pts to first byte of menu - mvi b,0FFH ;set menu counter -; -; Skip to Next Menu -; -menul2: - mov a,m ;get byte - cpi CTRLZ ;error? - jz mstrerr ;structure error if so - cpi MINDIC ;menu indicator (start of menu?) - brnz menul4 - ori 80H ;beginning of menu found -- set MSB - mov m,a ;put byte - inr b ;increment menu count - inx h ;pt to next - mov a,m ;get byte - cpi MINDIC ;menu indicator (end of menu?) - brz menul5 ;done if so - cpi CTRLZ ;error? - jz mstrerr -; - if sysmenu - cpi RSM ;system menu indicator? - brnz menul3 - mov a,b ;set system menu number - sta smeno - mvi a,0FFH ;set flag - sta smenfl ;system menu present - dcx h ;back up to beginning of menu - shld smenadr ;start address - inx h ;pt to RSM - endif ;sysmenu -; -; Skip out Menu Display -; -menul3: - call lskipt ;skip to beginning of next line - brz menul4 ;found menu indicator - cpi CTRLZ ;error? - jz mstrerr - br menul3 ;continue if not -; -; Skip to Next Menu -; -menul4: - call lskip ;skip to beginning of next menu - br menul2 -; -; Check Menu Options -; -menul5: - call codend ;pt to beginning of file - mov a,m ;check for option - cpi GOPTION ;global option char? - jnz mfile ;if no global option, scan for menu files - inx h ;pt to option char -option: - mov a,m ;get option char - call caps ;capitalize - inx h ;pt to next - cpi CR ;done? - brz optdn - cpi COPTION ;display command? - brz optc - cpi DOPTION ;display menu? - brz optd - cpi POPTION ;paging? - brz optp - cpi XOPTION ;exit OK? - jnz mstrerr ;option error if not -; -; Disable Exit to ZCPR3 -; - mvi a,0FFH ;turn flag off - sta cpmok - br option -; -; Process Paging Option -; -optp: - mvi a,0FFH ;set flag - sta pflag - br option -; -; Process Display Menu Option -; -optd: - mvi a,0FFH ;set flag - sta dflag - br option -; -; Process Display Command Option -; -optc: - mvi a,0FFH ;set flag - sta cflag - br option - -; -; Option Processing Done -; -optdn: - inx h ;skip LF - -; -; Check for Menu Display -; -mfile: - mov a,m ;get first byte - ani 7FH ;mask - cpi MINDIC ;start of menu? - jnz mstrerr - -; -; Check and Set First Menu -; - shld mstart ;save start address of first menu item - mvi m,MFIRST+80H ;set first char of first menu - -; -; Entry Point for Menu Display -; On entry, HL pts to first byte of current menu -; -dmenu: - mvi b,1 ;shell message 1 contains menu number - call getshm ;get menu number flag - cnz mchc0 ;skip to proper menu - shld cstart ;save start address of current menu - lda cflag ;copy display command flag for temp use - sta cpflag - lda dflag ;copy display menu flag for temp use - sta dpflag - lda pflag ;copy paging flag for temp use - sta ppflag - inx h ;pt to first char after menu indicator char -dispm1: - mov a,m ;get char - call caps ;capitalize - inx h ;pt to next - cpi CR ;end of options? - brz dispm2 -; - if sysmenu - cpi RSM ;system menu? - brz dispm1 ;ok if so - endif ;sysmenu -; - cpi COPTION ;command display? - brz dispmc - cpi DOPTION ;display? - brz dispmd - cpi POPTION ;paging? - brz dispmp - cpi XOPTION ;ZCPR3 return? - jnz mstrerr ;error if not -; -; Toggle ZCPR3 Return Option -; - lda cpmok ;get flag - cma ;toggle - sta cpmok - br dispm1 -; -; Toggle Paging Option -; -dispmp: - lda ppflag ;get flag - cma ;toggle - sta ppflag - br dispm1 -; -; Toggle Display Menu Option -; -dispmd: - lda dpflag ;get flag - cma ;toggle - sta dpflag - br dispm1 -; -; Toggle Display Command Option -; -dispmc: - lda cpflag ;get flag - cma ;toggle - sta cpflag - br dispm1 -; -; Done with Menu-Specific Option Processing -; -dispm2: - call lskip ;skip to LF - lda dpflag ;display menu? - ora a ;0=no - brz dispm8 ;skip over menu if not - call getnlines ;get line count in A - sta pagcnt ;set count - lda ppflag ;paging? - ora a ;0=no - push psw ;save flag - cnz cls ;clear screen if so - pop psw ;get flag - cz crlf ;else new line -; -; Print Next Line of Menu if not Starting with ESCAPE Char (MINDIC) -; -dispm3: - mov a,m ;get first char of line - ani 7FH ;mask - cpi MINDIC ;done? - brz dispm4 - call expand ;expand line pted to by HL - push h ;save ptr to next line - xchg ;HL pts to expanded line - call lprintx ;print line pted to by HL ending in - pop h ;pt to next line - br dispm3 -; -; Done with Menu Display -- Page it out -; -dispm4: - call lskip ;skip to first char of next line (option char) - shld optstrt ;set start address of options - lda pagcnt ;number of remaining lines - mov b,a ;count in B - ora a ;ok? - brz dispm6 ;don't do anything if already there - lda ppflag ;page? - ora a ;0=No - brz dispm6 -; -; Page Loop for Menu Display -; -dispm5: - call crlf ;new line - bjnz dispm5 -; -; Determine if Another Menu Follows -; -dispm6: - xra a ;A=0 - sta nmenfl ;set for no next menu - mov a,m ;ok? - ani 7FH ;mask - cpi CTRLZ ;error if EOF - jz mstrerr - cpi MINDIC ;next menu? - brnz dispm7 - inx h ;double indicator if end - mov a,m - cpi MINDIC ;end? - brz dispm9 -; - if sysmenu - cpi RSM ;system menu = no next menu - brz dispm9 - endif ;sysmenu -; - mvi a,0FFH ;set next menu - sta nmenfl - br dispm9 -dispm7: - call lskip ;skip to next line - br dispm6 - -; -; Skip over current menu so it is not displayed -; -dispm8: - call lskipt ;skip to beginning of command - brnz dispm8 - call lskip ;skip over end of display indicator - shld optstrt ;set pointer to options - br dispm6 ;determine if next menu available -dispm9: - -; -; Ready for Option Input -; The following Flags/Values are now set: -; CPFLAG -- Display Command Flag (0=No, 0FFH=Yes) -; DPFLAG -- Display Menu Flag (0=No, 0FFH=Yes) -; OPTSTRT -- Address of First Menu Option -; NMENFL -- 0 if no next menu, 0FFH if next menu -; MSTART -- Start Address of MINDIC Before Menu Display -; (MSTART)=MFIRST with MSB Set -prompt: - call stndout ;begin standout - mvi a,0ffh - sta pagcnt ;turn off paging - sta dpflag ;turn on future menu displays - call retud ;get DU - mov a,b ;print D - adi 'A' - call cout - mov a,c ;print U - call pafdc - call eprint - db '> Command (CR=Menu',0 - lda cpmok ;OK to return to ZCPR3? - ora a ;0=No - cnz prmptc - lhld cstart ;pt to first char - mov a,m ;get it - ani 7FH ;mask - cpi MFIRST - cnz prmptf ;print previous menu prompt if not first menu - lda nmenfl ;next menu available? - ora a ;0=No - cnz prmptn ;print next menu prompt - call eprint - db ') - ',0 - call stndend ;end standout -prompt1: - call cin ;get response - call caps ;capitalize - mov b,a ;result in B - -; -; Check for CR -; - cpi CR ;? - jz dispm2 ;reprint menu if so - -; -; Check for Reboot -; - lda cpmok ;ok to abort? - ora a ;0=No - brz prmpt0 - mov a,b ;get command - cpi CTRLC ;reboot? - jz shpop ;pop shell stack and return to OS if so - -; -; Check for Command to Return to First Menu -; -prmpt0: - mov a,m ;get it - ani 7FH ;mask - cpi MFIRST - brz prmpt1 - mov a,b ;get command - cpi RFM ;return to first menu? - brnz prmpt1 - lhld mstart ;pt to first menu - mvi b,1 ;shell message 1 is menu number - xra a ;A=0=menu 0 - jmp putshm ;reenter shell at first menu - -; -; Check for Command to go to Next Menu -; -prmpt1: - lda nmenfl ;next menu available? - ora a ;0=No - brz prmpt2 - mov a,b ;get command - cpi RNMP ;goto next menu? - brz rnmx - cpi RNM ;goto next menu? - brnz prmpt2 -rnmx: - mvi b,1 ;shell message 1 is menu number - call getshm ;increment menu number - inr a - jmp putshm ;reenter menu system at new menu - -; -; Check for Command to go to Last Menu -; -prmpt2: - mov a,m ;get menu char - ani 7FH ;at first menu? - cpi MFIRST - brz prmpt3 ;skip if at first menu - mov a,b ;get command - cpi RLMP ;goto last menu? - brz lstmnu - cpi RLM ;goto last menu? - brnz prmpt3 -lstmnu: - mvi b,1 ;shell message 1 is menu number - call getshm ;decrement menu number - dcr a - jmp putshm ;reenter shell at last menu - -; -; Check for Command to goto System Menu -; -prmpt3: - if sysmenu -; - lda smenfl ;system menu available? - ora a ;0=No - brz prmpt4 - mov a,b ;get command - cpi RSM ;system menu? - brnz prmpt4 - call password ;prompt for and get password - jnz prompt ;reprompt if error - lhld smenadr ;get address of system menu - lda smeno ;set system menu number - mvi b,1 ;shell message 1 is menu number - jmp putshm ;reenter shell at system menu -; - endif ;sysmenu -; -; This is where additional functions may be added -; -prmpt4: - -; -; Check for Option Letter -; - lhld optstrt ;pt to first option char -prmptx: - mov a,m ;get it - call caps ;capitalize - cpi MINDIC ;at next menu? - brz prmpter - cmp b ;match user selection? - brz prmptd - call lskip ;skip to next line - br prmptx - -; -; Invalid Option -; -prmpter: - call eprint - db BEL,0 - jmp prompt1 - -; -; Process Option -; -prmptd: - mov a,b ;output user selection - call cout - mvi b,0 ;shell message 0, bit 7 = wait flag - call getshm - ani 7FH ;set no wait - call putshm - inx h ;pt to first letter of command - mov a,m ;get it - cpi MCMD ;invoke other menu? - jz mchcmd ;menu change command - cpi WOPTION ;turn on wait? - brnz prmptg - mvi b,0 ;shell message 0, bit 7 = wait flag - call getshm - ori 80h ;set wait flag - call putshm ;set shell message - inx h ;skip option char -prmptg: - call expand ;expand line, DE pts to result -; -; Run Command Pted to by DE -; -runcmnd: - call getcl1 ;get address of command buffer - mov b,h ;... in BC also - mov c,l - mvi a,4 ;HL=HL+4 for address of first char - add l - mov l,a - mov a,h - aci 0 - mov h,a - mov a,l ;store address - stax b - inx b - mov a,h - stax b -; -; Copy Command Line in DE into Buffer in HL -; -cmdcpy: - ldax d ;get command letter - call caps ;capitalize it - ora a ;done? - brz ccpyd - cpi CR ;done? - brz ccpyd - cpi PCHAR ;prompt? - brz ccpyp - mov m,a ;store it - inx h ;pt to next - inx d - br cmdcpy -ccpyd: - mvi m,0 ;store ending 0 - jmp cmddisp ;optionally display command -; -; Prompt User for Input and Accept It -; -ccpyp: - inx d ;pt to first char of prompt - call crlf ;new line -ccpyp1: - ldax d ;get char - cpi PCHAR ;end of prompt? - brz ccpyp2 - cpi CR ;new line? - brz ccpyp3 - call cout ;echo char - inx d ;pt to next char - br ccpyp1 ;continue looping -ccpyp2: - inx d ;pt to char after closing PCHAR -ccpyp3: - push d ;save ptr to next char - xchg ;DE pts to buffer - mvi a,0FFH ;capitalize input from user - lhld ibuff ;input line buffer - call bline ;get input from user - xchg ;HL pts to buffer, DE pts to user input -cmdlp: - ldax d ;get char from user - ora a ;end of input? - brz cmdlp1 ;store rest of line - mov m,a ;store char - inx h ;pt to next - inx d - br cmdlp -cmdlp1: - pop d ;DE pts to next char, HL pts to buffer - br cmdcpy ;resume copying -; -; Check for Display of Loaded Command and Do So if Set -; -cmddisp: - lda cpflag ;display command? - ora a ;0=No - rz ;return to OS if so to run command - call crlf ;new line - call getcl1 ;pt to first char - mov e,m ;get low-order address - inx h - mov d,m ;get high-order address - xchg ;HL pts to first char -cmdd1: - mov a,m ;get char - cpi CMDSEP ;done if command separator - rz - inx h ;pt to next - call cout ;print char - br cmdd1 - -; -; Menu Change Command -- Jump to Specified Menu -; -mchcmd: - inx h ;pt to menu number - call eval ;convert to decimal number in A - sta menuno ;save menu number - call mchc0 ;skip to desired menu to check for it - lda menuno ;get menu number - mvi b,1 ;menu number is shell message 1 - jmp putshm ;set message and reenter shell - -; -; Entry Point if MENU is Reinvoked -; -mchc0: - mov b,a ;menu number in B - inr b ;add 1 for initial offset - lhld mstart ;pt to first menu -mchc1: - dcr b ;count down - rz ;done if found -mchc2: - call lskipt ;skip to next line - brnz mchc2 ;continue if not end of menu display -mchc3: - call lskipt ;skip to next line - brnz mchc3 ;continue if not at end of menu commands - inx h ;end of MENU.MNU? - mov a,m ;yes if double MINDIC - ani 7FH ;mask - cpi MINDIC - brz mchcerr ;error if so - dcx h ;pt to first char - br mchc1 ;continue -; -; Premature End of Menu File -; -mchcerr: - pop psw ;clear stack - jmp mstrerr ;menu structure error - -; -; Print Line pted to by HL Ending in -; Decrement PAGCNT -; -lprintx: - call lprint ;print without - jmp crlf ;do -; -; Print Line Pted to by HL; Decrement PAGCNT -; -lprint: - mvi b,0 ;set tab counter -lprnt0: - mov a,m ;get char - inx h ;pt to next - ani 7FH ;mask MSB - cpi DIM ;goto standout mode? - brz lprnt3 - cpi NOTDIM ;end standout mode? - brz lprnt4 - cpi TAB ;tabulate? - brz lprnt2 - cpi CR ;done? - brz lprnt1 - call cout ;print - inr b ;incr tab counter - br lprnt0 -lprnt1: - inx h ;pt to first char of next line - lda pagcnt ;count down pages - dcr a - sta pagcnt - rnz - call getnlines ;get line count in A - sta pagcnt - call eprint - db CR,LF,'Pause -',0 - br sak1 -lprnt2: - mvi a,' ' ;print - call cout - inr b ;incr tab counter - mov a,b ;done? - ani 7 ;every 8 - brnz lprnt2 - br lprnt0 -lprnt3: - call stndout ;enter standout mode - br lprnt0 -lprnt4: - call stndend ;end standout mode - br lprnt0 -; -; Strike Any Key Message -; -sak: - mvi b,0 ;clear any pending wait - call getshm - ani 7FH ;mask MSB - call putshm -sak1: - call stndout ;goto standout - call eprint - db ' Strike Any Key - ',0 - call stndend ;exit standout - call cin ;get response - call crlf ;new line - ret - -; -; Prompt for, input, and check password (only one chance) -; If accepted, return with Zero Flag Set; if not, return with NZ -; - if sysmenu -password: - call eprint - db CR,LF,'Pass? ',0 - lhld ibuff ;pt to input line buffer - xra a ;don't capitalize user input - call bline ;get line from user - lxi d,ppass ;pt to system password -pass1: - ldax d ;get sys pass char - cmp m ;ok? - brnz passerr ;error if no match - inx h ;pt to next - inx d - ora a ;end of strings? - brnz pass1 - ret ;return with zero set to show match -passerr: - call eprint - db CR,LF,' Password Error',0 - call sak1 ;strike any key - call crlf - mvi a,0FFH ;set no zero - ora a - ret - endif ;sysmenu -; -; Skip to Beginning of Next Line and Test First Char for Menu Indicator -; -lskipt: - call lskip ;skip - mov a,m ;get char - ani 7FH ;mask - cpi MINDIC ;test - ret - -; -; Skip to Beginning of Next Line -; -lskip: - mov a,m ;get char - ani 7FH ;mask out MSB - inx h ;pt to next - cpi LF - brnz lskip - ret - -; -; Print ZCPR3 Return Prompt -; -prmptc: - call eprint - db ', ^C=Z3',0 - ret -; -; Print First/Last Menu Chars -; -prmptf: - call eprint - db ', ',RFM,'=1st Menu, ',RLM,'=Prev Menu',0 - ret -; -; Print next menu message -; -prmptn: - call eprint - db ', ',RNM,'=Next Menu',0 - ret - -; -; Menu Structure Error -- FATAL -; This message is printed to indicate an error in the structure of -; the MENU.MNU file. -; -mstrerr: - call eprint - db CR,LF,' Structure Error',0 - jmp shpop - -; -; Expand Line Pted to by HL into Scratch Area -; Return with HL pting to next line, DE pting to current line -; -expand: - xchg - lhld expline ;pt to buffer - xchg -exp1: - mov a,m ;get next char - ani 7fh ;mask MSB - stax d ;store char - cpi CR ;end of line? - jz expx - inx h ;pt to next - inx d - cpi VARFLAG ;variable follows? - brnz exp1 -; -; Variable Identified - Process it -; - mov a,m ;get next char - inx h ;pt to next - cpi VARFLAG ;one variable char? - brz exp1 ;resume if double VARFLAG - dcx d ;pt to variable position - call caps ;capitalize variable - cpi 'D' ;current disk? - brz expdisk - cpi 'U' ;current user? - brz expuser - cpi 'F' ;filename.typ? - brz expfile - cpi 'N' ;filename? - brz expname - cpi 'T' ;filetype? - brz exptype - br exp1 ;resume expansion -; -; Expand Exit -; -expx: - inx h ;pt to line feed - mov a,m ;get it - cpi LF ;line feed? - brnz expx1 - inx h ;pt to char after line feed -expx1: - xchg ;DE pts to next line - lhld expline ;pt to expanded line - xchg ;HL pts to next line, DE pts to expanded line - ret - -; -; Expand Disk -; -expdisk: - call retud ;get disk in B - mov a,b ;get disk number (A=0) - adi 'A' ;convert to ASCII - stax d ;store letter - inx d ;pt to next - br exp1 ;resume expansion -; -; Expand User -; -expuser: - call retud ;get user in C - mov a,c ;get user number - mvi b,10 ;subtract 10's - mvi c,'0' ;set char -expu1: - sub b ;-10 - brc expu2 - inr c ;increment digit - br expu1 -expu2: - add b ;+10 - adi '0' ;convert 1's to ASCII - mov b,a ;B=1's - mov a,c ;get 10's - stax d ;store 10's - inx d - mov a,b ;get 1's - stax d ;store 1's - inx d ;pt to next - br exp1 ;resume -; -; Expand File -; -expfile: - call getfnum ;get file number - jz exp1 ;resume if error - push h ;save ptr to next char - call ptfn ;set ptr to file name - call putn ;put file name - mvi a,'.' - stax d ;store dot - inx d ;pt to next - call putt ;put file type - pop h ;restore ptr - jmp exp1 ;resume -; -; Expand Name -; -expname: - call getfnum ;get file number - jz exp1 ;resume if error - push h ;save ptr to next char - call ptfn ;set ptr to file name - call putn ;put file name - pop h ;restore ptr - jmp exp1 ;resume -; -; Expand Type -; -exptype: - call getfnum ;get file number - jz exp1 ;resume if error - push h ;save ptr to next char - call ptfn ;set ptr to file name - mvi a,8 ;add 8 - add l - mov l,a - mov a,h - aci 0 - mov h,a - call putt ;put file type - pop h - jmp exp1 ;resume -; -; Pt to File Name whose Number (1-4) is in A -; -ptfn: - mov b,a ;get number in B - call getfn2 ;pt to file name 2 - push d ;save DE - mov a,b ;file 0? - ora a - brz ptfnx - lxi d,11 ;size of file name and type -ptfn1: - dad d ;pt to next - bjnz ptfn1 -ptfnx: - pop d ;restore DE - ret -; -; Put File Name pted to by HL -; -putn: - mvi b,8 ;8 chars - br putc -; -; Put File Type pted to by HL -; -putt: - mvi b,3 ;3 chars -; -; Copy Chars from HL to DE for up to B bytes -- flush if space -; -putc: - mov a,m ;get next char - cpi ' ' ;skip spaces - brz putc1 - stax d ;put next char - inx d ;pt to next -putc1: - inx h ;pt to next - bjnz putc - ret - -; -; Get File Number (1 to 4) -; If valid number, return with value in A and HL pting to next char -; If not valid, return with Z and HL pting to last char (F, N, T) -; -getfnum: - mov a,m ;get char - sui '1' ;convert - brc getfne ;error - cpi 4 ;range? - brnc getfne - inx h ;pt to next char - ret ;NZ from CPI 4 -getfne: - dcx h ;error return - xra a - ret - -; -; Return Number of Lines on CRT in A -; -getnlines: - push h ;save HL - call getcrt ;get CRT info - inx h ;pt to number of lines - mov a,m ;get count - pop h ;restore HL - dcr a ;subtract 1 for footer - ret - -; -; Convert char string pted to by HL into decimal number in A -; On Entry, HL pts to first digit char -; On Exit, HL pts to after last digit char and A=number -; -eval: - push b ;save BC - mvi b,0 ;set value -eval1: - mov a,m ;get digit - sui '0' ;convert to binary - brc eval2 - cpi 10 ;range? - brnc eval2 - inx h ;pt to next digit - mov c,a ;new digit in C - mov a,b ;multiply B by 10 - add a ;*2 - add a ;*4 - add b ;*5 - add a ;*10 - add c ;add in new digit - mov b,a ;result in B - br eval1 -eval2: - mov a,b ;result in A - pop b ;restore ptr - ret - -; -; These buffers overlay the scratch area to save space -; -optstrt equ scratch ;Address of First Option in Current Menu -mstart equ optstrt+2 ;Address of First Menu -cstart equ mstart+2 ;Address of Current Menu -smenfl equ cstart+2 ;System Menu Available Flag (0=No) -smeno equ smenfl+1 ;System Menu Number -smenadr equ smeno+1 ;Address of First Byte of System Menu -nmenfl equ smenadr+2 ;Next Menu Available Flag (0=No) -menuno equ nmenfl+1 ;Number of Menu -pagcnt equ menuno+1 ;Paging Counter -cflag equ pagcnt+1 ;Display Command Line Flag -dflag equ cflag+1 ;Display Menu Flag -pflag equ dflag+1 ;Paging Flag - -; -; Buffers -; -ibuff: - ds 2 ;input line buffer -expline: - ds 2 ;scratch area to expand lines in -cpflag: - ds 1 ;Temp Display Command Line Flag -dpflag: - ds 1 ;Temp Display Menu Flag -ppflag: - ds 1 ;Temp Paging Flag -cpmok: - ds 1 ;OK to Return to ZCPR3 (0=No) -tnum: - ds 41 ;space for chars and ending 0 -shdisk: - db 'A' ;disk to return to - db '00' ;user to return to - db ':;' ;log in and next command -shname: - db 'MENU ' ;program name (filled in at installation) -shfile: - ds 13 ;file name (12) and ending 0 - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/MENUCK.COM b/Source/Images/d_bp/u15/MENUCK.COM deleted file mode 100644 index 73eda193..00000000 Binary files a/Source/Images/d_bp/u15/MENUCK.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/MENUCK.MAC b/Source/Images/d_bp/u15/MENUCK.MAC deleted file mode 100644 index 747fb53b..00000000 --- a/Source/Images/d_bp/u15/MENUCK.MAC +++ /dev/null @@ -1,546 +0,0 @@ -; -; PROGRAM: MENUCK -; AUTHOR: RICHARD CONN -; VERSION: 1.0 -; DATE: 18 May 84 -; PREVIOUS VERSIONS: None -; DERIVATION: MCHECK 1.1 (6 Jan 83) -; -VERS EQU 10 ;VERSION NUMBER -z3env SET 0f400h - -; -; MENUCK is used to check the syntax of a MENU.MNU file for the ZCPR3 -; menu processor, MENU. MENU was optimized for size and runtime speed, and -; I tried to keep the size under 2K (and succeeded, for that matter). In -; keeping MENU small, the error diagnostics it gives are quite limited, with -; a variety of errors producing the message "Str Err" for MENU.MNU -; structure error. -; -; MENUCK is intended to be used to check the syntax and other features -; of a user's MENU.MNU before allowing MENU to run with it. In this way, -; many errors may be caught before the MENU.MNU file comes into common use, -; and there is plenty of space for informative diagnostics. -; - -; -; MENU Constants -; -MCMD EQU ':' ;Menu Jump Command -RSM EQU '$' ;System Menu Indic -MINDIC EQU '#' ;Menu Indic -GOPTION EQU '-' ;Global Option Indic -COPTION EQU 'C' ;Option chars -DOPTION EQU 'D' -POPTION EQU 'P' -XOPTION EQU 'X' -VARFLAG EQU '$' ;Variable Flag - -; -; CP/M Constants -; -bentry equ 5 ;BDOS Entry -fcb equ 5ch ;FCB -tbuff equ 80h ;Temp I/O Buffer -cr equ 0dh -lf equ 0ah -EOF equ 'Z'-'@' ;^Z=EOF - -; -; Externals -; - ext z3init,zfname,z3log - - ext caps,crlf,eval10,retud - ext f$open,f$close,f$read - ext print,cout - ext moveb - ext phldc,padc,pfn2,pafdc - ext codend - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - - call print - db 'MENUCK Version ' - db (vers/10)+'0','.',(vers mod 10)+'0',0 - - lda fcb+1 ;get first char - cpi ' ' ;no file name? - jz help - cpi '/' ;option? - jnz start1 -; -; Print Help Message -; -help: - call print - db cr,lf,'Syntax:' - db cr,lf,' MENUCK dir:filename.typ <-- Check File' - db cr,lf,' MENUCK dir:filename <-- Check filename.MNU' - db 0 - ret - -; -; Begin serious processing -- locate the file pted to by HL -; -start1: - lxi d,fcb ;pt to FCB - call z3log ;log into indicated FCB - -; -; Set File Type to MNU if not specified -; -start2: - lxi h,fcb+9 ;pt to file type - mov a,m ;get first char - cpi ' ' ;set type if - jnz start3 - push b ;save BC - lxi d,mnutyp ;set type to MNU - xchg - mvi b,3 ;3 bytes - call moveb - pop b ;get BC -; -; Try to Open the File -; -start3: - lxi d,fcb ;prepare to open file - xra a ;A=0 to select current disk - stax d - call f$open ;open file - jz readfile ;read in file if OK - call print - db cr,lf,' File Not Found',0 - ret -; -; Read in File -; -readfile: - call codend ;get address of first block -readloop: - lxi d,fcb ;read block - call f$read ;do it - ora a ;check for error - jnz readdone - lxi d,tbuff ;pt to block just read in - mvi b,128 ;128 bytes -readmove: - ldax d ;get byte - ani 7fh ;mask MSB - mov m,a ;put byte - inx h ;pt to next - inx d - dcr b ;count down - jnz readmove - xchg ;DE pts to next block - lhld bentry+1 ;get address of BDOS - mov a,h ;check for possible overflow - sui 10 ;10 pages below BDOS is limit - cmp d ;within range? - xchg ;HL pts to next block - jnc readloop ;continue read if within range - call print - db cr,lf,' TPA Overflow -- MENU File is Too Big',0 - ret -; -; Read is Done -- Store Ending ^Z and Set Initial Values -; -readdone: - mvi m,EOF ;Store ^Z to ensure EOF - lxi d,fcb ;Close File - call f$close - mvi a,0ffh ;A = -1 - sta menunum ;set menu number - sta maxnum ;set max number of all menus - lxi h,0 ;HL=0 - shld errors ;Set Error Count to 0 - inx h ;HL=1 - shld linenum ;Set Line Number to 1 -; -; Count Number of Menus -; - call codend ;Pt to First Byte - mov a,m ;get first byte -; -; Skip to Beginning of Menu Display -; -mdskip: - cpi EOF ;EOF? - jz mdone - cpi MINDIC ;beginning of display? - jz mcgo ;now go skip commands - call lskip ;skip to next line - jmp mdskip -mcgo: - inx h ;pt to char after MINDIC - mov a,m ;another MINDIC? - cpi MINDIC - jz mdone ;done if 2 in a row - lda maxnum ;get menu number count - inr a ;found another one - sta maxnum -mcskip: - call lskip ;skip to next line - jz mdone ;done if premature EOF - cpi MINDIC ;end of display? - jnz mcskip - inx h ;pt to char after MINDIC - mov a,m ;get it - jmp mdskip -; -; Check for Valid First Character -; -mdone: - call print - db cr,lf,'Menu Syntax Check on ',0 - call retud ;get dir - mov a,b ;get disk - adi 'A' - call cout - mov a,c ;get user - call pafdc - mvi a,':' - call cout - lxi d,fcb+1 ;pt to FCB - call pfn2 - call print ;Print Header - db cr,lf - db cr,lf,' Line Comment/Error Message' - db cr,lf,' ---- ---------------------',0 - - xra a ;set no global option - sta gopt - call codend ;get address of first byte - mov a,m ;get first char - cpi GOPTION ;global options? - jnz newmenu ;process globals - mvi a,0ffh ;set global option - sta gopt - call lprint - db '** Global Options Detected **',0 - call optchk ;check options - xra a ;set no global option - sta gopt - call nxtline ;advance to next line -; -; This is the main entry point for processing a menu -; -newmenu: - mov a,m ;get Menu Indicator - cpi MINDIC ;must be MINDIC - jz nm1 - call newerr ;add to error count - call lprint - db ' New Menu Expected, But ',MINDIC,' NOT Found -- ' - db 'Aborting',0 - jmp errxit -; -; Print that we have a new menu -; -nm1: - call lprint - db '** Menu Number ',0 - lda menunum ;increment menu number - inr a - sta menunum - call padc - call optchk ;check options -; -; Skip Thru Display -; -nm2: - call nxtline ;skip to next line - jnz nm2a ;continue if no EOF -earlyeof: - call newerr ;add to error count - call lprint - db ' Premature EOF Encountered',0 - jmp errxit -nm2a: - cpi MINDIC ;Menu Indicator? - jnz nm2 ;Continue -; -; Move Thru Menu Commands -; -nm3: - call mcmd1 ;check Menu Command Line - jz earlyeof - call lcheck ;check line - cpi MINDIC ;check for menu indicator - jnz nm3 ;continue until menu indicator encountered - inx h ;check for 2 indicators in a row for end - mov a,m ;get 2nd char - dcx h ;back up in case it is not - cpi MINDIC ;2 in a row? - jnz newmenu ;process as new menu if not -errxit: - call lprint - db '** End of Menu Check **',cr,lf,' ',0 - lhld errors ;check error count - mov a,h ;check for Zero - ora l - jnz err1 - call print - db 'No',0 - jmp err2 -err1: - call phldc ;print as decimal -err2: - call print - db ' Errors Detected',0 - ret - -; -; Utilities -; - -; -; LPRINT -- Print "Line # "+text -; -lprint: - call crlf ;new line - push h ;save HL - lhld linenum ;get line number - call phldc ;print as decimal - pop h ;restore HL - mvi a,' ' ;print - call cout - jmp print ;print text -; -; NXTLINE -- Advance to next line, check for EOF, and increment Line Number -; LSKIP -- Advance to next line and check for EOF -; Return with HL pting to first char of next line and Z Set if EOF -; -nxtline: - push h ;increment line count - lhld linenum ;add 1 - inx h - shld linenum - pop h ;fall thru to skipping -lskip: - mov a,m ;get char - cpi EOF ;EOF? - rz - inx h ;pt to next - cpi lf ;line feed? - jnz lskip ;continue if not - mov a,m ;get first char of next line - cpi EOF ;check for EOF - ret -; -; MCMD1 -- Check Menu Line, check for EOF, and increment Line Number -; Return with HL pting to first char of next line and Z Set if EOF -; -mcmd1: - mov a,m ;get char - cpi EOF ;EOF? - jz mcmdx - inx h ;pt to next - cpi VARFLAG ;variable? - jz mcmd2 - cpi lf ;line feed? - jnz mcmd1 ;continue if not -mcmdx: - push h ;increment line count - lhld linenum ;add 1 - inx h - shld linenum - pop h ;fall thru to skipping - mov a,m ;get first char of next line - cpi EOF ;check for EOF - ret -; -; Check Variable -; -mcmd2: - mov a,m ;get char - ani 7fh ;mask - call caps ;capitalize - inx h ;pt to next - cpi VARFLAG ;OK if double VARFLAG - jz mcmd1 - cpi 'D' ;OK if D - jz mcmd1 - cpi 'U' ;OK if U - jz mcmd1 - cpi 'F' ;filename.typ? - jz mcmd3 - cpi 'N' ;filename? - jz mcmd3 - cpi 'T' ;filetype? - jz mcmd3 -; -; Invalid Variable -; - dcx h ;pt to previous (bad char) - push psw ;save char - call lprint - db ' Variable Error (Not $, D, U, F, N, or T) - ',0 - pop psw ;get char - call cout ;print it - call newerr ;increment error count - jmp mcmd1 -; -; Digit from 1 to 4 should follow -; -mcmd3: - mov a,m ;get next char - inx h ;pt to next - ani 7fh ;mask and cap - call caps - cpi '1' ;must be from 1 to 4 - jc mcmd4 - cpi '5' - jc mcmd1 -; -; Invalid Digit -; -mcmd4: - dcx h ;pt to offending char - push psw - call lprint - db ' Invalid Digit for F, N, or T Variable (not 1-4) - ',0 - pop psw - call cout - call newerr ;increment error count - jmp mcmd1 - -; -; OPTCHK -- Check Line Pted to by HL for Valid GOPTION and MINDIC options -; Do Not Affect HL -; Print Error Message and Character if Invalid Option Found -; -optchk: - push h ;save HL - push b - inx h ;skip indicator -optclp: - mov a,m ;get char - call caps ;capitalize - inx h ;pt to next - cpi cr ;EOL? - jz optcdn - mov b,a ;char in B - lda gopt ;global option? - ora a ;0=no - mov a,b ;get char - jnz optcl1 ;skip RSM test if it is global - cpi RSM ;System Menu? - jz optclp -optcl1: - cpi COPTION ;check options - jz optclp - cpi DOPTION - jz optclp - cpi POPTION - jz optclp - cpi XOPTION - jz optclp - call newerr ;increment error count - call lprint - db ' Invalid Option: ',0 - mov a,b ;get char - call cout ;print char - jmp optclp -optcdn: - pop b - pop h ;restore ptr - ret -; -; Increment Error Count -; -newerr: - push h ;save HL - lhld errors ;increment error count - inx h - shld errors - pop h ;restore HL - ret -; -; Check Line, especially looking for Menu Jump -; -lcheck: - push h ;save ptr to first char - inx h ;pt to 2nd char - mov a,m ;get it - cpi MCMD ;menu jump? - jnz lchk1 - inx h ;pt to menu number - call eval10 ;convert to binary in DE - mov a,d ;D must be 0 - ora a ;check - jz lchk0 -lchker: - call newerr ;increment error count - call lprint - db ' Menu Number Out of Range',0 - jmp lchk1 -lchk0: - lda maxnum ;get max menu number - cmp e ;check for range - jc lchker -lchk1: - pop h ;restore ptr - mov a,m ;get first char in line - ret -; -; Skip HL over Blanks -; -sblank: - mov a,m ;get char - inx h ;pt to next - cpi ' ' ;blank? - jz sblank ;continue skipping - dcx h ;pt to non-blank - ret - -; -; Buffers -; -mnutyp: - db 'MNU' -errors: - ds 2 ;error count -linenum: - ds 2 ;current line number -menunum: - ds 1 ;current menu number -maxnum: - ds 1 ;max menu number -gopt: - ds 1 ;global option flag - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/MKDIR.COM b/Source/Images/d_bp/u15/MKDIR.COM deleted file mode 100644 index de53d4a6..00000000 Binary files a/Source/Images/d_bp/u15/MKDIR.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/MKDIR.MAC b/Source/Images/d_bp/u15/MKDIR.MAC deleted file mode 100644 index 8bd33108..00000000 --- a/Source/Images/d_bp/u15/MKDIR.MAC +++ /dev/null @@ -1,1020 +0,0 @@ -; -; Program: MKDIR -; Author: Richard Conn -; Version: 3.2 -; Date: 20 Nov 84 -; Previous Versions: 3.1 (28 Aug 84), 3.0 (5 Mar 84) -; -version equ 32 - -; -; MKDIR is used to edit existing named directory files and to -; create new ones. -; - -; -; Basic Equates -; -z3env SET 0f400h ;address of ZCPR3 Environment -; -fcb equ 5ch -tbuff equ 80h -cr equ 0dh -lf equ 0ah - -; -; SYSLIB Routines -; - ext print,putud,getud,logud,retud,zfname,getenv - ext cout,crlf,compb,capine,pfn1 - ext f$open,f$read,f$close - ext f$make,f$write,initfcb,f$delete,f$exist,gfa - ext bbline,padc,codend,sksp - ext hmovb,hfilb - ext sort - ext z3init,getndr,getwhl - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env -; -; Print Banner -; - call print ;check quiet flag - db 'MKDIR, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,0 -; -; Check for Wheel Powers -; - call getwhl ;get wheel byte - jnz ndir0 - call print - db ' Permission to Run MKDIR Denied - Not Wheel',0 - ret -; -; Check for Availability of Named Directory -; -ndir0: - call getndr ;get location of directory - jnz ndir1 - call print - db ' Named Directory Buffer Not Available',0 - ret -ndir1: - xra a ; A=0 - sta chflag ; set no changes - sta flflag ; set no file loaded - sta ecount ; set no entries - lda fcb+1 ; check for help - cpi '/' - jnz start1 - call print ; print help message - db cr,lf,' MKDIR is used to read and edit named directory files.' - db cr,lf,'It is invoked by the following forms --' - db cr,lf - db cr,lf,' MKDIR <-- Enter System' - db cr,lf,' MKDIR dir:filename.typ <-- Define File First' - db cr,lf,' MKDIR // <-- Print this Help' - db cr,lf,0 - ret - -start1: - call putud ; save current dir for quick return - lxi h,dnfile ; set default file name - lxi d,dfcb+1 ; copy into fcb - mvi b,11 ; 11 chars - call hmovb - lxi h,fcb+1 ; pt to fcb - mov a,m ; get name - cpi ' ' ; no entry? - jz mkdir ; enter system - dcx h ; pt to name - lxi d,dfcb ; store name in DFCB - mvi b,16 ; copy 16 chars - call hmovb - jmp loadf0 ; enter load file - -; -; Main Entry Point for Loading a File -; -loadfile: - lxi d,dfcb ; set up default file name - call zfname ; extract info -loadf0: - call retud ; get UD in CB - lda dfcb ; get disk - ora a ; current? - jz loadf1 - dcr a ; A=0 - mov b,a ; disk in B -loadf1: - lda dfcb+13 ; get user - mov c,a ; in C - call logud ; log into UD to begin search -; -; Entry Point for Loading File in DFCB -; -ffile: - lxi d,dfcb ; pt to FCB - call initfcb ; init it - call f$open ; try to open file - jz ffile1 - call print - db cr,lf,'File ',0 - lxi d,dfcb+1 ; print name - call pfn1 - call print - db ' Not Found',0 - jmp mkdir -ffile1: - call getnd ; get max size of file - mov b,a ; ... in B - inr b ; add 1 for overflow - call codend ; pt to scratch buffer -readf: - lxi d,dfcb ; pt to FCB - call f$read ; read next block - jnz readd ; done if EOF - push b ; save count - mvi b,128 ; copy 128 bytes - lxi d,tbuff ; ... from TBUFF - xchg - call hmovb - xchg ; HL pts to next block to copy into - pop b ; get count - dcr b ; count down - jnz readf - call print - db cr,lf,'Named Directory File too Large for System',0 - call getud ; return home - jmp mkdir ; reset parameters -readd: - call f$close ; close file - call getud ; return home -; -; Fill in empty space at end of buffer -; -readd1: - mov a,b ; get count - cpi 1 ; done? - jz readd2 - push b ; save count - mvi b,128 ; fill 128 bytes with 0 - xra a - call hfilb - pop b ; get count - dcr b ; count down - jmp readd1 -readd2: - mvi a,0ffh - mov m,a ; set EOF mark - sta flflag ; set file loaded flag -; -; Determine Entry Count -; - call codend ; pt to first entry - mvi b,0 ; set entry count - lxi d,18 ; size of entry -readd3: - mov a,m ; get first char of next entry - ora a ; done? - jz readd4 - inr b ; increment count - dad d ; pt to next - jmp readd3 -readd4: - mov a,b ; set entry count - sta ecount - jmp mkdir1 ; enter MKDIR -; -; Enter MKDIR System and Init Environ -; Enter at MKDIR if no file loaded, enter at MKDIR1 if file loaded -; -mkdir: - call dinit0 ; init directory - xra a ; A=0 - sta ecount ; set no entries present - sta flflag ; set no file loaded - sta chflag ; set no changes -mkdir1: - call print - db cr,lf,'MKDIR Command (? for Help)? ',0 - call capine ; get command - lxi d,mkdir1 ; set ret address - push d - lxi h,ctable ; scan command table for it - mov c,a ; command in C -mkdir2: - mov a,m ; get command letter - ora a ; end of table? - jz mkdirh - cmp c ; match? - jz mkdir3 - inx h ; skip over address - inx h - inx h - jmp mkdir2 -mkdir3: - inx h ; get address in HL - mov a,m ; low - inx h - mov h,m - mov l,a ; HL is address of routine - pchl ; "call" routine -; -; Print MKDIR Command Help -; -mkdirh: - call print - db cr,lf,'MKDIR Commands are --' - db cr,lf,' C -- Change Directory (Add/Rename/Delete Entries)' - db cr,lf,' I -- Initialize Directory' - db cr,lf,' P -- Print Directory' - db cr,lf,' R -- Read Directory File' - db cr,lf,' S -- Status of MKDIR Environment' - db cr,lf,' W -- Write Directory File' - db cr,lf,' X -- Exit Program' - db cr,lf,0 - ret -; -; Command Table -; -ctable: - db 'C' ; change directory - dw change - db 'I' ; init directory - dw dinit - db 'P' ; print directory - dw pwd - db 'R' ; read file - dw read - db 'S' ; status - dw status - db 'W' ; write file - dw write - db 'X' ; exit - dw exit - db 0 ; end of table -; -; Status -; -status: - call print - db cr,lf,'** MKDIR Status **',cr,lf,cr,lf,0 - call prec ; print entry count - call print - db cr,lf,'Working File Name: ',0 - lxi d,dfcb+1 - call pfn1 - call crlf ; new line - call crlf - lda chflag ; changes made? - ora a - jnz stat1 - call print - db 'No ',0 -stat1: - call print - db 'Changes made to Directory since Startup' - db cr,lf,0 - lda flflag ; file loaded? - ora a ; 0=no - jnz stat2 - call print - db 'No ',0 -stat2: - call print - db 'File has been loaded',cr,lf,0 - ret - -; -; Init Directory -; -dinit: - call print - db cr,lf,' Are you sure you want to Initialize the Directory ' - db '(Y/N/=N)? ',0 - call capine ; get response - call crlf - cpi 'Y' ; Yes is only valid reply - rnz -dinit0: - xra a ; A=0 - sta ecount - cma - sta chflag ; set change flag - call getnd ; get directory size - mov b,a ; ... in B - call codend ; pt to directory -dinit1: - push b ; save counter - xra a ; zero fill - mvi b,128 ; 128 bytes - call hfilb - pop b ; get counter - dcr b ; count down - jnz dinit1 - mvi m,0ffh ; store ending mark - ret -; -; Read File -; -read: - pop psw ; clear stack - call getfname ; get file name - ora a ; none? - jz ffile ; just find default file and load it - jmp loadfile ; parse entry and load file -; -; Get File Name from User -; -getfname: - call print - db cr,lf,'Name of File ( = ',0 - call retud ; get current DU - mov a,b ; print disk - adi 'A' - call cout - mov a,c ; print user - call padc - call print - db ': ',0 - lxi d,dfcb+1 ; print default name - call pfn1 - call print - db ')? ',0 - mvi a,0ffh ; capitalize - call bbline ; get user input - call sksp ; skip to non-blank - mov a,m - ora a ; default? - ret -; -; Write File -; -write: - call getfname ; get file name - jz write1 - lxi d,dfcb ; parse into DFCB - call zfname ; parse file name - call retud ; get current DU - lda dfcb ; get disk - ora a ; current? - jz write0 - dcr a ; adjust for A=0 - mov b,a ; ... in B -write0: - lda dfcb+13 ; get user - mov c,a ; ... in C - call logud ; log into new dir -write1: - lxi d,dfcb ; open file for output - call initfcb - call f$exist ; does file exist? - jz wf0 - call gfa ; get file attributes - ani 1 ; R/O? - jz wf0 - call print - db cr,lf,'File is R/O',0 - jmp getud ; go home -wf0: - call f$make ; open file - inr a ; a was 0ffh if error - jz werr ; write error and abort - call print - db cr,lf,'Writing Directory to Disk ... ',0 - call getnd ; get size of file - mov b,a ; count in B - call codend ; pt to start of buffer -wf1: - push b ; save counter - lxi d,tbuff ; copy into buffer - mvi b,128 ; 128 bytes - call hmovb - lxi d,dfcb ; pt to FCB - call f$write ; write block - pop b ; get ptr - jnz werr - dcr b ; count down - jnz wf1 - lxi d,dfcb ; pt to FCB - call f$close ; close file - call getud ; go home - xra a ; A=0 - sta chflag ; set no changes flag - call print - db 'Done',0 - ret -werr: - call print - db cr,lf,'Error in Disk Write',0 - jmp getud ; go home -; -; Exit from MKDIR -; -exit: - pop psw ; clear stack - lda chflag ; check for any changes - ora a ; 0=No - rz - call print - db cr,lf - db cr,lf,'Directory has changed since last Write' - db cr,lf,'Do you want to write Directory to Disk ' - db '(Y/N)? ',0 - call capine ; get response - call crlf ; new line - cpi 'N' ; no? - cnz write ; write if not No - ret -; -; Change Directory Contents -; -change: - call setduok ; save old DUOK flag and set new one - call print - db cr,lf,'** MKDIR Change Mode **',0 -ch0: - call print - db cr,lf,'Directory Entry (? for Help)? ',0 - mvi a,0ffh ; caps - call bbline ; get user input - call sksp ; skip to non-blank - mov a,m ; get char - ora a ; no input? - jz chprint ; done, so print directory - mov a,m ; get first char - cpi 'X' ; Exit? - jz chexit ; if so, sort and then exit - cpi '/' ; help? - jz chhelp - cpi '?' ; help? - jnz ch1 -chhelp: - call print - db cr,lf - db cr,lf,'MKDIR Change Mode --' - db cr,lf,' You may issue the following commands at this point:' - db cr,lf - db cr,lf,' DU:dirname <-- Create/Rename Dir Entry' - db cr,lf,' DU: <-- Delete Dir Entry' - db cr,lf,' <-- Print Directory' - db cr,lf,' X <-- Exit' - db cr,lf,' ? <-- Print this Help' - db cr,lf,0 - jmp ch0 -chprint: - call dsort ; use dsort routine - call pwd ; use pwd routine - jmp ch0 ; continue -ch1: - lxi d,tfcb ; extract user and disk info as well as name - call zfname ; get info - call retud ; get DU - lda tfcb ; get disk - ora a ; default? - jz ch2 - dcr a - mov b,a ; A=0 -ch2: - inr b ; A=1 - lda tfcb+13 ; get user - mov c,a ; ... in C - mov a,b ; save as temp disk and user - sta tdisk - mov a,c - sta tuser -; -; Scan Directory for Temp Disk and User -; - call codend ; pt to first entry -scanud: - mov a,m ; done? - ora a - jz scanud2 - inx h ; pt to name - inx h - mov a,m ; get first char of name - dcx h - dcx h ; pt to disk - cpi ' ' ; deleted entry? - jz scanud1 - mov a,m ; get disk - cmp b - jnz scanud1 - inx h ; pt to user - mov a,m ; get user - dcx h ; pt back - cmp c ; compare it - jz udfound -scanud1: - lxi d,18 ; pt to next - dad d - jmp scanud -; -; DU not found -; -scanud2: - lda tfcb+1 ; delete? - cpi ' ' ; space if so - jnz addname - call print - db cr,lf,' DU not Found',0 - jmp ch0 -; -; Found Possible Directory Entry -; -udfound: - inx h ; found existing entry - inx h ; pt to name - lda tfcb+1 ; delete? - cpi ' ' ; space if so - jz delname -; -; Rename Function -; - call print - db cr,lf,' Renaming ',0 - mvi b,8 ; 8 chars - call prhlb ; print name - push h ; save ptr to name - call etest ; check for duplicate name - pop d ; restore ptr to name - jz ch0 ; abort since duplicate - lxi h,tfcb+1 ; pt to new name - mvi b,8 ; 8 chars - call hmovb ; copy - mvi a,0ffh ; set change - sta chflag - jmp ch0 -; -; Add Function -; -addname: - call print - db cr,lf,' Adding ',0 - lxi h,tfcb+1 ; print name of entry to add - mvi b,8 - call prhlb -; -; Test for Duplicate Name -; -putname: - call etest ; test for duplicate name - jz ch0 ; abort if duplicate -; -; Test to see if there is room for another entry -; -putn1: - mvi b,18 ; 18 bytes required for entry - push h ; save ptr -putn2: - mov a,m ; check for 0FFH - cpi 0ffh - jz putn3 - inx h ; pt to next - dcr b - jnz putn2 - pop h ; get ptr to entry - jmp putn4 ; make entry -putn3: - pop psw ; clear stack - call print - db cr,lf,'** Directory Full **',0 - jmp ch0 -; -; Make Directory Entry -; -putn4: - mvi a,0ffh ; set change flag - sta chflag - lda tdisk ; set disk and user - mov m,a - inx h - lda tuser - mov m,a - inx h - lxi d,tfcb+1 ; pt to new name - xchg - mvi b,8 ; 8 chars - call hmovb ; set new name - call password ; enter password into buffer at DE - lda ecount ; print count - inr a ; increment entry count - sta ecount - jmp precount ; print count -; -; Test for Duplicate Directory Name -; -etest: - call codend ; pt to first entry -etest0: - mov a,m ; done? - ora a - jz etest2 - inx h ; pt to name - inx h - lxi d,tfcb+1 ; pt to new name - mvi b,8 ; 8 chars - call compb ; compare - jnz etest1 - call crlf - lxi h,tfcb+1 - mvi b,8 ; 8 chars - call prhlb ; print dir name - call print - db ' is a Duplicate Name',0 - xra a ; return Z - ret -; -; Last Entry was OK - Pt to Next -; -etest1: - lxi d,16 ; pt to next entry - dad d - jmp etest0 -; -; No Duplicate Entries - Return NZ and HL pts to after last entry -; -etest2: - dcr a ; set NZ - ret -; -; Enter 8-char password into memory pted to by HL -; -password: - push d ; save ptr - call print - db ' -- Password? ',0 - mvi a,0ffh ; caps - call bbline ; get line from user - call crlf ; new line - mvi b,8 ; 8 chars max - pop d ; pt to destination -pword1: - mov a,m ; get char - ora a ; done? - jz pword2 - stax d ; put char - inx h ; pt to next - inx d - dcr b ; count down - jnz pword1 - ret -pword2: - mvi a,' ' ; rest are spaces - stax d ; store space - inx d ; pt to next - dcr b ; count down - jnz pword2 - ret - -; -; Delete Function -; -delname: - mvi a,0ffh ; change made - sta chflag - call print - db cr,lf,' Deleting ',0 - mvi b,8 ; 8 chars - call prhlb - mvi m,' ' ; space fill - call dirpack ; pack directory - call print - db ' -- ',0 - lda ecount ; decrement entry count - dcr a - sta ecount -; -; Print Number of Remaining Entries in Directory -; -precount: - call prec ; print count - jmp ch0 -prec: - lda ecount ; print remaining count - call padc - call print - db ' Entries in Directory',0 - ret -; -; Pack Memory-Based Directory -- One Entry has been Deleted -; -dirpack: - call codend ; get address of first entry - mov d,h ; DE pts to it also - mov e,l -dirp0: - mov a,m ; get first byte - ora a ; done if zero - jz dirp2 - push b ; save counts - inx h ; pt to name - inx h - mov a,m ; get char - dcx h ; pt back to disk - dcx h - cpi ' ' ; no entry if space - jz dirp1 - mvi b,18 ; copy 18 bytes - call hmovb - pop b ; get counts - jmp dirp0 -dirp1: - lxi b,18 ; pt to next entry - dad b - pop b ; get counts - jmp dirp0 -dirp2: - mvi b,18 ; fill last entry with zeroes - xra a - xchg ; HL pts to last entry - jmp hfilb -; -; Exit Change Routine -; -chexit: - call resduok ; restore DUOK flag and fall thru to DSORT -; -; Sort Directory -; -dsort: - lda ecount ; number of elements - ora a ; any? - rz ; done if none - sta ssbcnt ; set count - call codend ; pt to first element - shld ssbstrt ; set starting address - lxi d,ssb ; pt to sort specifiction block - jmp sort ; sort -; -; Sort Compare Routine -; -compare: - push h ; don't change regs - push d - ldax d ; compare disk - cmp m - jnz comp1 - inx h ; pt to user - inx d - ldax d ; compare user - cmp m -comp1: - pop d ; restore regs - pop h - ret - -; -; SETDUOK - Save Old DUOK Flag and Set Flag to TRUE -; RESDUOK - Restore Old DUOK Flag -; -setduok: - push h ;save regs - push d - call getenv ;get ptr to environment descriptor - lxi d,2EH ;offset to DUOK Flag - dad d - mov a,m ;get flag - sta duoksav ;save flag - mvi m,1 ;turn flag on - pop d ;restore regs - pop h - ret -resduok: - push h ;save regs - push d - call getenv ;get ptr to environment descriptor - lxi d,2EH ;offset to DUOK Flag - dad d - lda duoksav ;get save flag - mov m,a ;set flag - pop d ;restore regs - pop h - ret - -; -; Print Names of Directory Elements -; -pwd: - call crlf ; new line - lda ecount ;check count first - ora a ;no entries? - jnz pwd01 - call print - db ' No Entries in Directory',0 - ret -; -; Print Header for Password Entries -; -pwd01: - mvi b,2 ;2 times -pwd0a: - call print - db ' DU : DIR Name - Password ',0 - dcr b ;count down - jnz pwd0a - call crlf - mvi b,2 -pwd0b: - call print - db '---- -------- -------- ',0 - dcr b ;count down - jnz pwd0b - call crlf -; -; Begin Output Processing -; - mvi c,0 ;set entry count - mvi b,1 ;set disk 1 - call codend ;pt to buffer containing new directory -; -; Print Each Resident Command Name -; -pwd1: - mov a,m ;get table entry - ora a ;end of table? - rz ;exit - cmp b ;same disk? - jz pwd2 -; -; Advance to Next Set of Entries for New Disk -; - mov b,a ;set new disk - mov a,c ;get count - ani 3 ;see if newline already given - cnz crlf ;complete current line - call crlf ;1 additional line - mvi c,0 ;reset count -pwd2: - push b ;save counters -; -; Print DU: -; - mov a,m ;get disk - adi '@' ;convert to letter (A to P) - call cout - inx h ;pt to user - mov a,m ;get user - call padc ;print user number - call print ;print separator - db ': ',0 - inx h ;pt to name -; -; Print DIR -; - call prname ;print name of directory - call print - db ' - ',0 - call prname ;print name of password - pop b ;get counters - inr c ;another entry - push b ;save counters -; -; Print Separator -; - call print ;print separator - db ' ',0 - pop b ;get counters -; -; New Line Counter -; - inr c ;increment entry counter - mov a,c ;check for done - ani 3 ;every 4 - cz crlf ;new line - jmp pwd1 -; -; Print 8-char name (directory or password) and advance ptr -; -prname: - mvi b,8 ;print name -prn1: - mov a,m ;get char - call cout - inx h ;pt to next - dcr b ;count down - jnz prn1 - ret - -; -; Utilities -; - -; -; Print chars pted to by HL for B bytes -; -prhlb: - push h ; save HL -prhlb1: - mov a,m ; print chars - inx h ; pt to next - call cout - dcr b ; count down - jnz prhlb1 - pop h ; get HL - ret - -; -; Compute Number of 128-byte blocks in Named Dir -; Return with Number in A and HL pting to it -; -getnd: - call getndr ; get ptr to NDR and number of entries in A - push h ; save ptr - mvi h,0 ; HL = value - mov l,a - dad h ; *2 - mov d,h ; DE = value * 2 - mov e,l - dad h ; *4 - dad h ; *8 - dad h ; *16 - dad d ; *18 - mov a,h ; /128 - rlc - ani 0feh - mov h,a - mov a,l - rlc - ani 1 - ora h ; A = value * 18 / 128 - inr a ; +1 - pop h ; get ptr - ret - -; -; Default File Name -; -dnfile: - db 'NAMES ' - db 'NDR' - -; -; Sort Specification Block -; -ssb: -ssbstrt: - ds 2 ; start address of dir -ssbcnt: - dw 0 ; number of records to sort - dw 18 ; 18 bytes/record - dw compare ; compare routine - dw 0 ; no ptr table - db 0,0 ; don't use ptrs -; -; Buffers -; -duoksav: - ds 1 ; save value for DUOK flag -tdisk: - ds 1 ; temp disk -tuser: - ds 1 ; temp user -flflag: - ds 1 ; file loaded flag -chflag: - ds 1 ; dir changed flag -ecount: - ds 1 ; entry count -crcnt: - ds 1 ; new line count -tfcb: - ds 36 ; temp FCB -dfcb: - ds 36 ; Default FCB - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/MU3.COM b/Source/Images/d_bp/u15/MU3.COM deleted file mode 100644 index e686ed56..00000000 Binary files a/Source/Images/d_bp/u15/MU3.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/MU3.HLP b/Source/Images/d_bp/u15/MU3.HLP deleted file mode 100644 index 703fcd0c..00000000 --- a/Source/Images/d_bp/u15/MU3.HLP +++ /dev/null @@ -1,175 +0,0 @@ -; - - - The Memory Utility MU3 - - - M - Overview of MU3 - - C - MU3 Commands - - - ---- Command Summary ---- - 1 - Movement: + - A arrows - 2 - Value Entry: N T - 3 - Other: H ^R ^C - -:M -Command: MU3 1.0 - -Syntax: - MU3 <-- Invoke MU3 pointing to ZCPR3 Env Desc -or - MU3 address <-- Invoke MU3 pointing to address (hex) - -Function: - - MU³ provideó á screen-orienteä editoò whicè maù bå useä -tï examinå anä modifù memorù aô thå user'ó  discretion®  Iô -loadó  aó  á transienô anä runó froí thå  TPA¬  startinç  aô -100H® MU³ findó mosô oæ itó applicatioî iî thaô iô doeó noô -overlaù thå ZCPR³ CP¬  sï thå useò caî examinå thå operatinç -systeí directlù witè MU3. - -Options: None - - -Comments: - - MU³ useó thå ZCPR³ TCAÐ foò support®  Worä Staò cursoò -motioî  conventioî applieó anä thå user'ó arro÷ keyó maù  bå -activå iæ theù arå specifieä iî thå TCAÐ entry. - - Alì  numeriã  inpuô argumentó defaulô  tï  hexadecimal¬ -sucè  aó  numberó tï bå inpuô anä addresses®  Thió  caî  bå -overriddeî  bù  prefixinç thå numbeò witè á  '#§  character® -Foò instance¬ iî responså tï thå Á (selecô address© command¬ -thå  useò maù typå 7d° oò #200° tï indicatå memorù  locatioî -7D0 hex. - - Alì  commandó  arå simplå anä  self-explanatory®  Theù -include: C - Enter ZCPR3 Command Line - N - Enter Hex Numbers T - Enter Text - A - Specify Address +/- Next/Last Block - H - Hex Calculator Arrows - Movement - ^R - Refresh Screen ^C - Exit MU3 - -Selected Error Messages: None - -Examples of Use: - - MU3 F000 - - invoke MU3 and point to address 0F000H - -:C - The Commands of MU3 - - MU³  ió  quitå simplå tï uså anä recognizeó onlù á  fe÷ -commands® Theså commandó arå presenteä iî á menõ tï thå MU³ -useò aó thå prograí ió running. - - Thå MU³ displaù screeî ió formatteä aó indicateä below: - - MU3 Memory Editor - Value - - Hexadecimal Memory Dump ASCII Dump - --- Movement -- -------------- Operation --------------- - ^E A Enter Address + Next Block - ^ H Hex Calculator - Last Block - ^S <-+-> ^D N Enter Hex Numbers ^R Replot Screen - v T Enter Text ^C Exit MU3 - ^X C Enter Command Line - - Aó thå useò moveó abouô oî thå screen¬ usinç eitheò thå -Worä Staò cursoò movemenô conventioî oò hió arro÷ keys¬ thå -valuå iî thå uppeò righô corneò changes¬ indicatinç botè thå -heø  valuå  anä ASCIÉ characteò representatioî oæ  thå  bytå -beinç pointeä to®  Also¬  á cursoò moveó iî thå Hexadecimaì -Memorù  Dumð  region¬  indicatinç wherå thå useò ió  iî  thå -current 128-byte block. - - Oncå thå useò ió pointinç tï á desireä byte¬ hå maù uså -thå Î oò Ô commandó tï changå memorù startinç aô thå bytå hå -is pointing to. - -:1 - Movement Commands - - Thå  cursoò  maù bå moveä abouô oî thå screeî  viá  thå -Worä Staò cursoò movemenô convention® Iæ thå arro÷ keyó foò -thå user'ó terminaì arå installeä viá thå ZCPR³  TCAP¬  theî -they keys may also be used to move the cursor. - - Aô  anù  time¬  thå useò maù strikå thå letteò Á  (caså -makeó nï difference© tï selecô á differenô regioî oæ  memorù -tï  view®  MU³ wilì displaù 12¸ byteó oæ memorù startinç aô -the address given by the user. - - Thå  commandó  «  anä - movå thå  displaù  forwarä  anä -backward¬  resp¬ foò onå blocë (12¸ bytes)® Thå movemenô ió -instantaneous¬  anä  thå cursoò ió repositioneä tï thå firsô -byte in the new block. - -:2 - Value Entry Commands - - Thå  Î commanä ió useä tï enteò á grouð oæ  hexadecimaì -numberó  intï memorù startinç aô thå addresó  beinç  pointeä -to® Thå useò ió prompteä foò input¬ anä hå maù theî enteò á -serieó  oæ hexadecimaì values¬  separateä bù spaces®  Entrù -terminateó  wheî thå useò strikeó thå RETURÎ key®  Caså  ió -not significant. Any number prefixed with '#' is decimal. - - Foò  example¬  thå  followinç ió á samplå  sequencå  oæ -values which may be entered: - - 0 1f f3 ff 2c c3 0 2 3 4 #192 #255 - - Thå  Ô  commanä  ió  useä tï  enteò  texô  intï  memorù -startinç aô thå cursoò position®  Thå useò ió prompteä  foò -input¬  anä  hå maù theî enteò á strinç oæ characters®  Alì -characteró inpuô arå significant® Entrù terminateó wheî thå -user strikes the RETURN key. Case is significant. - - - If¬  whilå iî thå middlå oæ texô entry¬ thå useò wisheó -tï  inserô  á  numeriã value¬  thå  escapå  formaô  §  followeä  bù carriagå returî  anä  linå  feeä -characters into memory starting at the cursor: - - <<0d><#10> - -'0d§  ió  0Ä heø anä '#10§ ió 1° decimaì  oò  0Á  hex®  Thå -leading '<<' translates into one '<'. - -:3 - Other Commands - - Thå  Ã commanä allowó thå useò tï enteò á commanä  linå -foò immediatå executioî bù thå ZCPR³ Commanä Processor®  Iæ -MU³  ió  invokeä  aó á shelì viá  thå  SHSEÔ  command¬  thió -commanä  provideó  aî escapå mechanisí aó welì aó á  waù  tï -executå  á  commanä linå froí withiî MU3®  Thå  SHCTRÌ  POÐ -command will terminate the current shell on the shell stack. - - Thå  È commanä invokeó á hexadecimaì  calculator®  Thå -useò  ió askeä tï enteò twï hexadecimaì numbers¬  anä  theså -numberó  arå  addeä anä subtracted¬  witè thå resultó  beinç -printeä immediately®  Again¬ decimaì numberó maù bå entereä -by prefixing them with '#'. - - Thå ^Ò commanä refresheó thå screeî foò thå user® Thió -ió handù iæ thå screeî waó garbleä iî somå way¬  sucè aó  bù -turning off the CRT. - - The ^C command causes MU3 to exit to ZCPR3. - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/MU3.MAC b/Source/Images/d_bp/u15/MU3.MAC deleted file mode 100644 index e036db4c..00000000 --- a/Source/Images/d_bp/u15/MU3.MAC +++ /dev/null @@ -1,854 +0,0 @@ -; -; Program: MU3 -; Author: Richard Conn -; Version: 1.0 -; Date: 30 June 84 -; Previous Versions: None -; -vers equ 10 -z3env equ 0f400h - -; -; MU3 is the ZCPR3 Memory Utility. It allows the user to display -; blocks of memory, edit them, and perform general memory-oriented -; manipulation. See the file MU3.HLP for usage details. -; - -; -; General Equates -; -bs equ 08h -cr equ 0dh -lf equ 0ah -fcb equ 5ch -dim equ 1 ;goto standout mode -bright equ 2 ;exit standout mode -EOLCH EQU 0 ;END OF LINE CHAR -SEPCH EQU ',' ;SEPARATOR CHAR -EROW EQU 6 ;FIRST ROW OF EDITOR DISPLAY -ECOL EQU 4 ;FIRST COL OF EDITOR DISPLAY -ECOLC EQU ECOL+16*3+8 ;FIRST COL OF EDITOR CHAR DISPLAY -ECURS EQU '>' ;EDITOR CURSOR -PRROW EQU 22 ;PROMPT ROW -PRCOL EQU 10 ;PROMPT COLUMN -PRCOLI EQU PRCOL+15 ;PROMPT INPUT COL -ERROW EQU 23 ;ERROR MESSAGE ROW -ERCOL EQU 15 ;ERROR MESSAGE COLUMN - -; -; SYSLIB/Z3LIB/VLIB Externals -; - ext z3vinit,envptr,codend,putcl - ext cls,gotoxy,ereol,at,vprint,stndout - ext cout,crlf,cin,caps - ext bline,sksp - ext phl4hc,pa2hc,phlfdc - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3vinit ;initialize the ZCPR3 Env and the VLIB Env -; -; DEFINE FREE SPACE -; - CALL CODEND ;DETERMINE ADDRESS - MVI M,126 ;126 CHARS INPUT ALLOWED - SHLD BUFFER ;SET PTR -; -; SET UP ARROW KEYS -; - LHLD ENVPTR ;PT TO ENVIRONMENT DESCRIPTOR - LXI D,80H+10H ;PT TO ARROW KEY INFO - DAD D - LXI D,EDCURT ;PT TO CURSOR TABLE - MVI B,4 ;4 ARROW KEYS -ARROW: - MOV A,M ;GET CHAR - STAX D ;STORE CHAR - INX H ;PT TO NEXT - INX D ;PT TO NEXT ENTRY - INX D - INX D - DCR B ;COUNT DOWN - JNZ ARROW -; -; Check for Command Line Parameter -; - lxi h,fcb+1 ;pt to first char - mov a,m ;get char - cpi ' ' ;no param? - jnz pcheck - lhld envptr ;pt to environment descriptor - jmp mu3 -; -; We have a parameter -; -pcheck: - cpi '/' ;help? - jz help - call hexin ;convert to binary - xchg ;HL=value - jmp mu3 -; -; Print help message -; -help: - call vprint - db cr,lf,'Syntax:' - db cr,lf,' MU3 <-- Invoke MU3 at Env Desc' - db cr,lf,' MU3 <-- Invoke MU3 at Address' - db 0 - ret -; -; Erase to EOL -; If fct not supported, send out B spaces and B backspaces -; -vereol: - call ereol ;try erase - rnz - push b ;save B - mvi a,' ' ;send spaces - call vereol1 - pop b ;get B - mvi a,bs ;send backspaces -vereol1: - call cout ;send char in A - dcr b - jnz vereol1 - ret -; -; Clear Screen -; If fct not supported, write 24 CRLFs -; -vcls: - call cls ;try clear - rnz - push b ;save B - mvi b,24 ;count -vcls1: - call crlf - dcr b - jnz vcls1 - pop b - ret -; -; Run MU3 -; HL contains starting address -; -mu3: - SHLD BLOCK ;SAVE PTR TO BLOCK -; -; REFRESH EDIT SCREEN -; -EDIT0: - CALL VCLS ;NEW SCREEN - CALL AT - DB 2,26 ;ROW 2, COL 26 - CALL VPRINT ;BANNER - DB 'MU3 Memory Editor, Version ' - DB (VERS/10)+'0','.',(VERS MOD 10)+'0' - DB 0 - CALL AT ;POSITION FOR VALUE TEXT - DB 3,67 - CALL VPRINT - DB DIM,'Value',BRIGHT,0 - MVI H,EROW+9 ;POSITION FOR COMMAND DISPLAY - MVI L,1 - CALL GOTOXY ;POSITION CURSOR - CALL VPRINT ;PRINT COMMAND SUMMARY - DB ' -- Movement --' - DB ' -------------- Operation ---------------',CR,LF - DB ' ^E ' - DB 'A',DIM,' Enter Address ',BRIGHT - DB ' +',DIM,' Next Block',BRIGHT,CR,LF - DB ' ^ ' - DB 'H',DIM,' Hex Calculator ',BRIGHT - DB ' -',DIM,' Last Block',BRIGHT,CR,LF - DB ' ^S <-+-> ^D ' - DB 'N',DIM,' Enter Hex Numbers ',BRIGHT - DB ' ^R',DIM,' Replot Screen',BRIGHT,CR,LF - DB ' v ' - DB 'T',DIM,' Enter Text ',BRIGHT - DB ' ^C',DIM,' Exit MU3',BRIGHT,CR,LF - DB ' ^X ' - DB 'C',DIM,' Enter Command Line',BRIGHT - DB 0 -; -; REENTER MU3 WITH PTRS RESET -; -MU3R: - XRA A ;A=0 - STA EINDEX ;SET INDEX TO 0 (FIRST ELEMENT) - STA EDERR ;SET NO PREVIOUS ERROR - CALL EDPLOT ;PLOT BUFFER DATA -; -; INPUT EDITOR COMMAND -; -EDITCMD: - CALL EDERCL ;CLEAR EDITOR INVALID COMMAND MESSAGE -EDITCMD1: - CALL PRMSG ;POSITION AT PROMPT MESSAGE - DB DIM,'MU3 Command?',BRIGHT,0 - CALL PRINP ;POSITION AT PROMPT INPUT - DB 0 - CALL CIN ;GET CHAR - CALL CAPS ;CAPITALIZE - MOV B,A ;COMMAND IN B - LXI H,EDCURT ;PROCESS CURSOR COMMANDS FIRST - CALL CMD ;PROCESS COMMAND - LXI H,ECMDTBL ;EDITOR COMMAND TABLE - CALL CMD ;PROCESS COMMAND - MVI A,0FFH ;SET ERROR FLAG - STA EDERR - CALL ERMSG ;ERROR MESSAGE - DB 'Invalid Command',0 - JMP EDITCMD1 -; -; Position at Prompt Message and Print it -; -PRMSG: - CALL AT ;POSITION - DB PRROW,PRCOL - JMP VPRINT ;PRINT IT -; -; Position at Prompt Input and Print Prompt -; -PRINP: - CALL AT ;POSITION - DB PRROW,PRCOLI - JMP VPRINT ;PRINT IT -; -; Position at Error Message and Print It -; -ERMSG: - CALL AT ;POSITION - DB ERROW,ERCOL - JMP VPRINT ;PRINT IT -; -;INPUT ERROR -; -WHAT: - MVI A,0FFH ;SET ERROR FLAG - STA EDERR - CALL ERMSG - DB 'Value Error',0 - JMP EDITCMD1 -; -;Command Table Search and Execute -; -CMD: - MOV A,M ;CHECK FOR END OF TABLE - ORA A - RZ ;COMMAND NOT FOUND - CMP B ;MATCH? - JZ CMDRUN - INX H ;SKIP TO NEXT ENTRY IN TABLE - INX H - INX H - JMP CMD -; -;RUN COMMAND -; -CMDRUN: - INX H ;PT TO LOW ADDRESS - MOV E,M - INX H ;PT TO HIGH ADDRESS - MOV D,M - XCHG - POP PSW ;CLEAR STACK - PCHL ;RUN ROUTINE -; -;PLOT BUFFER DATA -; -EDPLOT: - MVI H,EROW-1 ;SET ROW - MVI L,ECOL ;SET COLUMN - CALL GOTOXY ;POSITION CURSOR - CALL VPRINT - DB DIM - DB ' 0 1 2 3 4 5 6 7 8 9 A B C D E F' - DB BRIGHT,0 - INR H ;NEXT ROW - CALL GOTOXY ;POSITION CURSOR - XCHG ;POSITION IN DE - LHLD BLOCK ;PT TO DATA - MVI B,8 ;8 LINES -; -;Print Next Line on Screen -; -EDIT00: - CALL STNDOUT ;GO DIM - MOV A,H ;OUTPUT ADDRESS - CALL PA2HC - MOV A,L - CALL PA2HC - CALL VPRINT - DB ':',BRIGHT,' ',0 - MVI C,16 ;16 ELEMENTS -EDIT01: - MOV A,M ;GET BYTE - CALL PA2HC ;PRINT AS HEX - CALL SPACE ;PRINT 1 SPACE - INX H ;PT TO NEXT - DCR C ;COUNT DOWN - JNZ EDIT01 - XCHG ;POSITION AGAIN - INR H ;NEXT ROW - CALL GOTOXY - XCHG - DCR B ;COUNT DOWN - JNZ EDIT00 - MVI H,EROW ;RESET ROW - MVI L,ECOLC ;RESET COL - CALL GOTOXY ;POSITION CURSOR - XCHG ;POSITION IN DE - LHLD BLOCK ;PT TO DATA - MVI B,8 ;8 LINES -EDIT02: - CALL BAR ;PRINT BAR - MVI C,16 ;16 ELEMENTS -EDIT03: - MOV A,M ;GET BYTE - ANI 7FH ;MASK MSB - CPI 7FH ;DON'T PRINT 7FH - JZ EDIT7F - CPI ' ' ;SPACE OR MORE? - JNC EDIT04 -EDIT7F: - MVI A,'.' ;PRINT DOT -EDIT04: - CALL COUT ;PRINT BYTE - INX H ;PT TO NEXT - DCR C ;COUNT DOWN - JNZ EDIT03 - CALL BAR ;PRINT ENDING BAR - XCHG ;POSITION AGAIN - INR H ;NEXT ROW - CALL GOTOXY - XCHG - DCR B ;COUNT DOWN - JNZ EDIT02 - CALL EDCUR ;POSITION CURSOR - RET -; -;EDITOR COMMAND TABLE -; -ECMDTBL: - DB CR ;NOP - DW EDITCMD - DB 'C'-'@' ;^C = EXIT MU3 - DW EDCC - DB 'R'-'@' ;^R = REFRESH - DW EDIT0 - DB 'E'-'@' ;^E=UP - DW EDUP - DB 'X'-'@' ;^X=DOWN - DW EDDOWN - DB 'D'-'@' ;^D=RIGHT - DW EDRIGHT - DB 'S'-'@' ;^S=LEFT - DW EDLEFT - DB ' ' ;NOP - DW EDITCMD - DB '+' ;ADVANCE - DW EDITPLUS - DB '-' ;BACKUP - DW EDITMINUS - DB 'A' ;ADDRESS - DW EDITADR - DB 'C' ;COMMAND LINE - DW EDITCL - DB 'H' ;HEX CALC - DW EDITCALC - DB 'N' ;CHANGE NUMBERS - DW EDITHEX - DB 'T' ;CHANGE TEXT - DW EDITALP - DB 0 ;END OF TABLE -; -; ARROW KEY DEFINITONS FROM TCAP -; -EDCURT: - DB 0 ;0 INDICATES NO ARROW KEYS - DW EDUP - DB 0 - DW EDDOWN - DB 0 - DW EDRIGHT - DB 0 - DW EDLEFT - DB 0 ;END OF TABLE -; -;Enter Command Line -; -EDITCL: - CALL EDERCL ;CLEAR ERROR LINE - CALL CRLF ;NEW LINE - CALL VPRINT ;PROMPT INPUT - DB DIM,'Command Line? ',BRIGHT,0 - CALL RDBUF ;INPUT TEXT - CALL PUTCL ;STORE COMMAND LINE - JMP CRLF ;NEW LINE -; -;Enter ASCII Chars -; -EDITALP: - CALL EDERCL ;CLEAR ERROR LINE - CALL PRINP ;PROMPT INPUT - DB DIM,'Enter Text ( for Hex)',BRIGHT - DB CR,LF,' --> ',0 - CALL RDBUF ;INPUT TEXT WITHOUT PROMPT - CALL EDPRCL ;CLEAR PROMPT LINE - LDA EINDEX ;PT TO POSITION - XCHG - LHLD BLOCK ;COMPUTE OFFSET - XCHG - ADD E - MOV E,A - MOV A,D - ACI 0 - MOV D,A ;DE PTS TO BYTE, HL PTS TO TEXT -EDITA1: - MOV A,M ;GET CHAR - CPI EOLCH ;EOL? - JZ EDITA2 ;REFRESH SCREEN - CALL GETVAL ;GET ASCII OR VALUE - STAX D ;UPDATE BYTE - INX H ;PT TO NEXT INPUT CHAR - INR E ;PT TO NEXT BUFFER BYTE - JNZ EDITA1 -EDITA2: - CALL EDPLOT ;REPLOT - JMP EDITCMD1 ;DONE-REFRESH SCREEN -; -;Calculate Sum and Differences -; -EDITCALC: - CALL EDERCL ;CLEAR ERROR LINE - CALL PRINP ;PROMPT INPUT - DB DIM,'Enter Two Hex Numbers - ',BRIGHT,0 - CALL RDBUF ;INPUT TEXT - CALL EDPRCL ;CLEAR PROMPT LINE - CALL SKSP ;SKIP TO NON-SPACE - MOV A,M ;ANY INPUT? - ORA A ;0=NO - JZ EDITCMD1 - CALL HEXIN ;EVALUATE FIRST NUMBER - CALL SKSP ;SKIP TO 2ND NUMBER - PUSH D ;SAVE FIRST NUMBER - CALL HEXIN ;EVALUATE 2ND NUMBER - POP H ;GET FIRST NUMBER - CALL ERMSG ;PRINT ERROR MESSAGE - DB 0 - CALL PHL4HC ;PRINT FIRST NUMBER - CALL VPRINT - DB DIM,' and ',BRIGHT,0 - XCHG - CALL PHL4HC ;PRINT 2ND NUMBER - XCHG - CALL VPRINT - DB ' ',DIM,'Sum = ',BRIGHT,0 - PUSH H - DAD D - CALL NUMOUT - POP H - CALL VPRINT - DB ' ',DIM,'Diff = ',BRIGHT,0 - MOV A,L ;HL=HL-DE - SUB E - MOV L,A - MOV A,H - SBB D - MOV H,A - CALL NUMOUT - JMP EDITCMD1 -; -;Output number in HL in Hex and Decimal -; -NUMOUT: - CALL PHL4HC ;HEX - CALL VPRINT - DB ' (',0 - CALL PHLFDC ;DECIMAL FLOATING - MVI A,')' ;CLOSE PAREN - JMP COUT -; -;Enter Numbers -; -EDITHEX: - CALL EDERCL ;CLEAR ERROR LINE - CALL PRINP ;PROMPT INPUT - DB DIM,'Enter Hex Numbers (#nn for Dec)' - DB BRIGHT - DB CR,LF,' --> ',0 - CALL RDBUF ;INPUT TEXT WITHOUT PROMPT - CALL EDPRCL ;CLEAR PROMPT LINE - LDA EINDEX ;PT TO POSITION - XCHG - LHLD BLOCK ;COMPUTE OFFSET - XCHG - ADD E - MOV E,A - MOV A,D - ACI 0 - MOV D,A ;DE PTS TO BYTE, HL PTS TO TEXT -EDITH1: - MOV A,M ;GET HEX DIGIT - CPI EOLCH ;EOL? - JZ EDITA2 ;REFRESH SCREEN - CPI ' ' ;SKIP SPACES - JNZ EDITH2 - INX H ;SKIP SPACE - JMP EDITH1 -EDITH2: - PUSH D ;SAVE PTR - CALL HEXIN ;GET VALUE AND POSITION HL - MOV A,E ;... IN A - POP D ;GET PTR - STAX D ;PUT BYTE - INR E ;ADVANCE TO NEXT BYTE - JNZ EDITH1 - JMP EDITA2 ;DONE-REFRESH -; -;Clear Editor Invalid Command Message -; -EDERCL: - LDA EDERR ;PREVIOUS ERROR? - ORA A ;0=NO - RZ - XRA A ;CLEAR FLAG - STA EDERR - CALL ERMSG ;CLEAR ERROR MESSAGE - DB 0 - MVI B,40 ;40 CHARS MAX - JMP VEREOL -; -;CLEAR PROMPT LINE -; -EDPRCL: - CALL PRINP ;PROMPT LINE - DB 0 - MVI B,40 ;40 POSITIONS - CALL VEREOL ;CLEAR TO EOL OR 40 CHARS - CALL AT ;USER INPUT - DB ERROW,1 - MVI B,79 ;79 POSITIONS - JMP VEREOL -; -;Input Address -; -EDITADR: - CALL VPRINT - DB 'Address? ',0 - CALL RDBUF ;GET USER INPUT - CALL SKSP ;SKIP LEADING SPACES - MOV A,M ;EMPTY LINE? - ORA A - JZ MU3R - CALL HEXIN ;CONVERT FROM HEX - XCHG ;HL = ADDRESS - SHLD BLOCK - JMP MU3R ;REENTER -; -;Advance to Next Block -; -EDITPLUS: - LHLD BLOCK ;ADVANCE TO NEXT BLOCK - LXI D,128 ;128 BYTES - DAD D - SHLD BLOCK - CALL EDPLOT ;REPLOT DATA - JMP EDITCMD -; -;Backup to Last Block -; -EDITMINUS: - LHLD BLOCK ;BACKUP TO LAST BLOCK - LXI D,-128 ;128 BYTES - DAD D - SHLD BLOCK - CALL EDPLOT ;REPLOT DATA - JMP EDITCMD -; -;Exit MU3 -; -EDCC: - CALL EDERCL ;CLEAR ERROR LINE - JMP CRLF ;NEW LINE -; -;EDIT MOVE: UP -; -EDUP: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;BACKUP INDEX BY 16 - SUI 16 -; -;Common EDIT MOVE Routine - on input, A=new index -; -EDMOVE: - ANI 7FH ;MOD 128 - STA EINDEX - CALL EDCUR ;SET CURSOR - JMP EDITCMD -; -;EDIT MOVE: DOWN -; -EDDOWN: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;INCREMENT INDEX BY 16 - ADI 16 - JMP EDMOVE ;COMMON ROUTINE -; -;EDIT MOVE: RIGHT -; -EDRIGHT: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;INCREMENT INDEX BY 1 - INR A - JMP EDMOVE ;COMMON ROUTINE -; -;EDIT MOVE: LEFT -; -EDLEFT: - CALL EDCCUR ;CLEAR CURSOR - LDA EINDEX ;DECREMENT INDEX BY 1 - DCR A - JMP EDMOVE ;COMMON ROUTINE -; -;EDIT SUBROUTINE: EDCUR -; Position Editor Cursor at EINDEX -;EDIT SUBROUTINE: EDCCUR -; Clear Editor Cursor at EINDEX -; -EDCUR: - PUSH H ;SAVE HL - MVI C,ECURS ;CURSOR CHAR - CALL EDSETCUR - CALL AT ;UPDATE DATA - DB 3,74 - LDA EINDEX ;PT TO BYTE AT CURSOR - LHLD BLOCK - ADD L - MOV L,A - MOV A,H - ACI 0 - MOV H,A ;HL PTS TO BYTE AT CURSOR - MOV A,M ;GET BYTE - CALL PA2HC ;PRINT AS HEX - CALL SPACE - MOV A,M ;GET BYTE - POP H ;RESTORE HL - ANI 7FH ;MASK - CPI 7FH ;7FH AS DOT - JZ EDC7F - CPI ' ' ;OUTPUT CHAR OR DOT - JNC COUT -EDC7F: - MVI A,'.' ;DOT - JMP COUT -EDCCUR: - MVI C,' ' ;CLEAR CURSOR -EDSETCUR: - CALL EDROW ;COMPUTE ROW - ANI 0FH ;COMPUTE COL MOD 16 - MOV B,A ;RESULT IN B - ADD A ;*2 - ADD B ;*3 - ADI ECOL+6 ;ADD IN COL - DCR A ;SUBTRACT 1 - MOV L,A ;COL POSITION SET - CALL GOTOXY ;POSITION CURSOR - MOV A,C ;OUTPUT CHAR - JMP COUT -; -;Compute Row from EINDEX -; -EDROW: - LDA EINDEX ;GET INDEX - MOV B,A ;SAVE IN B - RRC ;DIVIDE BY 16 - RRC - RRC - RRC - ANI 0FH ;MASK FOR LSB ONLY - ADI EROW ;COMPUTE ROW - MOV H,A ;ROW SET - MOV A,B ;GET INDEX - RET - -; -;PRINT A SPACE -; -SPACE: - MVI A,' ' - JMP COUT -; -;PRINT AN BARISK IN REV VIDEO -; -BAR: - CALL VPRINT - DB DIM,'|',BRIGHT,0 - RET -; -;Get value from input buffer -; -GETVAL: - MOV A,M ;GET NEXT CHAR - CPI '<' ;HEX ESCAPE? - RNZ ;NO, RETURN -;"<<" means one "<" - INX H - MOV A,M - CPI '<' - RZ -;Got hex - PUSH D - CALL HEXIN ;GET VALUE - CPI '>' ;PROPER DELIM? - MOV A,E ;GET VALUE - POP D - RZ -; -;ERROR CONDITION IN SUBROUTINE - CLEAR STACK AND FLAG ERROR -; -SERR: - POP PSW ;CLEAR STACK - JMP WHAT ;ERROR -; -;Input Number from Command Line -- Assume it to be Hex -; Number returned in DE -; -HEXIN: - LXI D,0 ;INIT VALUE - MOV A,M - CPI '#' ;DECIMAL? - JZ HDIN ;MAKE DECIMAL -; -HINLP: - MOV A,M ;GET CHAR - CALL CAPS ;CAPITALIZE - CPI CR ;EOL? - RZ - CPI EOLCH ;EOL? - RZ - CPI SEPCH - RZ - CPI ' ' ;SPACE? - RZ - CPI '-' ;'THRU'? - RZ - CPI '>' - RZ - INX H ;PT TO NEXT CHAR - CPI '0' ;RANGE? - JC SERR - CPI '9'+1 ;RANGE? - JC HINNUM - CPI 'A' ;RANGE? - JC SERR - CPI 'F'+1 ;RANGE? - JNC SERR - SUI 7 ;ADJUST FROM A-F TO 10-15 -; -HINNUM: - SUI '0' ;CONVERT FROM ASCII TO BINARY - XCHG - DAD H ;MULT PREVIOUS VALUE BY 16 - DAD H - DAD H - DAD H - ADD L ;ADD IN NEW DIGIT - MOV L,A - XCHG - JMP HINLP -; -HDIN: - INX H ;SKIP '#' -; -;Input Number in Command Line as Decimal -; Number is returned in DE -; -DECIN: - LXI D,0 - MOV A,M ; GET 1ST CHAR - CPI '#' ; HEX? - JNZ DINLP - INX H ; PT TO DIGIT - JMP HINLP ; DO HEX PROCESSING -; -DINLP: - MOV A,M ;GET DIGIT - CALL CAPS ;CAPITALIZE - CPI '0' ;RANGE? - RC - CPI '9'+1 ;RANGE? - RNC - SUI '0' ;CONVERT TO BINARY - INX H ;PT TO NEXT - PUSH H - MOV H,D - MOV L,E - DAD H ;X2 - DAD H ;X4 - DAD D ;X5 - DAD H ;X10 - ADD L ;ADD IN DIGIT - MOV L,A - MOV A,H - ACI 0 - MOV H,A - XCHG ;RESULT IN DE - POP H - JMP DINLP -; -; READ LINE FROM USER INTO INPUT LINE BUFFER -; -RDBUF: - LHLD BUFFER ;PT TO BUFFER - XRA A ;DON'T CAPITALIZE - JMP BLINE ;INPUT LINE ROUTINE - -; -;EDITOR BUFFERS -; -BLOCK: - DS 2 ;ADDRESS OF CURRENT BLOCK -BUFFER: - DS 2 ;PTR TO FREE SPACE -EINDEX: - DS 1 ;INDEX ENTRY -EDERR: - DS 1 ;ERROR FLAG -EDRUN: - DS 1 ;FLAG SAYING THAT EDITOR IS RUNNING - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/NDIRS.HLP b/Source/Images/d_bp/u15/NDIRS.HLP deleted file mode 100644 index 5cbbd204..00000000 --- a/Source/Images/d_bp/u15/NDIRS.HLP +++ /dev/null @@ -1,440 +0,0 @@ -; - - Named Directories Under ZCPR3 - - -- Basics -- - 1 - The Named Directory Concept - 2 - Memory-Based Named Directories - - - -- Commands -- - M - MKDIR - U - Using MKDIR - P - PWD - C - CD - -:1 - Overview of the Named Directory Concept - - Thå   Nameä   Directorù  Concepô  undeò  ZCPR³  ió   aî -associatioî  oæ  á mnemoniã namå witè á  logicaì  directory¬ -whicè ió á disë anä useò area® Witè thió facility¬ thå useò -ió  permitteä tï refeò tï anù directorù bù á mnemoniã  name¬ -anä thió greatlù improveó thå useò interfacå oveò havinç  tï -remembeò disë letteró anä numbers. - - Foò instance¬ aî environmenô caî bå seô uð iî whicè thå -followinç namå assignmentó arå made: - - A15: = ROOT A0: = BASE - B0: = BBASE B1: = JEFF - B2: = ROBERT B3: = LINDA - - Witè  thå nameä directorù facilitù enabled¬  thå  ZCPR³ -utilitieó  caî refeò tï theså directorieó bù eitheò thå  DUº -forí (disë anä useò number© oò bù thå name: - - XDIR ROOT: is the same as XDIR A15: - - Mosô oæ thå ZCPR³ utilitieó recognizå nameä directorieó -iæ  thå  facilitù ió enabled¬  and¬  sincå  theså  utilitieó -functioî tï providå interfaceó betweeî thå directories¬ theù -creatå   á   gooä  workinç  environmenô  foò  uså   oæ   thå -conventionaì  CP/Í utilitieó aó well®  Iî otheò words¬  thå -ZCPR³  utilitieó whicè caî deaì witè nameä  directorieó  arå -thå  onlù  utilitieó witè whicè onå shoulä  crosó  directorù -boundarieó  iî  á ZCPR³ systeí anä  conventionaì  utilities¬ -likå  aî editoò oò aî assembler¬  shoulä bå useä iî onlù onå -directorù  anä deaì witè fileó iî thå currenô directorù  anä -oî drivå Á iî thå samå useò numbeò (A¤ iî thå vernacular). - - Manù  ZCPR³  tooló  arå  provideä tï acô  aó  á  bridgå -betweeî directories¬ anä theù werå createä witè thió purposå -iî mind®  Commonly-useä functionó haä tï bå madå  availablå -tï  thå  ZCPR³ useò tï providå thió bridge»  sucè  functionó -include: - - - o File - Copying - Renaming - Erasing - Unerasing - Protecting - Typing to Console - Printing to Printer - Search - - o Directory Display - - - - Foò instance¬ tï ediô á filå iî thå ZCPÒ directorù witè -Worä  Master¬  copù thå filå intï á workinç directorù  whicè -haó  thå WM.HLÐ filå iî Aº  iî thå samå useò areá  anä  ediô -there® Theî copù iô bacë wheî done: - - B1>mcopy b1:=zcpr:file.txt - ... - B1>wm file.txt - ... - B1>mcopy zcpr:=file.txt - - - Manù  commerciaì programs¬  likå Worä Masteò  anä  Worä -Star¬  arå  alreadù programmeä tï looë oî Aº  iæ theù dï noô -finä thå overlaù theù neeä iî thå currenô  directory®  Worä -Master¬  foò  instance¬  haó  á WM.HLÐ filå  whicè  provideó -onlinå documentation¬ anä bù workinç oî drivå Bº iî thå samå -useò  thaô  á WM.HLÐ filå existó oî A:¬  iæ á useò askó  foò -Help¬ Worä Masteò wilì finä it. - - Nameä  Directorieó  caî providå á  morå  human-orienteä -workinç environment®  Thå useò neeä nï longeò remembeò thaô -hió commandó arå iî directorù A15º  -- hå neeä onlù remembeò -thaô  ROOÔ  containó hió commands¬  HELÐ containó  hió  helð -files¬  ROBERÔ  ió hió namå anä thaô ió wherå hå placeó  thå -fileó  hå ió workinç on¬  BDSà ió wherå hió à compileò  is¬ -etc. - - - Nameä  Directorieó arå supporteä bù thå ZCPR³ utilitieó -anä  bù  ZCPR³ itself®  Threå  utilitieó  arå  specificallù -designeä tï deaì witè Nameä Directories¬ anä thå resô oæ thå -utilitieó  caî  accesó Nameä Directorieó manipulateä bù  thå -theså threå anä uså them. - - Thå  threå  ZCPR³ utilitieó whicè  deaì  directlù  witè -Nameä Directorieó are: - - MKDIR -- create a Named Directory - - PWD -- print Working Directory and all - Named Directories - - CD -- log into a Named Directory - -:M - -Command: MKDIR 3.0 - -Syntax: - - MKDIR <-- enter utility -or - MKDIR dir:ufn <-- enter utility and load NDR file - -Function: - - MKDIÒ  ió useä tï creatå Nameä Directorù  Files¬  whicè -arå  fileó oî disë whicè contaiî thå mnemoniã nameó anä  thå -disk/useò  areaó  theù  arå associateä with®  MKDIÒ  ió  aî -editor®  Iô  provideó á scratcè areá iî whicè thå useò  caî -seô uð á nameä directory¬  revie÷ it¬  ediô it¬ anä makå anù -changeó hå wishes®  Wheî satisfied¬  thå useò caî writå  iô -ouô tï disë aó á filå oò aborô anä thro÷ iô away. - - -Options: - None - -Comments: - See Text under "Using MKDIR" - -Selected Error Messages: - Self-Explanatory - -Examples of Use: - See Text under "Using MKDIR" - -:U - Using MKDIR - Cmd Summary - Oncå thå useò ió iî MKDIR¬ hå ió prompteä with: - - MKDIR Command (? for Help)? - -anä  hå  maù issuå thå followinç  single-characteò  commandó -(strikinç RETURÎ ió noô necessary): - - C -- Change Directory (Add, Rename, or Delete Entries) - I -- Initialize Directory - P -- Print Directory - R -- Read in a Directory File - S -- Status of MKDIR Environment - W -- Write out a Directory File - X -- Exit - ? -- Print Help Message - - Nï  fileó  arå affecteä untiì thå useò telló  MKDIÒ  tï -writå thå Directorù Filå oî disk. - - Cmd: C - Thå  Ã  commanä (Changå Directory© ió useä tï ediô  thå -contentó  oæ  thå scratcè environmenô  withiî  MKDIR®  Oncå -invoked¬ thå useò ió prompteä with - - Directory Entry (? for Help)? - - Thå  useò  ió  iî aî inpuô  linå  editoò  now¬  sï  alì -commandó  musô  bå  terminateä bù strikinç  thå  RETURΠ keù -beforå  theù  takå  effect®  Thió ió thå  BDOÓ  inpuô  linå -editor¬ anä strikinç ^à wilì aborô tï ZCPR3. - - Thå useò maù typå ¿ followeä bù strikinç RETURÎ tï finä -ouô whaô hió optionó arå (built-iî help). - - Cmd: C - Undeò  thå à commanä (Changå Directory)¬  thå useò  caî -perforí thå followinç functions: - - . Add a Named Directory Entry to the Directory - . Rename a Named Directory Entry in the Directory - . Delete a Named Directory Entry from the Directory - . Print the Directory - . Print a Help Message - . Exit to MKDIR Command Level - - Iî ordeò tï adä oò renamå á Nameä Directorù Entry¬  thå -useò typeó thå "DU:dirname¢ form® Iæ eitheò thå Disë (D© oò -Useò  (U©  arå omitted¬  currenô disë anä useò arå  assumed® -Thå  "dirname¢  ió  thå mnemoniã namå  associateä  witè  thå -directory¬  uð  tï ¸ characteró long®  Iæ á namå  haó  beeî -associateä  witè thå indicateä disë anä useò already¬  MKDIÒ -wilì renamå iô tï thå ne÷ namå anä telì yoõ thaô iô ió doinç -sï  anä whaô thå olä namå was®  Iæ á namå haó  noô  alreadù -beeî associateä witè thå indicateä disë anä user¬ MKDIÒ wilì -adä thió entrù tï thå directory. - Cmd: C - Iî  ordeò tï deletå á Nameä Directorù Entry¬  thå  useò -typeó  onlù  thå  "DU:¢ form®  Iæ á namå haó  alreadù  beeî -associateä witè thió disë anä user¬ theî iô wilì bå deleted® -Iæ  nï  namå  haó  beeî associated¬  thå  useò  wilì  bå  sï -informed. - - Tï  prinô thå currenô directorù foò  review¬  thå  useò -neeä onlù strikå thå RETURÎ key®  Tï exit¬  thå useò enteró -aî  Ø (uppeò oò loweò case© followeä bù strikinç thå  RETURÎ -key. - - Passwords - Wheî á directorù ió created¬ MKDIÒ promptó thå useò foò -á  password®  Á  passworä  maù  bå  uð  tï  ¸  alphanumeriã -characteró  lonç (MKDIÒ capitalizaeó alì  alphabetics)¬  anä -differenô  passwordó maù bå associateä witè eacè  directory® -Iæ  á  passworä  ió lefô  blank¬  thå  directorù  ió  freelù -accessible. - - Anù  referencå tï á nameä directorù (DIRº  form© bù thå -useò iî á ZCPR³ commanä linå wilì causå ZCPR³ tï prompô  thå -useò  foò  á passworä iæ onå ió assigneä tï  thå  referenceä -directory®  Thå  useò  haó onå chancå tï enteò thå  correcô -password¬  and¬  iæ  incorrect¬  ZCPR³  setó  thå  directorù -referencå  tï thå user'ó currentlù logged-iî  directorù  anä -proceeds with the rest of the command line. - - Cmd: C - Example: - - Assume the following directory: - - A15:ROOT A10:SYS A0:BASE - B0:DEVBASE B1:WORK1 B2:WORK2 - - If the user wishes to delete WORK1, he types - - B1: - - If the user wishes to rename WORK2 to WORK12, he types - - B2:WORK12 - - If the user wishes to add WORK3 as B3:, he types - - B3:WORK3 - - Iî  alì cases¬  lower-caså characteró arå converteä  tï -upper-case. - Cmd: I - Thå É commanä ió useä tï initializå thå directory® Thå -useò  ió askeä iæ hå ió surå hå wantó tï dï  this¬  and¬  iæ -Yes¬  MKDIÒ clearó thå scratcè directory®  É emphasizå thaô -onlù   thå  memory-baseä  scratcè  directorù  oæ  MKDIÒ   ió -effected¬  anä  MKDIÒ  affectó  disë fileó onlù witè  thå  × -(Writå Directory© command. - Cmd: P - Ð ió useä tï Prinô thå Directory® Asidå froí thå nameó -assigneä sï far¬ thå useò ió tolä ho÷ manù entrieó havå beeî -defineä sï faò anä ho÷ manù arå yeô tï bå defined. - - Cmds: R,W - Thå Ò Commanä ió useä tï reaä iî á Directorù Filå anä × -ió useä tï writå iô out®  Wheî MKDIÒ ió firsô  invoked¬  iæ -thå  commanä ió simplù "MKDIR"¬  theî thå defaulô  directorù -filå  ió defineä tï bå NAMES.DIR®  Iæ thå commanä ió "MKDIÒ -dir:filename.typ"¬   theî  thå  defaulô  directorù  filå  ió -defineä  tï  bå  thå  indicateä  filå  anä  iô  ió  reaä  iî -immediatelù (subsequenô Ò commanä ió noô  necessary)®  Wheî -thå useò issueó thå Ò command¬ hå wilì bå prompteä with: - - Name of File ( = filename.typ)? - -Iæ hå strikeó RETURN¬  thå defaulô filå ió read® Otherwise¬ -hå  caî typå iî á filå namå oæ hió choice®  Nï defaulô filå -typå  ió assumed¬  sï thå filå maù bå anù  name®  Thå  samå -prompô appearó tï thå × (Write© command®  Iî botè cases¬ iæ -thå useò wisheó tï enteò hió owî filå name¬ iô maù bå oæ thå -forí  "dir:filename.typ¢ sï hå caî reaä iô froí oò placå  iô -anywhere. - Cmd: W - ×  wilì writå bacë tï thå currenô directorù aó  opposeä -tï  thå  directorù  thå  filå originallù camå  froí  iæ  thå -defaulô forí ió accepted. - Cmd: S - Finally¬  thå  Ó commanä (Status© telló thå  useò  somå -statuó informatioî oî MKDIR. - -:2 - Memory-Based Named Directories - - Nameä  Directorieó  arå implementeä bù loadinç á  *.NDÒ -filå createä bù MKDIÒ intï thå ZCPR³ memorù buffeò  reserveä -tï contaiî thå nameä directorù definition® Oncå loaded¬ alì -directory-to-DÕ associationó iî thå filå arå madå effective¬ -and any ZCPR3 command can make use of them. - - Onå oæ thå manù purposeó oæ LDÒ ió tï loaä á *.NDÒ filå -intï  memory®  LDÒ recognizeó thå NDÒ filå typå tï refeò tï -nameä directorù files¬  anä iô loadó thå file¬ doinç á quicë -formaô  checë tï ensurå thaô iô ió á valiä  nameä  directorù -file. - -:P - -Command: PWD 1.0 - -Syntax: - - PWD o - -Function: - - PWÄ  functionó  tï  displaù  thå  nameó  oæ  thå  nameä -directorieó  tï  thå user®  Iæ thå Ð (Password©  optioî  ió -included¬  theî  thå  passwordó tï thå directorieó  wilì  bå -included in the display IF the Wheel Byte is set. - -Options: - - P - Display Passwords - - -Comments: - - Iæ thå Wheeì Bytå ió noô implementeä foò á system¬ theî -itó addresó ió 0¬ wherå thå JMÐ instructioî tï thå Warí Booô -routinå  iî thå BIOÓ ió located®  Sincå JMÐ ió non-zerï  iî -value¬  thå  Wheeì  Bytå  ió TRUE¬  anä  passwordó  wilì  bå -displayed by PWD. - -Selected Error Messages: - - "Passworä  Requesô Denieä - Noô Wheel¢ meanó thaô thå Ð -optioî  waó  giveî  buô  thå Wheeì  Bytå  waó  noô  set¬  sï -passwords will not be displayed. - - "Nameä Directorù Buffeò Noô Available¢ meanó thaô nameä -directories are not implemented. - - -Examples of Use: - - PWD - -- display named directories - - PWD P or PWD PASSWORD (only leading P is significant) - -- display named directories and passwords - -:C - -Command: CD 3.0 - -Syntax: - - CD dir: -or - CD du: - -Function: - - CÄ   (Changå  Directory©  ió  useä  tï  movå  froí  onå -directorù tï anotheò bù usinç thå nameó oò literaì DÕ  formó -associateä  witè  thå directories®  CÄ firsô logó intï  thå -referenceä directory¬  and¬  iæ therå ió á filå nameä ST.COÍ -iî  it¬  CÄ wilì loç thå useò intï thå referenceä  directorù -anä invokå ST.COM®  Iæ therå ió nï filå nameä ST.COÍ iî thå -directory¬ CÄ wilì simplù loç thå useò in. - - -Options: - None - -Comments: - - Undeò  ZCPR3¬  therå arå twï basiã wayó tï loç  intï  á -directory®  Onå  waù ió bù usinç thå DUº  oò  DIRº  prefix¬ -like: - - B1:ASM>TEXT: -or - B1:ASM>C7: - -The other way is by using CD, like: - - B1:ASM>CD TEXT: -or - B1:ASM>CD C7: - - - Thå tradeofæ ió iî useò efficiency®  Iæ á directorù ió -alwayó  useä foò á particulaò function¬  sucè aó  cataloginç -disks¬  CÄ maù bå preferreä becauså iô wilì noô onlù loç thå -useò  iî  buô  wilì alsï ruî ST.COM¬  whicè caî seô  uð  hió -environment¬  sucè aó bù runninç MENÕ oò somå otheò  prograí -oò grouð oæ programs. - - ST.COÍ ió aî Alias®  Thå onlù purposå oæ SÔ ió tï loaä -thå Multiplå Commanä Linå Buffeò witè á commanä linå wheî iô -ió  executeä  withouô anù options®  Thió commanä  linå  maù -contaiî  á  reasonablå numbeò oæ commandó whicè perforí  anù -desireä seô oæ functions. - - - Iî thå ZCPR³ environment¬ gooä candidatå commandó tï bå -executeä bù runninç SÔ viá CÄ includå thå following: - - LDR file.NDR <-- Set up a new directory environ - PATÈ path-exð <-- Seô uð á ne÷ Commanä Searcè Path - MENU <-- Invoke the MENU Preprocessor - ECHO message <-- Print a Message to the User - - Thå user'ó environmenô caî changå drasticallù bù  usinç -CÄ  tï  loç  intï  á  ne÷  directory®   Thå  nameó  oæ  thå -directorieó  hå  caî  accesó  caî changå  (LDÒ  changeó  thå -Memory-Baseä  names)¬  thå commanä searcè patè hå  useó  caî -change¬  anä  hå caî eveî finä himselæ iî á MENÕ environmenô -oò otheò front-enä insteaä oæ á ZCPR³ commanä environment. - - -Selected Error Messages: - - "Commanä Linå Overflow¢ meanó thaô therå waó noô enougè -rooí  iî  thå commanä linå tï inserô thå commanä  tï  invokå -ST.COM. - -Examples of Use: - - CD TEXT: - -- log into directory TEXT - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/NEWTCAP.Z80 b/Source/Images/d_bp/u15/NEWTCAP.Z80 deleted file mode 100644 index 5bda1668..00000000 --- a/Source/Images/d_bp/u15/NEWTCAP.Z80 +++ /dev/null @@ -1,170 +0,0 @@ -; -; **** DRAFT--Not Final **** -; ZCPR 3.3 System TCAP -; Copyright 1985, 1986 by Richard Conn, Dennis Wright, and Echelon, Inc. -; All Rights Reserved -; -; Note on Padding: -; All entries which have an asterisk (like, *) following -; their one-line explanation have delays which may be -; variable. -; Note on Definition: -; If a function is not available for a particular terminal, -; its string should be 0 and its delay should be 0 (if it has -; a delay). -; -; -; Section 1: Basic Terminal Characteristics -; -; YU Single Character Generated by Uparrow Key on Keyboard -; YD Single Character Generated by Downarrow Key on Keyboard -; YL Single Character Generated by Leftarrow Key on Keyboard -; YR Single Character Generated by Rightarrow Key on Keyboard -; Note: If no arrow keys or arrow keys generate more than -; one character (like VT100), then use WordStar convention -; for these codes: YU=^E, YD=^X, YL=^S, YR=^D -; -; CL Clear Screen String (has a delay which may be variable); -; cursor is placed in home position (upper left corner) when -; this sequence is complete -; -; CM Cursor Motion String (see explanation of codes in the Manual) -; -; CE Clear to End of Line String; cursor is left at original -; position when this sequence is complete -; -; SO Begin Highlighting (Reverse Video or Dim); no character -; positions on the screen are used by this sequence (ie, cursor -; does not move after this sequence is complete) -; SE End Highlighting (return to Normal display intensity); no -; character positions on the screen are used by this sequence -; -; TI Initialize Terminal String; it is preferred that nothing be -; output to the screen by this sequence, but no output is not -; required -; TE Deinitialize Terminal String; it is preferred that nothing -; be output to the screen by this sequence -; -envorg2: - db 'WYSE 50 ' ; Name of Terminal (16 chars) - db 'K'-'@' ; YU (YU = Cursor UP) - db 'J'-'@' ; YD (YD = Cursor DOWN) - db 'L'-'@' ; YL (YL = Cursor LEFT) - db 'H'-'@' ; YR (YR = Cursor RIGHT) - db 0 ; CL Delay (CL = Clear Screen)* - db 0 ; CM Delay (CM = Cursor Motion) - db 0 ; CE Delay (CE = Clear to EOL) - db 1bh,'+',0 ; CL String - db 1bh,'%ia%dR%dC',0 ; CM String - db 1bh,'T',0 ; CE String - db 1bh,')',0 ; SO String (SO = Stand Out Mode) - db 1bh,'(',0 ; SE String (SE = End Stand Out Mode) - db 0 ; TI String (TI = Terminal Init) - db 0 ; TE String (TE = Terminal Deinit) -; -; Section 2: Business Graphics -; -; The following strings are used to create graphics symbols. -; If your terminal does not support business graphics, make (GO) and (GE) -; a non-zero non-printable character that has no effect on your -; terminal and use ASCII characters like '*' to replace the graphics -; characters. Recommended character values are indicated in [], like [*]. -; An alternate recommendation using '.' and ':' will be made with release -; of ZCPRB3. -; - db 0 ; GO Delay (GO = Graphics On) - db 0 ; GE Delay (GE = Graphics End) - db 27,'H',2,0 ; GO - Graphics on string - db 27,'H',3,0 ; GE - Graphics end string - db '2',0 ; GULC - Upper left corner [*] - db '3',0 ; GURC - Upper right corner [*] - db '1',0 ; GLLC - Lower left corner [*] - db '5',0 ; GLRC - Lower right corner [*] - db ':',0 ; GHL - Horizontal line [-] - db '6',0 ; GVL - Vertical line [|] - db '7',0 ; GFB - Full block [*] - db '?',0 ; GHB - Hashed block [#] -; db ';',0 ; GHB - Use this if RSP is used -; on WYSE 50 because the -; ? (01fh) will be confused -; with the ELM end line mark - db '0',0 ; GUI - Upper intersect [+] - db '=',0 ; GLI - Lower intersect [+] - db '8',0 ; GIS - Intersection [+] - db '9',0 ; GRTI - Right intersect [+] - db '4',0 ; GLTI - Left intersect [+] -; -; Section 3: Windowing -; -; The following environmental data must be present if window -; routines are to be used. GCM (Graphic Character Mask) contains -; any bits that are not used by on screen graphics characters. -; GCD (Graphics Chararacter Difference) are the bits that are -; stripped (by the terminal) from a sent graphics character to -; form the on screen graphics character. -; - db 0e0h ; GCM - Graphic character mask byte - db 20h ; GCD - Graphic char difference bit(s) -; -; The next string can be either a terminal control code or an -; address of a user supplied subroutine. If a user supplied routine -; is to be used set the U1 address accordingly. Remember if an -; address is placed here and both bytes of the address are 00h, -; then the RAT string will be used. If the RAT string is null the RSP -; string will be used. At least one of these two functions must be -; available for window routines, RAT is prefered. -; -; If a RAT user supplied routine is to be used it must return the -; characters as follows: -; -; RAT - Read character at cursor position must return the character -; at the current cursor position in the (A) register. -; -; - db 1bh,'M',0 ; RAT - Read char at current cursor - ; position -; db 0 ; Zero if using RSP -; -; Set the following address non-zero if user supplied RAT subroutine -; is to be used. -; - dw 0 ; U1 - Use user supplied RAT routine -; - db 1bh,'7',0 ; RSP - Read screen page -; -; If RSP is to be used the following two bytes must be defined; if not, -; make them zero. -; - db 1fh ; ELM - End of line mark - db 0dh ; EPM - End of screen mark -; -; These bytes are the screen codes sent by the terminal at the end of -; each line (ELM) and end of page (EPM). Some terminals like the WYSE 50 -; may have graphics character codes that are the same as the ELM or EPM -; codes. In this case an alternative graphic character must be used. -; -; Section 4: Extended Terminal Characteristics -; (More to be added in banked ZCPRB3 256-byte version) -; -; CD Clear to End of Display; the cursor is not moved by this -; action -; KL Keyboard Lock; the keys on the keyboard are made inoperative -; KU Keyboard Unlock; the keys on the keyboard are made operative -; -; CDO Cursor Display Off; Cursor is no longer displayed, no -; character positions on the screen are used by this sequence -; CDE Cursor Display Enable; Cursor is displayed, no character -; positions on the screen are used by this sequence -; - db 0 ; CD Delay (CD = Clear to End Display)* - db 1bh,'Y',0 ; CD String - db 1bh,'#',0 ; KL String (KL = Keyboard Lock) - db 1bh,'"',0 ; KU String (KU = Keyboard Unlock) - db 1bh,'`','0',0 ; CDO String (Cursor Display Off) - db 1bh,'`','1',0 ; CDE String (Cursor Display Enable) -; - ds 80H-[$-envorg2] ; Make exactly 80H bytes long -; -; End of ZCPR 3.3 TCAP -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/NOTE.COM b/Source/Images/d_bp/u15/NOTE.COM deleted file mode 100644 index 7a491bc1..00000000 Binary files a/Source/Images/d_bp/u15/NOTE.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/NOTE.MAC b/Source/Images/d_bp/u15/NOTE.MAC deleted file mode 100644 index b305a784..00000000 --- a/Source/Images/d_bp/u15/NOTE.MAC +++ /dev/null @@ -1,52 +0,0 @@ -; -; Program: NOTE (Note) -; Author: Richard Conn -; Version: 1.0 -; Date: 8 Mar 84 -; Previous Versions: None -; - -; -; NOTE is a comment - it does nothing except return -; - -; -; Macros and Externals -; - MACLIB Z3BASE.LIB - ext z3init - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - jmp z3init ;initialize the ZCPR3 Env and the VLIB Env - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/PAGE.COM b/Source/Images/d_bp/u15/PAGE.COM deleted file mode 100644 index 78aabb98..00000000 Binary files a/Source/Images/d_bp/u15/PAGE.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/PAGE.MAC b/Source/Images/d_bp/u15/PAGE.MAC deleted file mode 100644 index 3c592d1b..00000000 --- a/Source/Images/d_bp/u15/PAGE.MAC +++ /dev/null @@ -1,1183 +0,0 @@ -; -; PROGRAM: PAGE -; VERSION: 2.0 -; DATE: 18 May 84 -; AUTHOR: RICHARD CONN -; PREVIOUS VERSIONS: 1.2 (26 Apr 83), 1.1 (25 Apr 83), 1.0 (22 Apr 83) -; -VERS equ 20 -z3env SET 0f400h - -; -; PAGE is THE file screen print utility for ZCPR3. Installable by -; Z3INS, PAGE provides a wide range of options for the user. First, PAGE -; allows the user to employ wild cards and file name lists (lists of files -; separated by commas, like: file1,file2,file3,...). Second, PAGE provides -; the following options: -; 0-9 Set Character Print Speed Delay -; I Inspect Files -; The user approves each file to be printed -; before the printing process begins -; L Toggle Line Numbering -; Each line may or may not begin with a line -; number -; P Toggle Screen Paging -; Snnnn Skip to Specified Page -; Printing begins on the indicated page -; -; During paged output, various parameters can be changed dynamically. -; In particular, the letter P toggles screen paging and the digits 0-9 -; vary the speed WHILE the output is being presented. The effect is immediate. -; Control characters may be used to perform additional control functions: -; ^S pauses the output, ^X aborts paging of current file and advances to -; the next file, and ^C aborts to the operating system. -; - -FALSE EQU 0 -TRUE EQU NOT FALSE - -; -; BASIC SYSLIB ROUTINES NEEDED BY TEMPLATE -; -ESIZE EQU 16 ; SIZE OF DIR ENTRY (FROM SYSLIB DIRF ROUTINE) - - EXT DIRQ ; DIRECTORY PROCESSOR - - EXT Z3INIT ; INIT BUFFERS - EXT ZFNAME ; FILE NAME PROCESSOR - EXT GETCRT ; GET CRT PARAMETERS - EXT Z3LOG ; LOG INTO DIR - - EXT INITFCB ; INIT FCB - EXT RETUD ; RETURN CURRENT USER/DISK - EXT PUTUD ; SAVE CURRENT USER/DISK - EXT GETUD ; RESTORE CURRENT USER/DISK - EXT PRINT ; PRINT STRING PTED TO BY RET ADR - EXT PADC ; PRINT A IN DEC - EXT COUT ; CONSOLE OUTPUT ROUTINE - EXT CST ; CONSOLE STATUS ROUTINE - EXT CIN ; CONSOLE INPUT ROUTINE - EXT CAPS ; CAPITALIZE ROUTINE - EXT CRLF ; NEW LINE ROUTINE - EXT CLINE ; COMMAND LINE STRING SAVE ROUTINE - EXT CODEND ; CODE END COMPUTATION ROUTINE - - EXT F$OPEN ; FILE OPEN - EXT F$READ ; BLOCK READ - EXT F$CLOSE ; FILE CLOSE - - EXT EVAL10 ; STRING TO BINARY CONVERSION - EXT PHLDC ; PRINT HL IN DECIMAL ROUTINE - EXT MOVEB ; MOVEB ROUTINE - -; -; CP/M EQUATES -; -CPM EQU 0 ; WARM BOOT -BDOSE EQU CPM+5 ; BDOS ENTRY -FCB EQU CPM+5CH ; FCB -TBUFF EQU CPM+80H ; INPUT LINE BUFFER -DEL EQU 7FH ; -CR EQU 13 ; -FF EQU 12 ; -LF EQU 10 ; -CTRLC EQU 'C'-'@' ; ^C -CTRLG EQU 'G'-'@' -CTRLH EQU 'H'-'@' -CTRLI EQU 'I'-'@' -CTRLS EQU 'S'-'@' -CTRLX EQU 'X'-'@' -CTRLZ EQU 'Z'-'@' - -; -; OTHER EQUATES -; -EOLD EQU 0FFH ; END OF LOAD DELIMITER - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - jmp startx - -; -; **** Special Initial Value Area -; -CWIDTH: - DB 80 ; WIDTH OF SCREEN -CTPP: - DB 22 ; LINES OF TEXT PER SCREEN -CSPP: - DB 1 ; LINES TO SKIP PER SCREEN -; -; NOTE: CTPP + CSPP + 1 (FOOTER SIZE) = TOTAL LINES PER SCREEN ON CONSOLE -; -DLNUMFL: - DB 0 ; LINE NUMBER FLAG (DEFAULT TO NO) -DPAGEFL: - DB 0FFH ; PAGE NUMBER FLAG (DEFAULT TO YES) -DINSPECT: - DB 0 ; INSPECT FILES (DEFAULT TO NO) -DDELAY: - DB 0 ; DELAY COUNT (DEFAULT TO 0) -; -; OTHER BUFFERS -; -SKIPFL: - DB 0 ; SKIP FLAG (DEFAULT TO NO) -SKIPNUM: - DS 2 ; PAGE NUMBER TO SKIP TO -LNUM: - DS 2 ; CURRENT LINE NUMBER -PNUM: - DS 2 ; CURRENT PAGE NUMBER -LNUMFL: - DB 0 ; LINE NUMBER FLAG (DEFAULT TO NO) -PAGEFL: - DB 0FFH ; PAGE NUMBER FLAG (DEFAULT TO YES) -INSPECT: - DB 0 ; INSPECT FILES (DEFAULT TO NO) -DELAY: - DB 0 ; DELAY COUNT (DEFAULT TO 0) - -; -; Start of Program -; -STARTX: - LXI H,0 ; GET STACK PTR - DAD SP - SHLD STACK ; SAVE IT - CALL CODEND ; DETERMINE FREE SPACE - SHLD CMDLNE ; COMMAND LINE BUFFER - LXI D,100H ; BUFFER SIZE - DAD D - SHLD DIRBUF ; ADDRESS OF DIRECTORY BUFFER (TOP OF LOCAL STACK) - SPHL ; SET NEW STACK - CALL PUTUD ; SAVE CURRENT USER/DISK AWAY - - CALL GETCRT ; GET CRT PARAMETERS - MOV A,M - STA CWIDTH - INX H - INX H - MOV A,M ; GET NUMBER OF TEXT LINES - STA CTPP - MOV B,A ; ... IN B - DCX H - MOV A,M ; GET TOTAL NUMBER OF LINES - SUB B ; COMPUTE NUMBER OF LINES TO SKIP/SCREEN - SUI 1 ; 1 LINE FOR PROMPT - STA CSPP - - LXI D,TBUFF+1 ; SAVE COMMAND LINE - LHLD CMDLNE ; GET PTR TO COMMAND LINE SAVE BUFFER - XCHG - MVI B,80H ; SIZE OF LINE - CALL MOVEB ; COPY COMMAND LINE - -; -; **** Banner of Program -; - CALL PRINT - DB 'PAGE, Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0',0 - -; -; Check for Help Request -; - LDA FCB+1 ; GET FIRST CHAR OF FILE NAME - CPI ' ' ; NO FILE SPEC? - JZ HELP - CPI '/' ; OPTION CAUGHT? - JNZ ECONT - -; -; **** Print Help Information -; -HELP: - CALL PRINT - DB CR,LF,'Syntax:' - db cr,lf,' PAGE file1,file2,...,filen o...' - db cr,lf,'Options:' - db cr,lf,' 0-9 Select Delay Constant' - db cr,lf,' I Inspect and Select Files First' - db cr,lf,' L Toggle Numbering of Each Line' - db cr,lf,' P Toggle Paging' - db cr,lf,' Snnnn Skip to Specified Page before Printing' - db cr,lf - db cr,lf,'Examples:' - db cr,lf,' PAGE MYFILE.TXT,*.MAC LI' - db cr,lf,' -- Number Lines, Inspect Files' - db cr,lf,' PRINT MYFILE.* S25' - db cr,lf,' -- Skip to Page 25' - db cr,lf - db cr,lf,'Commands during printout:' - db cr,lf,' ^C - abort PAGE ^X - skip to next file' - db cr,lf,' ^S - suspend output P - toggle paging' - db cr,lf,' 0-9 - change speed' - DB 0 - -; -; RETURN TO OS -; -RETURN: - LHLD STACK ; GET OLD STACK - SPHL ; SET IT - RET - -; -; PROGRAM'S INIT ROUTINE -; -ECONT: - CALL INIT ; PROG INIT ROUTINE -; -; EXTRACT FLAGS IF PRESENT -; - LXI H,0 ; SET FILE COUNT - SHLD FILECNT - LHLD CMDLNE ; PT TO BUFFER -; -; SKIP TO FILE NAME STRING -; - CALL SBLANK ; SKIP OVER BLANKS -; -; SKIP TO END OF FILE NAME STRING -; - CALL SNBLANK ; SKIP OVER NON-BLANKS -; -; CHECK FOR LEADING SLASH ON OPTION AND SKIP IT IF SO -; -OPT: - CPI '/' ; OPTION CHAR? - JNZ OPTION - INX H ; SKIP SLASH -; -; PROCESS LIST OF OPTIONS -; -OPTION: - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ DSPEC - INX H ; PT TO NEXT CHAR - CPI ' ' ; SKIP OVER SPACES - JZ OPTION - MOV C,A ; COMMAND IN C - LXI D,OPTAB ; PT TO OPTION TABLE -OPTL: - LDAX D ; GET OPTION LETTER - ORA A ; END OF TABLE? - JZ HELP ; HELP IF SO - CMP C ; MATCH? - JZ OPTM ; PROCESS IF SO - INX D ; PT TO NEXT ENTRY - INX D - INX D - JMP OPTL -; -; PROCESS OPTION -; -OPTM: - PUSH H ; SAVE HL ON STACK - LXI H,OPTION ; GET RETURN ADDRESS - XTHL ; ... ON STACK AND RESTORE HL - INX D ; PT TO ADDRESS - LDAX D ; GET ADDRESS LOW - MOV B,A ; ... IN B - INX D - LDAX D ; GET ADDRESS HIGH - MOV D,A ; ... IN D - MOV E,B ; LOW IN E - PUSH D ; PUT ADDRESS ON STACK - MOV A,C ; COMMAND IN A - RET ; "CALL" OPTION ROUTINE - -; -; **** PROGRAM INIT ROUTINE -; THIS ROUTINE IS USED BY THE PROGRAM TO PERFORM ANY INITS -; -INIT: - lxi h,dlnumfl ;copy defaults into buffers - lxi d,lnumfl - mvi b,4 ;4 bytes - call moveb ;do copy - xra a ;A=0 - sta skipfl ;set no skip - RET - -; -; **** OPTION TABLE -; EACH OPTION IS A CAPITAL LETTER OR SPECIAL CHAR FOLLOWED BY -; AN ADDRESS; THE TABLE IS TERMINATED BY A BINARY ZERO -; -OPTAB: - db '0' - dw optnum - db '1' - dw optnum - db '2' - dw optnum - db '3' - dw optnum - db '4' - dw optnum - db '5' - dw optnum - db '6' - dw optnum - db '7' - dw optnum - db '8' - dw optnum - db '9' - dw optnum - db 'I' - dw optinsp - db 'L' - dw optln - db 'P' - dw optpage - db 'S' - dw optskip - DB 0 ; END OF TABLE -; -; Set Delay Constant -; -optnum: - sui '0' ;set constant - sta delay - ret -; -; Toggle Inspect Option -; -optinsp: - lda inspect ;flip flag - cma - sta inspect - ret -; -; Set Line Number Flag -; -optln: - lda lnumfl ;flip flag - cma - sta lnumfl - ret -; -; Toggle Paging -; -optpage: - lda pagefl ;flip flag - cma - sta pagefl - ret -; -; Set Skip Flag and get number -; -optskip: - mvi a,0ffh ;set flag - sta skipfl - call eval10 ;get number - xchg - shld skipnum ;set page number to skip to - xchg ;HL pts to next char - mov a,d ;see if page number was zero - ora e - jnz option - xra a ;if zero, just turn off skip flag - sta skipfl - ret -; -; BEGIN MOVING THROUGH FILE NAMES, SEPARATED BY COMMAS -; -DSPEC: - LHLD CMDLNE ; PT TO FIRST BYTE - CALL SBLANK ; SKIP TO NON-BLANK -; -; MAJOR REENTRY POINT WHEN FILE SPECS ARE SEPARATED BY COMMAS -; HL PTS TO FIRST BYTE OF NEXT FILE SPEC -; -DSPEC1: - SHLD HLTMP ; SAVE HL - LHLD DIRBUF ; RESET STACK - SPHL - LHLD HLTMP ; RESTORE HL - CALL GETUD ; RESET USER IF NECESSARY - LXI D,FCB ; PT TO FCB IN DE, PT TO FIRST CHAR OF FILE NAME IN HL - MVI A,0 ; DIR BEFORE DU - CALL ZFNAME ; EXTRACT FILE NAME INTO FCB, AND GET DISK AND USER - SHLD NEXTCH ; SAVE PTR TO DELIMITER WHICH ENDED SCAN - LXI D,FCB ; PT TO FCB - CALL Z3LOG ; LOG INTO DU FOR FILE - -; -; LOAD DIRECTORY AND PERFORM FUNCTION -; -FCT: - LXI D,FCB ; PT TO FCB - CALL INITFCB ; INIT THE FCB - MVI A,11000000B ; SELECT SYS AND NON-SYS FILES - LHLD DIRBUF ; PT TO DIR BUFFER - CALL DIRQ ; LOAD DIR, SELECT FILES, PACK, AND ALPHABETIZE -; -; DETERMINE BEGINNING OF SCRATCH AREA (SCRATCH) AND SIZE IN PAGES (BCNT) -; - PUSH H ; SAVE PTR AND COUNT - PUSH B - LXI D,ESIZE ; SET PTR TO NEXT FREE BLOCK -FCTFRE: - MOV A,B ; DONE? - ORA C - JZ FCTFR1 - DAD D ; PT TO NEXT - DCX B ; COUNT DOWN - JMP FCTFRE -FCTFR1: - INR H ; NEXT PAGE - MVI L,0 - SHLD SCRATCH ; SET PTR TO SCRATCH AREA - XCHG ; PTR IN DE - LHLD BDOSE+1 ; COMPUTE BLOCK BUFFER SIZE - MOV A,H ; ADJUST FOR ZCPR3 - SUI 10 - SUB D ; A=SIZE IN BLOCKS - STA BCNT ; SET BLOCK COUNT - POP B ; RESTORE AND SAVE REGS - POP H -; -; ALLOW USER TO INSPECT FILES -; - PUSH H - PUSH B - CALL ICHECK ; CHECK FOR INSPECT OPTION AND INSPECT IF SET - POP B ; RESTORE COUNT AND PTR - POP H - -; -; PERFORM FUNCTION; HL PTS TO FILE AND BC CONTAINS NUMBER OF FILES -; -FCTL: - MOV A,B ; CHECK FOR COMPLETION (COUNT = 0) - ORA C - JZ FCTL1 - DCX B ; COUNT DOWN - SHLD HLTMP ; SAVE HL - LHLD DIRBUF - SPHL ; SET STACK - LHLD HLTMP ; RESTORE HL - PUSH B ; SAVE COUNT AND PTR - PUSH H - CALL FUNCTION ; PERFORM FUNCTION -FCTLNXT: - LHLD DIRBUF ; RESTORE STACK - LXI D,-4 - DAD D ; RESTORE PTR TO BC, HL - SPHL ; SET STACK - POP H ; RESTORE PTR - POP B ; RESTORE COUNT - LXI D,ESIZE ; PT TO NEXT ENTRY - DAD D - JMP FCTL - -; -; CHECK FOR NEXT FILE SPEC -; -FCTL1: - CALL GETUD ; RETURN TO BASE USER/DISK - LHLD NEXTCH ; GET PTR - MOV A,M ; GET DELIM - CPI ',' ; ANOTHER FILE? - JNZ DRETURN - INX H ; PT TO CHAR AFTER COMMA - JMP DSPEC1 ; CONTINUE PROCESSING - -; -; **** EMERGENCY ABORT -; -ABORT: - CALL PRINT - DB CR,LF,'** PAGE Abort **',CR,LF,0 - CALL GETUD ; RETURN HOME AND FALL THRU TO DRETURN -; -; **** FUNCTION COMPLETE -- CLEANUP AND EXIT -; FILL THIS IN WITH CLEANUP CODE FOR EXIT -; -DRETURN: - JMP RETURN - -; -; **** INSPECT FILES -- THIS ROUTINE IS TO PERFORM A FILE INSPECTION -; ON INPUT, HL PTS TO FIRST 16-BYTE ENTRY AND BC=NUMBER OF ENTRIES -; -ICHECK: - mov a,b ;any files? - ora c - rz - push h ;save ptrs - push b - lxi d,esize ;size of entry -ichk1: - mvi m,0 ;clear MSBytes - dad d ;pt to next - dcx b ;count down - mov a,b ;done? - ora c - jnz ichk1 - pop b ;restore ptrs - pop h - lda inspect ;inspect? - ora a ;0=no - rz - call print - db cr,lf,'PAGE File Inspect Mode' - db cr,lf,' Y (def) = Select File N = Don''t Select File' - db cr,lf,' Q = Select Rest of Files S = Skip Rest of Files' - db cr,lf,0 -ichk2: - call print - db cr,lf,'Select ',0 - call prfn ;print file name - call print - db ' -- (Y/N/Q/S)? ',0 - call cin ;get response - call caps ;capitalize - call cout ;echo - cpi 'Q' ;select rest? - jz ichkyr - cpi 'S' ;skip rest - jz ichknr - cpi 'N' ;no to this one? - jnz ichk3 - mvi m,0ffh ;set NO flag in file FCB -ichk3: - dad d ;pt to next one - dcx b ;count down - mov a,b ;done? - ora c - jnz ichk2 - RET -; Check Rest of Files as Selected -ichkyr: - call print - db cr,lf,' Rest of Files Selected',0 - ret -; Check Rest of Files as NOT Selected -ichknr: - mvi m,0ffh ;set NO flag - dad d ;pt to next - dcx b ;count down - mov a,b ;done? - ora c - jnz ichknr - call print - db cr,lf,' Rest of Files NOT Selected',0 - ret -; -; **** FUNCTION -- MAIN FUNCTION OF TEMPLATE -; ON ENTRY, HL PTS TO NAME OF FILE (16 BYTES) AND USER IS LOGGED INTO -; DIRECTORY CONTAINING INDICATED FILE -; -FUNCTION: -; -; FILE PAGE Routine -- Page the File Whose Name is Pointed to by -; HL; we are already logged into the correct directory -; - mov a,m ;file selected? - ora a ;0=yes - rnz - call prinit ;init print buffers - call fload ;load buffer initially - lhld scratch ;pt to first char in file - shld nxtln ;set pointer to next line -fprloop: - call prline ;print line of file - jnz fprloop ;done if EOF - call page ;advance to top of next page - call prfoot ;print footer - ret -; -; Init Print Buffers and Print File Name -; -prinit: - lxi d,tfcb ;set up FCB - mvi b,12 ;12 bytes - call moveb - lxi h,0 ;HL=0 - shld pnum ;set page number - shld lnum ;set line number - lda ctpp ;set line count - dcr a ;1 less for first line - sta lcount - call print - db cr,lf,'PAGE File: ',0 - lxi h,tfcb ;print file name - call prfn - call crlf - ret -; -; FILE LOAD (FLOAD) Routine -- Initial Load of memory buffer -; -fload: - lxi d,tfcb ;pt to file fcb - call initfcb ;init file's fcb - call f$open ;open file for input - jz fload1 ;open was OK - call print - db cr,lf,'File ',0 - xchg ;HL pts to FCB - call prfn ;print file name - call print - db ' NOT Found',0 - pop d ;clear return address - ret ;abort printout of this file -; -; This is an entry point for further memory loads of the file -; -fload1: - lda bcnt ;get number of blocks to load - mov c,a ;... in C - lhld scratch ;get address of first block to load into - shld nxtblk ;set pointer to next block to load -fload2: - call rdblk ;read a block (128 bytes) - jnz eof ;eof encountered? - call rdblk ;read another block (128 bytes) - jnz eof ;eof encountered? - dcr c ;count down - jnz fload2 - lhld nxtblk ;pt to next byte to load - mvi m,eold ;mark end of load - ret -eof: - lxi d,tfcb ;close file - call f$close - lhld nxtblk ;ensure ^Z - mvi m,ctrlz - ret -rdblk: - lxi d,tfcb ;pt to FCB - call f$read ;read next block - ora a ;error? - rnz - lhld nxtblk ;get ptr to next block - xchg ; as dest - lxi h,tbuff ;ptr to DMA address - mvi b,128 ;copy 128 bytes -rdblk1: - mov a,m ;get byte - ani 7fh ;mask out msb - stax d ;put byte - inx h ;pt to next - inx d - dcr b ;count down - jnz rdblk1 - xchg ;new nxtblock - shld nxtblk - ret - -; -; Line Print Routine -; Print Next Line with Optional Disk Load -; Input Parameter is NXTLN, which is the address of the first char -; on the next line -; Output Parameter is Zero Flag, with Z meaning done with print, NZ -; meaning more yet to print -; -prline: - lhld lnum ;increment line number - inx h - shld lnum - lhld nxtln ;pt to first char of next line - mvi c,0 ;init char count - mov a,m ;get first char of line - cpi ctrlz ;EOF? - cnz prlnum ;print line number (optional) -prl1: - mov a,m ;get char - cpi eold ;end of load? - jz prload - cpi ctrlz ;eof? - jz prexit - inx h ;pt to next char - cpi ctrli ;tab? - jz prtab - cpi cr ;? - jz prcr - cpi ff ;form feed? - jz prff - cpi lf ;end of line? - jz prldn - cpi ctrlh ;back space? - jz prbs - cpi ctrlg ;ring bell? - jz prbell - cpi del ;delete char? - jz prl1 ;skip it - cpi ' ' ;other control char? - jc prl1 ;skip if other control char - call prout ;print char - inr c ;increment char count - call eoltest ;check to see if at end of line and newline if so - jmp prl1 -; -; End of Load Reached -- Load More of File from Disk -; -prload: - push b ;save char count - call fload1 ;use load routine - pop b ;get char count - lhld scratch ;next byte is here - jmp prl1 ;continue processing -; -; Tabulate -; -prtab: - mvi a,' ' ;space - call prout - inr c ;new char - call eoltest ;process EOL - mov a,c ;done? - ani 7 - jnz prtab ;continue tabulation - jmp prl1 ;continue processing -; -; Exit with Zero Flag Set if Done -; -prexit: - xra a ;set zero flag - ret -; -; Carriage Return -- Reset Character Count and Continue -; -prcr: - call prout ;send CR to printer - mvi c,0 ;reset char count - jmp prl1 ;continue processing -; -; Form Feed -- Advance to Top of Next Page -; -prff: - call page ;page eject with heading - mvi c,0 ;reset char count - jmp prl1 ;continue processing -; -; Line Feed -- End of Routine -; -prldn: - call prout ;echo LF to printer - shld nxtln ;set ptr to first char of next line - mvi a,0ffh ;set not done - ora a ;set flags - ret -; -; Backspace on Printer -; -prbs: - mov a,c ;check for beginning of line - ora a - jz prl1 ;continue if at BOL - mvi a,ctrlh ;backspace - call prout - dcr c ;back up char position - jmp prl1 ;continue -; -; Ring Bell on Printer -; -prbell: - call prout ;ring the bell - jmp prl1 ;continue without advancing char position -; -; Test for End of Line and Process if so -; -eoltest: - lda cwidth ;get line width - sui 4 ;4 chars less for continuation mark - mov b,a ;result in B - lda lnumfl ;line numbering (lines are 7 chars shorter if so) - ora a ;0=no - jz eolt1 - mov a,b ;reduce by 7 for line numbers - sui 7 - mov b,a -eolt1: - mov a,b ;get line width - cmp c ;there? - rnz ;continue if not - mov a,m ;get next char - cpi cr ;new line next? - rz ;continue if so - cpi ctrlh ;backspace next? - rz ;continue if so - push h - mvi b,3 ;see if a new line in next 3 chars -eolt2: - inx h - mov a,m ;look for CR - cpi cr - jz eolt3 - dcr b - jnz eolt2 - jmp eolt4 -eolt3: - pop h ;restore ptr - ret -eolt4: - pop h ;restore ptr - mvi a,' ' ;print continuation chars - call prout - mvi a,'<' - call prout - mvi a,'<' - call prout - mvi a,cr ;new line - call prout - mvi a,lf - call prout - mvi c,0 ;reset char position - lda skipfl ;skipping? - ora a ;0=no - rnz - lda lnumfl ;printing line numbers? - ora a ;0=no - rz - call print - db ' : ',0 - ret -; -; Output a character to the console -; A = Character -; -prout: - mov b,a ;char in B - call cst ;check for abort - jnz prout1 - call ctrlin ;get control input -prout1: - lda skipfl ;skipping? - ora a ;set flags (Z=no skip=print char) - mov a,b ;restore char - cz ctrlout ;send character to printer - cpi lf ;special tests if it is a line feed - rnz ;done if non-LF char - lda lcount ;decrement line counter - dcr a - sta lcount - rnz -; -; Paging Required -; Skip to top of next page; reset LCOUNT (Lines Left on Page Count); -; increment PNUM (Screen Number); test for skip stop; print header -; -prout0: - lda ctpp ;get number of text lines per page - sta lcount ;set as new line count - push h ;save ptr - lhld pnum ;increment page number - inx h - shld pnum - lda cspp ;number of lines to skip - call lineskp ;skip lines - pop h ;restore ptr - call prfoot ;print 1-line footer - mov a,m ;check next char - cpi ctrlz ;EOF? - jz fctlnxt ;skip to next file - lda skipfl ;skipping? - ora a ;0=no - push h - cnz skiptst ;affects HL - pop h - ret -; -; Skip out rest of page -; Form Feed Function -; -page: - lda lcount ;get count of remaining lines - call lineskp ;skip lines - jmp prout0 ;process top of new page -; -; Skip out lines on page -; -lineskp: - mov b,a ;line count in B - ora a ;any? - rz - lda skipfl ;skipping? - ora a - rnz - lda pagefl ;paging? - ora a - rz -lines1: - mvi a,cr ;output new line to printer - call cout - mvi a,lf - call cout - dcr b ;count down - jnz lines1 - ret -; -; Control Input -; CTRLIN -- Main Routine Entry Point; Implements Dynamic Commands, -; including P, 0-9, ^S, ^X, and ^C -; CTRLCS -- ^S Reentry Point; Implements all Dyanamic Commands except ^S -; -ctrlcs: - call cin ;get input - jmp ctrlns -ctrlin: - call cin ;get input - cpi ctrls ;pause? - jz ctrlcs -ctrlns: - call caps ;capitalize - cpi ctrlc ;abort? - jz abort - cpi ctrlx ;skip to next - jz fctlnxt - cpi 'P' ;page now? - jz ctrlip - cpi '0' ;delay? - rc - cpi '9'+1 - rnc - sui '0' ;convert to binary - sta delay ;set delay count - ret -ctrlip: - lda pagefl ;toggle paging - cma - sta pagefl - ret -; -; Control Output -; -ctrlout: - push psw ;save char - call cout ;output char - lda delay ;pause? - ora a ;any delay? - jz ctrloz - push h ;delay - push b - mov b,a ;delay count -del1: - lxi h,500 ;delay constant -del2: - xthl ;long NOP - xthl - dcx h ;count down - mov a,h ;done? - ora l - jnz del2 - dcr b ;count down - jnz del1 - pop b ;restore regs - pop h -ctrloz: - pop psw ;restore A - ret -; -; Print Line Number (optional) -; -prlnum: - lda skipfl ;skipping? - ora a ;0=no - rnz - lda lnumfl ;get flag - ora a ;0=don't number lines - rz - push h ;save ptr - lhld lnum ;get line number - call phldc ;print line number - call print ;print separator - db ': ',0 - pop h ;restore ptr - ret -; -; Print 1-line footer -; -prfoot: - lda skipfl ;skipping? - ora a ;0=no - rnz - lda pagefl ;paging? - ora a - rz - push h ;save ptr - call prpnum ;print page heading and number - call prdash ;print dash - lxi h,tfcb ;pt to file FCB - call prfn ;print file name - pop h ;restore ptr - call print - db ' -- Strike Any Key ',0 - call ctrlin ;get control response - jmp crlf ;new line -; -; Test for completion of skipping -; -skiptst: - lhld pnum ;get page number - inx h ;increment for test - xchg ;... in DE - lhld skipnum ;get page to skip to - mov a,h ;compare them - cmp d - rnz - mov a,l - cmp e - rnz - xra a ;A=0 to stop skipping - sta skipfl ;set flag - ret -; -; Print Page Number -; -prpnum: - call print ;print header - db 'Screen ',0 - lhld pnum ;print current page number - call phldc ;print as decimal - ret -; -; Print Separator -; -prdash: - call print - db ' -- ',0 - ret -; -; UTILITIES -; SBLANK -- SKIP BLANKS PTED TO BY HL UNTIL NON-BLANK ENCOUNTERED; HL -; SNBLANK -- SKIP NON-BLANKS PTED TO BY HL UNTIL BLANK OR EOL; HL -; PRFN -- PRINT FILE NAME PTED TO BY HL; AFFECT NOTHING -; - -; -; SKIP UNTIL NON-BLANK -; -SBLANK: - MOV A,M ; LOOK FOR BLANK - INX H ; PT TO NEXT - CPI ' ' ; BLANK? - JZ SBLANK - DCX H ; BACK UP - RET - -; -; SKIP UNTIL BLANK OR EOL -; -SNBLANK: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CPI ' ' ; BLANK? - JZ SNB1 - ORA A ; EOL? - JNZ SNBLANK -SNB1: - DCX H ; BACK UP - RET - -; -; PRINT FILE NAME PTED TO BY HL -; OUTPUT TO CON: -; -PRFN: - PUSH H ; SAVE REGS - PUSH B - CALL RETUD ; GET CURRENT USER/DISK - MOV A,B ; PRINT DISK - ADI 'A' ; LETTER - CALL COUT - MOV A,C ; PRINT USER - CALL PADC - CALL PRINT - DB ': ',0 - INX H ; PT TO FILE NAME - MVI B,8 ; PRINT NAME - CALL PRNT - MVI A,'.' ; DECIMAL - CALL COUT - MVI B,3 ; PRINT TYPE - CALL PRNT - POP B ; GET REGS - POP H - RET - -; -; PRINT CHARS PTED TO BY HL FOR B BYTES -; OUTPUT TO CON: -; -PRNT: - MOV A,M ; GET CHAR - CALL COUT - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ PRNT - RET - -; -; BUFFERS -; -CMDLNE: - DS 2 ; PTR TO COMMAND LINE STRING -DIRBUF: - DS 2 ; PTR TO DIRECTORY BUFFER -NEXTCH: - DS 2 ; PTR TO NEXT CHAR IN MULTIFILE COMMAND LINE -FILECNT: - DS 2 ; COUNT OF NUMBER OF FILES RENAMED -SCRATCH: - DS 2 ; ADDRESS OF FIRST BYTE OF SCRATCH AREA -BCNT: - DS 1 ; NUMBER OF PAGES IN SCRATCH AREA -HLTMP: - DS 2 ; TEMP BUFFER TO STORE HL -; -; PAGE Buffers -; -tfcb: - ds 36 ; FCB for current file -nxtblk: - ds 2 ; pointer to next block to load -nxtln: - ds 2 ; pointer to next line to read -lcount: - ds 1 ; count of text lines left on page -; -; Stack -; -STACK: - DS 2 ; OLD STACK PTR - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/PATH.COM b/Source/Images/d_bp/u15/PATH.COM deleted file mode 100644 index 7f93512f..00000000 Binary files a/Source/Images/d_bp/u15/PATH.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/PATH.MAC b/Source/Images/d_bp/u15/PATH.MAC deleted file mode 100644 index 40ec138a..00000000 --- a/Source/Images/d_bp/u15/PATH.MAC +++ /dev/null @@ -1,460 +0,0 @@ -; -; PROGRAM: PATH -; VERSION: 3.0 -; AUTHOR: RICHARD CONN -; DATE: 12 Apr 84 -; PREVIOUS VERSIONS: NONE -; DERIVATION: PATH, Version 1.0 (for ZCPR2) of 12 Jan 83 -; -VERS EQU 30 -z3env SET 0f400h - -; -; PATH allows the user to do two things -- display the current path -; and set a new path. Named directories may be used in the definition of -; the new path. -; -; PATH is invoked by the following forms: -; PATH <-- Display Path -; PATH path-expression <-- Set Path -; PATH // <-- Print Help -; - -; -; CP/M Constants -; -cpm equ 0 ;base -fcb equ cpm+5ch -tbuff equ cpm+80h -cr equ 0dh -lf equ 0ah - -; -; SYSLIB Routines -; - ext z3init,eprint,codend,dirtdu,dutdir - ext cout,epstr,pafdc,retud - ext getpath,getmdisk,getmuser,getwhl - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - lxi h,0 ;save stack ptr - dad sp - shld strtstack ; save ptr to original stack - lxi h,tbuff+1 ; pt to command line input - shld cmdline ; save ptr to command line - call retud ; get current disk and user -; -; Print Banner -; - call eprint - db 'PATH Version ' - db vers/10+'0','.',(vers mod 10)+'0',0 - -; -; Check for Help -; - lda fcb+1 ; get first char - cpi '/' ; help? - jnz start1 - call eprint - db cr,lf,'Syntax:' - db cr,lf,' PATH <-- Display Path' - db cr,lf,' PATH expr <-- Set Path' - db 0 - ret - -; -; Check for Error and Continue if not -; -start1: - call getpath ; external path available? - mov a,h ; HL=0 if none - ora l - jnz start2 - call eprint - db ' - Abort: No Path',0 - ret -start2: - call getwhl ; check for wheel - jnz start3 - call eprint - db ' - Abort: No Wheel',0 - ret -start3: - lhld cmdline ; check command line for text - call sblank ; skip to non-blank - shld cmdline ; set ptr to next element - ora a ; EOL=display function - jz pdisp - call codend ; set temporary path - shld pathptr ; point to it - -; -; **** Set New Path **** -; CMDLINE pts to next element -; -pbuild: - lhld cmdline ; pt to next element - call sblank ; skip to non-blank - mov a,m ; get first char of next element - ora a ; EOL? - jz pbdone ; done if so, store path and display - shld token ; save ptr to first byte - mov a,m ; get first char - cpi '$' ; is it current? - jz pbdu ; DU: form - sui 'A' ; convert to number - jc pbdir ; DIR: form - mov b,a ; save number - call getmdisk ; get max disk number - mov c,a - mov a,b - cmp c ; in range? - jnc pbdir ; DIR: form if not - inx h ; pt to next char -- may be DU or DIR - mov a,m ; get next part of element - cpi '$' ; current? - jz pbdu ; is a DU: form -digtst: - cpi ':' ; colon ends it - jz pbdu ; is a DU: form - cpi ' ' ; space ends it - jz pbdu - ora a ; EOL ends it - jz pbdu - cpi '0' ; must be a digit - jc pbdir ; DIR: form if not in range - cpi '9'+1 - jnc pbdir - inx h ; pt to next - mov a,m ; get it - jmp digtst -; -; It is a DU: form -; -pbdu: - lhld pathptr ; pt to path entry - xchg ; ... in DE - lhld token ; pt to token - mov a,m ; current? - cpi '$' - jz pbdu1 - sui 'A'-1 ; convert to number from 1 to n -pbdu1: - stax d ; save disk element - inx h ; pt to next - inx d - mov a,m ; current user? - inx h ; pt to after user in case of match to current - cpi '$' ; current? - jz pbdu2 - dcx h ; pt to first digit - push d ; save ptr to path - call eval10 ; convert to number in C - jc rangerr - call getmuser ; check for max user - inr a - mov b,a ; place max in B - mov a,c ; value in A - cmp b - jnc rangerr - pop d ; get ptr to path -pbdu2: - stax d ; store user number - inx d - mov a,m ; ending with colon? - cpi ':' - jnz pbdu3 - inx h ; skip over colon -pbdu3: - shld cmdline ; save ptr to next command line entry - xchg - shld pathptr ; save ptr to next path entry - jmp pbuild ; continue processing -; -; Build DIR: form -; -pbdir: - lhld token ; pt to name - call dirtdu ; convert to DU in BC - jnz gotud ; process new DU -; -; Entry not found -; -rangerr: - call eprint - db cr,lf,'Bad Expression at ',0 - lhld token ; print string starting at token - call epstr - lhld strtstack ; get original stack - sphl ; set stack ptr - ret -; -; Got User and Disk -- Store in Path -; -gotud: - lhld pathptr ; get ptr to path - inr b ; disk A = 1 - mov m,b ; store disk - inx h - mov m,c ; store user - inx h ; pt to next - shld pathptr - lhld token ; skip over token -gotud1: - mov a,m ; skip to space or EOL - inx h ; pt to next - ora a ; EOL? - jz gotud2 - cpi ' ' ; space? - jnz gotud1 -gotud2: - dcx h ; pt to EOL or space - shld cmdline ; set ptr to next element - jmp pbuild ; continue building -; -; Path Building is Done -- CODEND contains new path -; -pbdone: - lhld pathptr ; store ending zero in path - mvi m,0 - call getpath ; pt to path - xchg ; ... in DE - call codend ; copy temp path into external path -pcopy: - mov a,m ; get disk - stax d ; put disk - ora a ; end of path? - jz pdisp ; done if so and display - inx h ; pt to user - inx d - mov a,m ; get user - stax d ; put user - inx h ; pt to next disk - inx d - jmp pcopy - -; -; **** Display Path Function **** -; -pdisp: - call eprint - db cr,lf,' Symbolic Form: ',0 - call getpath ; pt to external path -pdisp1: - mov a,m ; get disk - ora a ; done? - jz adisp - cpi '$' ; current? - jz pdisp2 - adi '@' ; convert to letter -pdisp2: - call cout ; print disk letter - inx h ; pt to user - mov a,m ; get user number - cpi '$' ; current? - jnz pdisp3 - call cout ; print current indicator - jmp pdisp4 -pdisp3: - call pafdc ; print user number -pdisp4: - call colon - inx h ; pt to next element - mov a,m ; done? - ora a ; 0=yes - cnz arrow - jmp pdisp1 -; -; Print Absolute Path -; -adisp: - call eprint - db cr,lf,' DU Form: ',0 - call retud ; get current user/disk - call getpath ; pt to path -adisp1: - mov a,m ; get disk - ora a ; done? - jz ndisp - cpi '$' ; current? - jnz adisp2 - mov a,b ; get current disk - inr a ; adjust to 1 to n -adisp2: - adi '@' ; convert to letter - call cout ; print disk letter - inx h ; pt to user - mov a,m ; get user - cpi '$' ; current? - jnz adisp3 - mov a,c ; get current user -adisp3: - call pafdc ; print user - call colon - inx h ; pt to next - mov a,m ; done? - ora a - cnz arrow - jmp adisp1 -; -; Print Named Path -; -ndisp: - call eprint - db cr,lf,' DIR Form: ',0 - call getpath ; pt to external path -ndisp1: - call retud ; get current user and disk in C and B - mov a,m ; get disk - ora a ; done? - rz - cpi '$' ; current? - jz ndisp2 - mov b,a ; disk in B - dcr b ; adjust to 0 to n-1 -ndisp2: - inx h ; pt to user - mov a,m ; get it - cpi '$' ; current? - jz ndisp3 - mov c,a ; user in C -ndisp3: - inx h ; pt to next - push h ; save ptr - call udscan ; scan dirs for user/disk and print its name - pop h ; get ptr - call colon - mov a,m ; done? - ora a - cnz arrow - jmp ndisp1 - -; -; **** Utilities **** -; - -; -; Convert Chars pted to by HL to Number in C -; Return with Carry Set if Overflow -; If OK, Value in C and HL pts to character after last digit -; -eval10: - mvi c,0 ; set value -eval1: - mov a,m ; get first digit - sui '0' ; convert to binary - jc evalx ; done with value in C - cpi 10 ; range? - jnc evalx ; done with value in C - mov b,a ; digit in B - mov a,c ; multiply by 10 - add a ; *2 - rc ; error abort - add a ; *4 - rc - add c ; *5 - rc - add a ; *10 - rc - add b ; add value - rc - mov c,a ; value in C - inx h ; pt to next - jmp eval1 -evalx: - ora a ; clear carry flag - ret - -; -; Print Colon -; -colon: - mvi a,':' ; print colon - jmp cout - -; -; Print Arrow -; -arrow: - call eprint - db ' --> ',0 - ret - -; -; Skip to non-blank -; -sblank: - mov a,m ; get char - inx h ; pt to next - cpi ' ' ; space? - jz sblank - dcx h ; pt to non-blank - ret -; -; Scan directories for user and disk in C and B -; Print name if found or "Noname" if not -; -udscan: - call dutdir ; convert to name - jz udscan1 ; error return if no name - mvi b,8 ; 8 chars max -udsprn: - mov a,m ; get name char - cpi ' ' ; done? - rz - call cout ; print char - inx h ; pt to next - dcr b ; count down - jnz udsprn - ret -udscan1: - call eprint - db 'Noname',0 - ret - -; -; Buffers -; -cmdline: - ds 2 ; ptr to next char in command line -token: - ds 2 ; ptr to current token -pathptr: - ds 2 ; ptr to next path entry -strtstack: - ds 2 ; ptr to original stack - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/PATH31.LBR b/Source/Images/d_bp/u15/PATH31.LBR deleted file mode 100644 index 81008dd4..00000000 Binary files a/Source/Images/d_bp/u15/PATH31.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/PPAL.DOC b/Source/Images/d_bp/u15/PPAL.DOC deleted file mode 100644 index 052fe6ad..00000000 --- a/Source/Images/d_bp/u15/PPAL.DOC +++ /dev/null @@ -1,361 +0,0 @@ -;%BEGIN 0 -;%Program: PPAL -;%Author: Richard Conn -;%Version: -VERS equ 3 -;%Date: 3 Sep 1986 -;%Revision History: -;1. 1 Sep 86, Richard Conn -; Initial beta-test release -;2. 3 Sep 86, Richard Conn -; Fixed Z3INS compatability problem -; Created LSy option to control colons after labels of MACRO, SET, -; and EQU -; Placed IF/ELSE/ENDIF at same indentation level -; Change Iy option to IIy option -; Added IMy option for MACRO/ENDM indentation -; Added directives I+ and I- for manual increment and decrement of -; indentation level -; Fixed input line counting problem -;3. 5 Sep 86, Richard Conn -; Added Field3 indentation options for EQU and SET (OE and OS) -; Changed O directive to OC, OE, and OS -; Added comment in directive processor -;%Invocation: PPAL file_list [directive_list] -;%Index: Pretty Assembler -;%Index: PPAL -;%Index: Pretty Printer -;%Description: -; PPAL is a Pretty Printer for Assembly Language for the Z System. -;Its purpose is to reformat assembly language source programs in order to -;have all Z System programs conform to a standard structure. PPAL is highly -;configurable, accepting directives from both the command line and the source -;code itself, so that PPAL may be used to format programs in different ways -;for a variety of standards. -; Directives for specific configuration of the pretty printing process -;may be presented on the command line or within the body of the code in -;special comment lines, beginning with ";#". The following directives are -;recognized. In each general case (like, Au), the first letter indicates the -;directive name, and the following letters indicate types of characters which -;may be specified; specifically: -; o - option chars specific to the directive -; u - case indication, U for Upper-case, L for Lower-case, -; X for unchanged -; y - yes/no indication, Y for Yes, N for No, X for unchanged -; -; ;text - marks a comment in the directive line -; Au - controls the case of operands (arguments) -; AU makes non-quoted alphabetic argument characters upper-case -; AL makes non-quoted alphabetic argument characters lower-case -; AX leaves the case of argument characters unchanged -; By - remove blank lines -; BY (yes) turns on removal of blank lines -; BN (no) turns off removal of blank lines -; BX (unchanged) is the same as BN -; Cou, Coy - comment line formatting (a comment line is a line beginning -; with a semicolon, as opposed to an embedded comment) -; CWy controls removal of the space character after the -; semicolon -; CWY (yes) removes the space after the semicolon if a -; space is present, else no change -; CWN (no) inserts the space after the semicolon if no -; space is present, else no change -; CWX (unchanged) makes no change -; CFu controls case of the first character in the comment line -; CFU makes the first character upper-case -; CFL make the first character lower-case -; CFX leaves the case of the first character unchanged -; CAu controls case of all characters in the comment line -; except the first character if CFU or CFL is in effect -; CAU makes all characters upper-case -; CAL makes all characters lower-case -; CAX leaves the case of all characters unchanged -; Eou, Eoy - embedded comment formatting -; ECy controls placement of the embedded comment if it begins -; after field4 (column 33) -; ECY (yes) places embedded comments on the next line -; ECN, ECX (no, unchanged) leaves embedded comments -; on the same line -; EWy controls removal of the space character after the -; semicolon -; EWY (yes) removes the space after the semicolon if a -; space is present, else no change -; EWN (no) inserts the space after the semicolon if no -; space is present, else no change -; EWX (unchanged) makes no change -; EFu controls case of the first character in the comment -; EFU makes the first character upper-case -; EFL make the first character lower-case -; EFX leaves the case of the first character unchanged -; EAu controls case of all characters in the comment -; except the first character if EFU or EFL is in effect -; EAU makes all characters upper-case -; EAL makes all characters lower-case -; EAX leaves the case of all characters unchanged -; Ioy - indent lines subordinate to IFs or MACROs -; I+ increases the indentation level by 1 character -; I- decreases the indentation level by 1 character (0 min) -; IIy controls indentation for the IF/ELSE/ENDIF pseudo-ops -; IIY causes all opcodes subordinate to an IF to be -; indented one character; each successive IF -; causes another indentation; ENDIF brings the -; indentation level out; ELSE temporarily brings -; the indentation level out for the ELSE pseudo-op -; only -; IIN, IIX (no, unchanged) causes indentation under IFs -; to not take place -; IMy controls indentation for the MACRO/ENDM pseudo-ops -; IMY causes all opcodes subordinate to a MACRO to be -; indented one character; ENDM brings the -; indentation level out -; IMN, IMX (no, unchanged) causes indentation under -; MACROs to not take place -; Lou, Loy - control format of labels -; LFu controls the case of the first character of a label -; LFU makes the first character upper-case -; LFL makes the first character lower-case -; LFX leaves the case of the first character unchanged -; LAu controls the case of all characters in a label except -; the first character if LFU or LFL is in effect -; LAU makes all characters upper-case -; LAL makes all characters lower-case -; LAX leaves the case of all characters unchanged -; LCy controls the presence of a colon after a normal label -; LCY ensures that there is a colon after each label -; LCN ensures that there is no colon after each label -; LCX has no effect on a trailing colon; if one was -; present in the input, it is present in the output -; LSy controls the presence of a colon after a special label, -; where a "special" label is a label in front of a MACRO, -; SET, or EQU pseudo-op -; LSY ensures that there is a colon after a special label -; LSN ensures that there is no colon after a spec label -; LSX has no effect on a trailing colon; if one was -; present in the input, it is present in the output -; LLy controls the presence of a new line following a label -; LLY places a new line after a label -; LLN, LLX does not place a new line after a label -; L8y controls the presence of a new line following a label -; which is longer than 8 characters -; L8Y places a new line after an 8+ character label -; L8N, L8X does not place a new line after an 8+ -; character label -; Oou or Ooy - controls the appearance of opcodes -; OCu - controls the case of opcodes -; OCU makes opcodes upper-case -; OCL makes opcodes lower-case -; OCX leaves the case of opcodes unchanged -; OEy - indent EQU opcode to Field 3 (col 17)? -; OEY indents the EQU opcode to field3 (col 17) -; OEN, OEX indents the EQU opcode to field2 (col 9) -; OSy - indent SET opcode to Field 3 (col 17)? -; OSY indents the SET opcode to field3 (col 17) -; OSN, OSX indents the SET opcode to field2 (col 9) -; -; In addition to the above directives, four predefined formats -;are available via the Fn directive, where 0 <= n <= 3. The predefined -;formats are: -; F0 - reset all directives to null -; Remove blank lines (B): No -; Comment lines -; First char (CF): Unchanged -; All chars (CA): Unchanged -; Remove Space after ; (CW): Unchanged -; Embedded comments -; First char (EF): Unchanged -; All chars (EA): Unchanged -; Remove Space after ; (EW): Unchanged -; Next line if after col 33 (EC): No -; Indentation -; of IFs (II): No -; of MACROs (IM): No -; Labels -; First char (LF): Unchanged -; All chars (LA): Unchanged -; Colon after label (LC): Unchanged -; Colon after special label (LS): Unchanged -; Line after label (LL): Unchanged -; Line after 8+ char label (L8): Unchanged -; Opcodes -; Opcode case (OC): Unchanged -; EQU indentation (OE): Field2 -; SET indentation (OS): Field2 -; Operand (argument) case (A): Unchanged -; -; F1 - Z System standard format -; Remove blank lines (B): No -; Comment lines -; First char (CF): Unchanged -; All chars (CA): Unchanged -; Remove Space after ; (CW): Unchanged -; Embedded comments -; First char (EF): Unchanged -; All chars (EA): Unchanged -; Remove Space after ; (EW): Yes -; Next line if after col 33 (EC): Yes -; Indentation -; of IFs (II): Yes -; of MACROs (IM): Yes -; Labels -; First char (LF): Unchanged -; All chars (LA): Upper -; Colon after label (LC): Yes -; Colon after special label (LS): No -; Line after label (LL): Yes -; Line after 8+ char label (L8): Yes -; Opcodes -; Opcode case (OC): Unchanged -; EQU indentation (OE): Field2 -; SET indentation (OS): Field2 -; Operand (argument) case (A): Lower -; -; F2 - special format -; Remove blank lines (B): Yes -; Comment lines -; First char (CF): Unchanged -; All chars (CA): Unchanged -; Remove Space after ; (CW): Yes -; Embedded comments -; First char (EF): Upper -; All chars (EA): Lower -; Remove Space after ; (EW): Yes -; Next line if after col 33 (EC): Yes -; Indentation -; of IFs (II): Yes -; of MACROs (IM): Yes -; Labels -; First char (LF): Upper -; All chars (LA): Lower -; Colon after label (LC): Yes -; Colon after special label (LS): No -; Line after label (LL): Yes -; Line after 8+ char label (L8): Yes -; Opcodes -; Opcode case (OC): Unchanged -; EQU indentation (OE): Field2 -; SET idnentation (OS): Field2 -; Operand (argument) case (A): Lower -; -; F3 - special format -; Remove blank lines (B): Yes -; Comment lines -; First char (CF): Unchanged -; All chars (CA): Unchanged -; Remove Space after ; (CW): No -; Embedded comments -; First char (EF): Upper -; All chars (EA): Lower -; Remove Space after ; (EW): Yes -; Next line if after col 33 (EC): Yes -; Indentation -; of IFs (II): Yes -; of MACROs (IM): Yes -; Labels -; First char (LF): Unchanged -; All chars (LA): Upper -; Colon after label (LC): Yes -; Colon after special label (LS): No -; Line after label (LL): Yes -; Line after 8+ char label (L8): Yes -; Opcodes -; Opcode case (OC): Unchanged -; EQU indentation (OE): Field2 -; SET indentation (OS): Field2 -; Operand (argument) case (A): Upper -; -; If no directives are given, the format F1 is selected. F1 is always -;selected as the default format, and directives can be used to vary specific -;settings or all settings within this default. -; -; Examples of various forms a label may take on: -; Forms AbCd hello EXEC -; -------- ---- ----- ---- -; LFX, LAX AbCd hello EXEC -; LFU, LAX AbCd Hello EXEC -; LFL, LAX abCd hello eXEC -; LFX, LAU ABCD HELLO EXEC -; LFU, LAU ABCD HELLO EXEC -; LFL, LAU aBCD hELLO eXEC -; LFX, LAL abcd hello exec -; LFU, LAL Abcd Hello Exec -; LFL, LAL abcd hello exec -; -; Directives may be placed in any order with any or no delimiters: -; "LFXLAU" "LFX LAU" "LFX,LAU" -;have the same meanings. This applies to both command lines and comments: -; PPAL file1,file2 LFX LAU -; ;#LFX, LAU -; For directive in comments, the directive processing is terminated -;by either an end of line or a comment character: -; ;#LFX, LAU -; ;#LFX, LAU ; All labels are upper-case -; Note that allowing directives embedded in the files they are acting -;on allows one part of the file to take on one format and another part of the -;file to take on another format. -; -;Sample file before processing by PPAL: -; -; ; Sample file to illustrate PPAL -; ext cout,print -; -; ;#OEY ; Indent EQUs to Col 17 (Field 3) -; -; test equ 1 -; numch equ 26 -; fch equ 'A' -; -; ;#OEN ; Indent EQUs to Col 9 (Field 2) -; -; mymac macro -; call print -; if test -; db 'This is a test' -; else -; db 'This is normal' -; endif -; db ' ',0 -; endm -; -; mymac -; ld b,numch -; ld a,fch -; loop: call cout -; inc a -; djnz loop -; ret -; end -; -;Sample file after processing by PPAL: -; -; ; Sample file to illustrate PPAL -; ext cout,print -; -; ;#OEY ; Indent EQUs to Col 17 (Field 3) -; -; TEST equ 1 -; NUMCH equ 26 -; FCH equ 'A' -; -; ;#OEN ; Indent EQUs to Col 9 (Field 2) -; -; MYMAC macro -; call print -; if test -; db 'This is a test' -; else -; db 'This is normal' -; endif -; db ' ',0 -; endm -; -; mymac -; ld b,numch -; ld a,fch -; LOOP: -; call cout -; inc a -; djnz loop -; ret -; end -; -;%END diff --git a/Source/Images/d_bp/u15/PRINT.COM b/Source/Images/d_bp/u15/PRINT.COM deleted file mode 100644 index 1f31a4cf..00000000 Binary files a/Source/Images/d_bp/u15/PRINT.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/PRINT.MAC b/Source/Images/d_bp/u15/PRINT.MAC deleted file mode 100644 index f95112a9..00000000 --- a/Source/Images/d_bp/u15/PRINT.MAC +++ /dev/null @@ -1,1404 +0,0 @@ -; -; PROGRAM: PRINT III (PRINT) -; VERSION: 2.0 -; DATE: 18 May 84 -; AUTHOR: RICHARD CONN -; PREVIOUS VERSIONS: 1.3 (17 May 83) -; PREVIOUS VERSIONS: 1.2 (26 Apr 83), 1.1 (26 Apr 83), 1.0 (22 Apr 83) -; -VERS equ 20 -z3env SET 0f400h - -FALSE equ 0 -TRUE equ NOT FALSE - -timeok equ FALSE ;TRUE to enable TIME feature, FALSE to disable - -; -; PRINT is THE file print utility for ZCPR3. Installable by Z3INS, -; PRINT provides a wide range of options for the user. First, PRINT allows -; the user to employ wild cards and file name lists (lists of files separated -; by commas, like: file1,file2,file3,...). Second, PRINT provides the -; following options: -; E Exact Mode -; No heading appears, no line numbering, -; no page numbering, tab expansion, form -; feeds -; F File Name Toggle -; The Heading Line can optionally contain -; the name of the file -; H@head@ Heading Text -; The user may specify the text of the heading -; to appear at the top of every page -; I Inspect Files -; The user approves each file to be printed -; before the printing process begins -; L Toggle Line Numbering -; Each line may or may not begin with a line -; number -; M Multiple Runs Toggle -; The user may or may not be prompted to set -; the Top of Form on his printer; Multiple Runs -; ON means that he will not be prompted -; N Toggle Page Numbering -; The numbering of each page is turned on or -; off -; Onn Offset Each Line -; Move each line in the indicated number of -; characters from the left -; Snnnn Skip to Specified Page -; Printing begins on the indicated page -; T Toggle Time Display -; Time/Date information is optionally included -; in the page header -; - -; -; BASIC SYSLIB ROUTINES NEEDED BY PRINT -; -ESIZE EQU 16 ; SIZE OF DIR ENTRY (FROM SYSLIB DIRF ROUTINE) - - EXT DIRQS ; DIRECTORY PROCESSOR - EXT DIRPACK ; PACK DIRECTORY - - EXT Z3INIT ; INIT BUFFERS - EXT ZFNAME ; FILE NAME PROCESSOR - EXT Z3LOG ; LOG INTO DIR - EXT GETPRT ; GET PRINTER DATA - - EXT INITFCB ; INIT FCB - EXT RETUD ; RETURN CURRENT USER/DISK - EXT PUTUD ; SAVE CURRENT USER/DISK - EXT GETUD ; RESTORE CURRENT USER/DISK - EXT EPRINT ; PRINT STRING PTED TO BY RET ADR - EXT PADC ; PRINT A IN DEC - EXT COUT ; CONSOLE OUTPUT ROUTINE - EXT CONDIN ; CONDITIONAL INPUT ROUTINE - EXT CIN ; CONSOLE INPUT ROUTINE - EXT CAPS ; CAPITALIZE ROUTINE - EXT CRLF ; NEW LINE ROUTINE - EXT CLINE ; COMMAND LINE STRING SAVE ROUTINE - EXT CODEND ; CODE END COMPUTATION ROUTINE - - EXT F$OPEN ; FILE OPEN - EXT F$READ ; BLOCK READ - EXT F$CLOSE ; FILE CLOSE - - EXT EVAL10 ; STRING TO BINARY CONVERSION - EXT LHLDC ; LST: HL AS DEC OUTPUT - EXT LPSTR ; LST: (HL) STRING OUTPUT - EXT LPRINT ; LST: STRING OUTPUT - EXT LCRLF ; LST: NEW LINE - EXT LOUT ; LST: OUTPUT - EXT MOVEB ; MOVEB ROUTINE - - if timeok - EXT TIME ; TIME Library Module Routine - endif - -; -; CP/M EQUATES -; -CPM EQU 0 ; WARM BOOT -BDOSE EQU CPM+5 ; BDOS ENTRY -FCB EQU CPM+5CH ; FCB -TBUFF EQU CPM+80H ; INPUT LINE BUFFER -DEL EQU 7FH ; -CR EQU 13 ; -FF EQU 12 ; -LF EQU 10 ; -CTRLC EQU 'C'-'@' ; ^C -CTRLG EQU 'G'-'@' -CTRLH EQU 'H'-'@' -CTRLI EQU 'I'-'@' -CTRLX EQU 'X'-'@' -CTRLZ EQU 'Z'-'@' - -; -; OTHER EQUATES -; -EOLD EQU 0FFH ; END OF LOAD DELIMITER - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - jmp startp -; -; Special Buffer Area -; -LWIDTH: - DB 0 ; WIDTH OF LINE -LTPP: - DB 0 ; LINES OF TEXT PER PAGE -LSPP: - DB 0 ; LINES TO SKIP PER PAGE -LFF: - DB 0 ; FORM FEED FLAG (0=NO) -; -; NOTE: LTPP + LSPP + 2 (HEADER SIZE) = TOTAL LINES PER PAGE ON PRINTER -; -DLNUMFL: - DB 0 ; LINE NUMBER FLAG (DEFAULT TO NO) -DPNUMFL: - DB 0FFH ; PAGE NUMBER FLAG (DEFAULT TO YES) -DEXACT: - DB 0 ; EXACT PRINT FLAG (DEFAULT TO NO) -DFNPFL: - DB 0FFH ; FILE NAME PRINT FLAG (DEFAULT TO YES) -DTIMEPFL: - DB 0FFH ; TIME PRINT FLAG (DEFAULT TO YES) -DMULTFL: - DB 0FFH ; MULTIPLE RUN FLAG (DEFAULT TO YES) -DINSPECT: - DB 0 ; INSPECT FILES (DEFAULT TO NO) -DOFFSET: - DB 0 ; INITIAL COLUMN OFFSET (DEFAULT TO NO COLUMNS) -; -; OTHER BUFFERS -; -SKIPFL: - DB 0 ; SKIP FLAG (DEFAULT TO NO) -SKIPNUM: - DS 2 ; PAGE NUMBER TO SKIP TO -LNUM: - DS 2 ; CURRENT LINE NUMBER -PNUM: - DS 2 ; CURRENT PAGE NUMBER -HBUF: - DS 2 ; PTR TO BUFFER FOR HEADING -; - if timeok -TIMEBF: - DS 2 ; PTR TO BUFFER FOR TIME STAMP - endif -; -LNUMFL: - DB 0 ; LINE NUMBER FLAG (DEFAULT TO NO) -PNUMFL: - DB 0FFH ; PAGE NUMBER FLAG (DEFAULT TO YES) -EXACT: - DB 0 ; EXACT PRINT FLAG (DEFAULT TO NO) -FNPFL: - DB 0FFH ; FILE NAME PRINT FLAG (DEFAULT TO YES) -TIMEPFL: - DB 0FFH ; TIME PRINT FLAG (DEFAULT TO YES) -MULTFL: - DB 0FFH ; MULTIPLE RUN FLAG (DEFAULT TO YES) -INSPECT: - DB 0 ; INSPECT FILES (DEFAULT TO NO) -OFFSET: - DB 0 ; OFFSET ON PAGE - -; -; Start of Program -; -STARTP: - LXI H,0 ; GET STACK PTR - DAD SP - SHLD STACK ; SAVE IT - CALL CODEND ; DETERMINE FREE SPACE - SHLD CMDLNE ; SAVE PTR TO COMMAND LINE - LXI D,100H ; BUFFER SIZE - DAD D - SHLD HBUF ; BUFFER FOR HEADING -; - IF TIMEOK - DAD D - SHLD TIMEBF ; BUFFER FOR TIME DATA - ENDIF -; - DAD D - SHLD DIRBUF ; PTR TO DIR BUFFER - SPHL ; SET TOP OF STACK - - CALL PUTUD ; SAVE CURRENT USER/DISK AWAY - - CALL GETPRT ; GET PRINTER DATA - MOV A,M ; GET PRINTER WIDTH - STA LWIDTH - INX H - INX H - MOV A,M ; GET NUMBER OF LINES OF TEXT - STA LTPP - MOV B,A ; ... IN B - DCX H - MOV A,M ; GET NUMBER OF LINES ON PAGE - SUI 2 - SUB B ; ADJUST FOR PAGING DATA - STA LSPP ; NUMBER OF LINES TO SKIP PER PAGE - INX H - INX H - MOV A,M ; GET FORM FEED FLAG - STA LFF - - LHLD CMDLNE ; PT TO COMMAND LINE SAVE AREA - LXI D,TBUFF+1 ; SAVE COMMAND LINE - XCHG - MVI B,80H ; SIZE OF BUFFER - CALL MOVEB - -; -; **** Banner of Program -; - CALL EPRINT - DB 'PRINT III, Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0',0 - -; -; Check for Help Request -; - LDA FCB+1 ; GET FIRST CHAR OF FILE NAME - CPI ' ' ; NO FILE SPEC? - JZ HELP - CPI '/' ; OPTION CAUGHT? - JNZ ECONT - -; -; **** Print Help Information -; -HELP: - CALL EPRINT - db cr,lf,' PRINT file1,file2,...,filen o...' - DB cr,lf,'Options:' - db cr,lf,' E Exact Print (expand tabs, form feed, no line' - db cr,lf,' or page numbers, no heading)' - db cr,lf,' F Toggle File Name Display' - db cr,lf,' H@head@ Specify Page Heading (@ is any printing char)' - db cr,lf,' I Inspect and Select Files First' - db cr,lf,' L Toggle Numbering of Each Line' - db cr,lf,' M Toggle Multiple Runs (MR=No TOF Msg)' - db cr,lf,' N Toggle Numbering of Each Page' - db cr,lf,' Onn Offset Printout by nn Characters from Left' - db cr,lf,' Snnnn Skip to Specified Page before Printing' -; - if timeok - db cr,lf,' T Toggle Time Display in header' - endif -; - db cr,lf,'Examples:' - db cr,lf,' PRINT MYFILE.TXT,*.MAC LH''SAMPLE''' - db cr,lf,' -- Number Lines, SAMPLE is Heading' - db cr,lf,' PRINT MYFILE.* S25E' - db cr,lf,' -- Skip to Page 25, Exact Print' - db cr,lf,'At any time, ^C aborts PRINT and ^X skips to next ' - db 'file' - DB 0 - -; -; RETURN TO OS -; -RETURN: - LHLD STACK ; GET OLD STACK - SPHL ; SET IT - RET - -; -; PROGRAM'S INIT ROUTINE -; -ECONT: - CALL INIT ; PROG INIT ROUTINE -; -; EXTRACT FLAGS IF PRESENT -; - LHLD CMDLNE ; PT TO BUFFER -; -; SKIP TO FILE NAME STRING -; - CALL SBLANK ; SKIP OVER BLANKS -; -; SKIP TO END OF FILE NAME STRING -; - CALL SNBLANK ; SKIP OVER NON-BLANKS -; -; SKIP TO OPTION CHAR -; - CALL SBLANK -; -; CHECK FOR LEADING SLASH ON OPTION AND SKIP IT IF SO -; -OPT: - CPI '/' ; OPTION CHAR? - JNZ OPTION - INX H ; SKIP SLASH -; -; PROCESS LIST OF OPTIONS -; -OPTION: - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ DSPEC - INX H ; PT TO NEXT CHAR - CPI ' ' ; SKIP OVER SPACES - JZ OPTION - MOV C,A ; COMMAND IN C - LXI D,OPTAB ; PT TO OPTION TABLE -OPTL: - LDAX D ; GET OPTION LETTER - ORA A ; END OF TABLE? - JZ HELP ; HELP IF SO - CMP C ; MATCH? - JZ OPTM ; PROCESS IF SO - INX D ; PT TO NEXT ENTRY - INX D - INX D - JMP OPTL -; -; PROCESS OPTION -; -OPTM: - PUSH H ; SAVE HL ON STACK - LXI H,OPTION ; GET RETURN ADDRESS - XTHL ; ... ON STACK AND RESTORE HL - INX D ; PT TO ADDRESS - LDAX D ; GET ADDRESS LOW - MOV B,A ; ... IN B - INX D - LDAX D ; GET ADDRESS HIGH - MOV D,A ; ... IN D - MOV E,B ; LOW IN E - PUSH D ; PUT ADDRESS ON STACK - MOV A,C ; COMMAND IN A - RET ; "CALL" OPTION ROUTINE - -; -; **** PROGRAM INIT ROUTINE -; THIS ROUTINE IS USED BY THE PROGRAM TO PERFORM ANY INITS -; -INIT: - lxi h,dlnumfl ;copy defaults into buffers - lxi d,lnumfl - mvi b,8 ;8 bytes - call moveb ;do copy - xra a ;A=0 - sta skipfl ;set no skip - push h - lhld hbuf ;pt to heading - mov m,a ;set no heading - pop h -; - if timeok - call time ;get time string - xchg - lhld timebf ;store in buffer - xchg -initt: - mov a,m ;get byte - stax d ;put byte - inx h ;pt to next - inx d - ora a ;done? - jnz initt - endif -; - RET - -; -; **** OPTION TABLE -; EACH OPTION IS A CAPITAL LETTER OR SPECIAL CHAR FOLLOWED BY -; AN ADDRESS; THE TABLE IS TERMINATED BY A BINARY ZERO -; -OPTAB: - db 'E' - dw optexact - db 'F' - dw optfn - db 'H' - dw opthd - db 'I' - dw optinsp - db 'L' - dw optln - db 'M' - dw optmult - db 'N' - dw optpn - db 'O' - dw optoffs - db 'S' - dw optskip -; - if timeok - db 'T' - dw opttime - endif -; - DB 0 ; END OF TABLE -; -; Option: E (Toggle exact mode) -; -optexact: - lda exact ;get flag - cma ;flip it - sta exact ;put flag - ret -; -; Option: F (Toggle file name display) -; -optfn: - lda fnpfl ;get flag - cma ;flip it - sta fnpfl ;put flag - ret -; -; Option: H (Set Heading) -; -opthd: - xchg - lhld hbuf ;pt to heading buffer - xchg - mov a,m ;get delim - ora a ;none? - rz - mov b,a ;delim in B - inx h ;pt to next char -opthd1: - mov a,m ;get next char - ora a ;done? - jz opthd3 - cmp b ;done by trailing delim? - jz opthd2 - stax d ;save char - inx h ;pt to next - inx d - jmp opthd1 -opthd2: - inx h ;skip over delim -opthd3: - xra a ;store ending 0 - stax d - ret -; -; Toggle Inspect Option -; -optinsp: - lda inspect ;flip flag - cma - sta inspect - ret -; -; Set Line Number Flag -; -optln: - lda lnumfl ;flip flag - cma - sta lnumfl - ret -; -; Set Multiple Run Flag -; -optmult: - lda multfl ;flip flag - cma - sta multfl - ret -; -; Set Page Numbering Flag -; -optpn: - lda pnumfl ;flip flag - cma - sta pnumfl - ret -; -; Set Page Offset -; -optoffs: - call eval10 ;get number - mov a,e ;get low-order byte - sta offset ;set offset - ret -; -; Set Skip Flag and get number -; -optskip: - mvi a,0ffh ;set flag - sta skipfl - call eval10 ;get number - xchg - shld skipnum ;set page number to skip to - xchg ;HL pts to next char - mov a,d ;see if page number was zero - ora e - rnz - xra a ;if zero, just turn off skip flag - sta skipfl - ret -; - if timeok -; -; Set Time Flag -; -opttime: - lda timepfl ;flip flag - cma - sta timepfl - ret -; - endif -; -; BEGIN MOVING THROUGH FILE NAMES, SEPARATED BY COMMAS -; -DSPEC: - LHLD CMDLNE ; PT TO FIRST BYTE - CALL SBLANK ; SKIP TO NON-BLANK -; -; MAJOR REENTRY POINT WHEN FILE SPECS ARE SEPARATED BY COMMAS -; HL PTS TO FIRST BYTE OF NEXT FILE SPEC -; -DSPEC1: - SHLD NEXTCH ; SAVE PTR TO NEXT CHAR - LHLD DIRBUF ; RESET STACK - SPHL - CALL GETUD ; RESET USER IF NECESSARY - LXI D,FCB ; PT TO FCB IN DE, PT TO FIRST CHAR OF FILE NAME IN HL - MVI A,0 ; SELECT DIR BEFORE DU - LHLD NEXTCH ; GET PTR TO NEXT CHAR - CALL ZFNAME ; EXTRACT FILE NAME INTO FCB, AND GET DISK AND USER - SHLD NEXTCH ; SAVE PTR TO DELIMITER WHICH ENDED SCAN - -; -; LOAD DIRECTORY AND PERFORM FUNCTION -; -FCT: - LXI D,FCB ; PT TO FCB - CALL Z3LOG ; LOG INTO IT - LXI D,FCB ; PT TO FCB - CALL INITFCB ; INIT THE FCB - LHLD DIRBUF ; PT TO DIR BUFFER AREA - MVI A,11000000B ; SELECT SYS AND NON-SYS FILES - CALL DIRQS ; LOAD DIR, SELECT FILES, PACK, AND ALPHABETIZE -; -; DETERMINE BEGINNING OF SCRATCH AREA (SCRATCH) AND SIZE IN PAGES (BCNT) -; - PUSH H ; SAVE PTR AND COUNT - PUSH B - LXI D,ESIZE ; SET PTR TO NEXT FREE BLOCK -FCTFRE: - MOV A,B ; DONE? - ORA C - JZ FCTFR1 - DAD D ; PT TO NEXT - DCX B ; COUNT DOWN - JMP FCTFRE -FCTFR1: - INR H ; NEXT PAGE - MVI L,0 - SHLD SCRATCH ; SET PTR TO SCRATCH AREA - XCHG ; PTR IN DE - LHLD BDOSE+1 ; COMPUTE BLOCK BUFFER SIZE - MOV A,H ; ADJUST FOR ZCPR3 - SUI 10 - SUB D ; A=SIZE IN BLOCKS - STA BCNT ; SET BLOCK COUNT - POP B ; RESTORE AND SAVE REGS - POP H -; -; ALLOW USER TO INSPECT FILES -; - PUSH H - PUSH B - CALL ICHECK ; CHECK FOR INSPECT OPTION AND INSPECT IF SET - POP B ; RESTORE COUNT AND PTR - POP H - -; -; PERFORM FUNCTION; HL PTS TO FILE AND BC CONTAINS NUMBER OF FILES -; -FCTL: - MOV A,B ; CHECK FOR COMPLETION (COUNT = 0) - ORA C - JZ FCTL1 - DCX B ; COUNT DOWN - SHLD NFPTR - MOV H,B - MOV L,C - SHLD NFCNT - LHLD NFPTR ; PT TO FILE - CALL FUNCTION ; PERFORM FUNCTION -FCTLNXT: - LHLD DIRBUF ; RESET STACK - SPHL - LHLD NFCNT ; RESET FILE COUNT - MOV B,H - MOV C,L - LHLD NFPTR ; RESET FILE PTR - LXI D,ESIZE ; PT TO NEXT ENTRY - DAD D - JMP FCTL - -; -; CHECK FOR NEXT FILE SPEC -; -FCTL1: - CALL GETUD ; RETURN TO HOME USER/DISK - LHLD NEXTCH ; GET PTR - MOV A,M ; GET DELIM - CPI ',' ; ANOTHER FILE? - JNZ DRETURN - INX H ; PT TO CHAR AFTER COMMA - JMP DSPEC1 ; CONTINUE PROCESSING - -; -; **** EMERGENCY ABORT -; -ABORT: - CALL EPRINT - DB CR,LF,'** PRINT Abort **',CR,LF,0 - CALL GETUD ; RETURN HOME AND FALL THRU TO DRETURN -; -; **** FUNCTION COMPLETE -- CLEANUP AND EXIT -; FILL THIS IN WITH CLEANUP CODE FOR EXIT -; -DRETURN: - JMP RETURN - -; -; **** INSPECT FILES -- THIS ROUTINE IS TO PERFORM A FILE INSPECTION -; ON INPUT, HL PTS TO FIRST 16-BYTE ENTRY AND BC=NUMBER OF ENTRIES -; -ICHECK: - mov a,b ;any files? - ora c - rz - push h ;save ptrs - push b - lxi d,esize ;size of entry -ichk1: - mvi m,0 ;clear MSBytes - dad d ;pt to next - dcx b ;count down - mov a,b ;done? - ora c - jnz ichk1 - pop b ;restore ptrs - pop h - lda inspect ;inspect? - ora a ;0=no - rz - call eprint - db cr,lf,'--- PRINT File Inspect Mode ---' - db cr,lf,' Option Function' - db cr,lf,' Y (def) Select File' - db cr,lf,' N Don''t Select File' - db cr,lf,' Q Select Rest of Files' - db cr,lf,' S Skip Rest of Files' - db cr,lf,0 -ichk2: - call eprint - db cr,lf,'Select ',0 - call prfn ;print file name - call eprint - db ' -- (Y/N/Q/S)? ',0 - call cin ;get response - call caps ;capitalize - call cout ;echo - cpi 'Q' ;select rest? - jz ichkyr - cpi 'S' ;skip rest - jz ichknr - cpi 'N' ;no to this one? - jnz ichk3 - mvi m,0ffh ;set NO flag in file FCB -ichk3: - dad d ;pt to next one - dcx b ;count down - mov a,b ;done? - ora c - jnz ichk2 - RET -; Check Rest of Files as Selected -ichkyr: - call eprint - db cr,lf,' Rest of Files Selected',0 - ret -; Check Rest of Files as NOT Selected -ichknr: - mvi m,0ffh ;set NO flag - dad d ;pt to next - dcx b ;count down - mov a,b ;done? - ora c - jnz ichknr - call eprint - db cr,lf,' Rest of Files NOT Selected',0 - ret -; -; **** FUNCTION -- MAIN FUNCTION OF TEMPLATE -; ON ENTRY, HL PTS TO NAME OF FILE (16 BYTES) AND USER IS LOGGED INTO -; DIRECTORY CONTAINING INDICATED FILE -; -FUNCTION: -; -; FILE PRINT Routine -- Print the File Whose Name is Pointed to by -; HL; we are already logged into the correct directory -; - mov a,m ;file selected? - ora a ;0=yes - rnz - lda multfl ;multiple runs? - ora a ;0=no - jnz fprint ;go right into function - call eprint - db cr,lf,'File: ',0 - call prfn ;print file name - call eprint - db ' -- Set Top of Form ',0 - call cin ;get response - cpi ctrlc ;abort? - jz abort - cpi ctrlx - rz -fprint: - call prinit ;init print buffers - call fload ;load buffer initially - call prhead ;print heading line - lhld scratch ;pt to first char in file - shld nxtln ;set pointer to next line -fprloop: - call prline ;print line of file - jnz fprloop ;done if EOF - lda ltpp ;check for new page - mov b,a - lda lcount ;LTPP and Line Count are Equal if New Page - cmp b ;equal? - jnz fprlp1 - call lcrlf ;advance 2 lines - call lcrlf -fprlp1: - call page ;advance to top of next page - ret -; -; Init Print Buffers and Print File Name -; -prinit: - lxi d,tfcb ;set up FCB - mvi b,12 ;12 bytes - call moveb - lxi h,0 ;HL=0 - shld lnum ;set line number - inx h ;HL=1 - shld pnum ;set page number - lda ltpp ;set line count - sta lcount - call eprint - db cr,lf,'Printing File ',0 - lxi h,tfcb ;pt to FCB - call prfn ;print file name - ret -; -; FILE LOAD (FLOAD) Routine -- Initial Load of memory buffer -; -fload: - lxi d,tfcb ;pt to file fcb - call initfcb ;init file's fcb - call f$open ;open file for input - jz fload1 ;open was OK - call eprint - db cr,lf,'File ',0 - xchg ;HL pts to FCB - call prfn ;print file name - call eprint - db ' NOT Found',0 - pop d ;clear return address - ret ;abort printout of this file -; -; This is an entry point for further memory loads of the file -; -fload1: - lda bcnt ;get number of blocks to load - mov c,a ;... in C - lhld scratch ;get address of first block to load into - shld nxtblk ;set pointer to next block to load -fload2: - call rdblk ;read a block (128 bytes) - jnz eof ;eof encountered? - call rdblk ;read another block (128 bytes) - jnz eof ;eof encountered? - dcr c ;count down - jnz fload2 - lhld nxtblk ;pt to next byte to load - mvi m,eold ;mark end of load - ret -eof: - lxi d,tfcb ;close file - call f$close - lhld nxtblk ;ensure ^Z - mvi m,ctrlz - ret -rdblk: - lxi d,tfcb ;pt to FCB - call f$read ;read next block - ora a ;error? - rnz - lhld nxtblk ;get ptr to next block - xchg ; as dest - lxi h,tbuff ;ptr to DMA address - mvi b,128 ;copy 128 bytes -rdblk1: - mov a,m ;get byte - ani 7fh ;mask out msb - stax d ;put byte - inx h ;pt to next - inx d - dcr b ;count down - jnz rdblk1 - xchg ;new nxtblock - shld nxtblk - ret - -; -; Line Print Routine -; Print Next Line with Optional Disk Load -; Input Parameter is NXTLN, which is the address of the first char -; on the next line -; Output Parameter is Zero Flag, with Z meaning done with print, NZ -; meaning more yet to print -; -prline: - call proffs ;print offset - lhld lnum ;increment line number - inx h - shld lnum - lhld nxtln ;pt to first char of next line - mvi c,0 ;init char count - mov a,m ;get first char of line - cpi ctrlz ;EOF? - cnz prlnum ;print line number (optional) -prl1: - mov a,m ;get char - cpi eold ;end of load? - jz prload - cpi ctrlz ;eof? - jz prexit - inx h ;pt to next char - cpi ctrli ;tab? - jz prtab - cpi cr ;? - jz prcr - cpi ff ;form feed? - jz prff - cpi lf ;end of line? - jz prldn - cpi ctrlh ;back space? - jz prbs - cpi ctrlg ;ring bell? - jz prbell - cpi del ;delete char? - jz prl1 ;skip it - cpi ' ' ;other control char? - jc prl1 ;skip if other control char - call prout ;print char - inr c ;increment char count - call eoltest ;check to see if at end of line and newline if so - jmp prl1 -; -; End of Load Reached -- Load More of File from Disk -; -prload: - push b ;save char count - call fload1 ;use load routine - pop b ;get char count - lhld scratch ;next byte is here - jmp prl1 ;continue processing -; -; Tabulate -; -prtab: - mvi a,' ' ;space - call prout - inr c ;new char - call eoltest ;process EOL - mov a,c ;done? - ani 7 - jnz prtab ;continue tabulation - jmp prl1 ;continue processing -; -; Exit with Zero Flag Set if Done -; -prexit: - xra a ;set zero flag - ret -; -; Carriage Return -- Reset Character Count and Continue -; -prcr: - call prout ;send CR to printer - mvi c,0 ;reset char count - jmp prl1 ;continue processing -; -; Form Feed -- Advance to Top of Next Page -; -prff: - call page ;page eject with heading - mvi c,0 ;reset char count - jmp prl1 ;continue processing -; -; Line Feed -- End of Routine -; -prldn: - call prout ;echo LF to printer - shld nxtln ;set ptr to first char of next line - mvi a,0ffh ;set not done - ora a ;set flags - ret -; -; Backspace on Printer -; -prbs: - mov a,c ;check for beginning of line - ora a - jz prl1 ;continue if at BOL - mvi a,ctrlh ;backspace - call prout - dcr c ;back up char position - jmp prl1 ;continue -; -; Ring Bell on Printer -; -prbell: - call prout ;ring the bell - jmp prl1 ;continue without advancing char position -; -; Test for End of Line and Process if so -; -eoltest: - lda offset ;get offset - mov b,a ;... in B - lda lwidth ;get line width - sub b ;compute remaining width - sui 4 ;4 chars less for continuation mark - mov b,a ;result in B - lda lnumfl ;line numbering (lines are 7 chars shorter if so) - ora a ;0=no - jz eolt1 - mov a,b ;reduce by 7 for line numbers - sui 7 - mov b,a -eolt1: - mov a,b ;get line width - cmp c ;there? - rnz ;continue if not - mov a,m ;get next char - cpi cr ;new line next? - rz ;continue if so - mvi b,3 ;see if CR is one of next 3 chars - push h -eolt2: - inx h ;pt to next - mov a,m ;get char - cpi cr - jz eolt2a ;yes, it is - dcr b ;count down - jnz eolt2 - pop h ;restore HL - jmp eolt3 -eolt2a: - pop h ;restore HL - ret ;allow to continue -eolt3: - cpi ctrlh ;backspace next? - rz ;continue if so - mvi a,' ' ;print continuation chars - call prout - mvi a,'<' - call prout - mvi a,'<' - call prout - mvi a,cr ;new line - call prout - mvi a,lf - call prout - mvi c,0 ;reset char position - lda skipfl ;skipping? - ora a ;0=no - rnz - call proffs ;print offset if any - lda lnumfl ;printing line numbers? - ora a ;0=no - rz - call lprint ;print blank for line number - db ' : ',0 - ret -; -; Output a character to the printer -; A = Character -; -prout: - mov b,a ;char in B - call condin ;check for abort - jz prout1 - cpi ctrlc ;abort? - jz abort - cpi ctrlx ;abort this one file? - jz cxabort -prout1: - lda skipfl ;skipping? - ora a ;set flags (Z=no skip=print char) - mov a,b ;restore char - cz lout ;send character to printer - cpi lf ;special tests if it is a line feed - rnz ;done if non-LF char - lda lcount ;decrement line counter - dcr a - sta lcount - rnz -; -; Paging Required -; Skip to top of next page; reset LCOUNT (Lines Left on Page Count); -; print header -; -prout0: - lda ltpp ;get number of text lines per page - sta lcount ;set as new line count - push h ;save ptr - lhld pnum ;increment page number - inx h - shld pnum - lda lspp ;get number of lines to skip per page - call lineskp ;skip lines - pop h ;restore ptr - mov a,m ;check next character - cpi ctrlz ;EOF? - jnz prhead ;print 2-line heading if NOT EOF - ret -; -; Abort current file with final page eject -; -cxabort: - lda lcount ;get count of remaining lines - call lineskp ;skip lines - lda lff ;form feed done? - ora a ;0=no - lda lspp ;number of lines to skip per page - cz lineskp ;skip lines if no previous FF - jmp fctlnxt ;continue with next file -; -; Skip out rest of page -; Form Feed Function -; -page: - lda lff ;form feed in use - ora a ;0=no - jnz prout0 ;process top of new page if form feed in use - lda lcount ;get count of remaining lines - call lineskp ;skip lines - jmp prout0 ;process top of new page -; -; Skip out lines on page -; A = number of lines to skip -; -lineskp: - mov b,a ;line count in B - ora a ;any? - rz - lda skipfl ;skipping? - ora a - rnz - lda lff ;form feed available? - ora a ;0=no - jnz lines2 -lines1: - call lcrlf ;new line - dcr b ;count down - jnz lines1 - ret -lines2: - call lcrlf ;new line - mvi a,ff ;output form feed to printer - jmp lout -; -; Print Line Number (optional) -; -prlnum: - lda skipfl ;skipping? - ora a ;0=no - rnz - lda lnumfl ;get flag - ora a ;0=don't number lines - rz - push h ;save ptr - lhld lnum ;get line number - call lhldc ;print line number - call lprint ;print separator - db ': ',0 - pop h ;restore ptr - ret -; -; Print 2-line heading and control skipping -; -prhead: - push h ;save ptr - lda skipfl ;currently skipping? - ora a ;0=no - cnz skiptst ;test for shut off - lda exact ;exact says no heading - ora a ;0FFH=yes - jnz prhead1 - call proffs ;print offset - lda pnumfl ;number pages? - ora a ;0=no - cnz prpnum ;print page heading and number - lda fnpfl ;print file name? - ora a ;0=no - cnz prfname ;print file name -; - if timeok ;time available? - lda timepfl ;print time? - ora a ;0=no - cnz prtime ;print time - endif -; - push h - lhld hbuf ;pt to heading buffer - mov a,m ;print heading? - pop h - ora a ;0=no - cnz prhdg ;print heading -prhead1: - pop h ;restore ptr -prhead2: - lda skipfl ;skipping? - ora a - rnz - call lcrlf ;new line - jmp lcrlf -; -; Test for completion of skipping -; -skiptst: - lhld pnum ;get page number - xchg ;... in DE - lhld skipnum ;get page to skip to - mov a,h ;compare them - cmp d - rnz - mov a,l - cmp e - rnz - xra a ;A=0 to stop skipping - sta skipfl ;set flag - ret -; -; Print Line Offset -; -proffs: - lda skipfl ;skipping? - ora a - rnz - push b ;save BC - lda offset ;get offset - ora a ;any? - jz proff2 - mov c,a ;offset in B -proff1: - mvi a,' ' ;space over - call prout - dcr c ;count down - jnz proff1 -proff2: - pop b - ret -; -; Print Page Number -; -prpnum: - lda skipfl ;skipping? - ora a - rnz - call lprint ;print header - db 'Page ',0 - lhld pnum ;print current page number - call lhldc ;print as decimal - ret -; -; Print File Name -; -prfname: - lda skipfl ;skipping? - ora a - rnz - call prdash ;print separator - lxi h,tfcb+1 ;pt to first char - mvi b,8 ;8 chars - call lfn1 - mvi a,'.' - call lout - mvi b,3 ;3 chars - call lfn1 - ret -lfn1: - mov a,m ;get char - ani 7fh ;mask - call lout ;send to printer - inx h ;pt to next - dcr b ;count down - jnz lfn1 - ret -; -; Print Separator -; -prdash: - call lprint - db ' -- ',0 - ret -; - if timeok -; -; Print Time -; -prtime: - lda skipfl ;skipping? - ora a - rnz - call prdash ;print separator - lhld timebf ;pt to time stamp - call lpstr ;print - ret -; - endif -; -; Print Header -; -prhdg: - lda skipfl ;skipping? - ora a - rnz - call prdash ;print separator - lhld hbuf ;pt to heading - call lpstr ;print - ret -; -; UTILITIES -; SBLANK -- SKIP BLANKS PTED TO BY HL UNTIL NON-BLANK ENCOUNTERED; HL -; SNBLANK -- SKIP NON-BLANKS PTED TO BY HL UNTIL BLANK OR EOL; HL -; PRFN -- PRINT FILE NAME PTED TO BY HL; AFFECT NOTHING -; - -; -; SKIP UNTIL NON-BLANK -; -SBLANK: - MOV A,M ; LOOK FOR BLANK - INX H ; PT TO NEXT - CPI ' ' ; BLANK? - JZ SBLANK - DCX H ; BACK UP - RET - -; -; SKIP UNTIL BLANK OR EOL -; -SNBLANK: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CPI ' ' ; BLANK? - JZ SNB1 - ORA A ; EOL? - JNZ SNBLANK -SNB1: - DCX H ; BACK UP - RET - -; -; PRINT FILE NAME PTED TO BY HL -; OUTPUT TO CON: -; -PRFN: - PUSH H ; SAVE REGS - PUSH B - CALL RETUD ; GET CURRENT USER/DISK - MOV A,B ; PRINT DISK - ADI 'A' ; LETTER - CALL COUT - MOV A,C ; PRINT USER - CALL PADC - CALL EPRINT - DB ': ',0 - INX H ; PT TO FILE NAME - MVI B,8 ; PRINT NAME - CALL PRNT - MVI A,'.' ; DECIMAL - CALL COUT - MVI B,3 ; PRINT TYPE - CALL PRNT - POP B ; GET REGS - POP H - RET - -; -; PRINT CHARS PTED TO BY HL FOR B BYTES -; OUTPUT TO CON: -; -PRNT: - MOV A,M ; GET CHAR - CALL COUT - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ PRNT - RET - -; -; BUFFERS -; -CMDLNE: - DS 2 ; PTR TO COMMAND LINE STRING -DIRBUF: - DS 2 ; PTR TO DIRECTORY BUFFER -NFPTR: - DS 2 ; PTR TO NEXT FILE -NFCNT: - DS 2 ; NEXT FILE COUNT -NEXTCH: - DS 2 ; PTR TO NEXT CHAR IN MULTIFILE COMMAND LINE -SCRATCH: - DS 2 ; ADDRESS OF FIRST FREE BYTE -BCNT: - DS 1 ; NUMBER OF PAGES IN SCRATCH AREA -; -; PRINT3 Buffers -; -tfcb: - ds 36 ; FCB for current file -nxtblk: - ds 2 ; pointer to next block to load -nxtln: - ds 2 ; pointer to next line to read -lcount: - ds 1 ; count of text lines left on page -; -; Stack -; -STACK: - DS 2 ; OLD STACK PTR - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/PRINTHLP.LBR b/Source/Images/d_bp/u15/PRINTHLP.LBR deleted file mode 100644 index ab8c2685..00000000 Binary files a/Source/Images/d_bp/u15/PRINTHLP.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/PROTECT.COM b/Source/Images/d_bp/u15/PROTECT.COM deleted file mode 100644 index 792e0f69..00000000 Binary files a/Source/Images/d_bp/u15/PROTECT.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/PROTECT.MAC b/Source/Images/d_bp/u15/PROTECT.MAC deleted file mode 100644 index 7eba5d21..00000000 --- a/Source/Images/d_bp/u15/PROTECT.MAC +++ /dev/null @@ -1,591 +0,0 @@ -; PROGRAM: PROTECT -; VERSION: 3.0 -; DATE: 18 May 84 -; AUTHOR: RICHARD CONN -; PREVIOUS VERSIONS: 2.0 (16 Jan 83) -; PREVIOUS VERSIONS: 1.3 (6 Jan 83), 1.2 (7 Dec 82), 1.1 (10 NOV 82) -; PREVIOUS VERSION: PROTECT.ASM Version 1.0 (26 OCT 81) -VERS equ 30 -z3env SET 0f400h - -; -; PROTECT Command -- -; PROTECT is used to set the file protection and tag attribute bits -; for CP/M 2.x files in the ZCPR3 environment. It is invoked via command -; lines of the following forms: -; PROTECT dir:afn1,dir:afn2,... keys <-- Set unconditionally -; PROTECT dir:afn1,... keys I <-- Inspect Mode -; PROTECT dir:afn1,... C <-- Set each ufn -; -; In the above examples, the reference 'keys' is a string of zero or -; more characters which may be any of the following: -; -; A <-- Set AR Attribute -; R <-- Set R/O Attribute (no R sets R/W) -; S <-- Set SYS Attribute (no S sets Non-System) -; n <-- Set Tag Attribute (1 <= n <= 8) -; -; Examples: -; PROTECT *.COM RS <-- Sets all COM files to R/O SYStem -; PROTECT *.COM RSI <-- Same, with user approval -; PROTECT *.COM C <-- Allows user to specify for each -; PROTECT MYPROG.COM 1R <-- Sets Tag Bit 1 and R/O Attribute -; - -FALSE EQU 0 -TRUE EQU NOT FALSE - -ESIZE EQU 16 ; SIZE OF DIR ENTRY (FROM SYSLIB DIRF ROUTINE) - - EXT DIRQ ; DIRECTORY PROCESSOR - - EXT Z3INIT ; INIT BUFFERS - EXT ZFNAME ; FILE NAME PROCESSOR - EXT Z3LOG ; LOG INTO Z3 DU - - EXT BBLINE ; INPUT LINE EDITOR - EXT INITFCB ; INIT FCB - EXT BDOS ; BDOS ENTRY - EXT PUTUD ; SAVE CURRENT USER/DISK - EXT GETUD ; RESTORE CURRENT USER/DISK - EXT MOVEB ; COPY ROUTINE - EXT PHLDC ; PRINT HL AS DECIMAL CHARS - EXT PRINT ; PRINT ROUTINE - EXT COUT ; CONSOLE OUTPUT ROUTINE - EXT CIN ; CONSOLE INPUT ROUTINE - EXT CAPS ; CAPITALIZE ROUTINE - EXT CRLF ; NEW LINE ROUTINE - EXT FILLB ; FILL ROUTINE - EXT CODEND ; CODE END COMPUTATION ROUTINE - -; -; CP/M EQUATES -; -CPM EQU 0 ; WARM BOOT -FCB EQU 5CH ; FCB -BUFF EQU 80H ; INPUT LINE BUFFER -CR EQU 13 ; -LF EQU 10 ; - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - LXI H,0 ; GET STACK PTR - DAD SP - SHLD STACK ; SAVE IT - CALL CODEND ; DETERMINE FREE SPACE - SHLD CMDLNE ; COMMAND LINE BUFFER - LXI D,100H ; BUFFER SIZE - DAD D - SHLD DIRBUF ; DIR BUFFER - SPHL ; SET SP - CALL PUTUD ; SAVE CURRENT USER/DISK AWAY - - CALL PRINT - DB 'PROTECT Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0',0 - LDA FCB+1 ; GET FIRST CHAR OF FILE NAME - CPI ' ' ; NO FILE SPEC? - JZ HELP - CPI '/' ; OPTION CAUGHT? - JNZ ECONT - -; PRINT HELP INFORMATION -HELP: - CALL PRINT - DB CR,LF,'Syntax:' - DB CR,LF,' PROTECT dir:filename.typ,dir:fn.ft,... o...' - DB CR,LF,'Options:' - DB CR,LF,' C -- Control Mode (Allow user to set each file)' - DB CR,LF,' I -- Inspect Mode (Give user option to set att)' - DB CR,LF,' n -- 1 <= n <= 8; Set Tag Attribute' - DB CR,LF,' A -- Set AR (Archive) Attribute' - DB CR,LF,' R -- Set R/O Attribute (no R sets R/W)' - DB CR,LF,' S -- Set SYS Attribute (no S sets Non-System)' - DB CR,LF - DB 0 - -; RETURN TO OS -RETURN: - LHLD STACK ; GET OLD STACK - SPHL ; SET IT - RET - -; COPY BUFFER INTO TEMP BUFFER -ECONT: - LHLD CMDLNE ; PT TO CMDLNE BUFFER - XCHG - LXI H,BUFF+1 ; PT TO BUFFER - MVI B,80H ; ARBITRARY - CALL MOVEB ; COPY INTO COMMAND LINE BUFFER - -; EXTRACT FLAGS IF PRESENT - XRA A ; SET NO INSPECT, NO R/O, NO ARCH, AND NO SYSTEM FILES - STA INSPECT - STA READONLY - STA SYSTEM - STA ARCHIVE - STA CONTROL ; SET NO CONTROL MODE - MVI B,8 ; CLEAR TAG BITS - LXI H,TAGS - CALL FILLB - LXI H,0 ; SET FILE COUNT - SHLD FILECNT - LHLD CMDLNE ; PT TO BUFFER -; SKIP TO FILE NAME STRING -SBLANK: - MOV A,M ; SKIP TO NON-BLANK - CPI ' ' ; ? - JNZ SBL1 - INX H ; PT TO NEXT CHAR - JMP SBLANK -; SKIP TO END OF FILE NAME STRING -SBL1: - MOV A,M ; SKIP TO OR EOL - ORA A ; DONE? - JZ OPT - CPI ' ' ; - JZ OPT - INX H ; PT TO NEXT - JMP SBL1 -; CHECK FOR LEADING SLASH ON OPTION AND SKIP IT IF SO -OPT: - CPI '/' ; OPTION CHAR? - JNZ OPTION - INX H ; SKIP SLASH -; PROCESS LIST OF OPTIONS -OPTION: - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ DSPEC - INX H ; PT TO NEXT CHAR - CPI ' ' ; SKIP OVER SPACES - JZ OPTION - CPI '/' ; IF OPTION LETTER, OBVIOUS ERROR, SO HELP - JZ HELP - CPI '1' ; DIGIT? - JC HELP - CPI '8'+1 ; IN RANGE? - JC OPTNUM - CPI 'C' ; CONTROL? - JZ OPTCTRL - CPI 'I' ; INSPECT? - JZ OPTINS - CPI 'A' ; ARCHIVE - JZ OPTAR - CPI 'R' ; READ/ONLY? - JZ OPTRO - CPI 'S' ; SYSTEM FILES? - JNZ HELP - MVI A,80H ; SET FOR SYS FILES - STA SYSTEM - JMP OPTION -OPTNUM: - SUI '1' ; ADJUST '1' TO '8' TO 0-7 - PUSH H ; SAVE PTR - MOV E,A ; VALUE IN DE - MVI D,0 - LXI H,TAGS ; PT TO TAG BUFFER - DAD D ; PT TO ELEMENT - MVI M,80H ; SELECT ELEMENT - POP H ; GET PTR TO NEXT CHAR - JMP OPTION -OPTCTRL: - MVI A,0FFH ; CONTROL MODE - STA CONTROL - JMP OPTION -OPTINS: - MVI A,0FFH ; INSPECT - STA INSPECT - JMP OPTION -OPTAR: - MVI A,80H ; SET ARCHIVE - STA ARCHIVE - JMP OPTION -OPTRO: - MVI A,80H ; SET R/O - STA READONLY - JMP OPTION - -; EXTRACT DISK, USER, AND FILE NAME INFORMATION -DSPEC: - LHLD CMDLNE ; PT TO BEFORE FIRST BYTE - DCX H -DSPEC0: - INX H ; PT TO BYTE - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ HELP - CPI ' ' ; ? - JZ DSPEC0 -; -; MAJOR REENTRY POINT WHEN FILE SPECS ARE SEPARATED BY COMMAS -; HL PTS TO FIRST BYTE OF NEXT FILE SPEC -; -DSPEC1: - CALL GETUD ; RESET USER IF NECESSARY - LXI D,FCB ; PT TO FCB IN DE, PT TO FIRST CHAR OF FILE NAME IN HL - MVI A,0 ; DIR BEFORE DU - CALL ZFNAME ; EXTRACT FILE NAME INTO FCB, AND GET DISK AND USER - SHLD NEXTCH ; SAVE PTR TO DELIMITER WHICH ENDED SCAN - LXI D,FCB ; PT TO FCB - CALL Z3LOG ; LOG INTO DU - -; LOAD DIRECTORY AND PROTECT FILES -PROT: - LHLD DIRBUF ; PT TO END OF CODE - MVI A,0C0H ; SELECT NON-SYS AND SYS FILES - LXI D,FCB ; PT TO FCB - CALL DIRQ ; LOAD DIR, SELECT FILES, PACK, AND ALPHABETIZE - -; PROT DIR FILES; HL PTS TO FIRST FILE, BC=FILE COUNT - CALL PROTFILES - -; CHECK FOR NEXT FILE SPEC - LHLD NEXTCH ; GET PTR - MOV A,M ; GET DELIM - CPI ',' ; ANOTHER FILE? - JNZ PROTDONE - INX H ; PT TO CHAR AFTER COMMA - JMP DSPEC1 ; CONTINUE PROCESSING - -; PROT COMPLETE -- PRINT COUNT AND EXIT -PROTDONE: - CALL PRCOUNT ; PRINT FILE COUNT - JMP RETURN - -; PROT SELECTED FILES -PROTFILES: - MOV A,B ; CHECK FOR ANY FILES LOADED - ORA C - RZ - -; PRINT FILE NAME -PROTLP: - PUSH B ; SAVE ENTRY COUNT - CALL CRLF ; NEW LINE - PUSH H ; SAVE PTR TO FCB - INX H ; PT TO FILE NAME - MVI B,8 ; PRINT NAME - CALL PRNT - MVI A,'.' ; DECIMAL - CALL COUT - MVI B,3 ; PRINT TYPE - CALL PRNT - POP H ; GET PTR - -; CHECK FOR CONTROL MODE AND PERFORM CONTROL FUNCTION IF SET - LDA CONTROL ; GET FLAG - ORA A ; NZ=YES - JNZ PROTCTRL - -; CHECK FOR INSPECTION AND INSPECT IF SET - LDA INSPECT ; GET FLAG - ORA A ; 0=NO - JZ DOIT - -; PROMPT USER FOR PROTECT - CALL PROTQ ; PROT QUESTION - CPI 'Q' ; QUIT? - JZ QUIT - CPI 'Y' ; YES? - JZ DOIT - -; DON'T PROTECT FILE -NODO: - CALL PRINT - DB ' ++ NO Attribute Change ++',0 - JMP PROTTEST - -; PROMPT USER FOR PROT -PROTQ: - CALL PRINT ; PRINT PROMPT - DB ' -- Protect (Y/N/Q=Quit/other=N)? ',0 - CALL CIN ; GET RESPONSE - CALL CAPS ; CAPITALIZE - CALL COUT ; ECHO - RET - -; CONTROL FUNCTION -- ALLOW USER TO SET BITS AS HE DESIRES -PROTCTRL: - PUSH H ; SAVE PTR TO FILE - XRA A ; A=0 - STA READONLY ; CLEAR R/O, SYS, ARCHIVE, AND TAGS - STA SYSTEM - STA ARCHIVE - LXI H,TAGS - MVI B,8 - CALL FILLB - CALL PRINT - DB ' -- Attributes (? for Help)? ',0 - MVI A,0FFH ; CAPITALIZE - CALL BBLINE ; INPUT LINE FROM USER - CALL CRLF ; NEW LINE - MVI B,80H ; MSB SET -PCTRL: - MOV A,M ; GET ATTRIBUTE FLAG - ORA A ; DONE? - JZ PDOIT ; DO PROTECTION THEN - INX H ; PT TO NEXT - CPI ' ' ; SKIP - JZ PCTRL - CPI 'Q' ; QUIT? - JZ QUIT - CPI 'A' ; ARCHIVE? - JZ PCTRLA - CPI 'S' ; SYSTEM? - JZ PCTRLS - CPI 'R' ; R/O? - JZ PCTRLR - CPI '1' ; DIGIT? - JC PCTRLH ; HELP IF NOT - CPI '8'+1 ; RANGE? - JC PCTRLN ; DO NUMBER -PCTRLH: - CALL PRINT - DB CR,LF,' Attributes may be specified as follows --' - DB CR,LF,' A = Archive, R = R/O, S = SYS, 1-8 = Tags' - DB CR,LF,' The command Q exits' - DB CR,LF,0 - POP H ; GET FCB PTR - POP B ; GET ENTRY COUNT - JMP PROTLP ; PROCESS AGAIN -PCTRLA: - MOV A,B ; GET FLAG - STA ARCHIVE ; SET FLAG - JMP PCTRL -PCTRLS: - MOV A,B ; GET FLAG - STA SYSTEM ; SET FLAG - JMP PCTRL -PCTRLR: - MOV A,B ; GET AND SET FLAG - STA READONLY - JMP PCTRL -PCTRLN: - PUSH H - SUI '1' ; CONVERT TO OFFSET - MOV E,A ; OFFSET IN DE - MVI D,0 - LXI H,TAGS ; SET TAG - DAD D - MOV M,B ; SET BIT - POP H - JMP PCTRL ; CONTINUE - -; QUIT PROTECT PROGRAM -QUIT: - CALL PRCOUNT ; PRINT COUNT OF FILES PROTECTED - CALL PRINT - DB CR,LF,' QUIT',0 - JMP RETURN - -; PROT FILE, BUT GET PTR FIRST -PDOIT: - POP H ; GET PTR - -; PROT FILE -DOIT: - PUSH H - LXI D,PROTFCB ; COPY TARGET FILE INTO PROTECT'S FCB - MVI B,16 ; 16 BYTES - CALL MOVEB ; COPY - LXI H,TAGS ; SET TAG BITS NOW - INX D ; PT TO FIRST TAG BIT - MVI B,8 ; 8 TAG BITS -DOITL: - LDAX D ; GET BYTE FROM PROT FCB - ANI 7FH ; MASK OUT OLD MSB - ORA M ; OR IN TAG BIT - STAX D ; PUT BYTE BACK - INX H ; PT TO NEXT - INX D - DCR B ; COUNT DOWN - JNZ DOITL - LDA READONLY ; GET R/O BIT - MOV B,A ; SAVE IN B - LDAX D ; GET BYTE - ANI 7FH ; MASK OUT OLD MSB - ORA B ; OR IN NEW MSB - STAX D ; PUT IT BACK - INX D ; PT TO SYS BIT - LDA SYSTEM ; GET SYS BIT - MOV B,A ; SAVE IT - LDAX D ; GET BYTE - ANI 7FH ; MASK OUT OLD MSB - ORA B ; MASK IN NEW MSB - STAX D ; PUT IT BACK - INX D ; PT TO ARCHIVE BIT - LDA ARCHIVE ; GET ARCHIVE BIT - MOV B,A ; SAVE IT - LDAX D ; GET BYTE - ANI 7FH ; MASK OUT OLD MSB - ORA B ; MASK IN NEW MSB - STAX D ; PUT IT BACK - LXI D,PROTFCB ; PT TO FCB - CALL INITFCB ; INIT IT - MVI C,30 ; SET FILE ATTRIBUTES - CALL BDOS - CALL PRINT - DB ' Set to ',0 - LXI H,PROTFCB+1 - MVI B,8 ; 8 TAGS - MVI C,'1' ; SET DIGIT -PATTL1: - MOV A,M ; GET BYTE - ANI 80H ; PRINT ATT? - JZ PATTL2 - MOV A,C ; GET DIGIT - CALL COUT -PATTL2: - INR C ; INCREMENT DIGIT - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ PATTL1 - MOV A,M ; GET R/O BYTE - ANI 80H ; MASK IT - JZ PATTL3 - CALL PRINT - DB ' R/O ',0 - JMP PATTL4 -PATTL3: - CALL PRINT - DB ' R/W ',0 -PATTL4: - INX H ; PT TO SYS BYTE - MOV A,M ; GET SYS BYTE - ANI 80H ; MASK IT - JZ PATTL5 - CALL PRINT - DB 'SYS',0 - JMP PATTL6 -PATTL5: - CALL PRINT - DB 'DIR',0 -PATTL6: - INX H ; PT TO ARCHIVE BYTE - MOV A,M ; GET ARCH BYTE - ANI 80H ; MASK IT - JZ PATTL7 - CALL PRINT - DB ' AR',0 -PATTL7: - LHLD FILECNT ; INCREMENT FILE COUNT - INX H - SHLD FILECNT - POP H ; GET PTR TO DIRECTORY ENTRY - -; PT TO NEXT ENTRY -PROTTEST: - LXI D,ESIZE ; PT TO NEXT ENTRY - DAD D - POP B ; GET COUNT - DCX B ; COUNT DOWN - MOV A,B ; CHECK FOR ZERO - ORA C - JNZ PROTLP - -; RETURN TO CALLER - RET - -; -; PRINT CHARS PTED TO BY HL FOR B BYTES -; -PRNT: - MOV A,M ; GET CHAR - CALL COUT - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ PRNT - RET - -; -; PRINT COUNT OF NUMBER OF FILES PROTECTED -; -PRCOUNT: - CALL CRLF ; NEW LINE - LHLD FILECNT ; GET COUNT - MOV A,L ; CHECK FOR NONE - ORA H - JZ PRNO - CALL PHLDC ; PRINT DECIMAL COUNT - JMP PRMS -PRNO: - CALL PRINT - DB 'No ',0 -PRMS: - LHLD FILECNT ; 1 FILE PROTECTED? - MOV A,H ; HIGH ZERO? - ORA A - JNZ PRMULT - MOV A,L ; LOW ONE? - CPI 1 - JZ PRSING -PRMULT: - CALL PRINT - DB ' Files Protected',0 - RET -PRSING: - CALL PRINT - DB ' File Protected',0 - RET - -; -; BUFFERS -; -INSPECT: - DS 1 ; INSPECT FLAG (0=NO, 0FFH=YES) -CONTROL: - DS 1 ; CONTROL FLAG (0=NO, 0FFH=YES) -ARCHIVE: - DS 1 ; ARCHIVE FLAG (0=NO, 80H=YES) -SYSTEM: - DS 1 ; SYSTEM FLAG (0=NO, 80H=YES) -READONLY: - DS 1 ; READ/ONLY FLAG (0=NO, 80H=YES) -TAGS: - DS 8 ; 8 TAG BITS -NEXTCH: - DS 2 ; PTR TO NEXT CHAR IN MULTIFILE COMMAND LINE -FILECNT: - DS 2 ; COUNT OF NUMBER OF FILES PROTECTED -PROTFCB: - DS 40 ; FCB FOR PROTECT -CMDLNE: - DS 2 ; PTR TO COMMAND LINE SAVE AREA -DIRBUF: - DS 2 ; DIRECTORY BUFFER -STACK: - DS 2 ; OLD STACK PTR - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/PWD.COM b/Source/Images/d_bp/u15/PWD.COM deleted file mode 100644 index dc7fe7f9..00000000 Binary files a/Source/Images/d_bp/u15/PWD.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/PWD.MAC b/Source/Images/d_bp/u15/PWD.MAC deleted file mode 100644 index 8c3a2cdd..00000000 --- a/Source/Images/d_bp/u15/PWD.MAC +++ /dev/null @@ -1,249 +0,0 @@ -; -; Program: PWD -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; The purpose of PWD is to display the names of the named directories. -; If the option PASS (P) is given, then the passwords to the directories will -; be displayed as well IF the Wheel Byte is Available and Set. If the Wheel -; Byte is not available, the passwords will be displayed without question. -; - -; -; Basic Equates -; -z3env SET 0f400h ;address of ZCPR3 Environment -fcb equ 5ch -cr equ 0dh -lf equ 0ah - -; -; External References -; - ext z3init - ext cout,crlf,print,padc - ext qprint,qcrlf - ext getndr,getwhl - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env -; -; Print Banner -; - call qprint ;check quiet flag - db 'PWD, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,0 -; -; Check for options -; - lxi h,fcb+1 ;pt to option char - mov a,m ;get option char - cpi '/' ;help? - jz prhelp - cpi ' ' ;no option? - jz namedir - cpi 'P' ;passwords? - jnz invopt ;bad option if not -; -; Prepare to process passwords - check for authorization -; - call getwhl ;get wheel byte - jnz namedir ;permission granted - call print - db ' Password Request Denied - Not Wheel',cr,lf,0 - mvi m,' ' ;clear option -; -; Print Named Directory Info -; -namedir: - call getndr ;get location of directory - jnz ndir1 - call print - db ' Named Directory Buffer Not Available',0 - ret -; -; Print Names of Directory Elements -; -ndir1: - lda fcb+1 ;see if passwords included - cpi 'P' - jz ndir1p -; -; Print Header if Not Quiet for Non-Password Entries -; - mvi b,4 ;4 times -ndir1a: - call qprint ;print banner (optional) - db ' DU : DIR Name ',0 - dcr b ;count down - jnz ndir1a - call qcrlf ;new line - mvi b,4 ;4 more times -ndir1b: - call qprint - db '---- -------- ',0 - dcr b ;count down - jnz ndir1b - call qcrlf ;new line - jmp ndir1z -; -; Print Header if Not Quiet for Password Entries -; -ndir1p: - mvi b,2 ;2 times -ndir1c: - call qprint - db ' DU : DIR Name - Password ',0 - dcr b ;count down - jnz ndir1c - call qcrlf - mvi b,2 -ndir1d: - call qprint - db '---- -------- -------- ',0 - dcr b ;count down - jnz ndir1d - call qcrlf -; -; Begin Output Processing -; -ndir1z: - mvi c,0 ;set entry count - mvi b,1 ;set disk 1 -; -; Print Each Resident Command Name -; -ndir2: - mov a,m ;get table entry - ora a ;end of table? - rz ;exit - cmp b ;same disk? - jz ndir3 -; -; Advance to Next Set of Entries for New Disk -; - mov b,a ;set new disk - mov a,c ;get count - ani 3 ;see if newline already given - cnz crlf ;complete current line - call crlf ;1 additional line - mvi c,0 ;reset count -ndir3: - push b ;save counters -; -; Print DU: -; - mov a,m ;get disk - adi '@' ;convert to letter (A to P) - call cout - inx h ;pt to user - mov a,m ;get user - call padc ;print user number - call print ;print separator - db ': ',0 - inx h ;pt to name -; -; Print DIR -; - call prname ;print name of directory - lda fcb+1 ;check for password option - cpi 'P' - jnz ndir4 - call print - db ' - ',0 - call prname ;print name of password - pop b ;get counters - inr c ;another entry - push b ;save counters - jmp ndir5 -; -; Advance to Next and Print Separator -; -ndir4: - lxi b,8 ;skip over password - dad b -; -; Print Separator -; -ndir5: - call print ;print separator - db ' ',0 - pop b ;get counters -; -; New Line Counter -; - inr c ;increment entry counter - mov a,c ;check for done - ani 3 ;every 4 - cz crlf ;new line - jmp ndir2 -; -; Print 8-char name (directory or password) and advance ptr -; -prname: - mvi b,8 ;print name -prn1: - mov a,m ;get char - call cout - inx h ;pt to next - dcr b ;count down - jnz prn1 - ret -; -; Print Invalid Option and then Help Messages -; -invopt: - call print - db cr,lf,'Invalid Option',cr,lf,0 ;fall thru to PRHELP -; -; Print Help Message -; -prhelp: - call print - db cr,lf,'PWD - Print Working Directories',cr,lf - db cr,lf,'PWD Syntax:' - db cr,lf,' PWD or PWD P' - db cr,lf - db cr,lf,'where just "PWD" prints the names of the directories' - db cr,lf,'and "PWD P" (for PWD PASSWORD) prints the names and' - db cr,lf,'passwords of the directories if the user has Wheel' - db cr,lf,'Powers',0 - ret - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/QUIET.COM b/Source/Images/d_bp/u15/QUIET.COM deleted file mode 100644 index 0a373556..00000000 Binary files a/Source/Images/d_bp/u15/QUIET.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/QUIET.MAC b/Source/Images/d_bp/u15/QUIET.MAC deleted file mode 100644 index 4eaa4302..00000000 --- a/Source/Images/d_bp/u15/QUIET.MAC +++ /dev/null @@ -1,139 +0,0 @@ -; -; Program: QUIET -; Author: Richard Conn -; Version: 1.0 -; Date: 29 Mar 84 -; -version equ 10 -z3env SET 0f400h - -; -; QUIET is used to set and reset the Quiet Flag in ZCPR3. -; The forms of the command are: -; -; QUIET DISPLAY <-- Display Setting -; QUIET RESET <-- Turn Quiet Off -; QUIET SET <-- Turn Quiet On -; QUIET / <-- Print Help -; - -; -; Equates -; -fcb equ 5ch -cr equ 0dh -lf equ 0ah - -; -; SYSLIB and Z3LIB Routines -; - ext z3init,print,envptr - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Print Banner -; - call print - db 'QUIET Version ' - db (version/10)+'0','.',(version mod 10)+'0',0 - -; -; Check for Command -; - lda fcb+1 ;get first char - cpi 'R' ;reset? - jz qreset - cpi 'S' ;set? - jz qset - cpi 'D' ;display? - jz display - -; -; Print help -; -help: - call print - db cr,lf,'QUIET - Set/Reset/Display Quiet Flag' - db cr,lf,'Syntax:' - db cr,lf,' QUIET D or QUIET DIS - Display Quiet Flag' - db cr,lf,' QUIET R or QUIET RES - Quiet Flag Off' - db cr,lf,' QUIET S or QUIET SET - Quiet Flag On' - db 0 - ret - -; -; Reset Quiet -; -qreset: - call ptquiet ;pt to Quiet Flag - mvi m,0 ;reset it - jmp display - -; -; Set Quiet -; -qset: - call ptquiet ;pt to Quiet Flag - mvi m,0ffh ;set it - -; -; Display Quiet Flag -; -display: - call print - db ' - Quiet Flag is ',0 - call ptquiet ;pt to Quiet Flag - mov a,m ;get it - ora a ;0=reset - jz disres - call print - db 'Set (On)',0 - ret -disres: - call print - db 'Reset (Off)',0 - ret - -; -; Return with HL pting to Quiet Flag -; -ptquiet: - lhld envptr ;pt to environment - lxi d,28H ;offset to flag - dad d - ret - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/READ.ME b/Source/Images/d_bp/u15/READ.ME deleted file mode 100644 index 2db5f323..00000000 --- a/Source/Images/d_bp/u15/READ.ME +++ /dev/null @@ -1,434 +0,0 @@ - ZCPR3 Distribution Files, Phase 1 - - Richard Conn - - - - The following listings show all of the ZCPR3 Distribution Files -in Phase 1 of the distribution. All files are: - - Copyright(c) 1984 Richard Conn - All Rights Reserved - United States Copyright Pending - - The ZCPR3 System is released for non-commercial distribution within -the ZCPR2 and ZCPR3 user communities. No licenses are required for non- -commercial distribution. Licenses for commercial distribution (fee requested) -within marketed products are available from Echelon, Inc. See the References -section of the Installation Manual for details on how to contact Echelon, Inc. - - - -ZCPR3 Disk 1 -- - Filename.Typ Size Recs CRC Lines - 1 SYSENV .ASM 1K 5 4C5C 30 - 2 SYSENV .LIB 4K 26 CF64 135 - 3 SYSIOP .ASM 32K 254 1DCD 1220 - 4 SYSNDR .ASM 1K 3 3872 16 - 5 SYSNDR .LIB 2K 10 DA46 82 - 6 Z3BASE1 .LIB 9K 66 2C69 275 - 7 Z3BASE2 .LIB 8K 64 17AD 272 - 8 Z3HDR1 .LIB 19K 150 6B50 608 - 9 Z3HDR2 .LIB 19K 150 2C19 608 - 10 ZCPR3 .ASM 66K 522 2857 2906 - 11 ZCPR3 .INS 4K 28 52CF 160 - -ZCPR3 Disk 2 -- - Filename.Typ Size Recs CRC Lines - 1 SYSFCP .ASM 18K 137 7012 944 - 2 SYSRCP .ASM 44K 352 6315 2305 - 3 Z3TCAP .ASM 24K 189 3701 872 - Filename.Typ Size Recs CRC Lines - 4 SYSFCP1 .LIB 6K 43 C3BB 213 - 5 SYSFCP2 .LIB 6K 43 2324 213 - 6 SYSRCP1 .LIB 11K 81 F030 366 - 7 SYSRCP2 .LIB 11K 81 790C 367 - 8 SYSRCP3 .LIB 11K 81 52FB 366 - 9 SYSRCP4 .LIB 11K 81 871D 366 - - Filename.Typ Size Recs CRC - 1 SYSLIB .REL 21K 161 2921 - 2 VLIB .REL 2K 13 01A1 - 3 Z3LIB .REL 7K 56 61B8 - Filename.Typ Size Recs CRC - 4 Z3TCAP .TCP 7K 51 FB17 - -ZCPR3 Disk 3 -- - Filename.Typ Size Recs CRC Version - 1 ALIAS .COM 4K 30 82D4 1.1 - 2 CD .COM 1K 7 DA48 3.0 - 3 CMDRUN .COM 1K 2 21B5 N/A - 4 COMMENT .COM 1K 5 3C4A 2.0 - 5 CPSEL .COM 1K 8 CCAA 1.0 - 6 CRC .COM 6K 41 A89C 2.0 - 7 DEV .COM 2K 14 F755 1.0 - 8 DEVICE .COM 3K 17 153E 1.0 - 9 DIFF .COM 4K 25 45A7 2.0 - 10 DIR .COM 2K 16 9B8A 1.0 - 11 ECHO .COM 1K 4 F2D6 1.0 - 12 ERASE .COM 3K 20 E71E 5.0 - 13 ERROR1 .COM 2K 12 5EB7 1.0 - 14 ERROR2 .COM 3K 18 2F03 1.0 - 15 ERROR3 .COM 1K 5 8542 1.0 - 16 ERROR4 .COM 1K 5 86D1 1.0 - 17 ERRORX .COM 1K 3 F941 1.0 - 18 FINDF .COM 2K 14 D2A6 2.0 - 19 GOTO .COM 1K 6 6ADA 1.0 - 20 HELP .COM 3K 24 928B 5.0 - 21 HELPCK .COM 2K 16 F3B3 1.0 - 22 HELPPR .COM 5K 35 12E7 1.0 - 23 IF .COM 3K 18 418D 1.1 - 24 IFSTAT .COM 1K 3 6586 1.0 - 25 LDR .COM 3K 20 A14E 1.0 - 26 MCOPY .COM 4K 32 8341 4.0 - 27 MENU .COM 4K 27 8CED 3.2 - 28 MENUCK .COM 3K 20 3CDC 1.0 - 29 MKDIR .COM 6K 41 014B 3.0 - 30 NOTE .COM 1K 1 CB9E 1.0 - 31 PAGE .COM 5K 36 DF9F 2.0 - 32 PATH .COM 2K 10 E421 3.0 - 33 PRINT .COM 6K 42 0492 2.0 - 34 PROTECT .COM 4K 28 A130 3.0 - 35 PWD .COM 1K 8 2B9B 1.0 - 36 QUIET .COM 1K 4 DF6B 1.0 - 37 RECORD .COM 1K 8 C2B4 3.0 - 38 REG .COM 1K 8 1CC4 1.0 - 39 RENAME .COM 4K 27 A2F2 3.0 - 40 SAK .COM 1K 7 7842 2.0 - 41 SETFILE .COM 1K 4 00B2 1.0 - 42 SH .COM 4K 28 A89E 1.0 - 43 SHCTRL .COM 1K 7 E37A 1.0 - 44 SHDEFINE.COM 3K 23 0DEA 1.0 - 45 SHFILE .COM 1K 4 634F 1.0 - 46 SHOW .COM 8K 62 808A 1.0 - 47 SHVAR .COM 3K 23 4D89 1.0 - 48 SUB .COM 3K 20 59E5 3.0 - 49 TCCHECK .COM 2K 14 7235 1.0 - 50 TCMAKE .COM 6K 47 B3A0 1.0 - 51 TCSELECT.COM 3K 22 7C29 1.0 - 52 UNERASE .COM 2K 13 5057 1.0 - 53 WHEEL .COM 2K 11 0CD0 3.0 - 54 XD .COM 4K 28 465B 1.2 - 55 XDIR .COM 8K 62 7248 2.0 - 56 Z3INS .COM 2K 16 DFB7 1.0 - 57 Z3LOC .COM 1K 7 A908 1.0 - 58 ZEX .COM 6K 48 5E36 3.0 - -ZCPR3 Disk 4 -- - Filename.Typ Size Recs CRC Lines - 1 ALIAS .HLP 5K 35 9C58 166 - 2 CMDFILES.HLP 24K 192 4475 728 - 3 COMPARE .HLP 5K 33 26B6 148 - 4 DIRS .HLP 21K 166 29F5 602 - 5 HELP .HLP 1K 7 54CD 20 - 6 HELPSYS .HLP 29K 230 99DA 792 - 7 IF .HLP 13K 99 45A4 457 - 8 IO .HLP 12K 92 21E3 389 - 9 MENU .HLP 32K 253 9059 892 - 10 NDIRS .HLP 16K 122 33D7 439 - 11 SH .HLP 13K 101 6646 419 - 12 SYSRCP .HLP 6K 48 F633 231 - -ZCPR3 Disk 5 -- - Filename.Typ Size Recs CRC Lines - 1 Z3RES .HLP 8K 64 800E 221 - 2 Z3TCAP .HLP 40K 314 381F 1105 - 3 Z3UTIL1 .HLP 30K 234 4B2D 988 - 4 Z3UTIL2 .HLP 21K 166 D3E6 763 - 5 ZCPR3 .HLP 4K 30 666E 105 - -ZCPR3 Disk 6 -- - Filename.Typ Size Recs CRC Lines - 1 ALIAS .ZEX 2K 9 6DBE 63 - 2 ALIAS0 .MAC 8K 63 5072 431 - 3 ALIAS1 .MAC 10K 75 DB42 513 - 4 CD .MAC 3K 22 4202 151 - 5 CMDRUN .MAC 1K 7 F21D 50 - 6 COMMENT .MAC 4K 28 FF64 195 - 7 CPSEL .MAC 7K 52 2669 364 - 8 CRC .MAC 18K 141 15ED 914 - 9 DEV .MAC 9K 71 D980 492 - 10 DEVICE .MAC 11K 84 6EED 576 - 11 DIFF .MAC 15K 115 B983 724 - 12 DIR .MAC 7K 54 2227 373 - 13 ECHO .MAC 4K 28 824C 180 - 14 ERASE .MAC 10K 79 765E 492 - 15 ERROR1 .MAC 8K 57 7BF1 308 - 16 ERROR2 .MAC 9K 66 DFF6 367 - 17 ERROR3 .MAC 4K 27 85FA 153 - 18 ERROR4 .MAC 4K 31 D179 178 - 19 ERRORX .MAC 2K 9 7F9C 68 - 20 FINDF .MAC 22K 171 4220 1049 - 21 GOTO .MAC 4K 27 4536 203 - 22 HELP .MAC 25K 195 FF6A 1207 - 23 HELPCK .MAC 10K 77 A576 519 - 24 HELPPR .MAC 28K 219 CFB6 1380 - 25 IF .MAC 10K 77 F529 526 - 26 IFSTAT .MAC 2K 11 234E 85 - -ZCPR3 Disk 7 -- - Filename.Typ Size Recs CRC Lines - 1 LDR .MAC 11K 88 E5E0 552 - 2 MCOPY .MAC 22K 170 B694 1059 - 3 MENU .MAC 31K 241 D3F6 1509 - 4 MENUCK .MAC 11K 87 B04C 545 - 5 MKDIR .MAC 19K 145 64CB 981 - 6 NOTE .MAC 1K 7 986F 51 - 7 PAGE .MAC 24K 187 AEFF 1182 - 8 PATH .MAC 9K 69 7D6A 459 - 9 PRINT .MAC 28K 219 A093 1403 - 10 PROTECT .MAC 13K 97 E175 590 - 11 PWD .MAC 5K 37 DF00 248 - 12 QUIET .MAC 3K 17 FA09 138 - 13 RECORD .MAC 4K 30 4EE7 193 - 14 REG .MAC 5K 37 401A 266 - 15 RENAME .MAC 13K 103 C4F5 592 - 16 SAK .MAC 5K 38 62C2 244 - 17 SETFILE .MAC 2K 16 73D5 107 - 18 SHCTRL .MAC 3K 21 CAE6 147 - 19 SHOW .MAC 31K 247 8770 1752 - -ZCPR3 Disk 8 -- - Filename.Typ Size Recs CRC Lines - 1 SH .MAC 16K 125 768D 806 - 2 SHDEFINE.MAC 11K 87 396F 658 - 3 SHFILE .MAC 2K 15 3417 104 - 4 SHVAR .MAC 11K 88 6B60 655 - 5 SUB .MAC 23K 183 4AA9 1042 - 6 TCCHECK .MAC 5K 40 7079 280 - 7 TCMAKE .MAC 19K 148 A0C7 1084 - 8 TCSELECT.MAC 11K 87 927E 571 - 9 UNERASE .MAC 14K 110 A09A 726 - 10 WHEEL .MAC 4K 32 FFCF 217 - 11 XD .MAC 18K 144 B1B2 855 - 12 XDIR .MAC 38K 304 8B4B 1887 - 13 Z3INS .MAC 10K 80 7F27 539 - 14 Z3LOC .MAC 4K 30 3583 211 - 15 ZEX .ASM 45K 360 48BD 2194 - 16 ZEX .ZEX 4K 32 782C 180 - -ZCPR3 Disk 9 -- - Filename.Typ Size Recs CRC Lines - 1 Z3INS .IDX 4K 32 6044 232 - 2 Z3INS .SI 31K 241 836B 771 - 3 Z3INS .TOC 13K 101 D54E 207 - 4 Z3INS1 .SI 11K 85 30E0 267 - 5 Z3INS2 .SI 11K 88 2800 339 - 6 Z3INS3 .SI 55K 439 FCCF 1919 - 7 Z3INS4 .SI 28K 224 16D3 998 - 8 Z3INS5 .SI 5K 39 984C 153 - 9 Z3INS6 .SI 33K 259 D8A1 1014 - 10 Z3INS7 .SI 2K 12 F0A3 32 - 11 Z3INS8 .SI 5K 34 EB11 154 - -ZCPR3 Disk 10 -- - Filename.Typ Size Recs CRC Lines - 1 Z3USER .IDX 1K 3 9F34 30 - 2 Z3USER .SI 54K 428 7D58 1886 - 3 Z3USER .TOC 1K 6 1810 24 - - -SYSLIB3 Disk 1 -- - Filename.Typ Size Recs CRC Lines - 1 S0FILEIO.MAC 2K 12 6AA7 86 - 2 S1FILEIO.MAC 2K 12 29E9 86 - 3 S2FILEIO.MAC 2K 12 EE8F 86 - 4 S3FILEIO.MAC 2K 12 B0F6 86 - 5 SALLOC .MAC 3K 22 F78F 113 - 6 SBBLINE .MAC 3K 17 1D79 88 - 7 SBDOS .MAC 1K 4 D833 26 - 8 SBIN .MAC 1K 4 AC82 27 - 9 SBIOS .MAC 3K 17 241E 79 - 10 SBIST .MAC 1K 4 3522 28 - 11 SBLINE .MAC 3K 21 1871 98 - 12 SBOUT .MAC 1K 4 4DF6 30 - 13 SCAPIN .MAC 1K 4 DF2E 28 - 14 SCAPS .MAC 1K 4 22F3 24 - 15 SCAPSTR .MAC 1K 5 FCEA 35 - 16 SCATH .MAC 1K 5 A665 33 - 17 SCCOUT .MAC 2K 9 A488 59 - 18 SCIN .MAC 1K 7 47D4 43 - 19 SCLINE .MAC 2K 11 583E 57 - 20 SCLOUT .MAC 2K 9 2A8B 59 - 21 SCODEND .MAC 1K 8 4F9C 44 - 22 SCOMP .MAC 2K 10 C619 56 - 23 SCOMPHD .MAC 1K 4 67BE 27 - 24 SCONDIN .MAC 1K 6 6666 33 - 25 SCOUT .MAC 1K 7 0A76 46 - 26 SCPOUT .MAC 2K 9 F3B0 59 - 27 SCRC .MAC 3K 24 9649 120 - 28 SCRC1 .MAC 3K 24 7A5D 120 - 29 SCRC2 .MAC 3K 23 E929 118 - 30 SCRLF .MAC 1K 6 6CD3 42 - 31 SCST .MAC 1K 7 B601 45 - 32 SDIR .MAC 2K 15 D2C8 64 - 33 SDIR00 .MAC 2K 15 D5BC 64 - 34 SDIR01 .MAC 2K 12 C259 63 - 35 SDIR02 .MAC 3K 17 5193 104 - 36 SDIR03 .MAC 3K 17 D263 85 - 37 SDIR04 .MAC 2K 11 5228 62 - 38 SDIR05 .MAC 7K 56 754A 282 - 39 SDIR06 .MAC 10K 79 D1DF 423 - 40 SDIR07 .MAC 3K 17 4FA3 111 - 41 SDIR08 .MAC 2K 12 4F2F 65 - 42 SDIR09 .MAC 2K 14 75BA 83 - 43 SDIR10 .MAC 2K 13 3DE7 72 - 44 SDIRBF .MAC 1K 5 F2DC 31 - 45 SDIRQ .MAC 17K 136 6004 708 - 46 SDIRQS .MAC 20K 155 51F3 786 - 47 SEN .MAC 1K 3 F9CF 23 - 48 SEPRINT .MAC 1K 5 2A31 26 - 49 SEPSTR .MAC 2K 15 68B3 91 - 50 SEVAL .MAC 4K 25 13D5 146 - 51 SEVAL1 .MAC 2K 9 782D 66 - 52 SEVAL2 .MAC 2K 11 1BDC 74 - 53 SEVAL3 .MAC 2K 10 BD45 66 - 54 SEVAL4 .MAC 2K 9 10A5 58 - 55 SFCLOS .MAC 1K 4 710C 33 - 56 SFDEL .MAC 1K 4 BB5B 28 - 57 SFEXIST .MAC 1K 5 2C94 31 - 58 SFILEIO .MAC 9K 72 4F9C 418 - 59 SFILL .MAC 2K 10 A547 70 - 60 SFMAKE .MAC 1K 5 5A73 31 - -SYSLIB3 Disk 2 -- - Filename.Typ Size Recs CRC Lines - 1 SFNAME .MAC 5K 39 EB46 245 - 2 SFOPEN .MAC 2K 10 6B08 64 - 3 SFREAD .MAC 1K 4 3E4E 30 - 4 SFRENAME.MAC 2K 12 6A58 80 - 5 SFSIZE .MAC 2K 12 DCDF 91 - 6 SFWRIT .MAC 1K 4 67E3 30 - 7 SFXIO .MAC 9K 65 7928 406 - 8 SGFA .MAC 3K 20 DDA9 130 - 9 SGUA .MAC 1K 5 C628 43 - 10 SINITFCB.MAC 1K 8 FFE8 47 - 11 SINLINE .MAC 6K 44 4103 285 - 12 SINSTR .MAC 2K 12 3077 71 - 13 SISALNUM.MAC 1K 6 2867 40 - 14 SISALPHA.MAC 1K 6 02B4 41 - 15 SISCTRL .MAC 1K 6 533C 40 - 16 SISDIGIT.MAC 1K 6 EDAB 38 - 17 SISGRAPH.MAC 1K 6 EEF8 38 - 18 SISHEX .MAC 1K 6 1958 43 - 19 SISPRINT.MAC 1K 6 EC30 38 - 20 SISPUN .MAC 2K 9 0F59 58 - 21 SISSP .MAC 1K 8 7B4B 59 - 22 SLA2HC .MAC 1K 6 70AD 38 - 23 SLADC .MAC 2K 11 72AE 75 - 24 SLAFDC .MAC 2K 10 843B 62 - 25 SLCRLF .MAC 1K 6 A98A 42 - 26 SLFN1 .MAC 1K 6 A6FF 40 - 27 SLFN2 .MAC 1K 6 82BC 41 - 28 SLFN3 .MAC 1K 8 658E 54 - 29 SLHL4HC .MAC 1K 4 DBC3 28 - 30 SLHL5DC .MAC 2K 14 7961 93 - 31 SLHLFDC .MAC 2K 12 2F66 82 - 32 SLOUT .MAC 1K 7 4084 46 - 33 SLPRINT .MAC 1K 4 67D0 25 - 34 SLPSTR .MAC 2K 14 65D7 90 - 35 SMA2HC .MAC 1K 8 0DC7 40 - 36 SMADC .MAC 2K 14 016F 84 - 37 SMAFDC .MAC 2K 12 BEC3 70 - 38 SMFN1 .MAC 1K 6 3A43 42 - 39 SMFN2 .MAC 1K 6 C23B 45 - 40 SMFN3 .MAC 1K 8 002A 57 - 41 SMHL4HC .MAC 1K 5 9C15 28 - 42 SMHL5DC .MAC 3K 19 F0F5 115 - 43 SMHLFDC .MAC 2K 16 1C5D 108 - 44 SMOVE .MAC 3K 19 67FF 131 - 45 SMTH01 .MAC 1K 4 FD05 33 - 46 SMTH02 .MAC 1K 5 47EC 33 - 47 SMTH03 .MAC 1K 4 8800 30 - 48 SMTH04 .MAC 1K 4 FAD3 28 - 49 SMTH05 .MAC 1K 5 41F7 34 - 50 SMTH06 .MAC 1K 5 9661 34 - 51 SMTH07 .MAC 1K 3 78BD 26 - 52 SMTH08 .MAC 1K 3 AD88 26 - 53 SMTH09 .MAC 1K 3 3EC8 26 - 54 SMTH10 .MAC 1K 4 729D 34 - 55 SMTH11 .MAC 2K 13 7150 98 - 56 SMTH12 .MAC 2K 13 E277 95 - -SYSLIB3 Disk 3 -- - Filename.Typ Size Recs CRC Lines - 1 SPA2HC .MAC 1K 6 FD07 38 - 2 SPADC .MAC 2K 11 35AA 74 - 3 SPAFDC .MAC 2K 10 8746 62 - 4 SPAUSE .MAC 3K 23 A2B8 123 - 5 SPFN1 .MAC 1K 6 5BD1 40 - 6 SPFN2 .MAC 1K 6 6756 41 - 7 SPFN3 .MAC 1K 8 B9E6 54 - 8 SPHL4HC .MAC 1K 4 3F9B 28 - 9 SPHL5DC .MAC 2K 14 D706 92 - 10 SPHLFDC .MAC 2K 12 A7C8 82 - 11 SPOUT .MAC 1K 7 915C 46 - 12 SPRINT .MAC 1K 4 A2A3 25 - 13 SPSTR .MAC 2K 14 A7FD 90 - 14 SRAND .MAC 2K 13 476E 81 - 15 SRIN .MAC 1K 7 1844 43 - 16 SRREAD .MAC 2K 9 F01A 58 - 17 SRWRITE .MAC 2K 9 35C7 58 - 18 SSA2HC .MAC 1K 6 6057 38 - 19 SSADC .MAC 2K 11 1A64 75 - 20 SSAFDC .MAC 2K 10 B9F3 62 - 21 SSCANNER.MAC 2K 12 C2D3 73 - 22 SSCFA .MAC 2K 16 E939 117 - 23 SSCOUT .MAC 1K 6 0636 39 - 24 SSCRLF .MAC 1K 5 6327 33 - 25 SSCTLFL .MAC 1K 4 D7AB 21 - 26 SSFA .MAC 2K 16 9FAC 117 - 27 SSFN1 .MAC 1K 6 A43E 41 - 28 SSFN2 .MAC 1K 6 0E8D 42 - 29 SSFN3 .MAC 1K 8 C4B7 55 - 30 SSHL4HC .MAC 1K 4 4D97 28 - 31 SSHL5DC .MAC 2K 14 6FBA 93 - 32 SSHLFDC .MAC 2K 13 C39D 82 - 33 SSKPUN .MAC 1K 8 A057 48 - 34 SSKSP .MAC 1K 8 490D 48 - 35 SSORT .MAC 14K 111 E332 564 - 36 SSOUT .MAC 1K 5 CA1A 39 - 37 SSPRINT .MAC 1K 4 42CC 26 - 38 SSPSTR .MAC 2K 14 9D1B 89 - 39 SSUA .MAC 1K 6 EA5F 47 - 40 SUD1 .MAC 1K 8 635C 74 - 41 SUD2 .MAC 1K 5 589A 50 - 42 SUD3 .MAC 1K 6 A69A 50 - 43 SVERSION.MAC 1K 5 F1A9 30 - 44 SYSLIB .REL 21K 161 2921 N/A - 45 SYSLIB27.REL 14K 107 1C54 N/A - 46 SYSTEST .MAC 4K 26 C997 129 - 47 SYSTEST0.MAC 4K 29 B39E 194 - 48 SYSTEST1.MAC 3K 21 5D8C 114 - 49 SYSTEST2.MAC 4K 30 9E05 151 - 50 SYSTEST3.MAC 4K 26 92EA 148 - 51 SYSTEST4.MAC 6K 46 02CE 244 - 52 SYSTEST5.MAC 2K 16 2DAF 98 - 53 SYSTEST6.MAC 5K 35 A9F5 211 - 54 SYSTEST7.MAC 5K 36 5138 233 - -SYSLIB3 Disk 4 -- - Filename.Typ Size Recs CRC Lines - 1 SYS2-3 .TXT 9K 71 6B3B 239 - 2 SYSLIB .HLP 2K 9 8184 38 - 3 SYSLIB0 .HLP 14K 112 86FE 355 - 4 SYSLIB1 .HLP 20K 159 8FBB 588 - 5 SYSLIB2 .HLP 5K 33 6DD5 154 - 6 SYSLIB3 .HLP 15K 119 F85C 435 - 7 SYSLIB4 .HLP 12K 90 E7A6 390 - 8 SYSLIB5 .HLP 12K 90 F417 412 - 9 SYSLIB6 .HLP 8K 60 F45A 276 - 10 SYSLIB7 .HLP 6K 45 152C 266 - 11 SYSLIB8 .HLP 5K 37 3CA8 173 - 12 SYSLIB9 .HLP 3K 23 4292 82 - 13 SYSLIBA .HLP 7K 55 6442 192 - 14 SYSLIBB .HLP 5K 39 2009 126 - 15 SYSLIBC .HLP 9K 71 F96C 302 - 16 SYSLIBD .HLP 5K 33 489A 134 - 17 SYSLIBE .HLP 8K 62 55D3 232 - 18 SYSLIBF .HLP 4K 25 2A54 104 - 19 SYSLIBG .HLP 3K 21 EE4C 88 - 20 SYSLIBH .HLP 2K 14 6F02 67 - 21 SYSLIBI .HLP 6K 44 DC1E 158 - - diff --git a/Source/Images/d_bp/u15/RECORD.COM b/Source/Images/d_bp/u15/RECORD.COM deleted file mode 100644 index 7f8cd225..00000000 Binary files a/Source/Images/d_bp/u15/RECORD.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/RECORD.MAC b/Source/Images/d_bp/u15/RECORD.MAC deleted file mode 100644 index 6d84034a..00000000 --- a/Source/Images/d_bp/u15/RECORD.MAC +++ /dev/null @@ -1,194 +0,0 @@ -; -; PROGRAM: RECORD -; AUTHOR: RICHARD CONN -; VERSION: 3.0 -; DATE: 4 Apr 84 -; PREVIOUS VERSIONS: 1.3 (5 Jan 83), 1.4 (6 Jan 83) -; PREVIOUS VERSIONS: 1.0 (30 Dec 82), 1.1 (31 Dec 82), 1.2 (1 Jan 83) -; -VERS EQU 30 -z3env SET 0f400h - -; -; RECORD enables and disables the disk output redirectable I/O -; drivers for ZCPR2. This command takes two forms: -; -; RECORD ON <-- Turn on console recording -; RECORD OFF <-- Turn off console recording -; RECORD ON P <-- Turn on printer recording -; RECORD OFF P <-- Turn off printer recording -; - ext z3init,getiop - ext eprint - -fcb equ 5dh ;FCB Input -fcb2 equ 6dh ;FCB2 Input -cr equ 0dh -lf equ 0ah - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Start of Program -; - call getiop ;Check for I/O Driver Defn - mov a,h - ora l - jnz start0 - call banner - call eprint - db cr,lf,'Abort -- I/O Driver Address NOT Defined',0 - ret -start0: - call status ;Call Status Routine - jz nodriver ;No Driver Available? - cpi 80H ;MUST have Disk Driver Module (> 80H) Loaded - jnc start1 - call banner - call eprint - db cr,lf,'Abort -- Disk Driver Module NOT Loaded',0 - ret -nodriver: - call banner - call eprint - db cr,lf,'Abort -- No I/O Driver Module Loaded',0 - ret - -start1: - lda fcb ;Get first char - cpi 'O' ;Must be O - jnz help - lda fcb+1 ;Get 2nd char - cpi 'N' ;ON? - jnz off -on: - lda fcb2 ;Printer? - cpi 'P' - jnz on1 - call banner - call eprint - db ' ++ TTY Recording ON ++',0 - call lopen ;LST - ret -on1: - call banner - call eprint - db ' ++ CRT Recording ON ++',0 - call copen ;CRT - ret -off: - lda fcb2 ;Printer? - cpi 'P' - jnz off1 - call lclose ;Close Output - call banner - call eprint - db ' ++ TTY Recording OFF ++',cr,lf,0 - ret -off1: - call cclose ;Close Output - call banner - call eprint - db ' ++ CRT Recording OFF ++',cr,lf,0 - ret -; -; Print Help Message -; -help: - call banner - call eprint - db cr,lf - db cr,lf,'RECORD turns on and off recording of screen displays' - db cr,lf,'on disk under ZCPR3 with the SYSIO Redirectable I/O ' - db 'Drivers' - db cr,lf,'engaged.' - db cr,lf - db cr,lf,'It is invoked by two forms:' - db cr,lf - db cr,lf,' RECORD ON or RECORD ON PRINTER' - db cr,lf,' RECORD OFF or RECORD OFF PRINTER' - db cr,lf - db cr,lf,'Minimum Required Option Forms are ON, OF, and P:' - db cr,lf,' RECORD ON P = RECORD ON PRINTER' - db cr,lf,'If the P option is given, then TTY output is ' - db 'recorded,' - db cr,lf,'else CRT output is recorded.' - db cr,lf,0 - ret - -; -; I/O Driver Interface Routines -; -status: - push h ;Save HL - push d ;Save DE - lxi d,0 ;No Offset for Status -runio: - call getiop ;Get I/O Base Address - dad d ;Pt to Routine - pop d ;Restore DE - xthl ;Restore HL and Place Address on Stack - ret ;"Run" Routine -copen: - push h ;Save Regs - push d - lxi d,36 ;Offset for Console Open Routine - jmp runio ;Run Routine -cclose: - push h ;Save Regs - push d - lxi d,39 ;Offset for Console Close Routine - jmp runio -lopen: - push h ;Save Regs - push d - lxi d,42 ;Offset for Printer Open Routine - jmp runio -lclose: - push h ;Save Regs - push d - lxi d,45 ;Offset for Printer Close Routine - jmp runio - -; -; Print Banner -; -banner: - call eprint - db 'RECORD, Version ' - db (vers/10)+'0','.',(vers mod 10)+'0',0 - ret - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/REG.COM b/Source/Images/d_bp/u15/REG.COM deleted file mode 100644 index 97f426b8..00000000 Binary files a/Source/Images/d_bp/u15/REG.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/REG.MAC b/Source/Images/d_bp/u15/REG.MAC deleted file mode 100644 index b5b3f441..00000000 --- a/Source/Images/d_bp/u15/REG.MAC +++ /dev/null @@ -1,267 +0,0 @@ -; -; Program: REG -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; REG is used to access the ZCPR3 Registers. It can set a value, -; display a value or all values, increment, and decrement them. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -fcb equ 5ch -fcb2 equ 6ch -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext z3init,getreg,putreg,getmsg - ext eval10,print,cout,crlf,qprint,padc - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment -; -; Print Banner -; - call qprint - db 'REG, Version ' - db (version/10)+'0','.',(version mod 10)+'0',cr,lf,0 -; -; Check for Availability of Registers -; - call getmsg - jz nomsg -; -; Check for Command -; - lxi h,fcb+1 ;pt to first FCB - mov a,m ;get first char - cpi ' ' ;check for help - jz help - cpi '/' ;also help - jz help - cpi '#' ;display all - jz dispall - cpi 'D' ;display - jz display - cpi 'M' ;minus (decrement) - jz minus - cpi 'P' ;plus (increment) - jz plus - cpi 'S' ;set - jz setrg - cpi '0' ;convert to binary - jc help - cpi '9'+1 ;range? - jnc help - jmp disp1 - -; -; Print Error Message -; -nomsg: - call print - db cr,lf,'No Registers Available',0 - ret - -; -; Print Help Message -; -help: - call print - db cr,lf,'REG - Set/Display/Increment/Decrement Registers' - db cr,lf,'REG Syntax:' - db cr,lf,' REG Dr or REG r <-- Display Reg r' - db cr,lf,' REG Mr <-- Minus (Decrement) Reg r' - db cr,lf,' REG Pr <-- Plus (Increment) Reg r' - db cr,lf,' REG Sr val <-- Set Reg r to val' - db cr,lf,'where "r" may be 0-9 for the regs or' - db cr,lf,'# to select all regs' - db 0 - ret -; -; Display Register -; -display: - inx h ;pt to value - mov a,m ;get it -disp1: - cpi '#' ;display all? - jz dispall -; -; Display Particular Register -; - call compreg ;compute register number in B - call getreg ;return register value in A -; -; Print Register whose Number is in B and Value in A -; -regprint: - mov c,a ;value in C - call print - db ' Reg ',0 - mov a,b - adi '0' ;convert to ASCII - call cout - call print - db ' = ',0 - mov a,c ;print value - jmp padc -; -; Display All Registers -; -dispall: - mvi b,0 ;loop 0 to 9 -dispa1: - call getreg ;get register - call regprint ;print register - call print - db ' ',0 - inr b ;increment count - mov a,b ;check for new line - ani 3 - cz crlf - mov a,b ;check for done - cpi 10 - jnz dispa1 - ret -; -; Convert ASCII Char in A to Register Number in B with error check -; -compreg: - cpi '0' ;convert to binary - jc rerr - cpi '9'+1 - jnc rerr - sui '0' ;convert to binary - mov b,a ;return value in B - ret -rerr: - mov b,a ;save char - pop psw ;clear stack - call print - db ' Invld Reg ID: ',0 - mov a,b ;get char - jmp cout -; -; Set Register Value -; -setrg: - inx h ;pt to register - mov a,m ;get char - cpi '#' ;all registers? - jz setall - call compreg ;get register number in B - lxi h,fcb2+1 ;pt to value - call eval10 ;evaluate - mov c,a ;save value in C - call putreg ;set register - jmp regprint ;print value -; -; Set All Registers -; -setall: - lxi h,fcb2+1 ;pt to value - call eval10 - mov c,a ;value in C - mvi b,0 ;set 10 registers -seta1: - mov a,c ;get value - call putreg ;set value - inr b ;increment reg number - mov a,b - cpi 10 - jnz seta1 - jmp dispall ;display all registers -; -; Reg = Reg - 1 -; -minus: - inx h ;pt to number - mov a,m ;get it - cpi '#' ;all? - jz minall - call compreg ;compute register number - call getreg ;get register - dcr a ;-1 - call putreg ;restore register - jmp regprint ;print result -; -; All Registers - 1 -; -minall: - mvi b,0 ;set loop -mina1: - call getreg ;get register - dcr a ;-1 - call putreg ;restore register - inr b ;count - mov a,b ;done? - cpi 10 - jnz mina1 - jmp dispall ;display all regs -; -; Reg = Reg + 1 -; -plus: - inx h ;pt to register - mov a,m ;get it - cpi '#' ;all? - jz plusall - call compreg ;compute value - call getreg ;get value - inr a ;+1 - call putreg ;put value - jmp regprint ;print value -plusall: - mvi b,0 ;set counter -plusa1: - call getreg ;increment value - inr a - call putreg - inr b ;count - mov a,b - cpi 10 - jnz plusa1 - jmp dispall ;print reg values - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/RENAME.COM b/Source/Images/d_bp/u15/RENAME.COM deleted file mode 100644 index 8d3a83c5..00000000 Binary files a/Source/Images/d_bp/u15/RENAME.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/RENAME.MAC b/Source/Images/d_bp/u15/RENAME.MAC deleted file mode 100644 index 9144ddb6..00000000 --- a/Source/Images/d_bp/u15/RENAME.MAC +++ /dev/null @@ -1,593 +0,0 @@ -; PROGRAM: RENAME -; VERSION: 3.0 -; DATE: 18 MAY 84 -; AUTHOR: RICHARD CONN -; PREVIOUS VERSIONS: 2.0 (16 JAN 83) -; PREVIOUS VERSIONS: 1.4 (6 JAN 83), 1.3 (7 DEC 82), 1.2 (10 NOV 82) -; PREVIOUS VERSION: RENAME.ASM Version 1.1 (26 OCT 81) -VERS equ 30 -z3env SET 0f400h - -; -; RENAME Command -- -; RENAME is used to change the name of one or more files. Unlike -; the ZCPR2-resident REN function, RENAME permits ambiguous file names -; and supports an Inspect mode that allows the user to confirm each -; rename before it is done. Additionally, there is a Control Mode which -; allows the user to manually specify the name for each file as it is -; presented to him. -; -; The RENAME command may be of the following forms: -; RENAME dir:afn1=afn2,dir:afn3=afn4,... o -; RENAME dir:afn,dir:afn1=afn2,... o -; The first form shows elements of the form -; dir:afn1=afn2 -; while the second form shows elements of the form -; dir:afn -; which is the same as -; dir:afn=afn -; and only makes sense if Control Mode is used. -; -; The option characters (o) are none or more of the following: -; C -- Control Mode; manually specify each new name -; I -- Inspect and approve each rename -; S -- Include SYStem files -; -; Examples: -; RENAME *.MAC=*.ASM <-- Rename all ASM files to MAC -; RENAME *.MAC C <-- Rename all MAC files to names -; input by the user -; RENAME *.OBJ=*.COM SI <-- Rename all COM files to OBJ -; and include SYStem files -; and Inspect and approve each -; change -; - -FALSE EQU 0 -TRUE EQU NOT FALSE - -ESIZE EQU 16 ; SIZE OF DIR ENTRY (FROM SYSLIB DIRF ROUTINE) - - EXT DIRQ ; DIRECTORY PROCESSOR - - EXT Z3INIT ; INIT BUFFERS - EXT ZFNAME ; FILE NAME PROCESSOR - EXT Z3LOG ; Z3 DU LOG - - EXT F$DELETE ; DELETE FILE - EXT F$RENAME ; RENAME FILE - EXT BBLINE ; INPUT LINE EDITOR - EXT INITFCB ; INIT FCB - EXT BDOS ; BDOS ENTRY - EXT PUTUD ; SAVE CURRENT USER/DISK - EXT GETUD ; RESTORE CURRENT USER/DISK - EXT MOVEB ; COPY ROUTINE - EXT PHLDC ; PRINT HL AS DECIMAL CHARS - EXT PRINT ; PRINT ROUTINE - EXT COUT ; CONSOLE OUTPUT ROUTINE - EXT CIN ; CONSOLE INPUT ROUTINE - EXT CAPS ; CAPITALIZE ROUTINE - EXT CRLF ; NEW LINE ROUTINE - EXT FILLB ; FILL ROUTINE - EXT CODEND ; CODE END COMPUTATION ROUTINE - -; -; CP/M EQUATES -; -CPM EQU 0 ; WARM BOOT -FCB EQU 5CH ; FCB -BUFF EQU 80H ; INPUT LINE BUFFER -CR EQU 13 ; -LF EQU 10 ; - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - LXI H,0 ; GET STACK PTR - DAD SP - SHLD STACK ; SAVE IT - CALL CODEND - SHLD CMDLNE ; SETUP COMMAND LINE BUFFER - LXI D,100H ; BUFFER SIZE - DAD D - SHLD NTFCB ; SET TEMP FCB - DAD D - SHLD DIRBUF ; PTR TO DIR BUFFER - SPHL ; NEW SP - LHLD NTFCB ; SET 2ND FCB - LXI D,40 - DAD D - SHLD OFCB - - CALL PUTUD ; SAVE CURRENT USER/DISK AWAY - - CALL PRINT - DB 'RENAME Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0',0 - LDA FCB+1 ; GET FIRST CHAR OF FILE NAME - CPI ' ' ; NO FILE SPEC? - JZ HELP - CPI '/' ; OPTION CAUGHT? - JNZ ECONT - -; PRINT HELP INFORMATION -HELP: - CALL PRINT - DB CR,LF,'Syntax:' - DB CR,LF,' RENAME dir:afn1=afn2,afn3=afn4,... o...' - DB CR,LF,'Options:' - DB CR,LF,' C -- Control Mode (Allow user to manually name each ' - DB 'file)' - DB CR,LF,' I -- Inspect Mode (Give user approval option)' - DB CR,LF,' S -- Include SYS files' - DB CR,LF - DB 0 - -; RETURN TO OS -RETURN: - LHLD STACK ; GET OLD STACK - SPHL ; SET IT - RET - -; COPY BUFFER INTO TEMP BUFFER -ECONT: - LHLD CMDLNE ; PT TO COMMAND LINE SAVE BUFFER - XCHG ; ... IN DE - LXI H,BUFF+1 ; PT TO BUFFER - MVI B,80H ; BUFFER SIZE - CALL MOVEB ; COPY INTO COMMAND LINE BUFFER - -; EXTRACT FLAGS IF PRESENT - XRA A ; SET NO INSPECT, NO R/O, AND NO SYSTEM FILES - STA INSPECT - STA CONTROL ; SET NO CONTROL MODE - MVI A,80H ; SELECT NON-SYS FILES ONLY - STA SYSTEM - LXI H,0 ; SET FILE COUNT - SHLD FILECNT - LHLD CMDLNE ; PT TO BUFFER -; SKIP TO FILE NAME STRING -SBLANK: - MOV A,M ; SKIP TO NON-BLANK - CPI ' ' ; ? - JNZ SBL1 - INX H ; PT TO NEXT CHAR - JMP SBLANK -; SKIP TO END OF FILE NAME STRING -SBL1: - MOV A,M ; SKIP TO OR EOL - ORA A ; DONE? - JZ OPT - CPI ' ' ; - JZ OPT - INX H ; PT TO NEXT - JMP SBL1 -; CHECK FOR LEADING SLASH ON OPTION AND SKIP IT IF SO -OPT: - CPI '/' ; OPTION CHAR? - JNZ OPTION - INX H ; SKIP SLASH -; PROCESS LIST OF OPTIONS -OPTION: - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ DSPEC - INX H ; PT TO NEXT CHAR - CPI ' ' ; SKIP OVER SPACES - JZ OPTION - CPI '/' ; IF OPTION LETTER, OBVIOUS ERROR, SO HELP - JZ HELP - CPI 'C' ; CONTROL? - JZ OPTCTRL - CPI 'I' ; INSPECT? - JZ OPTINS - CPI 'S' ; SYSTEM FILES? - JNZ HELP - MVI A,0C0H ; SET FOR SYS FILES - STA SYSTEM - JMP OPTION -OPTCTRL: - MVI A,0FFH ; CONTROL MODE - STA CONTROL - JMP OPTION -OPTINS: - MVI A,0FFH ; INSPECT - STA INSPECT - JMP OPTION - -; EXTRACT DISK, USER, AND FILE NAME INFORMATION -DSPEC: - LHLD CMDLNE ; PT TO BEFORE FIRST BYTE - DCX H -DSPEC0: - INX H ; PT TO BYTE - MOV A,M ; GET BYTE - ORA A ; DONE? - JZ HELP - CPI ' ' ; ? - JZ DSPEC0 -; -; MAJOR REENTRY POINT WHEN FILE SPECS ARE SEPARATED BY COMMAS -; HL PTS TO FIRST BYTE OF NEXT FILE SPEC -; -DSPEC1: - CALL GETUD ; RESET USER IF NECESSARY - PUSH H - LHLD NTFCB - XCHG ; PT TO FCB IN DE - POP H - MVI A,0 ; DIR BEFORE DU - CALL ZFNAME ; EXTRACT FILE NAME INTO FCB, AND GET DISK AND USER - SHLD NEXTCH ; SAVE PTR TO DELIMITER WHICH ENDED SCAN - PUSH H - LHLD NTFCB - XCHG ; PT TO FCB IN DE - POP H - CALL Z3LOG ; LOG INTO DU - -; FIRST NAME IS NOW EXTRACTED -- EXTRACT POSSIBLE SECOND NAME -NAME2: - LHLD OFCB ; PT TO FCB FOR 2ND NAME - XCHG - LHLD NTFCB ; PT TO FIRST NAME - MVI B,16 ; COPY 16 BYTES - CALL MOVEB - LHLD NEXTCH ; PT TO CHAR WHICH ENDED PARSE - MOV A,M ; GET IT - CPI '=' ; ASSIGNMENT? - JNZ RENAME ; GO AHEAD IF NOT - INX H ; PT TO CHAR AFTER '=' - PUSH H - LHLD OFCB ; PT TO TEMP FCB - XCHG ; ... IN DE - POP H - MVI A,0 ; DIR BEFORE DU - CALL ZFNAME ; EXTRACT FILE NAME INTO FCB, AND GET DISK AND USER - SHLD NEXTCH ; SAVE PTR TO DELIMITER WHICH ENDED SCAN - -; LOAD DIRECTORY AND RENAME FILES -RENAME: - LHLD OFCB - XCHG ; PT TO FCB - LHLD DIRBUF ; PT TO END OF CODE - CALL INITFCB ; INIT THE FCB - LDA SYSTEM ; SET FLAGS - CALL DIRQ ; LOAD DIR, SELECT FILES, PACK, AND ALPHABETIZE - -; REN DIR FILES; HL PTS TO FIRST FILE, BC=FILE COUNT - CALL RENFILES - -; CHECK FOR NEXT FILE SPEC - LHLD NEXTCH ; GET PTR - MOV A,M ; GET DELIM - CPI ',' ; ANOTHER FILE? - JNZ RENDONE - INX H ; PT TO CHAR AFTER COMMA - JMP DSPEC1 ; CONTINUE PROCESSING - -; RENAME COMPLETE -- PRINT COUNT AND EXIT -RENDONE: - CALL PRCOUNT ; PRINT FILE COUNT - JMP RETURN - -; RENAME SELECTED FILES -RENFILES: - MOV A,B ; CHECK FOR ANY FILES LOADED - ORA C - RZ - -; PRINT FILE NAME -RENLP: - PUSH B ; SAVE ENTRY COUNT - CALL PRINT - DB CR,LF,'Rename ',0 - PUSH H ; SAVE PTR TO FCB - LHLD NTFCB ; COPY NEW TEMPLATE INTO RENFCB - LXI D,RENFCB - MVI B,16 - CALL MOVEB - POP H ; GET PTR - PUSH H ; SAVE PTR - INX H ; PT TO FN OF OLD NAME - INX D ; PT TO FN OF RENFCB - MVI B,11 ; 11 BYTES TO FN AND FT -RENLP1: - LDAX D ; GET CHAR OF NEW - CPI '?' ; CHANGE '?' TO OLD CHAR - JNZ RENLP2 - MOV A,M ; GET OLD CHAR - ANI 7FH ; MASK OLD CHAR - STAX D ; STORE IT AWAY AS NEW -RENLP2: - INX H ; PT TO NEXT CHAR - INX D - DCR B ; COUNT DOWN - JNZ RENLP1 - LXI H,RENFCB ; PT TO NEW NAME - CALL PRFN ; PRINT FILE NAME - CALL PRINT - DB ' from ',0 - POP H ; GET PTR TO OLD FILE NAME - PUSH H ; SAVE IT AGAIN - CALL PRFN ; PRINT FILE NAME - POP H ; GET PTR - -; CHECK FOR CONTROL MODE AND PERFORM CONTROL FUNCTION IF SET - LDA CONTROL ; GET FLAG - ORA A ; NZ=YES - JNZ RENCTRL - -; CHECK FOR INSPECTION AND INSPECT IF SET - LDA INSPECT ; GET FLAG - ORA A ; 0=NO - JZ DOIT - -; PROMPT USER FOR RENAME - CALL RENQ ; REN QUESTION - CPI 'Q' ; QUIT? - JZ QUIT - CPI 'Y' ; YES? - JZ DOIT - -; DON'T RENAME FILE -NODO: - CALL PRINT - DB CR,LF,'NO Name Change',0 - JMP RENTEST - -; PRINT FILE NAME PTED TO BY HL -PRFN: - INX H ; PT TO FILE NAME - MVI B,8 ; PRINT NAME - CALL PRNT - MVI A,'.' ; DECIMAL - CALL COUT - MVI B,3 ; PRINT TYPE - CALL PRNT - RET - -; PROMPT USER FOR RENAME -RENQ: - CALL PRINT ; PRINT PROMPT - DB ' -- Rename (Y/N/Q=Quit)? ',0 - CALL CIN ; GET RESPONSE - CALL CAPS ; CAPITALIZE - CALL COUT ; ECHO - RET - -; CONTROL FUNCTION -- ALLOW USER TO RENAME AS HE DESIRES -RENCTRL: - PUSH H ; SAVE PTR TO FILE -RCTRL: - CALL PRINT - DB CR,LF,' -- New Name (=No Change)? ',0 - MVI A,0FFH ; CAPITALIZE - CALL BBLINE ; INPUT LINE FROM USER - ORA A ; CHECK FOR JUST - JNZ RCTRL0 - POP H ; GET PTR TO FILE - JMP RENTEST ; PROCEED WITH NEXT ENTRY -RCTRL0: - LXI D,RENFCB ; PLACE INTO NEW NAME FCB - CALL ZFNAME ; JUST EXTRACT NAME - MVI B,11 ; CHECK FOR ANY WILD CHARS -RCTRL1: - INX D ; PT TO NEXT CHAR - LDAX D ; GET IT - CPI '?' ; CAN'T BE WILD - JZ WERR - CPI '*' ; CAN'T BE WILD - JZ WERR - DCR B ; COUNT DOWN - JNZ RCTRL1 - JMP RDOIT ; DONE -- PERFORM RENAME -WERR: - CALL PRINT - DB CR,LF,'Wild Card (?,*) in Name -- Try Again',0 - JMP RCTRL - -; QUIT RENAME PROGRAM -QUIT: - CALL PRCOUNT ; PRINT COUNT OF FILES RENAMED - CALL PRINT - DB ' QUIT',0 - JMP RETURN - -; REN FILE, BUT GET PTR FIRST -RDOIT: - POP H ; GET PTR - -; RENAME FILE; OLD NAME PTED TO BY HL, NEW NAME IN RENFCB -DOIT: - PUSH H -; STEP 1 -- DETERMINE IF NEW NAME ALREADY EXISTS - LXI D,RENFCB ; PT TO NEW NAME - CALL INITFCB - MVI C,17 ; SEARCH FOR FIRST - CALL BDOS - INR A ; NOT FOUND? - JZ DOIT1 - CALL PRINT - DB CR,LF,' -- File Exists -- Delete It (Y/N)? ',0 - CALL CIN ; GET RESPONSE - CALL CAPS - CALL COUT - POP H ; PREP FOR ABORT - CPI 'Y' ; YES -- CONTINUE? - JNZ RENTEST ; NOT YES, SO SKIP IT -; DELETE OLD FILE, SO SET ATTRIBUTES AND DO IT - PUSH H ; SAVE PTR AGAIN - CALL INITFCB ; CLEAR FCB - MVI C,30 ; SET FILE ATTRIBUTES TO R/W IF NOT ALREADY - CALL BDOS - CALL INITFCB - CALL F$DELETE ; DELETE FILE -DOIT1: - POP H ; HL PTS TO OLD NAME -; CLEAR THE OLD NAME'S ATTRIBUTES IN CASE IT WAS R/O - PUSH H ; SAVE PTR TO OLD NAME - PUSH H - LHLD OFCB ; COPY OLD NAME - XCHG - POP H - MVI B,16 - CALL MOVEB - PUSH D ; CLEAR ATTRIBUTES - MVI B,11 ; 11 BYTES - INX D ; PT TO FIRST -DOIT2: - LDAX D ; GET CHAR - ANI 7FH ; CLEAR ATT - STAX D ; PUT CHAR - INX D ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ DOIT2 - POP D ; NOW SET ATTRIBUTES OF OLD NAME - CALL INITFCB - MVI C,30 ; SET ATTRIBUTES - CALL BDOS - CALL INITFCB -; DO THE RENAME - LXI H,RENFCB ; PT TO NEW NAME - XCHG - CALL INITFCB ; INIT NEW FCB - XCHG ; HL PTS TO NEW NAME, DE PTS TO OLD NAME - CALL F$RENAME ; RENAME THE FILE -; RESTORE THE ORIGINAL ATTRIBUTE BITS - POP H ; GET PTR TO OLD NAME - LXI D,RENFCB+1 ; PT TO NEW NAME - PUSH H ; SAVE PTR TO OLD NAME - INX H ; PT TO FN OF OLD NAME - XCHG ; HL PTS TO NEW NAME, DE PTS TO OLD NAME - MVI B,11 ; 11 BYTES -DOIT3: - LDAX D ; GET ATTRIBUTE BIT OF OLD NAME - ANI 80H ; LOOK ONLY AT ATTRIBUTE BIT - ORA M ; MASK IN NEW NAME BYTE - MOV M,A ; STORE IT AWAY - INX H ; PT TO NEXT - INX D - DCR B ; COUNT DOWN - JNZ DOIT3 -; SET THE ORIGINAL ATTRIBUTES INTO THE NEW FILE - LXI D,RENFCB ; PT TO FCB - CALL INITFCB - MVI C,30 ; SET ATTRIBUTES - CALL BDOS - LHLD FILECNT ; INCREMENT FILE COUNT - INX H - SHLD FILECNT - POP H ; GET PTR TO DIRECTORY ENTRY - -; PT TO NEXT ENTRY -RENTEST: - LXI D,ESIZE ; PT TO NEXT ENTRY - DAD D - POP B ; GET COUNT - DCX B ; COUNT DOWN - MOV A,B ; CHECK FOR ZERO - ORA C - JNZ RENLP - -; RETURN TO CALLER - RET - -; -; PRINT CHARS PTED TO BY HL FOR B BYTES -; -PRNT: - MOV A,M ; GET CHAR - CALL COUT - INX H ; PT TO NEXT - DCR B ; COUNT DOWN - JNZ PRNT - RET - -; -; PRINT COUNT OF NUMBER OF FILES RENAMED -; -PRCOUNT: - CALL CRLF ; NEW LINE - LHLD FILECNT ; GET COUNT - MOV A,L ; CHECK FOR NONE - ORA H - JZ PRNO - CALL PHLDC ; PRINT DECIMAL COUNT - JMP PRMS -PRNO: - CALL PRINT - DB 'No ',0 -PRMS: - LHLD FILECNT ; 1 FILE PROTECTED? - MOV A,H ; HIGH ZERO? - ORA A - JNZ PRMULT - MOV A,L ; LOW ONE? - CPI 1 - JZ PRSING -PRMULT: - CALL PRINT - DB ' Files Renamed',0 - RET -PRSING: - CALL PRINT - DB ' File Renamed',0 - RET - -; -; BUFFERS -; -INSPECT: - DS 1 ; INSPECT FLAG (0=NO, 0FFH=YES) -CONTROL: - DS 1 ; CONTROL FLAG (0=NO, 0FFH=YES) -SYSTEM: - DS 1 ; SYSTEM FLAG (80H=NON-SYS, 0C0H=SYS/NON-SYS) -NEXTCH: - DS 2 ; PTR TO NEXT CHAR IN MULTIFILE COMMAND LINE -FILECNT: - DS 2 ; COUNT OF NUMBER OF FILES RENAMED -RENFCB: - DS 40 ; FCB FOR RENAME -OFCB: - DS 2 ; FCB FOR OLD FILE NAME AND OLD FILE TEMPLATE -NTFCB: - DS 2 ; FCB FOR NEW FILE TEMPLATE -CMDLNE: - DS 2 ; PTR TO COMMAND LINE BUFFER -DIRBUF: - DS 2 ; PTR TO DIRECTORY BUFFER -STACK: - DS 2 ; OLD STACK PTR - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/RENAME31.LBR b/Source/Images/d_bp/u15/RENAME31.LBR deleted file mode 100644 index 88e4345f..00000000 Binary files a/Source/Images/d_bp/u15/RENAME31.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/SAK.COM b/Source/Images/d_bp/u15/SAK.COM deleted file mode 100644 index 0c31b43c..00000000 Binary files a/Source/Images/d_bp/u15/SAK.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SAK.MAC b/Source/Images/d_bp/u15/SAK.MAC deleted file mode 100644 index df404124..00000000 --- a/Source/Images/d_bp/u15/SAK.MAC +++ /dev/null @@ -1,245 +0,0 @@ -; PROGRAM: SAK (Strike Any Key) -; AUTHOR: Richard Conn -; VERSION: 2.0 -; DATE: 18 May 84 -; PREVIOUS VERSIONS: 1.0 (18 Apr 83) -vers equ 20 -z3env SET 0f400h - -; -; SAK (Strike Any Key) is used for the following purposes: -; 1) to wait for user interaction before continuing -; and to allow the user to abort a Multiple -; Command Line -; 2) to command the user's attention by ringing the -; bell at his console -; -; The SAK command line is: -; SAK o... -; SAK is invoked with the following options: -; A -- DO NOT Allow the User to Abort MCL -; B -- Ring Bell -; Pnnnn -- Pause nnnn seconds and continue if no -; response by that time -; - ext z3init,wait1s,getcl1,qprint,qcrlf - ext strtzex,stopzex,putzex - ext pstr,print,condin,eval10,cout - -tbuff equ 80h ;command line buffer -cr equ 0dh -lf equ 0ah -ctrlc equ 'C'-'@' -ctrlg equ 'G'-'@' - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; Init Options and Parse and Interpret Command Line -; - xra a ;turn options off - sta mpflag ;turn off message printed flag - sta bell ;turn off bell - sta delay ;turn off delay (pause) - sta delay+1 - mvi a,0ffh ;turn options on - sta abortf ;turn on abort - lxi h,tbuff+1 ;pt to command line -spskp: - mov a,m ;skip leading spaces - inx h - cpi ' ' - jz spskp - dcx h ;pt to char - cpi '/' ;option? - jnz optdone - inx h ;skip option char -opt: - mov a,m ;get option letter - ora a ;done? - jz optdone - inx h ;pt to next - cpi ' ' ;process text - jz optdone - cpi 'A' ;abort? - jz optabort - cpi 'B' ;bell? - jz optbell - cpi 'P' ;pause? - jz optpause - call print - db 'SAK, Version ' - db (vers/10)+'0','.',(vers mod 10)+'0' - db cr,lf,'Syntax:' - db cr,lf,' SAK /o... text -or- SAK text' - db cr,lf,'Options:' - db cr,lf,' A -- DO NOT Allow the User to Abort' - db cr,lf,' B -- Ring the Bell' - db cr,lf,' Pnnnn -- Pause nnnn seconds and then resume' - db 0 - ret -; -; Process A option (Abort MCL) -; -optabort: - xra a ;turn off abort - sta abortf - jmp opt -; -; Process B option (Ring Bell) -; -optbell: - mvi a,0ffh ;turn on bell - sta bell - jmp opt -; -; Process Pnnnn option (Pause nnnn seconds) -; -optpause: - call eval10 ;convert argument to decimal value in DE - xchg ;HL contains value - shld delay - xchg ;HL pts to next char - jmp opt -; -; Continue Command Processing -; -optdone: - mov a,m ;any message? - ora a - jz optdn1 - sta mpflag ;set message printed flag - call print ;new line - db ' --> ',0 - call pstr ;print message - call print - db ' <-- ',0 -optdn1: - call stopzex ;suspend ZEX processing - lhld delay ;get delay count in HL -; -; Main Delay Loop -; -sakloop: -; -; Ring Bell if Option Selected -; - lda bell ;get flag - ora a ;set zero flag - cnz bout ;ring bell and delay -; -; Get character if one is available -; - call condin ;optionally get character - jnz gotchar ;process character -; -; Loop if No Delay -; - mov a,h ;check for no delay - ora l - jz sakloop -; -; Delay and test for input -; - call wait1s ;delay 1 sec - dcx h ;count down - mov a,h ;done? - ora l - jnz sakloop -; -; Process Input Character -; If no input and timout instead, A=0 for continuation character -; -gotchar: - cpi ctrlc ;abort? - jz abort -resume: - lda mpflag ;message printed? - ora a ;0=no - cnz qcrlf ;new line if yes - call qprint - db 'Resuming ...',0 - jmp strtzex ;resume ZEX processing -; -; Abort Multiple Command Line if there is one -; -abort: - lda abortf ;abort allowed? - ora a ;0=no - jz resume - call getcl1 ;get address of command line buffer - mov a,h ;any buffer? - ora l - jz abort1 - mov e,m ;get address of next char - inx h - mov d,m - xchg ;HL pts to next char - mvi m,0 ;set no further command -abort1: - lda mpflag ;message printed? - ora a ;0=no - cnz qcrlf ;new line if yes - call qprint - db 'Aborting ...',0 - jmp strtzex ;resume ZEX processing -; -; Ring Bell and Delay Briefly -; -bout: - mvi a,ctrlg ;ring bell - call cout - push h ;save HL - lhld delay ;do not delay if pause already invoked - mov a,h ;zero delay? - ora l - jnz bout1 ;skip delay - call wait1s ;delay -bout1: - pop h - ret - -; -; Other Buffers -; -abortf: - ds 1 ;abort flag -bell: - ds 1 ;bell flag -delay: - ds 2 ;delay constant -mpflag: - ds 1 ;message printed flag - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SETFILE.COM b/Source/Images/d_bp/u15/SETFILE.COM deleted file mode 100644 index 033c8540..00000000 Binary files a/Source/Images/d_bp/u15/SETFILE.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SETFILE.MAC b/Source/Images/d_bp/u15/SETFILE.MAC deleted file mode 100644 index be2cddc4..00000000 --- a/Source/Images/d_bp/u15/SETFILE.MAC +++ /dev/null @@ -1,108 +0,0 @@ -; -; Program: SETFILE -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; SETFILE defines the name of a ZCPR3 File Name or displays it. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -fnum equ 5ch+1 ;file number in 1st FCB -fcb equ 6ch ;2nd FCB -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext z3init,getfn1,print,pfn1,moveb,qprint,cout - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment and Print Banner -; - call z3init ;initialize the ZCPR3 Environment - call qprint - db 'SETFILE, Version ' - db (version/10)+'0','.',(version mod 10)+'0',cr,lf,0 -; -; Check Number of File -; - lxi h,0 ;init count - lxi d,11 ;size of each file name - lda fnum ;get number - sui '0' ;convert to binary - jc error - jz error - cpi 5 ;range? - jc selfile -; -; Print Error Message -; -error: - call print - db ' Invalid File Name Number (not 1-4)',0 - ret -; -; Set Name of File -; -selfile: - dad d ;compute offset from file name 1 - dcr a ;count down - jnz selfile - xchg ;DE contains offset - call getfn1 ;get ptr to shell file name - dad d ;get ptr to file name selected - lxi d,fcb+1 ;pt to name in FCB - xchg ;copy from FCB - mvi b,11 ;11 bytes - mov a,m ;get first char - cpi ' ' ;don't define if no name - cnz moveb ;define name if name given -; -; Print Name of Shell Variable File -; - call print - db ' File Name ',0 - lda fnum ;get number - call cout ;print it - call print - db ' is ',0 - jmp pfn1 - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SF.COM b/Source/Images/d_bp/u15/SF.COM deleted file mode 100644 index 0404612e..00000000 Binary files a/Source/Images/d_bp/u15/SF.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SF.Z80 b/Source/Images/d_bp/u15/SF.Z80 deleted file mode 100644 index c9a984fe..00000000 --- a/Source/Images/d_bp/u15/SF.Z80 +++ /dev/null @@ -1,46 +0,0 @@ -; -; SFILER Demo - Simple VFILER by Richard Conn -; This program demonstrates the SFILEH from the new high-order -; components library SFILER. Any program can have a built-in -; VFILER-like capability as easily as it is done in this program. -; -; Assembly instructions: -; 1) assemble SF.Z80 to produce SF.REL; command: -; ZAS SF -; 2) link in the proper libraries to create SF.COM; command: -; ZLINK SF,SFILER/,VLIB/,Z3LIB/,SYSLIB/ -; Installation instructions: -; SF can be installed in the standard way; command: -; Z3INS SYS.ENV SF.COM -; -z3env equ 0f400h ; address of env desc - - ext z3vinit ; must use Z3VINIT for TCAP - ext codend ; free space - ext sfileh ; entry point -; -; Standard ZCPR 3.0 header -; - jp start - db 'Z3ENV' - db 1 -z3eadr: dw z3env -; -; Start of program -; -start: - ld hl,(z3eadr) ; get address - call z3vinit - call codend ; determine start of free space -; -; At this point, the initialization required to run SFILEH is done: -; 1) HL contains the address of the start of the free space area -; after the end of this program -; 2) the FCB at 5CH is properly initialized with file name (space -; filled if wild) and a ZCPR 3.0 - standard DU reference -; (at FCB+0 for the disk and FCB+13 for the user area) -; - call sfileh ; run SFILER module - ret - - end diff --git a/Source/Images/d_bp/u15/SH.COM b/Source/Images/d_bp/u15/SH.COM deleted file mode 100644 index a4c67fe5..00000000 Binary files a/Source/Images/d_bp/u15/SH.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SH.HLP b/Source/Images/d_bp/u15/SH.HLP deleted file mode 100644 index f2aea0aa..00000000 --- a/Source/Images/d_bp/u15/SH.HLP +++ /dev/null @@ -1,420 +0,0 @@ -; - - SH - A Named Variable Shell for ZCPR3 - - - -- The Shell SH -- -- Handling Shell Variables -- - S - The SH Command D - SHDEFINE - C - SH Concept V - SHVAR - P - Potential Probs - -- SH Variable File -- - F - SHFILE - - -:S - -Command: SH 1.0 - -Syntax: - - SH - -Function: - - SÈ ió á Nameä Variablå Shelì foò ZCPR3® Iô promptó thå -useò  foò á commanä line¬  performó aî interpretatioî oî thå -commanä line¬ anä eitheò executeó thå commanä linå itselæ oò -passes the line on to the ZCPR3 Command Processor. - -Options: - - None - - -Comments: - Variables - SÈ  permitó  thå  useò tï  uså  Nameä  Variables¬  likå -MYFILE¬  whicè arå expandeä iî á manneò similaò tï macroó iî -hió commanä lines®  Twï programs¬ SHDEFINÅ anä SHVAR¬ allo÷ -thå  useò  tï dynamicallù creatå Nameä  Variables¬  anä  thå -SHFILÅ  commanä  allowó  Nameä Variablå  definitionó  tï  bå -grouped into sets of variables. - - Á  conventionaì CP/Í commanä linå coulä looë  somethinç -likå this: - - ED MYFILE.TXT - - Using SH, a ZCPR3 command line like Variables - - ED %WORKFILE - -caî bå generated¬  and¬  aó SÈ substituteó thå definitioî oæ -thå  variablå WORKFILÅ wheî iô interpretó thå commanä  line¬ -"EÄ  %WORKFILE¢  coulä bå expandeä intï "EÄ  MYFILE.TXT¢  iæ -WORKFILE=MYFILE.TXT®  Bù changinç thå valuå oæ thå variablå -WORKFILE¬  thå  meaninç  oæ thå commanä  "EÄ  %WORKFILE¢  ió -correspondinglù changed. - - Oncå  SÈ  ió invokeä (bù typinç thå  commanä  SH)¬  anù -commanä typeä bù thå useò ió passeä thrõ SÈ first¬  expandeä -aó required¬  anä then¬ iæ thå commanä ió noô aî SH-residenô -command¬  thå  expandeä commanä linå ió passeä tï ZCPR³  foò -processing. - - SÈ  variableó maù bå nesteä tï anù  depth®  Recursion¬ -however¬  shoulä bå avoided¬ anä iô ió thå responsibilitù oæ -thå useò tï ensurå thaô recursioî doeó noô occur. - Variables - '%%§  ió  interpreteä  bù  SÈ  aó  á  singlå  '%'®  SÈ -variableó are assigneä aó follows: - - VAR1 = "ED %%VAR2" VAR2 = "MYFILE.TXT" - -VAR1 is expanded as - - "ED %VAR2" - -which is, in turn, expanded as - - "ED MYFILE.TXT" - -which is finally executed by being passed to ZCPR3. - - SH Commands - There are three SH-resident commands: - - SHCMT - switch SH to run in comment mode; in - comment mode, all lines which - do not begin with the character - ! are treated as comments and - flushed - SHECHO - with Echo enabled, all expanded command - lines are printed to the user to - show him what the line looked like - after expansion - SHEXIT - SH is popped from the Shell Stack, - enabling the next lower Shell for - execution - - The normal prompt for SH is: Comment Mode - - DU:NAME>> - -as opposed to: - - DU:NAME> - -foò  ZCPR3®  Iæ thå SHCMÔ (SÈ Comment© facilitù ió enabled¬ -this prompt becomes: - - DU:NAME; - - Anù  texô  issueä bù thå useò oò á commanä  filå  (likå -ZEX©  wilì  bå  processeä  aó á  commenô  unlesó  thå  firsô -characteò oæ thå linå ió aî exclamatioî marë (!)¬  whicè  ió -an indicator to process the command text that follows. - - Thå commanä SHCMÔ switcheó tï commenô mode¬  anä !SHCMÔ -switches back. - Built-in Cmds - Thå  SHECHÏ  commanä  ió alsï á  toggle¬  enablinç  anä -disablinç thå echï oæ commanä lineó afteò alì variableó havå -been resolved. - - Thå SHEXIÔ commanä causeó thå Shelì Stacë tï bå  poppeä -onå  level¬  whicè  iî  turî  causeó  thå  SÈ  Shelì  tï  bå -terminated since it was on the top of the stack. - - Botè  SHECHÏ anä SHEXIÔ caî bå executeä froí SÈ Commenô -mode by prefixing these commands with an exclamation mark. - - Thå ¿  commanä (á linå beginninç witè á quesitoî  mark© -invokeó  thå  built-iî  helð facilitù oæ  SH¬  whicè  simplù -reminds the user of what the built-in commands are for SH. - - Other Shells - SÈ   ió  jusô  beginninç  oæ  thå  ZCPR³  Shelì   Stacë -applications® MENÕ anä VFILEÒ arå botè shelló now¬ anä theù -executå likå SH® Alì threå shelló caî pasó commanä lineó tï -ZCPR3¬  havå  ZCPR³  executå  theså commandó iî  itó  normaì -fashion¬  completå  witè thå command-searcè  hierarchy¬  anä -theî  returî tï thå appropriatå shelló wheî done®  Á  Shelì -imposeó  á  ne÷ initiaì commanä linå interpretatioî  oî  thå -inpuô commanä line. - - -Selected Error Messages: - - "Nï Shelì Stack¢ meanó thaô á Shelì Stacë haó noô  beeî -installed in the ZCPR3 System and SH cannot run. - - "Shelì  Stacë Full¢ meanó thaô therå ió noô enougè rooí -on the Shell Stack for SH to push itself and SH cannot run. - - "Shelì  Stacë  Entrù Size¢ meanó thaô thå  shelì  stacë -entrieó  arå  toï shorô foò SÈ tï definå thå  parameteró  iô -needs to control its operation. SH cannot run. - -Examples of Use: - - SH - -- SH is invoked - -:D - -Command: SHDEFINE 1.0 - -Syntax: - - SHDEFINE ufn <-- define variables within file -or - SHDEFINE <-- define variables within SH.VAR - -Function: - - SHDEFINÅ  allowó thå useò tï interactivelù displaù  anä -ediô  thå assignmenô oæ variableó iî á Shelì Variablå  file® -Hå maù add¬  delete¬ anä redefinå Shelì Variableó aó welì aó -lisô alì currenô definitionó oî thå CRÔ oò prinô theí oî thå -printer. - -Options: - - None - -Comments: - - Uså oæ SHDEFINÅ ió explaineä withiî thå prograí itself® -Iô  ió menu-driveî anä thå erroò anä instructionaì  messageó -arå intended to be clear. - - Thå  mosô compleø commanä ió thå Å (foò Edit©  command® -Afteò  issuinç  thió command¬  thå useò ió  prompteä  foò  á -variablå  name®  Iæ hå giveó thå namå oæ á variablå noô yeô -defined¬  thå  useò ió prompteä foò á  definition¬  anä  thå -variablå ió sï defineä unlesó thå useò respondeä witè jusô á -RETURΠ aô  thió  point®  Iæ thå namå oæ thå  variablå  haó -alreadù  beeî  defined¬  thå useò ió askeä iæ hå  wisheó  tï -deletå (D© oò redefinå (R© thå variable® Appropriatå actioî -is taken in response to the user input. - - The user must be a Wheel to run the SHDEFINE command. - - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - SHDEFINE myvars - -- define variables in MYVARS.VAR - -:F - -Command: SHFILE 1.0 - -Syntax: - - SHFILE <-- display name of Shell Variable File -or - SHFILE ufn <-- set name of Shell Variable File - -Function: - - SHFILÅ displayó oò setó thå namå oæ thå Shelì  Variablå -Filå  tï bå useä bù SH®  SHFILÅ maù bå executeä whilå SÈ ió -not running if desired. - -Options: - - None - - -Comments: - - SHDEFINÅ  anä SHVAÒ definå variableó tï bå placeä  intï -Shelì Variablå Files®  SHFILÅ defineó whicè Shelì  Variablå -File will be used by SH when it executes. - - Wheî SÈ anä SHVAÒ execute¬ thå nameä variablå filå theù -deaì witè resideó iî thå ROOÔ directory. - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - SHFILE - -- display name of Shell Variable File - - SHFILE myvars.var - -- define name of Shell Variable File - -:V - -Command: SHVAR 1.0 - -Syntax: - - SHVAR <-- list variables -or - SHVAR var <-- delete variable -or - SHVAR var text <-- define/redefine variable - -Function: - - SHVAÒ  ió á utilitù whicè caî lisô alì Shelì  Variableó -iî  thå  currently-defineä Shelì Variablå Filå oò ediô  thió -filå tï deletå oò changå onå particulaò variablå aô á  time® -SHVAÒ  ió  sometimeó morå convenienô tï uså  thaî  SHDEFINE¬ -whicè  ió  intendeä foò editinç groupó oæ variableó  iî  onå -sitting. - - -Options: - - None - -Comments: - - SHVAÒ maù bå useä whilå runninç SÈ oò not®  Iæ á Shelì -Variablå Filå ió alreadù defineä tï thå ZCPR³ System¬  SHVAÒ -uses this file. If one is not defined, SHVAR uses SH.VAR. - - SH.VAR is always located in the ROOT directory. - - The user must be a Wheel to run SHVAR. - -Selected Error Messages: - - Self-Explanatory - - -Examples of Use: - - SHVAR - -- list shell variables - - SHVAR VAR2 - -- delete the variable VAR2 - - SHVAR VARX THIS IS A TEST - -- define VARX to "THIS IS A TEST" - -:C - - SH Concept - - Oncå  SÈ  ió invokeä (bù typinç thå  commanä  SH)¬  anù -commanä typeä bù thå useò ió passeä thrõ SÈ first¬  expandeä -aó required¬  anä then¬ iæ thå commanä ió noô aî SH-residenô -command¬  thå  expandeä commanä linå ió passeä tï ZCPR³  foò -processing. - - SÈ  variableó maù bå nesteä tï anù  depth®  Recursion¬ -however¬  shoulä bå avoided¬ anä iô ió thå responsibilitù oæ -thå  useò  tï  ensurå thaô recursioî  doeó  noô  occur®  Iæ -recursioî doeó occur¬  thå commanä linå buffeò wilì overflo÷ -and SH will abort the command line. - - - SÈ  Variableó  arå  referenceä  iî  commanä  lineó   aó -"%varname"¬  anä  '%%§ ió interpreteä bù SÈ aó á singlå '%'® -Tï  illustrate¬  assumå  thaô SÈ variableó arå  assigneä  aó -follows: - - VAR1 = "ED %%VAR2" VAR2 = "MYFILE.TXT" - -The command line "%VAR1" is expanded as - - "ED %VAR2" - -which is, in turn, is expanded as - - "ED MYFILE.TXT" - -which is finally executed by being passed to ZCPR3. - - - Shelì  Variablå Fileó arå locateä iî thå ROOÔ directorù -for the commands SH and SHVAR. - - Thå  useò  musô  bå  á Wheeì iî  ordeò  tï  ediô  Shelì -Variablå Files®  Thå commandó SHDEFINÅ anä SHVAÒ wilì  onlù -run if the user is a Wheel. - - - There are three SH-resident commands: - - SHCMT - switch SH to run in comment mode; in - comment mode, all lines which - do not begin with the character - ! are treated as comments and - flushed - SHECHO - with Echo enabled, all expanded command - lines are printed to the user to - show him what the line looked like - after expansion - SHEXIT - SH is popped from the Shell Stack, - enabling the next lower Shell for - execution - - The normal prompt for SH is: - - DU:NAME>> - -as opposed to: - - DU:NAME> - -foò  ZCPR3®  Iæ thå SHCMÔ (SÈ Comment© facilitù ió enabled¬ -this prompt becomes: - - DU:NAME; - - Anù  texô  issueä bù thå useò oò á commanä  filå  (likå -ZEX©  wilì  bå  processeä  aó á  commenô  unlesó  thå  firsô -characteò oæ thå linå ió aî exclamatioî marë (!)¬  whicè  ió -an indicator to process the command text that follows. - - Thå commanä SHCMÔ switcheó tï commenô mode¬  anä !SHCMÔ -switches back. - - Thå  SHECHÏ  commanä  ió alsï á  toggle¬  enablinç  anä -disablinç thå echï oæ commanä lineó afteò alì variableó havå -been resolved. - - Thå SHEXIÔ commanä causeó thå Shelì Stacë tï bå  poppeä -onå  level¬  whicè  iî  turî  causeó  thå  SÈ  Shelì  tï  bå -terminated since it was on the top of the stack. - - Botè  SHECHÏ anä SHEXIÔ caî bå executeä froí SÈ Commenô -mode by prefixing these commands with an exclamation mark. - - Thå ¿  commanä (á linå beginninç witè á quesitoî  mark© -invokeó  thå  built-iî  helð facilitù oæ  SH¬  whicè  simplù -reminds the user of what the built-in commands are for SH. - -:P - - Potential Problems - - Onlù onå noteä probleí existó witè SH®  Certaiî ZCPR3- -residenô  anä  SYSRCP-residenô commandó shoulä  bå  avoided® -Theså commandó include: - - GO - because the TPA has been changed since - the desired command executed - - SAVE - same reason - - SÈ   tendó  tï  bå  á  littlå  slo÷  iî  itó   loading® -Unfortunately¬  SÈ  haó  beeî madå aó smalì aó possiblå  anä -wilì  probablù  continuå  tï  takå  morå  timå  thaî  simplù -invoking the ZCPR3 command processor directly. - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SH.MAC b/Source/Images/d_bp/u15/SH.MAC deleted file mode 100644 index c85a4a65..00000000 --- a/Source/Images/d_bp/u15/SH.MAC +++ /dev/null @@ -1,807 +0,0 @@ -; -; Program: SH -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; - -; -; This program illustrates the design of a simple shell under ZCPR3 -; using Z3LIB. This program is transportable from one ZCPR3 system to another -; provided it is reassembled with the correct address for the ZCPR3 -; Environment Descriptor (Z3ENV) or DDT is used to patch this address -; (which is the first two bytes after the opening JMP). If an external -; ZCPR3 Environment Descriptor is not available, one will have to be -; provided by setting the Z3ENV equate to 0 and providing SYSENV.LIB in -; the current directory at assembly time. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -lecnt equ 20 ;number of pointers on String Ptr Stack -ctrlz equ 'Z'-'@' ;^Z for EOF -cmdch equ '!' ;in comment mode, invoke following text as command -cmtch equ ';' ;comment character -subch equ '%' ;substitution flag -fcb equ 5ch -tbuff equ 80h -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext getshm,putshm - ext getud,putud,logud,initfcb,f$open,f$read,f$close - ext parser,codend,caps,fillb,hmovb,root,getfn1,pfn1 - ext retud,print,pafdc,bbline,moveb,crlf,cout,sksp,dutdir - ext z3init,getsh2,shpush,shpop,qshell,getefcb,putcl,putcst,putzex - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment -; -; Set Pointers -; - call codend ;find scratch area - shld intline ;set ptr to internal line buffer - lxi d,200H ;reserve 200H bytes - dad d - shld varlist ;set ptr to variable list - xra a - sta loadfl ;say variables not loaded -; -; Check for Shell Stack -; - call getsh2 ;get shell status - jnz start0 ;skip over shell init - call print - db 'No Shell Stack',0 - ret -; -; See if this program was invoked as a shell -; -start0: - call qshell ;find out from ZCPR3 environment - jz shell ;do not push onto stack if invoked as a shell -start1: -; -; Clear Shell Message for Comment Flag -; - mvi b,0 ;message 0 - xra a ;A=0 to clear - call putshm ;set message -; -; Set Name of Shell Variable File if One is Given -; - call getfn1 ;pt to buffer in env - lxi d,fcb+1 ;pt to name - xchg ;copy from name - mvi b,11 ;11 bytes - mov a,m ;check for name - cpi ' ' ;no name if space - jz defname - call moveb ;copy if name present - call setshdef ;set default file type - jmp setshn -; -; Set Name of SH.VAR File -; -defname: - call getfn1 ;get name - lxi d,shvfcb+1 ;pt to FCB - xchg - mvi b,11 ;11 chars - call moveb -; -; Set Name of Shell from External FCB if Possible or From Default if Not -; -setshn: - call root ;get root address - lxi h,shdisk ;pt to shell disk - mov a,b ;get disk - adi 'A' ;convert to letter - mov m,a ;set disk letter - inx h ;pt to user 10's - mov a,c ;get user number - mvi b,10 ;subtract 10's - mvi d,'0' ;set char -setshn1: - sub b ;subtract - jc setshn2 - inr d ;increment digit - jmp setshn1 -setshn2: - add b ;get 1's - mov m,d ;set 10's digit for user - inx h ;pt to 1's digit - adi '0' ;compute 1's digit - mov m,a ;set 1's digit - call getefcb ;get ptr to external fcb - jz start2 ;no external FCB, so use default name - inx h ;pt to program name - lxi d,shname ;pt to string - mvi b,8 ;8 chars - call moveb ;copy into buffer -; -; Push Name of Shell onto Stack -; -start2: - lxi h,shdisk ;pt to name of shell - call shpush ;push shell onto stack - jnz start3 -; -; Shell Successfully Installed -; - call print - db 'Shell Installed',0 - ret -; -; Shell Stack Push Error -; -start3: - cpi 2 ;shell stack full? - jnz start4 -; -; Shell Stack is Full -; - call print - db 'Shell Stack Full',0 - ret -; -; Shell Stack Entry Size is too small for command line -; -start4: - call print - db 'Shell Stack Entry Size',0 - ret -; -; Restart on Empty Line -; -shellr: - call crlf ;new line -; -; Print Shell Prompt -; -shell: - call retud ;get current user and disk - mov a,b ;save disk - adi 'A' - call cout ;print disk letter - mov a,c ;get user - call pafdc ;print A as floating decimal - call dutdir ;convert into DIR reference if possible - jz shell1 ;no match - mvi a,':' ;print colon - call cout - mvi b,8 ;8 chars max -shell0: - mov a,m ;get char - inx h ;pt to next - cpi ' ' ;space? - cnz cout - jnz shell0 -shell1: - mvi b,0 ;get shell message 0 - call getshm - ani 1 ;test for prompt - jz shell2 ;print normal prompt - call print ;comment format - db '; ',0 ;comment - jmp shell3 -shell2: - call print ;normal format - db '>> ',0 ;double prompt -; -; Accept User Input -; -shell3: - mvi a,1 ;tell ZEX that prompt is up - call putzex - xra a ;don't capitalize - call bbline - mvi a,0 ;say that normal processing is running now - call putcst - call putzex - call sksp ;skip over leading spaces - mvi b,0 ;get shell message 0 - call getshm - ani 1 ;test for comment - jz shell4 ;process normally -; -; Process Shell Input as Comment -; - mov a,m ;get char - cpi cmdch ;command override? - jnz shellr ;continue with next line if not - inx h ;pt to command and fall thru to process -; -; Process Shell Command -; -shell4: - mov a,m ;get first char - ora a ;no line? - jz shellr - cpi cmtch ;comment line? - jz shellr -; -; Check for and Process Shell-Resident Command -; - push h ;save HL - call shcommand ;check for shell command - pop h ;restore HL -; -; Expand Shell Command Line -; - call expand ;expand line pted to by HL - jz clovfl ;abort if overflow -; -; Load Multiple Command Line -; - call putcl ;place command line pted to by HL into CL Buffer - rnz ;resume ZCPR3 processing -; -; Input Line is Longer than Command Line Buffer -; -clovfl: - call print ;command line buffer has overflowed - db cr,lf,'CL Ovfl ',0 - jmp shellr -; -; Expand Shell Command Line (pted to by HL), performing variable -; Substitutions -; -; On exit, Z=command line overflow and Line Pted to by HL -; -expand: - push b ;save counter - mvi b,0 ;get shell register 0 - call getshm - ani 2 ;test for echo - cnz crlf ;new line if SHECHO is ON - pop b ;get counter - xchg ;DE pts to line -; -; Init String Pointer Stack -; - mvi a,lecnt ;set local element count - sta locelt - lxi h,locstk ;set local stack - shld locadr - lxi h,0 ;set done code on stack - call locpush ;push HL -; -; Set Ptrs -; - lhld intline ;pt to internal line - xchg ;DE pts to internal line, HL pt next char - mvi b,0 ;256 chars max -; -; Analyze Next Char -; -exp1: - mov a,m ;get next char - cpi subch ;substitution char? - jnz exp2 ;handle normally -; -; Process Shell Variable -; - call expvar ;resolve variable - dcr c ;error? - jz exp1 ;resume if none -; -; Store Next Char -; -exp2: - stax d ;store char -; -; Print Char if SHECHO is ON -; - push b ;save counter - mov c,a ;save char - mvi b,0 ;get shell message 0 - call getshm ;determines if display is on - ani 2 ;test for echo - jz exp3 - mov a,c ;get char - ani 7FH ;mask and don't output null - cnz cout ;echo char -; -; Advance to Next Char -; -exp3: - mov a,c ;get char - pop b ;get counter - inx h ;pt to next - inx d - dcr b ;count down - jz experr ;error if at 0 - ora a ;done? - jnz exp1 - inr b ;increment count (not counting last 0) - dcx d ;pt to 0 in case of abort -; -; Pop String Ptr Stack and Check for Analysis Complete -; - call locpop ;get ptr to previous string - mov a,h ;done? - ora l - jnz exp1 ;resume - dcr a ;set NZ -; -; Expansion Complete -; On entry, Z Flag is Set Accordingly (Z=Error) -; -experr: - lhld intline ;pt to internal line - ret - -; -; Expand Variable -; Return with HL pting to next char, A=char, C=1 if OK, C=2 if error -; -expvar: - shld varptr ;save ptr to variable - inx h ;get next char - mvi c,2 ;prep for error return - mov a,m ;get it - ora a ;EOL? - rz - cpi subch ;double sub char? - rz ;place one sub char in line if so -; -; Place Variable Into SHVAR -; - push b ;save counter - push d ;save ptr to next char - push h ;save ptr to shell variable - lxi h,shvar ;pt to shell variable buffer - mvi b,8 ;8 chars max - mvi a,' ' ;space fill - call fillb - xchg ;DE pts to shell variable buffer - pop h ;pt to shell variable - mvi b,8 ;8 chars max -; -; Place Shell Variable into Buffer -; -expv1: - mov a,m ;get char - call delck ;check for delimiter - jz expv3 ;done if delimiter - stax d ;save char - inx h ;pt to next - inx d - dcr b ;count down - jnz expv1 -; -; Flush Overflow of Shell Variable -; -expv2: - mov a,m ;get char - inx h ;pt to next - call delck ;check for delimiter - jnz expv2 - dcx h ;pt to delimiter -; -; Shell Variable in buffer SHVAR -; HL pts to delimiter after variable in user line -; -expv3: - call locpush ;stack ptr to next char in current string - jz expv4 ;error in stack - call varload ;load shell variable list - jz expv4 ;failure - call namer ;resolve named variable reference - mvi c,1 ;OK - jz expv5 ;name found - resolve -; -; Shell Variable Not Resolved - Restore Ptr to It -; -expv4: - call locpop ;restore ptr - mvi c,2 ;error - lhld varptr ;pt to variable -; -; Entry Point for OK Return -; -expv5: - mov a,m ;get char - pop d ;pt to target - pop b ;get counter - ret - -; -; Push HL onto String Ptr Stack -; Return with Z if Stack Overflow -; -locpush: - lda locelt ;get count - dcr a ;full? - rz - sta locelt ;set count - push d ;save DE - xchg ;DE pts to old string - lhld locadr ;get ptr to top of stack - mov m,e ;store low - inx h - mov m,d ;store high - inx h ;pt to next - shld locadr - xchg ;restore HL - pop d ;restore DE - xra a ;return NZ - dcr a - ret -; -; Pop HL from String Ptr Stack -; -locpop: - push d - lda locelt ;increment element count - inr a - sta locelt - lhld locadr ;get address - dcx h ;pt to high - mov d,m ;get high - dcx h ;pt to low - mov e,m ;get low - shld locadr ;set address - xchg ;restore ptr - pop d - ret - - -; -; Load Shell Variable List -; -varload: - push h ;save regs - push d - push b - lda loadfl ;already loaded? - ora a ;NZ=yes - jnz varl3 - lhld varlist ;clear varlist in case of error - mvi m,ctrlz -; -; Look for Variable File -; - call getfn1 ;pt to file name of SH.VAR - lxi d,shvfcb+1 - mvi b,11 ;11 bytes - call moveb - call putud ;save current location - call root ;determine DU of root - call logud ;goto root - lhld varlist ;pt to named variable list - lxi d,shvfcb ;try to open file - call initfcb ;init FCB - call f$open - jz varl1 -; -; Variable File Not Found -; - call getud ;return home - xra a ;set not found code - pop b ;restore regs - pop d - pop h - ret -; -; Read in Variable File -; -varl1: - lxi d,shvfcb ;read in file - call f$read - jnz varl2 - lxi d,tbuff ;pt to data - xchg ;copy into memory - mvi b,128 ;128 bytes - call hmovb - xchg - jmp varl1 -varl2: - lxi d,shvfcb ;close file - call f$close - call getud ;return home -; -; Say List is Already Loaded -; -varl3: - xra a ;return NZ for OK - dcr a - sta loadfl ;set loaded flag - pop b ;restore regs - pop d - pop h - ret - -; -; Resolve Named Variable Reference -; On input, SHVAR contains the shell variable name and -; CODEND pts to the list of shell variables, terminated by ^Z; -; if found, return with HL pting to name and Z -; -namer: - lhld varlist ;pt to variable list -namer1: - mov a,m ;get char - cpi ctrlz ;end of list? - jz namex - lxi d,shvar ;pt to shell variable name - mvi b,8 ;8 chars -namer2: - ldax d ;get name - cmp m ;match? - jnz nomatch - inx h ;pt to next - inx d - dcr b ;count down - jnz namer2 - ret ;found! -nomatch: - mov a,m ;flush to end of string - inx h ;pt to next - ora a - jnz nomatch - jmp namer1 ;resume search -; -; Search Failed -; -namex: - ora a ;return NZ (^Z in A) - ret -; -; Check to see if char in A is a delimiter -; Return with Z if so -; -delck: - push h ;pt to table - push b ;save BC - call caps ;capitalize char - mov b,a ;char in B - lxi h,dtable ;pt to delimiter table -delck1: - mov a,m ;get delimiter - ora a ;done? - jz notdel - cmp b ;compare - jz yesdel - inx h ;pt to next - jmp delck1 -notdel: - mov a,b ;get char - ora a ;set Z if null, else NZ -yesdel: - mov a,b ;restore char - pop b ;restore regs - pop h - ret - -; -; Delimiter Table -; -dtable: - db '<>;:,.=-_ ',0 - -; -; Check for Shell Command and Process if Found -; HL pts to command line -; -shcommand: - xra a ;DIR before DU - call parser ;parse command line pted to by HL - inx d ;pt to name - lxi h,ctable ;pt to command table -shcmd: - mov a,m ;get first char of next entry - ora a ;done? - rz - mvi b,8 ;commands are 8 chars long - push h ;save ptr to FCB - push d ;save ptr to table entry -shcmd1: - ldax d ;compare - cmp m - jnz shcmd2 - inx h ;pt to next - inx d - dcr b ;count down - jnz shcmd1 -; -; Command Found - Get Address -; - mov a,m - inx h - mov h,m - mov l,a ;HL is address -; -; Clear Stack and Run -; - pop psw ;clear stack - pop psw - pop psw ;clear return address - pop psw ;clear pushed HL - pchl ;"run" command -; -; Command Not Found Yet -; -shcmd2: - pop d ;restore ptrs - pop h - lxi b,10 ;advance to next command - dad b - jmp shcmd ;resume search - -; -; If File Type not Specified, Set Default -; -setshdef: - call getfn1 ;check for file type - lxi d,8 ;pt to file byte - dad d - xchg - lxi h,shvtype ;default file type - mvi b,3 ;3 chars - ldax d ;get char - cpi ' ' ;set if space - cz moveb ;copy - ret -; -; Pop Current Shell -; -shexit: - call print - db cr,lf,'Exiting Shell',0 - jmp shpop ;clear shell stack entry - -; -; Toggle Shell Comment Mode -; -shcomment: - mvi b,0 ;access shell register 0 - call getshm - mov c,a ;save in C - ani 0FEH ;all bits but comment bit - mov d,a - mov a,c ;get comment bit - cma ;flip comment bit (other bits are 1) - ani 1 ;select just comment bit - ora d ;OR in other bits - call putshm ;set new value - jmp shellr ;resume -; -; Toggle Shell Echo Mode -; -shecho: - call print - db cr,lf,' Echo of Shell Commands is O',0 - mvi b,0 ;access shell register 0 - call getshm - mov c,a ;save in C - ani 0FDH ;all bits but echo bit - mov d,a - mov a,c ;get comment bit - cma ;flip comment bit (other bits are 1) - ani 2 ;select just echo bit - ora d ;OR in other bits - call putshm ;set new value - ani 2 ;test echo bit - jz shecho1 - call print - db 'N',0 - jmp shellr -shecho1: - call print - db 'FF',0 - jmp shellr ;resume - -; -; Print Names of SH Commands -; -shhelp: - call print - db cr,lf,'SH Commands --',cr,lf,0 - lxi h,ctable ;pt to table - mvi c,0 ;set count -shh1: - mov a,m ;done? - ora a - jz shellr - call print - db ' ',0 - mvi b,8 ;8 chars -shh2: - mov a,m ;get char - call cout - inx h ;pt to next - dcr b ;count down - jnz shh2 - inr c ;increment count - mov a,c - ani 3 ;new line? - cz crlf - inx h ;skip address - inx h - jmp shh1 ;next - -; -; Command Table -; -ctable: - db '? ' ;help - dw shhelp - db 'SHCMT ' ;comment mode - dw shcomment - db 'SHECHO ' ;echo input - dw shecho - db 'SHEXIT ' ;exit shell - dw shexit - db 0 ;end of table - -; -; Buffers -; -shvfcb: - db 0 - db 'SH ' ;name of shell variable file -shvtype: - db 'VAR' - ds 24 ;36 bytes total -shdisk: - db 'A' ;disk letter - db '00' ;user number - db ':' ;separator -shname: - db 'SH ',0 ;name of shell to go onto stack -shvar: - db ' ' ;shell variable -locelt: - ds 1 ;string stack element count -locadr: - ds 2 ;ptr to next entry on stack -locstk: - ds lecnt*2 ;string ptr stack -varptr: - ds 2 ;ptr to current variable in line -varlist: - ds 2 ;ptr to named variable list -intline: - ds 2 ;ptr internal expansion line -loadfl: - ds 1 ;variables loaded flag - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SH11.LBR b/Source/Images/d_bp/u15/SH11.LBR deleted file mode 100644 index 90792ebb..00000000 Binary files a/Source/Images/d_bp/u15/SH11.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/SHCTRL.COM b/Source/Images/d_bp/u15/SHCTRL.COM deleted file mode 100644 index 2555092b..00000000 Binary files a/Source/Images/d_bp/u15/SHCTRL.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SHCTRL.MAC b/Source/Images/d_bp/u15/SHCTRL.MAC deleted file mode 100644 index bf8ff6a5..00000000 --- a/Source/Images/d_bp/u15/SHCTRL.MAC +++ /dev/null @@ -1,148 +0,0 @@ -; -; Program: SHCTRL -; Author: Richard Conn -; Version: 1.0 -; Date: 29 Mar 84 -; -version equ 10 -z3env SET 0f400h - -; -; SHCTRL is used to provide simple control of the ZCPR3 shell -; stack from the command line. This program accepts one of two parameters: -; -; SHCTRL CLR or SHCTRL C <-- Clear the Shell Stack -; SHCTRL DIS or SHCTRL D <-- Display Shell Stack -; SHCTRL POP or SHCTRL P <-- Pop the Shell Stack -; - -; -; Equates -; -fcb equ 5ch -cr equ 0dh -lf equ 0ah - -; -; SYSLIB and Z3LIB Routines -; - ext z3init,shpop,getsh2,qprint,print,pafdc,pstr - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Print Banner -; - call qprint - db 'SHCTRL Version ' - db (version/10)+'0','.',(version mod 10)+'0',0 - -; -; Check for Command -; - lda fcb+1 ;get first char - cpi 'C' ;clear? - jz shclear - cpi 'D' ;display? - jz shdisplay - cpi 'P' ;pop? - jz shspop - -; -; Print help -; - call print - db cr,lf,'SHCTRL - Control Shell Stack' - db cr,lf,'Syntax:' - db cr,lf,' SHCTRL C or SHCTRL CLR - Clear Shell Stack' - db cr,lf,' SHCTRL D or SHCTRL DIS - Display Shell Stack' - db cr,lf,' SHCTRL P or SHCTRL POP - Pop Shell Stack' - db 0 - ret - -; -; Clear Shell Stack -; -shclear: - call getsh2 ;get address of shell stack - mvi m,0 ;clear it - call qprint - db ' - Shell Stack Clear',0 - ret - -; -; Pop Shell Stack -; -shspop: - call shpop ;pop stack - call qprint - db ' - Shell Stack Popped',0 - ret - -; -; Display Shell Stack -; -shdisplay: - call getsh2 ;get address of shell stack (HL), size of - ; shell stack entry (DE), and count (A,B) - call print ;print message - db ' - Shell Stack Data' - db cr,lf,' Size of Shell Stack: ',0 - mov a,b ;get size - call pafdc ;print - call print - db ' Elements' - db cr,lf,' Shell Stack Elements:',0 - mov a,m ;check for empty - ora a - jnz shdisp1 - call print - db cr,lf,' Shell Stack Empty',0 - ret -shdisp1: - mov a,m ;check for done - ora a - rz - call print - db cr,lf,' --> ',0 - push h ;save ptr - call pstr ;print element - pop h ;get ptr - dad d ;count down - dcr b ;count down - jnz shdisp1 - ret - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SHDEFINE.COM b/Source/Images/d_bp/u15/SHDEFINE.COM deleted file mode 100644 index 286c69c8..00000000 Binary files a/Source/Images/d_bp/u15/SHDEFINE.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SHDEFINE.MAC b/Source/Images/d_bp/u15/SHDEFINE.MAC deleted file mode 100644 index e96823ba..00000000 --- a/Source/Images/d_bp/u15/SHDEFINE.MAC +++ /dev/null @@ -1,659 +0,0 @@ -; -; Program: SHDEFINE -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; SHDEFINE is used to define shell variables for the Shell SH. -; It makes entries into the file SH.VAR in the ROOT directory. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -backup equ 0 ;backup old file? 1 for yes, 0 for no -ctrlz equ 'Z'-'@' ;^Z for EOF -fcb equ 5ch -tbuff equ 80h -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext sctlfl,sout,sprint,scrlf,shldc - ext bbline,sksp,capine,fillb,cout,moveb,getfn1 - ext initfcb,f$open,f$read,f$close,f$make,f$delete,f$write,f$rename - ext z3init,qprint,codend,hmovb,root,logud,getwhl,print - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment - call banner ;print banner -; -; Check for Wheel -; - call getwhl ;get wheel byte - jnz start0 - call print - db cr,lf,' Not Wheel - Aborting',0 - ret -; -; Try to Load Variables -; -start0: -; -; Define File to Work With -; - lxi h,fcb+1 ;check for file name - lxi d,shvfcb+1 ;variable FCB - mvi b,11 ;11 chars - mov a,m ;any name given? - cpi ' ' ;space if none - jz setdef ;set default shell variable file name -; -; Define Passed Name as Shell Variable File -; - call moveb ;set name - lxi h,deftype ;set default type if none - lxi d,shvfcb+9 ;pt to type - mvi b,3 ;3 chars - ldax d ;any chars - cpi ' ' ;if none, copy - cz moveb - jmp bakdef -; -; Define from Shell Variable File Name -; -setdef: - call getfn1 ;get name - call moveb ;copy it -; -; Define $$$ and BAK Files -; -bakdef: - lxi h,shvfcb+1 - lxi d,shvtmp+1 ;set $$$ name - mvi b,8 ;8 chars - call moveb -; - if backup - lxi d,shvbak+1 ;set BAK name - call moveb - endif ;backup -; -; Load Variables -; - call varload - jnz start1 -; -; Initialize Shell Variables if File Not Found -; - call codend ;pt to code end - mvi m,ctrlz ;place ^Z -; -; Process User Commands -; -start1: - call menu ;use menu - rz ;abort - call varsave ;save new shell variables - ret - -; -; Input and Process User Commands -; Return with Z if Abort -; -menu: - call print - db cr,lf - db cr,lf,' ** Shell Variable Editor **' - db cr,lf - db cr,lf,'Edit: E. Edit (Add/Delete/Redefine) Shell Variables' - db cr,lf,' L. List Shell Variables on Console' - db cr,lf,' P. Print Shell Variables on Printer' - db cr,lf - db cr,lf,'Exit: X. Exit and Update SH.VAR on Disk' - db cr,lf,' Q. Quit without Updating SH.VAR' - db cr,lf - db cr,lf,'Command: ',0 - call capine ;get command - lxi h,ctable ;scan command table - call tscan - call print - db ' Invalid Command: ',0 - call cout - jmp menu -; -; Pack and Menu Exit -; Return NZ -; -pack: - call codend ;pack entries in table - mov d,h ;HL=DE - mov e,l -; -; Check Next Entry -; -pack1: - mov a,m ;get next char - stax d ;put it - cpi ctrlz ;done? - jz packx - cpi ' ' ;deleted? - jz pack3 -; -; Copy Entry -; -pack2: - mov a,m ;get char - stax d ;put it - inx h ;pt to next - inx d - ora a ;done? - jnz pack2 - jmp pack1 ;resume -; -; Skip Entry -; -pack3: - mov a,m ;get char - inx h ;pt to next - ora a ;done? - jnz pack3 - jmp pack1 ;resume -; -; Pack Complete -; -packx: - xra a ;NZ - dcr a - ret -; -; Menu Quit -; Return Z -; -mquit: - call print - db cr,lf,' Do you really want to quit (Y/N)? ',0 - call capine - cpi 'Y' - jnz menu - xra a ;Z - ret -; -; List Names in Table on Printer -; -nprint: - mvi a,80H ;select print - jmp nliste -; -; List Names in Table on Console -; -nlist: - mvi a,1 ;select console -nliste: - sta sctlfl ;set flag - call pack ;pack table -nlist0: - call sprint - db cr,lf,'List of Shell Variables',0 - lxi d,0 ;set count - call codend ;pt to list -; -; Main List Loop -; -nlist1: - mov a,m ;get next variable - cpi ctrlz ;done? - jz nlistx -; -; Print Next Element -; - xchg ;print number - inx h ;increment count - call scrlf - call shldc ;print - xchg ;DE contains count - call sprint - db ' Name: ',0 - mvi b,8 ;8 chars in name -nlist2: - mov a,m ;get char - call sout ;print - inx h ;pt to next - dcr b ;count down - jnz nlist2 - call sprint - db cr,lf,' >',0 -nlist3: - mov a,m ;get char - inx h ;pt to next - ora a ;done? - jz nlist4 ;resume - call sout - jmp nlist3 -nlist4: - call sprint - db '<',0 - jmp nlist1 -; -; Exit Listing -; -nlistx: - call scrlf ;new line - mov a,d ;check for none - ora e - jnz menu ;resume menu - call sprint - db ' -- No Shell Variables Defined --',cr,lf,0 - jmp menu - -; -; Add Names to Table -; -nadd: - call print - db cr,lf,'Enter Shell Variable Name (RETURN to Quit): ',0 - mvi a,0ffh ;capitalize - call bbline - call sksp ;skip to first non-blank - ora a ;done? - jz menu ;resume menu -; -; Copy Input Name into Shell Buffer SHVAR -; - push h ;save ptr to name - lxi h,shvar ;init name buffer - mvi a,' ' ;space fill - mvi b,8 ;8 chars - call fillb - xchg ;pt to buffer in DE - pop h ;pt to name - mvi b,8 ;8 chars max -nadd1: - mov a,m ;get name char - ora a ;done? - jz nadd2 - stax d ;store char - inx h ;pt to next - inx d - dcr b ;count down - jnz nadd1 -; -; Search for Name -; -nadd2: - call codend ;pt to first element -; -; Check for End of Entries -; -nadd3: - mov a,m ;get first char of next string - cpi ctrlz - jz addit ;add name at HL -; -; Compare Names -; - lxi d,shvar ;pt to variable - mvi b,8 ;compare - shld curname ;save ptr to current name in case of delete -nadd4: - ldax d ;check for duplicate - cmp m - jnz nadd5 - inx h ;pt to next - inx d - dcr b ;count down - jnz nadd4 - jmp nadd6 -; -; No Match, so Skip Rest of String -; -nadd5: - mov a,m ;skip to end of string - inx h ;pt to next - ora a ;done? - jnz nadd5 - jmp nadd3 ;resume -; -; Match - Determine What User Wants to Do -; -nadd6: - call print - db cr,lf,' Shell Variable Name ',0 - call prname ;print name - call print - db ' Found -' - db cr,lf,' Delete It (D)' - db cr,lf,' Redefine It (R)' - db cr,lf,' No Change (anything else)' - db cr,lf,'Option: ',0 - call capine - cpi 'D' ;delete? - jz delete - cpi 'R' ;redefine? - jnz nadd ;restart if not -; -; Redefine Name -; - lhld curname ;pt to name in buffer - mvi b,8 ;space fill it - mvi a,' ' - call fillb - jmp nadd3 ;resume in case another duplicate -; -; Delete Name -; -delete: - lhld curname ;pt to name in buffer - mvi b,8 ;space fill it - mvi a,' ' - call fillb - jmp nadd ;restart -; -; Add Name -; -addit: - shld curname ;save ptr to new name - xchg ;dest in DE - lxi h,shvar ;pt to name - mvi b,8 ;8 chars - call hmovb ;copy name into buffer - xchg ;pt to after name with HL - push h ;save ptr - mvi m,0 ;store ending 0 and ^Z in case of abort - inx h - mvi m,ctrlz ;store ^Z - call print - db cr,lf,' Definition of ',0 - call prname ;print name - call print - db ' (RETURN to Abort) -',cr,lf,'--> ',0 - mvi a,0ffh ;caps - call bbline - pop d ;get destination - mov a,m ;no input? - ora a ;noadd if not - jz noadd -; -; Copy User Input into Buffer -; -addit1: - mov a,m ;get char - stax d ;put char - inx h ;pt to next - inx d - ora a ;done? - jnz addit1 - mvi a,ctrlz ;mark end - stax d - jmp nadd - -; -; Abort Add -; -noadd: - lhld curname ;pt to first char - mvi m,ctrlz ;mark end - jmp nadd - -; -; Print Name of Shell Variable -; -prname: - push h ;save regs - push b - lxi h,shvar ;pt to name - mvi b,8 ;8 chars -prn1: - mov a,m ;get char - call cout - inx h ;pt to next - dcr b ;count down - jnz prn1 - pop b ;restore - pop h - ret - -; -; Command Table Scanner -; -tscan: - mov b,a ;save char in B -tscan1: - mov a,m ;end of table? - ora a - mov a,b ;prep for return - rz - mov a,m ;get table char - cmp b ;match? - jz tscan2 - inx h ;pt to next entry - inx h - inx h - jmp tscan1 -; -; Command Found - Run It -; -tscan2: - inx h ;get address - mov e,m - inx h - mov d,m - xchg ;address in HL - pop psw ;clear stack - pchl ;"run" command -; -; Command Table -; -ctable: - db 'E' ;enter - dw nadd - db 'L' ;list - dw nlist - db 'P' ;print - dw nprint - db 'X' ;exit - dw pack - db 'Q' ;quit - dw mquit - db 0 ;end of table - -; -; Print Banner -; -banner: - call qprint - db 'SHDEFINE, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db 0 - ret -; -; Save Shell Variable List -; Return with Z if Error -; -varsave: - call print - db cr,lf,' Writing Shell Variables to Disk',0 - lxi d,shvtmp ;open temp - call initfcb - call f$delete ;delete if any exists - call f$make ;create new file - inr a ;error? - rz - call codend ;pt to scratch area -; -; Save Loop -; -vars1: - lxi d,tbuff ;copy into buffer - mvi b,128 ;128 bytes - call hmovb - lxi d,shvtmp ;write block - call f$write - jnz werr ;write error - lxi d,tbuff ;check for done - mvi b,128 ;128 bytes -; -; Check for Done -; -vars2: - ldax d ;look for ^Z - cpi ctrlz - jz varsx - inx d ;pt to next - dcr b ;count down - jnz vars2 - jmp vars1 -; -; Done -; -varsx: - lxi d,shvtmp ;close temp file - call f$close -; -; Delete Old Backup File SH.BAK -; - if backup -; - lxi d,shvbak ;delete any old backups - call initfcb - call f$delete -; -; Create New Backup File SH.BAK=SH.VAR -; - lxi h,shvbak ;new name - lxi d,shvfcb ;old name - call f$rename ;create backup file -; - else -; -; Erase Original File -; - lxi d,shvfcb ;delete file - call initfcb - call f$delete -; - endif ;backup -; -; Create New Shell Variable File SH.VAR=SH.$$$ -; - lxi h,shvfcb ;new name - lxi d,shvtmp ;old name - call f$rename ;create new file - xra a ;return OK - dcr a ;NZ - ret -; -; File Write Error -; -werr: - call print - db cr,lf,'Error in Writing File - Aborting',0 - xra a ;error code - ret - -; -; Load Shell Variable List -; Return with Z if Error -; -varload: -; -; Look for Variable File -; - call root ;determine DU of root - call logud ;goto root - call codend ;pt to scratch area - mvi m,ctrlz ;prep for no file - lxi d,shvfcb ;try to open file - call initfcb ;init FCB - call f$open - rnz ;file not found -; -; Read in Variable File -; -varl1: - lxi d,shvfcb ;read in file - call f$read - jnz varl2 - lxi d,tbuff ;pt to data - xchg ;copy into memory - mvi b,128 ;128 bytes - call hmovb - xchg - jmp varl1 -varl2: - lxi d,shvfcb ;close file - call f$close -; -; Say List is Already Loaded -; - xra a ;return NZ for OK - dcr a - ret - -; -; Buffers -; -curname: - ds 2 ;ptr to current variable name -shvar: - ds 8 ;shell variable name -deftype: - db 'VAR' ;default file type -; - if backup -shvbak: - db 0 - db 'SH ' ;name of shell variable file - db 'BAK' - ds 24 ;36 bytes total - endif ;backup -; -shvtmp: - db 0 - db 'SH ' ;name of shell variable file - db '$$$' - ds 24 ;36 bytes total -shvfcb: - db 0 - db 'SH ' ;name of shell variable file - db 'VAR' - ds 24 ;36 bytes total - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SHFILE.COM b/Source/Images/d_bp/u15/SHFILE.COM deleted file mode 100644 index 7c458537..00000000 Binary files a/Source/Images/d_bp/u15/SHFILE.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SHFILE.MAC b/Source/Images/d_bp/u15/SHFILE.MAC deleted file mode 100644 index ec58b66e..00000000 --- a/Source/Images/d_bp/u15/SHFILE.MAC +++ /dev/null @@ -1,105 +0,0 @@ -; -; Program: SHFILE -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; SHFILE defines the name of the shell variable file or displays it. -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -fcb equ 5ch -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext z3init,getfn1,print,pfn1,moveb,qprint - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment and Print Banner -; - call z3init ;initialize the ZCPR3 Environment - call qprint - db 'SHFILE, Version ' - db (version/10)+'0','.',(version mod 10)+'0',cr,lf,0 -; -; Set Name of Shell Variable File -; - call getfn1 ;get ptr to file name 1 - lxi d,fcb+1 ;pt to name in FCB - xchg ;copy from FCB - mvi b,11 ;11 bytes - mov a,m ;get first char - cpi ' ' ;don't define if no name - jz prshfile - call moveb ;define name - call setshdef ;set default file type if none given -; -; Print Name of Shell Variable File -; -prshfile: - call print - db ' Shell Variable File Name is ',0 - call getfn1 ;pt to name - xchg - call pfn1 - ret -; -; Set Type of Shell Variable File if None Given -; -setshdef: - call getfn1 ;check for file type - lxi d,8 ;pt to file byte - dad d - xchg - lxi h,shvtype ;default file type - mvi b,3 ;3 chars - ldax d ;get char - cpi ' ' ;set if space - cz moveb ;copy - ret - -; -; Buffers -; -shvtype: - db 'VAR' - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SHOW.COM b/Source/Images/d_bp/u15/SHOW.COM deleted file mode 100644 index b91c0608..00000000 Binary files a/Source/Images/d_bp/u15/SHOW.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SHOW.MAC b/Source/Images/d_bp/u15/SHOW.MAC deleted file mode 100644 index 70485a86..00000000 --- a/Source/Images/d_bp/u15/SHOW.MAC +++ /dev/null @@ -1,1753 +0,0 @@ -; -; Program: SHOW -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 -z3env SET 0f400h - -; -; The purpose of SHOW is to display various details about the ZCPR3 -; System to the ZCPR3 user. Details on the ZCPR3 Environment Descriptor, -; what facilities are available, and what the status of these facilities -; is are included. -; - -; -; Basic Equates -; -fcb equ 5ch -cr equ 0dh -lf equ 0ah -ctrlc equ 'C'-'@' -ctrlr equ 'R'-'@' - -; -; External References -; - ext envptr - ext tinit,dinit ;from VLIB - ext z3vinit,cls,gotoxy,gxymsg,vprint,at ;from VLIB - ext getiop - ext retud,pfn1 - ext getpath,dutdir,bbline,eval16 - ext capine,cout,crlf,print,pstr,getmsg,padc,pafdc,phl4hc,pa2hc - ext shempty,shfull,getsh - ext geter1,geterc,puter1,puterc - ext getfcp,getrcp,getefcb - ext getndr - ext strtzex,stopzex - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3vinit ;initialize the ZCPR3 Env and the VLIB Env - shld dumpstrt ;set beginning address of memory dump - lda fcb+1 ;check for E option (error handler) - cpi ' ' ;no option, so proceed - jz show - cpi 'E' ;install SHOW as error handler - jz errins - call print - db 'SHOW Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,'Syntax:' - db cr,lf,' SHOW <-- Invoke Normally' - db cr,lf,' SHOW E <-- Install as Error Handler' - db 0 - ret -; -; Install SHOW as an error handler -; -errins: - call getefcb ;pt to name of command - jnz errins1 - lxi h,showcmd-1 ;pt to command line -errins1: - inx h ;pt to first char - push h ;save ptr - lxi d,8 ;skip to file type field - dad d - mvi m,0 ;store ending 0 - pop h - call puterc ;store error handler command line - mvi a,0ffh ;turn on error handlers - call puter1 - call print - db 'SHOW Installed as an Error Handler',0 - ret -; -; Print Menu and Accept Command -; -show: - call tinit ;init terminal - call stopzex ;stop ZEX if running - call banner ;print banner - call gxymsg - db 3,31 - db '--> ',1,'SHOW Menu',2,' <--',0 - mvi h,7 ;begin on row 7 - mvi l,10 ;column 10 - shld infoxy - call dispxy ;position for display - call vprint - db ' ' - db ' PACKAGE DATA ',0 - call dispxy ;position for display - call vprint - db ' C -- ' - db 1,'Command Packages ',2,0 - call dispxy ;position for display - call vprint - db ' I -- ' - db 1,'Input/Output Package',2,0 - call dispxy ;position for display - call dispxy ;position for display - call vprint - db ' ' - db ' ENVIRONMENT ',0 - call dispxy ;position for display - call vprint - db ' E -- ' - db 1,'Error Handler ',2,0 - call dispxy ;position for display - call vprint - db ' M -- ' - db 1,'Memory Utility ',2,0 - call dispxy ;position for display - call vprint - db ' N -- ' - db 1,'Named Directory ',2,0 - call dispxy ;position for display - call vprint - db ' P -- ' - db 1,'Path Expression ',2,0 - call dispxy - call vprint - db ' S -- ' - db 1,'Shell Stack ',2,0 - mvi h,7 ; row 7 - mvi l,40 ; column 40 - shld infoxy - call dispxy - call vprint - db ' ' - db 'ZCPR3 SYSTEM DATA ',0 - call dispxy - call vprint - db ' 1 -- ' - db 1,'Env Descriptor ',2,0 - call dispxy - call vprint - db ' 2 -- ' - db 1,'Message Buffers ',2,0 - call dispxy - call vprint - db ' 3 -- ' - db 1,'CRT and Printer Data',2,0 - call dispxy - call vprint - db ' 4 -- ' - db 1,'System File Defns ',2,0 - call dispxy - call dispxy - call dispxy - call vprint - db ' X -- ' - db 1,'Exit',2,0 -; -; Input Command from User -; -getcmd: - call gxymsg ;print prompt - db 23,10,'SHOW Command? ',0 - call capine ;get command -getcmd1: - call ctabscan ;scan for and process command - call print ;print error message - db 7,0 ;beep - jmp getcmd -; -; Print Banner -; -banner: - call cls ;clear screen - call gxymsg ;print banner message - db 1,27 ;row/col - db '>>>> ' - db 'SHOW Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db ' <<<<',0 - ret -; -; Command Table -; -ctable: - db '1' ;Env Desc - dw envdes - db '2' ;Messages - dw msg - db '3' ;CRT and Printer - dw cpdata - db '4' ;File Names - dw fnames - db 'C' ;Command Package Status - dw command - db 'E' ;Error Handler Display - dw errorh - db 'I' ;I/O Package Display - dw iopack - db 'M' ;Memory Utility - dw memory - db 'N' ;Named Directory Data - dw namedir - db 'P' ;Path Display - dw pdisp - db 'S' ;Shell Stack Display - dw shstack - db 'X' ;Exit - dw exit - db ctrlc ;Exit - dw exit - db cr ;New Screen - dw show - db ' ' ;New Screen - dw show - db ctrlr ;New Screen - dw show - db 0 ;end of table -; -; Scan for and transfer control to command routine -; -ctabscan: - lxi h,ctable ;pt to command table - mov c,a ;command in C -ctab1: - mov a,m ;get char from table - ora a ;done? - rz - cmp c ;check for match - jz ctab2 - inx h ;skip address - inx h - inx h ;pt to next command char - jmp ctab1 -ctab2: - inx h ;pt to address - mov a,m ;get low - inx h - mov h,m ;get high - mov l,a ;HL pts to command - pop psw ;clear stack - pchl ;"goto" command -; -; **** Deinitialize Terminal and Exit to ZCPR3 **** -; -exit: - call strtzex ;resume ZEX if running - jmp dinit ;deinit terminal -; -; **** Memory Dumper **** -; -memory: - call banner - call gxymsg - db 3,25 - db '--> ',1,'Memory Display at ',0 - lhld dumpstrt ;start of dump address - call phl4hc - call vprint - db 2,' <--',cr,lf,0 - mvi b,16 -mem1: - shld cline ;set current line ptr - call crlf ;new line - call phl4hc ;print address - call vprint - db 1,' --',2,0 - mvi c,16 ;count for elements -mem2: - mov a,c ;extra space? - ani 3 - mvi a,' ' ;extra space - cz cout - mov a,m ;get next byte - call pa2hc ;print as hex - mvi a,' ' ;space - call cout - inx h ;pt to next - dcr c ;count down - jnz mem2 - call vprint - db 1,'| ',2,0 - lhld cline ;pt to current line again - mvi c,16 ;count again -mem3: - mov a,m ;get next byte - ani 7fh ;mask MSB - cpi ' ' - jnc mem4 - mvi a,'.' ;dot fill -mem4: - call cout - inx h ;pt to next - dcr c ;count down - jnz mem3 - dcr b ;count down major loop - jnz mem1 - call gxymsg ;print prompt - db 23,10 - db 1,'Command (<=last, >=next, A=adr, SHOW Cmd)? ',2,0 - call capine ;get input - cpi 'A' ;address? - jz memadr - cpi '>' ;advance? - jz memnext - cpi '.' ;advance? - jz memnext - cpi '<' ;backup? - jz memback - cpi ',' ;backup? - jz memback - jmp getcmd1 ;process otherwise -memadr: - call print - db 'ddress (Hex)? ',0 - mvi a,0ffh ;capitalize - call bbline ;get line from user -mema1: - mov a,m ;skip leading spaces - inx h ;pt to next char - cpi ' ' - jz mema1 - dcx h ;pt to first char - call eval16 ;evaluate as hex - xchg ;result in HL - shld dumpstrt ;set new start address - jmp memory ;restart -memnext: - lhld dumpstrt ;advance 1 page - inr h - shld dumpstrt - jmp memory ;restart -memback: - lhld dumpstrt ;backup 1 page - dcr h - shld dumpstrt - jmp memory ;restart -; -; **** ZCPR3 Messages **** -; -msg: - call banner - call gxymsg - db 3,25 - db '--> ',1,'ZCPR3 System Messages',2,' <--',0 - mvi h,5 ; row 5 - mvi l,5 ; column 5 - shld infoxy - mvi a,22h ; offset - call compenv ; pt to address of messages - mov a,m - inx h - mov h,m - mov l,a ; HL pts to first message - call dispxy - call vprint - db 1,'Error Handler Defined? ',2,0 - mov a,m ; get flag - call pryn - mov a,m ; get flag again - ora a ; defined? - jz msg1 - push h - lxi d,10h ; pt to error command line - dad d - call dispxy - call vprint - db 1,' Error Handler: ',2,0 - call pstr - pop h -msg1: - inx h - call dispxy - call dispxy - call vprint - db 1,'Current IF Level: ',2,0 - mvi b,8 ; set IF count - mov c,m ; get IF flag -iftst: - mov a,c ; get flag - rlc - mov c,a ; save flag - jc iftst1 - dcr b ; count down - jnz iftst -iftst1: - mov a,b ; get char - call padc - inx h ; pt to IF active flag - inx h ; pt to command status - shld cstat ; save address - inx h ; pt to error address - inx h - inx h ; pt to program error code - call dispxy - call dispxy - call vprint - db 1,'Program Error Code: ',2,0 - mov a,m - call padc - inx h ; pt to ZEX message byte - inx h ; pt to ZEX running flag - call dispxy - call dispxy - call vprint - db 1,'ZEX Running? ',2,0 - mov a,m - call pryn - mov a,m ; make sure we have char - inx h ; skip ZEX data - inx h - inx h - ora a ; ZEX running? - jz nozex - mov e,m ; get low-order - inx h - mov d,m ; get high-order - call dispxy - call vprint - db 1,'Address of ZEX Buffer: ',2,0 - xchg - call phl4hc ; print address - xchg - jmp scb ; process shell control byte now -nozex: - inx h -scb: - inx h ; pt to shell control byte - push h - mvi h,5 ; row 5 - mvi l,40 ; column 40 - shld infoxy - pop h - call dispxy - call vprint - db 1,'Shell Control --',2,0 - call dispxy - call vprint - db 1,' Enable Shell Comment? ',2,0 - mov a,m - ani 1 - call pryn - call dispxy - call vprint - db 1,' Enable Shell Echo? ',2,0 - mov a,m - ani 10b - call pryn - call dispxy - call vprint - db 1,' Enable Shell Wait? ',2,0 - mov a,m - ani 80h - call pryn - push h ; save ptr to next message byte - lhld cstat ; get ptr to command status - call dispxy - call dispxy - call vprint - db 1,'Command Status: ',2,0 - mov a,m ; get it - ani 3 ; 2 LSBs - jz csnorm - cpi 1 - jz csshell - call print - db 'Error',0 - inx h ; pt to error address - mov a,m ; get low - inx h - mov h,m ; get high - mov l,a - call dispxy - call vprint - db 1,' Error Command ',2,0 - call dispxy - call print - db ' ',0 -erprt: - mov a,m ; get char - cpi ' '+1 ; end of command with space or less? - jc csdone - cpi ';' ; end of command with new command? - jz csdone - call cout ; print char - inx h - jmp erprt -csnorm: - call print - db 'Normal',0 - jmp csdone -csshell: - call print - db 'Shell',0 -csdone: - pop h ; restore ptr - lxi d,35 ; jump to registers - dad d - push h - mvi h,17 ; row 17 - mvi l,5 ; column 5 - shld infoxy - pop h - call dispxy - call vprint - db 1,'Registers --',2,0 - call dispxy ; new line - mvi b,10 ; 10 times - mvi c,0 -regl: - call vprint - db 1,' ',0 - mvi a,10+'0' ; compute reg char - sub b ; get value - call cout - call vprint - db '=',2,0 - mov a,m ; get value - inx h ; pt to next - call padc ; print - inr c ; every 4 - mov a,c ; get count - ani 3 - cz dispxy ; new line - dcr b ; count down - jnz regl - lxi d,6 ; skip to user-defined values - dad d - push h - mvi h,17 ; row 17 - mvi l,40 ; column 40 - shld infoxy - pop h - call dispxy - call vprint - db 1,'User-Defined Area --',2,0 - call dispxy ; new line - mvi b,16 ; 16 times - mvi c,0 -regl1: - call vprint - db ' ',0 - mov a,m ; get value - inx h ; pt to next - call padc ; print - inr c ; every 4 - mov a,c ; get count - ani 3 - cz dispxy ; new line - dcr b ; count down - jnz regl1 - jmp getcmd -; -; **** System File Definitions **** -; -fnames: - call banner - call gxymsg - db 3,27 - db '--> ',1,'System File Names',2,' <--',0 - mvi h,5 ; row 5 - mvi l,24 ; column 24 - shld infoxy - call dispxy - call vprint - db 1,'Shell Variable File: ',2,0 - mvi a,47h ; offset - call compenv - xchg ; DE pts to file name - call pfn ; print file name - call dispxy - mvi b,'1' ; set counter -fnames1: - lxi h,11 ; offset to next file - dad d ; pt to next file name - xchg - call dispxy - call vprint - db 1,'File Name ',0 - mov a,b - call cout ; print number - call vprint - db ': ',2,0 - call pfn ; print file name - inr b ; next name - mov a,b ; get next - cpi '4'+1 ; done? - jnz fnames1 - jmp getcmd -; -; Print File Name for FNAMES -; -pfn: - ldax d ; get first char - cpi ' ' ; none? - jnz pfn1 ; print name - lxi h,8 ; check type - dad d - mov a,m ; get first char of type - cpi ' ' ; none? - jnz pfn1 ; print name - call print - db 'Undefined',0 - ret -; -; **** CRT and Printer Data **** -; -cpdata: - call banner - call gxymsg - db 3,26 - db '--> ',1,'CRT and Printer Data',2,' <--',0 - mvi h,5 ; row 5 - mvi l,5 ; column 5 - shld infoxy - call dispxy - call vprint - db 1,'CRT -- Selection: ',2,0 - mvi a,2fh ; offset - call prbyte ; print byte value there - call dispxy - call vprint - db 1,' CRT 0',2,0 - mvi a,31h ; print data at 31H - call cprt - call dispxy - call dispxy - call vprint - db 1,'LST -- Selection: ',2,0 - mvi a,30h ; offset - call prbyte ; print byte value there - call dispxy - call vprint - db 1,' LST 0',2,0 - mvi a,37h ; offset - call lprt - call dispxy - call dispxy - call vprint - db 1,' LST 2',2,0 - mvi a,3fh ; offset - call lprt - mvi h,6 ; row 6 - mvi l,40 ; column 40 - shld infoxy - call dispxy - call vprint - db 1,' CRT 1',2,0 - mvi a,34h ; print data at 34H - call cprt - call dispxy - call dispxy - call dispxy - call vprint - db 1,' LST 1',2,0 - mvi a,3bh ; offset - call lprt - call dispxy - call dispxy - call vprint - db 1,' LST 3',2,0 - mvi a,43h ; offset - call lprt - jmp getcmd -; -; Print CRT Data -; -cprt: - call compenv ; compute offset - call dispxy - call vprint - db 1,' Width: ',2,0 - mov a,m - call padc - call vprint - db ' Cols',0 - call dispxy - call vprint - db 1,' Lines/Text: ',2,0 - inx h - mov a,m - call padc - call vprint - db ' / ',0 - inx h - mov a,m - call padc - ret -; -; Print LST Data -; -lprt: - call compenv ; compute offset - call dispxy - call vprint - db 1,' Width: ',2,0 - mov a,m - call padc - call vprint - db ' Cols',0 - call dispxy - call vprint - db 1,' Lines/Text: ',2,0 - inx h - mov a,m - call padc - call vprint - db ' / ',0 - inx h - mov a,m - call padc - inx h - call dispxy - call vprint - db 1,' Form Feed? ',2,0 - mov a,m - call pryn - ret - -; -; **** Print Environment Descriptor Data **** -; -envdes: - call banner - call gxymsg - db 3,25 - db '--> ',1,'Environment Descriptor',2,' <--',0 - mvi h,5 ; row 5 - mvi l,5 ; column 5 - shld infoxy - call dispxy - call vprint - db 1,'>> Addresses <<',2,0 - call dispxy - call vprint - db 1,' Command Line Buffer: ',2,0 - mvi a,18h ; offset - call pradr ; print address - call dispxy - call vprint - db 1,' Command-Search Path: ',2,0 - mvi a,9 ; offset - call pradr ; print address - call dispxy - call vprint - db 1,' Environment Descriptor: ',2,0 - lhld envptr ; get ptr - call phl4hc - call dispxy - call vprint - db 1,' Externals --',2,0 - call dispxy - call vprint - db 1,' File Control Block: ',2,0 - mvi a,24h - call pradr - call dispxy - call vprint - db 1,' System Stack: ',2,0 - mvi a,26h - call pradr - call dispxy - call vprint - db 1,' Message Buffer: ',2,0 - mvi a,22h - call pradr - call dispxy - call vprint - db 1,' Named Directory Buffer: ',2,0 - mvi a,15h - call pradr - call dispxy - call vprint - db 1,' Packages --',2,0 - call dispxy - call vprint - db 1,' Flow Command: ',2,0 - mvi a,12h - call pradr - call dispxy - call vprint - db 1,' Input/Output: ',2,0 - mvi a,0fh - call pradr - call dispxy - call vprint - db 1,' Resident Command: ',2,0 - mvi a,0ch - call pradr - call dispxy - call vprint - db 1,' Shell Stack Buffer: ',2,0 - mvi a,1eh - call pradr - call dispxy - call vprint - db 1,' Wheel Byte: ',2,0 - mvi a,29h - call pradr - mvi h,5 ; row 5 - mvi l,40 ; column 40 - shld infoxy - call dispxy - call vprint - db 1,'>> Data Elements <<',2,0 - call dispxy - call vprint - db 1,' Sizes --',2,0 - call dispxy - call vprint - db 1,' Command Line: ',2,0 - mvi a,1ah - call prbyte - call vprint - db ' Chars',0 - call dispxy - call vprint - db 1,' External Path: ',2,0 - mvi a,0bh - call prbyte - call vprint - db ' Elts',0 - call dispxy - call vprint - db 1,' Named Dir Entries: ',2,0 - mvi a,17h - call prbyte - call dispxy - call vprint - db 1,' Package, FCP: ',2,0 - mvi a,14h - call prbyte - call pr128 - call dispxy - call vprint - db 1,' Package, IOP: ',2,0 - mvi a,11h - call prbyte - call pr128 - call dispxy - call vprint - db 1,' Package, RCP: ',2,0 - mvi a,0eh - call prbyte - call pr128 - call dispxy - call vprint - db 1,' Shell Stack Elts: ',2,0 - mvi a,20h - call prbyte - call dispxy - call dispxy - call vprint - db 1,' DU Form Allowed? ',2,0 - mvi a,2eh - call compenv - mov a,m ; get byte - call pryn - call dispxy - call vprint - db 1,' Max Disk and User: ',2,0 - mvi a,2ch - call compenv - mov a,m - adi '@' - call cout - inx h - mov a,m - call pafdc - call dispxy - call vprint - db 1,' Processor Speed: ',2,0 - mvi a,2bh - call prbyte - call vprint - db ' MHz',0 - call dispxy - call vprint - db 1,' Quiet Operation? ',2,0 - mvi a,28h - call compenv - mov a,m ; get byte - call pryn - jmp getcmd -; -; Print 128-Byte Block Message -; -pr128: - call vprint - db ' Blocks',0 - ret -; -; Print address pted to by A offset as 4 hex chars -; -pradr: - call compenv ; pt to address - mov e,m ; get address - inx h - mov d,m - xchg - jmp phl4hc -; -; Print byte pted to by A offset as dec chars -; -prbyte: - call compenv ; compute offset (in HL) - mov a,m ; get byte - jmp padc -; -; Add A to Base Address in ENVPTR -; Return Result in HL -; -compenv: - lhld envptr ; get base address - add l ; add offset - mov l,a - mov a,h - aci 0 - mov h,a - ret -; -; **** Display Input/Output Package Function **** -; -iopack: - call banner - call gxymsg - db 3,26 - db '--> ',1,'Input/Output Package',2,' <--',0 - call getiop ;check for initialization - mov a,h - ora l ;must NOT be zero - jnz iopack0 - call gxymsg - db 5,23,'Input/Output Packages Not Available',0 - jmp getcmd -iopack0: - call status ;check for drivers - jnz iopack1 - call gxymsg - db 5,22,'Input/Output Redirection Not Available',0 - jmp getcmd -iopack1: - call dispcon ;successive displays - call disprdr - call gxymsg - db 23,10,'Strike Any Key For Next Screen - ',0 - call capine - call banner - call gxymsg - db 3,26 - db '--> ',1,'Input/Output Package',2,' <--',0 - call disppun - call displst - jmp getcmd -dispcon: - call vprint - db cr,lf,cr,lf,1,'Console',0 - mvi a,0 ;select CON: - call disp - jmp curr -displst: - call vprint - db cr,lf,cr,lf,1,'Printer',0 - mvi a,3 ;select LST: - call disp - jmp curr -disprdr: - call vprint - db cr,lf,cr,lf,1,'Reader ',0 - mvi a,1 ;select RDR: - call disp - jmp curr -disppun: - call vprint - db cr,lf,cr,lf,1,'Punch ',0 - mvi a,2 ;select PUN: - call disp -; -; Print Name of Current Device -; -curr: - push h ;save ptr - mov b,a ;save number in B - push b ;save B - call vprint - db cr,lf,1,' Assignment is ',2,0 - push b ;save B - call status ;get status - pop b ;get B - inr b ;add 1 for offset - dcx h ;back up -curr1: - inx h ;pt to next - inx h - dcr b ;count down - jnz curr1 - pop b ;get logical number in B - mov c,m ;get physical number in C - call pname0 ;print first part of name only - pop h ;get ptr - ret -; -; Print Names of All Physical Devices for a Logical Device -; -disp: - push h ;save char ptr - push psw ;save device number - call vprint - db ' Devices --',2,0 - mov b,a ;logical device in B - push b ;save for later - push b ;save it - call status ;get status report - pop b ;get logical device number - inr b ;add 1 for offset - dcx h ;back up - dcx h -disp1: - inx h ;pt to next - inx h - dcr b ;count down - jnz disp1 - pop b ;get B back - mov c,m ;get count of devices - mov a,c ;check for none - ora a - jz disp3 -disp2: - push b ;save values - dcr c ;pt to next name - call print - db cr,lf,' ',0 - call pnamer ;print name (B=logical, C=physical) - pop b ;get count - dcr c ;count down - jnz disp2 -disp3: - pop psw - pop h - ret -; -; Routine to Print Name of Selected Device -; B=logical number, C=physical number -; -pnamer: - push b ;save BC - call pname0 ;print first part of name - call vprint ;print separator - db 1,' - ',2,0 - call pstr ;print rest as string - pop b ;restore BC - ret -; -; Print first part of selected device name -; -pname0: - call namer ;get ptr to string - mvi b,8 ;at most 8 chars -pname1: - mov a,m ;get char - inx h ;pt to next char - cpi ' ' ;end of name? - jz pname2 - call cout ;print char - dcr b ;count down - jnz pname1 - ret -pname2: - mvi a,' ' ;print spaces - call cout - dcr b ;count down - jnz pname2 - ret - -; -; Basic Interface Routines -; -status: - lxi d,0 ;Offset 0 -runit: - call getiop ;device driver base - dad d - pchl -select: - lxi d,3 ;Offset 3 - jmp runit -namer: - lxi d,6 ;Offset 6 - jmp runit - -; -; **** Display Path Function **** -; -pdisp: - call banner - call gxymsg - db 3,28 - db '--> ',1,'Path Expressions',2,' <--',0 - mvi h,6 ; row 6 - mvi l,10 ; column 10 - shld infoxy - call dispxy - call vprint - db 1,'Symbolic Form',2,0 - call dispxy - call vprint - db ' ',0 - call getpath ; pt to external path -pdisp1: - mov a,m ; get disk - ora a ; done? - jz adisp - cpi '$' ; current? - jz pdisp2 - adi '@' ; convert to letter -pdisp2: - call cout ; print disk letter - inx h ; pt to user - mov a,m ; get user number - cpi '$' ; current? - jnz pdisp3 - call cout ; print current indicator - jmp pdisp4 -pdisp3: - call pafdc ; print user number -pdisp4: - call colon - inx h ; pt to next element - mov a,m ; done? - ora a ; 0=yes - cnz arrow - jmp pdisp1 -; -; Print Absolute Path -; -adisp: - call dispxy - call dispxy - call vprint - db 1,'DU Form ',2,0 - call dispxy - call vprint - db ' ',0 - call retud ; get current user/disk - call getpath ; pt to external path -adisp1: - mov a,m ; get disk - ora a ; done? - jz ndisp - cpi '$' ; current? - jnz adisp2 - mov a,b ; get current disk - inr a ; adjust to 1 to n -adisp2: - adi '@' ; convert to letter - call cout ; print disk letter - inx h ; pt to user - mov a,m ; get user - cpi '$' ; current? - jnz adisp3 - mov a,c ; get current user -adisp3: - call pafdc ; print user - call colon - inx h ; pt to next - mov a,m ; done? - ora a - cnz arrow - jmp adisp1 -; -; Print Named Path -; -ndisp: - call dispxy - call dispxy - call vprint - db 1,'DIR Form ',2,0 - call dispxy - call vprint - db ' ',0 - call getpath ; pt to external path -ndisp1: - call retud ; get current user and disk in C and B - mov a,m ; get disk - ora a ; done? - jz getcmd - cpi '$' ; current? - jz ndisp2 - mov b,a ; disk in B - dcr b ; adjust to 0 to n-1 -ndisp2: - inx h ; pt to user - mov a,m ; get it - cpi '$' ; current? - jz ndisp3 - mov c,a ; user in C -ndisp3: - inx h ; pt to next - push h ; save ptr - call udscan ; scan dirs for user/disk and print its name - pop h ; get ptr - call colon - mov a,m ; done? - ora a - cnz arrow - jmp ndisp1 - -; -; Print Colon -; -colon: - mvi a,':' ; print colon - jmp cout - -; -; Print Arrow -; -arrow: - call vprint - db 1,' --> ',2,0 - ret - -; -; Scan directories for user and disk in C and B -; Print name if found or "Noname" if not -; -udscan: - call dutdir ; convert to name - jz udscan1 ; error return if no name - mvi b,8 ; 8 chars max -udsprn: - mov a,m ; get name char - cpi ' ' ; done? - rz - call cout ; print char - inx h ; pt to next - dcr b ; count down - jnz udsprn - ret -udscan1: - call vprint - db 'Noname',0 - ret - -; -; **** Print Named Directory Info **** -; -namedir: - call banner - call gxymsg - db 3,26 - db '--> ',1,'Named Directory Data',2,' <--',0 - call getndr ;get location of directory - jnz ndir1 - call gxymsg - db 5,22 - db 'Named Directory Buffer Not Available',0 - jmp getcmd -; -; Print Names of Directory Elements -; -ndir1: - call gxymsg - db 5,25 - db '-- Named Directory Entries --',0 - mvi d,7 ;set row - mvi e,7 ;set column - xchg - call gotoxy ;position cursor - xchg - mvi c,0 ;set entry count - mvi b,1 ;set disk 1 -; -; Print Each Resident Command Name -; -ndir2: - mov a,m ;get table entry - ora a ;end of table? - jz getcmd -; -; DE is carried over all of this as starting row/column -; - cmp b ;same disk? - jz ndir3 -; -; Advance to Next Set of Entries for New Disk -; - mvi c,0 ;reset counter - mov b,a ;set new disk - xchg ;position for new disk - inr h ;blank line - inr h - call gotoxy ;position on screen - xchg -ndir3: - push b ;save counters -; -; Print DU: -; - mov a,m ;get disk - adi '@' ;convert to letter (A to P) - call cout - inx h ;pt to user - mov a,m ;get user - call padc ;print user number - call print ;print separator - db ': ',0 - inx h ;pt to name -; -; Print DIR -; - mvi b,8 ;print name -ndir4: - mov a,m ;get char - call cout - inx h ;pt to next - dcr b ;count down - jnz ndir4 -; -; Advance to Next and Print Separator -; - lxi b,8 ;skip over password - dad b - call print ;print separator - db ' ',0 - pop b ;get counters -; -; New Line Counter -; - inr c ;increment entry counter - mov a,c ;check for done - ani 3 ;every 4 - jnz ndir2 -; -; Position in Next Line -; - xchg ;position cursor - inr h ;next row - call gotoxy - xchg - jmp ndir2 - -; -; **** Print Command Status **** -; -command: - call banner - call gxymsg - db 3,25 - db '--> ',1,'Command Package Status',2,' <--',0 - call gxymsg - db 5,25 - db '---- ',1,'FLOW COMMAND PACKAGE',2,' ----',0 - call getfcp ;get FCP data - jnz flow0 - call gxymsg - db 7,20 - db 'Flow Command Facility Not Available',0 - jmp rcp -; -; Check for Flow Command Package Loaded -; -flow0: - mov a,m ;get first byte - ora a ;0=none loaded - jnz flow1 - call gxymsg - db 7,25 - db 'No Flow Command Package Loaded',0 - jmp rcp -; -; Print Flow Command Package Info -; -flow1: - call gxymsg - db 7,20 - db 1,'Flow Commands:',2,0 - lxi d,5 ;skip to command size byte - dad d - mov b,m ;get command size - inx h ;pt to first command - call at - db 8,22 -; -; Print Flow Command Names -; -flow2: - mov a,m ;get first char - ora a ;end of table? - jz flow4 - push b ;save counter -flow3: - mov a,m ;get char - inx h ;pt to next - call cout ;print char - dcr b ;count down - jnz flow3 - call print - db ' ',0 - inx h ;skip over address - inx h - pop b ;get counter - jmp flow2 -; -; Print Flow Command Arguments -; -flow4: - call gxymsg - db 9,20 - db 1,'IF Options:',2,0 - call at - db 10,22 - inx h ;pt to first option -; -; Print Each Option -; -flow5: - mov a,m ;get next char - ora a ;done? - jz flow6 - call cout ;print char - inx h ;pt to 2nd char - mov a,m ;get it and print - call cout - call print - db ' ',0 ;space over - inx h ;skip address - inx h - inx h - jmp flow5 -; -; Print Current IF Level -; -flow6: - call gxymsg - db 11,20 - db 1,'Current IF Level: ',2,0 - call getmsg ;pt to ZCPR3 messages - inx h ;pt to IF byte - mov a,m ;get IF byte - mvi c,'0' ;assume level 0 - ora a ;see if at last IF level - jz flow8 -flow7: - inr c ;advance to next level - rrc ;rotate bits - ani 7fh ;mask out MSB - jnz flow7 ;continue looping until no 1 bits -flow8: - mov a,c ;get digit - call cout ;print it -; -; Print RCP Data -; -rcp: - call gxymsg - db 14,23 - db '---- ',1,'RESIDENT COMMAND PACKAGE',2,' ----',0 - call getrcp ;get RCP data - jnz rcp0 - call gxymsg - db 16,20 - db 'Resident Command Facility Not Available',0 - jmp getcmd -; -; Check for Resident Command Package Loaded -; -rcp0: - mov a,m ;get first byte - ora a ;0=none loaded - jnz rcp1 - call gxymsg - db 16,23 - db 'No Resident Command Package Loaded',0 - jmp getcmd -; -; Print Resident Command Package Info -; -rcp1: - call gxymsg - db 16,20 - db 1,'Resident Commands:',2,0 - lxi d,5 ;skip to command size byte - dad d - mov b,m ;get command size - mvi c,0 ;set count - inx h ;pt to first command - mvi d,17 ;set row - mvi e,22 ;set column - xchg - call gotoxy ;position cursor - xchg -; -; Print Each Resident Command Name -; -rcp2: - mov a,m ;get table entry - ora a ;end of table? - jz getcmd - push b ;save counters -rcp3: - mov a,m ;get char - inx h ;pt to next - call cout - dcr b ;count down - jnz rcp3 - call print - db ' ',0 - inx h ;pt to next command - inx h - pop b ;get counters - inr c ;increment entry counter - mov a,c ;check for done - ani 7 ;every 8 - jnz rcp2 - xchg ;position cursor - inr h ;next row - call gotoxy - xchg - jmp rcp2 - -; -; **** Print Error Handler Data **** -; -errorh: - call banner - call gxymsg - db 3,27 - db '--> ',1,'Error Handler Data',2,' <--',0 - call getmsg ;get message address - jnz errh1 - call gxymsg - db 5,20 - db 'ZCPR3 Messages Not Available on this System',0 - jmp getcmd -errh1: - call gxymsg - db 5,27 - db 1,'Error Handler Engaged? ',2,0 - call geter1 ;error handler engaged? - push psw - call pryn ;print yes/no - pop psw - jz getcmd ;exit display - call gxymsg - db 6,27 - db 1,'Error Handler Command: ',2,0 - call geterc ;get command line - call pstr - call gxymsg - db 7,30 - db 1,'Command Status: ',2,0 - mvi a,22h ; offset to message ptr - call compenv ; pt to message ptr - mov a,m - inx h - mov h,m - mov l,a ; HL pts to messages - inx h ; pt to command status message - inx h - inx h - mov a,m ; get it - ani 3 ; 2 LSBs - jz errh3 - cpi 1 - jz errh4 - call print - db 'Error',0 - inx h ; pt to error address - mov a,m ; get low - inx h - mov h,m ; get high - mov l,a - call gxymsg - db 9,5 - db 1,'Error Command --',2,0 - call vprint - db cr,lf,1,' --> ',2,0 -errh2: - mov a,m ; get char - inx h ; pt to next - ora a ; end of line? - jz errh5 - cpi ';' ; end of command with new command? - jnz errh2a - call vprint - db 1,';',2,cr,lf,1,' --> ',2,0 - jmp errh2 -errh2a: - call cout ; print char - jmp errh2 -errh3: - call print - db 'Normal',0 - jmp errh5 -errh4: - call print - db 'Shell',0 -errh5: - jmp getcmd - -; -; **** Print Shell Stack Data **** -; -shstack: - call banner - call gxymsg - db 3,28 - db '--> ',1,'Shell Stack Data',2,' <--',0 - call getsh ;get shell data - jnz shs0 - call gxymsg - db 5,20 - db 'Shell Stack NOT Available on this System',0 - jmp getcmd -; -; Print Empty/Full Messages -; -shs0: - call gxymsg - db 5,30 - db 'Shell Stack Empty? ',0 - call shempty - jz shsem - mvi a,0 ; set not empty - jmp shsnem -shsem: - mvi a,1 ; set empty -shsnem: - call pryn - call gxymsg - db 6,30 - db 'Shell Stack Full? ',0 - call shfull - jz shsfu - mvi a,0 ; set not full - jmp shsnfu -shsfu: - mvi a,1 ; set full -shsnfu: - call pryn -; -; Print Shell Stack Content Data -; - call gxymsg - db 8,27 - db '--- Shell Stack Content ---',0 - mvi h,10 ;row 10 - mvi l,20 ;col 20 - shld infoxy ;save position - call getsh ;get shell stack data - mov e,b ;get element size in DE - mvi d,0 - mov b,a ;get element count in B - mvi c,'1' ;get digit in C -shs1: - mov a,m ;check for element in stack - ora a ;0=empty - jz shs2 - call dispxy ;position for display - call vprint - db 1,'Elt ',0 - mov a,c ;get digit - call cout ;print as decimal - inr c ;next digit - call vprint - db ' -- ',2,0 - push h - call pstr ;print entry - pop h - dad d ;pt to next - dcr b ;count down - jnz shs1 -shs2: - mov a,c ;see if anything printed - cpi '1' - jnz getcmd - lhld infoxy ;position on screen - call gotoxy - call print - db ' Empty',0 - jmp getcmd - -; -; Position Display at INFOXY address and advance -; -dispxy: - push h ;save HL - lhld infoxy ;get screen position - call gotoxy ;go there - inr h ;advance to next line - shld infoxy ;set screen position - pop h ;restore HL - ret -; -; If A=0, print Yes, else print No -; -pryn: - ora a - jnz pryes - call print - db 'NO',0 - ret -pryes: - call print - db 'YES',0 - ret - -; -; Buffers -; -showcmd: - db 'SHOW ',0 -infoxy: - ds 2 ;address on screen of next line to print -cstat: - ds 2 ;command status ptr -dumpstrt: - ds 2 ;address of next byte to start memory dump -cline: - ds 2 ;address of current line - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SHSET.COM b/Source/Images/d_bp/u15/SHSET.COM deleted file mode 100644 index cd0c0c53..00000000 Binary files a/Source/Images/d_bp/u15/SHSET.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SHSET.MAC b/Source/Images/d_bp/u15/SHSET.MAC deleted file mode 100644 index bcb36983..00000000 --- a/Source/Images/d_bp/u15/SHSET.MAC +++ /dev/null @@ -1,207 +0,0 @@ -; PROGRAM: SHSET -; VERSION: 1.0 -; DATE: 19 July 84 -; AUTHOR: Richard Conn -; PREVIOUS VERSIONS: None -; -z3env equ 0f400h -VERS EQU 10 ;version number - -; SHSET is copyright (c) 1984 by Richard Conn -; All Rights Reserved -; SHSET may be used freely by the ZCPR3 Community - -; -; SHSET is used to establish a command line as a shell. It pushes -; the command line (including semicolons) which follow the verb SHSET onto -; the shell stack if it fits. -; -; Syntax: -; SHSET cmd1;cmd2;... -; -; The sequence of commands "cmd1;cmd2;..." becomes the shell. -; - -; -; SYSLIB, Z3LIB, and VLIB References -; - ext z3init - ext shpush,getcl1,getcl2,putshm,getsh,getsh2 - ext eprint,phlfdc - ext codend - -; -; Basic Definitions -; -TRUE EQU 0FFH ;define true and.. -FALSE EQU 0 ;..false. - -; -; System Addresses -; -OS$BASE EQU 000H ;system base.. -BDOS EQU OS$BASE+05H -FCB EQU OS$BASE+5CH -FCB2 EQU OS$BASE+6CH -TBUFF EQU OS$BASE+80H -TPA EQU OS$BASE+100H - -; -; ASCII Chars -; -LF EQU 0AH ;..linefeed.. -CR EQU 0DH ;..carriage return.. - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Mainline -; - call z3init ;initialize the ZCPR3 Env - -; -; Print Prompt -; - call eprint - db 'SHSET, Version ' - db (VERS/10)+'0','.',(VERS MOD 10)+'0' - db 0 - lda fcb+1 ;check for help request - cpi '/' ;help? - jz help - cpi ' ' - jnz shinit -; -; Print Help Message -; -help: - call eprint - db cr,lf,' Syntax: SHSET cmd1;cmd2;...' - db cr,lf,' SHSET defines the command sequence to be a shell' - db 0 - ret -; -; Initialize Shell -; -shinit: - call shtest1 ;there must be a shell stack - call shtest2 ;there must be a command line buffer -; -; HL now points to the command line buffer -; - call codend ;pt to free area - xchg ;... in DE - lxi h,tbuff+1 ;pt to option input - mov a,m ;check for no input - ora a ;none if zero - jz checkcl - inx h ;pt to first good char - call copystr ;copy string -checkcl: - call getcl2 ;get address of command line - jz setsh ;set shell command - call copystr ;copy string -setsh: - call codend ;pt to string - call shpush ;push onto shell stack - jnz sherr ;error? -; -; Set Shell Messages -; - mvi a,0 ;Zero Message 0 - mvi b,0 - call putshm -; - mvi a,0 ;Zero Message 1 - mvi b,1 - call putshm -; - call eprint - db ' Shell Installed',0 -; -exit: - call getcl2 ;terminate following command - mvi m,0 ;set ending 0 - ret -; -; Error in Shell Stack Installation -; -sherr: - cpi 2 ;shell stack full - jnz sherr1 - call eprint - db ' Shell Stack Full',0 - jmp exit -sherr1: - call eprint - db ' Shell Entry too Large -- Limit is ',0 - call getsh2 ;get limit in DE - xchg - call phlfdc ;print as floating decimal - call eprint - db ' Characters',0 - jmp exit - -; -; Check for Presence of Shell Stack -; -shtest1: - call getsh ;get shell stack data - rnz - pop psw ;clear stack - call eprint - db ' No Shell Stack',0 - ret - -; -; Check for Command Line -; -shtest2: - call getcl1 ;get command line data - rnz - pop psw ;clear stack - call eprint - db ' No Command Line',0 - ret - -; -; Copy string from HL to DE -; Store ending 0 and leave pointer in DE to it -; -copystr: - mov a,m ;get char - stax d ;store it - ora a ;done? - rz - inx h ;pt to next - inx d - jmp copystr - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SHUTILS2.LBR b/Source/Images/d_bp/u15/SHUTILS2.LBR deleted file mode 100644 index 7f73512f..00000000 Binary files a/Source/Images/d_bp/u15/SHUTILS2.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/SHVAR.COM b/Source/Images/d_bp/u15/SHVAR.COM deleted file mode 100644 index 508d2448..00000000 Binary files a/Source/Images/d_bp/u15/SHVAR.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SHVAR.MAC b/Source/Images/d_bp/u15/SHVAR.MAC deleted file mode 100644 index 2a996a24..00000000 --- a/Source/Images/d_bp/u15/SHVAR.MAC +++ /dev/null @@ -1,656 +0,0 @@ -; -; Program: SHVAR -; Author: Richard Conn -; Version: 1.0 -; Date: 5 Mar 84 -; -version equ 10 - -; -; SHVAR is used to define a shell variable for the Shell SH. -; It makes entries into the file SH.VAR in the ROOT directory. The -; syntax of its use is: -; SHVAR variable text <-- define/redefine variable -; SHVAR variable <-- delete variable -; SHVAR <-- list variables -; - -; -; Equates for Key Values -; -z3env SET 0f400h ;address of ZCPR3 environment -backup equ 0 ;backup old file? 1 for yes, 0 for no -ctrlz equ 'Z'-'@' ;^Z for EOF -fcb equ 5ch -tbuff equ 80h -cr equ 0dh -lf equ 0ah - -; -; External Z3LIB and SYSLIB Routines -; - ext cout,qcout,getquiet,sort,crlf - ext sksp,fillb,moveb - ext initfcb,f$open,f$read,f$close,f$make,f$delete,f$write,f$rename - ext z3init,qprint,codend,hmovb,root,logud,getwhl,print - ext getfn1,pfn1,cline - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Environment - call banner ;print banner -; -; Check for Wheel -; - call getwhl ;get wheel byte - jnz start0 - call print - db cr,lf,' Not Wheel - Aborting',0 - ret -; -; Try to Load Variables -; -start0: -; -; Check for Help -; - lda fcb+1 ;get first char of FCB - cpi '/' ;also help? - jnz start0x -; -; Print Help Message -; - call print - db cr,lf,'SHVAR - Define/Redefine/Delete a Shell Variable' - db cr,lf,'Syntax:' - db cr,lf,' SHVAR variable text <-- to Define/Redefine' - db cr,lf,' SHVAR variable <-- to Delete' - db cr,lf,' SHVAR <-- to List Variable Names' - db 0 - ret -; -; Define File to Work With -; -start0x: - call getfn1 ;get name of shell - lxi d,shvfcb+1 ;variable FCB - mvi b,11 ;11 chars - mov a,m ;any name given? - cpi ' ' ;space if none - cnz moveb ;set name -; -; Define $$$ and BAK Files -; - lxi h,shvfcb+1 - lxi d,shvtmp+1 ;set $$$ name - mvi b,8 ;8 chars - call moveb -; - if backup - lxi d,shvbak+1 ;set BAK name - call moveb - endif -; -; -; Save Command Line -; - lxi h,tbuff ;save line - call cline - shld lineptr ;set ptr to line -; -; Load Variables -; - call varload - jnz start1 -; -; Initialize Shell Variables if File Not Found -; - call print - db cr,lf,' Shell Variable File ',0 - lxi d,shvfcb+1 - call pfn1 - call print - db ' Not Found',0 - ret -; -; Process User Command -; -start1: - lda fcb+1 ;check for list option - cpi ' ' ;no args = list - jz list - call doit ;process command - call varsave ;save new shell variables - ret -; -; Print Names of Variables -; -list: - call lpack ;pack just names - xchg ;set ptr to ptr table - inx h - shld ptrbuf ;ptr buffer for sort - lhld vcount ;run sort? - mov a,h - ora l - cnz lsort ;sort names - call print - db cr,lf,' Shell Variables --',cr,lf,0 - mvi c,0 ;set counter - call codend ;pt to first variable - mov a,m ;empty? - cpi ctrlz - jnz list1 - call print - db ' -- No Variables Defined --',0 - ret -; -; Print Next Variable -; -list1: - mov a,m ;end of list? - cpi ctrlz - jz list3 - call print - db ' ',0 - mvi b,8 ;print 8 chars -list2: - mov a,m ;get char - inx h ;pt to next - call cout ;print it - dcr b ;count down - jnz list2 - inr c ;increment count - mov a,c ;new line? - ani 3 - cz crlf - jmp list1 -list3: - mov a,c ;new line to end? - ani 3 - cnz crlf - ret -; -; Sort Variables -; -lsort: - call codend ;pt to first variable - shld ssb ;set ptr - lxi d,ssb ;pt to SSB - jmp sort ;perform sort -; -; Compare Routine -; -compare: - push h ;save regs - push d - push b - mvi b,8 ;8 chars -comp1: - ldax d ;get char - cmp m ;compare - jnz comp2 - inx h ;pt to next - inx d - dcr b ;count down - jnz comp1 -comp2: - pop b ;restore regs - pop d - pop h - ret - -; -; Pack Variables Down to a Minimum (Just 8-char Names) -; -lpack: - lxi h,0 ;set count - shld vcount - call codend ;pt to first variable - mov d,h ;DE=HL - mov e,l -lpack1: - mov a,m ;get next char - stax d ;set possible EOF - cpi ctrlz ;done? - rz - push h ;increment variable count - lhld vcount - inx h - shld vcount - pop h - mvi b,8 ;save 8 chars -lpack2: - mov a,m ;get next char - stax d ;store it - inx h ;pt to next - inx d - dcr b ;count down - jnz lpack2 -lpack3: - mov a,m ;skip to next variable - inx h - ora a ;done? - jnz lpack3 - jmp lpack1 ;resume -; -; Input and Process User Commands -; -doit: - call nadd ;add/delete/redefine variable -; -; Pack Names -; -pack: - call codend ;pack entries in table - mov d,h ;HL=DE - mov e,l -; -; Check Next Entry -; -pack1: - mov a,m ;get next char - stax d ;put it - cpi ctrlz ;done? - rz - cpi ' ' ;deleted? - jz pack3 -; -; Copy Entry -; -pack2: - mov a,m ;get char - stax d ;put it - inx h ;pt to next - inx d - ora a ;done? - jnz pack2 - jmp pack1 ;resume -; -; Skip Entry -; -pack3: - mov a,m ;get char - inx h ;pt to next - ora a ;done? - jnz pack3 - jmp pack1 ;resume - -; -; Add Names to Table -; -nadd: - lhld lineptr ;pt to user line - call sksp ;skip to first non-blank - ora a ;done? - rz ;exit if no change - call qprint - db cr,lf,' Shell Variable ',0 -; -; Copy Input Name into Shell Buffer SHVAR -; - push h ;save ptr to name - lxi h,shvar ;init name buffer - mvi a,' ' ;space fill - mvi b,8 ;8 chars - call fillb - xchg ;pt to buffer in DE - pop h ;pt to name - mvi b,8 ;8 chars max -nadd1: - mov a,m ;get name char - call delck ;check for delimiter - jz nadd3 - stax d ;store char - call qcout ;print chars of variable name - inx h ;pt to next - inx d - dcr b ;count down - jnz nadd1 -nadd2: - mov a,m ;flush to delimiter - inx h - call delck ;check for delimiter - jnz nadd2 - dcx h ;pt to delimiter -; -; Search for Name -; -nadd3: - shld lineptr ;set ptr to rest of line - call codend ;pt to first element -; -; Check for End of Entries -; -nadd4: - mov a,m ;get first char of next string - cpi ctrlz - jz addit ;add name at HL -; -; Compare Names -; - lxi d,shvar ;pt to variable - mvi b,8 ;compare - shld curname ;save ptr to current name in case of delete -nadd5: - ldax d ;check for duplicate - cmp m - jnz nadd6 - inx h ;pt to next - inx d - dcr b ;count down - jnz nadd5 - jmp nadd7 -; -; No Match, so Skip Rest of String -; -nadd6: - mov a,m ;skip to end of string - inx h ;pt to next - ora a ;done? - jnz nadd6 - jmp nadd4 ;resume -; -; Match - Determine What User Wants to Do -; -nadd7: - lhld lineptr ;see if any text follows name - call sksp ;skip to text - ora a ;EOL? - jz delete ;delete name -; -; Redefine Name -; - lhld curname ;pt to name in buffer - mvi b,8 ;space fill it - mvi a,' ' - call fillb - jmp nadd6 ;resume in case another duplicate -; -; Delete Name -; -delete: - call qprint - db ' Deleted',0 - lhld curname ;pt to name in buffer - mvi b,8 ;space fill it - mvi a,' ' - call fillb - ret -; -; Add Name -; -addit: - call qprint - db ' = ',0 - shld curname ;save ptr to new name - xchg ;dest in DE - lxi h,shvar ;pt to name - mvi b,8 ;8 chars - call hmovb ;copy name into buffer - xchg ;pt to after name with HL - push h ;save ptr - mvi m,0 ;store ending 0 and ^Z in case of abort - inx h - mvi m,ctrlz ;store ^Z - lhld lineptr ;point to user text - call sksp ;skip to non-space - pop d ;pt to destination -; -; Copy User Input into Buffer -; -addit1: - mov a,m ;get char - stax d ;put char - ani 7FH ;done? - cnz qcout ;print chars of definition - inx h ;pt to next - inx d - ora a ;done? - jnz addit1 - mvi a,ctrlz ;mark end - stax d - ret - -; -; Print Banner -; -banner: - call qprint - db 'SHVAR, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db 0 - ret -; -; Check to see if char in A is a delimiter -; Return with Z if so -; -delck: - push h ;pt to table - push b ;save BC - mov b,a ;char in B - lxi h,dtable ;pt to delimiter table -delck1: - mov a,m ;get delimiter - ora a ;done? - jz notdel - cmp b ;compare - jz yesdel - inx h ;pt to next - jmp delck1 -notdel: - mov a,b ;get char - ora a ;set Z if null, else NZ -yesdel: - mov a,b ;restore char - pop b ;restore regs - pop h - ret - -; -; Delimiter Table -; -dtable: - db '<>;:,.=-_ ',0 - -; -; Save Shell Variable List -; Return with Z if Error -; -varsave: - call getquiet ;get quiet flag - jnz vars0 - call print - db cr,lf,' Writing Shell Variable File ',0 - lxi d,shvfcb+1 - call pfn1 ;print file name -vars0: - lxi d,shvtmp ;open temp - call initfcb - call f$delete ;delete if any exists - call f$make ;create new file - inr a ;error? - rz - call codend ;pt to scratch area -; -; Save Loop -; -vars1: - lxi d,tbuff ;copy into buffer - mvi b,128 ;128 bytes - call hmovb - lxi d,shvtmp ;write block - call f$write - jnz werr ;write error - lxi d,tbuff ;check for done - mvi b,128 ;128 bytes -; -; Check for Done -; -vars2: - ldax d ;look for ^Z - cpi ctrlz - jz varsx - inx d ;pt to next - dcr b ;count down - jnz vars2 - jmp vars1 -; -; Done -; -varsx: - lxi d,shvtmp ;close temp file - call f$close -; -; Delete Old Backup File SH.BAK -; - if backup -; - lxi d,shvbak ;delete any old backups - call initfcb - call f$delete -; -; Create New Backup File SH.BAK=SH.VAR -; - lxi h,shvbak ;new name - lxi d,shvfcb ;old name - call f$rename ;create backup file -; - else -; -; Delete Original File -; - lxi d,shvfcb ;pt to FCB - call initfcb - call f$delete -; - endif ;backup -; -; Create New Shell Variable File SH.VAR=SH.$$$ -; - lxi h,shvfcb ;new name - lxi d,shvtmp ;old name - call f$rename ;create new file - xra a ;return OK - dcr a ;NZ - ret -; -; File Write Error -; -werr: - call print - db cr,lf,'Error in Writing File - Aborting',0 - xra a ;error code - ret - -; -; Load Shell Variable List -; Return with Z if Error -; -varload: -; -; Look for Variable File -; - call root ;determine DU of root - call logud ;goto root - call codend ;pt to scratch area - mvi m,ctrlz ;prep for no file - lxi d,shvfcb ;try to open file - call initfcb ;init FCB - call f$open - rnz ;file not found -; -; Read in Variable File -; -varl1: - lxi d,shvfcb ;read in file - call f$read - jnz varl2 - lxi d,tbuff ;pt to data - xchg ;copy into memory - mvi b,128 ;128 bytes - call hmovb - xchg - jmp varl1 -varl2: - lxi d,shvfcb ;close file - call f$close -; -; Say List is Already Loaded -; - xra a ;return NZ for OK - dcr a - ret - -; -; Buffers -; -lineptr: - ds 2 ;ptr to next char in line -curname: - ds 2 ;ptr to current variable name -shvar: - ds 8 ;shell variable name -; - if backup -shvbak: - db 0 - db 'SH ' ;name of shell variable file - db 'BAK' - ds 24 ;36 bytes total - endif ;backup -; -shvtmp: - db 0 - db 'SH ' ;name of shell variable file - db '$$$' - ds 24 ;36 bytes total -shvfcb: - db 0 - db 'SH ' ;name of shell variable file - db 'VAR' - ds 24 ;36 bytes total -; -; Sort Specification Block -; -ssb: - ds 2 ;address of first record -vcount: - ds 2 ;number of records to sort - dw 8 ;size of each record in bytes - dw compare ;compare routine -ptrbuf: - ds 2 ;address of pointer buffer - dw 0ffh ;use pointers - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SHVAR11.LBR b/Source/Images/d_bp/u15/SHVAR11.LBR deleted file mode 100644 index 433e2372..00000000 Binary files a/Source/Images/d_bp/u15/SHVAR11.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/SUB.COM b/Source/Images/d_bp/u15/SUB.COM deleted file mode 100644 index a57d3572..00000000 Binary files a/Source/Images/d_bp/u15/SUB.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SUB.MAC b/Source/Images/d_bp/u15/SUB.MAC deleted file mode 100644 index 3c85e0a9..00000000 --- a/Source/Images/d_bp/u15/SUB.MAC +++ /dev/null @@ -1,1043 +0,0 @@ -; -; PROGRAM NAME: SUB -; AUTHOR: RICHARD CONN (From SuperSUB Ver 1.1 by Ron Fowler) -; VERSION: 3.0 -; DATE: 18 May 84 -; PREVIOUS VERSIONS: 2.3 (6 Jan 83) - Called SUB2.ASM -; PREVIOUS VERSIONS: 2.2 (7 DEC 82), 2.1 (14 NOV 82), 2.0 (11 OCT 82) -; PREVIOUS VERSIONS: 1.4 (10 OCT 81), 1.3 (7 OCT 81) -; PREVIOUS VERSIONS: 1.2 (5 OCT 81), 1.1 (3 OCT 81), 1.0 (1 OCT 81) -; NOTE: FOR USE WITH ZCPR3 -; -VERS EQU 30 -z3env SET 0f400h - -; -; SUB is derived from Ron's SuperSUB program; it provides a different -; format for the command line, a command-search hierarchy like ZCPR3, a -; resetting of the DMA address, several additional functions, and there are -; several other additions/changes. Additionally, ZCPR3-specific enhancements, -; such as appending the rest of the multiple command line to the command file -; and allowing multiple commands on a single line, are permitted. -; -; SuperSUB, VERSION 1.1 (09/13/81) by Ron Fowler -; 2/18/81 (first written) WESTLAND, MICH. -; -; -; This program is intended as a replacement for the -; SUBMIT program provided with CP/M. It provides sev- -; eral new facilities: -; 1) Nestable SUBMIT runs -; 2) Interactive entry of SUBMIT job (no need -; to use an editor for simple SUBMIT runs) -; 3) Command line entry of small SUBMIT jobs -; 4) Ability to enter blank lines in an edited -; SUBMIT file -; 5) User customization of number of parameters -; and drive to send $$$.SUB to -; - -; -; DEFINE BOOLEANS -; -FALSE EQU 0 -TRUE EQU NOT FALSE - -; -; -- User customizable options -- -; - -FORCE$SUB EQU FALSE ;TRUE IF SUBMITTED FILE MUST BE OF TYPE .SUB -TIME$CONST EQU 0C000H ;DELAY FOR RINGING BELL -NPAR EQU 10 ;NUMBER OF ALLOWABLE PARAMETERS -CPBASE EQU 0 ;SET TO 4200H FOR HEATH CP/M -OPT EQU '/' ;OPTION DELIMITER CHAR -PDELIM EQU '$' ;PARAMETER DELIMITER - -; -; SYSLIB AND Z3LIB ROUTINES -; - EXT Z3INIT,PFIND,GETCL1 - EXT LOGUD,GETUD,PUTUD - EXT INITFCB - EXT PSTR,PRINT,QPRINT,COUT,CRLF,CAPS,PHLDC - EXT CODEND - -; -; CP/M DEFINITIONS -; -FGCHAR EQU 1 ;GET CHAR FUNCTION -DIRIOF EQU 6 ;DIRECT CONSOLE I/O -RDBUF EQU 10 ;READ CONSOLE BUFFER -LOGIN EQU 14 ;LOG IN DISK -OPENF EQU 15 ;OPEN FILE FUNCTION -CLOSEF EQU 16 ;CLOSE FILE FUNCTION -DELETF EQU 19 ;DELETE FILE FUNCTION -READF EQU 20 ;READ RECORD FUNCTION -WRITEF EQU 21 ;WRITE RECORD FUNCTION -MAKEF EQU 22 ;MAKE (CREATE) FILE FUNCTION -GETDSK EQU 25 ;RETURN CURRENT DISK -SETDMA EQU 26 ;SET DMA ADDRESS -UCODE EQU 32 ;GET/SET USER CODE -; -UDFLAG EQU CPBASE+4 -BDOS EQU CPBASE+5 -; -CURIND EQU '$' ;CURRENT USER/DISK INDICATOR -FCB EQU 5CH ;DEFAULT FILE CONTROL BLOCK -FCBEX EQU 12 ;FCB OFFSET TO EXTENT FIELD -FCBRC EQU 15 ;FCB OFFSET TO RECORD COUNT -FCBNR EQU 32 ;FCB OFFSET TO NEXT RECORD -FN EQU 1 ;FCB OFFSET TO FILE NAME -FT EQU 9 ;FCB OFFSET TO FILE TYPE -TBUF EQU CPBASE+80H ;DEFAULT BUFFER -TPA EQU CPBASE+100H ;TRANSIENT PROGRAM AREA -; -PUTCNT EQU TBUF ;COUNTER FOR OUTPUT CHARS -; -; DEFINE SOME TEXT CHARACTERS -; -CTRLC EQU 'C'-'@' -CTRLZ EQU 'Z'-'@' -BEL EQU 7 ;RING BELL -CR EQU 13 ;CARRIAGE RETURN -LF EQU 10 ;LINE FEED -TAB EQU 9 - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - LXI H,0 ;SAVE STACK IN CASE - DAD SP ; ONLY HELP REQUESTED - SHLD SPSAVE ;(NOT OTHERWISE USED) - CALL PUTUD ;SAVE HOME DIR - CALL QPRINT - DB 'SUB Version ',VERS/10+'0','.',(VERS MOD 10)+'0',0 - - CALL CODEND ;SET UP EXTERNAL BUFFERS - SHLD CLBUF ;SET PTR - MVI M,128 ;ALLOW 128 CHARS - LXI D,100H ;FREE SPACE - DAD D ;PT TO FREE AREA - SHLD FREMEM ;SET PTR TO FREE MEMORY AREA - SPHL ;SET STACK PTR - - LDA FCB+1 ;ANYTHING ON CMD LINE? - CPI ' ' - JZ HELP ;NO, GO PRINT HELP - CALL INITVAR ;INITIALIZE THE VARIABLE AREA - CALL GETPAR ;GET COMMAND LINE PARAMETERS AND EXTRACT OPTION - CALL ABORT ;PERFORM ABORT IF FLAG SET - CALL SETUP ;SET UP READ OF SUBMIT FILE - CALL RDFILE ;READ THE SUBMIT FILE - CALL WRSET ;SET UP WRITE OF "$$$.SUB" - CALL WRSUB ;WRITE "$$$.SUB" - JMP CPBASE ;GO START THE SUBMIT -; -; SETUP SETS UP THE FILE CONTROL BLOCK -; FOR READING IN THE .SUB TEXT FILE -; -SETUP: - LXI H,FCB+FT ;LOOK AT FIRST CHAR OF - MOV A,M ;FILE TYPE. IF IT IS - CPI ' ' ;BLANK, THEN GO MOVE - JZ PUTSUB ;"SUB" INTO FT FIELD - - IF FORCE$SUB ;FILE TYPE MUST BE OF .SUB - LXI D,SUBTYP ;FILE TYPE MUST BE .SUB - MVI B,3 ;3 BYTES - CALL COMPAR - JNZ NOTFND ;FILE NOT FOUND IF NO TYPE MATCH - ENDIF - - RET ; IF NOT BLANK, THEN ACCEPT ANY FILE TYPE -; -; MOVE "SUB" INTO THE FILE TYPE -; -PUTSUB: - XCHG ;BY CONVENTION, MOVE FROM - LXI H,SUBTYP ; @HL TO @DE - MVI B,3 - CALL MOVE - RET -; -; MOVE # BYTES IN B REGISTER FROM @HL TO @DE -; -MOVE: - MOV A,M ;PICK UP - STAX D ;PUT DOWN - INX H ;I'M SURE - INX D ; YOU'VE SEEN THIS - DCR B ; BEFORE... - JNZ MOVE ;100 TIMES AT LEAST - RET ;I KNOW I HAVE! -; -; GETPAR MOVES THE SUBSTITUTION PARAMETERS SPECIFIED -; IN THE COMMAND LINE INTO MEMORY, AND STORES THEIR -; ADDRESSES IN THE PARAMETER TABLE. THIS ALLOWS -; SUBSTITUTION OF $1, $2, ETC., IN THE SUBMIT COMMANDS -; WITH THEIR ACTUAL VALUES SPECIFED IN THE COMMAND -; LINE. -; -GETPAR: - XRA A ;A=0 - STA AFLAG ;TURN OFF ABORT COMMAND - LXI H,TBUF+1 ;WHERE WE FIND THE COMMAND TAIL - CALL SCANTO ;SKIP SUBMIT FILE NAME - STA OPTION ;FIRST CHAR OF CMD LINE IS OPTION - RC ;LINE ENDED? - CPI OPT ;NO, CHECK OPTION - JNZ GLP0 ;NOT KEYBOARD INP, READ FILE - INX H ;POINT PAST '/' - MOV A,M ;GET OPTION CHAR - CPI 'A' ;ABORT COMMAND - JZ GPARABT - CPI 'I' ;INTERACTIVE MODE - RZ ;RETURN IF SO - JMP HELP ;HELP OTHERWISE -GPARABT: - MVI A,0FFH ;TURN ON ABORT FLAG - STA AFLAG - INX H ;GET POSSIBLE BELL OPTION - MOV A,M - CPI 'B' ;BELL OPTION - RNZ - MVI A,0FFH ; SET BELL FLAG - STA BELL$FLAG - RET -GLP0: - MOV A,M ;INPUT IS FROM A .SUB FILE..THIS - INX H ; CODE SKIPS OVER THE NAME OF - ORA A ; THE SUB FILE TO GET TO THE - RZ ; COMMAND LINE PARAMETERS - CPI ' ' - JZ GLP - CPI TAB - JNZ GLP0 -GLP: - CALL SCANTO ;PASS UP THE BLANKS - RC ;CY RETURNED IF END OF CMD LINE - CALL PUTPAR ;NOW PUT THE PARAMETER INTO MEM - RC ;CY RETURNED IF END OF CMD LINE - JMP GLP ;GET THEM ALL -; -; SCANTO SCANS PAST BLANKS TO THE FIRST NON-BLANK. IF -; END OF COMMAND LINE FOUND, RETURNS CARRY SET. -; -SCANTO: - MOV A,M - INX H - ORA A ;SET FLAGS ON ZERO - STC ;IN CASE ZERO FOUND (END OF CMD LIN) - RZ - CPI ' ' - JZ SCANTO ;SCAN PAST BLANKS - CPI TAB ;DO TABS TOO, JUST FOR - JZ SCANTO ; GOOD MEASURE - DCX H ;FOUND CHAR, POINT BACK TO IT - ORA A ;INSURE CARRY CLEAR - RET -; -; PUTPAR PUTS THE PARAMETER POINTED TO BY HL INTO -; MEMORY POINTED TO BY "TXTPTR". ALSO STORES THE -; ADDRESS OF THE PARAMETER INTO THE PARAMETER TABLE -; FOR EASY ACCESS LATER, WHEN WE WRITE $$$.SUB -; -PUTPAR: - PUSH H ;SAVE POINTER TO PARM - LHLD TXTPTR ;NEXT FREE MEMORY - XCHG ; INTO DE - LHLD TBLPTR ;NEXT FREE AREA OF TABLE - MOV A,M ;NON-ZERO IN TABLE - ORA A ; INDICATES TABLE - JNZ PAROVF ; TABLE OVERFLOW (TOO MANY PARMS) - MOV M,E ;STORE THE PARM ADRS - INX H - MOV M,D - INX H - SHLD TBLPTR ;SAVE TABLE PNTR FOR NEXT TIME - POP H ;GET BACK PARM POINTER - PUSH D ;SAVE FREE MEM POINTER BECAUSE - ; WE WILL HAVE TO HAVE IT BACK - ; LATER TO STORE THE LENGTH - INX D ;POINT PAST LENGTH STORAGE - MVI B,0 ;INITIALIZE LENGTH OF PARM -PPLP: - MOV A,M ;GET NEXT BYTE OF PARM - INX H - ORA A ;TEST FOR END OF CMD LINE - JZ PP2 ;JUMP IF END - CPI ' ' ;TEST FOR END OF COMMAND - JZ PP2 - CPI TAB ;TAB ALSO ENDS COMMAND - JZ PP2 - STAX D ;PUT PARAMETER BYTE-BY-BYTE - INX D ;INTO FREE MEMORY - INR B ;BUMP LENGTH - JMP PPLP -PP2: - XCHG - SHLD TXTPTR ;NEW FREE MEMORY POINTER - POP H ;REMEMBER OUR LENGTH POINTER? - MOV M,B ;STORE THE LENGTH - XCHG ;HAVE TO RETN HL > CMD LINE - ORA A ;NOW RETURN END OF LINE FLAG - STC - RZ ;RETURN CY IF ZERO (EOL MARK) - CMC - RET -; -; -; ABORT CHECKS TO SEE IF THE ABORT FLAG IS SET AND -; EXECUTES THE ABORT FUNCTION IF SO -; -; -ABORT: - LDA AFLAG ;GET THE FLAG - ORA A ;0=NO - RZ - CALL PRINT - DB CR,LF,' Strike ^C to Abort Command File - ',0 - CALL CHARINB ;GET RESPONSE - CPI CTRLC ;ABORT? - JNZ ABORT1 ;RETURN TO OPSYS -ABORT0: - LXI D,SUBFCB ;DELETE SUBMIT FILE - MVI C,DELETF - CALL BDOS - CALL PRINT - DB ' ... Aborted',0 - JMP CPBASE ;RETURN TO CP/M -ABORT1: - CALL PRINT - DB ' ... Continuing',0 - JMP CPBASE ; RETURN TO CP/M -; -; INPUT CHAR FROM CON:; RING BELL EVERY SO OFTEN IF FLAG SET -; -CHARINB: - LDA BELL$FLAG ; GET FLAG - ORA A ; 0=NO - JZ CHARIN - PUSH H ; SAVE HL -CHARINB$LOOP: - LXI H,TIME$CONST ; GET TIME CONSTANT -CHARINB$LOOP1: - XTHL ; LONG DELAY - XTHL - DCX H ; COUNT DOWN - MOV A,H - ORA L - JNZ CHARINB$LOOP1 - MVI E,0FFH ; REQUEST STATUS - MVI C,DIRIOF ; DIRECT I/O - CALL BDOS - ORA A ; ANY INPUT? - JNZ CHARINB$DONE - MVI E,BEL ; RING BELL - MVI C,DIRIOF - CALL BDOS - JMP CHARINB$LOOP -CHARINB$DONE: - POP H ; RESTORE HL - JMP CAPS ; CAPITALIZE CHAR - -; -; INPUT CHAR FROM CON:; CAPITALIZE IT AND ECHO -; -CHARIN: - MVI C,FGCHAR ;GET CHAR - CALL BDOS - JMP CAPS ;CAPITALIZE -; -; RDFILE READS THE .SUB FILE SPECIFIED -; IN THE SUBMIT COMMAND INTO MEMORY -; -RDFILE: - LXI H,0 ;INIT LINE NUMBER - SHLD LINNUM - LDA OPTION ;USING A FILE? - CPI OPT ;OPT OPTION TELLS - JNZ RDFILE1 ;JUMP IF NOT - CALL PRINT - DB CR,LF,' Input Command Lines',0 - CALL CLFILL ;GET FIRST LINE - JMP LINE -RDFILE1: - CALL PRINT - DB CR,LF,' Processing SUB File',0 - -; CHECK FOR .SUB FILE IN CURRENT USER/CURRENT DISK - LXI D,FCB ;WE ARE, OPEN IT - CALL INITFCB ;INIT FCB - MVI A,0FFH ;SEARCH CURRENT ALSO - CALL PFIND ;LOOK FOR FILE - JZ NOTFND ;FILE NOT FOUND - CALL LOGUD ;LOG INTO DIRECTORY - LXI D,FCB ;PT TO FCB - MVI C,OPENF ;OPEN FILE - CALL BDOS - CALL FILL ;READ FIRST BLOCK - JNZ NOTEXT ;EMPTY FILE -LINE: - LHLD LINNUM ;BUMP LINE NUMBER - INX H - SHLD LINNUM - LHLD PREV ;GET PREV PREVIOUS LINE POINTER - XCHG - LHLD TXTPTR ;GET CURRENT FREE MEM POINTER - SHLD PREV ;MAKE IT THE PREV LINE (FOR NXT PASS) - MOV M,E ;STORE AT BEGIN OF CURRENT LINE, - INX H ; A POINTER TO THE PREVIOUS - MOV M,D - INX H - PUSH H ;LATER WE WILL PUT LENGTH HERE - INX H ;SKIP PAST LENGTH - MVI C,0 ;INITIALIZE LENGTH TO ZERO -LLP: - CALL GNB ;GET NEXT BYTE FROM INPUT SOURCE - CPI CTRLZ ;END OF FILE? - JZ EOF ;CY SET IF END OF FILE FOUND - ANI 7FH ;MASK OUT MSB - CALL CAPS ;CONVERT TO UPPER CASE - CPI LF ;IGNORE LINEFEEDS - JZ LLP - CPI CR ;IF IT'S A CARRIAGE RETURN, - JZ EOL ; THEN DO END OF LINE - MOV M,A ;STORE ALL OTHERS INTO MEMORY - INX H - CALL SIZE ;MAKE SURE NO MEMORY OVERFLOW - INR C ;BUMP CHAR COUNT - JM LENERR ;MAX OF 128 CHARS PER LINE - JMP LLP ;GO DO NEXT CHAR -; -; DO END OF LINE SEQUENCE -; -EOL: - SHLD TXTPTR ;SAVE FREE MEMORY POINTER - POP H ;CURRENT LINE'S LENGTH POINTER - MOV M,C ;STORE LENGTH AWAY - JMP LINE ;GO DO NEXT LINE -; -; END OF TEXT FILE -; -EOF: - SHLD TXTPTR ;SAVE FREE MEMORY POINTER - PUSH B ;SAVE LINE LENGTH - CALL ZMCL ;LOAD REST OF COMMAND LINE - POP B ;RESTORE LINE LENGTH - POP H ;CURRENT LINE'S LENGTH POINTER - MOV M,C ;STORE LENGTH AWAY - RET ;ALL DONE READING SUB FILE -; -; COPY COMMAND LINE INTO MEMORY BUFFER -; -ZMCL: - CALL GETCL1 ;GET ADDRESS OF COMMAND LINE BUFFER - MOV A,H ;CHECK FOR ANY - ORA L - RZ - LHLD LINNUM ;BUMP LINE NUMBER - INX H - SHLD LINNUM - LHLD PREV ;GET PREV PREVIOUS LINE POINTER - XCHG - LHLD TXTPTR ;GET CURRENT FREE MEM POINTER - SHLD PREV ;MAKE IT THE PREV LINE (FOR NXT PASS) - MOV M,E ;STORE AT BEGIN OF CURRENT LINE, - INX H ; A POINTER TO THE PREVIOUS - MOV M,D - INX H - PUSH H ;LATER WE WILL PUT LENGTH HERE - INX H ;SKIP PAST LENGTH - MVI C,0 ;INITIALIZE LENGTH TO ZERO - XCHG ;DE PTS TO NEXT PLACE TO STORE A BYTE - CALL GETCL1 ;GET ADDRESS OF COMMAND LINE BUFFER - MOV A,M ;GET LOW - INX H - MOV H,M ;GET HIGH - MOV L,A ;HL PTS TO FIRST BYTE OF MULTIPLE COMMAND LINE - MOV B,M ;GET FIRST CHAR IN LINE - MVI M,0 ;CLEAR LINE - MOV A,B ;CHECK TO SEE IF FIRST CHAR IS A SEMICOLON (CMD SEP) - CPI ';' - JNZ ZMCL0 - INX H ;PT TO 2ND CHAR - MOV A,M ;FIRST WAS A SEMICOLON, SO GET SECOND -ZMCL0: - XCHG ;HL PTS TO NEXT BUFFER SPACE, DE PTS TO MC LINE - JMP ZMCL1A ;A=FIRST CHAR IN MC LINE -; -; MAJOR LOOP TO STORE MULTIPLE COMMAND LINE -; -ZMCL1: - LDAX D ;GET NEXT BYTE FROM MULTIPLE COMMAND LINE -ZMCL1A: - ORA A ;0=EOL - JZ ZMCL2 - ANI 7FH ;MASK OUT MSB - CALL CAPS ;CONVERT TO UPPER CASE - MOV M,A ;STORE CHAR INTO MEMORY - INX H ;PT TO NEXT CHAR - INX D - CALL SIZE ;MAKE SURE NO MEMORY OVFL - INR C ;INCR CHAR COUNT - JM LENERR ;MAX OF 128 CHARS IN LINE - JMP ZMCL1 -; -; DONE WITH INPUT OF MULTIPLE COMMAND LINE -- SAVE CHAR CNT AND SET PTR -; -ZMCL2: - SHLD TXTPTR ;SAVE PTR - POP H ;PT TO CHAR COUNT POSITION - MOV M,C ;STORE CHAR COUNT - RET - -; -; GET NEXT BYTE FROM INPUT FILE OR USER -; -GNB: - PUSH H ;DON'T ALTER ANYBODY - PUSH D - PUSH B - LDA OPTION ;INPUT FROM .SUB FILE? - CPI OPT ;TOLD BY ORIG CMD LINE OPTION - JNZ GNBDISK ;GET NEXT CHAR FROM DISK BUFFER IF NOT FROM USER - CALL GNBKBD ;GET A BYTE FROM KBD INPUT - JMP GNBXIT ;THEN LEAVE -; -; GET NEXT BYTE FROM DISK FILE -; -GNBDISK: - LDA IBP ;GET BUFFER POINTER - CPI 128 ;NEED ANOTHER BLOCK FROM DISK? - JC GNBD1 ;CONTINUE - CALL FILL ;GET NEXT BLOCK - JZ GNBD1 ;CONTINUE IF NOT EMPTY - CALL GETUD ;RETURN HOME - MVI A,1AH ;FAKE EOF - JMP GNBXIT -GNBD1: - MOV E,A ;PUT OFFSET IN DE - MVI D,0 - INR A ;POINT TO NEXT BYTE - STA IBP ;SAVE FOR NEXT - LXI H,TBUF ;NOW OFFSET INTO BUFFER - DAD D - MOV A,M ;GET CHAR -GNBXIT: - POP B ;RESTORE EVERYBODY - POP D - POP H - ORA A ;TURN ON CARRY - RET -; -; FILL INPUT BUFFER FROM DISK -; -FILL: - XRA A ;CLEAR INPUT BUFFER PTR - STA IBP - LXI D,FCB ;PT TO FCB - MVI C,READF ;BDOS READ BLOCK FUNCTION - CALL BDOS - ORA A ;RETURN Z IF EOF - MVI A,0 ;SET PTR TO FIRST CHAR - RET -; -; GET NEXT BYTE FROM USER (KEYBOARD INPUT) -; -GNBKBD: - LHLD CLPTR ;PT TO NEXT CHAR - MOV A,M ;GET IT - INX H ;PT TO FOLLOWING - SHLD CLPTR ;RESET PTR - CPI CR ;END OF LINE? - RNZ - CALL CLFILL ;GET NEW LINE - JZ GKEND ;EMPTY LINE INPUT - RETURN EOF - MVI A,CR ;RETURN CR TO INDICATE END OF LINE - RET -GKEND: - MVI A,1AH ;RETURN EOF - RET -; -; FILL THE COMMAND LINE FROM THE USER -; -CLFILL: - CALL PRINT - DB CR,LF,' Command Line? ',0 - LHLD CLBUF ;NOW FILL THE BUFFER - XCHG ;...DE PTS TO IT - MVI C,RDBUF - CALL BDOS - LHLD CLBUF ;PT TO COMMAND LINE BUFFER - INX H - MOV A,M ;GET CHAR COUNT - INX H - SHLD CLPTR ;RESET THE COMMAND LINE PTR - ORA A ;SET ZERO FLAG - PUSH PSW ;SAVE A - ADD L ;PT TO AFTER LAST CHAR - MOV L,A - MOV A,H - ACI 0 - MOV H,A - MVI M,CR ;SET EOL CHAR - POP PSW ;GET CHAR COUNT - RET -; -; MAKE SURE NO MEMORY OVERFLOW -; -SIZE: - LDA BDOS+2 ;HIGHEST PAGE POINTER - SUI 9 ;MAKE IT BE UNDER CCP - CMP H ;CHECK IT AGAINST CURRENT PAGE - RNC ;NC=ALL OKAY - JMP MEMERR ;OTHERWISE ABORT -; -; SET UP THE $$$.SUB FILE -; FOR WRITING -; -WRSET: - CALL PRINT - DB CR,LF,' Writing Command File to Disk',0 - LXI D,SUBFCB - MVI C,OPENF - CALL BDOS ;OPEN THE FILE - INR A ;CHECK CPM RETURN - JZ NONE1 ;NONE EXISTS ALREADY -; -; $$$.SUB EXISTS, SO SET -; FCB TO APPEND TO IT -; - LDA SUBFCB+FCBRC ;GET RECORD COUNT - STA SUBFCB+FCBNR ;MAKE NEXT RECORD - RET -; -; COME HERE WHEN NO $$$.SUB EXISTS -; -NONE1: - LXI D,SUBFCB - MVI C,MAKEF - CALL BDOS - INR A - JZ NOMAKE ;0FFH=CAN'T CREATE FILE - RET -; -; WRITE THE "$$$.SUB" FILE -; -WRSUB: - LHLD PREV ;THIS CODE SCANS BACKWARD - MOV A,H ; THRU THE FILE STORED IN - ORA L ; MEMORY TO THE FIRST NON- - JZ NOTEXT ; NULL LINE. IF NONE IS - MOV E,M ; FOUND, ABORTS - INX H - MOV D,M ;HERE, WE PICK UP PNTR TO PREV LINE - INX H ;NOW WE POINT TO LENGTH - XCHG ;WE NEED TO STORE AWAY - SHLD PREV ; POINTER TO PREV LINE - XCHG - MOV A,M ;NOW PICK UP THE LENGTH - ORA A ;SET Z FLAG ON LENGTH - JNZ WRNTRY ;GOT LINE W/LENGTH: GO DO IT - LHLD LINNUM ;NOTHING HERE, FIX LINE NUMBER - DCX H ;(WORKING BACKWARD NOW) - SHLD LINNUM - JMP WRSUB -WRLOP: - LHLD PREV ;GET PREV LINE POINTER - MOV A,H - ORA L ;IF THERE IS NO PREV LINE - JZ CLOSE ; THEN WE ARE DONE - MOV E,M ;ELSE SET UP PREV FOR NEXT - INX H ; PASS THRU HERE - MOV D,M - INX H - XCHG ;NOW STORE IT AWAY - SHLD PREV - XCHG -WRNTRY: - CALL PUTLIN ;WRITE THE LINE TO THE FILE - LHLD LINNUM ;BUMP THE LINE NUMBER - DCX H ;DOWN (WORKING BACK NOW) - SHLD LINNUM - JMP WRLOP -; -; $$$.SUB IS WRITTEN, CLOSE THE FILE -; -CLOSE: - LXI D,SUBFCB - MVI C,CLOSEF - JMP BDOS -; -; THIS SUBROUTINE WRITES A LINE -; TO THE $$$.SUB FILE BUFFER, -; AND FLUSHES THE BUFFER AFTER -; THE LINE IS WRITTEN. -; -PUTLIN: - MOV A,M ;PICK UP LENGTH BYTE - INX H ;POINT PAST IT - STA GETCNT ;MAKE A COUNT FOR "GET" - SHLD GETPTR ;MAKE A POINTER FOR "GET" - LXI H,TBUF+1 ;TEXT GOES AFTER LENGTH - SHLD PUTPTR ;MAKE POINTER FOR "PUT" - XRA A ;INITIALIZE PUT COUNT - STA PUTCNT - MOV B,L ;COUNT FOR CLEAR LOOP -CLR: - MOV M,A ;ZERO OUT BUFFER LOC - INX H - INR B ;COUNT - JNZ CLR -; -; THIS LOOP COLLECTS CHARACTERS -; FROM THE LINE STORED IN MEMORY -; AND WRITES THEM TO THE FILE. -; IF THE "$" PARAMETER SPECIFIER -; IS ENCOUNTERED, PARAMETER SUB- -; STITUTION IS DONE -; -PUTLP: - CALL GETCHR ;PICK UP A CHARACTER - JC FLUSH ;CY = NO MORE CHAR IN LINE - CPI '^' ;CONTROL-CHAR TRANSLATE PREFIX? - JNZ NOTCX - CALL GETCHR ;YES, GET THE NEXT - JC CCERR ;ERROR: EARLY END OF INPUT - SUI '@' ;MAKE IT A CONTROL-CHAR - JC CCERR ;ERROR: TOO SMALL - CPI ' ' - JNC CCERR ;ERROR: TOO LARGE -NOTCX: - CPI PDELIM ;PARAMETER SPECIFIER? - JNZ STOBYT ;IF NOT, JUST WRITE CHAR - LDA OPTION ;CHECK OPTION: '$' DOESN'T - CPI OPT ; COUNT IN OPT MODE - MVI A,PDELIM ;(RESTORE THE '$') - JZ STOBYT - CALL LKAHED ;PEEK AT NEXT CHAR - JC PARERR ;LINE ENDING MEANS PARAM ERR - CPI PDELIM ;ANOTHER "$"? - JNZ SUBS ;IF NOT THEN GO DO SUBSTITUTION - CALL GETCHR ;GET THE 2ND "$" (WE ONLY LOOKED - ; AHEAD BEFORE) -STOBYT: - CALL PUTCHR ;WRITE CHAR TO FILE - JMP PUTLP -; -; PARAMETER SUBSTITUTION...LOOKS UP THE -; PARAMETER # AFTER THE "$" AND PLUGS IT -; IN IF IT EXISTS. -; -SUBS: - CALL NUMTST ;IT BETTER BE A NUMBER - JC PARERR ; OTHERWISE PARAM ERROR - MVI B,0 ;INITIALIZE PARM # - JMP LPNTRY ;WE JOIN LOOP IN PROGRESS... -SUBLP: - CALL LKAHED ;LOOK AT NEXT CHAR - JC DOSUBS ;IF LINE EMPTY, THEN PLUG IN PARM - CALL NUMTST ;CHECK FOR NUMERIC - JC DOSUBS ;DONE IF NOT -LPNTRY: - CALL GETCHR ;NOW REMOVE THE CHAR FROM INPUT STREAM - SUI '0' ;REMOVE ASCII BIAS - MOV C,A ;SAVE IT - MOV A,B ;OUR ACCUMULATED COUNT - ADD A ;MULTIPLY BY TEN - ADD A - ADD B - ADD A - ADD C ;THEN ADD IN NEW DIGIT - MOV B,A ;RESTORE COUNT - JMP SUBLP -; -; PERFORM THE SUBSTITUTION -; -DOSUBS: - MOV A,B ;GET PARM # - DCR A ;MAKE ZERO RELATIVE - JM PARERR ;OOPS - CALL LOOKUP ;LOOK IT UP IN PARM TABLE - JC PARERR ;IT'S NOT THERE - MOV B,A ;LENGTH IN B -SUBLP1: - INR B ;TEST B FOR ZERO - DCR B - JZ PUTLP ;DONE - MOV A,M ;GET CHAR OF REAL PARAMETER - INX H ;POINT PAST FOR NEXT TIME - PUSH H ;SAVE REAL PARM POINTER - CALL PUTCHR ;PUT IT IN THE FILE - POP H ;GET BACK REAL PARM POINTER - DCR B ;COUNTDOWN - JMP SUBLP1 -; -; COME HERE WHEN A LINE IS FINISHED, -; AND WE NEED TO WRITE THE BUFFER TO DISK -; -FLUSH: - LXI D,SUBFCB - MVI C,WRITEF - CALL BDOS - ORA A - JNZ WRERR ;CPM RETURNED A WRITE ERROR - RET -; -; GETCHR GETS ONE CHAR FROM -; LINE STORED IN MEMORY -; -GETCHR: - LXI H,GETCNT - MOV A,M ;PICK UP COUNT - DCR A ;REMOVE THIS CHAR - STC ;PRESET ERROR - RM ;RETURN CY IF OUT OF CHARS - MOV M,A ;UPDATE COUNT - LHLD GETPTR ;CURRENT CHAR POINTER - MOV A,M ;PICK UP CHAR - INX H ;BUMP POINTER - SHLD GETPTR ;PUT IT BACK - CMC ;TURN CARRY OFF - RET -; -; PUTCHR PUTS ONE CHAR TO -; THE OUTPUT BUFFER -; -PUTCHR: - LXI H,PUTCNT - INR M ;INCREMENT COUNT - JM LENERR ;LINE WENT TO > 128 CHARS - LHLD PUTPTR ;GET BUFFER POINTER - ANI 7FH ;MASK OUT MSB - MOV M,A ;PUT CHAR THERE - INX H ;BUMP POINTER - SHLD PUTPTR ;PUT IT BACK - RET ;ALL DONE -; -; LOOK AHEAD ONE CHAR IN -; THE INPUT STREAM. SET -; CARRY IF NONE LEFT. -; -LKAHED: - LDA GETCNT - ORA A ;SEE IF COUNT IS DOWN TO ZERO - STC ;PRE SET INDICATOR - RZ - MOV A,M ;PICK UP CHAR - CMC ;TURN OFF CARRY FLAG - RET -; -; LOOK UP PARAMETER WITH NUMBER IN -; A REG. RETURN A=LENGTH OF PARM, -; AND HL => PARAMETER -; -LOOKUP: - CPI NPAR - JNC PAROVF ;PARM # TOO HIGH - MOV L,A - MVI H,0 ;NOW HAVE 16 BIT NUMBER - DAD H ;DOUBLE FOR WORD OFFSET - LXI D,TABLE - DAD D ;DO THE OFFSET - MOV E,M ;GET ADDRESS OF PARM - INX H - MOV D,M - MOV A,D ;ANYTHING THERE? - ORA E - JNZ LKUPOK - XRA A ;NO, ZERO LENGTH - RET -LKUPOK: - XCHG ;NOW IN DE - MOV A,M ;PICK UP LENGTH - INX H ;POINT PAST LENGTH - RET -; -; UTILITY COMPARE SUBROUTINE -; -COMPAR: - LDAX D - CMP M - RNZ - INX H - INX D - DCR B - JNZ COMPAR - RET -; -; NUMERIC TEST UTILITY SUBROUTINE -; -NUMTST: - CPI '0' - RC - CPI '9'+1 - CMC - RET -; -; ERROR HANDLERS -; -WRERR: - CALL ERRXIT - DB 'Disk Full',0 -NOMAKE: - CALL ERRXIT - DB 'Dir Full',0 -MEMERR: - CALL ERRXIT - DB 'Mem Full',0 -NOTFND: - CALL ERRXIT - DB 'SUB File Not Found',0 -PARERR: - CALL ERRXIT - DB 'Param',0 -PAROVF: - CALL ERRXIT - DB 'Too Many Params',0 -LENERR: - CALL ERRXIT - DB 'Line too Long',0 -NOTEXT: - CALL ERRXIT - DB 'SUB File Empty',0 -CCERR: - CALL ERRXIT - DB 'Ctrl Char',0 -ERRXIT: - CALL CRLF ;NEW LINE - POP H - CALL PSTR ;PRINT MESSAGE - CALL PRINT - DB ' Error on Line ',0 - LHLD LINNUM ;TELL LINE NUMBER - CALL PHLDC - CALL CRLF - LXI D,SUBFCB ;DELETE THE $$$.SUB FILE - MVI C,DELETF - CALL BDOS - JMP CPBASE -; -; INITIALIZE ALL VARIABLES -; -INITVAR: - LXI H,VAR - LXI B,ENDVAR-VAR -INITLP: - MVI M,0 ;ZERO ENTIRE VAR AREA - INX H - DCX B - MOV A,B - ORA C - JNZ INITLP - LXI H,TABLE ;INIT PARM TABLE POINTER - SHLD TBLPTR - LXI H,0FFFFH ;MARK END OF TABLE - SHLD ENDTBL - LHLD FREMEM ;FREE MEMORY STARTS TXT AREA - SHLD TXTPTR - RET -; -; PRINT HELP WITH PROGRAM OPTIONS -; -HELP: - CALL PRINT - DB CR,LF,'Syntax:' - DB CR,LF,' SUB - Print this HELP Message' - DB CR,LF,' SUB /A - Abort of SUBMIT File' - DB CR,LF,' SUB /AB - Abort and Ring Bell' - DB CR,LF,' SUB /I - Go into Interactive mode' - DB CR,LF,' SUB - Standard SUB File' - DB 0 - LHLD SPSAVE ;RETURN TO OPSYS - SPHL - RET -; -; VARIABLE STORAGE -; -VAR EQU $ -; -AFLAG: - DB 0 ;ABORT FLAG (0=NO) -TXTPTR: - DW 0 ;FREE MEMORY POINTER -TBLPTR: - DW 0 ;POINTER TO PARM TABLE -DUSER: - DB 0 ;DEFAULT USER NUMBER -LINNUM: - DW 0 ;CURRENT LINE NUMBER -PREV: - DW 0 ;POINTER TO PREV LINE -GETCNT: - DB 0 ;COUNTER FOR 'GET' -GETPTR: - DW 0 ;POINTER FOR 'GET' -PUTPTR: - DW 0 ;POINTER FOR 'PUT' -IBP: - DB 0 ;INPUT BUFFER POINTER -CLPTR: - DW 0 ;COMMAND LINE POINTER -BELL$FLAG: - DB 0 ;RING BELL ON ABORT FLAG -OPTION: - DB 0 ;OPT OPTION FLAG STORE -TABLE: - DS NPAR*3 ;PARAMETER TABLE -ENDTBL: - DW 0FFFFH ;END OF PARAMETER TABLE -; -ENDVAR EQU $ -SPSAVE: - DW 0 ;STACK POINTER SAVE -; -; -; FCB FOR $$$.SUB -; -SUBFCB: - DB 1 ;DRIVE SPECIFIER (A SELECTED) - DB '$$$ ' -SUBTYP: - DB 'SUB' - DW 0,0,0,0 ;INITIALIZE REST OF FCB - DW 0,0,0,0 - DW 0,0,0,0 -; -CLBUF: DS 2 ;PTR TO COMMAND LINE BUFFER -FREMEM: DS 2 ;PTR TO FREE MEMORY AREA -; - END - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSENV.AQM b/Source/Images/d_bp/u15/SYSENV.AQM deleted file mode 100644 index 6c7f6b16..00000000 Binary files a/Source/Images/d_bp/u15/SYSENV.AQM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SYSENV.ASM b/Source/Images/d_bp/u15/SYSENV.ASM deleted file mode 100644 index 3ffe2e7d..00000000 --- a/Source/Images/d_bp/u15/SYSENV.ASM +++ /dev/null @@ -1,31 +0,0 @@ -* SYSTEM SEGMENT: SYSTEM.ENV -* AUTHOR: RICHARD CONN - -; PROGRAM: SYSENV.ASM -; AUTHOR: Richard Conn -; Version: 1.0 -; Date: 22 Feb 84 -; Previous Versions: None - -; -; SYSENV is the definition for my ZCPR3 environment, and it is loaded -; as my ZCPR3 Environment Descriptor by Z3LDR. SYSENV is named to SYS.ENV -; after assembly to permit this. -; - -; -; Environment Definitions -; - MACLIB Z3BASE - MACLIB SYSENV - -; -; Include Environment Descriptor -; - org 100H ; origin - jmp 0 ; leading JMP - - SYSENV - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSENV.LIB b/Source/Images/d_bp/u15/SYSENV.LIB deleted file mode 100644 index 501f6bdb..00000000 --- a/Source/Images/d_bp/u15/SYSENV.LIB +++ /dev/null @@ -1,136 +0,0 @@ -; LIBRARY: SYSENV.LIB -; AUTHOR: Richard Conn -; Version: 1.0 -; Date: 18 May 84 -; Previous Versions: None - -; -; SYSENV is the definition for my ZCPR3 environment. -; - -sysenv macro -; -; Environment Descriptor -; If inline, there is a leading JMP just before this -; -envorg1: - db 'Z3ENV' ; Environment ID - db 2 ; class 2 environment (internal) - - dw expath ; external path address - db expaths ; number of 2-byte elements in path - - dw rcp ; RCP address - db rcps ; number of 128-byte blocks in RCP - - dw iop ; IOP address - db iops ; number of 128-byte blocks in IOP - - dw fcp ; FCP address - db fcps ; number of 128-byte blocks in FCP - - dw z3ndir ; NDR address - db z3ndirs ; number of 18-byte entries in NDR - - dw z3cl ; ZCPR3 Command Line - db z3cls ; number of bytes in Command Line - - dw z3env ; ZCPR3 Environment Descriptor - db z3envs ; number of 128-byte blocks in Descriptor - - dw shstk ; Shell Stack address - db shstks ; number of shsize-byte entires in Shell Stack - db shsize ; size of a Shell Stack entry - - dw z3msg ; ZCPR3 Message buffer - - dw extfcb ; ZCPR3 External FCB - - dw extstk ; ZCPR3 External Stack - - db 0 ; quiet flag (1=quiet, 0=not quiet) - - dw z3whl ; address of Wheel Byte - - db 4 ; Processor Speed in MHz - - db 'D'-'@' ; maximum disk - db 31 ; maximum user - - db 1 ; 1=OK to accept DU, 0=not OK - - db 0 ; CRT selection (0=CRT 0, 1=CRT 1) - db 0 ; Printer selection (n=Printer n) - - db 80 ; width of CRT 0 - db 24 ; number of lines on CRT 0 - db 22 ; number of lines of text on CRT 0 - - db 132 ; width of CRT 1 - db 24 ; number of lines on CRT 1 - db 22 ; number of lines of text on CRT 1 - - db 80 ; width of Printer 0 - db 66 ; number of lines on Printer 0 - db 58 ; number of lines of text on Printer 0 - db 1 ; form feed flag (0=can't formfeed, 1=can) - - db 102 ; width of Printer 1 - db 66 ; number of lines on Printer 1 - db 58 ; number of lines of text on Printer 1 - db 1 ; form feed flag (0=can't formfeed, 1=can) - - db 80 ; width of Printer 2 - db 66 ; number of lines on Printer 2 - db 58 ; number of lines of text on Printer 2 - db 0 ; form feed flag (0=can't formfeed, 1=can) - - db 102 ; width of Printer 3 - db 66 ; number of lines on Printer 3 - db 58 ; number of lines of text on Printer 3 - db 0 ; form feed flag (0=can't formfeed, 1=can) - - db 'SH ' ; shell variable filename - db 'VAR' ; shell variable filetype - - db ' ' ; filename 1 - db ' ' ; filetype 1 - - db ' ' ; filename 2 - db ' ' ; filetype 2 - - db ' ' ; filename 3 - db ' ' ; filetype 3 - - db ' ' ; filename 4 - db ' ' ; filetype 4 - - ds 80H-($-envorg1+3) ; make exactly 80H bytes long - ; (+3 compensates for leading JMP) -; -; Terminal Capabilities Data -; -envorg2: - DB 'TVI 950 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'V'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 1bh,'*',0 ;CL String - DB 1bh,'=%+ %+ ',0 ;CM String - DB 1bh,'t',0 ;CE String - DB 1bh,')',0 ;SO String - DB 1bh,'(',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String - - ds 80H-($-envorg2) ; make exactly 80H bytes long - -; -; End of Environment Descriptor -; - endm - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSFCP.AQM b/Source/Images/d_bp/u15/SYSFCP.AQM deleted file mode 100644 index dcf0eeaf..00000000 Binary files a/Source/Images/d_bp/u15/SYSFCP.AQM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SYSFCP.ASM b/Source/Images/d_bp/u15/SYSFCP.ASM deleted file mode 100644 index d559fab3..00000000 --- a/Source/Images/d_bp/u15/SYSFCP.ASM +++ /dev/null @@ -1,945 +0,0 @@ -* SYSTEM SEGMENT: SYS.FCP -* SYSTEM: ZCPR3 -* CUSTOMIZED BY: RICHARD CONN - -* -* PROGRAM: SYSFCP.ASM -* AUTHOR: RICHARD CONN -* VERSION: 1.0 -* DATE: 22 FEB 84 -* PREVIOUS VERSIONS: NONE -* -VERSION EQU 10 - -* -* Global Library which Defines Addresses for SYSTEM -* - MACLIB Z3BASE ; USE BASE ADDRESSES - MACLIB SYSFCP ; USE EQUATES FROM HEADER FILE - -; -LF EQU 0AH -CR EQU 0DH -BELL EQU 07H -; -BASE EQU 0 -WBOOT EQU BASE+0000H ;CP/M WARM BOOT ADDRESS -UDFLAG EQU BASE+0004H ;USER NUM IN HIGH NYBBLE, DISK IN LOW -BDOS EQU BASE+0005H ;BDOS FUNCTION CALL ENTRY PT -TFCB EQU BASE+005CH ;DEFAULT FCB BUFFER -FCB1 EQU TFCB ;1st and 2nd FCBs -FCB2 EQU TFCB+16 -TBUFF EQU BASE+0080H ;DEFAULT DISK I/O BUFFER -TPA EQU BASE+0100H ;BASE OF TPA -; -$-MACRO ;FIRST TURN OFF THE EXPANSIONS -; -; MACROS TO PROVIDE Z80 EXTENSIONS -; MACROS INCLUDE: -; -; JR - JUMP RELATIVE -; JRC - JUMP RELATIVE IF CARRY -; JRNC - JUMP RELATIVE IF NO CARRY -; JRZ - JUMP RELATIVE IF ZERO -; JRNZ - JUMP RELATIVE IF NO ZERO -; DJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO -; -; @GENDD MACRO USED FOR CHECKING AND GENERATING -; 8-BIT JUMP RELATIVE DISPLACEMENTS -; -@GENDD MACRO ?DD ;;USED FOR CHECKING RANGE OF 8-BIT DISPLACEMENTS - IF (?DD GT 7FH) AND (?DD LT 0FF80H) - DB 100H,?DD ;Displacement Range Error - ELSE - DB ?DD - ENDIF ;;RANGE ERROR - ENDM -; -; -; Z80 MACRO EXTENSIONS -; -JR MACRO ?N ;;JUMP RELATIVE - IF I8080 ;;8080/8085 - JMP ?N - ELSE ;;Z80 - DB 18H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRC MACRO ?N ;;JUMP RELATIVE ON CARRY - IF I8080 ;;8080/8085 - JC ?N - ELSE ;;Z80 - DB 38H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRNC MACRO ?N ;;JUMP RELATIVE ON NO CARRY - IF I8080 ;;8080/8085 - JNC ?N - ELSE ;;Z80 - DB 30H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRZ MACRO ?N ;;JUMP RELATIVE ON ZERO - IF I8080 ;;8080/8085 - JZ ?N - ELSE ;;Z80 - DB 28H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRNZ MACRO ?N ;;JUMP RELATIVE ON NO ZERO - IF I8080 ;;8080/8085 - JNZ ?N - ELSE ;;Z80 - DB 20H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -DJNZ MACRO ?N ;;DECREMENT B AND JUMP RELATIVE ON NO ZERO - IF I8080 ;;8080/8085 - DCR B - JNZ ?N - ELSE ;;Z80 - DB 10H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -* -* SYSTEM Entry Point -* - org fcp ; passed for Z3BASE - - db 'Z3FCP' ; Flag for Package Loader -* -* **** Command Table for FCP **** -* This table is FCP-dependent! -* -* The command name table is structured as follows: -* -* ctable: -* DB 'CMNDNAME' ; Table Record Structure is -* DW cmndaddress ; 8 Chars for Name and 2 Bytes for Adr -* ... -* DB 0 ; End of Table -* -cnsize equ 4 ; NUMBER OF CHARS IN COMMAND NAME - db cnsize ; size of text entries -ctab: - db 'IF ' - dw ifstart - db 'ELSE' - dw ifelse - db 'FI ' - dw ifend - db 'XIF ' - dw ifexit - db 0 -; -; Condition Table -; -condtab: -; - IF IFOTRUE - db 'T ' ;TRUE - dw ifctrue - db 'F ' ;FALSE - dw ifcfalse - ENDIF -; - IF IFOEMPTY - db 'EM' ;file empty - dw ifcempty - ENDIF -; - IF IFOERROR - db 'ER' ;error message - dw ifcerror - ENDIF -; - IF IFOEXIST - db 'EX' ;file exists - dw ifcex - ENDIF -; - IF IFOINPUT - db 'IN' ;user input - dw ifcinput - ENDIF -; - IF IFONULL - db 'NU' - dw ifcnull - ENDIF -; - IF IFOTCAP ;Z3 TCAP available - db 'TC' - dw ifctcap - ENDIF -; - IF IFOWHEEL ;Wheel Byte - db 'WH' - dw ifcwheel - ENDIF -; - db 0 - -* -* Print " IF" -* -prif: - call print - db 'IF',' '+80H - ret -* -* Print String (terminated in 0 or MSB Set) at Return Address -* -print: - IF NOISE - mvi a,' ' ;print leading space - call conout - ENDIF ;NOISE - xthl ; get address - call print1 - xthl ; put address - ret -* -* Print String (terminated by MSB Set) pted to by HL -* -print1: - mov a,m ; done? - inx h ; pt to next - call conout ; print char - ora a ; set MSB flag (M) - rm ; MSB terminator - jr print1 - -* -* **** FCP Routines **** -* All code from here on is FCP-dependent! -* - -; -; FCP Command: XIF -; XIF terminates all IFs, restoring a basic TRUE state -; -ifexit: - IF NOISE - call nl ;print new line - ENDIF ;NOISE - call iftest ;see if current IF is running and FALSE - jrz ifstat ;abort with status message if so - lxi h,z3msg+1 ;pt to IF flag - xra a ;A=0 - mov m,a ;zero IF flag - jr ifendmsg ;print message - -; -; FCP Command: FI -; FI decrements to the previous IF -; -; Algorithm: -; Rotate Current IF Bit (1st IF Message) Right 1 Bit Position -; -ifend: - IF NOISE - call nl ;print new line - ENDIF ;NOISE - lxi h,z3msg+1 ;pt to IF flag - mov a,m ;get it - ora a ;no IF active? - jrz ifnderr -ifendmsg: - IF NOISE - push psw ;save A - call print - db 'T','o'+80H ;prefix to status display - pop psw ;get A - ENDIF ;NOISE - rrc ;move right 1 bit - ani 7fh ;mask msb 0 - mov m,a ;store active bit - jrnz ifstat ;print status if IF still active -ifnderr: - IF NOISE - call print ;print message - db 'N','o'+80H - jmp prif - ELSE ;NOT NOISE - ret - ENDIF ;NOISE - -; -; FCP Command: ELSE -; ELSE complements the Active Bit for the Current IF -; -; Algorithm: -; If Current IF is 0 (no IF) or 1 (one IF), then toggle -; Active IF Bit associated with Current IF -; Else -; If Previous IF was Active then toggle -; Active IF Bit associated with Current IF -; Else do nothing -; -ifelse: - IF NOISE - call nl ;print new line - ENDIF ;NOISE - lxi h,z3msg+1 ;pt to IF msgs - mov a,m ;get current IF - mov b,a ;save current IF in B - inx h ;pt to active IF message - rrc ;back up to previous IF level - ani 7fh ;mask out possible carry - jrz iftog ;toggle if IF level is 0 or 1 - ana m ;determine previous IF status - jrz ifstat ;don't toggle, and just print status -iftog: - mov a,m ;get active IF message - cma ;flip bits - ana b ;look at only interested bit - mov c,a ;result in C - mov a,b ;complement IF byte - cma - mov b,a - mov a,m ;get active byte - ana b ;mask in only uninterested bits - ora c ;mask in complement of interested bit - mov m,a ;save result and fall thru to print status -; -; Indicate if current IF is True or False -; -ifstat: - IF NOISE - call prif - mvi b,'F' ;assume False - call iftest ;see if IF is FALSE (Z if so) - jrz ifst1 ;Zero means IF F or No IF - mvi b,'T' ;set True -ifst1: - mov a,b ;get T/F flag and fall thru to print it - ELSE ;NOT NOISE - ret - ENDIF ;NOISE - -; -; Console Output Routine -; -conout: - push h ; save regs - push d - push b - push psw - ani 7fh ; mask MSB - mov e,a ; char in E - mvi c,2 ; output - call bdos - pop psw ; get regs - pop b - pop d - pop h - ret - -; -; Output LF (to go with CR from ZCPR3) -; -nl: - mvi a,lf ;output LF - jr conout - -; -; FCP Command: IF -; -ifstart: - IF NOISE - call nl ;print new line - ENDIF ;NOISE - call iftest ;see if current IF is running and FALSE -; - IF NOT COMIF - jrz ifcfalse ;raise next IF level to FALSE if so - ELSE - jz ifcf - ENDIF ;NOT COMIF -; - -;**************************************************************** -;* * -;* IF.COM Processing * -;* * -;**************************************************************** - -; -; If IF.COM to be processed, goto ROOT (base of path) and load it -; - IF COMIF -; -; Get Current Disk and User in BC -; - lda udflag ;get UD - push psw ;save UD flag - ani 0fh ;get disk - sta cdisk ;set current disk - mov b,a ;B=disk (A=0) - pop psw ;get UD flag - rlc ;get user in low 4 bits - rlc - rlc - rlc - ani 0fh ;get user - sta cuser ;set current user - mov c,a ;... in C -; -; Pt to Start of Path -; - lxi h,expath ;pt to path -; -; Check for End of Path -; -fndroot: - mov a,m ;check for done - ora a ;end of path? - jrz froot2 -; -; Process Next Path Element -; - cpi '$' ;current disk? - jrnz froot0 - lda cdisk ;get current disk - inr a ;+1 for following -1 -froot0: - dcr a ;set A=0 - mov b,a ;set disk - inx h ;pt to user - mov a,m ;get user - cpi '$' ;current user? - jrnz froot1 - lda cuser ;get current user -froot1: - mov c,a ;set user - inx h ;pt to next - jr fndroot -; -; Done with Search - BC Contains ROOT DU -; -froot2: -; -; Log Into ROOT -; - call logbc ;log into root DU -; -; Set Address of Next Load and Set DMA for OPEN -; - lxi h,100h ;pt to TPA - shld nxtload ;set address for next load - xchg ;DE=100H so don't wipe out buffers - mvi c,26 ;set DMA - call bdos -; -; Try to Open File IF.COM -; - lxi d,extfcb ;pt to FCB - mvi c,15 ;open file - call bdos - inr a ;check for found - jz ifnotfnd -; -; Load File IF.COM -; -ifload: -; -; Set Load Address -; - lhld nxtload ;get address of next load - push h ;save it - lxi d,80h ;pt to following - dad d - shld nxtload - pop d ;get load address - mvi c,26 ;set DMA - call bdos -; -; Read in Block (Sector) and Loop Back if Not Done -; - lxi d,extfcb ;read file - mvi c,20 - push d ;save ptr in case of failure (done) - call bdos - pop d - ora a ;OK? - jz ifload -; -; Done - Close File -; - mvi c,16 ;close file - call bdos -; -; Reset Environment (DMA and DU) and Run IF.COM -; - call reset ;reset DMA and directory - jmp tpa ;run IF.COM -; -; Reset DMA Address and Current Disk (in CDISK) and User (in CUSER) -; -reset: - lxi d,80h ;reset DMA address - mvi c,26 - call bdos - lda cdisk ;return home - mov b,a - lda cuser - mov c,a -; -; Log Into DU in BC -; -logbc: - mov e,b ;set disk - push b - mvi c,14 ;select disk - call bdos - pop b - mov e,c ;set user - mvi c,32 ;select user - jmp bdos -; -; IF.COM not found - Process as IF F -; -ifnotfnd: - call reset ;return home - jr ifcf -; -; Buffers for COMIF -; -nxtload: - ds 2 ;address of next block (sector) to load -cuser: - ds 1 ;current user -cdisk: - ds 1 ;current disk (A=0) -; - ENDIF ;COMIF -; - - IF NOT COMIF -;**************************************************************** -;* * -;* Non-IF.COM Processing * -;* * -;**************************************************************** - -; -; Test for Equality if Enabled -; - IF IFOEQ - lxi h,tbuff+1 ;look for '=' in line -tsteq: - mov a,m ;get char - inx h ;pt to next - ora a ;EOL? - jrz ifck0 ;continue if so - cpi '=' ;'=' found? - jrnz tsteq - lxi h,fcb1+1 ;compare FCBs - lxi d,fcb2+1 - mvi b,11 ;11 bytes -eqtest: - ldax d ;compare - cmp m - jrnz ifcf - inx h ;pt to next - inx d - djnz eqtest - jr ifct - ENDIF ;IFOEQ -; -; Test Condition in FCB1 and file name in FCB2 -; Execute condition processing routine -; -ifck0: - lxi d,fcb1+1 ;pt to first char in FCB1 -; - IF IFONEG - ldax d ;get it - sta negflag ;set negate flag - cpi negchar ;is it a negate? - jrnz ifck1 - inx d ;pt to char after negchar -ifck1: - ENDIF ;IFONEG -; - IF IFOREG ;REGISTERS - call regtest ;test for register value - jrnz runreg - ENDIF ;IFOREG -; - call condtest ;test of condition match - jrnz runcond ;process condition - call print ;beep to indicate error - db bell+80H - jmp ifstat ;no condition, display current condition -; -; Process register - register value is in A -; - IF IFOREG -runreg: - push psw ;save value - call getnum ;extract value in FCB2 as a number - pop psw ;get value - cmp b ;compare against extracted value - jrz ifctrue ;TRUE if match - jr ifcfalse ;FALSE if non-match - ENDIF ;IFOREG -; -; Process conditional test - address of conditional routine is in HL -; -runcond: - pchl ;"call" routine pted to by HL -; - ENDIF ;NOT COMIF -; - -; -; Condition: NULL (2nd file name) -; - IF IFONULL -ifcnull: - lda fcb2+1 ;get first char of 2nd file name - cpi ' ' ;space = null - jrz ifctrue - jr ifcfalse - ENDIF ;IFONULL - -; -; Condition: TCAP -; - IF IFOTCAP -ifctcap: - lda z3env+80H ;get first char of Z3 TCAP Entry - cpi ' '+1 ;space or less = none - jrc ifcfalse - jr ifctrue - ENDIF ;IFOTCAP - -; -; Condition: WHEEL -; - IF IFOWHEEL -ifcwheel: - lhld z3env+29h ;get address of wheel byte - mov a,m ;get byte - ora a ;test for true - jrz ifcfalse ;FALSE if 0 - jr ifctrue - ENDIF ;IFOWHEEL -; -; Condition: TRUE -; IFCTRUE enables an active IF -; Condition: FALSE -; IFCFALSE enables an inactive IF -; -ifctrue: -; - IF IFONEG - call negtest ;test for negate - jrz ifcf - ENDIF ;IFONEG -; -ifct: - mvi b,0ffh ;active - jmp ifset -ifcfalse: -; - IF IFONEG - call negtest ;test for negate - jrz ifct - ENDIF ;IFONEG -; -ifcf: - mvi b,0 ;inactive - jmp ifset - -; -; Condition: INPUT (from user) -; - IF IFOINPUT -ifcinput: - lxi h,z3msg+7 ;pt to ZEX message byte - mvi m,10b ;suspend ZEX input - push h ;save ptr to ZEX message byte - IF NOT NOISE - call nl - ENDIF ;NOT NOISE - call prif - call print - db 'True?',' '+80H - mvi c,1 ;input from console - call bdos - pop h ;get ptr to ZEX message byte - mvi m,0 ;return ZEX to normal processing - cpi ' ' ;yes? - jrz ifctrue - ani 5fh ;mask and capitalize user input - cpi 'T' ;true? - jrz ifctrue - cpi 'Y' ;yes? - jrz ifctrue - cpi CR ;yes? - jrz ifctrue - jr ifcfalse - ENDIF ;IFOINPUT - -; -; Condition: EXIST filename.typ -; - IF IFOEXIST -ifcex: - call tlog ;log into DU - lxi d,fcb2 ;pt to fcb - mvi c,17 ;search for first - call bdos - inr a ;set zero if error - jrz ifcfalse ;return FALSE - jr ifctrue ;return TRUE - ENDIF ;IFOEXIST - -; -; Condition: EMPTY filename.typ -; - IF IFOEMPTY -ifcempty: - call tlog ;log into FCB2's DU - lxi d,fcb2 ;pt to fcb2 - mvi c,15 ;open file - push d ;save fcb ptr - call bdos - pop d - inr a ;not found? - jrz ifctrue - mvi c,20 ;try to read a record - call bdos - ora a ;0=OK - jrnz ifctrue ;NZ if no read - jr ifcfalse - ENDIF ;IFOEMPTY - -; -; Condition: ERROR -; - IF IFOERROR -ifcerror: - lda z3msg+6 ;get error byte - ora a ;0=TRUE - jrz ifctrue - jr ifcfalse - ENDIF ;IFOERROR - -; -; **** Support Routines **** -; - -; -; Convert chars in FCB2 into a number in B -; - IF IFOREG -getnum: - mvi b,0 ;set number - lxi h,fcb2+1 ;pt to first char -getn1: - mov a,m ;get char - inx h ;pt to next - sui '0' ;convert to binary - rc ;done if error - cpi 10 ;range? - rnc ;done if out of range - mov c,a ;value in C - mov a,b ;A=old value - add a ;*2 - add a ;*4 - add b ;*5 - add a ;*10 - add c ;add in new digit value - mov b,a ;result in B - jr getn1 ;continue processing - ENDIF ;IFOREG - -; -; Log into DU in FCB2 -; - IF NOT COMIF -tlog: - lda fcb2 ;get disk - ora a ;current? - jrnz tlog1 - mvi c,25 ;get disk - call bdos - inr a ;increment for following decrement -tlog1: - dcr a ;A=0 - mov e,a ;disk in E - mvi c,14 - call bdos - lda fcb2+13 ;pt to user - mov e,a - mvi c,32 ;set user - jmp bdos -; - ENDIF ;NOT COMIF - -; -; Test of Negate Flag = negchar -; - IF IFONEG -negtest: -negflag equ $+1 ;pointer for in-the-code modification - mvi a,0 ;2nd byte is filled in - cpi negchar ;test for No - ret - ENDIF ;IFONEG - -; -; Test FCB1 against a single digit (0-9) -; Return with register value in A and NZ if so -; - IF IFOREG -regtest: - ldax d ;get digit - sui '0' - jrc zret ;Z flag for no digit - cpi 10 ;range? - jrnc zret ;Z flag for no digit - lxi h,z3msg+30H ;pt to registers - add l ;pt to register - mov l,a - mov a,h ;add in H - aci 0 - mov h,a - xra a ;set NZ - dcr a - mov a,m ;get register value - ret -zret: - xra a ;set Z - ret - ENDIF ;IFOREG - -; -; Test to see if a current IF is running and if it is FALSE -; If so, return with Zero Flag Set (Z) -; If not, return with Zero Flag Clear (NZ) -; Affect only HL and PSW -; -iftest: - lxi h,z3msg+1 ;get IF flag - mov a,m ;test for active IF - ora a - jrz ifok ;no active IF - inx h ;pt to active flag - ana m ;check active flag - rz ;return Z since IF running and FALSE -ifok: - xra a ;return NZ for OK - dcr a - ret - -; -; Test FCB1 against condition table (must have 2-char entries) -; Return with routine address in HL if match and NZ flag -; - IF NOT COMIF -condtest: - lxi h,condtab ;pt to table -condt1: - mov a,m ;end of table? - ora a - rz - ldax d ;get char - mov b,m ;get other char in B - inx h ;pt to next - inx d - cmp b ;compare entries - jrnz condt2 - ldax d ;get 2nd char - cmp m ;compare - jrnz condt2 - inx h ;pt to address - mov a,m ;get address in HL - inx h - mov h,m - mov l,a ;HL = address - xra a ;set NZ for OK - dcr a - ret -condt2: - lxi b,3 ;pt to next entry - dad b ; ... 1 byte for text + 2 bytes for address - dcx d ;pt to 1st char of condition - jr condt1 -; - ENDIF ;NOT COMIF -; -; Turn on next IF level -; B register is 0 if level is inactive, 0FFH is level is active -; Return with Z flag set if OK -; -ifset: - lxi h,z3msg+1 ;get IF flag - mov a,m - ora a ;if no if at all, start 1st one - jrz ifset1 - cpi 80h ;check for overflow (8 IFs max) - jrz iferr - inx h ;pt to active IF byte - ana m ;check to see if current IF is TRUE - jrnz ifset0 ;if TRUE, proceed - mvi b,0 ;set False IF -ifset0: - dcx h ;pt to IF level - mov a,m ;get it - rlc ;advance to next level - ani 0feh ;only 1 bit on - mov m,a ;set IF byte - jr ifset2 -ifset1: - inr a ;A=1 - mov m,a ;set 1st IF - inx h ;clear active IF byte - mvi m,0 - dcx h -ifset2: - mov d,a ;get IF byte - ana b ;set interested bit - mov b,a - inx h ;pt to active flag - mov a,d ;complement IF byte - cma - mov d,a - mov a,m ;get active byte - ana d ;mask in only uninterested bits - ora b ;mask in complement of interested bit - mov m,a ;save result - call ifstat ;print status - xra a ;return with Z - ret -iferr: - call print ;beep to indicate overflow - db bell+80H - xra a ;set NZ - dcr a - ret - -; -; Test for Size Error -; - if ($ GT (FCP + FCPS*128)) -sizerr equ novalue ;FCP is too large for buffer - endif - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSFCP1.LIB b/Source/Images/d_bp/u15/SYSFCP1.LIB deleted file mode 100644 index 44404f27..00000000 --- a/Source/Images/d_bp/u15/SYSFCP1.LIB +++ /dev/null @@ -1,214 +0,0 @@ -; SYSTEM SEGMENT: SYS1.FCP -; SYSTEM: ZCPR3 -; CUSTOMIZED BY: RICHARD CONN - -; -; PROGRAM HEADER: SYSFCP.LIB -; AUTHOR: RICHARD CONN -; - -; -; This program header defines the IF Conditions to be placed -; into the target SYS.FCP file (generated by assembling SYSFCP.ASM). -; - -; -; 1. IF NEGATION -; -; The following equate determines if leading negation is to be -; allowed. If this equate is TRUE, then forms like the following are -; permitted: -; IF ~EXIST filename.typ -; -; meaning to complement the meaning of the test (the above returns TRUE -; if filename.typ does NOT exist). -; -IFONEG EQU TRUE - -; -; Assuming IFONEG to be TRUE, the following equate defines the -; character to be placed in front of the IF option to indicate that -; negation is to be performed. In the above example, this character -; was tilde (~). -; -NEGCHAR EQU '~' - - -; -; 2. IF: T (TRUE) or F (FALSE) -; -; Setting the following equate to TRUE enables the simple T and F -; options to IF. The format of this option is: -; -; IF T or IF F -; -; and it always returns TRUE or FALSE, resp. -; -IFOTRUE EQU FALSE - - -; -; 3. IF: EM (EMPTY) -; -; Setting the following equate to TRUE enables IF to test to see if -; the indicated file is empty or not. The format of this option is: -; -; IF EM dir:filename.typ -; -; and it returns TRUE if the indicated file does not exist or is empty. -; -IFOEMPTY EQU FALSE - - -; -; 4. IF: ER (ERROR) -; -; Setting the following equate to TRUE enables IF to test the error -; code byte (program error code byte). If this byte is 0 (no error), it -; returns TRUE, else it returns FALSE. The format of this option is: -; -; IF ER -; -IFOERROR EQU TRUE - - -; -; 5. IF: EX (EXIST) -; -; Setting the following equate to TRUE enables IF to test for the -; existence of a file. The format of this option is: -; -; IF EX dir:filename.typ -; -; and it returns TRUE if the indicated file exists. -; -IFOEXIST EQU TRUE - - -; -; 6. IF: IN (INPUT) -; -; Setting the following equate to TRUE enables user input of the -; character T (or any other character for FALSE). ZEX processing is -; suspended for this single-character input. The format of this option is: -; -; IF IN -; -; and the IF FCP command responds with: -; -; IF True? -; -; to which the user types T, Y, SPACE, or CR to set the IF to TRUE and -; anything else to set the IF to FALSE. -; -IFOINPUT EQU TRUE - - -; -; 7. IF: NU (NULL) -; -; Setting the following equate to TRUE enables IF to test to see if -; the second argument which follows is NULL (not specified) or not. This -; test is particularly useful in command file processing to see if, for -; example, argument $2 exists and to include it if it does. The format of -; this option is: -; -; IF NU -; or: -; IF NU arg -; -; If the first format is encountered, IF NU returns TRUE; IF NU returns -; FALSE with the second format. -; -IFONULL EQU TRUE - - -; -; 8. IF: n (Register Value) -; -; Setting the following equate to TRUE enables IF to test to see if -; the indicated register contains the indicated value. If this is preceeded -; by the NEGCHAR and IFONEG is TRUE, then this tests to see if the indicated -; register does not contain the indicated value. Registers are one-byte -; memory buffers, and are identified by the digits 0 to 9. The format of -; this option is: -; -; IF n val -; -; Example: -; IF 0 -- if Reg 0 = 0 -; IF 0 5 -- if Reg 0 = 5 -; IF 5 2 -- if Reg 5 = 2 -; IF ~0 -- if Reg 0 <> 0 -; IF ~9 2 -- if Reg 9 <> 2 -; -IFOREG EQU TRUE - - -; -; 9. IF: WH (WHEEL) -; -; Setting the following equate to TRUE enables IF to test to see if -; the Wheel Byte is set or not. If so, IF WHEEL is TRUE. -; -IFOWHEEL EQU FALSE - - -; -; 10. IF: TC (TCAP) -; -; Setting the following equate to TRUE enables IF to test to see if -; the ZCPR3 TCAP contains a terminal definition or not. This test is -; particularly useful in command file or alias processing to see if, for -; example, a Z3TCAP entry is defined and to invoke screen-oriented routines -; if it is. The format of this option is: -; -; IF TC -; -IFOTCAP EQU FALSE - - -; -; 11. IF: fcb1=fcb2 -; -; Setting this equate to TRUE will enable IF to evaluate the -; equality condition, checking to see if the two FCBs contain the same -; values. If so, the IF is TRUE; if not, the IF is FALSE. -; -; Enabling this equate eliminates the need for the NULL test, since -; a NULL test can be performed by using the syntax: -; IF fcb1= -; -IFOEQ EQU TRUE - - -; -; 12. COMIF - Run IF.COM Instead of FCP-Internal Processing -; -; Setting this equate to TRUE will cause an IF executed during an -; IF TRUE or NO IF state to look in the ROOT directory (base of path -; starting in current directory) for the file IF.COM, and, if found, -; load IF.COM and transfer control to it. If IF.COM is not found, then -; IF F is raised. Using IF.COM provides much more power and flexibility -; but also requires IF.COM to be present and takes up disk space. -; -COMIF EQU FALSE - - -; -; 13. NOISE - Have FCP Print IF Status Messages -; -; Setting this equate to TRUE will cause any change in the IF -; status to be printed to the user. This is useful for debugging purposes, -; but in normal runs, particularly where ALIASes are concerned, it is -; usually desirable to reduce the "noise" as much as possible and have -; this equate set to FALSE. -; -NOISE EQU FALSE - - -; -; END of SYSFCP CUSTOMIZATION -; - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSFCP11.LBR b/Source/Images/d_bp/u15/SYSFCP11.LBR deleted file mode 100644 index 1ad01d8d..00000000 Binary files a/Source/Images/d_bp/u15/SYSFCP11.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/SYSFCP2.LIB b/Source/Images/d_bp/u15/SYSFCP2.LIB deleted file mode 100644 index 5222424b..00000000 --- a/Source/Images/d_bp/u15/SYSFCP2.LIB +++ /dev/null @@ -1,214 +0,0 @@ -; SYSTEM SEGMENT: SYS2.FCP -; SYSTEM: ZCPR3 -; CUSTOMIZED BY: RICHARD CONN - -; -; PROGRAM HEADER: SYSFCP.LIB -; AUTHOR: RICHARD CONN -; - -; -; This program header defines the IF Conditions to be placed -; into the target SYS.FCP file (generated by assembling SYSFCP.ASM). -; - -; -; 1. IF NEGATION -; -; The following equate determines if leading negation is to be -; allowed. If this equate is TRUE, then forms like the following are -; permitted: -; IF ~EXIST filename.typ -; -; meaning to complement the meaning of the test (the above returns TRUE -; if filename.typ does NOT exist). -; -IFONEG EQU FALSE - -; -; Assuming IFONEG to be TRUE, the following equate defines the -; character to be placed in front of the IF option to indicate that -; negation is to be performed. In the above example, this character -; was tilde (~). -; -NEGCHAR EQU '~' - - -; -; 2. IF: T (TRUE) or F (FALSE) -; -; Setting the following equate to TRUE enables the simple T and F -; options to IF. The format of this option is: -; -; IF T or IF F -; -; and it always returns TRUE or FALSE, resp. -; -IFOTRUE EQU FALSE - - -; -; 3. IF: EM (EMPTY) -; -; Setting the following equate to TRUE enables IF to test to see if -; the indicated file is empty or not. The format of this option is: -; -; IF EM dir:filename.typ -; -; and it returns TRUE if the indicated file does not exist or is empty. -; -IFOEMPTY EQU FALSE - - -; -; 4. IF: ER (ERROR) -; -; Setting the following equate to TRUE enables IF to test the error -; code byte (program error code byte). If this byte is 0 (no error), it -; returns TRUE, else it returns FALSE. The format of this option is: -; -; IF ER -; -IFOERROR EQU FALSE - - -; -; 5. IF: EX (EXIST) -; -; Setting the following equate to TRUE enables IF to test for the -; existence of a file. The format of this option is: -; -; IF EX dir:filename.typ -; -; and it returns TRUE if the indicated file exists. -; -IFOEXIST EQU FALSE - - -; -; 6. IF: IN (INPUT) -; -; Setting the following equate to TRUE enables user input of the -; character T (or any other character for FALSE). ZEX processing is -; suspended for this single-character input. The format of this option is: -; -; IF IN -; -; and the IF FCP command responds with: -; -; IF True? -; -; to which the user types T, Y, SPACE, or CR to set the IF to TRUE and -; anything else to set the IF to FALSE. -; -IFOINPUT EQU FALSE - - -; -; 7. IF: NU (NULL) -; -; Setting the following equate to TRUE enables IF to test to see if -; the second argument which follows is NULL (not specified) or not. This -; test is particularly useful in command file processing to see if, for -; example, argument $2 exists and to include it if it does. The format of -; this option is: -; -; IF NU -; or: -; IF NU arg -; -; If the first format is encountered, IF NU returns TRUE; IF NU returns -; FALSE with the second format. -; -IFONULL EQU FALSE - - -; -; 8. IF: n (Register Value) -; -; Setting the following equate to TRUE enables IF to test to see if -; the indicated register contains the indicated value. If this is preceeded -; by the NEGCHAR and IFONEG is TRUE, then this tests to see if the indicated -; register does not contain the indicated value. Registers are one-byte -; memory buffers, and are identified by the digits 0 to 9. The format of -; this option is: -; -; IF n val -; -; Example: -; IF 0 -- if Reg 0 = 0 -; IF 0 5 -- if Reg 0 = 5 -; IF 5 2 -- if Reg 5 = 2 -; IF ~0 -- if Reg 0 <> 0 -; IF ~9 2 -- if Reg 9 <> 2 -; -IFOREG EQU FALSE - - -; -; 9. IF: WH (WHEEL) -; -; Setting the following equate to TRUE enables IF to test to see if -; the Wheel Byte is set or not. If so, IF WHEEL is TRUE. -; -IFOWHEEL EQU FALSE - - -; -; 10. IF: TC (TCAP) -; -; Setting the following equate to TRUE enables IF to test to see if -; the ZCPR3 TCAP contains a terminal definition or not. This test is -; particularly useful in command file or alias processing to see if, for -; example, a Z3TCAP entry is defined and to invoke screen-oriented routines -; if it is. The format of this option is: -; -; IF TC -; -IFOTCAP EQU FALSE - - -; -; 11. IF: fcb1=fcb2 -; -; Setting this equate to TRUE will enable IF to evaluate the -; equality condition, checking to see if the two FCBs contain the same -; values. If so, the IF is TRUE; if not, the IF is FALSE. -; -; Enabling this equate eliminates the need for the NULL test, since -; a NULL test can be performed by using the syntax: -; IF fcb1= -; -IFOEQ EQU FALSE - - -; -; 12. COMIF - Run IF.COM Instead of FCP-Internal Processing -; -; Setting this equate to TRUE will cause an IF executed during an -; IF TRUE or NO IF state to look in the ROOT directory (base of path -; starting in current directory) for the file IF.COM, and, if found, -; load IF.COM and transfer control to it. If IF.COM is not found, then -; IF F is raised. Using IF.COM provides much more power and flexibility -; but also requires IF.COM to be present and takes up disk space. -; -COMIF EQU TRUE - - -; -; 13. NOISE - Have FCP Print IF Status Messages -; -; Setting this equate to TRUE will cause any change in the IF -; status to be printed to the user. This is useful for debugging purposes, -; but in normal runs, particularly where ALIASes are concerned, it is -; usually desirable to reduce the "noise" as much as possible and have -; this equate set to FALSE. -; -NOISE EQU FALSE - - -; -; END of SYSFCP CUSTOMIZATION -; - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSIOP.AQM b/Source/Images/d_bp/u15/SYSIOP.AQM deleted file mode 100644 index 6a173a0b..00000000 Binary files a/Source/Images/d_bp/u15/SYSIOP.AQM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SYSIOP.ASM b/Source/Images/d_bp/u15/SYSIOP.ASM deleted file mode 100644 index 9b75a587..00000000 --- a/Source/Images/d_bp/u15/SYSIOP.ASM +++ /dev/null @@ -1,1221 +0,0 @@ -* SYSTEM SEGMENT: SYSTEM.IOP -* SYSTEM: ARIES-1 -* CUSTOMIZED BY: RICHARD CONN - -* PROGRAM: SYSIOP.ASM -* AUTHOR: RICHARD CONN -* VERSION: 1.0 -* DATE: 22 FEB 84 -* PREVIOUS VERSIONS: NONE - -*---- Customize Section ----* -* Customization Performed Throughout Code -*---- End of Customize Section ----* - -***************************************************************** -* * -* SYSIO -- Standard Set of Redirectable I/O Drivers * -* for ZCPR2 configured for Richard Conn's ARIES-1 System * -* * -* Feb 2, 1984 * -* * -* Note on Assembly: * -* This device driver package is to be assembled by MAC * -* (because of the macros) and configured into a file of type * -* IO by loading it at 100H via DDT or SID/ZSID and saving the * -* result as a COM file. Care should be taken to ensure that * -* the package is not larger than the device driver area which * -* is reserved for it in memory. * -* * -***************************************************************** - - MACLIB Z3BASE ; Get Addresses - -IOBYTE equ 3 ;I/O BYTE -INTIOBY equ 100$1$1$000B ;Initial I/O Byte Value - ; LST:=TTY - ; RDR:, PUN:=Clock - ; CON:=CRT - -***************************************************************** -* * -* Disk Serial, MPU Serial, Quad I/O, and Modem Equates * -* * -***************************************************************** - -; Disk Serial -- Serial Channel on Disk Controller Board (DCE) -; Baud Rate is set at 19,200 Baud in Hardware (DIP Switches) -ustat equ djeprom+3F9H ;USART Status Address -ostat equ 8 ;Output Status Bit (TBE) -istat equ 4 ;Input Status Bit (RDA) - -; MPU Serial -- Serial Channel on CCS Z80 MPU Board (DCE) -mpubase equ 20H ;Base address of 8250 on CCS Z80 MPU Board -mpudata equ mpubase ;Data I/O Registers -mpudll equ mpubase ;Divisor Latch Low -mpudlh equ mpubase+1 ;Divisor Latch High -mpuier equ mpubase+1 ;Interrupt Enable Register -mpulcr equ mpubase+3 ;Line Control Register -mpupcr equ mpubase+4 ;Peripheral Control Register -mpustat equ mpubase+5 ;Line Status Register -mpupsr equ mpubase+6 ;Peripheral Status Register - -; MPU Serial RDA and TBE -mpurda equ 1 ; Data Available Bit (RDA) -mputbe equ 20h ; Transmit Buffer Empty Bit (TBE) - -; MPU Serial Baud Rate Values -bm00050 equ 2304 ; 50 Baud -bm00075 equ 1536 ; 75 Baud -bm00110 equ 1047 ; 110 Baud -bm00134 equ 857 ; 134.5 Baud -bm00150 equ 768 ; 150 Baud -bm00300 equ 384 ; 300 Baud -bm00600 equ 192 ; 600 Baud -bm01200 equ 96 ; 1200 Baud -bm01800 equ 64 ; 1800 Baud -bm02000 equ 58 ; 2000 Baud -bm02400 equ 48 ; 2400 Baud -bm03600 equ 32 ; 3600 Baud -bm04800 equ 24 ; 4800 Baud -bm07200 equ 16 ; 7200 Baud -bm09600 equ 12 ; 9600 Baud -bm19200 equ 6 ; 19200 Baud -bm38400 equ 3 ; 38400 Baud -bm56000 equ 2 ; 56000 Baud - -; MPU Serial Channel Baud Rate -mpbrate equ bm09600 ; 9600 Baud for TTY - -; Quad I/O Ports -qbase equ 80h ; Base address of Quad RS-232 I/O Board -q0data equ qbase ; USART 0 Data Port (DTE) -q0stat equ qbase+1 ; USART 0 Status Port -q1data equ qbase+2 ; USART 1 Data Port (DTE) -q1stat equ qbase+3 ; USART 1 Status Port -q2data equ qbase+4 ; USART 2 Data Port (DTE) -q2stat equ qbase+5 ; USART 2 Status Port -q3data equ qbase+6 ; USART 3 Data Port (DCE) -q3stat equ qbase+7 ; USART 3 Status Port -q0baud equ qbase+8 ; USART 0 Baud Rate Port -q1baud equ qbase+9 ; USART 1 Baud Rate Port -q2baud equ qbase+10 ; USART 2 Baud Rate Port -q3baud equ qbase+11 ; USART 3 Baud Rate Port - -; Quad I/O RDA and TBE -qrda equ 2 ; Read Data Available Bit (RDA) -qtbe equ 1 ; Transmit Buffer Empty Bit (TBE) - -************************************* -* Equate Values for PMMI as Modem * -************************************* -* Modem Ports (Special -- 300 or 600 Baud for PMMI) -*mods equ 0E0H ; Modem Status Byte -*modd equ 0E1H ; Modem Data Byte -* -* Modem RDA and TBE -*mrda equ 2 ; Read Data Available Bit (RDA) -*mtbe equ 1 ; Transmit Buffer Empty Bit (TBE) -************************************* - -; Modem Ports set to QUAD I/O Port 2 -mods equ q2stat ; Modem Status Port -modd equ q2data ; Modem Data Port - -; Modem RDA and TBE -mrda equ qrda -mtbe equ qtbe - -; Baud Rate Values -b00050 equ 0 ; 50 Baud -b00075 equ 1 ; 75 Baud -b00110 equ 2 ; 110 Baud -b00134 equ 3 ; 134.5 Baud -b00150 equ 4 ; 150 Baud -b00300 equ 5 ; 300 Baud -b00600 equ 6 ; 600 Baud -b01200 equ 7 ; 1200 Baud -b01800 equ 8 ; 1800 Baud -b02000 equ 9 ; 2000 Baud -b02400 equ 10 ; 2400 Baud -b03600 equ 11 ; 3600 Baud -b04800 equ 12 ; 4800 Baud -b07200 equ 13 ; 7200 Baud -b09600 equ 14 ; 9600 Baud -b19200 equ 15 ; 19200 Baud - - -***************************************************************** -* * -* Baud Rates for Quad I/O Devices * -* * -***************************************************************** - -q0brate equ b09600 ; 9600 Baud for Intersystem -q1brate equ b01200 ; 1200 Baud for Clock -q2brate equ b01200 ; 1200 Baud for Transmodem -q3brate equ b09600 ; 9600 Baud for NEC Printer - - -***************************************************************** -* * -* Miscellaneous Constants * -* * -***************************************************************** -XON equ 11h ;X-ON -XOFF equ 13h ;X-OFF -CTRLZ equ 'Z'-'@' ;^Z -djram equ djeprom+400h ;Base of DJ RAM -djcin equ djram+3 ;DJ Console Input -djcout equ djram+6 ;DJ Console Output - -***************************************************************** -* * -* The following are the Z80 Macro Definitions which are used to * -* define the Z80 Mnemonics used to implement the Z80 instruction* -* set extensions employed in CBIOSZ. * -* * -***************************************************************** -; -; MACROS TO PROVIDE Z80 EXTENSIONS -; MACROS INCLUDE: -; -$-MACRO ;FIRST TURN OFF THE EXPANSIONS -; -; JR - JUMP RELATIVE -; JRC - JUMP RELATIVE IF CARRY -; JRNC - JUMP RELATIVE IF NO CARRY -; JRZ - JUMP RELATIVE IF ZERO -; JRNZ - JUMP RELATIVE IF NO ZERO -; DJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO -; LDIR - MOV @HL TO @DE FOR COUNT IN BC -; LXXD - LOAD DOUBLE REG DIRECT -; SXXD - STORE DOUBLE REG DIRECT -; -; -; -; @GENDD MACRO USED FOR CHECKING AND GENERATING -; 8-BIT JUMP RELATIVE DISPLACEMENTS -; -@GENDD MACRO ?DD ;;USED FOR CHECKING RANGE OF 8-BIT DISPLACEMENTS - IF (?DD GT 7FH) AND (?DD LT 0FF80H) - DB 100H ;Displacement Range Error on Jump Relative - ELSE - DB ?DD - ENDIF - ENDM -; -; Z80 MACRO EXTENSIONS -; -JR MACRO ?N - DB 18H - @GENDD ?N-$-1 - ENDM -; -JRC MACRO ?N - DB 38H - @GENDD ?N-$-1 - ENDM -; -JRNC MACRO ?N - DB 30H - @GENDD ?N-$-1 - ENDM -; -JRZ MACRO ?N - DB 28H - @GENDD ?N-$-1 - ENDM -; -JRNZ MACRO ?N - DB 20H - @GENDD ?N-$-1 - ENDM -; -DJNZ MACRO ?N - DB 10H - @GENDD ?N-$-1 - ENDM -; -LDIR MACRO - DB 0EDH,0B0H - ENDM -; -LDED MACRO ?N - DB 0EDH,05BH - DW ?N - ENDM -; -LBCD MACRO ?N - DB 0EDH,4BH - DW ?N - ENDM -; -SDED MACRO ?N - DB 0EDH,53H - DW ?N - ENDM -; -SBCD MACRO ?N - DB 0EDH,43H - DW ?N - ENDM -; -; END OF Z80 MACRO EXTENSIONS -; - - -***************************************************************** -* * -* Terminal driver routines. Iobyte is initialized by the cold * -* boot routine, to modify, change the "intioby" equate. The * -* I/O routines that follow all work exactly the same way. Using * -* iobyte, they obtain the address to jump to in order to execute* -* the desired function. There is a table with four entries for * -* each of the possible assignments for each device. To modify * -* the I/O routines for a different I/O configuration, just * -* change the entries in the tables. * -* * -***************************************************************** - - org iop ;Base Address of I/O Drivers -offset equ 100h-iop ;Offset for load via DDT or ZSID - - jmp status ;Internal Status Routine - jmp select ;Device Select Routine - jmp namer ;Device Name Routine - - jmp tinit ;Initialize Terminal - - jmp const ;Console Input Status - jmp conin ;Console Input Char - jmp conout ;Console Output Char - - jmp list ;List Output Char - - jmp punch ;Punch Output Char - - jmp reader ;Reader Input Char - - jmp listst ;List Output Status - - jmp newio ;New I/O Driver Installation Routine - - jmp copen ;Open CON: Disk File - jmp cclose ;Close CON: Disk File - - jmp lopen ;Open LST: Disk File - jmp lclose ;Close LST: Disk File - -* -* I/O Package Identification -* - db 'Z3IOP' ;Read by Z3LOADER - -***************************************************************** -* * -* status: return information on devices supported by this * -* I/O Package. On exit, HL points to a logical device * -* table which is structured as follows: * -* Device Count Byte Current Assignment Byte * -* ------ ---------- ----------------------- * -* CON: 0 1 * -* RDR: 2 3 * -* PUN: 4 5 * -* LST: 6 7 * -* * -* If error or no I/O support, return with Zero Flag Set. * -* Also, if no error, A=Driver Module Number * -* * -***************************************************************** -status: - lxi h,cnttbl ;point to table - mvi a,81H ;Module 1 (SYSIO) with Disk Output - ora a ;Set Flags - ret - - -***************************************************************** -* * -* select: select devices indicated by B and C. B is the number * -* of the logical device, where CON:=0, RDR:=1, PUN:=2, * -* LST:=3, and C is the desired device (range 0 to dev-1). * -* Return with Zero Flag Set if Error. * -* * -***************************************************************** -ranger: - lxi h,cnttbl-2 ;check for error - inr b ;range of 1 to 4 - mov a,b ;Value in A - cpi 5 ;B out of range? - jnc rangerr - push b ;save params -rang: - inx h ;pt to next - inx h - djnz rang - mov b,m ;get count in b - mov a,c ;get selected device number - cmp b ;compare (C must be less than B) - pop b ;get params - jrnc rangerr ;range error if C >= B -rangok: - xra a ;OK - dcr a ;set flags (0FFH and NZ) - ret -rangerr: - xra a ;not OK (Z) - ret -select: - call ranger ;check for range error - rz ;abort if error - inx h ;pt to current entry number - mov m,c ;save selected number there - lxi h,cfgtbl-2 ;pt to configuration table -sel2: - inx h ;Pt to Entry in Configuration Table - inx h - djnz sel2 - mov b,m ;Get Rotate Count - inx h ;Pt to Select Mask - mov d,m ;Get Select Mask - mov a,b ;Any Rotation to do? - ora a - jz sel4 - mov a,c ;Get Selected Number -sel3: - rlc ;Rotate Left 1 Bit - djnz sel3 - mov c,a ;Place Bit Pattern Back in C -sel4: - lda iobyte ;get I/O byte - ana d ;mask out old selection - ora c ;mask in new selection - sta iobyte ;put I/O byte - jr rangok ;range OK - -***************************************************************** -* * -* namer: return text string of physical device. Logical device * -* number is in B and physical selection is in C. * -* HL is returned pointing to the first character of the * -* string. The strings are structured to begin with a * -* device name followed by a space and then a description * -* string which is terminated by a binary 0. * -* * -* Return with Zero Flag Set if error. * -* * -***************************************************************** -namer: - call ranger ;check for range error - rz ;return if so - lxi h,namptbl-2 ;pt to name ptr table - call namsel ;select ptr table entry - mov b,c ;physical selection number in B now - inr b ;Add 1 for Initial Increment - call namsel ;point to string - jr rangok ;return with HL pointing and range OK -; -; Select entry B in table pted to by HL; this entry is itself a pointer, -; and return with it in HL -; -namsel: - inx h ;pt to next entry - inx h - djnz namsel - mov a,m ;get low - inx h - mov h,m ;get high - mov l,a ;HL now points to entry - ret - -***************************************************************** -* * -* const: get the status for the currently assigned console. * -* The I/O Byte is used to select the device. * -* * -***************************************************************** -const: - lxi h,cstble ;Beginning of jump table -conmask: - lxi d,cfgtbl ;Pt to First Entry in Config Table - jr seldev ;Select correct jump - -***************************************************************** -* * -* conin: input a character from the currently assigned console. * -* The I/O Byte is used to select the device. * -* * -***************************************************************** -conin: - lxi h,citble ;Beginning of character input table - jr conmask ;Get Console Mask - -***************************************************************** -* * -* conout: output the character in C to the currently assigned * -* console. The I/O Byte is used to select the device. * -* * -***************************************************************** -conout: - lxi h,cotble ;Beginning of the character out table - call crout ;output to console recorder if set - jr conmask ;Get Console Mask - -***************************************************************** -* * -* csreader: get the status of the currently assigned reader. * -* The I/O Byte is used to select the device. * -* * -***************************************************************** -csreadr: - lxi h,csrtble ;Beginning of reader status table -rdrmask: - lxi d,cfgtbl+2 ;Pt to 2nd Entry in Config Table - jr seldev - -***************************************************************** -* * -* reader: input a character from the currently assigned reader. * -* The I/O Byte is used to select the device. * -* * -***************************************************************** -reader: - lxi h,rtble ;Beginning of reader input table - jr rdrmask ;Get the Mask and Go - -***************************************************************** -* * -* Entry at seldev will form an offset into the table pointed * -* to by H&L and then pick up the address and jump there. * -* The configuration of the physical device assignments is * -* pointed to by D&E (cfgtbl entry). * -* * -***************************************************************** -seldev: - push b ;Save Possible Char in C - ldax d ;Get Rotate Count - mov b,a ;... in B - inx d ;Pt to Mask - ldax d ;Get Mask - cma ;Flip Bits - mov c,a ;... in C - lda iobyte ;Get I/O Byte - ana c ;Mask Out Selection - inr b ;Increment Rotate Count -seld1: - dcr b ;Count down - jrz seld2 - rrc ;Rotate Right one Bit - jr seld1 -seld2: - rlc ;Double Number for Table Offset - mvi d,0 ;Form offset - mov e,a - dad d ;Add offset - mov a,m ;Pick up low byte - inx h - mov h,m ;Pick up high byte - mov l,a ;Form address - pop b ;Get Possible Char in C - pchl ;Go there ! - -***************************************************************** -* * -* punch: output char in C to the currently assigned punch * -* device. The I/O Byte is used to select the device. * -* * -***************************************************************** -punch: - lxi h,ptble ;Beginning of punch table - lxi d,cfgtbl+4 ;Get Mask - jr seldev ;Select Device and Go - -***************************************************************** -* * -* list: output char in C to the currently assigned list device. * -* The I/O Byte is used to select the device. * -* * -***************************************************************** -list: - lxi h,ltble ;Beginning of the list device routines - call lrout ;output to list recorder if set -lstmask: - lxi d,cfgtbl+6 ;Get Mask - jr seldev ;Select Device and Go - -***************************************************************** -* * -* Listst: get the output status of the currently assigned list * -* device. The I/O Byte is used to select the device. * -* * -***************************************************************** -listst: - lxi h,lstble ;Beginning of the list device status - jr lstmask ;Mask and Go - -***************************************************************** -* * -* If customizing I/O routines is being performed, the tables * -* below should be modified to reflect the changes. All I/O * -* devices are decoded out of iobyte and the jump is taken from * -* the following tables. * -* * -***************************************************************** - -***************************************************************** -* * -* I/O Driver Support Specification Tables * -* * -***************************************************************** - -* -* Device Counts -* First Byte is Number of Devices, 2nd Byte is Selected Device -* -cnttbl: - db 6,(intioby AND 7) ;CON: - db 2,(intioby AND 08h) SHR 3 ;RDR: - db 2,(intioby AND 10h) SHR 4 ;PUN: - db 6,(intioby AND 0E0h) SHR 5 ;LST: - -* -* Configuration Table -* First Byte is Rotate Count, 2nd Byte is Mask -* -cfgtbl: - db 0,111$1$1$000b ;No Rotate, Mask Out 3 LSB - db 3,111$1$0$111b ;3 Rotates, Mask Out Bit 3 - db 4,111$0$1$111b ;4 Rotates, Mask Out Bit 4 - db 5,000$1$1$111b ;5 Rotates, Mask Out 3 MSB - -* -* name text tables -* -namptbl: - dw conname-2 ;CON: - dw rdrname-2 ;RDR: - dw punname-2 ;PUN: - dw lstname-2 ;LST: - -conname: - dw namcrt ;CRT - dw namusr ;CRT and Modem in Parallel - dw namusr1 ;CRT Input and CRT/Remote Computer Output - dw namusr2 ;CRT Input and CRT/Modem Output - dw namcrtt ;CRT Input and CRT/TTY Printer Output - dw namcrtn ;CRT Input and CRT/NEC Printer Output - -lstname: - dw namtty ;TTY - dw namcrt ;CRT - dw namrem ;Remote Computer - dw nammod ;Modem - dw nammpu ;MPU - dw nammpu8 ;MPU with 8 Bits - -rdrname: - dw nammod ;Modem - dw namclk ;Clock - -punname: - dw nammod ;Modem - dw namclk ;Clock - -nammpu: - db 'TTY Toshiba P1350 Printer',0 -nammpu8: - db 'TTY8 TTY with 8th Sig Bit',0 -namtty: - db 'NEC NEC 3510 LQ Printer',0 -namcrt: - db 'CRT TVI 950 CRT',0 -namcrtn: - db 'CRTNEC CRT Input and CRT/NEC Printer Output',0 -namcrtt: - db 'CRTTY CRT Input and CRT/TTY Printer Output',0 -namusr: - db 'CRTMOD CRT and Modem in Parallel',0 -namusr1: - db 'CRTREM CRT Input and CRT/Remote Output',0 -namusr2: - db 'CRTMOD2 CRT Input and CRT/Modem Output',0 -namrem: - db 'REMOTE Remote Computer',0 -nammod: - db 'MODEM Transmodem 1200',0 -namclk: - db 'CLOCK DC Hayes Chronograph',0 - -* -* console input table -* -citble: - dw cicrt ;Input from crt (000) - dw ciusr ;Input from crt and modem (001) - dw cicrt ;Input from crt (010) - dw cicrt ;Input from crt (011) - dw cicrt ;Input from crt (100) - dw cicrt ;Input from crt (101) - -* -* console output table -* -cotble: - dw cocrt ;Output to crt (000) - dw cousr ;Output to crt and modem (001) - dw cousr1 ;Output to crt and remote system (010) - dw cousr ;Output to crt and modem (011) - dw cocrtt ;Output to crt and TTY printer (100) - dw cocrtn ;Output to crt and NEC printer (101) - -* -* list device table -* -ltble: - dw cotty ;Output to tty (000) - dw cocrt ;Output to crt (001) - dw corem ;Output to remote system (010) - dw comod ;Output to modem (011) - dw compu ;Output to mpu (100) - dw compu8 ;Output to mpu (101) - -* -* punch device table -* - -ptble: - dw comod ;Output to modem (0) - dw coclk ;Output to clock (1) - -* -* reader device table -* -rtble: - dw cimod ;Input from modem (0) - dw ciclk ;Input from clock (1) - -* -* console status table -* -cstble: - dw cscrt ;Status from crt (000) - dw csusr ;Status from crt and modem (001) - dw cscrt ;Status from crt (010) - dw cscrt ;Status from crt (011) - dw cscrt ;Status from crt (100) - dw cscrt ;Status from crt (101) - -* -* status from reader device -* -csrtble: - dw csmod ;Status from modem (0) - dw csclk ;Status from clock (1) - -* -* Status from list device -* -lstble: - dw costty ;Status from tty (000) - dw coscrt ;Status from crt (001) - dw cosrem ;Status from remote system (010) - dw cosmod ;Status from modem (011) - dw cosmpu ;Status from mpu (100) - dw cosmpu ;Status from mpu (101) - - -***************************************************************** -* * -* Tinit can be modified for different I/O setups. * -* * -***************************************************************** -tinit: ;Initialize the terminal routine - -; Initialize I/O Byte - mvi a,intioby ;Initialize IOBYTE - sta iobyte - -; Initialize MPU Serial I/O Channel Characteristics and Baud Rate - mvi a,10$00$00$11b ;Access Divisor: - ; 10 -- Set divisor latch, clear break - ; 00 -- 0 parity bit, odd parity (N/A) - ; 00 -- disable parity, 1 stop bit - ; 11 -- 8 Data Bits - out mpulcr ;To Line Control Register - lxi h,mpbrate ;HL = MPU Channel Baud Rate - mov a,l ;Set Low-Byte of Baud Rate - out mpudll ;To Divisor Latch Low - mov a,h ;Set High-Byte of Baud Rate - out mpudlh ;To Divisor Latch High - mvi a,00$00$00$11b ;Reset Divisor Access and Set Characteristics: - ; 00 -- Clear divisor latch, clear break - ; 00 -- 0 parity bit, odd parity (N/A) - ; 00 -- disable parity, 1 stop bit - ; 11 -- 8 Data Bits - out mpulcr ;To Line Control Register - xra a ;A=0 - out mpuier ;Disable All Interrupts in Interrupt Register - out mpustat ;Clear All Error Flags in Line Status Register - mvi a,0000$1111b ;3 Zeroes, No Loop, 1, Set RLSD, CTS, DSR - out mpupcr ;To Peripheral Control Register - -; Initialize Quad I/O Channel Characteristics - mvi a,10$11$01$11b ;General-Purpose Reset: - ; 10 -- 1 1/2 Stop Bits - ; 11 -- Even Parity, Enable Parity - ; 01 -- 6 Bits/Char - ; 11 -- 64x Baud Rate - call setquad ;Set All 4 Quad I/O Ports - mvi a,01$11$01$11b ;General-Purpose Reset: - ; 01 -- Disable Hunt, Internal Reset - ; 11 -- RTS High, Error Reset - ; 01 -- No Break, Enable RxRDY - ; 11 -- NOT DTR High, Enable TxEN - call setquad ;Set All 4 Quad I/O Ports - mvi a,11$00$11$10b ;Characteristics Set for All: - ; 11 -- 2 Stop Bits - ; 00 -- No Parity - ; 11 -- 8 Bits/Char - ; 10 -- 16x Baud Rate - call setquad ;Set All 4 Quad I/O Ports - mvi a,00$11$01$11b ;Characteristics Set for All: - ; 00 -- Disable Hunt, No Internal Reset - ; 11 -- RTS High, Error Reset - ; 01 -- No Break, Enable RxRDY - ; 11 -- NOT DTR High, Enable TxEN - call setquad ;Set All 4 Quad I/O Ports - -; Initialize Quad I/O Baud Rates - mvi a,q0brate ;Set USART 0 Baud Rate - out q0baud - mvi a,q1brate ;Set USART 1 Baud Rate - out q1baud - mvi a,q2brate ;Set USART 2 Baud Rate - out q2baud - mvi a,q3brate ;Set USART 3 Baud Rate - out q3baud - -; Set All Recording OFF - xra a ;A=0 - sta crecord ;console - sta lrecord ;list device - -; Clear Garbage Char from CRT - call cscrt ;Gobble up unwanted char - ora a ;A=0 if none - cnz cicrt ;Grab character - ret - -; Set All Quad I/O Control Ports -setquad: - out q0stat ;USART 0 - out q1stat ;USART 1 - out q2stat ;USART 2 - out q3stat ;USART 3 - xthl ;Long Delay - xthl - ret - - -***************************************************************** -* * -* NEWIO -- Set UC1: Device to the Device Drivers whose Jump * -* Table is Pointed to by HL * -* * -* This Jump Table is structured as follows: * -* JMP ISTAT <-- Input Status (0=No Char, 0FFH=Char) * -* JMP INPUT <-- Input Character * -* JMP OUTPUT <-- Output Character in C * -* * -* The Base Address of this Jump Table (JBASE) is passed to * -* NEWIO in the HL Register Pair. * -* * -***************************************************************** -newio: - shld cstble+6 ;Set UC1: Input Status - lxi d,3 ;Prepare for offset to next jump - dad d ;HL points to next jump - shld citble+6 ;Set UC1: Input Character - dad d ;HL points to next jump - shld cotble+6 ;Set UC1: Output Character - ret - - -***************************************************************** -* * -* Input Status, Input Character, and Output Character * -* Subroutines for CP/M * -* * -***************************************************************** -* * -* Input Status -- * -* These routines return 0 in the A Register if no input * -* data is available, 0FFH if input data is available. * -* * -* Input Character -- * -* These routines return the character (byte) in the A * -* Register. MSB is masked off. * -* * -* Output Character -- * -* These routines output the character (byte) in the C * -* Register. * -* * -***************************************************************** - -***************************************************************** -* * -* CRT Input Status, Input Character, and Output Character * -* * -***************************************************************** - -cscrt equ $ ;CRT Input Status - lda ustat ;Get Status - cma ;Inverted Logic - ani istat ;Mask for input status and fall thru to 'STAT' - jr stat ;Set Flags - -coscrt equ $ ;CRT Output Status - lda ustat ;Get USART status - cma ;Inverted Logic - ani ostat ;Mask for output status - jr stat ;Return - -cicrt equ $ ;CRT Input - jmp djcin ;Get char - -cocrt equ $ ;CRT Output - jmp djcout ;Put char - -cocrtt equ $ ;CRT and TTY Printer Output - push b ;Save char - call djcout ;CRT Output - pop b ;Get char - jmp compu ;Printer Output - -cocrtn equ $ ;CRT and NEC Printer Output - push b ;Save char - call djcout ;CRT Output - pop b ;Get char - jmp cotty ;Printer Output - -***************************************************************** -* * -* Modem Input Status, Input Character, and Output Character * -* * -***************************************************************** - -csmod equ $ ;Modem Input Status - in mods - ani mrda ;Data available? - jr stat - -cosmod equ $ ;Modem Output Status - in mods ;Get status - ani mtbe ;TBE? - jr stat - -cimod equ $ ;Modem Input Character - call csmod ;RDA? - jrz cimod - in modd ;Get data - ani 7fh ;Mask - ret - -comod equ $ ;Modem Output - call cosmod ;TBE? - jrz comod - mov a,c ;Get char - out modd ;Put data - ret - -***************************************************************** -* * -* Clock Input Status, Input Character, and Output Character * -* * -***************************************************************** - -csclk equ $ ;TTY Input Status - in q1stat ;Get Status - ani qrda ;Data available? - jr stat - -cosclk equ $ ;TTY Output Status - in q1stat ;Get Status - ani qtbe ;TBE? - jr stat - -ciclk equ $ ;TTY Input Character - call csclk ;RDA? - jrz ciclk - in q1data ;Get data - ani 7fh ;Mask - ret - -coclk equ $ ;TTY Output Character - call cosclk ;TBE? - jrz coclk - mov a,c ;Get data - out q1data ;Put data - ret - -***************************************************************** -* * -* This is a common return point to correctly set the return * -* status flags; it is centrally located for the jump * -* relative instructions * -* * -***************************************************************** -stat: - rz ;Nothing found -ready: - mvi a,0ffh ;Set A for negative status - ret - -***************************************************************** -* * -* NEC Input Status, Input Character, and Output Character * -* X-OFF Processing Added * -* * -***************************************************************** - -cstty equ $ ;TTY Input Status - in q3stat ;Get Status - ani qrda ;Data available? - jr stat - -costty equ $ ;TTY Output Status - in q3stat ;Get Status - ani qtbe ;TBE? - jr stat - -citty equ $ ;TTY Input Character - call cstty ;RDA? - jrz citty - in q3data ;Get data - ani 7fh ;Mask - ret - -cotty equ $ ;TTY Output Character - call cstty ;Any character? - jrnz cotty2 ;Process if so -cotty1: - call costty ;TBE? - jrz cotty1 - mov a,c ;Get data - out q3data ;Put data - ret -cotty2: - call citty ;X-OFF? - cpi XOFF ;Do nothing if not X-OFF - jrnz cotty1 - call citty ;Wait for next char - jr cotty1 - -***************************************************************** -* * -* Remote System Input Status, Input Character, and Output * -* Character * -* * -***************************************************************** - -csrem equ $ ;TTY Input Status - in q0stat ;Get Status - ani qrda ;Data available? - jr stat - -cosrem equ $ ;TTY Output Status - in q0stat ;Get Status - ani qtbe ;TBE? - jr stat - -cirem equ $ ;TTY Input Character - call csrem ;RDA? - jrz cirem - in q0data ;Get data - ani 7fh ;Mask - ret - -corem equ $ ;TTY Output Character - call coxoff ;Check for XOFF and process - call cosrem ;TBE? - jrz corem - mov a,c ;Get data - out q0data ;Put data - ret - -coxoff equ $ ;Remote XOFF Check and Processing - call csrem ;Input Char from LST: Device? - rz ;Zero if none - call cirem ;Get Char - cpi XOFF ;XOFF? - rnz ;Return if not - call cirem ;Wait for Any Other Char - ret - -***************************************************************** -* * -* TTY Input Status, Input Character, and Output Character * -* X-OFF Processing Added * -* * -***************************************************************** - -csmpu equ $ ;TTY Input Status - in mpustat ;Get Status - ani mpurda ;Data available? - jr stat - -cosmpu equ $ ;TTY Output Status - in mpustat ;Get Status - ani mputbe ;TBE? - jr stat - -cimpu equ $ ;TTY Input Character - call csmpu ;RDA? - jrz cimpu - in mpudata ;Get data - ani 7fh ;Mask - ret - -compu8 equ $ ;TTY Output Character (8 Sig Bits) - mvi a,0ffh ;8th Bit Allowed - jr compu0 -compu equ $ ;TTY Output Character - mvi a,07fh ;No 8th Bit -compu0: - sta mpumask - call csmpu ;Any character? - jrnz compu2 ;Process if so -compu1: - call cosmpu ;TBE? - jrz compu1 - mov a,c ;Get data - ani 0ffh ;Mask -mpumask equ $-1 ;Address of Mask - out mpudata ;Put data - ret -compu2: - call cimpu ;X-OFF? - cpi XOFF ;Do nothing if not X-OFF - jrnz compu1 - call cimpu ;Wait for next char - jr compu1 - -***************************************************************** -* * -* User-Defined (CRT and Modem) Input Status, Input Character, * -* and Output Character * -* * -***************************************************************** - -csusr equ $ ;User (CRT and Modem) Input Status - call cscrt ;Input from CRT? - rnz ;Char found - call csmod ;Input from Modem? - ret - -cosusr equ cosmod ;Output status same as modem since modem is slower - -ciusr equ $ ;Modem/CRT Input Combination - call cscrt ;Input from CRT? - jnz cicrt ;Get char from CRT - call csmod ;Input from Modem? - jnz cimod ;Get char from Modem - jr ciusr ;Continue - -cousr equ $ ;Modem/CRT Output Combination - call comod ;Output to Modem - jmp cocrt ;Output to CRT - -ciusr1 equ $ ;Modem/CRT Input w/CRT Output Combination - call ciusr ;Get char - push psw ;Save char in A - mov c,a ;Char in C - call cocrt ;Output to CRT - pop psw ;Restore char in A - ret - -cousr1 equ $ ;Remote System/CRT Output Combination - call corem ;Output to Remote System - jmp cocrt ;Output to CRT - -***************************************************************** -* * -* Record Output Routines * -* CROUT - Console Recorder * -* LROUT - List Recorder * -* * -***************************************************************** - -crout equ $ - lda crecord ;get flag - ora a ;test flag for 0 (no recording) - rz - mov a,c ;check char - ani 7fh - cpi ctrlz ;don't allow ^Z - rz - jmp corem ;remote output if flag set - -lrout equ $ - lda lrecord ;get flag - ora a ;test flag for 0 (no recording) - rz - mov a,c ;check char - ani 7fh - cpi ctrlz ;don't allow ^Z - rz - jmp corem ;remote output if flag set - -; -; COPEN -- Open Console File for Output -; LOPEN -- Open Printer File for Output -; -; Turn Appropriate Flag ON -; -copen: - mvi a,0ffh ;set flag - jr ccrset -lopen: - mvi a,0ffh ;set flag - jr lcrset - -; -; Close Disk Files -; CCLOSE -- CON file (DSK1) -; LCLOSE -- LST file (DSK2) -; -; Send ^Z to Terminate File Recording and Zero Appropriate Flag -; -cclose: - mvi c,ctrlz ;send ctrlz - call corem - xra a -ccrset: - sta crecord ;set flag off - ret -lclose: - mvi c,ctrlz ;send ctrlz - call corem - xra a -lcrset: - sta lrecord ;set flag off - ret - -; -; Recording Buffers -; -crecord: - ds 1 ;console device -lrecord: - ds 1 ;list device - -; -; Test for Size Error -; - if ($ GT (IOP + IOPS*128)) -sizerr equ novalue ;IOP is too large for buffer - endif - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSNDR.AQM b/Source/Images/d_bp/u15/SYSNDR.AQM deleted file mode 100644 index b7a400eb..00000000 Binary files a/Source/Images/d_bp/u15/SYSNDR.AQM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SYSNDR.ASM b/Source/Images/d_bp/u15/SYSNDR.ASM deleted file mode 100644 index b39ef361..00000000 --- a/Source/Images/d_bp/u15/SYSNDR.ASM +++ /dev/null @@ -1,17 +0,0 @@ -; PROGRAM: SYSNDR.ASM -; AUTHOR: RICHARD CONN -; VERSION: 1.0 -; DATE: 24 FEB 84 - -; -; SYSNDR.ASM sets up a memory-based named directory file suitable -; for loading by Z3LDR. It does this by including SYSNDR.LIB. -; - MACLIB SYSNDR - - org 100h - - SYSNDR ; Invoke macro - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSNDR.LIB b/Source/Images/d_bp/u15/SYSNDR.LIB deleted file mode 100644 index d43d923a..00000000 --- a/Source/Images/d_bp/u15/SYSNDR.LIB +++ /dev/null @@ -1,83 +0,0 @@ -; DATA FILE: SYSNDR.LIB -; AUTHOR: Richard Conn -; VERSION: 1.0 -; DATE: 24 Feb 84 - -; -; SYSNDR.LIB defines the structure of the memory-based named directory. -; It also defines a few elements for it and is suitable for enclosure in -; an NDR file. -; -; The general structure is: -; -; DB Disk,User ; A=1 -; DB 'NDIRNAME' ; 8 chars -; DB 'PASSWORD' ; 8 chars -; ... ; other entries -; DB 0 ; End of NDR -; -defdu macro ?disk,?user - db ?disk-'@' ; Convert Disk - db ?user ; User is OK - endm - -sysndr macro - defdu 'A',0 - db 'BASE ' - db ' ' - - defdu 'A',15 - db 'ROOT ' - db ' ' - - defdu 'A',16 - db 'HELP ' - db ' ' - - defdu 'B',0 - db 'SCRATCH ' - db ' ' - - defdu 'B',1 - db 'ASM ' - db ' ' - - defdu 'B',2 - db 'C ' - db ' ' - - defdu 'B',3 - db 'PASCAL ' - db ' ' - - defdu 'B',4 - db 'SCR ' - db ' ' - - defdu 'B',5 - db 'BASIC ' - db ' ' - - defdu 'B',7 - db 'TEXT ' - db ' ' - - defdu 'B',8 - db 'CAT ' - db ' ' - - defdu 'B',9 - db 'DATA ' - db ' ' - - defdu 'C',0 - db 'BACKUP ' - db ' ' - - db 0 ;End of List - endm - -; -; End of SYSNDR.LIB -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSRCP.AQM b/Source/Images/d_bp/u15/SYSRCP.AQM deleted file mode 100644 index f9fdf538..00000000 Binary files a/Source/Images/d_bp/u15/SYSRCP.AQM and /dev/null differ diff --git a/Source/Images/d_bp/u15/SYSRCP.ASM b/Source/Images/d_bp/u15/SYSRCP.ASM deleted file mode 100644 index 51ff718e..00000000 --- a/Source/Images/d_bp/u15/SYSRCP.ASM +++ /dev/null @@ -1,2306 +0,0 @@ -* SYSTEM SEGMENT: SYS.RCP -* SYSTEM: ARIES-1 -* CUSTOMIZED BY: RICHARD CONN - -* -* PROGRAM: SYSRCP.ASM -* AUTHOR: RICHARD CONN -* VERSION: 1.0 -* DATE: 3 FEB 84 -* PREVIOUS VERSIONS: NONE -* -VERSION EQU 10 - -* -* SYSRCP is a resident command processor for ZCPR3. As with -* all resident command processors, SYSRCP performs the following functions: -* -* 1. Assuming that the EXTFCB contains the name of the -* command, SYSRCP looks to see if the first character -* of the file name field in the EXTFCB is a question -* mark; if so, it returns with the Zero Flag Set and -* HL pointing to the internal routine which prints -* its list of commands -* 2. The resident command list in SYSRCP is scanned for -* the entry contained in the file name field of -* EXTFCB; if found, SYSRCP returns with the Zero Flag -* Set and HL pointing to the internal routine which -* implements the function; if not found, SYSRCP returns -* with the Zero Flag Reset (NZ) -* - -* -* Global Library which Defines Addresses for SYSRCP -* - MACLIB Z3BASE ; USE BASE ADDRESSES - MACLIB SYSRCP ; USE SYSRCP HEADER - -; -CTRLC EQU 'C'-'@' -TAB EQU 09H -LF EQU 0AH -FF EQU 0CH -CR EQU 0DH -CTRLX EQU 'X'-'@' -; -WBOOT EQU BASE+0000H ;CP/M WARM BOOT ADDRESS -UDFLAG EQU BASE+0004H ;USER NUM IN HIGH NYBBLE, DISK IN LOW -BDOS EQU BASE+0005H ;BDOS FUNCTION CALL ENTRY PT -TFCB EQU BASE+005CH ;DEFAULT FCB BUFFER -FCB1 EQU TFCB ;1st and 2nd FCBs -FCB2 EQU TFCB+16 -TBUFF EQU BASE+0080H ;DEFAULT DISK I/O BUFFER -TPA EQU BASE+0100H ;BASE OF TPA -DIRBUF EQU BASE+4000H ;DIR BUFFER (MANY ENTRIES PERMITTED) -PAGCNT EQU DIRBUF-100H ;PAGE COUNT BUFFER -OLDFCB EQU PAGCNT+1 ;OLD FCB BUFFER -CPBLOCKS EQU 32 ;USE 4K FOR BUFFERING OF COPY -; -$-MACRO ;FIRST TURN OFF THE EXPANSIONS -; -; MACROS TO PROVIDE Z80 EXTENSIONS -; MACROS INCLUDE: -; -; JR - JUMP RELATIVE -; JRC - JUMP RELATIVE IF CARRY -; JRNC - JUMP RELATIVE IF NO CARRY -; JRZ - JUMP RELATIVE IF ZERO -; JRNZ - JUMP RELATIVE IF NO ZERO -; DJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO -; -; @GENDD MACRO USED FOR CHECKING AND GENERATING -; 8-BIT JUMP RELATIVE DISPLACEMENTS -; -@GENDD MACRO ?DD ;;USED FOR CHECKING RANGE OF 8-BIT DISPLACEMENTS - IF (?DD GT 7FH) AND (?DD LT 0FF80H) - DB 100H,?DD ;Displacement Range Error on Jump Relative - ELSE - DB ?DD - ENDIF ;;RANGE ERROR - ENDM -; -; -; Z80 MACRO EXTENSIONS -; -JR MACRO ?N ;;JUMP RELATIVE - IF I8080 ;;8080/8085 - JMP ?N - ELSE ;;Z80 - DB 18H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRC MACRO ?N ;;JUMP RELATIVE ON CARRY - IF I8080 ;;8080/8085 - JC ?N - ELSE ;;Z80 - DB 38H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRNC MACRO ?N ;;JUMP RELATIVE ON NO CARRY - IF I8080 ;;8080/8085 - JNC ?N - ELSE ;;Z80 - DB 30H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRZ MACRO ?N ;;JUMP RELATIVE ON ZERO - IF I8080 ;;8080/8085 - JZ ?N - ELSE ;;Z80 - DB 28H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRNZ MACRO ?N ;;JUMP RELATIVE ON NO ZERO - IF I8080 ;;8080/8085 - JNZ ?N - ELSE ;;Z80 - DB 20H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -DJNZ MACRO ?N ;;DECREMENT B AND JUMP RELATIVE ON NO ZERO - IF I8080 ;;8080/8085 - DCR B - JNZ ?N - ELSE ;;Z80 - DB 10H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -* -* SYSTEM Entry Point -* - org rcp ; passed for Z3BASE - - db 'Z3RCP' ; Flag for Package Loader -* -* **** Command Table for RCP **** -* This table is RCP-dependent! -* -* The command name table is structured as follows: -* -* ctable: -* DB 'CMNDNAME' ; Table Record Structure is -* DW cmndaddress ; 8 Chars for Name and 2 Bytes for Adr -* ... -* DB 0 ; End of Table -* -cnsize equ 4 ; NUMBER OF CHARS IN COMMAND NAME - db cnsize ; size of text entries -ctab: - db 'H ' ; Help for RCP - dw clist -ctab1: -; - IF CPON - db 'CP ' ; Copy - dw copy - ENDIF ;CPON -; - IF DIRON - db 'DIR ' ; Directory - dw dir - ENDIF ;DIRON -; - IF ECHOON - db 'ECHO' ; Echo - dw echo - ENDIF -; - IF ERAON - db 'ERA ' ; Erase - dw era - ENDIF ;ERAON -; - IF LTON AND LISTON - db 'LIST' ; List - dw list - ENDIF ;LTON AND LISTON -; - IF NOTEON - db 'NOTE' ; Note-Comment-NOP Command - dw note - ENDIF -; - IF PEEKON - db 'P ' ; Peek into Memory - dw peek - ENDIF ;PEEKON -; - IF POKEON - db 'POKE' ; Poke Values into Memory - dw poke - ENDIF ;POKEON -; - IF PROTON - db 'PROT' ; Protection Codes - dw att - ENDIF ;PROTON -; - IF REGON - db 'REG ' ; Register Command - dw regcmd - ENDIF ;RSETON -; - IF RENON - db 'REN ' ; Rename - dw ren - ENDIF ;RENON -; - IF LTON - db 'TYPE' ; Type - dw type - ENDIF ;LTON -; - IF WHLON - db 'WHL ' ; Wheel - dw whl - db 'WHLQ' ; Wheel Query - dw whlmsg - ENDIF ;WHLON -; - db 0 -* -* BANNER NAME OF RCP -* -rcp$name: - db 'SYS ' - db (version/10)+'0','.',(version mod 10)+'0' - db RCPID - db 0 - -* -* Command List Routine -* -clist: - lxi h,rcp$name ; print RCP Name - call print1 - lxi h,ctab1 ; print table entries - mvi c,1 ; set count for new line -clist1: - mov a,m ; done? - ora a - rz - dcr c ; count down - jrnz clist1a - call crlf ; new line - mvi c,4 ; set count -clist1a: - lxi d,entryname ; copy command name into message buffer - mvi b,cnsize ; number of chars -clist2: - mov a,m ; copy - stax d - inx h ; pt to next - inx d - dcr b - jnz clist2 - inx h ; skip to next entry - inx h - push h ; save ptr - lxi h,entrymsg ; print message - call print1 - pop h ; get ptr - jmp clist1 -* -* Console Output Routine -* -conout: - push h ; save regs - push d - push b - push psw - ani 7fh ; mask MSB - mov e,a ; char in E - mvi c,2 ; output - call bdos - pop psw ; get regs - pop b - pop d - pop h -; -; This simple return doubles for the NOTE Command (NOP) and CONOUT Exit -; NOTE Command: NOTE any text -; -NOTE: - ret -* -* Print String (terminated in 0 or MSB Set) at Return Address -* -print: - xthl ; get address - call print1 - xthl ; put address - ret -* -* Print String (terminated in 0 or MSB Set) pted to by HL -* -print1: - mov a,m ; done? - inx h ; pt to next - ora a ; 0 terminator - rz - call conout ; print char - rm ; MSB terminator - jmp print1 -* -* CLIST Messages -* -entrymsg: - db ' ' ; command name prefix -entryname: - ds cnsize ; command name - db 0 ; terminator - -* -* **** RCP Routines **** -* All code from here on is RCP-dependent! -* - -; -;Section 5A -;Command: DIR -;Function: To display a directory of the files on disk -;Forms: -; DIR Displays the DIR files -; DIR S Displays the SYS files -; DIR A Display both DIR and SYS files -;Notes: -; The flag SYSFLG defines the letter used to display both DIR and -; SYS files (A in the above Forms section) -; The flag SOFLG defines the letter used to display only the SYS -; files (S in the above Forms section) -; The flag WIDE determines if the file names are spaced further -; apart (WIDE=TRUE) for 80-col screens -; The flag FENCE defines the character used to separate the file -; names -; - IF DIRON -DIR: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WDIR - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE ;SAVE RET ADDRESS AND SET STACK - LXI H,FCB1+1 ;MAKE FCB WILD (ALL '?') IF NO FILENAME.TYP - MOV A,M ;GET FIRST CHAR OF FILENAME.TYP - CPI ' ' ;IF , ALL WILD - CZ FILLQ - LDA FCB2+1 ;GET FIRST CHAR OF 2ND FILE NAME - MVI B,80H ;PREPARE FOR DIR-ONLY SELECTION - CPI ' ' ;ANY FLAG? - JRZ DIRPR ;THERE IS NO FLAG, SO DIR ONLY - MVI B,1 ;SET FOR BOTH DIR AND SYS FILES - CPI SYSFLG ;SYSTEM AND DIR FLAG SPECIFIER? - JRZ DIRPR ;GOT SYSTEM SPECIFIER - CPI SOFLG ;SYS ONLY? - JRNZ DIRPR - DCR B ;B=0 FOR SYS FILES ONLY -; - ENDIF ;DIRON -; -; DIRECTORY PRINT ROUTINE; ON ENTRY, B REG IS SET AS FOLLOWS: -; 0 FOR ONLY SYSTEM FILES, 80H FOR ONLY DIR FILES, 1 FOR BOTH -; - IF DIRON OR ERAON OR LTON OR PROTON OR CPON OR RENON -DIRPR: - MOV A,B ;GET SYSTST FLAG - CALL GETDIR ;LOAD AND SORT DIRECTORY - JZ PRFNF ;PRINT NO FILE MESSAGE - MVI E,4 ;COUNT DOWN TO 0 -; -; ENTRY PRINT LOOP; ON ENTRY, HL PTS TO FILES SELECTED (TERMINATED BY 0) -; AND E IS ENTRY COUNTER -; -DIR3: - MOV A,M ;CHECK FOR DONE - ORA A - JZ EXIT ;EXIT IF DONE - MOV A,E ;GET ENTRY COUNTER - ORA A ;OUTPUT IF 4 ENTRIES PRINTED IN LINE - CZ DIRCRLF ;NEW LINE - MOV A,E ;GET ENTRY COUNT - CPI 4 ;FIRST ENTRY? - JRZ DIR4 - CALL PRINT -; - IF WIDE -; - DB ' ' ;2 SPACES - DB FENCE ;THEN FENCE CHAR - 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 - DCR E ;DECREMENT ENTRY COUNTER - JR DIR3 -; -; CRLF FOR DIR ROUTINE -; -DIRCRLF: - PUSH PSW ;DON'T AFFECT PSW - CALL CRLF ;NEW LINE - POP PSW - MVI E,4 ;RESET ENTRY COUNTER - RET -; -; AFTER A SEARCH, RETURN NZ SET IF DESIRED TYPE OF FILE FOUND, Z IF NOT -; THIS ALGORITHM LOOKS AT THE SYSTEM BIT OF THE LOCATED FILE; THIS -; BIT IS SET TO 1 IF THE FILE IS A SYSTEM FILE AND 0 IF NOT A SYSTEM -; FILE. THE FOLLOWING EXCLUSIVE OR MASKS ARE APPLIED TO RETURN Z OR NZ -; AS REQUIRED BY THE CALLING PROGRAM: -; -; SYSTEM BYTE: X 0 0 0 0 0 0 0 (AFTER 80H MASK, X=1 IF SYS, 0 IF DIR) -; -; SYS-ONLY : 0 0 0 0 0 0 0 0 (XOR 0 = 0 if X=0, = 80H if X=1) -; DIR-ONLY : 1 0 0 0 0 0 0 0 (XOR 80H = 80h if X=0, = 0 if X=1) -; BOTH : 0 0 0 0 0 0 0 1 (XOR 1 = 81H or 1H, NZ in both cases) -; -GETSBIT: - DCR A ;ADJUST TO RETURNED VALUE - RRC ;CONVERT NUMBER TO OFFSET INTO TBUFF - RRC - RRC - ANI 60H - MOV C,A ;OFFSET INTO TBUFF IN C (C=OFFSET TO ENTRY) - LXI D,TBUFF ;PT TO BUFFER - MOV A,E ;BASE ADDRESS IN A - ADD C ;ADD IN ENTRY OFFSET - MOV E,A ;RESULT IN E - PUSH D ;SAVE PTR IN DE - ADI 10 ;ADD OFFSET OF 10 TO PT TO SYSTEM BYTE - MOV E,A ;SET ADDRESS - LDAX D ;GET BYTE - POP D ;GET PTR IN DE - ANI 80H ;LOOK AT ONLY SYSTEM BIT -SYSTST EQU $+1 ;IN-THE-CODE VARIABLE - XRI 0 ; IF SYSTST=0, SYS ONLY; IF SYSTST=80H, DIR - ; ONLY; IF SYSTST=1, BOTH SYS AND DIR - RET ;NZ IF OK, Z IF NOT OK -; -; FILL FCB @HL WITH '?' -; -FILLQ: - MVI B,11 ;NUMBER OF CHARS IN FN & FT - MVI A,'?' ;STORE '?' -FILLP: - MOV M,A ;STORE BYTE - INX H ;PT TO NEXT - DJNZ FILLP ;COUNT DOWN - RET -; -; LOAD DIRECTORY AND SORT IT -; ON INPUT, A=SYSTST FLAG (0=SYS, 1=DIR, 80H=BOTH) -; DIRECTORY IS LOADED INTO DIRBUF -; RETURN WITH ZERO SET IF NO MATCH AND HL PTS TO 1ST ENTRY IF MATCH -; -GETDIR: - STA SYSTST ; SET SYSTEM TEST FLAG - CALL LOGUSR ; LOG INTO USER AREA OF FCB1 - LXI H,DIRBUF ; PT TO DIR BUFFER - MVI M,0 ; SET EMPTY - LXI B,0 ; SET COUNTER - CALL SEARF ; LOOK FOR MATCH - RZ ; RETURN IF NOT FOUND -; -; STEP 1: LOAD DIRECTORY -; -GD1: - PUSH B ; SAVE COUNTER - CALL GETSBIT ; CHECK FOR SYSTEM OK - POP B - JRZ GD2 ; NOT OK, SO SKIP - PUSH B ; SAVE COUNTER - INX D ; PT TO FILE NAME - XCHG ; HL PTS TO FILE NAME, DE PTS TO BUFFER - MVI B,11 ; COPY 11 BYTES - CALL LDIR ; DO COPY - XCHG ; HL PTS TO NEXT BUFFER LOCATION - POP B ; GET COUNTER - INX B ; INCREMENT COUNTER -GD2: - CALL SEARN ; LOOK FOR NEXT - JRNZ GD1 - MVI M,0 ; STORE ENDING 0 - LXI H,DIRBUF ; PT TO DIR BUFFER - MOV A,M ; CHECK FOR EMPTY - ORA A - RZ -; -; STEP 2: SORT DIRECTORY -; - PUSH H ; SAVE PTR TO DIRBUF FOR RETURN - CALL DIRALPHA ; SORT - POP H - XRA A ; SET NZ FLAG FOR OK - DCR A - RET - -;* -;* DIRALPHA -- ALPHABETIZES DIRECTORY IN DIRBUF; BC CONTAINS -;* THE NUMBER OF FILES IN THE DIRECTORY -;* -DIRALPHA: - MOV A,B ; ANY FILES? - ORA C - RZ - MOV H,B ; HL=BC=FILE COUNT - MOV L,C - SHLD N ; SET "N" -;* -;* SHELL SORT -- -;* THIS SORT ROUTINE IS ADAPTED FROM "SOFTWARE TOOLS" -;* BY KERNIGAN AND PLAUGHER, PAGE 106. COPYRIGHT, 1976, ADDISON-WESLEY. -;* ON ENTRY, BC=NUMBER OF ENTRIES -;* -N EQU $+1 ; POINTER FOR IN-THE-CODE MODIFICATION - LXI H,0 ; NUMBER OF ITEMS TO SORT - SHLD GAP ; SET INITIAL GAP TO N FOR FIRST DIVISION BY 2 - -;* FOR (GAP = N/2; GAP > 0; GAP = GAP/2) -SRTL0: - ORA A ; CLEAR CARRY -GAP EQU $+1 ; POINTER FOR IN-THE-CODE MODIFICATION - LXI H,0 ; GET PREVIOUS GAP - MOV A,H ; ROTATE RIGHT TO DIVIDE BY 2 - RAR - MOV H,A - MOV A,L - RAR - MOV L,A - -;* TEST FOR ZERO - ORA H - RZ ; DONE WITH SORT IF GAP = 0 - - SHLD GAP ; SET VALUE OF GAP - SHLD I ; SET I=GAP FOR FOLLOWING LOOP - -;* FOR (I = GAP + 1; I <= N; I = I + 1) -SRTL1: -I EQU $+1 ; POINTER FOR IN-THE-CODE MODIFICATION - LXI H,0 ; ADD 1 TO I - INX H - SHLD I - -;* TEST FOR I <= N - XCHG ; I IS IN DE - LHLD N ; GET N - MOV A,L ; COMPARE BY SUBTRACTION - SUB E - MOV A,H - SBB D ; CARRY SET MEANS I > N - JRC SRTL0 ; DON'T DO FOR LOOP IF I > N - - LHLD I ; SET J = I INITIALLY FOR FIRST SUBTRACTION OF GAP - SHLD J - -;* FOR (J = I - GAP; J > 0; J = J - GAP) -SRTL2: - LHLD GAP ; GET GAP - XCHG ; ... IN DE -J EQU $+1 ; POINTER FOR IN-THE-CODE MODIFICATION - LXI H,0 ; GET J - MOV A,L ; COMPUTE J - GAP - SUB E - MOV L,A - MOV A,H - SBB D - MOV H,A - SHLD J ; J = J - GAP - JRC SRTL1 ; IF CARRY FROM SUBTRACTIONS, J < 0 AND ABORT - MOV A,H ; J=0? - ORA L - JRZ SRTL1 ; IF ZERO, J=0 AND ABORT - -;* SET JG = J + GAP - XCHG ; J IN DE - LHLD GAP ; GET GAP - DAD D ; J + GAP - SHLD JG ; JG = J + GAP - -;* IF (V(J) <= V(JG)) - CALL ICOMPARE ; J IN DE, JG IN HL - -;* ... THEN BREAK - JRC SRTL1 - -;* ... ELSE EXCHANGE - LHLD J ; SWAP J, JG - XCHG -JG EQU $+1 ; POINTER FOR IN-THE-CODE MODIFICATION - LXI H,0 - CALL ISWAP ; J IN DE, JG IN HL - -;* END OF INNER-MOST FOR LOOP - JR SRTL2 - -;* -;* SWAP (Exchange) the elements whose indexes are in HL and DE -;* -ISWAP: - CALL IPOS ; COMPUTE POSITION FROM INDEX - XCHG - CALL IPOS ; COMPUTE 2ND ELEMENT POSITION FROM INDEX - MVI B,11 ; 11 BYTES TO FLIP -ISWAP1: - LDAX D ; GET BYTES - MOV C,M - MOV M,A ; PUT BYTES - MOV A,C - STAX D - INX H ; PT TO NEXT - INX D - DJNZ ISWAP1 - RET -;* -;* ICOMPARE compares the entry pointed to by the pointer pointed to by HL -;* with that pointed to by DE (1st level indirect addressing); on entry, -;* HL and DE contain the numbers of the elements to compare (1, 2, ...); -;* on exit, Carry Set means ((DE)) < ((HL)), Zero Set means ((HL)) = ((DE)), -;* and Non-Zero and No-Carry means ((DE)) > ((HL)) -;* -ICOMPARE: - CALL IPOS ; GET POSITION OF FIRST ELEMENT - XCHG - CALL IPOS ; GET POSITION OF 2ND ELEMENT - XCHG -;* -;* COMPARE DIR ENTRY PTED TO BY HL WITH THAT PTED TO BY DE; -;* NO NET EFFECT ON HL, DE; RET W/CARRY SET MEANS DE Erase Specified files and print their names -; ERA I Erase Specified files and print their names, but ask -; for verification before Erase is done -; - IF ERAON -ERA: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WERA - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE - LDA FCB2+1 ;GET ERAFLG IF IT'S THERE - STA ERAFLG ;SAVE IT AS A FLAG - MVI A,1 ;DIR FILES ONLY - CALL GETDIR ;LOAD DIRECTORY OF FILES - JZ PRFNF ;ABORT IF NO FILES -; -; MAIN ERASE LOOP -; -ERA1: - PUSH H ;SAVE PTR TO FILE - CALL PRFN ;PRINT ITS NAME - SHLD NXTFILE ;SAVE PTR TO NEXT FILE - POP H ;GET PTR TO THIS FILE - CALL ROTEST ;TEST FILE PTED TO BY HL FOR R/O - JRNZ ERA3 -ERAFLG EQU $+1 ;ADDRESS OF FLAG - MVI A,0 ;2ND BYTE IS FLAG - CPI 'I' ;IS IT AN INSPECT OPTION? - JRNZ ERA2 ;SKIP PROMPT IF IT IS NOT - CALL ERAQ ;ERASE? - JRNZ ERA3 ;SKIP IF NOT -ERA2: - LXI D,FCB1+1 ;COPY INTO FCB1 - MVI B,11 ;11 BYTES - CALL LDIR - CALL INITFCB1 ;INIT FCB - MVI C,19 ;DELETE FILE - CALL BDOS -ERA3: - LHLD NXTFILE ;HL PTS TO NEXT FILE - MOV A,M ;GET CHAR - ORA A ;DONE? - JZ EXIT - CALL CRLF ;NEW LINE - JR ERA1 -; - ENDIF ;ERAON -; -;Section 5C -;Command: LIST -;Function: Print out specified file on the LST: Device -;Forms: -; LIST Print file (NO Paging) -;Notes: -; The flags which apply to TYPE do not take effect with LIST -; - IF LTON -LIST: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WLIST - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE - MVI A,0FFH ;TURN ON PRINTER FLAG - JR TYPE0 -; -;Section 5D -;Command: TYPE -;Function: Print out specified file on the CON: Device -;Forms: -; TYPE Print file -; TYPE 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: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WTYPE - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE - XRA A ;TURN OFF PRINTER FLAG -; -; ENTRY POINT FOR CPR LIST FUNCTION (LIST) -; -TYPE0: - STA PRFLG ;SET FLAG - LDA FCB2+1 ;GET PAGE FLAG - STA PGFLG ;SAVE IT AS A FLAG - MVI A,1 ;SELECT DIR FILES - CALL GETDIR ;ALLOW AMBIGUOUS FILES - JZ PRFNF ;NO FILES - SHLD NXTFILE ;SET PTR TO NEXT FILE - JR TYPEX2 -TYPEX: - LHLD NXTFILE ;GET PTR TO NEXT FILE - MOV A,M ;ANY FILES? - ORA A - JZ EXIT - LDA PRFLG ;CHECK FOR LIST OUTPUT - ORA A ;0=TYPE - JRZ TYPEX1 - MVI A,CR ;BOL ON PRINTER - CALL LCOUT - MVI A,FF ;FORM FEED THE PRINTER - CALL LCOUT - JR TYPEX2 -TYPEX1: - CALL PAGEBREAK ;PAGE BREAK MESSAGE -TYPEX2: - LXI D,FCB1+1 ;COPY INTO FCB1 - MVI B,11 ;11 BYTES - CALL LDIR - SHLD NXTFILE ;SET PTR TO NEXT FILE - CALL INITFCB1 ;INIT FCB1 - MVI C,15 ;OPEN FILE - CALL BDOS - INR A ;SET ERROR FLAG - JZ PRFNF ;ABORT IF ERROR - MVI A,NLINES-2 ;SET LINE COUNT - STA PAGCNT - MVI A,CR ;NEW LINE - CALL LCOUT - MVI A,LF - CALL LCOUT - LXI B,080H ;SET CHAR POSITION AND TAB COUNT - ; (B=0=TAB, C=080H=CHAR POSITION) -; -; MAIN LOOP FOR LOADING NEXT BLOCK -; -TYPE2: - MOV A,C ;GET CHAR COUNT - CPI 80H - JRC TYPE3 - PUSH H ;READ NEXT BLOCK - PUSH B - LXI D,FCB1 ;PT TO FCB - MVI C,20 ;READ RECORD - CALL BDOS - ORA A ;SET FLAGS - POP B - POP H - JRNZ TYPE7 ;END OF FILE? - MVI C,0 ;SET CHAR COUNT - LXI H,TBUFF ;PT TO FIRST CHAR -; -; MAIN LOOP FOR PRINTING CHARS IN TBUFF -; -TYPE3: - MOV A,M ;GET NEXT CHAR - ANI 7FH ;MASK OUT MSB - CPI 1AH ;END OF FILE (^Z)? - JRZ TYPE7 ;NEXT FILE IF SO -; -; OUTPUT CHAR TO CON: OR LST: DEVICE WITH TABULATION -; - CPI CR ;RESET TAB COUNT? - JRZ TYPE4 - CPI LF ;RESET TAB COUNT? - JRZ TYPE4 - CPI TAB ;TAB? - JRZ TYPE5 -; -; OUTPUT CHAR AND INCREMENT CHAR COUNT -; - CALL LCOUT ;OUTPUT CHAR - JZ TYPEX ;SKIP - INR B ;INCREMENT TAB COUNT - JR TYPE6 -; -; OUTPUT OR AND RESET TAB COUNT -; -TYPE4: - CALL LCOUT ;OUTPUT OR - JZ TYPEX ;SKIP - MVI B,0 ;RESET TAB COUNTER - JR TYPE6 -; -; TABULATE -; -TYPE5: - MVI A,' ' ; - CALL LCOUT - JZ TYPEX ;SKIP - INR B ;INCR POS COUNT - MOV A,B - ANI 7 - JRNZ TYPE5 -; -; CONTINUE PROCESSING -; -TYPE6: - INR C ;INCREMENT CHAR COUNT - INX H ;PT TO NEXT CHAR - CALL BREAK ;CHECK FOR ABORT - JZ TYPEX ;SKIP - JR TYPE2 -TYPE7: - LXI D,FCB1 ;CLOSE FILE - MVI C,16 ;BDOS FUNCTION - CALL BDOS - JMP TYPEX -; -; SEND OUTPUT TO LST: OR CON:, AS PER THE FLAG -; RETURN WITH Z IF ABORT -; -LCOUT: - PUSH H ;SAVE REGS - PUSH D - PUSH B - MOV E,A ;CHAR IN E - MVI C,2 ;OUTPUT TO CON: -PRFLG EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;2ND BYTE IS THE PRINT FLAG - ORA A ;0=TYPE - JRZ LC1 - MVI C,5 ;OUTPUT TO LST: -LC1: - PUSH D ;SAVE CHAR - CALL BDOS ;OUTPUT CHAR IN E - POP D ;GET CHAR - MOV A,E - CPI LF - JRNZ LC2 - LDA PRFLG ;OUTPUT TO LST:? - ORA A ;NZ = YES - JRNZ LC2 -; -; CHECK FOR PAGING -; - LXI H,PAGCNT ;COUNT DOWN - DCR M - JRNZ LC2 ;JUMP IF NOT END OF PAUSE - MVI M,NLINES-2 ;REFILL COUNTER -PGFLG EQU $+1 ;POINTER TO IN-THE-CODE BUFFER - MVI A,0 ;2ND BYTE IS THE PAGING FLAG - CPI PGDFLG ;PAGE DEFAULT OVERRIDE OPTION WANTED? -; - IF PGDFLT ;IF PAGING IS DEFAULT -; - JRZ LC2 ;PGDFLG MEANS NO PAGING -; - ELSE -; - JRNZ LC2 ;PGDFLG MEANS PAGE -; - ENDIF ;PGDFLT -; - CALL PAGEBREAK ;PRINT PAGE BREAK MESSAGE - JR LC3 ;Z TO SKIP -LC2: - XRA A ;SET OK - DCR A ;NZ=OK -LC3: - POP B ;RESTORE REGS - POP D - POP H - RET -; -; PRINT PAGE BREAK MESSAGE AND GET USER INPUT -; ABORT IF ^C, RZ IF ^X -; -PAGEBREAK: - PUSH H ;SAVE HL - CALL PRINT - DB cr,lf,' Typing',' '+80H - LXI H,FCB1+1 ;PRINT FILE NAME - CALL PRFN - CALL DASH ;PRINT DASH - CALL CONIN ;GET INPUT - POP H ;RESTORE HL - PUSH PSW - CALL CRLF ;NEW LINE - POP PSW - CPI CTRLC ;^C - JZ EXIT - CPI CTRLX ;SKIP? - RET -; - ENDIF ;LTON -; -;Section 5E -;Command: REN -;Function: To change the name of an existing file -;Forms: -; REN = Perform function -; - IF RENON -REN: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WREN - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE -; -; -; STEP 1: CHECK FOR FILE 2 BEING AMBIGUOUS -; - LXI H,FCB2+1 ;CAN'T BE AMBIGUOUS - CALL AMBCHK1 -; -; STEP 2: LOG INTO USER AREA -; - CALL LOGUSR ;LOG INTO USER AREA OF FCB1 -; -; STEP 3: 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 - JZ EXIT ;R/O OR NO PERMISSION -; -; STEP 4: EXCHANGE FILE NAME FIELDS FOR RENAME -; - LXI H,FCB1 ;EXCHANGE NAMES ONLY - PUSH H ;SAVE PTR - INX H - LXI D,FCB2+1 - MVI B,11 ;11 BYTES -REN1: - LDAX D ;GET OLD - MOV C,A - MOV A,M - STAX D ;PUT NEW - MOV M,C - INX H ;PT TO NEXT - INX D - DJNZ REN1 -; -; STEP 5: SEE IF OLD FILE IS R/O -; - CALL SEARF ;LOOK FOR FILE - JZ PRFNF - CALL GETSBIT ;GET PTR TO ENTRY IN TBUFF - XCHG ;HL PTS TO ENTRY - INX H ;PT TO FN - CALL ROTEST ;SEE IF FILE IS R/O - JNZ EXIT -; -; STEP 6: RENAME THE FILE -; - POP D ;GET PTR TO FCB - MVI C,23 ;RENAME - CALL BDOS - INR A ;SET ZERO FLAG IF ERROR - JZ PRFNF ;PRINT NO SOURCE FILE MESSAGE - JMP EXIT -; - ENDIF ;RENON -; -;Section 5F -;Command: PROT -;Function: To set the attributes of a file (R/O and SYS) -; -;Form: -; PROT afn RSI -;If either R or S are omitted, the file is made R/W or DIR, resp; -;R and S may be in any order. If I is present, Inspection is enabled. -; - IF PROTON -ATT: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WPROT - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE - XRA A ;SET NO INSPECT - STA INSPECT - LXI H,0 ;SET R/O AND SYS ATTRIBUTES OFF - LXI D,FCB2+1 ;PT TO ATTRIBUTES - MVI B,3 ;3 CHARS MAX -ATT1: - LDAX D ;GET CHAR - INX D ;PT TO NEXT - CPI 'I' ;INSPECT? - JRZ ATTI - CPI 'R' ;SET R/O? - JRZ ATTR - CPI 'S' ;SET SYS? - JRZ ATTS -ATT2: - DJNZ ATT1 - JR ATT3 -ATTI: - STA INSPECT ;SET FLAG - JR ATT2 -ATTR: - MVI H,80H ;SET R/O BIT - JR ATT2 -ATTS: - MVI L,80H ;SET SYS BIT - JR ATT2 -ATT3: - SHLD FATT ;SAVE FILE ATTRIBUTES - MVI A,1 ;SELECT DIR AND SYS FILES - CALL GETDIR ;LOAD DIRECTORY - JZ PRFNF ;NO FILE ERROR - SHLD NXTFILE ;PT TO NEXT FILE - JR ATT5 -ATT4: - LHLD NXTFILE ;PT TO NEXT FILE - MOV A,M ;END OF LIST? - ORA A - JZ EXIT - CALL CRLF ;NEW LINE -ATT5: - PUSH H ;SAVE PTR TO CURRENT FILE - CALL PRFN ;PRINT ITS NAME - SHLD NXTFILE ;SAVE PTR TO NEXT FILE - CALL PRINT - DB ' Set to R','/'+80H - LHLD FATT ;GET ATTRIBUTES - MVI C,'W' ;ASSUME R/W - MOV A,H ;GET R/O BIT - ORA A - JRZ ATT6 - MVI C,'O' ;SET R/O -ATT6: - MOV A,C ;GET CHAR - CALL CONOUT - MOV A,L ;GET SYS FLAG - ORA A ;SET FLAG - JRZ ATT7 - CALL PRINT - DB ' and SY','S'+80H -ATT7: -INSPECT EQU $+1 ;PTR FOR IN-THE-CODE MODIFICATION - MVI A,0 ;GET INSPECT FLAG - ORA A ;Z=NO - POP H ;GET PTR TO CURRENT FILE - JRZ ATT8 - CALL ERAQ1 ;ASK FOR Y/N - JRNZ ATT4 ;ADVANCE TO NEXT FILE IF NOT Y -ATT8: - LXI D,FCB1+1 ;COPY INTO FCB1 - MVI B,11 ;11 BYTES - CALL LDIR -FATT EQU $+1 ;PTR FOR IN-THE-CODE MODIFICATION - LXI H,0 ;GET ATTRIBUTES - DCX D ;PT TO SYS BYTE - DCX D - MOV A,L ;GET SYS FLAG - CALL ATTSET ;SET ATTRIBUTE CORRECTLY - DCX D ;PT TO R/O BYTE - MOV A,H ;GET R/O FLAG - CALL ATTSET - LXI D,FCB1 ;PT TO FCB - MVI C,30 ;SET ATTRIBUTES - CALL BDOS - JR ATT4 -ATTSET: - ORA A ;0=CLEAR ATTRIBUTE - JRZ ATTST1 - LDAX D ;GET BYTE - ORI 80H ;SET ATTRIBUTE - STAX D - RET -ATTST1: - LDAX D ;GET BYTE - ANI 7FH ;CLEAR ATTRIBUTE - STAX D - RET -; - ENDIF ;PROTON -; -;Section 5G -;Command: CP -;Function: To copy a file from one place to another -; -;Form: -; CP new=old -; - IF CPON -COPY: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WCP - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE -; -; STEP 0: IF NEW IS BLANK, MAKE IT THE SAME NAME AND TYPE AS OLD -; - LXI D,FCB1+1 ;PT TO NEW FILE NAME - LDAX D ;GET FIRST CHAR - CPI ' ' ;NO NAME? - JRNZ COPY0 - LXI H,FCB2+1 ;MAKE SAME AS OLD - MVI B,11 ;11 BYTES - CALL LDIR -; -; STEP 1: SEE IF NEW=OLD AND ABORT IF SO -; -COPY0: - LXI H,FCB1 ;PT TO NEXT - LXI D,FCB2 ;PT TO OLD - PUSH H ;SAVE PTRS - PUSH D - INX H ;PT TO FILE NAME - INX D - MVI B,13 ;COMPARE 13 BYTES -COPY1: - LDAX D ;GET OLD - CMP M ;COMPARE TO NEW - JRNZ COPY2 - INX H ;PT TO NEXT - INX D - DJNZ COPY1 - MVI C,25 ;GET CURRENT DISK - CALL BDOS - INR A ;MAKE 1..P - MOV B,A ;CURRENT DISK IN B - POP D ;GET PTR TO DN - POP H - LDAX D ;GET DISK - MOV C,A ;... IN C - ORA A ;CURRENT? - JRNZ COPY1A - MOV C,B ;MAKE C CURRENT -COPY1A: - MOV A,M ;GET DISK - ORA A ;CURRENT? - JRNZ COPY1B - MOV A,B ;MAKE A CURRENT -COPY1B: - CMP C ;SAME DISK ALSO? - JRNZ COPY3 ;CONTINUE WITH OPERATION - JR CPERR -COPY2: - POP D ;GET PTRS - POP H -; -; STEP 2: SET USER NUMBERS -; -COPY3: - LDA FCB1+13 ;GET NEW USER - STA USRNEW - LDA FCB2+13 ;GET OLD USER - STA USROLD -; -; STEP 3: SEE IF OLD FILE EXISTS -; - LXI H,OLDFCB ;COPY OLD INTO 2ND FCB - PUSH H ;SAVE PTR TO 2ND FCB - XCHG - MVI B,14 ;14 BYTES - CALL LDIR - CALL LOGOLD ;LOG IN USER NUMBER OF OLD FCB - POP H ;GET PTR TO 2ND FCB - CALL INITFCB2 ;INIT FCB - MVI C,17 ;LOOK FOR FILE - CALL BDOS - INR A ;CHECK FOR ERROR - JZ PRFNF ;FILE NOT FOUND -; -; STEP 4: SEE IF NEW EXISTS -; - CALL LOGNEW ;LOG INTO NEW'S USER AREA - CALL EXTEST ;TEST - JZ EXIT ;ERROR EXIT -; -; STEP 5: CREATE NEW -; - LXI D,FCB1 ;PT TO FCB - MVI C,22 ;MAKE FILE - CALL BDOS - INR A ;ERROR? - JRNZ COPY4 -; -; COPY ERROR -; -CPERR: - CALL PRINT - DB ' Copy','?'+80H - JMP EXIT -; -; STEP 6: OPEN OLD -; -COPY4: - CALL LOGOLD ;GET USER - LXI H,OLDFCB ;PT TO FCB - CALL INITFCB2 ;INIT FCB - MVI C,15 ;OPEN FILE - CALL BDOS -; -; STEP 7: COPY OLD TO NEW WITH BUFFERING -; -COPY5: - CALL LOGOLD ;GET USER - MVI B,0 ;SET COUNTER - LXI H,TPA ;SET NEXT ADDRESS TO COPY INTO -COPY5A: - PUSH H ;SAVE ADDRESS AND COUNTER - PUSH B - LXI D,OLDFCB ;READ BLOCK FROM FILE - MVI C,20 - CALL BDOS - POP B ;GET COUNTER AND ADDRESS - POP D - ORA A ;OK? - JRNZ COPY5B - PUSH B ;SAVE COUNTER - LXI H,TBUFF ;COPY FROM BUFFER - MVI B,128 ;128 BYTES - CALL LDIR - XCHG ;HL PTS TO NEXT - POP B ;GET COUNTER - INR B ;INCREMENT IT - MOV A,B ;DONE? - CPI CPBLOCKS ;DONE IF CPBLOCKS LOADED - JRNZ COPY5A -COPY5B: - MOV A,B ;GET COUNT - ORA A - JRZ COPY6 ;DONE IF NOTHING LOADED - PUSH B ;SAVE COUNT - CALL LOGNEW ;GET USER - LXI H,TPA ;PT TO TPA -COPY5C: - LXI D,TBUFF ;COPY INTO TBUFF - MVI B,128 ;128 BYTES - CALL LDIR - PUSH H ;SAVE PTR TO NEXT - LXI D,FCB1 ;PT TO FCB - MVI C,21 ;WRITE BLOCK - CALL BDOS - ORA A - JRNZ CPERR ;COPY ERROR - POP H ;GET PTR TO NEXT BLOCK - POP B ;GET COUNT - DCR B ;COUNT DOWN - JRZ COPY5 ;GET NEXT - PUSH B ;SAVE COUNT - JR COPY5C -; -; STEP 8: CLOSE FILES -; -COPY6: - CALL LOGOLD ;GET USER - LXI D,OLDFCB ;PT TO FCB - MVI C,16 ;CLOSE FILE - CALL BDOS - CALL LOGNEW ;GET USER - LXI D,FCB1 ;PT TO FCB - MVI C,16 ;CLOSE FILE - CALL BDOS - CALL PRINT - DB ' Don','e'+80H - JMP EXIT -; -; LOG INTO USER NUMBER OF OLD FILE -; -LOGOLD: -USROLD EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;GET NUMBER - JMP SETUSR -; -; LOG INTO USER NUMBER OF NEW FILE -; -LOGNEW: -USRNEW EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;GET NUMBER - JMP SETUSR -; - ENDIF ;CPON -; -;Section 5H -;Command: PEEK -;Function: Display memory -; -;Form: -; PEEK startadr - 256 bytes displayed -; PEEK startadr endadr - range of bytes displayed -; - IF PEEKON -PEEK: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WPEEK - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE - LXI H,TBUFF+1 ;FIND FIRST NUMBER -NXTPEEK EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - LXI D,0 ;DEFAULT PEEK ADDRESS IF NONE - CALL SKSP ;SKIP TO NON-BLANK - CNZ HEXNUM ;GET START ADDRESS IF ANY (ELSE DEFAULT) - CALL PRINT - DB ' Pee','k'+80H - CALL ADRAT ;PRINT ADDRESS MESSAGE - PUSH D ;SAVE IT - LXI B,256 ;COMPUTE END ADDRESS - XCHG - DAD B - XCHG ;END ADDRESS IN DE - CALL SKSP ;SKIP TO NON-BLANK - JRZ PEEK1 ;PROCESS - CALL HEXNUM ;GET 2ND NUMBER IN DE -PEEK1: - POP H ;HL IS START ADDRESS, DE IS END ADDRESS - CALL PEEK2 ;DO PEEK - SHLD NXTPEEK ;SET CONTINUED PEEK ADDRESS - JMP EXIT -; -; DISPLAY LOOP -; -PEEK2: - MOV A,D ;SEE IF DE<=HL - CMP H - RC ;OUT OF BOUNDS - JRNZ PEEK2A ;HL > DE - MOV A,E - CMP L - RZ - RC -PEEK2A: - CALL CRLF ;NEW LINE - MOV A,H ;PRINT ADDRESS - CALL PASHC - MOV A,L - CALL PAHC - CALL DASH ;PRINT LEADER - MVI B,16 ;16 BYTES TO DISPLAY - PUSH H ;SAVE START ADDRESS -PEEK3: - MOV A,M ;GET NEXT BYTE - CALL PASHC ;PRINT WITH LEADING SPACE - INX H ;PT TO NEXT - DJNZ PEEK3 - POP H ;PT TO FIRST - MVI B,16 ;16 BYTES - MVI A,' ' ;SPACE AND FENCE - CALL CONOUT - CALL PRINT - DB FENCE+80H -PEEK4: - MOV A,M ;GET NEXT BYTE - MVI C,'.' ;ASSUME DOT - ANI 7FH ;MASK IT - CPI ' ' ;DOT IF LESS THAN SPACE - JRC PEEK5 - CPI 7FH ;DON'T PRINT DEL - JRZ PEEK5 - MOV C,A ;CHAR IN C -PEEK5: - MOV A,C ;GET CHAR - CALL CONOUT ;SEND IT - INX H ;PT TO NEXT - DJNZ PEEK4 - CALL PRINT ;CLOSING FENCE - DB FENCE+80H - CALL BREAK ;ALLOW ABORT - JR PEEK2 -; - ENDIF ;PEEKON -; -; PRINT A AS 2 HEX CHARS -; PASHC - LEADING SPACE -; - IF PEEKON OR POKEON -PASHC: - PUSH PSW ;SAVE A - CALL PRINT - DB ' '+80H - POP PSW -PAHC: - PUSH B ;SAVE BC - MOV C,A ;BYTE IN C - RRC ;EXCHANGE NYBBLES - RRC - RRC - RRC - CALL PAH ;PRINT HEX CHAR - MOV A,C ;GET LOW - POP B ;RESTORE BC AND FALL THRU TO PAH -PAH: - ANI 0FH ;MASK - ADI '0' ;CONVERT TO ASCII - CPI '9'+1 ;LETTER? - JRC PAH1 - ADI 7 ;ADJUST TO LETTER -PAH1: - JMP CONOUT -; - ENDIF ;PEEKON OR POKEON -; -;Section 5I -;Command: POKE -;Function: Place Values into Memory -; -;Form: -; POKE startadr val1 val2 ... -; - IF POKEON -POKE: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WPOKE - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE - LXI H,TBUFF+1 ;PT TO FIRST CHAR - CALL SKSP ;SKIP TO NON-BLANK - JRZ NOARGS ;ARG ERROR - CALL HEXNUM ;CONVERT TO NUMBER - CALL PRINT - DB ' Pok','e'+80H - CALL ADRAT ;PRINT AT MESSAGE -; -; LOOP FOR STORING HEX VALUES SEQUENTIALLY VIA POKE -; -POKE1: - PUSH D ;SAVE ADDRESS - CALL SKSP ;SKIP TO NON-BLANK - JZ EXIT ;DONE - CPI '"' ;QUOTED TEXT? - JRZ POKE2 - CALL HEXNUM ;GET NUMBER - MOV A,E ;GET LOW - POP D ;GET ADDRESS - STAX D ;STORE NUMBER - INX D ;PT TO NEXT - JR POKE1 -; -; STORE ASCII CHARS -; -POKE2: - POP D ;GET NEXT ADDRESS - INX H ;PT TO NEXT CHAR -POKE3: - MOV A,M ;GET NEXT CHAR - ORA A ;DONE? - JZ EXIT - STAX D ;PUT CHAR - INX H ;PT TO NEXT - INX D - JR POKE3 -; -; No Argument Error -; -NOARGS: - CALL PRINT - DB ' Arg','?'+80H - JMP EXIT -; - ENDIF ;POKEON -; -;Section 5J -;Command: REG -;Function: Manipulate Memory Registers -; -;Forms: -; REG D or REG <-- Display Register Value -; REG Mreg <-- Decrement Register Value -; REG Preg <-- Increment Register Value -; REG Sreg value <-- Set Register Value -; - IF REGON -REGCMD: - LXI H,FCB1+1 ;PT TO FIRST ARG - MOV A,M ;GET FIRST CHAR - PUSH PSW ;SAVE CHAR - CPI 'A' ;ASSUME DIGIT IF LESS THAN 'A' - JRC REGC1 - INX H ;PT TO DIGIT -REGC1: - MOV A,M ;GET DIGIT - CALL REGPTR ;PT TO REGISTER - POP PSW ;GET CHAR - CPI 'S' ;SET? - JRZ RSET - CPI 'P' ;PLUS? - JRZ RINC - CPI 'M' ;MINUS? - JRZ RDEC -; -; SHOW REGISTER VALUES -; -RSHOW: - XRA A ;SELECT REGISTER 0 - MOV B,A ;COUNTER SET TO 0 IN B - CALL REGP2 ;HL PTS TO REGISTER 0 -RSHOW1: - MOV A,B ;GET COUNTER VALUE - CPI 10 - JZ CRLF ;NEW LINE AND EXIT IF DONE - CALL PRINT - DB ' Reg',' '+80H - MOV A,B ;PRINT REGISTER NUMBER - ADI '0' - CALL CONOUT - CALL PRINT - DB ' ','='+80H - PUSH B ;SAVE COUNTER - CALL REGOUT ;PRINT REGISTER VALUE - POP B ;GET COUNTER - INR B ;INCREMENT COUNTER - MOV A,B ;CHECK FOR NEW LINE - ANI 3 - CZ CRLF - INX H ;PT TO NEXT REGISTER - JR RSHOW1 -; -; INCREMENT REGISTER VALUE -; HL PTS TO MEMORY REGISTER ON INPUT -; -RINC: - INR M ;INCREMENT IT - JR REGOUT ;PRINT RESULT -; -; DECREMENT REGISTER VALUE -; HL PTS TO MEMORY REGISTER ON INPUT -; -RDEC: - DCR M ;DECREMENT VALUE - JR REGOUT ;PRINT RESULT -; -; SET REGISTER VALUE -; HL PTS TO REGISTER ON INPUT -; -RSET: - LXI D,FCB2+1 ;PT TO VALUE - MVI B,0 ;INIT VALUE TO ZERO -RSET1: - LDAX D ;GET NEXT DIGIT - INX D ;PT TO NEXT - SUI '0' ;CONVERT TO BINARY - JRC RSET2 - CPI 10 ;RANGE? - JRNC RSET2 - MOV C,A ;DIGIT IN C - MOV A,B ;MULTIPLY OLD BY 10 - ADD A ;*2 - ADD A ;*4 - ADD B ;*5 - ADD A ;*10 - ADD C ;ADD IN NEW DIGIT - MOV B,A ;RESULT IN B - JR RSET1 -RSET2: - MOV M,B ;SET VALUE -REGOUT: - CALL PRINT ;PRINT LEADING SPACE - DB ' '+80H - MOV A,M ;GET REGISTER VALUE - MVI B,100 ;PRINT 100'S - MVI C,0 ;SET LEADING SPACE FLAG - CALL DECB ;PRINT 100'S - MVI B,10 ;PRINT 10'S - CALL DECB ;PRINT 10'S - ADI '0' ;PRINT 1'S - JMP CONOUT -; -; SUBTRACT B FROM A UNTIL CARRY, THEN PRINT DIGIT COUNT -; -DECB: - MVI D,'0' ;SET DIGIT -DECB1: - SUB B ;SUBTRACT - JRC DECB2 - INR D ;ADD 1 TO DIGIT CHAR - JR DECB1 -DECB2: - ADD B ;ADD BACK IN - MOV E,A ;SAVE A IN E - MOV A,D ;GET DIGIT CHAR - CPI '0' ;LEADING ZERO CHECK - JRNZ DECB3 - MOV A,C ;ANY LEADING DIGIT YET? - ORA A - JRZ DECB4 -DECB3: - MOV A,D ;GET DIGIT CHAR - CALL CONOUT ;PRINT IT - INR C ;SET C<>0 FOR LEADING DIGIT CHECK -DECB4: - MOV A,E ;RESTORE A FOR NEXT ROUND - RET - -; -; 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: - MVI B,0 ;INIT TO ZERO - SUI '0' ;CONVERT - JRC REGP1 - CPI 10 ;RANGE - JRNC REGP1 - MOV B,A ;VALUE IN B -REGP1: - MOV A,B ;VALUE IN A -REGP2: - LXI H,Z3MSG+30H ;PT TO MEMORY REGISTERS - ADD L ;PT TO PROPER REGISTER - MOV L,A - MOV A,H - ACI 0 - MOV H,A ;HL PTS TO REGISTER - RET -; - ENDIF ;REGON - -; -;Section 5K -;Command: WHL/WHLQ -;Function: Set the Wheel Byte on or off -; -;Form: -; WHL -- turn Wheel Byte OFF -; WHL password -- turn Wheel Byte ON if password is correct -; WHLQ -- find out status of Wheel Byte -; - IF WHLON -WHL: - LXI H,FCB1+1 ;PT TO FIRST CHAR - MOV A,M ;GET IT - CPI ' ' ;TURN BYTE OFF IF NO PASSWORD - JRZ WHLOFF - LXI D,WHLPASS - MVI B,8 ;CHECK 8 CHARS -WHL1: - LDAX D ;GET CHAR - CMP M ;COMPARE - JRNZ WHLMSG - INX H ;PT TO NEXT - INX D - DJNZ WHL1 -; -; TURN ON WHEEL BYTE -; - MVI A,0FFH ;TURN ON WHEEL BYTE - JR WHLSET -; -; TURN OFF WHEEL BYTE -; -WHLOFF: - XRA A ;TURN OFF WHEEL BYTE -WHLSET: - STA Z3WHL ;SET WHEEL BYTE AND PRINT MESSAGE -; -; PRINT WHEEL BYTE MESSAGE -; -WHLMSG: - CALL PRINT - DB ' Wheel Byte',' '+80H - LDA Z3WHL ;GET WHEEL BYTE - ORA A ;ZERO IS OFF - JRZ OFFM - CALL PRINT - DB 'O','N'+80H - RET -OFFM: - CALL PRINT - DB 'OF','F'+80H - RET -; -; WHEEL PASSWORD DEFINED FROM SYSRCP.LIB FILE -; - DB 'Z'-'@' ;LEADING ^Z IN CASE OF TYPE -WHLPASS: - WPASS ;USE MACRO -; - ENDIF ;WHLON - -; -;Section 5L -;Command: ECHO -;Function: Echo Text without Interpretation to Console or Printer -; -;Form: -; ECHO text <-- echo text to console -; ECHO $text <-- echo text to printer -; -; Additionally, if a form feed character is encountered in the -; output string, no further output will be done, a new line will be -; issued, and this will be followed by a form feed character. That is: -; -; ECHO $text^L -; -; will cause "text" to be printed on the printer followed by CR, LF, FF. -; -ECHO: - LXI H,TBUFF+1 ;PT TO FIRST CHAR -ECHO1: - MOV A,M ;SKIP LEADING SPACES - INX H ;PT TO NEXT - CPI ' ' - JRZ ECHO1 -; - IF ECHOLST - MOV B,A ;CHAR IN B - CPI '$' ;PRINT FLAG? - JRZ ECHO2 - ENDIF ;ECHOLST -; - DCX H ;PT TO CHAR -; -; LOOP TO ECHO CHARS -; -ECHO2: - MOV A,M ;GET CHAR - ORA A ;EOL? - JRZ ECHO4 -; - IF ECHOLST - CPI FF ;FORM FEED? - JRZ ECHO3 - ENDIF ;ECHOLST -; -ECHO2C: - CALL ECHOUT ;SEND CHAR - INX H ;PT TO NEXT - JR ECHO2 -; -; FORM FEED - SEND NEW LINE FOLLOWED BY FORM FEED IF PRINTER OUTPUT -; - IF ECHOLST -ECHO3: - MOV A,B ;CHECK FOR PRINTER OUTPUT - CPI '$' - JRNZ ECHOFF ;SEND FORM FEED NORMALLY IF NOT PRINTER - CALL ECHONL ;SEND NEW LINE - MVI A,FF ;SEND FORM FEED - JR ECHOUT -; -; SEND FORM FEED CHAR TO CONSOLE -; -ECHOFF: - MVI A,FF ;GET CHAR - JR ECHO2C - ENDIF ;ECHOLST -; -; END OF PRINT LOOP - CHECK FOR PRINTER TERMINATION -; -ECHO4: - IF NOT ECHOLST -; - RET -; - ELSE -; - MOV A,B ;CHECK FOR PRINTER OUTPUT - CPI '$' - RNZ ;DONE IF NO PRINTER OUTPUT -; -; OUTPUT A NEW LINE -; -ECHONL: - MVI A,CR ;OUTPUT NEW LINE ON PRINTER - CALL ECHOUT - MVI A,LF ;FALL THRU TO ECHOUT -; - ENDIF ;NOT ECHOLST -; -; OUTPUT CHAR TO PRINTER OR CONSOLE -; -ECHOUT: - MOV C,A ;CHAR IN C - PUSH H ;SAVE HL - PUSH B ;SAVE BC - LXI D,0CH-3 ;OFFSET FOR CONSOLE OUTPUT -; - IF ECHOLST - MOV A,B ;CHECK FOR PRINTER - CPI '$' - JRNZ ECHOUT1 - INX D ;ADD 3 FOR PRINTER OFFSET - INX D - INX D -; - ENDIF ;ECHOLST -; -; OUTPUT CHAR IN C WITH BIOS OFFSET IN DE -; -ECHOUT1: - CALL BIOUT ;BIOS OUTPUT - POP B ;RESTORE BC,HL - POP H - RET - -; -; OUTPUT CHAR IN C TO BIOS WITH OFFSET IN DE -; -BIOUT: - LHLD WBOOT+1 ;GET ADDRESS OF WARM BOOT - DAD D ;PT TO ROUTINE - PCHL ;JUMP TO IT - -; -; ** SUPPORT UTILITIES ** -; - -; -; CHECK FOR USER INPUT; IF ^C, RETURN WITH Z -; -BREAK: - PUSH H ;SAVE REGS - PUSH D - PUSH B - MVI E,0FFH ;GET CHAR IF ANY - MVI C,6 ;CONSOLE STATUS CHECK - CALL BDOS - POP B ;RESTORE REGS - POP D - POP H - CPI CTRLC ;CHECK FOR ABORT - JZ EXIT ;EXIT - CPI CTRLX ;SKIP? - RET - -; -; COPY HL TO DE FOR B BYTES -; -LDIR: - MOV A,M ;GET - STAX D ;PUT - INX H ;PT TO NEXT - INX D - DJNZ LDIR ;LOOP - RET - -; -; PRINT FILE NOT FOUND MESSAGE -; -PRFNF: - CALL PRINT - DB ' No File','s'+80H - JMP EXIT - -; -; OUTPUT NEW LINE TO CON: -; -CRLF: - MVI A,CR - CALL CONOUT - MVI A,LF - JMP CONOUT - -; -; SEARCH FOR FIRST AND NEXT -; -SEARF: - PUSH B ; SAVE COUNTER - PUSH H ; SAVE HL - MVI C,17 ; SEARCH FOR FIRST FUNCTION -SEARF1: - LXI D,FCB1 ; PT TO FCB - CALL BDOS - INR A ; SET ZERO FLAG FOR ERROR RETURN - POP H ; GET HL - POP B ; GET COUNTER - RET -SEARN: - PUSH B ; SAVE COUNTER - PUSH H ; SAVE HL - MVI C,18 ; SEARCH FOR NEXT FUNCTION - JR SEARF1 - -; -; CONSOLE INPUT -; -CONIN: - PUSH H ; SAVE REGS - PUSH D - PUSH B - MVI C,1 ; INPUT - CALL BDOS - POP B ; GET REGS - POP D - POP H - ANI 7FH ; MASK MSB - CPI 61H - RC - ANI 5FH ; TO UPPER CASE - RET - -; -; LOG INTO USER AREA CONTAINED IN FCB1 -; -LOGUSR: - LDA FCB1+13 ;GET USER NUMBER -SETUSR: - MOV E,A - MVI C,32 ;USE BDOS FCT - JMP BDOS - -; -; PRINT FILE NAME PTED TO BY HL -; -PRFN: - CALL PRINT ;LEADING SPACE - DB ' '+80H - MVI B,8 ;8 CHARS - CALL PRFN1 - MVI A,'.' ;DOT - CALL CONOUT - MVI B,3 ;3 CHARS -PRFN1: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CALL CONOUT ; PRINT CHAR - DJNZ PRFN1 ; COUNT DOWN - RET - -; -; SAVE RETURN ADDRESS -; -RETSAVE: - POP D ; GET RETURN ADDRESS - POP H ; GET RETURN ADDRESS TO ZCPR3 - SHLD Z3RET ; SAVE IT - PUSH H ; PUT RETURN ADDRESS TO ZCPR3 BACK - PUSH D ; PUT RETURN ADDRESS BACK - RET - -; -; EXIT TO ZCPR3 -; -EXIT: -Z3RET EQU $+1 ; POINTER TO IN-THE-CODE MODIFICATION - LXI H,0 ; RETURN ADDRESS - PCHL ; GOTO ZCPR3 - -; -; TEST WHEEL BYTE FOR APPROVAL -; IF WHEEL BYTE IS 0 (OFF), ABORT WITH A MESSAGE (FLUSH RET ADR AND EXIT) -; - IF WHEEL ;IF ANY WHEEL OPTION IS RUNNING -WHLTST: - LDA Z3WHL ;GET WHEEL BYTE - ORA A ;ZERO? - RNZ - POP PSW ;CLEAR STACK - CALL PRINT - DB ' No Whee','l'+80H - RET - ENDIF ;WHEEL - -; -; PRINT A DASH -; - IF LTON OR PEEKON -DASH: - CALL PRINT - DB ' -',' '+80H - RET -; - ENDIF ;LTON OR PEEKON -; -; PRINT ADDRESS MESSAGE -; PRINT ADDRESS IN DE -; - IF PEEKON OR POKEON -ADRAT: - CALL PRINT - DB ' at',' '+80H - MOV A,D ;PRINT HIGH - CALL PAHC - MOV A,E ;PRINT LOW - JMP PAHC -; -; EXTRACT HEXADECIMAL NUMBER FROM LINE PTED TO BY HL -; RETURN WITH VALUE IN DE AND HL PTING TO OFFENDING CHAR -; -HEXNUM: - LXI D,0 ;DE=ACCUMULATED VALUE - MVI B,5 ;B=CHAR COUNT -HNUM1: - MOV A,M ;GET CHAR - CPI ' '+1 ;DONE? - RC ;RETURN IF SPACE OR LESS - INX H ;PT TO NEXT - SUI '0' ;CONVERT TO BINARY - JRC NUMERR ;RETURN AND DONE IF ERROR - CPI 10 ;0-9? - JRC HNUM2 - SUI 7 ;A-F? - CPI 10H ;ERROR? - JRNC NUMERR -HNUM2: - MOV C,A ;DIGIT IN C - MOV A,D ;GET ACCUMULATED VALUE - RLC ;EXCHANGE NYBBLES - RLC - RLC - RLC - ANI 0F0H ;MASK OUT LOW NYBBLE - MOV D,A - MOV A,E ;SWITCH LOW-ORDER NYBBLES - RLC - RLC - RLC - RLC - MOV E,A ;HIGH NYBBLE OF E=NEW HIGH OF E, - ; LOW NYBBLE OF E=NEW LOW OF D - ANI 0FH ;GET NEW LOW OF D - ORA D ;MASK IN HIGH OF D - MOV D,A ;NEW HIGH BYTE IN D - MOV A,E - ANI 0F0H ;MASK OUT LOW OF E - ORA C ;MASK IN NEW LOW - MOV E,A ;NEW LOW BYTE IN E - DJNZ HNUM1 ;COUNT DOWN - RET -; -; NUMBER ERROR -; -NUMERR: - CALL PRINT - DB ' Num','?'+80H - JMP EXIT -; -; SKIP TO NEXT NON-BLANK -; -SKSP: - MOV A,M ;GET CHAR - INX H ;PT TO NEXT - CPI ' ' ;SKIP SPACES - JRZ SKSP - DCX H ;PT TO GOOD CHAR - ORA A ;SET EOL FLAG - RET -; - ENDIF ;PEEKON OR POKEON -; -; Test File in FCB for unambiguity and existence, ask user to delete if so -; Return with Z flag set if R/O or no permission to delete -; - IF RENON OR CPON -EXTEST: - CALL AMBCHK ;AMBIGUOUS FILE NAMES NOT ALLOWED - CALL SEARF ;LOOK FOR SPECIFIED FILE - JRZ EXOK ;OK IF NOT FOUND - CALL GETSBIT ;POSITION INTO DIR - INX D ;PT TO FILE NAME - XCHG ;HL PTS TO FILE NAME - PUSH H ;SAVE PTR TO FILE NAME - CALL PRFN ;PRINT FILE NAME - POP H - CALL ROTEST ;CHECK FOR R/O - JRNZ EXER - CALL ERAQ ;ERASE? - JRNZ EXER ;RESTART AS ERROR IF NO - LXI D,FCB1 ;PT TO FCB1 - MVI C,19 ;DELETE FILE - CALL BDOS -EXOK: - XRA A - DCR A ;NZ = OK - RET -EXER: - XRA A ;ERROR FLAG - FILE IS R/O OR NO PERMISSION - RET - -; -; CHECK FOR AMBIGUOUS FILE NAME IN FCB1 -; RETURN Z IF SO -; -AMBCHK: - LXI H,FCB1+1 ;PT TO FCB -; -; CHECK FOR AMBIGUOUS FILE NAME PTED TO BY HL -; -AMBCHK1: - PUSH H - MVI B,11 ;11 BYTES -AMB1: - MOV A,M ;GET CHAR - ANI 7FH ;MASK - CPI '?' - JRZ AMB2 - INX H ;PT TO NEXT - DJNZ AMB1 - DCR B ;SET NZ FLAG - POP D - RET -AMB2: - POP H ;PT TO FILE NAME - CALL PRFN - CALL PRINT - DB ' is AF','N'+80H - JMP EXIT -; - ENDIF ;RENON OR CPON -; -; CHECK USER TO SEE IF HE APPROVES ERASE OF FILE -; RETURN WITH Z IF YES -; - IF RENON OR CPON OR ERAON OR PROTON -ERAQ: - CALL PRINT - DB ' - Eras','e'+80H -ERAQ1: - CALL PRINT - DB ' (Y/N)?',' '+80H - CALL CONIN ;GET RESPONSE - CPI 'Y' ;KEY ON YES - RET -; - ENDIF ;RENON OR CPON OR ERAON OR PROTON -; -; TEST FILE PTED TO BY HL FOR R/O -; NZ IF R/O -; - IF RENON OR ERAON OR CPON -ROTEST: - PUSH H ;ADVANCE TO R/O BYTE - LXI B,8 ;PT TO 9TH BYTE - DAD B - MOV A,M ;GET IT - ANI 80H ;MASK BIT - PUSH PSW - LXI H,ROMSG - CNZ PRINT1 ;PRINT IF NZ - POP PSW ;GET FLAG - POP H ;GET PTR - RET -ROMSG: - DB ' is R/','O'+80H -; - ENDIF ;RENON OR ERAON OR CPON -; -; INIT FCB1, RETURN WITH DE PTING TO FCB1 -; - IF ERAON OR LTON OR CPON -INITFCB1: - LXI H,FCB1 ;PT TO FCB -INITFCB2: - PUSH H ;SAVE PTR - LXI B,12 ;PT TO FIRST BYTE - DAD B - MVI B,24 ;ZERO 24 BYTES - XRA A ;ZERO FILL - CALL FILLP ;FILL MEMORY - POP D ;PT TO FCB - RET -; - ENDIF ;ERAON OR LTON OR CPON -; -; BUFFERS -; -NXTFILE: - DS 2 ;PTR TO NEXT FILE IN LIST - -; -; SIZE ERROR TEST -; - IF ($ GT (RCP + RCPS*128)) -SIZERR EQU NOVALUE ;RCP IS TOO LARGE FOR BUFFER - ENDIF - -; -; END OF SYS.RCP -; - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSRCP.HLP b/Source/Images/d_bp/u15/SYSRCP.HLP deleted file mode 100644 index 21fd7a79..00000000 --- a/Source/Images/d_bp/u15/SYSRCP.HLP +++ /dev/null @@ -1,229 +0,0 @@ -The Commands in SYSRCP -CP Copy a File -DIR Display Directory -ECHO Echo Command Tail -ERA Erase Files -LIST/TYPE Display a File on Printer/CRT -NOTE Comment -PEEK/POKE Display/Alter Memory -PROT Protect Files -REG ZCPR3 Register Display/Alter -REN Rename a File -WHL Set/Reset Wheel Byte -:The Commands in SYSRCP - - Thå  standarä  ZCPR³  Systeí Residenô  Commanä  Packagå -(RCP© distributeä witè thå ZCPR³ systeí containó á numbeò oæ -commandó  whicè  maù  bå enableä aô thå  discretioî  oæ  thå -installer. These commands are described in the HELP file. - - Alì  commandó anä optionó  arå  installation-dependent® -Thå  SHO×  commanä maù bå useä tï displaù thå nameó  oæ  thå -available commands in the currently-loaded RCP. - -:CP Command - Transient Counterpart: MCOPY - - Thå  CР commanä  copieó onå filå  froí  onå  DÕ  tï -anotheò  oò  intï thå samå DÕ undeò á differenô  name®  Thå -syntaø is: - - CP dir:ufn=dir:ufn - - Examples: - CP f1.txt=f2.txt - CP a15:=f1.txt - CP a15:f2.txt=c5:f1.txt - -:DIR Command - Transient Counterpart: DIR, XD, XDIR - - Thå  DIÒ commanä displayó thå directorù oæ fileó  iî -alphabeticaì ordeò acrosó thå lineó tï thå user® Thå syntaø -is: - - DIR dir:afn o - - Options are: - S - Display System Files Only - A - Display Both Non-System and System Files - - Examples: - DIR b7: - DIR root:*.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®  ECHÏ  caî  senä itó outpuô tï thå  consolå  (bù -default© oò tï thå printeò (iæ thå firsô non-blanë characteò -ió  á  dollaò sign)®  Iô useó BIOÓ calls¬  sï  alì  controì -characteró   arå  passeä  exactly®   Hence¬   console-leveì -programminç oæ sucè deviceó (CRTó anä Printers© ió possible. - - Examples: - - ECHO $this is a test - -- THIS IS A TEST is printed on printer - - ECHO this is a test - -- THIS IS A TEST is printed on console - -:ERA Command - Transient Counterpart: ERASE - - Thå ERÁ commanä eraseó files® Thå syntaø is: - - ERA dir:afn -or: - ERA dir:afn I -- Inspect files first - - Examples: - ERA b7:*.bak - ERA text:*.tmp i - -:LIST and TYPE Commands - Transient Counterpart: PRINT and PAGE - - Thå  TYPÅ  commanä displayó á grouð oæ fileó oî  thå -CRÔ  whilå thå LISÔ commanä printó á grouð oæ fileó  oî  thå -Printer® Thå syntaø is: - - TYPE dir:afn o -or- LIST dir:afn - - Option to TYPE: - P - Do NOT Page Output to CRT - - Examples: - TYPE b7:*.asm - LIST text:*.txt - -:NOTE Command - Transient Counterpart: NOTE - - NOTÅ ió simplù á NOÐ (dï nothing© commanä whicè  caî -bå useä tï placå commentó intï multiplå commanä lines®  Foò -instance¬ iî thå followinç line: - - dir *.comnote this is a dir displayera *.bak Š -thå  DIÒ anä ERÁ commandó perforí normally¬  anä NOTÅ simplù -doeó nothinç verù efficiently. - -:PEEK and POKE Commands - Transient Counterpart: None (Subset of DDT) - - Thå  PEEË commanä allowó thå useò tï examinå á chunë -oæ  memory®  Iæ thå useò simplù typeó "P¢ witè nï  address¬ -thå  nexô 25¶ byteó oæ memorù arå displayed®  Iæ  thå  useò -typeó  "Р address"¬  25¶  byteó oæ memorù startinç  aô  thå -indicateä addresó arå displayed® Iæ thå useò typeó "Ð addr± -addr2"¬  memorù  iî thió addresó rangå  ió  displayed®  Thå -syntax: - - P -or: - P address -or: - P addr1 addr2 - - - 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 - -:PROT Command - Transient Counterpart: PROTECT - - Thå PROÔ commanä setó thå filå protectioî attributeó -foò á grouð oæ files®  Thå R/Ï anä Systeí attributeó maù bå -seô witè thå Ò anä Ó options¬  resp¬  giveî iî anù ordeò  aó -"RS¢ oò "SR"®  Omissioî oæ onå oæ theså optionó toggleó thå -oppositå  (ie¬  omissioî  oæ Ò makeó thå  fileó  R/W)®  Thå -syntax: - - PROT dir:afn -or: - PROT dir:afn R -or: - PROT dir:afn S -or: - PROT dir:afn RS -or- PROT dir:afn SR - - Examples: - PROT b7:*.com rs - PROT text:*.txt -:REG Command - Transient Counterpart: REG - - The REG command forms are: - REG D or REG = display values of all registers - REG Mreg = subtract 1 from register (Minus) - REG Preg = add 1 to register (Plus) - REG Sreg value = set value of indicated register - - Á registeò ió á ZCPR³ registeò buffer¬  indicateä bù -á digiô froí ° tï 9. - - Examples: - REG S0 4 -- reg 0 = 4 - REG S5 -- reg 5 = 0 - REG P -- reg 0 = reg 0 + 1 - REG P5 -- reg 5 = reg 5 + 1 - REG M9 -- reg 9 = reg 9 - 1 - REG D -- show values - REG -- show values -:REN Command - Transient Counterpart: RENAME - - Thå  REΠ commanä  changeó thå namå oæ onå  filå  tï -another® Thå syntax: Š - REN dir:ufn1=ufn2 - - Examples: - REN newfile.txt=oldfile.txt - REN root:sys.rcp=sys1.rcp - -:WHL Command - Transient Counterpart: WHEEL - - Thå  WHÌ commanä ió useä tï turî ofæ thå Wheeì  Bytå -(makå thå useò non-priveleged© oò tï turî oî thå Wheeì  Bytå -(makå thå useò priveleged)® Thå syntaø is: - - WHL -- make user non-priveleged -or: - WHL password -- make user priveleged - - Also¬  thió  equatå enableó thå WHLÑ command¬  whicè -displayó thå statå oæ thå Wheeì Byte® Thå syntaø is: - - WHLQ - - The Wheel password is built into the RCP. - - - Examples: - WHL - WHL mypass - WHLQ - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSRCP1.LIB b/Source/Images/d_bp/u15/SYSRCP1.LIB deleted file mode 100644 index dce5873b..00000000 --- a/Source/Images/d_bp/u15/SYSRCP1.LIB +++ /dev/null @@ -1,367 +0,0 @@ -; SYSTEM SEGMENT: SYS1.RCP -; SYSTEM: ZCPR3 -; WRITTEN BY: RICHARD CONN - -; -; PROGRAM HEADER: SYSRCP.LIB -; AUTHOR: RICHARD CONN -; - -; -; This program header selects the commands to be incorporated into -; SYS.RCP. It also allows selection of some options for these commands. -; - -; -; 0. ID -; -; The following ID is a single character, displayed as a part of -; the RCP ID, which distinguishes this RCP from others made from the same -; base file (SYSRCP.ASM). -; -RCPID EQU 'A' - -; -; 1. CP COMMAND -; TRANSIENT COUNTERPART: MCOPY -; -; The following equate determines if the CP command is made available. -; Setting this equate to TRUE enables the CP command. -; -; The CP command copies one file from one DU to another or into the -; same DU under a different name. The syntax is: -; -; CP dir:ufn=dir:ufn -; -; Examples: -; CP f1.txt=f2.txt -; CP a15:=f1.txt -; CP a15:f2.txt=c5:f1.txt -; -CPON EQU TRUE - -; -; 2. DIR COMMAND -; TRANSIENT COUNTERPART: DIR, XD, XDIR -; -; The following equate determines if the DIR command is made available. -; Setting this equate to TRUE enables the DIR command. -; -; The DIR command displays the directory of files in alphabetical order -; across the lines to the user. The syntax is: -; -; DIR dir:afn -; -; Examples: -; DIR b7: -; DIR root:*.com -; -DIRON EQU FALSE - -; -; The DIR command allows two options. One is a flag to tell it -; to look at both System and Non-System files, and the other is a flag -; to tell it to look only at System files. By default, DIR looks at -; Non-System files. -; -; SYSFLG defines the character used to instruct DIR to look at -; both System and Non-System files. The recommended value is 'A' for All. -; -; SOFLG defines the character used to instruct DIR to look at -; only System files. The recommended value is 'S' for System. -; -SYSFLG EQU 'A' -SOFLG EQU 'S' - -; -; The following equate determines if the directory displays are -; sorted by filename and filetype or by filetype and filename. Set SORTNT -; to TRUE to sort by name and type, FALSE to sort by type and name. -; -SORTNT EQU TRUE - -; -; The following equates define some features of the directory display. -; If WIDE is TRUE, the file names are spaced farther abort; if WIDE is FALSE, -; they are closer together (for a 64-column display). FENCE defines the -; character used to separate the file name entries in the display. -; -WIDE EQU TRUE -FENCE EQU '|' - -; -; 3. ERA COMMAND -; TRANSIENT COUNTERPART: ERASE -; -; The following equate determines if the ERA command is made available. -; Setting this equate to TRUE enables the ERA command. -; -; The ERA command erases files. The syntax is: -; -; ERA dir:afn -; or: -; ERA dir:afn I -- Inspect -; -; Examples: -; ERA b7:*.bak -; ERA text:*.tmp i -; -ERAON EQU TRUE - -; -; 4. LIST and TYPE COMMANDS -; TRANSIENT COUNTERPART: PRINT and PAGE -; -; The following equate determines if the LIST and TYPE commands are -; made available. Setting this equate to TRUE enables these commands. -; -; The LISTON equate can disable the LIST command without affecting the -; TYPE command. -; -; The TYPE command displays a group of files on the CRT while the -; LIST command prints a group of files on the Printer. The syntax is: -; -; TYPE dir:afn -or- LIST dir:afn -; -; Examples: -; TYPE b7:*.asm -; LIST text:*.txt -; -LTON EQU TRUE -LISTON EQU TRUE - -; -; TYPE can be made to page or not page by default. If PGDFLT is -; TRUE, TYPE pages by default and does not page if the PGFLG character -; (recommended to be 'P') is used. If PGDFLT is FALSE, TYPE pages only -; when the PGDFLG character is seen in the command line. -; -PGDFLT EQU TRUE -PGDFLG EQU 'P' - -; -; NLINES defines the number of lines on the user's CRT screen. -; This is usually 24. -; -NLINES EQU 24 - - -; -; 5. PEEK and POKE COMMANDS -; TRANSIENT COUNTERPART: None (Subset of DDT) -; -; The following equates determine if the PEEK and POKE commands are -; made available. Setting these equates to TRUE enables these commands. -; -; The PEEK command allows the user to examine a chunk of memory. -; If the user simply types "P" with no address, the next 256 bytes of -; memory are displayed. If the user types "P address", 256 bytes of memory -; starting at the indicated address are displayed. If the user types -; "P addr1 addr2", memory in this address range is displayed. The syntax: -; -; P -; or: -; P address -; or: -; P addr1 addr2 -; -; The POKE command allows the user to change the content of memory. -; The user must specify an address to POKE, and two basic forms are allowed: -; -; POKE address val1 val2 ... valn -; and: -; POKE address "character string -; The two forms may be intermixed with leading values and a trailing character -; 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 -; -PEEKON EQU TRUE -POKEON EQU TRUE - -; -; 6. PROT COMMAND -; TRANSIENT COUNTERPART: PROTECT -; -; The following equate determines if the PROT command is made available. -; Setting this equate to TRUE enables the PROT command. -; -; The PROT command sets the file protection attributes for a group of -; files. The R/O and System attributes may be set with the R and S options, -; resp, given in any order as "RS" or "SR". Omission of one of these options -; toggles the opposite (ie, omission of R makes the files R/W). The syntax: -; -; PROT dir:afn -; or: -; PROT dir:afn R -; or: -; PROT dir:afn S -; or: -; PROT dir:afn RS -or- PROT dir:afn SR -; -; Examples: -; PROT b7:*.com rs -; PROT text:*.txt -; -PROTON EQU TRUE - -; -; 7. REN COMMAND -; TRANSIENT COUNTERPART: RENAME -; -; The following equate determines if the REN command is made available. -; Setting this equate to TRUE enables the REN command. -; -; The REN command changes the name of one file to another. The syntax: -; -; REN dir:ufn1=ufn2 -; -; Examples: -; REN newfile.txt=oldfile.txt -; REN root:sys.rcp=sys1.rcp -; -RENON EQU TRUE - -; -; 8. The REG COMMAND -; TRANSIENT COUNTERPART: REG -; -; The following equate determines if the REG command is made -; available. Setting this equate to TRUE enables the REG command. -; -; The REG command forms are: -; REG D or REG = display values of all registers -; REG Mreg = subtract 1 from register (Minus) -; REG Preg = add 1 to register (Plus) -; REG Sreg value = set value of indicated register -; -; A register is a ZCPR3 register buffer, indicated by a digit from -; 0 to 9. -; -; Examples: -; REG S0 4 -- reg 0 = 4 -; REG S5 -- reg 5 = 0 -; REG P -- reg 0 = reg 0 + 1 -; REG P5 -- reg 5 = reg 5 + 1 -; REG M9 -- reg 9 = reg 9 - 1 -; REG D -- show values -; REG -- show values -; -REGON EQU FALSE - - -; -; 9. WHL COMMAND -; TRANSIENT COUNTERPART: WHEEL -; -; The following equate determines if the WHL command is made available. -; Setting this equate to TRUE enables the WHL command. -; -; The WHL command is used to turn off the Wheel Byte (make the user -; non-priveleged) or to turn on the Wheel Byte (make the user priveleged). -; The syntax is: -; -; WHL -- make user non-priveleged -; or: -; WHL password -- make user priveleged -; -; Also, this equate enables the WHLQ command, which displays the -; state of the Wheel Byte. The syntax is: -; -; WHLQ -; -; Examples: -; WHL -; WHL mypass -; WHLQ -; -WHLON EQU FALSE - -; -; The following equate defines the password to be used by the WHL -; command. It must always be 8 bytes long (trailing spaces allowed) and -; must be upper-case. -; -WPASS MACRO - DB 'SYSTEM ' ;8 characters - ENDM - -; -; The Wheel equate table enables the WHEEL facility of ZCPR3. With this -; facility, a WHEEL BYTE, which exists somewhere in memory, is examined -; before a set of installer-selected commands are executed. -; If this byte is not zero, then the command proceeds. If it is zero, -; then the command is not allowed to proceed and is exited with an error -; message. -; -; The following set of equates make each of the indicated commands -; selectable to respond to the Wheel Byte or not. For instance, if -; WERA=TRUE, then it responds to the Wheel Byte; if WERA=FALSE, it does not. -; -; These options will only be effective if a Wheel Byte is Defined -; (Z3WHL NE 0) -; -WCP equ FALSE ;Make CP a Wheel-Oriented Command -WDIR equ FALSE ; " DIR " " " " -WERA equ FALSE ; " ERA " " " " -WLIST equ FALSE ; " LIST " " " " -WPEEK equ FALSE ; " PEEK " " " " -WPOKE equ FALSE ; " POKE " " " " -WPROT equ FALSE ; " PROT " " " " -WREG equ FALSE ; " REG " " " " -WREN equ FALSE ; " REN " " " " -WTYPE equ FALSE ; " TYPE " " " " - -WHEEL set WCP OR WDIR OR WERA OR WLIST OR WPEEK OR WPOKE -WHEEL set WHEEL OR WPROT OR WREG OR WREN OR WTYPE - - -; -; 10. NOTE COMMAND -; TRANSIENT COUNTERPART: NOTE -; -; NOTE is simply a NOP (do nothing) command which can be used -; to place comments into multiple command lines. For instance, in the -; following line: -; -; dir *.com;note this is a dir display;era *.bak -; -; the DIR and ERA commands perform normally, and NOTE simply does -; nothing very efficiently. -; -; Setting the following equate to TRUE enables the NOTE Command. -; -NOTEON EQU TRUE - - -; -; 11. ECHO COMMAND -; TRANSIENT COUNTERPART: ECHO -; -; The following equate enables the ECHO command. -; -; ECHO is useful in issuing both messages (to the user, say within -; a command file during execution) and escape sequences. ECHO can send its -; output to the console (by default) or to the printer (if the first non- -; blank character is a dollar sign). It uses BIOS calls, so all control -; characters are passed exactly. Hence, console-level programming of such -; devices (CRTs and Printers) is possible. -; -; The ECHOLST equate determines if ECHO is allowed to direct its output -; to the printer. If ECHOLST is TRUE, ECHO may direct its output to the -; printer via the $ prefix character in the text. -; -ECHOON EQU TRUE -ECHOLST EQU TRUE - -; -; END of SYS.RCP CUSTOMIZATION -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSRCP11.LBR b/Source/Images/d_bp/u15/SYSRCP11.LBR deleted file mode 100644 index b4c48dd6..00000000 Binary files a/Source/Images/d_bp/u15/SYSRCP11.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/SYSRCP2.LIB b/Source/Images/d_bp/u15/SYSRCP2.LIB deleted file mode 100644 index 2930d34c..00000000 --- a/Source/Images/d_bp/u15/SYSRCP2.LIB +++ /dev/null @@ -1,368 +0,0 @@ -; SYSTEM SEGMENT: SYS2.RCP -; SYSTEM: ZCPR3 -; WRITTEN BY: RICHARD CONN - -; -; PROGRAM HEADER: SYSRCP.LIB -; AUTHOR: RICHARD CONN -; - -; -; This program header selects the commands to be incorporated into -; SYS.RCP. It also allows selection of some options for these commands. -; - -; -; 0. ID -; -; The following ID is a single character, displayed as a part of -; the RCP ID, which distinguishes this RCP from others made from the same -; base file (SYSRCP.ASM). -; -RCPID EQU 'B' - -; -; 1. CP COMMAND -; TRANSIENT COUNTERPART: MCOPY -; -; The following equate determines if the CP command is made available. -; Setting this equate to TRUE enables the CP command. -; -; The CP command copies one file from one DU to another or into the -; same DU under a different name. The syntax is: -; -; CP dir:ufn=dir:ufn -; -; Examples: -; CP f1.txt=f2.txt -; CP a15:=f1.txt -; CP a15:f2.txt=c5:f1.txt -; -CPON EQU TRUE - -; -; 2. DIR COMMAND -; TRANSIENT COUNTERPART: DIR, XD, XDIR -; -; The following equate determines if the DIR command is made available. -; Setting this equate to TRUE enables the DIR command. -; -; The DIR command displays the directory of files in alphabetical order -; across the lines to the user. The syntax is: -; -; DIR dir:afn -; -; Examples: -; DIR b7: -; DIR root:*.com -; -DIRON EQU TRUE - -; -; The DIR command allows two options. One is a flag to tell it -; to look at both System and Non-System files, and the other is a flag -; to tell it to look only at System files. By default, DIR looks at -; Non-System files. -; -; SYSFLG defines the character used to instruct DIR to look at -; both System and Non-System files. The recommended value is 'A' for All. -; -; SOFLG defines the character used to instruct DIR to look at -; only System files. The recommended value is 'S' for System. -; -SYSFLG EQU 'A' -SOFLG EQU 'S' - -; -; The following equate determines if the directory displays are -; sorted by filename and filetype or by filetype and filename. Set SORTNT -; to TRUE to sort by name and type, FALSE to sort by type and name. -; -SORTNT EQU TRUE - -; -; The following equates define some features of the directory display. -; If WIDE is TRUE, the file names are spaced farther abort; if WIDE is FALSE, -; they are closer together (for a 64-column display). FENCE defines the -; character used to separate the file name entries in the display. -; -WIDE EQU TRUE -FENCE EQU '|' - -; -; 3. ERA COMMAND -; TRANSIENT COUNTERPART: ERASE -; -; The following equate determines if the ERA command is made available. -; Setting this equate to TRUE enables the ERA command. -; -; The ERA command erases files. The syntax is: -; -; ERA dir:afn -; or: -; ERA dir:afn I -- Inspect -; -; Examples: -; ERA b7:*.bak -; ERA text:*.tmp i -; -ERAON EQU TRUE - -; -; 4. LIST and TYPE COMMANDS -; TRANSIENT COUNTERPART: PRINT and PAGE -; -; The following equate determines if the LIST and TYPE commands are -; made available. Setting this equate to TRUE enables these commands. -; -; The LISTON equate can disable the LIST command without affecting the -; TYPE command. -; -; The TYPE command displays a group of files on the CRT while the -; LIST command prints a group of files on the Printer. The syntax is: -; -; TYPE dir:afn -or- LIST dir:afn -; -; Examples: -; TYPE b7:*.asm -; LIST text:*.txt -; -LTON EQU TRUE -LISTON EQU TRUE - -; -; TYPE can be made to page or not page by default. If PGDFLT is -; TRUE, TYPE pages by default and does not page if the PGFLG character -; (recommended to be 'P') is used. If PGDFLT is FALSE, TYPE pages only -; when the PGDFLG character is seen in the command line. -; -PGDFLT EQU TRUE -PGDFLG EQU 'P' - -; -; NLINES defines the number of lines on the user's CRT screen. -; This is usually 24. -; -NLINES EQU 24 - - -; -; 5. PEEK and POKE COMMANDS -; TRANSIENT COUNTERPART: None (Subset of DDT) -; -; The following equates determine if the PEEK and POKE commands are -; made available. Setting these equates to TRUE enables these commands. -; -; The PEEK command allows the user to examine a chunk of memory. -; If the user simply types "P" with no address, the next 256 bytes of -; memory are displayed. If the user types "P address", 256 bytes of memory -; starting at the indicated address are displayed. If the user types -; "P addr1 addr2", memory in this address range is displayed. The syntax: -; -; P -; or: -; P address -; or: -; P addr1 addr2 -; -; The POKE command allows the user to change the content of memory. -; The user must specify an address to POKE, and two basic forms are allowed: -; -; POKE address val1 val2 ... valn -; and: -; POKE address "character string -; The two forms may be intermixed with leading values and a trailing character -; 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 -; -PEEKON EQU TRUE -POKEON EQU TRUE - -; -; 6. PROT COMMAND -; TRANSIENT COUNTERPART: PROTECT -; -; The following equate determines if the PROT command is made available. -; Setting this equate to TRUE enables the PROT command. -; -; The PROT command sets the file protection attributes for a group of -; files. The R/O and System attributes may be set with the R and S options, -; resp, given in any order as "RS" or "SR". Omission of one of these options -; toggles the opposite (ie, omission of R makes the files R/W). The syntax: -; -; PROT dir:afn -; or: -; PROT dir:afn R -; or: -; PROT dir:afn S -; or: -; PROT dir:afn RS -or- PROT dir:afn SR -; -; Examples: -; PROT b7:*.com rs -; PROT text:*.txt -; -PROTON EQU FALSE - -; -; 7. REN COMMAND -; TRANSIENT COUNTERPART: RENAME -; -; The following equate determines if the REN command is made available. -; Setting this equate to TRUE enables the REN command. -; -; The REN command changes the name of one file to another. The syntax: -; -; REN dir:ufn1=ufn2 -; -; Examples: -; REN newfile.txt=oldfile.txt -; REN root:sys.rcp=sys1.rcp -; -RENON EQU TRUE - -; -; 8. The REG COMMAND -; TRANSIENT COUNTERPART: REG -; -; The following equate determines if the REG command is made -; available. Setting this equate to TRUE enables the REG command. -; -; The REG command forms are: -; REG D or REG = display values of all registers -; REG Mreg = subtract 1 from register (Minus) -; REG Preg = add 1 to register (Plus) -; REG Sreg value = set value of indicated register -; -; A register is a ZCPR3 register buffer, indicated by a digit from -; 0 to 9. -; -; Examples: -; REG S0 4 -- reg 0 = 4 -; REG S5 -- reg 5 = 0 -; REG P -- reg 0 = reg 0 + 1 -; REG P5 -- reg 5 = reg 5 + 1 -; REG M9 -- reg 9 = reg 9 - 1 -; REG D -- show values -; REG -- show values -; -REGON EQU FALSE - - -; -; 9. WHL COMMAND -; TRANSIENT COUNTERPART: WHEEL -; -; The following equate determines if the WHL command is made available. -; Setting this equate to TRUE enables the WHL command. -; -; The WHL command is used to turn off the Wheel Byte (make the user -; non-priveleged) or to turn on the Wheel Byte (make the user priveleged). -; The syntax is: -; -; WHL -- make user non-priveleged -; or: -; WHL password -- make user priveleged -; -; Also, this equate enables the WHLQ command, which displays the -; state of the Wheel Byte. The syntax is: -; -; WHLQ -; -; Examples: -; WHL -; WHL mypass -; WHLQ -; -WHLON EQU FALSE - -; -; The following equate defines the password to be used by the WHL -; command. It must always be 8 bytes long (trailing spaces allowed) and -; must be upper-case. -; -WPASS MACRO - DB 'SYSTEM ' ;8 characters - ENDM - -; -; The Wheel equate table enables the WHEEL facility of ZCPR3. With this -; facility, a WHEEL BYTE, which exists somewhere in memory, is examined -; before a set of installer-selected commands are executed. -; If this byte is not zero, then the command proceeds. If it is zero, -; then the command is not allowed to proceed and is exited with an error -; message. -; -; The following set of equates make each of the indicated commands -; selectable to respond to the Wheel Byte or not. For instance, if -; WERA=TRUE, then it responds to the Wheel Byte; if WERA=FALSE, it does not. -; -; These options will only be effective if a Wheel Byte is Defined -; (Z3WHL NE 0) -; -WCP equ FALSE ;Make CP a Wheel-Oriented Command -WDIR equ FALSE ; " DIR " " " " -WERA equ FALSE ; " ERA " " " " -WLIST equ FALSE ; " LIST " " " " -WPEEK equ FALSE ; " PEEK " " " " -WPOKE equ FALSE ; " POKE " " " " -WPROT equ FALSE ; " PROT " " " " -WREG equ FALSE ; " REG " " " " -WREN equ FALSE ; " REN " " " " -WTYPE equ FALSE ; " TYPE " " " " - -WHEEL set WCP OR WDIR OR WERA OR WLIST OR WPEEK OR WPOKE -WHEEL set WHEEL OR WPROT OR WREG OR WREN OR WTYPE - - -; -; 10. NOTE COMMAND -; TRANSIENT COUNTERPART: NOTE -; -; NOTE is simply a NOP (do nothing) command which can be used -; to place comments into multiple command lines. For instance, in the -; following line: -; -; dir *.com;note this is a dir display;era *.bak -; -; the DIR and ERA commands perform normally, and NOTE simply does -; nothing very efficiently. -; -; Setting the following equate to TRUE enables the NOTE Command. -; -NOTEON EQU TRUE - - -; -; 11. ECHO COMMAND -; TRANSIENT COUNTERPART: ECHO -; -; The following equate enables the ECHO command. -; -; ECHO is useful in issuing both messages (to the user, say within -; a command file during execution) and escape sequences. ECHO can send its -; output to the console (by default) or to the printer (if the first non- -; blank character is a dollar sign). It uses BIOS calls, so all control -; characters are passed exactly. Hence, console-level programming of such -; devices (CRTs and Printers) is possible. -; -; The ECHOLST equate determines if ECHO is allowed to direct its output -; to the printer. If ECHOLST is TRUE, ECHO may direct its output to the -; printer via the $ prefix character in the text. -; -ECHOON EQU TRUE -ECHOLST EQU TRUE - - -; -; END of SYS.RCP CUSTOMIZATION -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSRCP3.LIB b/Source/Images/d_bp/u15/SYSRCP3.LIB deleted file mode 100644 index d6c4df1c..00000000 --- a/Source/Images/d_bp/u15/SYSRCP3.LIB +++ /dev/null @@ -1,367 +0,0 @@ -; SYSTEM SEGMENT: SYS3.RCP -; SYSTEM: ZCPR3 -; WRITTEN BY: RICHARD CONN - -; -; PROGRAM HEADER: SYSRCP.LIB -; AUTHOR: RICHARD CONN -; - -; -; This program header selects the commands to be incorporated into -; SYS.RCP. It also allows selection of some options for these commands. -; - -; -; 0. ID -; -; The following ID is a single character, displayed as a part of -; the RCP ID, which distinguishes this RCP from others made from the same -; base file (SYSRCP.ASM). -; -RCPID EQU 'C' - -; -; 1. CP COMMAND -; TRANSIENT COUNTERPART: MCOPY -; -; The following equate determines if the CP command is made available. -; Setting this equate to TRUE enables the CP command. -; -; The CP command copies one file from one DU to another or into the -; same DU under a different name. The syntax is: -; -; CP dir:ufn=dir:ufn -; -; Examples: -; CP f1.txt=f2.txt -; CP a15:=f1.txt -; CP a15:f2.txt=c5:f1.txt -; -CPON EQU TRUE - -; -; 2. DIR COMMAND -; TRANSIENT COUNTERPART: DIR, XD, XDIR -; -; The following equate determines if the DIR command is made available. -; Setting this equate to TRUE enables the DIR command. -; -; The DIR command displays the directory of files in alphabetical order -; across the lines to the user. The syntax is: -; -; DIR dir:afn -; -; Examples: -; DIR b7: -; DIR root:*.com -; -DIRON EQU FALSE - -; -; The DIR command allows two options. One is a flag to tell it -; to look at both System and Non-System files, and the other is a flag -; to tell it to look only at System files. By default, DIR looks at -; Non-System files. -; -; SYSFLG defines the character used to instruct DIR to look at -; both System and Non-System files. The recommended value is 'A' for All. -; -; SOFLG defines the character used to instruct DIR to look at -; only System files. The recommended value is 'S' for System. -; -SYSFLG EQU 'A' -SOFLG EQU 'S' - -; -; The following equate determines if the directory displays are -; sorted by filename and filetype or by filetype and filename. Set SORTNT -; to TRUE to sort by name and type, FALSE to sort by type and name. -; -SORTNT EQU TRUE - -; -; The following equates define some features of the directory display. -; If WIDE is TRUE, the file names are spaced farther abort; if WIDE is FALSE, -; they are closer together (for a 64-column display). FENCE defines the -; character used to separate the file name entries in the display. -; -WIDE EQU TRUE -FENCE EQU '|' - -; -; 3. ERA COMMAND -; TRANSIENT COUNTERPART: ERASE -; -; The following equate determines if the ERA command is made available. -; Setting this equate to TRUE enables the ERA command. -; -; The ERA command erases files. The syntax is: -; -; ERA dir:afn -; or: -; ERA dir:afn I -- Inspect -; -; Examples: -; ERA b7:*.bak -; ERA text:*.tmp i -; -ERAON EQU TRUE - -; -; 4. LIST and TYPE COMMANDS -; TRANSIENT COUNTERPART: PRINT and PAGE -; -; The following equate determines if the LIST and TYPE commands are -; made available. Setting this equate to TRUE enables these commands. -; -; The LISTON equate can disable the LIST command without affecting the -; TYPE command. -; -; The TYPE command displays a group of files on the CRT while the -; LIST command prints a group of files on the Printer. The syntax is: -; -; TYPE dir:afn -or- LIST dir:afn -; -; Examples: -; TYPE b7:*.asm -; LIST text:*.txt -; -LTON EQU TRUE -LISTON EQU FALSE - -; -; TYPE can be made to page or not page by default. If PGDFLT is -; TRUE, TYPE pages by default and does not page if the PGFLG character -; (recommended to be 'P') is used. If PGDFLT is FALSE, TYPE pages only -; when the PGDFLG character is seen in the command line. -; -PGDFLT EQU TRUE -PGDFLG EQU 'P' - -; -; NLINES defines the number of lines on the user's CRT screen. -; This is usually 24. -; -NLINES EQU 24 - - -; -; 5. PEEK and POKE COMMANDS -; TRANSIENT COUNTERPART: None (Subset of DDT) -; -; The following equates determine if the PEEK and POKE commands are -; made available. Setting these equates to TRUE enables these commands. -; -; The PEEK command allows the user to examine a chunk of memory. -; If the user simply types "P" with no address, the next 256 bytes of -; memory are displayed. If the user types "P address", 256 bytes of memory -; starting at the indicated address are displayed. If the user types -; "P addr1 addr2", memory in this address range is displayed. The syntax: -; -; P -; or: -; P address -; or: -; P addr1 addr2 -; -; The POKE command allows the user to change the content of memory. -; The user must specify an address to POKE, and two basic forms are allowed: -; -; POKE address val1 val2 ... valn -; and: -; POKE address "character string -; The two forms may be intermixed with leading values and a trailing character -; 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 -; -PEEKON EQU TRUE -POKEON EQU TRUE - -; -; 6. PROT COMMAND -; TRANSIENT COUNTERPART: PROTECT -; -; The following equate determines if the PROT command is made available. -; Setting this equate to TRUE enables the PROT command. -; -; The PROT command sets the file protection attributes for a group of -; files. The R/O and System attributes may be set with the R and S options, -; resp, given in any order as "RS" or "SR". Omission of one of these options -; toggles the opposite (ie, omission of R makes the files R/W). The syntax: -; -; PROT dir:afn -; or: -; PROT dir:afn R -; or: -; PROT dir:afn S -; or: -; PROT dir:afn RS -or- PROT dir:afn SR -; -; Examples: -; PROT b7:*.com rs -; PROT text:*.txt -; -PROTON EQU FALSE - -; -; 7. REN COMMAND -; TRANSIENT COUNTERPART: RENAME -; -; The following equate determines if the REN command is made available. -; Setting this equate to TRUE enables the REN command. -; -; The REN command changes the name of one file to another. The syntax: -; -; REN dir:ufn1=ufn2 -; -; Examples: -; REN newfile.txt=oldfile.txt -; REN root:sys.rcp=sys1.rcp -; -RENON EQU TRUE - -; -; 8. The REG COMMAND -; TRANSIENT COUNTERPART: REG -; -; The following equate determines if the REG command is made -; available. Setting this equate to TRUE enables the REG command. -; -; The REG command forms are: -; REG D or REG = display values of all registers -; REG Mreg = subtract 1 from register (Minus) -; REG Preg = add 1 to register (Plus) -; REG Sreg value = set value of indicated register -; -; A register is a ZCPR3 register buffer, indicated by a digit from -; 0 to 9. -; -; Examples: -; REG S0 4 -- reg 0 = 4 -; REG S5 -- reg 5 = 0 -; REG P -- reg 0 = reg 0 + 1 -; REG P5 -- reg 5 = reg 5 + 1 -; REG M9 -- reg 9 = reg 9 - 1 -; REG D -- show values -; REG -- show values -; -REGON EQU FALSE - - -; -; 9. WHL COMMAND -; TRANSIENT COUNTERPART: WHEEL -; -; The following equate determines if the WHL command is made available. -; Setting this equate to TRUE enables the WHL command. -; -; The WHL command is used to turn off the Wheel Byte (make the user -; non-priveleged) or to turn on the Wheel Byte (make the user priveleged). -; The syntax is: -; -; WHL -- make user non-priveleged -; or: -; WHL password -- make user priveleged -; -; Also, this equate enables the WHLQ command, which displays the -; state of the Wheel Byte. The syntax is: -; -; WHLQ -; -; Examples: -; WHL -; WHL mypass -; WHLQ -; -WHLON EQU TRUE - -; -; The following equate defines the password to be used by the WHL -; command. It must always be 8 bytes long (trailing spaces allowed) and -; must be upper-case. -; -WPASS MACRO - DB 'SYSTEM ' ;8 characters - ENDM - -; -; The Wheel equate table enables the WHEEL facility of ZCPR3. With this -; facility, a WHEEL BYTE, which exists somewhere in memory, is examined -; before a set of installer-selected commands are executed. -; If this byte is not zero, then the command proceeds. If it is zero, -; then the command is not allowed to proceed and is exited with an error -; message. -; -; The following set of equates make each of the indicated commands -; selectable to respond to the Wheel Byte or not. For instance, if -; WERA=TRUE, then it responds to the Wheel Byte; if WERA=FALSE, it does not. -; -; These options will only be effective if a Wheel Byte is Defined -; (Z3WHL NE 0) -; -WCP equ TRUE ;Make CP a Wheel-Oriented Command -WDIR equ FALSE ; " DIR " " " " -WERA equ TRUE ; " ERA " " " " -WLIST equ FALSE ; " LIST " " " " -WPEEK equ TRUE ; " PEEK " " " " -WPOKE equ TRUE ; " POKE " " " " -WPROT equ TRUE ; " PROT " " " " -WREG equ FALSE ; " REG " " " " -WREN equ TRUE ; " REN " " " " -WTYPE equ FALSE ; " TYPE " " " " - -WHEEL set WCP OR WDIR OR WERA OR WLIST OR WPEEK OR WPOKE -WHEEL set WHEEL OR WPROT OR WREG OR WREN OR WTYPE - - -; -; 10. NOTE COMMAND -; TRANSIENT COUNTERPART: NOTE -; -; NOTE is simply a NOP (do nothing) command which can be used -; to place comments into multiple command lines. For instance, in the -; following line: -; -; dir *.com;note this is a dir display;era *.bak -; -; the DIR and ERA commands perform normally, and NOTE simply does -; nothing very efficiently. -; -; Setting the following equate to TRUE enables the NOTE Command. -; -NOTEON EQU TRUE - - -; -; 11. ECHO COMMAND -; TRANSIENT COUNTERPART: ECHO -; -; The following equate enables the ECHO command. -; -; ECHO is useful in issuing both messages (to the user, say within -; a command file during execution) and escape sequences. ECHO can send its -; output to the console (by default) or to the printer (if the first non- -; blank character is a dollar sign). It uses BIOS calls, so all control -; characters are passed exactly. Hence, console-level programming of such -; devices (CRTs and Printers) is possible. -; -; The ECHOLST equate determines if ECHO is allowed to direct its output -; to the printer. If ECHOLST is TRUE, ECHO may direct its output to the -; printer via the $ prefix character in the text. -; -ECHOON EQU TRUE -ECHOLST EQU FALSE - -; -; END of SYS.RCP CUSTOMIZATION -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/SYSRCP4.LIB b/Source/Images/d_bp/u15/SYSRCP4.LIB deleted file mode 100644 index e88c3d98..00000000 --- a/Source/Images/d_bp/u15/SYSRCP4.LIB +++ /dev/null @@ -1,367 +0,0 @@ -; SYSTEM SEGMENT: SYS4.RCP (for RCP/M Application) -; SYSTEM: ZCPR3 -; WRITTEN BY: RICHARD CONN - -; -; PROGRAM HEADER: SYSRCP.LIB -; AUTHOR: RICHARD CONN -; - -; -; This program header selects the commands to be incorporated into -; SYS.RCP. It also allows selection of some options for these commands. -; - -; -; 0. ID -; -; The following ID is a single character, displayed as a part of -; the RCP ID, which distinguishes this RCP from others made from the same -; base file (SYSRCP.ASM). -; -RCPID EQU 'R' - -; -; 1. CP COMMAND -; TRANSIENT COUNTERPART: MCOPY -; -; The following equate determines if the CP command is made available. -; Setting this equate to TRUE enables the CP command. -; -; The CP command copies one file from one DU to another or into the -; same DU under a different name. The syntax is: -; -; CP dir:ufn=dir:ufn -; -; Examples: -; CP f1.txt=f2.txt -; CP a15:=f1.txt -; CP a15:f2.txt=c5:f1.txt -; -CPON EQU TRUE - -; -; 2. DIR COMMAND -; TRANSIENT COUNTERPART: DIR, XD, XDIR -; -; The following equate determines if the DIR command is made available. -; Setting this equate to TRUE enables the DIR command. -; -; The DIR command displays the directory of files in alphabetical order -; across the lines to the user. The syntax is: -; -; DIR dir:afn -; -; Examples: -; DIR b7: -; DIR root:*.com -; -DIRON EQU FALSE - -; -; The DIR command allows two options. One is a flag to tell it -; to look at both System and Non-System files, and the other is a flag -; to tell it to look only at System files. By default, DIR looks at -; Non-System files. -; -; SYSFLG defines the character used to instruct DIR to look at -; both System and Non-System files. The recommended value is 'A' for All. -; -; SOFLG defines the character used to instruct DIR to look at -; only System files. The recommended value is 'S' for System. -; -SYSFLG EQU 'A' -SOFLG EQU 'S' - -; -; The following equate determines if the directory displays are -; sorted by filename and filetype or by filetype and filename. Set SORTNT -; to TRUE to sort by name and type, FALSE to sort by type and name. -; -SORTNT EQU TRUE - -; -; The following equates define some features of the directory display. -; If WIDE is TRUE, the file names are spaced farther abort; if WIDE is FALSE, -; they are closer together (for a 64-column display). FENCE defines the -; character used to separate the file name entries in the display. -; -WIDE EQU TRUE -FENCE EQU '|' - -; -; 3. ERA COMMAND -; TRANSIENT COUNTERPART: ERASE -; -; The following equate determines if the ERA command is made available. -; Setting this equate to TRUE enables the ERA command. -; -; The ERA command erases files. The syntax is: -; -; ERA dir:afn -; or: -; ERA dir:afn I -- Inspect -; -; Examples: -; ERA b7:*.bak -; ERA text:*.tmp i -; -ERAON EQU TRUE - -; -; 4. LIST and TYPE COMMANDS -; TRANSIENT COUNTERPART: PRINT and PAGE -; -; The following equate determines if the LIST and TYPE commands are -; made available. Setting this equate to TRUE enables these commands. -; -; The LISTON equate can disable the LIST command without affecting the -; TYPE command. -; -; The TYPE command displays a group of files on the CRT while the -; LIST command prints a group of files on the Printer. The syntax is: -; -; TYPE dir:afn -or- LIST dir:afn -; -; Examples: -; TYPE b7:*.asm -; LIST text:*.txt -; -LTON EQU TRUE -LISTON EQU TRUE - -; -; TYPE can be made to page or not page by default. If PGDFLT is -; TRUE, TYPE pages by default and does not page if the PGFLG character -; (recommended to be 'P') is used. If PGDFLT is FALSE, TYPE pages only -; when the PGDFLG character is seen in the command line. -; -PGDFLT EQU TRUE -PGDFLG EQU 'P' - -; -; NLINES defines the number of lines on the user's CRT screen. -; This is usually 24. -; -NLINES EQU 24 - - -; -; 5. PEEK and POKE COMMANDS -; TRANSIENT COUNTERPART: None (Subset of DDT) -; -; The following equates determine if the PEEK and POKE commands are -; made available. Setting these equates to TRUE enables these commands. -; -; The PEEK command allows the user to examine a chunk of memory. -; If the user simply types "P" with no address, the next 256 bytes of -; memory are displayed. If the user types "P address", 256 bytes of memory -; starting at the indicated address are displayed. If the user types -; "P addr1 addr2", memory in this address range is displayed. The syntax: -; -; P -; or: -; P address -; or: -; P addr1 addr2 -; -; The POKE command allows the user to change the content of memory. -; The user must specify an address to POKE, and two basic forms are allowed: -; -; POKE address val1 val2 ... valn -; and: -; POKE address "character string -; The two forms may be intermixed with leading values and a trailing character -; 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 -; -PEEKON EQU TRUE -POKEON EQU TRUE - -; -; 6. PROT COMMAND -; TRANSIENT COUNTERPART: PROTECT -; -; The following equate determines if the PROT command is made available. -; Setting this equate to TRUE enables the PROT command. -; -; The PROT command sets the file protection attributes for a group of -; files. The R/O and System attributes may be set with the R and S options, -; resp, given in any order as "RS" or "SR". Omission of one of these options -; toggles the opposite (ie, omission of R makes the files R/W). The syntax: -; -; PROT dir:afn -; or: -; PROT dir:afn R -; or: -; PROT dir:afn S -; or: -; PROT dir:afn RS -or- PROT dir:afn SR -; -; Examples: -; PROT b7:*.com rs -; PROT text:*.txt -; -PROTON EQU FALSE - -; -; 7. REN COMMAND -; TRANSIENT COUNTERPART: RENAME -; -; The following equate determines if the REN command is made available. -; Setting this equate to TRUE enables the REN command. -; -; The REN command changes the name of one file to another. The syntax: -; -; REN dir:ufn1=ufn2 -; -; Examples: -; REN newfile.txt=oldfile.txt -; REN root:sys.rcp=sys1.rcp -; -RENON EQU TRUE - -; -; 8. The REG COMMAND -; TRANSIENT COUNTERPART: REG -; -; The following equate determines if the REG command is made -; available. Setting this equate to TRUE enables the REG command. -; -; The REG command forms are: -; REG D or REG = display values of all registers -; REG Mreg = subtract 1 from register (Minus) -; REG Preg = add 1 to register (Plus) -; REG Sreg value = set value of indicated register -; -; A register is a ZCPR3 register buffer, indicated by a digit from -; 0 to 9. -; -; Examples: -; REG S0 4 -- reg 0 = 4 -; REG S5 -- reg 5 = 0 -; REG P -- reg 0 = reg 0 + 1 -; REG P5 -- reg 5 = reg 5 + 1 -; REG M9 -- reg 9 = reg 9 - 1 -; REG D -- show values -; REG -- show values -; -REGON EQU FALSE - - -; -; 9. WHL COMMAND -; TRANSIENT COUNTERPART: WHEEL -; -; The following equate determines if the WHL command is made available. -; Setting this equate to TRUE enables the WHL command. -; -; The WHL command is used to turn off the Wheel Byte (make the user -; non-priveleged) or to turn on the Wheel Byte (make the user priveleged). -; The syntax is: -; -; WHL -- make user non-priveleged -; or: -; WHL password -- make user priveleged -; -; Also, this equate enables the WHLQ command, which displays the -; state of the Wheel Byte. The syntax is: -; -; WHLQ -; -; Examples: -; WHL -; WHL mypass -; WHLQ -; -WHLON EQU FALSE - -; -; The following equate defines the password to be used by the WHL -; command. It must always be 8 bytes long (trailing spaces allowed) and -; must be upper-case. -; -WPASS MACRO - DB 'SYSTEM ' ;8 characters - ENDM - -; -; The Wheel equate table enables the WHEEL facility of ZCPR3. With this -; facility, a WHEEL BYTE, which exists somewhere in memory, is examined -; before a set of installer-selected commands are executed. -; If this byte is not zero, then the command proceeds. If it is zero, -; then the command is not allowed to proceed and is exited with an error -; message. -; -; The following set of equates make each of the indicated commands -; selectable to respond to the Wheel Byte or not. For instance, if -; WERA=TRUE, then it responds to the Wheel Byte; if WERA=FALSE, it does not. -; -; These options will only be effective if a Wheel Byte is Defined -; (Z3WHL NE 0) -; -WCP equ TRUE ;Make CP a Wheel-Oriented Command -WDIR equ FALSE ; " DIR " " " " -WERA equ TRUE ; " ERA " " " " -WLIST equ TRUE ; " LIST " " " " -WPEEK equ TRUE ; " PEEK " " " " -WPOKE equ TRUE ; " POKE " " " " -WPROT equ TRUE ; " PROT " " " " -WREG equ FALSE ; " REG " " " " -WREN equ TRUE ; " REN " " " " -WTYPE equ FALSE ; " TYPE " " " " - -WHEEL set WCP OR WDIR OR WERA OR WLIST OR WPEEK OR WPOKE -WHEEL set WHEEL OR WPROT OR WREG OR WREN OR WTYPE - - -; -; 10. NOTE COMMAND -; TRANSIENT COUNTERPART: NOTE -; -; NOTE is simply a NOP (do nothing) command which can be used -; to place comments into multiple command lines. For instance, in the -; following line: -; -; dir *.com;note this is a dir display;era *.bak -; -; the DIR and ERA commands perform normally, and NOTE simply does -; nothing very efficiently. -; -; Setting the following equate to TRUE enables the NOTE Command. -; -NOTEON EQU FALSE - - -; -; 11. ECHO COMMAND -; TRANSIENT COUNTERPART: ECHO -; -; The following equate enables the ECHO command. -; -; ECHO is useful in issuing both messages (to the user, say within -; a command file during execution) and escape sequences. ECHO can send its -; output to the console (by default) or to the printer (if the first non- -; blank character is a dollar sign). It uses BIOS calls, so all control -; characters are passed exactly. Hence, console-level programming of such -; devices (CRTs and Printers) is possible. -; -; The ECHOLST equate determines if ECHO is allowed to direct its output -; to the printer. If ECHOLST is TRUE, ECHO may direct its output to the -; printer via the $ prefix character in the text. -; -ECHOON EQU TRUE -ECHOLST EQU FALSE - -; -; END of SYS.RCP CUSTOMIZATION -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/T3M-HI2.Z80 b/Source/Images/d_bp/u15/T3M-HI2.Z80 deleted file mode 100644 index 4b4c3f2a..00000000 --- a/Source/Images/d_bp/u15/T3M-HI2.Z80 +++ /dev/null @@ -1,319 +0,0 @@ -; Program: T3M-HI2.Z80 -; Use: Term3 Modem Overlay -; Written by: David McCord -; Last revised: 04/02/87 -; -; Latest Revisions: -; dmm 4/02/87 v2.0 -; Reworked baud rate setting, adding support for 9.216MHz and 12.288MHz -; clock rates. Also added equate for selection of which serial port will -; be used, ASCI0 or ASCI1. You must set the clock rate equates and ASCI -; equates appropriately (below) before assembly! -; -; dmm 4/21/86 v1.0 -; Originally MODEMH80.Z80; renamed to conform to new naming standards -; for TERM III interface files (T3M-xx#.Z80 for "modem interfaces"; -; T3T-xx#.Z80 for "telephone interfaces"; and T3C-xx#.Z80 for combined -; modem AND telephone interfaces (as with the MOSART)). -; Fixed a minor bug in the mi$init routine. -; -; Term3 Modem Interface for SB180/HD64180 -; Uses HD64180 ASCI 0 (modem port on SB180) -; -; Modified from original MSB180.LIB file 03-21-86 by D. McCord -; Supports baud rates up to 38.4Kbps (max 19.2Kbps for 9.216MHz clock) -; -; This program, both source code and object code, is -; copyright 1986 Echelon, Inc. Duplication for non-commercial personal -; use is permitted; all other duplication is prohibited unless authorized -; in writing by copyright holder. -; -; To use: -; ZAS T3M-HI2 H <- make .HEX file output -; MLOAD MODEM.BIN=T3M-HI2 <- create binary file -; T3INS INSTALL <- install into TERM3 modules -; -; Cabling: -; Because of the HD64180's internal logic (which will not -; allow sending characters when the carrier detect input is -; false), a special cable must be used. Also, a different cable -; is used for a T3SERVER/T3MASTER application. -; -; TERM3 Modem Application Cable -; -; SB180 Modem -; 1 --------------------- 1 -; 2 --------------------- 2 -; 3 --------------------- 3 -; 4 --------------------- 4 -; 5 --------------------- 8 <- note -; 6 --------------------- 6 -; 7 --------------------- 7 -; 8 --------------------- 5 <- note -; 20 --------------------- 20 -; -; TERM3 T3MASTER/T3SERVER Application Cable (Tested with -; AMPRO Little Board and Magnum Digital PRO-180 as "Other Computer") -; -; SB180(Master) Other Computer(Server) -; 1 --------------------- 1 -; 2 --------------------- 2 -; 3 --------------------- 3 -; 4 --+ -; 5 --| <- Note: 4, 5, & 8 tied together -; 8 --+ -; 7 --------------------- 7 -; -; define "yes" and "no" -; -no equ 0 -yes equ not no -; -; User-select equates - select "yes" to only one clock rate -; -c6144kHz equ no ; 6.144MHz -c9216kHz equ yes ; 9.216MHz -c12288kHz equ no ; 12.288MHz -; -; select ASCI 0 (modem port on SB180) or ASCI 1 -; -asci0 equ yes -asci1 equ no -; -; Non-changeable equates -; -base equ 600h ; base of Modem Interface in T3 tools - if asci0 -cntla EQU 0 ; ASCI Control Register A Channel 0 -cntlb EQU 2 ; ASCI Control Register B Channel 0 -stat EQU 4 ; ASCI Status Register Channel 0 -tdr EQU 6 ; ASCI Transmit Data Register Channel 0 -rdr EQU 8 ; ASCI Receive Data Register Channel 0 - endif - if asci1 -cntla EQU 1 ; ASCI Control Register A Channel 1 -cntlb EQU 3 ; ASCI Control Register B Channel 1 -stat EQU 5 ; ASCI Status Register Channel 1 -tdr EQU 7 ; ASCI Transmit Data Register Channel 1 -rdr EQU 9 ; ASCI Receive Data Register Channel 1 - endif -CTS EQU 00100000B ; Clear-to-send input (pin 5) -DCD EQU 00000100B ; Data Carrier detect bit (pin 8) -RDRF EQU 10000000B ; RECEIVE DATA REGISTER FULL -TDRE EQU 00000010B ; TRANSMIT DATA REGISTER EMPTY -; -; Term3 Baud Rate definitions -; -; chart of baud rates vs. clock speed for 64180 -; -; 6.144MHz clock 9.216MHZ clock 12.288MHz clock -; PS DR SS PS DR SS PS DR SS -; 38400 0 0 0 -- na -- 0 0 1 -; 19200 0 0 1 1 0 0 0 0 2 -; 9600 0 0 2 1 0 1 0 0 3 -; 4800 0 0 3 1 0 2 0 0 4 -; 2400 0 0 4 1 0 3 0 0 5 -; 1200 0 0 5 1 0 4 0 0 6 -; 300 0 1 5 1 0 6 0 1 6 -; - if c6144kHz -bauds equ 01111111b ; this modem interface supports 300, 1200, - ; 2400, 4800, 9600, 19200, 38400 - endif -; - if c9216kHz -bauds equ 00111111b ; this modem interface supports 300, 1200, - ; 2400, 4800, 9600, 19200 - endif -; - if c12288kHz -bauds equ 01111111b ; this modem interface supports 300, 1200, - ; 2400, 4800, 9600, 19200, 38400 - endif -; - .HD64 ; enable Hitachi Mnemonics - org base -; -; Jump Table -; - JP INIT ; m1$init - JP ISTAT ; M1$istat - JP OSTAT ; m1$ostat - JP INP ; m1$in - JP OUTP ; m1$out - JP BREAK ; m1$break - JP CST ; m1$cst -AVAILBD: - DB bauds ; set via EQUate above -; -; initialization. Set baud rate, but leave DTR (really RTS) high -; -INIT: - if c9216kHz - cp 7 ; we can't do 38.4K @ 9.216MHz - jr z,noset - endif - OR A ; is entry parameter 0? - JR NZ,SETB ; if yes, fall thru to no set -NOSET: POP AF - XOR A ; return "not supported" - RET -SETB: PUSH HL ; save regs - PUSH DE - LD HL,[b300-1] ; get base of baud table - LD D,0 ; prep for subsequent add - LD E,A ; index into baud rate table - ADD HL,DE ; add index to base - LD D,(HL) ; get desired byte - OUT0 (cntlb),D ; send it - POP DE - POP HL - OR A ; return proper indication to calling routine - RET -; -; Input status. Returns Z and A=0 if nothing waiting. -; -ISTAT: CALL IISTAT - AND RDRF - RET Z - LD A,0FFH - RET -; -; Read stat twice, as per Hitachi manual -; -IISTAT: IN0 A,(stat) - IN0 A,(stat) - OR A - RET -; -; Check state of CTS* and return A=0 and Z if CTS is true. -; -CKCTS: IN0 A,(cntlb) - AND CTS - RET Z - LD A,0FFh - RET -; -; Output status. Returns Z and A=0 if not ready to send. -; -OSTAT: CALL IISTAT ; GET STATUS REG - AND TDRE - JR Z,DOCTS -OST1: LD A,0FFH - OR A - RET -; -; TDRE is false. Is it because CTS is false? -; -DOCTS: CALL CKCTS ; look at CTS (really modem carrier) - JR NZ,OST1 ; CTS is false; goto faking "OK to send" - XOR A ; return "not ready" indication - RET -; -; Recieve a character -; -INP: CALL ISTAT - JR Z,INP - IN0 A,(rdr) - RET -; -; Send a character -; -OUTP: PUSH AF - CALL CKCTS ; check CTS - JR NZ,DELAY ; if CTS is false, delay before sending -OUTP1: CALL OSTAT - JR Z,OUTP1 -OUTP2: POP AF ; return point from "CTS false" delay - OUT0 (tdr),A - RET -; -; This delay routine is used when CTS (pin 5 on SB180) is false. Hitachi -; designed the ASCI 0 to lock the TDRE status bit false when CTS is false, -; yet the ASCI 0 can still send characters under this circumstance. However, -; because TDRE is always false, we must manually delay after each character -; to prevent over-running the serial port. Worst case for this delay is -; 300 bps, where each character (10 bits) is 33.3 milliseconds. This -; delay subroutine delays about 36 milliseconds in an HD64180 system at -; the selected clock rate. -; - if c6144kHz -wait equ 12 - endif - if c9216kHz -wait equ 18 - endif - if c12288kHz -wait equ 24 - endif -DELAY: LD A,wait ; 6 T-states -D1: PUSH AF ; 11 T-states | - LD A,0FFh ; 6 T-states | -D2: EX (SP),HL ; 16 T-states | 72 if | - EX (SP),HL ; 16 | true, | 18398 if - EX (SP),HL ; 16 | 70 if | true, - EX (SP),HL ; 16 | false | 18396 if - DEC A ; 4 | | false - JR NZ,D2 ; 8 if true, 6 if false | | - POP AF ; 9 | - DEC A ; 4 | - JR NZ,D1 ; 8 if true, 6 if false | - JR OUTP2 ; return and force send of character -; -; process BREAK request -; -BREAK: XOR A - RET ;NO BREAK AVAILABLE -; -; check carrier status -; -CST: CALL CKCTS ; check CTS (really modem carrier, via - JR Z,CST1 ; the special cable discussed above - XOR A ; NO CARRIER - RET -CST1: LD A,0FFH - OR A - RET -; -; Baud Rate Tables -; - if c6144kHz -; -; HD64180 commands to set baud rates @ 6.144 MHz clock -; -b300: db 00001101b ; no PS, sampling rate 64, divide ratio 32 -b1200: db 00000101b ; no PS, sampling rate 16, divide ratio 32 -b2400: db 00000100b ; no PS, sampling rate 16, divide ratio 16 -b4800: db 00000011b ; no PS, sampling rate 16, divide ratio 8 -b9600: db 00000010b ; no PS, sampling rate 16, divide ratio 4 -b19200: db 00000001b ; no PS, sampling rate 16, divide ratio 2 -b38400: db 00000000b ; no PS, sampling rate 16, divide ratio 1 - endif - if c9216kHz -; -; HD64180 commands to set baud rates @ 9.216 MHz clock -; -b300: db 00100110b ; PS, sampling rate 16, divide ratio 64 -b1200: db 00100100b ; PS, sampling rate 16, divide ratio 16 -b2400: db 00100011b ; PS, sampling rate 16, divide ratio 8 -b4800: db 00100010b ; PS, sampling rate 16, divide ratio 4 -b9600: db 00100001b ; PS, sampling rate 16, divide ratio 2 -b19200: db 00100000b ; PS, sampling rate 16, divide ratio 1 - endif - if c12288kHz -; -; HD64180 commands to set baud rates @ 12.288 MHz clock -; -b300: db 00001110b ; no PS, sampling rate 64, divide ratio 64 -b1200: db 00000110b ; no PS, sampling rate 16, divide ratio 64 -b2400: db 00000101b ; no PS, sampling rate 16, divide ratio 32 -b4800: db 00000100b ; no PS, sampling rate 16, divide ratio 16 -b9600: db 00000011b ; no PS, sampling rate 16, divide ratio 8 -b19200: db 00000010b ; no PS, sampling rate 16, divide ratio 4 -b38400: db 00000001b ; no PS, sampling rate 16, divide ratio 2 - endif -; -; End of this modem interface -; - db 'copyright 1987 Echelon, Inc.' - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/T3T-24-1.Z80 b/Source/Images/d_bp/u15/T3T-24-1.Z80 deleted file mode 100644 index 5d199dd4..00000000 --- a/Source/Images/d_bp/u15/T3T-24-1.Z80 +++ /dev/null @@ -1,507 +0,0 @@ -; -; MODULE: T3T-24-1 (Telephone Interface) for Hayes-compatible 2400bps modems -; Author: David McCord/Richard Conn -; Version: 1.0 -; Date: 23 May 86 -; Previous Versions: Richard Conn wrote T3TI-SM v1.2, which this is based on. -; Comments: This TI supports 300/1200/2400bps Hayes-compatible modems. A key -; compatibility point is that the modem return the terse result code -; "10" on CONNECT 2400. Modems that should work with this TI include -; the Hayes 2400, USR Courier 2400, and Racal-Vadic 2400V. Developed -; and tested on a Courier 2400. Baud rate is automatically set upon -; connection in answer or originate modes. The answer routines have -; been rewritten from the original to NOT use modem auto-answer -; functions, as this can lead to the modem answering the phone when -; it shouldn't. -; - ORG 700H ; BASE ADDRESS (700H - 9FFH) -; -; ACCESS TO FILER$SERVER WITHIN T3ANSWER, T3DIAL, T3HANGUP, T3INIT -; -FILER$SERVER EQU 11AH ; ADDRESS OF ADDRESS -FS$GETSPEED EQU 0 ; GET PROCESSOR SPEED -FS$WAIT1S EQU 1 ; WAIT 1 SEC -FS$WAITP1S EQU 2 ; WAIT 0.1 SEC -FS$WAIT1MS EQU 3 ; WAIT 0.001 SEC -FS$CST EQU 4 ; CONSOLE STATUS (Z=RDA) -FS$CIN EQU 5 ; CONSOLE INPUT -FS$COUT EQU 6 ; CONSOLE OUTPUT (CHAR IN C) -; -; ACCESS TO MODEM OVERLAY ROUTINES -; -M1$INIT EQU 600H ; INITIALIZE MODEM -M1$ISTAT EQU M1$INIT+3 ; INPUT STATUS -M1$OSTAT EQU M1$ISTAT+3 ; OUTPUT STATUS -M1$IN EQU M1$OSTAT+3 ; INPUT BYTE -M1$OUT EQU M1$IN+3 ; OUTPUT BYTE -M1$BREAK EQU M1$OUT+3 ; SEND BREAK -M1$CST EQU M1$BREAK+3 ; CARRIER STATUS DETECT -M1$SPTAB EQU M1$CST+3 ; SPEED BYTE -; -; ASCII CONSTANTS -; -CR EQU 0DH -CTRLC EQU 'C'-'@' -; -; Telephone System Interface Routines -; -TI$INIT: - JP STI$INIT ; INITIALIZATION -TI$ANS: - JP STI$ANS ; SET ANSWER MODE -TI$HANG: - JP STI$HANG ; HANG UP PHONE -TI$RST: - JP STI$RST ; RING STATUS DETECT -TI$DSTRT: - JP STI$DSTRT ; START DIALING -TI$DSTOP: - JP STI$DSTOP ; STOP DIALING -TI$DIGIT: - JP STI$DIGIT ; DIAL DIGIT -TI$PREPANS: - JP STI$PREPANS ; PREPARE FOR ANSWERING PHONE -TI$GETBAUD: - JP STI$GETBAUD ; RETURN CURRENT BAUD RATE VALUE -; -; FILER$SERVER INTERFACE FOR TELEPHONE INTERFACE OVERLAY -; FILER$SERVER CODE IS IN A -; -TI$FS: - PUSH HL ; SAVE HL - LD HL,TI$FSRET ; SET RETURN ADDRESS - PUSH HL ; ... ON STACK - LD HL,(FILER$SERVER) ; GET ADDRESS OF FILER$SERVER - JP (HL) ; "CALL" ROUTINE -TI$FSRET: - POP HL ; RESTORE HL - RET -; -; SEND 'ATx' COMMAND TO SMARTMODEM -; -CMD$SEND: - PUSH AF ; SAVE CMD - LD A,FS$WAIT1S ; CODE TO WAIT 1 SECOND - CALL TI$FS ; FILER$SERVER - LD A,'A' ; SEND 'AT' - CALL CMD$SEND1 - LD A,'T' - CALL CMD$SEND1 - POP AF ; GET CMD -; -; SEND FURTHER COMMAND CHARS TO SMARTMODEM -; -CMD$SEND1: - PUSH AF ; SAVE CHAR - CALL M1$OUT ; SEND CHAR IN A - push bc - ld b,10 ; do this 10 times... -cmd$send2: - ld a,fs$wait1ms - call ti$fs ; wait a millisecond - djnz cmd$send2 - pop bc ; when we get here, we waited 10ms for echo - CALL FLUSH ; flush the echo - POP AF - RET -; -; END SMARTMODEM COMMAND SEQUENCE -; -CMD$END: - PUSH AF ; SAVE A - LD A,0DH ; SEND AND WAIT FOR - CALL CMD$SEND1 ; SEND CHAR WITH ECHO - POP AF ; RESTORE A - RET -; -; WAIT FOR RESPONSE FROM SMARTMODEM COMMAND -; RETURN DIGIT UNLESS ERROR: -; A=0FFH if TIMEOUT -; A=0FEH if USER ABORT -; -ssresponse: - push hl - ld hl,500 ; super short delay for response (.5 sec) - jr respe -SRESPONSE: - PUSH HL - LD HL,2000 ; SHORT DELAY FOR RESPONSE (2 secs) - JR RESPE -RESPONSE: - PUSH HL ; SAVE HL - LD HL,30000 ; LARGE DELAY FOR RESPONSE (30 secs) -RESPE: - LD (RESP$DELAY),HL -RESP1: - LD HL,(RESP$DELAY) ; DELAY FOR RESPONSE -RESP2: - CALL M1$ISTAT ; INPUT CHAR FROM MODEM? - JR NZ,RESPM - LD A,FS$CST ; CONSOLE STATUS - CALL TI$FS ; USER ABORT? - JR Z,RESP3 - ld a,fs$wait1ms - call ti$fs ; wait 0.001 sec - DEC HL ; COUNT DOWN - LD A,H ; DONE? - OR L - JR NZ,RESP2 - POP HL - OR 0FFH ; TIMEOUT CODE - RET -RESP$DELAY: - DS 2 ; RESPONSE DELAY -; -; PROCESS USER CHAR -; -RESP3: - LD A,FS$CIN ; GET USER INPUT - CALL TI$FS ; USE FILER$SERVER - AND 7FH ; MASK - CP CTRLC ; ABORT? - JR NZ,RESP2 - POP HL ; RESTORE HL - LD A,0FEH ; USER ABORT - OR A - RET -; -; PROCESS MODEM CHAR -; -RESPM: - CALL M1$IN ; GET CHAR - AND 7FH ; MASK - JR Z,RESP1 ; FLUSH NULL - POP HL ; RESTORE HL - RET -; -; ATTRACT ATTENTION OF SMARTMODEM -; -ATTENTION: - CALL M1$CST ; DO NOTHING IF NO CARRIER - RET Z - CALL FLUSH ; FLUSH ANY CHAR - LD A,0 ; SEND AT LEAST ONE CHAR FIRST - CALL M1$OUT - LD A,FS$WAIT1S ; WAIT 1 SEC - CALL TI$FS ; USE FILER$SERVER - LD A,'+' ; ATTRACT MODEM'S ATTENTION - CALL M1$OUT - CALL M1$OUT - CALL M1$OUT - CALL sresponse ; WAIT FOR RESPONSE OR TIMEOUT - RET -; -; FLUSH ANY GARBAGE CHARS FROM COMMAND LINE -; -FLUSH: - CALL M1$ISTAT ; ANY CHARS? - RET Z ; RETURN IF NONE - CALL M1$IN ; GET CHAR - RET -; -; Telephone Interface Initialization -; Function: Initialize the Modem/UART Interface -; Input Parameters: None -; Output Parameters: None -; -STI$INIT: - PUSH AF ; SAVE A - CALL ATTENTION ; GET MODEM'S ATTENTION - LD A,'Z' ; RESET MODEM - CALL CMD$SEND ; SEND COMMAND - CALL CMD$END ; SEND - CALL OK ; GET OK/USER ABORT - CP 0FEH ; USER ABORT? - JR Z,STI$INI1 - LD A,'V' ; SET NON-VERBOSE MODE - CALL CMD$SEND ; SEND COMMAND - LD A,'0' ; V0 COMMAND - CALL CMD$SEND1 - LD A,'X' ; SET EXTENDED COMMAND SET - CALL CMD$SEND1 ; SEND COMMAND - LD A,'4' ; Enable result codes 0 thru 10 - CALL CMD$SEND1 - ld a,'S' ; disable auto-answer if turned on somehow - call cmd$send1 - ld a,'0' - call cmd$send1 - ld a,'=' - call cmd$send1 - ld a,'0' - call cmd$send1 - CALL CMD$END ; SEND - CALL OK1 ; GET OK/USER ABORT -STI$INI1: - CALL FLUSH ; FLUSH RESPONSES - POP AF ; RESTORE A - RET -; -; GET RESPONSE CODE OF 'OK' OR '0' -; -OK: - CALL sresponse ; GET FIRST CHAR - CP 0FEH ; USER ABORT? - RET Z - CP '0' ; DIGIT '0'? - JR Z,OK1A - CP 'O' ; LETTER 'O'? - JR NZ,OK - CALL sresponse ; GET 'K' - CP 0FEH ; USER ABORT? - RET Z - CALL sresponse ; GET - CP 0FEH ; USER ABORT? - RET Z - CALL sresponse ; GET - RET -; -; GET RESPONSE CODE OF '0' -; -OK1: - CALL sresponse ; GET FIRST CHAR - CP 0FEH ; USER ABORT? - RET Z - CP '0' ; OK? - JR NZ,OK1 -OK1A: - CALL sresponse ; GET - RET -; -; Prepare Modem to Answer Phone -; Function: To condition modem for answering phone -; Input Parameters: None -; Output Parameters: None -; -STI$PREPANS: - PUSH AF - LD A,3 ; SELECT 2400 BAUD - LD (STI$BRATE),A ; SET FLAG - CALL M1$INIT - POP AF - RET -; -; Set Modem to Answer -; Function: Set Modem to Answer Mode -; Input Parameters: None -; Output Parameters: A=0 IF NOT SUCCESSFUL, A=0FFH IF SUCCESSFUL -; -STI$ANS: - XOR A ; SET NO BAUD RATE - LD (STI$BRATE),A - ld a,'A' ; prepare to send ATA command - call cmd$send ; send it - call cmd$end -STI$ANS1: - call response - CP CR ; ? - JR Z,STI$ANS1 - cp '1' ; is it "1" or "10" (300 or 2400)? - jr z,sti$ans324 ; If Z, process further - CP '5' ; CONNECT 1200? - JR Z,STI$ans12 - xor a ; make A 0 (we didn't get a connect) - ret -sti$ans324: - call ssresponse ; we should have at least a CR or a 0 pending - cp cr ; is it CR? - jr z,sti$ans3 ; must be 300 if Z -sti$ans24: - ld a,3 ; select 2400 bps - jr sti$ansset -STI$ans3: - LD A,1 ; SELECT 300 BAUD - JR STI$ansSET -STI$ans12: - LD A,2 ; SELECT 1200 BAUD -STI$ansSET: - LD (STI$BRATE),A ; SET BAUD RATE - CALL M1$INIT ; INIT USART BAUD RATE - OR A,0ffh ; RETURN CONNECT CODE - RET -; -; Hang up telephone -; Function: Place the telephone on hook -; Input Parameters: None -; Output Parameters: None -; -STI$HANG: - PUSH AF - CALL M1$CST ; DO NOT HANG UP IF NO CARRIER - JR Z,STI$HANG1 - CALL STI$HANG3 ; HANG UP PHONE - CP 0FEH ; USER ABORT? - JR Z,STI$HANG1 - CALL M1$CST ; STILL CARRIER? - JR Z,STI$HANG1 - CALL STI$HANG3 ; TRY A SECOND TIME TO HANG UP -STI$HANG1: - POP AF ; DO NOTHING SINCE WE ARE ALREADY OFFLINE - RET -STI$HANG3: - CALL ATTENTION ; GET SMARTMODEM'S ATTENTION - LD A,'H' ; HANG UP PHONE - CALL CMD$SEND - CALL CMD$END ; END OF COMMAND - CALL sresponse ; FLUSH RESPONSE DIGIT - CP 0FEH ; USER ABORT - RET Z - CALL sresponse ; FLUSH RESPONSE - RET -; -; YES and NO Return Codes -; -STI$YES: - OR 0FFH ; SET FLAGS - RET -STI$NO: - XOR A ; NO ANSWER - RET -; -; Ring Status Detect -; Function: Determines if phone is ringing or not. -; Input Parameters: None -; Output Parameters: A=0FFH no ring, A=0 ring, A=0FEH user abort -; -STI$RST: - CALL ssresponse ; GET RETURN CODE - cp 0dh ; cr? - jr z,sti$rst - CP '2' ; RING? - JR Z,STI$RST3 - CP 0FEH ; USER ABORT? - JR Z,STI$RST2 -STI$RST1: - LD A,0FFH ; RETURN NO RING -STI$RST2: - OR A ; SET FLAGS - RET -sti$rst3: - call ssresponse ; get trailing CR - cp 0feh ; user abort? - jr z,sti$rst2 - xor a - ret -; -; Start Dialing -; Function: Initiate the dialing process -; Input Parameters: None -; Output Parameters: A=0 if no dial tone, A=0FFH if dial tone -; -STI$DSTRT: - CALL FLUSH ; FLUSH CHAR IF PRESENT - LD A,3 ; SELECT 2400 BAUD - LD (STI$BRATE),A ; SET BAUD RATE - CALL M1$INIT - LD A,'D' ; START DIALING - CALL CMD$SEND ; SEND COMMAND - LD A,'T' ; TOUCH TONE DIALING - CALL CMD$SEND1 - JP STI$YES ; fake dial tone OK, even though we aren't - ; off-hook yet -; -; Stop Dialing -; Function: Terminate the dialing process with answer or user abort, -; and set baud rate based on result code if answer. -; Input Parameters: None -; Output Parameters: A=0 and Z if answer, NZ and error code if no ans -; Error Code: 0FFH=Timeout, 0FEH=User Abort -; Other=TI Return Code -; -STI$DSTOP: - ld a,cr ; end dial string - call cmd$send1 -STI$DS1: - LD A,FS$CST ; CHECK CONSOLE STATUS - CALL TI$FS ; USE FILER$SERVER - JR Z,STI$DS2 ; NO CONNECTION IF USER ABORT -STI$DSLOOP: - CALL RESPONSE ; ANSWER? - CP 0FFH ; TIMEOUT? - JR Z,STI$DS1 - CP 0FEH ; USER ABORT - JR Z,STI$DS2E - CP '2' ; RING? - JR Z,STI$DSLOOP - CP CR ; - JR Z,STI$DSLOOP - CP '9'+1 ; CHECK RANGE - JR NC,STI$DS1 - CP '0' ; CHECK RANGE - JR C,STI$DS1 - CP '1' ; is it a "1" or "10"? - JR Z,STI$DS324 ; process more if so - CP '5' ; CONNECTED AT 1200 BAUD? - ret nz - LD A,2 ; SELECT 1200 BAUD -STI$DSB: - LD (STI$BRATE),A ; SET BAUD RATE FLAG - CALL M1$INIT ; SET BAUD RATE - XOR A ; RETURN CONNECT CODE - RET -STI$DS2: - LD A,FS$CIN ; GET CHAR - CALL TI$FS ; USE FILER$SERVER - AND 7FH - CP CTRLC ; ABORT? - JR NZ,STI$DS1 -STI$DS2E: - LD A,0FEH ; SET USER ABORT - OR A - RET -sti$ds324: - call ssresponse ; there is at least a CR or 0 pending - cp cr ; was it cr, not 0? - jr z,sti$ds3 ; if yes, go set 300 baud -sti$ds24: - ld a,3 ; select 2400 bps - jr sti$dsb -STI$DS3: - LD A,1 ; SELECT 300 BAUD - JR STI$DSB -; -; Dial Digit -; Function: Dial an individual digit -; Input Parameters: A=ASCII for digit to dial -; Output Parameters: None -; -STI$DIGIT: - PUSH AF - CP ' ' ; DON'T SEND SPACES - jr z,sti$digit1 - cp '-' ; don't send dashes - jr z,sti$digit1 - cp '(' ; don't send parenthesis - jr z,sti$digit1 - cp ')' ; other kind - jr z,sti$digit1 - CALL CMD$SEND1 ; SEND DIGIT WITH ECHO -sti$digit1: - POP AF - RET -; -; Get Baud -; Function: Return current baud rate value (from answer or dial) -; Input Parameters: None -; Output Parameters: A = Baud Rate and Z flag set -; A = 0 means undefined -; A = 1 means 300 baud -; A = 2 means 1200 baud -; -STI$GETBAUD: - LD A,(STI$BRATE) ; GET VALUE - OR A ; SET FLAGS - RET -; -; BAUD RATE FLAG -; A = 0 IF NONE -; A = 1 IF 300 BAUD -; A = 2 IF 1200 BAUD -; -STI$BRATE: - DB 0 ; FLAG BUFFER -; -; END of Telephone Interface Routines -; - DB 'End of TI-2400' - - END diff --git a/Source/Images/d_bp/u15/TCCHECK.COM b/Source/Images/d_bp/u15/TCCHECK.COM deleted file mode 100644 index 2b8321ff..00000000 Binary files a/Source/Images/d_bp/u15/TCCHECK.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/TCCHECK.MAC b/Source/Images/d_bp/u15/TCCHECK.MAC deleted file mode 100644 index 5563c8fd..00000000 --- a/Source/Images/d_bp/u15/TCCHECK.MAC +++ /dev/null @@ -1,281 +0,0 @@ -; ZCPR3 TCAP Facility (Z3TCAP) -; Program Name: TCCHECK -; Author: Richard Conn -; Version: 1.0 -; Date: 10 Mar 84 -version equ 10 - -; -; TCCHECK checks the indicated (or implied) Z3TCAP.TCP file -; and displays statistics about it. -; - -; -; Basic Equates -; -z3env SET 0f400h ;ZCPR3 Environment Descriptor -fcb equ 5ch -tbuff equ 80h -ctrlc equ 'C'-'@' -cr equ 0dh -lf equ 0ah - -; -; ZCPR3 and SYSLIB References -; - ext z3init,qprint,z3log - ext codend,moveb - ext print,pfn1,cout,phldc - ext initfcb,pfind,f$open,f$read,f$close - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Print Banner -; - call qprint - db 'TCCHECK, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db 0 - -; -; Check for Entry in FCB -; - lda fcb+1 ;get first char - cpi '/' ;none if slash - jnz start1 -; -; Print Help Info -; -help: - call print - db 'TCCHECK - Select Entry from Z3TCAP.TCP' - db cr,lf,'Syntax:' - db cr,lf,' TCCHECK infile -or- TCCHECK infile.typ' - db cr,lf - db cr,lf,'where "infile" is the file to be checked by' - db cr,lf,'the execution of TCCHECK. If no file type is' - db cr,lf,'given, a file type of TCP is the default.' - db cr,lf - db cr,lf,'Syntax:' - db cr,lf,' TCCHECK' - db cr,lf - db cr,lf,'where this alternate form may be used to check' - db cr,lf,'the Z3TCAP.TCP file.' - db 0 - ret -; -; Resume Processing -; -start1: -; -; Set Default File if None -; - lxi d,fcb+1 ;pt to file name - lxi h,deffile ;pt to default file - mvi b,11 ;11 bytes - ldax d ;get first char - cpi ' ' ;none if space - cz moveb ;set default file -; -; Set Default File Type if None -; - lxi d,fcb+9 ;pt to file type - lxi h,deftyp ;pt to default file type - mvi b,3 ;3 bytes - ldax d ;get first char - cpi ' ' ;none if space - cz moveb ;set default file type -; -; Begin Reading Z3TCAP.TCP -; - lxi d,fcb ;try to open Z3TCAP.TCP - call initfcb ;init FCB - mvi a,0ffh ;search current also - call pfind ;look for file - jnz start2 ;file found -; -; File Z3TCAP.TCP Not Found -; -fnferr: - call print - db ' File ',0 - lxi d,fcb+1 ;print file name - call pfn1 - call print - db ' Not Found - Aborting',0 - ret -; -; Extract Z3TCAP Index -; -start2: - lxi d,fcb ;pt to FCB - call f$open ;open file - jnz fnferr - call codend ;read file into buffer -; -; Load Z3TCAP Index -; -loadi: - lxi d,fcb ;pt to FCB - call f$read ;read next block - jnz rerr1 ;read error - lxi d,tbuff ;copy from TBUFF - push h ;save ptr to this block - xchg - mvi b,128 ;128 bytes - call moveb - pop h ;pt to this block - lxi d,16 ;every 16 - mvi b,8 ;8 entries possible -; -; Check for End of Index -; -loadi1: - mov a,m ;end of index if space - cpi ' ' - jz loadi2 - dad d ;pt to next - dcr b ;count down - jnz loadi1 - jmp loadi ;HL pts to next block to load -; -; Error in Reading File -; -rerr1: - call print - db cr,lf,'File Read Error During Read of Index',0 - ret -; -; Reached End of Index -; -loadi2: - shld z3tcver ;save ptr to version number -; -; Read Each Block of File -; - lxi h,0 ;set count - shld tcount - call codend ;pt to first element -check: - mov a,m ;see if done - cpi ' ' ;space if so - jz done - lxi d,fcb ;pt to FCB - call f$read ;read next record - jnz rerr - push h ;save ptr - lhld tcount ;increment count - inx h - shld tcount - pop h ;get ptr - lxi d,tbuff ;pt to name in buffer - mvi b,16 ;check 16 chars -check1: - ldax d ;compare - cmp m - jnz tnerror - inx h ;pt to next - inx d - dcr b ;count down - jnz check1 - jmp check -; -; Read Error -; -rerr: - call print - db cr,lf,'Premature End of File after ',0 - lhld tcount ;get count - call phldc - call print - db ' Terminals Checked',0 - ret -; -; Terminal Name Error -; -tnerror: - call print - db cr,lf,'Terminal Names are Inconsistent at Terminal ',0 - push h ;save ptr - lhld tcount ;get count - call phldc - pop h ;get ptr -tne1: - inx h ;advance to next - dcr b - jnz tne1 - jmp check - -; -; Check Complete -; -done: - lxi d,fcb ;close file - call f$close - call print - db cr,lf,'Z3TCAP File Check of ',0 - lxi d,fcb+1 - call pfn1 - call print - db ' Version ',0 - lhld z3tcver - inx h ;pt to version number -done1: - mov a,m ;print it - call cout - inx h - cpi ' ' - jnz done1 - call print - db cr,lf,' File Checks with ',0 - lhld tcount ;print entry count - call phldc - call print - db ' Terminals Defined',0 - ret -; -; Buffers -; -deffile: - db 'Z3TCAP ' ;default file name -deftyp: - db 'TCP' ;default file type -tcount: - ds 2 ;terminal count -z3tcver: - ds 2 ;ptr to ZCPR3 TCAP Version Number - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/TCMAKE.COM b/Source/Images/d_bp/u15/TCMAKE.COM deleted file mode 100644 index d2cc451a..00000000 Binary files a/Source/Images/d_bp/u15/TCMAKE.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/TCMAKE.MAC b/Source/Images/d_bp/u15/TCMAKE.MAC deleted file mode 100644 index 00bc5ce5..00000000 --- a/Source/Images/d_bp/u15/TCMAKE.MAC +++ /dev/null @@ -1,1085 +0,0 @@ -; ZCPR3 TCAP Facility (Z3TCAP) -; Program Name: TCMAKE -; Author: Richard Conn -; Version: 1.0 -; Date: 10 Mar 84 -version equ 10 - -; -; TCMAKE allows the user to create a Z3T file for his particular -; terminal. -; - -; -; Basic Equates -; -z3env SET 0f400h ;ZCPR3 Environment Descriptor -qch equ '\' ;quote char -fcb equ 5ch -tbuff equ 80h -ctrlc equ 'C'-'@' -cr equ 0dh -lf equ 0ah - -; -; ZCPR3 and SYSLIB References -; - ext z3init,qprint,z3log - ext bbline,sksp,eval - ext codend,moveb,fillb,hmovb - ext print,pfn1,pstr,capine,cin,caps,crlf,cout,pafdc,pa2hc - ext initfcb,f$make,f$write,f$close - ext f$exist,gfa,f$delete - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Print Banner -; - call qprint - db 'TCMAKE, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,0 - -; -; Check for Entry in FCB -; - lda fcb+1 ;get first char - cpi ' ' ;none if space - jz help - cpi '/' ;none if slash - jnz start1 -; -; Print Help Info -; -help: - call print - db 'TCMAKE - Create a Z3T File' - db cr,lf,'Syntax:' - db cr,lf,' TCMAKE outfile -or- TCMAKE outfile.typ' - db cr,lf - db cr,lf,'where "outfile" is the file to be generated by' - db cr,lf,'the execution of TCMAKE. If no file type is' - db cr,lf,'given, a file type of Z3T is the default.' - db 0 - ret -; -; Resume Processing -; -start1: -; -; Set Default File Type if None -; - lxi d,fcb+9 ;pt to file type - lxi h,deftyp ;pt to default file type - mvi b,3 ;3 bytes - ldax d ;get first char - cpi ' ' ;none if space - cz moveb ;set default file type -; -; Init the Buffers and Pointers -; - call codend ;pt to scratch area - shld scratch ;set ptr - lxi d,100h ;give space (overkill) - xra a ;init strings to empty - sta rcfirst ;clear flag - dad d - shld cladr ;CL - mov m,a ;clear - dad d - shld cmadr ;CM - mov m,a ;clear - dad d - shld ceadr ;CE - mov m,a ;clear - dad d - shld soadr ;SO - mov m,a ;clear - dad d - shld seadr ;SE - mov m,a ;clear - dad d - shld tiadr ;TI - mov m,a ;clear - dad d - shld teadr ;TE - mov m,a ;clear - dad d - shld cmbadr ;CM Beginning - mov m,a ;clear - dad d - shld cmmadr ;CM Middle - mov m,a ;clear - dad d - shld cmeadr ;CM Ending - mov m,a ;clear - dad d - shld reqn ;Row Equation - mov m,a - dad d - shld ceqn ;Column Equation - mov m,a - lxi h,ku ;clear 1-byte buffers - mvi b,7 ;7 of them - xra a ;0 fill - call fillb -; -; Create the Data Base -; -menu1: - call create ;create entry - call assemble ;assemble the entry - jz menu1 ;continue if buffer overflow -; -; Confirm Selection -; - call print - db cr,lf,' Selected Terminal is: ',0 - lhld scratch ;pt to buffer - call prent ;print name - call print - db ' -- Confirm (Y/N)? ',0 - call capine ;get input - call crlf - cpi 'Y' - jnz menu1 ;continue - call wrfile ;write file - ret -; -; Assemble Data into Z3T Format -; Return with Z if Buffer Overflow (more than 128 bytes) -; Return with NZ if OK -; -assemble: - mvi c,128-23 ;128 bytes max with 23 bytes for header - mvi b,23 ;copy 23 byte header - lhld scratch ;into scratch area - lxi d,tname ;from TNAME - xchg - call hmovb - lhld cladr ;copy CL string - call asmcopy - lxi h,crcmd ;reverse row/col to col/row? - lda rcfirst ;get flag - cpi 'C' ;reverse if C - jnz asmc0 - call asmcopy - dcx d ;don't let zero in -asmc0: - lhld cmbadr ;CM Beginning - call asmcopy - dcx d - lhld ceqn ;prepare for col first - lda rcfirst ;get row/col flag - cpi 'C' ;col/row? - jz asmc1 - lhld reqn ;row first, so store row -asmc1: - call asmcopy - dcx d ;skip 0 - lhld cmmadr ;CM Middle - call asmcopy - dcx d ;skip 0 - lhld reqn ;prepare for row first - lda rcfirst ;get row/col flag - cpi 'C' ;col/row? - jz asmc2 - lhld ceqn ;col first, so store col -asmc2: - call asmcopy - dcx d ;skip 0 - lhld cmeadr ;CM Ending - call asmcopy - lhld ceadr ;CE - call asmcopy - lhld soadr ;SO - call asmcopy - lhld seadr ;SE - call asmcopy - lhld tiadr ;TI - call asmcopy - lhld teadr ;TE - call asmcopy - xra a ;zero rest -asmzero: - stax d ;store 0 - inx d - dcr c ;count down - jnz asmzero - dcr c ;return NZ for OK - ret -; -; Copy TCAP String from HL to DE -; Check for SCRATCH Area Overflow by Counting C Down -; Allow For Quotes -; -asmcopy: - mov a,m ;get char - stax d ;store it - inx h ;pt to next - inx d - ora a ;done? - rz - dcr c ;check for overflow - jz asmovfl - cpi qch ;quote? - jnz asmcopy - mov a,m ;get quoted byte - stax d ;store it - inx h ;pt to next - inx d - dcr c ;check for overflow - jnz asmcopy -asmovfl: - pop psw ;clear stack - call print - db cr,lf,'** Buffer Overflow **',0 - xra a ;error code - ret - -; -; Create Entries -; -create: - call print - db cr,lf - db cr,lf,' ** Z3TCAP Main Menu',0 - call prfdata ;print file data - call print - db cr,lf - db cr,lf,'Define: 1. Clear Screen Sequence' - db cr,lf,' 2. Cursor Motion Sequence' - db cr,lf,' 3. Clear to End of Line Sequence' - db cr,lf,' 4. Standout Mode Sequences' - db cr,lf,' 5. Terminal Init/Deinit Sequences' - db cr,lf,' 6. Arrow Keys' - db cr,lf,' 7. Terminal Name' - db cr,lf - db cr,lf,'Status: S. Print Status (Definitions so far)' - db cr,lf - db cr,lf,'Exit: X. Exit and Write File' - db cr,lf,' Q. Quit and Abort Program without Writing File' - db cr,lf - db cr,lf,'Command? ',0 - call capine ;get response - call crlf - lxi h,ctable ;pt to command table - call tscan ;scan table - call print - db ' Invalid Command: ',0 - call cout ;print char - jmp create ;resume -; -; Print File Data -; -prfdata: - call print - db ' for File ',0 - lxi d,fcb+1 - call pfn1 - call print - db ' **',0 - ret -; -; Define Name of Terminal -; -namedef: - lxi h,tname ;space fill terminal name buffer - mvi a,' ' - mvi b,16 - call fillb - call print - db cr,lf,' Input Name of Terminal: ',0 - xra a ;no caps - call bbline ;get line from user - call sksp ;skip over leading spaces - lxi d,tname ;save name in buffer - mvi b,16 ;16 bytes max -putname: - mov a,m ;get next char - ora a ;done? - jz pn1 - stax d ;put next char - inx h ;pt to next - inx d - dcr b ;count down - jnz putname -pn1: - jmp create -; -; Define Arrow Keys -; -arrowdef: - call print - db 'Arrow Key Definition' - db cr,lf,' Your Terminal''s Arrow Keys may be defined ONLY' - db cr,lf,' if they generate only one character each. If they' - db cr,lf,' do, type Y to continue. If not, type anything else.' - db cr,lf,' Define Arrow Keys (Y/N)? ',0 - call capine - cpi 'Y' - jnz create - call print - db cr,lf,' Strike the Appropriate Arrow Key' - db cr,lf,' 1. Arrow UP? ',0 - lxi h,ku ;pt to first entry - call cin - mov m,a ;store it - inx h ;pt to next - call ccout - call print - db cr,lf,' 2. Arrow DOWN? ',0 - call cin - mov m,a - inx h - call ccout - call print - db cr,lf,' 3. Arrow RIGHT? ',0 - call cin - mov m,a - inx h - call ccout - call print - db cr,lf,' 4. Arrow LEFT? ',0 - call cin - mov m,a - call ccout - jmp create -; -; Review Arrow Keys -; -arrowrev: - call print - db cr,lf,'Review of Arrow Key Definitions' - db cr,lf,' 1. Arrow UP = ',0 - lxi h,ku ;pt to first - mov a,m - call ccout - inx h - call print - db cr,lf,' 2. Arrow DOWN = ',0 - mov a,m - call ccout - inx h - call print - db cr,lf,' 3. Arrow RIGHT = ',0 - mov a,m - call ccout - inx h - call print - db cr,lf,' 4. Arrow LEFT = ',0 - mov a,m - call ccout - ret - -; -; Quit Create Mode and Program -; -crquit: - call print - db 'Do you really want to quit (Y/N)? ',0 - call capine ;get input from user - cpi 'Y' ;see if he typed a Y - jnz create ;resume if not - pop psw ;clear stack -; -; Exit Create Mode -; -crexit: - ret -; -; CL Definition -; -cldef: - call print - db 'Clear Screen Definition',cr,lf - db ' 1. Timing Delay',0 - call getdelay ;get delay constant - sta cld ;save delay constant - call print - db cr,lf,' 2. Clear Screen Byte Sequence',0 - lhld cladr ;pt to buffer - call getstr - jmp create - -; -; CL Review -; -clreview: - call print - db cr,lf,'Review of Clear Screen Definition' - db cr,lf,' 1. Timing Delay = ',0 - lda cld - call pafdc - call print - db ' Milliseconds' - db cr,lf,' 2. Clear Screen Sequence:',0 - lhld cladr - call prtstr - ret -; -; CE Definition -; -cedef: - call print - db 'Clear to End of Line Definition',cr,lf - db ' 1. Timing Delay',0 - call getdelay ;get delay constant - sta ced ;save delay constant - call print - db cr,lf,' 2. Clear to End of Line Byte Sequence',0 - lhld ceadr ;pt to buffer - call getstr - jmp create -; -; CE Review -; -cereview: - call print - db cr,lf,'Review of Clear to End of Line Definition' - db cr,lf,' 1. Timing Delay = ',0 - lda ced - call pafdc - call print - db ' Milliseconds' - db cr,lf,' 2. Clear to End of Line Sequence:',0 - lhld ceadr - call prtstr - ret -; -; SO Definition -; -sodef: - call print - db 'Standout Mode Definition',cr,lf - db ' 1. Begin Standout Mode Byte Sequence',0 - lhld soadr ;pt to buffer - call getstr - call print - db cr,lf,' 2. End Standout Mode Byte Sequence',0 - lhld seadr ;pt to buffer - call getstr - jmp create -; -; SO Review -; -soreview: - call print - db cr,lf,'Review of Standout Mode Definition' - db cr,lf,' 1. Begin Standout Mode Sequence:',0 - lhld soadr - call prtstr - call print - db cr,lf,' 2. End Standout Mode Sequence:',0 - lhld seadr - call prtstr - ret -; -; TI Definition -; -tidef: - call print - db 'Terminal Init/Deinit Definition',cr,lf - db ' 1. Terminal Initialization Byte Sequence',0 - lhld tiadr ;pt to buffer - call getstr - call print - db cr,lf,' 2. Terminal Deinitialization Byte Sequence',0 - lhld teadr ;pt to buffer - call getstr - jmp create -; -; TI Review -; -tireview: - call print - db cr,lf,'Review of Terminal Init/Deinit Definition' - db cr,lf,' 1. Terminal Initialization Sequence: ',0 - lhld tiadr - call prtstr - call print - db cr,lf,' 2. Terminal Deinitialization Sequence: ',0 - lhld teadr - call prtstr - ret -; -; CM Definition -; -cmdef: - call print - db 'Cursor Motion Definition',cr,lf - db ' 1. Timing Delay',0 - call getdelay ;get delay - sta cmd -cmcrdef: - call print - db cr,lf,' 2. Enter R if Row/Column or C for Column/Row: ',0 - call capine - cpi 'C' ;col/row - jz cmdef1 - cpi 'R' - jz cmdef1 - call print - db ' - Invalid',0 - jmp cmcrdef -cmdef1: - sta rcfirst ;set flag - call print - db cr,lf,' 3. Enter Equation for Row: ',0 - xra a ;no caps - call bbline ;get input - call sksp ;skip spaces - xchg - lhld reqn - xchg - call copy0 - call print - db cr,lf,' 4. Enter Equation for Column: ',0 - xra a ;no caps - call bbline ;get input - call sksp ;skip spaces - xchg - lhld ceqn - xchg - call copy0 - call print - db cr,lf,' 5. Enter Prefix Byte Sequence',0 - lhld cmbadr ;beginning - call getstr - call print - db cr,lf,' 6. Enter Middle Byte Sequence',0 - lhld cmmadr ;middle - call getstr - call print - db cr,lf,' 7. Enter Suffix Byte Sequence',0 - lhld cmeadr ;ending - call getstr - jmp create -; -; Copy HL to DE until 0 -; -copy0: - mov a,m ;copy - stax d - cpi qch ;quote? - jz copyq - ora a ;done if 0 - rz - inx h ;pt to next - inx d - jmp copy0 -copyq: - inx h ;copy quoted char - inx d - mov a,m ;copy - stax d - inx h ;advance - inx d - jmp copy0 -; -; Review CM Data -; -cmreview: - call print - db cr,lf,'Review of Cursor Motion Data' - db cr,lf,' 1. Timing Delay = ',0 - lda cmd - call pafdc - call print - db ' Milliseconds' - db cr,lf,' 2. Row or Column First: ',0 - lda rcfirst - call cout - call print - db cr,lf,' 3. Row Equation: -->',0 - lhld reqn - call pstr - call print - db '<--' - db cr,lf,' 4. Column Equation: -->',0 - lhld ceqn - call pstr - call print - db '<--' - db cr,lf,' 5. Prefix Byte Sequence: ',0 - lhld cmbadr - call prtstr - call print - db cr,lf,' 6. Middle Byte Sequence: ',0 - lhld cmmadr - call prtstr - call print - db cr,lf,' 7. Suffix Byte Sequence: ',0 - lhld cmeadr - call prtstr - ret - -; -; Status Display -; -rstatus: - call print - db cr,lf,' Strike Any Key to Continue - ',0 - call cin -status: - call print - db cr,lf,' ** Z3TCAP Status',0 - call prfdata ;file data - call print - db cr,lf - db cr,lf,'Review: 1. Clear Screen Definition' - db cr,lf,' 2. Cursor Motion Definition' - db cr,lf,' 3. Clear to End of Line Definition' - db cr,lf,' 4. Standout Mode Definition' - db cr,lf,' 5. Terminal Init/Deinit Definition' - db cr,lf,' 6. Arrow Key Definition' - db cr,lf,' 7. Terminal Name Definition' - db cr,lf - db cr,lf,'Exit: X. Exit to Main Menu' - db cr,lf - db cr,lf,'Command? ',0 - call capine - lxi h,rtable - call tscan - call print - db cr,lf,' Invalid Command: ',0 - call cout - jmp status -; -; Review Name -; -rname: - call print - db cr,lf,'Terminal Name: ',0 - lxi h,tname - mvi b,16 -rname1: - mov a,m ;get char - call cout - inx h ;pt to next - dcr b ;count down - jnz rname1 - jmp rstatus -; -; Review CL -; -rcl: - call clreview - jmp rstatus -; -; Review CE -; -rce: - call cereview - jmp rstatus -; -; Review CM -; -rcm: - call cmreview - jmp rstatus -; -; Review SO -; -rso: - call soreview - jmp rstatus -; -; Review TI -; -rti: - call tireview - jmp rstatus -; -; Review Arrow Keys -; -rarrow: - call arrowrev - jmp rstatus -; -; Status Review Commands -; -rtable: - db '1' - dw rcl - db '2' - dw rcm - db '3' - dw rce - db '4' - dw rso - db '5' - dw rti - db '6' - dw rarrow - db '7' - dw rname - db 'X' - dw create - db 0 - -; -; Scan Command Table -; -tscan: - mov b,a ;save char in B -tscan1: - mov a,m ;get char - ora a ;end of table? - jz tscanx ;exit - cmp b ;compare - jz tscanf ;found - inx h ;skip to next - inx h - inx h - jmp tscan1 -tscanx: - mov a,b ;restore char and exit - not found - ret -tscanf: - inx h ;get address - mov a,m - inx h - mov h,m - mov l,a - pop psw ;clear stack - pchl ;branch to routine -; -; Command Table -; -ctable: - db '1' ;CL - dw cldef - db '2' ;CM - dw cmdef - db '3' ;CE - dw cedef - db '4' ;SO - dw sodef - db '5' ;TI - dw tidef - db '6' ;arrows - dw arrowdef - db '7' ;name - dw namedef - db 'S' ;status - dw status - db 'Q' ;quit - dw crquit - db 'X' ;exit - dw crexit - db 0 -; -; Routine to Input Delay Constant -; -getdelay: - call print - db cr,lf,' Enter Delay Time in Milliseconds: ',0 - mvi a,0ffh ;caps - call bbline - call sksp - call eval ;convert to binary - ret -; -; Routine to Define Text String -; -getstr: - shld firstch ;set ptr to first char -getfirst: - mvi b,1 ;set count - lhld firstch ;set next char to first - shld nxtchar -getnext: - call print - db cr,lf,' Char #',0 - mov a,b ;get char number - call pafdc ;print it - inr b ;increment count - push b ;save it -; -; Prompt for Type of Input -; - call print - db ' - Type Char, .=Number, or =Done: ',0 - call cin ;get response - cpi cr ;exit - jz getx - cpi '.' ;number? - jz getnum -; -; Input Character -; - call print - db 'Char ',0 - call ccout ;echo character - jmp putch -; -; Input Number -; -getnum: - call print - db 'Enter Number: ',0 - mvi a,0ffh ;caps - call bbline ;get input - call sksp ;skip spaces - call eval ;convert -; -; Save Character with Quoting -; -putch: - lhld nxtchar ;pt to next char - ora a ;quote if null - jz quote - cpi qch ;quote if quote - jz quote -putch1: - mov m,a ;store it - inx h ;pt to next - shld nxtchar ;set ptr - pop b ;get count - jmp getnext ;get next char -; -; Quote the Character -; -quote: - mvi m,qch ;save quote char - inx h - jmp putch1 -; -; Exit -; -getx: - pop psw ;clear stack - lhld nxtchar ;store ending 0 - mvi m,0 - ret -; -; Print String Pted to by HL -; -prtstr: - mvi b,0 ;set count - call crlf ;new line - mov a,m ;empty? - ora a - jnz prts0 - call print - db ' -- Empty --',0 - ret -prts0: - mov a,m ;get next char - ora a ;done? - rz - call print - db ' (',0 - mov a,b ;print count - inr a - call pafdc - call print - db ') ',0 - mov a,m ;get next char - inx h ;pt to next - cpi qch ;check for quote - jnz prts1 - mov a,m ;get char that is quoted - inx h ;pt to next -prts1: - call ccout - call print - db ' ',0 - call pa2hc ;print as 2 hex chars - call print - db 'H ',0 - inr b ;increment count - mov a,b ;get count - ani 3 - cz crlf ;new line - jmp prts0 - -; -; Create Target File -; -wrfile: - lxi d,fcb ;pt to FCB - call z3log ;log into proper directory - call f$exist ;test of presence of file - jz make2 ;create file - call gfa ;get file attributes - ani 1 ;R/O? - jz make1 - call print - db cr,lf,'File ',0 - lxi d,fcb+1 - call pfn1 - call print - db ' is Read/Only - Saving as $$$.Z3T',0 - lxi h,tempfcb ;set $$$.Z3T - lxi d,fcb+1 - mvi b,11 ;11 chars - call moveb - lxi d,fcb ;reinit - call initfcb ;resume -make1: - call f$delete ;delete file -make2: - call f$make ;create file - cpi 0ffh ;error - jnz writef - call print - db cr,lf,'File Create Error',0 - ret -; -; Write Block to File -; -writef: - lhld scratch ;pt to entry - lxi d,tbuff ;copy into buffer - mvi b,128 ;128 bytes - call moveb - lxi d,fcb ;pt to FCB - call f$write ;write block - jnz werr - call f$close ;close file - call print - db cr,lf,'File ',0 - lxi d,fcb+1 - call pfn1 - call print - db ' Created',0 - ret -; -; Can't Write File -; -werr: - call print - db cr,lf,'File Write Error',0 - ret -; -; Print Entry Name Pted to by HL -; -prent: - mvi b,16 ;16 chars -prtname: - mov a,m ;get char - call cout - inx h ;advance - dcr b ;count down - jnz prtname - ret -; -; Print Char in A with Control Char Processing -; -ccout: - push psw ;save char - ani 7fh ;mask MSB - cpi 7fh ;DEL? - jz ccout2 - cpi ' ' - jnc ccout1 - push psw ;save char - mvi a,'^' - call cout - pop psw - adi '@' ;convert to char -ccout1: - call cout - pop psw - ret -ccout2: - call print - db '',0 - pop psw - ret - -; -; Buffers -; -crcmd: - db '%r',0 -tempfcb: - db '$$$ ' - db 'Z3T' -tname: - db '** Empty Name **' ;16 chars -ku: - ds 1 ;cursor up -kd: - ds 1 ;cursor down -kr: - ds 1 ;cursor right -kl: - ds 1 ;cursor left -cld: - ds 1 ;CL delay -cmd: - ds 1 ;CM delay -ced: - ds 1 ;CE delay -cladr: - ds 2 ;CL address -cmadr: - ds 2 ;CM address -ceadr: - ds 2 ;CE address -soadr: - ds 2 ;SO address -seadr: - ds 2 ;SE address -tiadr: - ds 2 ;TI address -teadr: - ds 2 ;TE address -cmbadr: - ds 2 ;CM Beginning -cmmadr: - ds 2 ;CM Middle -cmeadr: - ds 2 ;CM Ending -reqn: - ds 2 ;Row Equation -ceqn: - ds 2 ;Column Equation -rcfirst: - ds 1 ;R if Row First, C if Col First -deftyp: - db 'Z3T' ;default file type -firstch: - ds 2 ;ptr to first char in string -nxtchar: - ds 2 ;ptr to next char in string -scratch: - ds 2 ;ptr to scratch area - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/TCSEL32.COM b/Source/Images/d_bp/u15/TCSEL32.COM deleted file mode 100644 index 53f5a38b..00000000 Binary files a/Source/Images/d_bp/u15/TCSEL32.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/TCSELECT.MAC b/Source/Images/d_bp/u15/TCSELECT.MAC deleted file mode 100644 index 316a09d9..00000000 --- a/Source/Images/d_bp/u15/TCSELECT.MAC +++ /dev/null @@ -1,607 +0,0 @@ -; ZCPR3 TCAP Facility (Z3TCAP) -; Program Name: TCSELECT -; Author: Richard Conn -; Version: 1.1 -; Date: 1 Mar 85 -; Previous Versions: 1.0 (10 Mar 84) -version equ 11 - -; Version 1.1 by Richard Conn: Added FILENABLE equate to allow writing -; files to disk. If FILENABLE is FALSE, TCSELECT may only store in memory. - -; -; TCSELECT allows the user to select an entry from a Z3TCAP.TCP -; file and store it into memory or a Z3T file. TCSELECT is menu-driven. -; TCSELECT may be assembled to disable the ability to create a disk file -; (specifically for Z-NODE operation). -; - -; -; Basic Equates -; -false equ 0 -true equ not false -filenable equ true -entcnt equ 20 ;number of entries per screen -z3env SET 0f400h ;ZCPR3 Environment Descriptor -fcb equ 5ch -tbuff equ 80h -ctrlc equ 'C'-'@' -cr equ 0dh -lf equ 0ah - -; -; ZCPR3 and SYSLIB References -; - ext z3init,qprint,z3log,getenv - ext codend,moveb - ext print,pfn1,pstr,capine,crlf,cout,pafdc,comphd - ext initfcb,pfind,f$open,f$read,r$read,f$close - ext f$exist,gfa - ext putud,getud,logud -; - if filenable - ext f$make,f$write,f$delete - endif - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - -; -; Print Banner -; - call qprint - db 'TCSELECT, Version ' - db (version/10)+'0','.',(version mod 10)+'0' - db cr,lf,0 - -; -; Check for Entry in FCB -; - lda fcb+1 ;get first char - cpi '/' ;none if slash - jnz start1 -; -; Print Help Info -; -help: - call print - db 'TCSELECT - Select Entry from Z3TCAP.TCP' -; - if filenable -; - db cr,lf,'Syntax:' - db cr,lf,' TCSELECT outfile -or- TCSELECT outfile.typ' - db cr,lf - db cr,lf,'where "outfile" is the file to be generated by' - db cr,lf,'the execution of TCSELECT. If no file type is' - db cr,lf,'given, a file type of Z3T is the default.' - db cr,lf -; - endif -; - db cr,lf,'Syntax:' - db cr,lf,' TCSELECT' - db cr,lf - db cr,lf,'where this alternate form may be used to store' - db cr,lf,'the Z3TCAP entry for the selected terminal directly' - db cr,lf,'into the Z3 Environment Descriptor.' - db 0 - ret -; -; Resume Processing -; -start1: -; - if filenable -; -; Set Default File Type if None -; - lxi d,fcb+9 ;pt to file type - lxi h,deftyp ;pt to default file type - mvi b,3 ;3 bytes - ldax d ;get first char - cpi ' ' ;none if space - cz moveb ;set default file type -; - endif -; -; Begin Reading Z3TCAP.TCP -; - call putud ;save current location - lxi d,z3tfcb ;try to open Z3TCAP.TCP - call initfcb ;init FCB - mvi a,0ffh ;search current also - call pfind ;look for file - jnz start2 ;file found -; -; File Z3TCAP.TCP Not Found -; -fnferr: - call print - db 'File ',0 - lxi d,z3tfcb+1 ;print file name - call pfn1 - call print - db ' Not Found - Aborting',0 - ret -; -; Extract Z3TCAP Index -; -start2: - call logud ;log into DU in BC - lxi d,z3tfcb ;pt to FCB - call f$open ;open file - jnz fnferr - call codend ;read file into buffer - mvi c,0 ;set block counter - -; -; Load Z3TCAP Index -; -loadi: - inr c ;increment block counter - push b - lxi d,z3tfcb ;pt to FCB - call f$read ;read next block - jnz rerr ;read error - lxi d,tbuff ;copy from TBUFF - push h ;save ptr to this block - xchg - mvi b,128 ;128 bytes - call moveb - pop h ;pt to this block - lxi d,16 ;every 16 - mvi b,8 ;8 entries possible -; -; Check for End of Index -; -loadi1: - mov a,m ;end of index if space - cpi ' ' - jz loadi2 - dad d ;pt to next - dcr b ;count down - jnz loadi1 - pop b ;get count and load next - jmp loadi ;HL pts to next block to load -; -; Error in Reading File -; -rerr: - pop psw ;clear stack - call print - db cr,lf,'File Read Error',0 - ret -; -; Reached End of Index -; -loadi2: - shld z3tcver ;save ptr to version number -loadi3: - dad d ;compute address of next block after last - dcr b - jnz loadi3 - shld scratch ;scratch area - pop b ;get record number of next block - mov a,c - sta rec1 ;save count - lxi d,z3tfcb ;close file - call f$close -; -; Print menu of terminals -; -menu: - mvi a,1 ;set menu number - sta menunum - call codend ;pt to first terminal - shld curtable ;save ptr -menu1: - call prmenu ;print menu pted to by HL - call print - db cr,lf,'Enter Selection',0 - call chk1st ;first menu? - lxi h,lstmsg ;pt to last message - cz pstr - call chknth ;last menu? - lxi h,nxtmsg ;pt to next message - cz pstr - call print - db ', or ^C to Exit - ',0 - call capine ;get response - call crlf ;new line - cpi ctrlc ;abort? - rz - cpi '+' ;next? - jz nxtmenu - cpi '-' ;last? - jz lstmenu - sui 'A' ;convert to digit - jc menuerr ;print error message - mov c,a ;result in C - mvi a,entcnt-1 ;selection limit? - cmp c ;range error? - jc menuerr -; -; Set ptr to menu entry -; On input, C = offset in 20-terminal menu and MENUNUM is menu (1..) -; - lda menunum ;get menu number - dcr a ;adjust to 0 offset - mvi d,0 ;HL = number - mov e,a - lxi h,0 ;init sum - mvi b,entcnt ;multiply by number of entries -mult: - dad d ;+menunumber - dcr b ;count down - jnz mult ;B=0 on exit - dad b ;compute offset from record 1 for entry - jmp lterm ;load terminal now with offset in HL -; -; HL Now Contains Terminal Number (Zero Relative) -; -lterm: - lda rec1 ;get location of terminal data record 1 - mov c,a - dad b ;HL contains random record number of terminal -; -; HL Now Contains Random Record Number for Terminal in File (Zero Relative) -; Reopen Z3TCAP.TCP -; - lxi d,z3tfcb ;pt to FCB of file - call initfcb ;reinit it - call f$open -; -; Position to Correct Record and Read it in -; - call r$read ;read random record in HL - call f$close ;close file -; -; Copy Into Scratch Area -; - lhld scratch ;pt to scratch area - lxi d,tbuff ;pt to TBUFF - xchg - mvi b,128 ;128 bytes - call moveb - xchg ;HL pts to scratch -; -; Confirm Selection -; - call print - db cr,lf,' Selected Terminal is: ',0 - call prent ;print name - call print - db ' -- Confirm (Y/N)? ',0 - call capine ;get input - call crlf - cpi 'Y' - jnz menu1 ;continue -; -; Check for FCB and do a memory fill if no file given -; - if filenable -; - lda fcb+1 ;anything in FCB? - cpi ' ' - jz memory ;place SCRATCH into Z3 Env Descriptor -; -; Create Target File -; - call getud ;return home - lxi d,fcb ;pt to FCB - call z3log ;log into proper directory - call f$exist ;test of presence of file - jz make2 ;create file - call gfa ;get file attributes - ani 1 ;R/O? - jz make1 - call print - db cr,lf,'File ',0 - lxi d,fcb+1 - call pfn1 - call print - db ' is Read/Only',0 - ret -make1: - call f$delete ;delete file -make2: - call f$make ;create file - cpi 0ffh ;error - jnz writef - call print - db cr,lf,'File Create Error',0 - ret -; -; Write Block to File -; -writef: - lhld scratch ;pt to entry - lxi d,tbuff ;copy into buffer - mvi b,128 ;128 bytes - call moveb - lxi d,fcb ;pt to FCB - call f$write ;write block - jnz werr - call f$close ;close file - call print - db cr,lf,'File ',0 - lxi d,fcb+1 - call pfn1 - call print - db ' Created',0 - ret -; -; Can't Write File -; -werr: - call print - db cr,lf,'File Write Error',0 - ret -; - endif ;filenable -- MEMORY follows - -; -; Place Z3TCAP Entry into Z3 Environment Descriptor -; -memory: - call getenv ;pt to env desc - lxi d,80h ;pt to TCAP entry - dad d - xchg ;DE pts to entry - lhld scratch ;pt to scratch area - mvi b,128 ;copy 128 bytes - call moveb - call print - db cr,lf,' ZCPR3 Environment Descriptor Loaded',0 - ret -; -; Invalid Selection -; -menuerr: - call print - db ' -- Error: Invalid Selection',0 - jmp menu1 -; -; Advance to next menu -; -nxtmenu: - call chknth ;at end? - jz nmenu - call print - db ' -- Error: Already at Last Menu',0 - jmp menu1 -nmenu: - lhld curtable ;pt to current table - lxi d,16*entcnt ;advance to next - dad d - shld curtable - lda menunum ;increment menu number - inr a - sta menunum - jmp menu1 -; -; Backup to last menu -; -lstmenu: - call chk1st ;at beginning? - jz lmenu - call print - db ' -- Error: Already at First Menu',0 - jmp menu1 -lmenu: - lhld curtable ;pt to current table - lxi d,-16*entcnt ;backup - dad d - shld curtable - lda menunum ;decrement menu number - dcr a - sta menunum - jmp menu1 -; -; PRMENU -; PRMENU performs the following functions: -; 1. Sets flag if at 1st menu -; 2. Sets flag if at last menu -; 3. Prints menu in 2 columns -; -prmenu: - call print - db cr,lf,'** Terminal Menu ',0 - lda menunum ;print menu number - call pafdc ;print as floating - call print - db ' for Z3TCAP Version ',0 - lhld z3tcver ;get ptr to version - inx h ;pt to version number -prmenu0: - mov a,m ;get char - inx h ;pt to next - call cout ;print char - cpi ' ' ;done if space - jnz prmenu0 - call print - db ' **',cr,lf,cr,lf,0 - xra a - sta m1flag ;set not at 1st menu - sta mnflag ;set not at nth menu -; -; Determine if at 1st menu -; - call codend ;pt to terminal table - xchg ;... in DE - lhld curtable ;set 1st menu flag - call comphd ;compare - jnz prm1 - mvi a,0ffh ;set flag - sta m1flag -; -; Determine if at nth menu -; -prm1: - push h ;save ptr to current table - lxi d,16 ;size of table entry - mvi b,entcnt ;entcnt entries per screen -prm2: - mov a,m ;end? - cpi ' ' ;no entry? - jz prm3 - dad d ;advance - dcr b ;count down - jnz prm2 - jmp prm4 -prm3: - mvi a,0ffh ;at nth menu - sta mnflag ;set flag -; -; Determine menu bounds -; -prm4: - lxi h,0 ;clear ptr to col2 - shld col2 - pop h ;get ptr to current table - mvi b,entcnt/2 ;try to advance entcnt/2 entries -prm5: - mov a,m ;no next entry? - cpi ' ' - jz prm6 - dad d ;advance to next - dcr b ;count down - jnz prm5 - shld col2 ;save ptr to column 2 -; -; Print menu -; -prm6: - lhld col2 ;get ptr to column 2 - xchg ;... in DE - lhld curtable ;get ptr to column 1 - mvi b,entcnt/2 ;entcnt/2 lines max - mvi c,'A' ;current letter -prm7: - mov a,m ;get first char? - cpi ' ' ;done? - rz - mov a,c ;output letter - call prentry ;print entry - xchg ;HL pts to col 2 - mov a,h ;done? - ora l - jz prm8 - mov a,m ;empty? - cpi ' ' - jz prm8 - mov a,c ;get char - adi 10 ;add offset - call prentry -prm8: - inr c ;increment menu letter - xchg ;restore HL/DE - call crlf - dcr b ;count down - jnz prm7 - ret -; -; Print entry whose letter is in A and whose text is pted to by HL -; Advance HL -; -prentry: - call cout ;output char - call print - db '. ',0 -prent: - push b ;save regs - mvi b,16 ;16 chars -prent1: - mov a,m ;get char - inx h ;pt to next - call cout ;print char - dcr b - jnz prent1 - call print - db ' ',0 ;separator - pop b - ret -; -; Check to see if this is the first menu -; -chk1st: - lda m1flag ;get flag - ora a - ret -; -; Check to see if this is the last menu -; -chknth: - lda mnflag ;get flag - ora a - ret -; -; Buffers -; -z3tfcb: - db 0 - db 'Z3TCAP TCP' - ds 24 ;36 bytes total -; - if filenable -; -deftyp: - db 'Z3T' ;default file type -; - endif -; -nxtmsg: - db ', + for Next',0 -lstmsg: - db ', - for Last',0 -m1flag: - ds 1 ;1st menu flag -mnflag: - ds 1 ;nth menu flag -col2: - ds 2 ;pointer to column 2 entries -rec1: - ds 1 ;number of 1st data record -menunum: - ds 1 ;number of current menu -z3tcver: - ds 2 ;ptr to ZCPR3 TCAP Version Number -scratch: - ds 2 ;ptr to scratch area -curtable: - ds 2 ;current table ptr - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/TCSELECT.OLD b/Source/Images/d_bp/u15/TCSELECT.OLD deleted file mode 100644 index 808ea484..00000000 Binary files a/Source/Images/d_bp/u15/TCSELECT.OLD and /dev/null differ diff --git a/Source/Images/d_bp/u15/TCSRC14.COM b/Source/Images/d_bp/u15/TCSRC14.COM deleted file mode 100644 index 246db635..00000000 Binary files a/Source/Images/d_bp/u15/TCSRC14.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/TCVIEW.OLD b/Source/Images/d_bp/u15/TCVIEW.OLD deleted file mode 100644 index 9d12b757..00000000 Binary files a/Source/Images/d_bp/u15/TCVIEW.OLD and /dev/null differ diff --git a/Source/Images/d_bp/u15/TCVIEW20.COM b/Source/Images/d_bp/u15/TCVIEW20.COM deleted file mode 100644 index f5cdd9ba..00000000 Binary files a/Source/Images/d_bp/u15/TCVIEW20.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/UNERASE.COM b/Source/Images/d_bp/u15/UNERASE.COM deleted file mode 100644 index 748557a7..00000000 Binary files a/Source/Images/d_bp/u15/UNERASE.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/UNERASE.MAC b/Source/Images/d_bp/u15/UNERASE.MAC deleted file mode 100644 index 3f9dd2c0..00000000 --- a/Source/Images/d_bp/u15/UNERASE.MAC +++ /dev/null @@ -1,727 +0,0 @@ -; PROGRAM: UNERASE for ZCPR3 -; AUTHOR: RICHARD CONN -; VERSION: 1.0 -; DATE: 18 May 84 -; DERIVATION: UNERA 2.2 (25 July 83) for ZCPR2 -; DERIVATION: UNERA BY GENE COTTON -; -VERS EQU 10 ;version number -z3env SET 0f400h - -; -; PROGRAM TO RECOVER ERASED FILES, BY GENE COTTON -; -; From Interface Age December 1981 pg 146 -; -; v2.0 - 07/23/83 Modified to be consistent in the ZCPR2 tool set. -; - Rick Conn -; v1.0 - 05/18/84 Modified to be consistent in the ZCPR3 tool set. -; - Rick Conn -; -; Contributors: -; v1.6 - Dave Rand -; v1.5 - Irv Hoff -; v1.4 - Paul Traina -; v1.3 - Irv Hoff -; v1.2 - Charlie Strom -; v1.1 - Bruce Blakeslee -; v1.0 - Retyped from Interface Age (Dec 81). - Henry Rothberg -; - -; -; SYSLIB AND Z3LIB ROUTINES -; - EXT Z3INIT,CODEND - EXT PRINT,COUT,CRLF - -; -; System equates: -; -BOOT EQU 0000H ;CP/M WARM BOOT JUMP VECTOR -BDOS EQU BOOT+05H ;CP/M BDOS CALL JUMP VECTOR -TBUFF EQU BOOT+80H ;DISK I/O BUFFER -FCB EQU BOOT+5CH ;DEFAULT FILE CONTROL BLOCK -FCB2 EQU BOOT+6CH ;SECONDARY FILE CONTROL AREA -CR EQU 'M'-'@' ;CTL-M FOR CARRIAGE RETURN -LF EQU 'J'-'@' ;CTL-J FOR LINE FEED -CTRLC EQU 'C'-'@' ;ABORT - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - LXI H,0 ;SAVE STACK PTR - DAD SP - SHLD STACK - CALL CODEND ;DETERMINE FREE SPACE - SHLD FNTAB ;SET PTR TO FILE NAME TABLE - LXI D,512 ;1/2 K - DAD D - SPHL ;NEW STACK - CALL HELLO ;SIGN ON MESSAGE - CALL HELPCHK ;CHECK FOR AND PRINT HELP MESSAGE - CALL PCHECK ;CHECK PARAMETERS - LDA FNCOUNT ;NUMBER OF FILES SPECIFIED - ORA A ;0=NONE - CNZ TRYFIX ;DO THE RECOVERY - CALL BYE ;SIGN OFF MESSAGE - JMP BOOT ;RETURN TO CP/M -; -; ** Main Routines ** -; - -; -; SAY WHO WE ARE -; -HELLO: - CALL PRINT - DB 'UNERASE Version ' - DB (VERS/10)+'0','.',(VERS MOD 10)+'0',0 - RET -; -; CHECK FOR VALID PARAMETERS AND SAY WHICH CP?M VERSION -; -PCHECK: - CALL OPTCHK ;CHECK FOR OPTIONS AND SET FLAGS - CALL FCBCHK ;MAKE SURE FILE SPECIFIED - CALL CPMCHK ;ESTABLISH CP/M PARAMETERS - CALL PUSCHK ;CHECK IF USER WANTS TO CHANGE DISK - RET -; -; LOOK THROUGH DIRECTORY -; -TRYFIX: - CALL NXTSEC ;GET A DIRECTORY SECTOR - RZ ;RETURNS ZERO FLAG IF NO MORE - CALL CHKENT ;CHECK IT OUT AND MAYBE FIX - JMP TRYFIX ;KEEP IT UP TILL DONE -; -; SIGN OFF AND RESET SYSTEM -; -BYE: - MVI C,13 ;SYSTEM RESET - CALL BDOS - LDA LISTFL ;LIST ONLY? - ORA A ;0=NO - JNZ PRNF - LDA FIXCNT ;CHECK FOR ACTIVITY - ORA A - JZ PRNF ;SAY NONE FOUND - CALL PRINT - DB CR,LF,'File(s) Recovered - DOUBLE CHECK Before Using',0 - RET -PRNF: - CALL PRINT - DB CR,LF,'NO Files Recovered',0 - RET -; -; CHECKS FOR P AND 0 OPTIONS IN COMMAND LINE -; -OPTCHK: - XRA A ;TURN OFF FLAGS - STA CURUSR - STA PAUSE - STA FIXCNT - STA LISTFL - STA FNCOUNT ;NO FILE NAMES - LXI H,1 ;SET SECTOR 1 - SHLD SECTOR - LXI H,TBUFF ;SCAN THRU TBUFF, BUILDING A FILE NAME TABLE - MOV A,M ;GET CHAR COUNT - INX H ;PT TO FIRST CHAR - PUSH H ;SAVE PTR - ADD L ;PT TO AFTER LAST CHAR - MOV L,A - MVI M,0 ;STORE ENDING ZERO - LHLD FNTAB ;PT TO TABLE - XCHG ;... IN DE - POP H ;GET PTR TO FIRST CHAR - CALL SBLANK ;SKIP BLANKS -FNLOOP: - PUSH D ;SAVE TABLE PTR - CALL GETFN ;EXTRACT FILE NAME - POP D - PUSH H - LXI H,11 ;PT TO NEXT TABLE ENTRY - DAD D - XCHG - POP H - LDA FNCOUNT ;INCREMENT COUNT - INR A - STA FNCOUNT - MOV A,M ;GET TERMINATING CHAR - INX H ;PT TO NEXT - CPI ',' ;ANOTHER FOLLOWS? - JZ FNLOOP - DCX H ;POINT BACK TO DELIM - CALL SBLANK ;SKIP TO NON-BLANK -OPTCK1: - MOV A,M ;GET OPTION - CALL DELCHK ;DONE IF DELIM - RZ - CPI 'L' ;LIST ONLY? - JZ OPTCKL - CPI 'P' ;PAUSE? - JZ OPTCKP - CPI 'Z' ;USER 0? - JZ OPTCKZ - CALL PRINT - DB CR,LF,'Invalid Option -- ',0 - MOV A,M - CALL COUT - JMP HCK1 -OPTCKL: - MVI A,0FFH ;SET FLAG - STA LISTFL - INX H ;PT TO NEXT - JMP OPTCK1 -OPTCKP: - MVI A,0FFH ;SET FLAG - STA PAUSE - INX H ;PT TO NEXT - JMP OPTCK1 -OPTCKZ: - MVI A,0FFH ;SET FLAG - STA CURUSR - INX H - JMP OPTCK1 -GETFN: - PUSH D ;FILL TARGET FCB - MVI B,11 ;11 BYTES - MVI A,' ' ;SPACE FILL -GETFN0: - STAX D ;PUT SPACE - INX D - DCR B - JNZ GETFN0 - POP D ;PT TO ENTRY AGAIN - CALL SCANCOL ;SCAN FOR COLON - MVI B,8 ;8 CHARS MAX - CALL GETFN1 ;GET AND FILL ENTRY - MOV A,M ;GET CHAR - CPI '.' ;DELIM? - RNZ ;DONE - INX H ;PT TO AFTER PERIOD - MVI B,3 ;3 CHARS MAX AND DO IT AGAIN -GETFN1: - MOV A,M ;GET CHAR - CPI '.' ;END OF FIELD? - JZ GETFN3 - CALL DELCHK ;CHECK DELIMITER - RZ - CPI '*' ;WILD? - JZ GETFNQ - STAX D ;STORE CHAR - INX H ;PT TO NEXT - INX D - DCR B ;COUNT DOWN - JNZ GETFN1 -GETFN2: - MOV A,M ;FLUSH CHARS TO DELIM - CALL DELCHK ;CHECK FOR DELIMITER - RZ - INX H ;PT TO NEXT - JMP GETFN2 -GETFN3: - INX D ;PT TO AFTER FIELD - DCR B ;COUNT DOWN - JNZ GETFN3 - RET -GETFNQ: - MVI A,'?' ;FILL WITH QUESTION MARKS - STAX D - INX D - DCR B - JNZ GETFNQ - JMP GETFN2 ;SKIP TO DELIM -DELCHK: - ORA A ;END OF LINE? - RZ - CPI '.' ;END OF FIELD? - RZ - CPI ',' ;END OF ENTRY? - RZ - CPI ' ' - RET -SBLANK: - MOV A,M ;SKIP TO NON-BLANK - CPI ' ' - RNZ - INX H - JMP SBLANK -SCANCOL: - PUSH D ;SAVE TABLE PTR - PUSH H ;SAVE PTR -SCOL1: - MOV A,M ;GET CHAR - INX H ;PT TO NEXT - CPI ':' ;COLON? - JZ SCOLX - CALL DELCHK ;CHECK FOR DELIMITER - JNZ SCOL1 -SCOL2: - POP H ;RESTORE - POP D - RET -SCOLX: - XCHG ;DE PTS TO AFTER COLON - POP H ;GET OLD PTR - XCHG ;REPLACE IT - POP D ;GET TABLE PTR - RET -; -; CHECKS THE CURRENT 4 DIRECTORY ENTRIES AGAINST ARGUMENT -; IF MATCH, REWRITES SECTOR WITH REACTIVATED 1ST BYTES -; -CHKENT: - XRA A ;ASSUME NO REWRITE - STA REWRT - MVI B,4 ;NUMBER OF ENTRIES PER SECTOR - LXI H,TBUFF ;BEGINNING OF BUFFER -CKLUP: - PUSH B - MOV A,M - CPI 0E5H ;CHECK FOR UNUSED - JNZ CKINC - PUSH H - LHLD FNTAB ;PT TO POTENTIAL FILES - XCHG - POP H - LDA FNCOUNT ;NUMBER OF ENTRIES TO COUNT - MOV B,A ;... IN B -CKLUP0: - PUSH H ;SAVE BEGINNING ADDRESS - PUSH D ;SAVE PTR - PUSH B ;SET NAME COUNT - CALL COMPAR ;COMPARE WITH ARGUMENT - POP B ;GET NAME COUNT - POP D ;GET PTR - POP H - JZ CKLUP1 ;MATCH! - PUSH H ;SAVE PTR - LXI H,11 ;PT TO NEXT ENTRY - DAD D - XCHG - POP H - DCR B ;COUNT DOWN - JNZ CKLUP0 - JMP CKINC -CKLUP1: - LDA LISTFL ;LIST ONLY? - ORA A ;0=NO - JNZ CKINC - MVI M,0 ;SET USER 0 - LDA CURUSR ;CHECK FOR CURRENT USER - CPI 0FFH - JZ CKLUP2 - PUSH H ;SAVE HL - MVI E,0FFH ;GET USER VALUE - MVI C,32 ;GET USER AREA FUNCTION - CALL BDOS ;BDOS RETURNS CURRENT AREA IN 'A' REG. - POP H ;RESTORE HL - MOV M,A ;POKE IN CURRENT USER AREA -CKLUP2: - MVI A,0FH ;SAY NEED REWRITE - STA REWRT - MVI A,0FFH ;SET COUNT FLAG - STA FIXCNT -CKINC: - POP B - LXI D,32 ;LENGTH OF ENTRY - DAD D - DCR B - JNZ CKLUP - LDA REWRT ;SEE IF NEED REWRITE - ORA A - JZ CKDONE ;NO - DONE -; -; WRITE THE DIRECTORY SECTOR BACK TO THE DISK -; - LHLD TRACK ;SET TRACK - MOV C,L - MOV B,H - CALL SETTRK - LHLD SECTOR ;SET SECTOR - MOV B,H - MOV C,L - CALL TRNSLT - CALL SETSEC - CALL WRITE ;WRITE THE SECTOR BACK - ORA A - JNZ ERRWRT ;ABORT IF ERROR -CKDONE: - LHLD DIRMAX - DCX H ;REDUCE SECTORS LEFT - SHLD DIRMAX - LHLD SECTOR ;POINT TO NEXT SECTOR - INX H - SHLD SECTOR - XCHG - LHLD MAXSEC ;REACHED LIMIT? - INX H ;ONE MORE - MOV A,H ;CHECK HIGH - CMP D - RNZ - MOV A,L ;CHECK LOW - CMP E - RNZ - LHLD TRACK ;NEXT TRACK - INX H - SHLD TRACK - LXI H,1 ;FIRST SECTOR OF NEXT TRACK - SHLD SECTOR - RET -; -; COMPARE 11 BYTES OF DIRECTORY ENTRY AGAINST ARGUMENT -; -COMPAR: - SHLD TEMP ;Hold pointer in case of match - INX H - XCHG - MVI C,11 -CMPR1: - LDAX D ;GET DIRECTORY ENTRY CHARACTER - ANI 7FH ;STRIP ANY FLAGS - CMP M - JNZ CMPCKAM -CMPR2: - INX D - INX H ;BUMP TO NEXT CHARACTER - DCR C - JNZ CMPR1 ;LOOP FOR 11 CHARACTERS - LDA FIXCNT ;CHECK FLAG - ORA A ;0=FIRST TIME - CZ PRFIX - LHLD TEMP - CALL PRINTFCB - XRA A - RET ;RETURNS 'ZERO' FLAG SET FOR MATCH -PRFIX: - LDA LISTFL ;LIST ONLY? - ORA A ;0=NO - JNZ PRFIX1 - CALL PRINT - DB CR,LF,'File(s) Recovered --',0 - RET -PRFIX1: - MVI A,0FFH ;DON'T PRINT THIS AGAIN - STA FIXCNT - CALL PRINT - DB CR,LF,'Erased File(s) --',0 - RET -CMPCKAM: - LDAX D - CPI 0E5H ;NON-ALLOCATED ENTRY? - JZ SKIP - MOV A,M - CPI '?' - RNZ - JMP CMPR2 -SKIP: - ORA A - RET ;SET NZ FLAG -; -; CHECK FOR CP/M VERSION AND SET THINGS -; -CPMCHK: - LXI D,80H ;SET DMA TO TBUFF - MVI C,26 - CALL BDOS - CALL CPM22 ;IF 2.2 GO SET THINGS - CALL GTBIOS ;ESTABLISH BIOS JUMP VECTOR -; -; SELECT DISK AND SETUP DISK PARAMETER HEADER -; - LDA FCB ;GET THE DISK - MOV E,A - MVI C,14 - CALL BDOS - LDA FCB - MOV C,A - MVI B,0 - CALL SELDSK ;MAKE SURE DRIVE IS - MOV A,H ; SELECTED - ORA L - JZ ILDISK - MOV E,M ;GET THE ADDRESS - INX H ; OF THE XLTO - MOV D,M - XCHG - SHLD DPH ;SAVE THE ADDRESS - RET -; -; DETERMINE NUMBER OF DIRECTORY ENTRIES -; -CPM22: - MVI C,31 ;GET DISK PARAMETERS ADDRESS - CALL BDOS ;DPB ADDRESS IN 'HL' ON RETURN - MOV E,M ;NUMBER OF SECTORS/TRACK - INX H ;AS 2-BYTE QUANTITY IN DE - MOV D,M - INX H - XCHG - SHLD MAXSEC ;SET MAX SECTORS/TRACK - XCHG - INX H - INX H - MOV A,M ;GET EXM - STA EXTENT - INX H ;PT TO DRM - INX H - INX H - MOV E,M ;GET NUMBER OF - INX H ; DIRECTORY ENTRIES - MOV D,M - XCHG - INX H ;ACCOUNT FOR - 1 - CALL SHFHL2 ;SHIFT 'HL' RIGHT 2 - SHLD DIRMAX ;SAVE NUMBER DIRECTORY SECTORS - LXI H,5 ;NOW POINT TO SYSTEM - DAD D ; TRACK OFFSET - MOV A,M ;PICK UP NUMBER OF - INX H - MOV H,M - MOV L,A - SHLD TRACK - RET -; -; ERROR OCCURED DURING DISK WRITE - ABORT -; -ERRWRT: - CALL PRINT - DB CR,LF,'ABORT - Error During Disk Write',0 - JMP BOOT ;ABORT -; -; MAKE SURE A LEGAL DISK IS SPECIFIED AND CHECK FOR HELP -; -FCBCHK: - LDA FCB ;GET DRIVE SPECIFICATION - ORA A ;SEE IF DEFAULT - JNZ FCBCK1 ;NO, GO CHECK FILENAME - MVI C,25 ;ASK FOR CURRENT DRIVE - CALL BDOS - INR A ;OFFSET FOR NEXT INSTRUCTION -FCBCK1: - DCR A ;CURRENT DRIVE NUMBER - STA FCB ;SAVE IT - RET -; -; CHECK FOR HELP REQUEST -; -HELPCHK: - LDA FCB+1 ;GET 1ST BYTE OF FILENAME - CPI '/' ;HELP? - JZ HCK1 - CPI ' ' ;MAKE SURE IT IS NON-BLANK - RNZ ;OK - KEEP GOING -; -; IF NO FILE NAME IS SPECIFIED, ABORT WITH NOTICE -; -HCK1: - CALL PRINT - db cr,lf,'Syntax:' - DB CR,LF,' UNERASE afn,afn,afn,... o' - db cr,lf,'Options:' - DB CR,LF,' L - List Erased Files Only' - DB CR,LF,' P - Pause for disk change' - DB CR,LF,' Z - Place file in User 0 ' - DB '(default is current)' - DB 0 -CLEANRET: - LHLD STACK ;QUIET RETURN - SPHL - RET -; -; GET BIOS JUMPS VECTORS FOR EASY REFERENCE -; -GTBIOS: - LHLD BOOT+1 ;POINTS TO BIOS JUMP TABLE+3 - LXI D,WBOOT ;WHERE WE WILL KEEP A COPY - MVI B,16*3 ;MOVE 48 BYTES AND FALL THRU TO MOVE -; -; GENERAL PURPOSE MOVE ROUTINE -; FROM 'HL' TO 'DE' FOR COUNT OF 8 -; -MOVE: - MOV A,M ;GET A BYTE - STAX D ;PUT A BYTE - INX D ;INCREMENT TO NEXT - INX H - DCR B ;COUNT DOWN - JNZ MOVE - RET -; -;SPECIFIED AN ILLEGAL DISK DRIVE - ABORT -; -ILDISK: - CALL PRINT - DB CR,LF,'ABORT - Illegal Disk Requested',0 - JMP BOOT ;ABORT -; -; READS NEXT SECTOR (GROUP OF FOUR DIRECTORY ENTRIES) -; RETURNS WITH ZERO FLAG SET IF NO MORE -; -NXTSEC: - LHLD DIRMAX ;SEE IF MORE SECTORS - MOV A,H - ORA L - RZ ;RETURNS ZERO FLAG IF NO MORE - LHLD TRACK ;SET TRACK - MOV C,L - MOV B,H - CALL SETTRK - LHLD SECTOR ;SET SECTOR - MOV B,H - MOV C,L - CALL TRNSLT - CALL SETSEC - CALL READ ;READ A SECTOR - ANI 1 ;REVERSE SENSE OF ERROR FLAG - XRI 1 ;RETURNS WITH ZERO FLAG SET - RET ;IF BAD READ -; -; FCB PRINTING ROUTINE -; -PRINTFCB: - PUSH H - LXI D,1+8+3 - DAD D - LDA EXTENT ;GET EXTENT MASK - CMP M ;COMPARE TO TARGET - POP H - RC ;PRINT ONLY FIRST EXTENT - CALL PRINT ;NEW LINE WITH 2 LEADING SPACES - DB CR,LF,' ',0 - INX H - MVI B,8 - CALL PR1 - MVI A,'.' - CALL COUT - MVI B,3 -PR1: - MOV A,M - ANI 7FH - CPI ' ' ;Check for blanks - CNZ COUT - INX H - DCR B - JNZ PR1 - RET -; -; DOES USER WANT TO PAUSE TO CHANGE DISKS OR SELECT USER 0? -; -PUSCHK: - LDA PAUSE ;GET OPTION - ORA A - RZ ;NOPE, SO RETURN - CALL PRINT ;PRINT PAUSE MESSAGE - DB CR,LF,'Change Disk - Hit ^C to Abort, Anything Else to Cont - ' - DB 0 - MVI C,01 - CALL BDOS ;INPUT A CHAR - CPI CTRLC ;ABORT? - JZ CLEANRET - CALL CRLF - MVI C,0DH - JMP BDOS ;RESET THE DISK -; -; SHIFT REGS 'HL' RIGHT 2 BITS LOGICAL -; -SHFHL2: - CALL SHFHL ;ROTATE RIGHT 1 BIT AND FALL THRU -SHFHL: - XRA A ;CLEAR CARRY - MOV A,H - RAR ;SHIFTED BIT IN CARRY - MOV H,A - MOV A,L - RAR - MOV L,A - RET -; -; TRANSLATE REG 'BC' FROM LOGICAL TO PHYSICAL SECTOR NUMBER -; -TRNSLT: - LHLD DPH ;GET ADDRESS OF XLTO - XCHG - CALL SECTRAN ;USE BIOS ROUTINE - MOV C,L ;RETURN VALUE IN BC - MOV B,H - RET -; -; THIS IS THE WORKING COPY OF THE BIOS JUMP TABLE -; -WBOOT: DS 3 -CONST: DS 3 -CONIN: DS 3 -CONOUT: DS 3 -LIST: DS 3 -PUNCH: DS 3 -READER: DS 3 -HOME: DS 3 -SELDSK: DS 3 -SETTRK: DS 3 -SETSEC: DS 3 -SETDMA: DS 3 -READ: DS 3 -WRITE: DS 3 -LISTST: DS 3 -SECTRAN: DS 3 -; -STACK: - DS 2 ;LOCATION OF STACK -; -; DATA AREAS -; -FNCOUNT: - DS 1 ;NUMBER OF FILE NAMES IN COMMAND LINE -CURUSR: DS 1 ;0 IF NOT IN CURRENT USER -PAUSE: DS 1 ;0 IF NO PAUSE FOR DISK CHANGE -LISTFL: DS 1 ;0 IF NOT LIST ONLY -DIRMAX: DS 2 ;NUMBER OF SECTORS IN DIRECTORY = -; ; MAXIMUM NUMBER OF DIRECTORY ENTRIES -; ; DIVIDED BY 4 (ENTRIES PER SECTOR) -TEMP: DS 2 ;TEMP STORAGE FOR FCB PRINT -EXTENT: DS 1 ;EXTENT MASK -MAXSEC: DS 2 ;MAXIMUM NUMBER OF SECTORS/TRACK -FIXCNT: DS 1 ;CHANGE FLAG -REWRT: DS 1 ;REWRITE FLAG 0=NO, F=YES -SECTOR: DS 2 ;CURRENT SECTOR NUMBER -TRACK: DS 2 ;TRACK NUMBER OF DIRECTORY -; -; ADDRESS OF THE TRANSLATE TABLE -; -DPH: DS 16 - -FNTAB: DS 2 ;FILE NAME BUFFER - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/VF-BOX11.LBR b/Source/Images/d_bp/u15/VF-BOX11.LBR deleted file mode 100644 index 55c5cfe6..00000000 Binary files a/Source/Images/d_bp/u15/VF-BOX11.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/VF41.IQF b/Source/Images/d_bp/u15/VF41.IQF deleted file mode 100644 index 1940f8b6..00000000 Binary files a/Source/Images/d_bp/u15/VF41.IQF and /dev/null differ diff --git a/Source/Images/d_bp/u15/VF41H.LBR b/Source/Images/d_bp/u15/VF41H.LBR deleted file mode 100644 index c2022e13..00000000 Binary files a/Source/Images/d_bp/u15/VF41H.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/VF42A.LBR b/Source/Images/d_bp/u15/VF42A.LBR deleted file mode 100644 index 718954fc..00000000 Binary files a/Source/Images/d_bp/u15/VF42A.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/VFILER.COM b/Source/Images/d_bp/u15/VFILER.COM deleted file mode 100644 index bfb28b3b..00000000 Binary files a/Source/Images/d_bp/u15/VFILER.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/VFILER.HLP b/Source/Images/d_bp/u15/VFILER.HLP deleted file mode 100644 index 5dc3a0c3..00000000 --- a/Source/Images/d_bp/u15/VFILER.HLP +++ /dev/null @@ -1,477 +0,0 @@ -VFILER VFILER Overview, Revision 3 -Install Installing VFILER -Commands VFILER Command Summary -DIR The DIR Form -User User Functions: 0-9 # -Tagging Tagging Commands: T U GT GU -Display File Display Commands: P V -Ops File Operations Commands: C D F GC GD GF R -Movement Movement Commands: Arrows + - J Q -Misc Miscellaneous Commands: A H N S Z ^C ? -:VFILER 3.x Overview - VFILEÒ  (foò Videï FILER)¬  deriveä froí FILER¬  waó Overview -createä   tï  givå  thå  ZCPR³  useò  á   specializeä   filå -manipulatioî  utilitù  whicè  coulä takå  advantagå  oæ  thå -speciaì  featureó  oæ  ZCPR3®  Iô performó thå  samå  basiã -functionó aó DISK7¬  CLEANUP¬  WASH¬ anä SWEEP¬ buô iô takeó -thå  ZCPR³  environmenô intï accounô anä addó  commandó  anä -featureó  whicè makå VFILEÒ morå comfortablå foò  thå  ZCPR³ -user®  VFILEÒ containó essentiallù thå samå featureó aó thå -otheò  tooló  buô addó morå ZCPR3-specifiã featureó  anä  ió -totallù   screen-oriented¬   beinç  designeä  tï  ruî  oî  á -conventionaì  CRÔ  whicè  supportó  cursoò  address¬   cleaò -screen¬ anä (optionally© eraså tï enä oæ line. - - VFILEÒ  significantlù  simplifieó thå  useò  interface® -Undeò VFILER¬  aî alphabetizeä listinç oæ fileó ió presenteä -tï thå useò alonç witè á pointer®  Thå useò employó pointeò -movemenô commandó tï movå thå pointeò up¬  down¬  right¬ anä -lefô  aó desireä untiì iô ió pointinç tï á filå oæ interest® -Oncå  pointinç tï sucè á file¬  thå useò maù theî perforí  á -numbeò oæ operationó oî thå file. - Overview - VFILEÒ ió invokeä bù á commanä linå oæ thå followinç -form: - VFILER dir:filename.typ - -wherå alì parameteró arå optional®  "DIR¢ ió thå  directorù -tï  initiallù  loç thå useò into¬  anä iô maù bå  anù  ZCPR³ -directorù reference¬  sucè aó á mnemoniã (likå "ROOT:"© oò á -DÕ  forí  (likå  "B7:¢  oò  "12:")®  "filename.typ¢  ió  aî -ambiguouó  filå  namå  whicè ió useä tï perforí  aî  initiaì -selectioî oæ thå fileó tï bå displayeä bù VFILER. - - Thå referencå foò thå ambiguouó filå namå ió storeä  iî -Systeí Filå 4¬  and¬  aó such¬ caî bå dynamicallù changeä bù -usinç  thå  SETFILÅ commanä durinç thå executioî oæ  VFILER® -Iæ  á ZCPR³ commanä likå "SETFILÅ ´ afn¢ ió  executeä  whilå -VFILEÒ  ió  running¬  theî thå definitioî oæ thió  ambiguouó -filå referencå ió changed¬ anä thå nexô timå VFILEÒ restartó -executioî thå ne÷ ambiguouó filå referencå ió iî effect¬ anä -thå fileó arå selecteä accordingly. - Overview - Thió HLÐ Filå applieó tï VFILEÒ 3.0®  VFILEÒ 3.°  wilì -onlù  ruî  undeò ZCPR³ unlesó thå Environmenô Descriptoò  ió -madå internaì tï VFILER¬  iî whicè caså VFILEÒ wilì bå  1/4Ë -larger. - - Therå  arå  somå customizatioî equateó aô thå fronô  oæ -thå  VFILER.MAà sourcå file®  Thå useò wilì  generallù  noô -carå  abouô touchinç these¬  buô theù arå availablå iæ hå sï -desires®  Feeì  freå  tï examinå  them®  Onå  sucè  equatå -enableó   oò  disableó  thå  built-iî  documentatioî  (help© -feature®  Iæ thió featurå ió disabled¬  anù helð  referencå -wilì chaiî tï thió HLÐ filå (VFILER.HLP© anä VFILER.COÍ wilì -bå abouô 1Ë shorter®  Iæ enabled¬ thå conveniencå oæ onlinå -helð whicè ió accesóed quicklù ió available. - - Enjoy using VFILER! - - Rick Conn - -:Installing VFILER - Install - Installatioî   oæ  VFILEÒ  ió  quitå  simple¬   aó   ió -installatioî  oæ  thå variouó utilitieó  undeò  ZCPR3®  Alì -VFILEÒ requireó iî thå waù oæ installatioî ió thaô á pointeò -tï  thå  ZCPR³  Environmenô Descriptoò  bå  provideä  tï  iô -(unlesó  VFILEÒ haó beeî assembleä tï contaiî aî Environmenô -Descriptor¬  iî whicè caså thå entirå Environmenô Descriptoò -is necessary). - - Z3INÓ  caî  bå useä tï instalì  VFILER®  Tï  dï  this¬ -creatå  aî INÓ filå (calì iô VF.INS© containinç thå namå  oæ -thå VFILER.COÍ filå oî onå line®  Assuminç thaô youò systeí -Environmenô  Descriptoò  filå ió nameä  SYS.ENV¬  issuå  thå -command: - - Z3INS SYS.ENV VF.INS - - VFILER is now installed. - -:VFILER Command Summary - Summary - - --- Tagging Commands -- --------- File Operations ----------- - Ô - Taç Filå à - Copù Filå Ä - Deletå File - U - Untag File F - File Size R - Rename File - G - Group Copy/Delete/FSize/Tag/Untag - - -- File Print & View -- --- User Functions --- - -- Cursor -- P - Print V - View 0-9 - Execute # - Help - ^E - ^ -- Movement Commands -- ---- Miscellaneous ---- - ^S <-+-> ^D - File Forward A - Toggle Alpha Sort - v - File Backward H - Help File Š ^X + - Screen Forward N - New DIR - - - Screen Backward S - Disk Status - -- Screen -- J - Jump tï á Filå Z - ZCPR3 Command - ^A Left Q - Refresh Screen ^C - Exit - ^F Right - - Summary - Movement Commands -- - ^E - Move Up (Wrap to Bottom) - ^X - Move Down (Wrap to Top) - ^D - Move Right (Wrap to First File of Next Line) - ^S - Move Left (Wrap to Last File of Previous Line) - ^F - Move Screen Right (Wrap to First Screen) - ^A - Move Screen Left (Wrap to Last Screen) - - Thå  user'ó Z3TCAÐ entrù maù definå fouò otheò  single- -characteò  commandó  tï  conforí tï thå arro÷  keyó  oî  hió -specifiã  terminal®  Theså commandó wilì overridå  thå  seô -describeä  abovå  iæ anù conflictó exisô (thaô is¬  iæ  youò -down-arro÷ keù generateó á ^E¬ ^Å wilì no÷ meaî Movå Dowî iî -alì cases). - - Screeî  Lefô  anä Righô makå senså wheî therå  arå  toï -manù fileó tï fiô oî onå screen®  Iî thió case¬  thå  fileó -arå  brokeî  intï screeî directories¬  anä Screeî  Lefô  anä -Righô arå useä tï movå betweeî them. -:The DIR Form - DIR Form - Thå Copy¬ Masó Copy¬ anä Logiî commandó prompô thå useò -foò thå directorù tï copù oò loç into® Thå useò maù specifù -anù accepteä ZCPR³ DIÒ forí iî responså tï this. - - Thå  ZCPR³  DIÒ  forí maù bå eitheò  á  DÕ  (Disk/User© -specificatioî  oò á directorù namå (mnemonic)®  Exampleó oæ -DIÒ formó include: - - B <-- Disk B, Current User - 7 <-- Current Disk, User 7 - B7 <-- Disk B, User 7 - wordstar <-- DU associated with the name WORDSTAR - - Iî VFILER¬  theså entrieó maù bå optionallù suffixeä bù -á  coloî (:© aó thå useò desiresº  "B7:¢ anä "B7¢ meaî  thå -samå  thing®  Iæ  á DIÒ forí ió referenceä  iî  thå  VFILEÒ -command line, it MUST be followed by a colon. - -:User Functions - User Fcts - Thå  VFILEÒ  useò  ió giveî addeä  flexibilitù  iî  hió -commanä  invocatioî capabilitù bù thå uså oæ á seô oæ  user- -definablå functions¬  whicè arå executeä bù strikinç á digiô -froí ° tï 9® Thå basiã ideá ió this: - - 1© thå useò createó á filå calleä VFILER.CMD» thió -filå containó hió extendeä commanä set - - 2©  VFILER.CMÄ ió placeä alonç thå user'ó  commanä -searcè path - - 3©  wheî  thå useò ió iî VFILEÒ anä hå  strikeó  á -digiô  oò á pounä sigî (#© foò help¬  VFILEÒ searcheó  alonç Šthå patè foò thå firsô VFILER.CMÄ filå iô findó anä extractó -thå informatioî froí it - - User Fcts - Sincå  VFILEÒ  searcheó foò VFILER.CMÄ alonç thå  path¬ -severaì VFILER.CMÄ fileó maù bå availablå foò thå user® Foò -instance¬  iæ thå patè ió $¤ -¾ A¤ -¾ A15¬  theî VFILEÒ wilì -looë iî thå currenô directory¬ disë A/currenô user¬ anä disë -A/useò 1µ foò VFILER.CMD® Á general-purposå VFILER.CMÄ filå -maù bå placeä iî A15¬  anä special-purposå VFILER.CMÄ  fileó -(sucè aó foò assembleò languagå development¬  à development¬ -worä  processing¬  etc© maù bå placeä iî selecteä useò areaó -oî A®  Foò instance¬ A· coulä contaiî Worä Staò anä ió useä -foò worä processinç anä thaô B· ió thå scratcè areá foò texô -files® Witè thió path¬ á useò editinç fileó iî B· wilì finä -WÓ iî A7¬  VFILER.CMÄ (foò worä processing© iî A7¬  anä  hió -systeí commandó iî A15. - - Anù optionó requireä foò thå commandó arå prompteä for¬ -anä  wheî  thå useò inputó valueó foò  alì  options¬  VFILEÒ -chainó  tï thå ne÷ commanä viá thå ZCPR³ Commanä Linå Buffeò -feature¬  executeó thå commanä linå generated¬  anä returns® -VFILER is a true shell under ZCPR3. - User Fcts - Thå structurå oæ VFILER.CMÄ ió quitå simple® Iô caî bå -createä  bù  anù CP/Í texô editor¬  anä iô consistó  oæ  thå -followinç typeó oæ lines: - - 1© á commanä line¬ whicè beginó witè á digiô (0-9© -anä  containó thå texô oæ thå commanä tï bå executeä  shoulä -thaô digiô bå typeä bù thå user - - 2©  á  helð block¬  whicè ió printeä wheneveò  thå -useò typeó á pounä sigî (#)» thió blocë ió denoteä bù á linå -whicè beginó witè á pounä sign¬ anä iô extendó tï thå enä oæ -thå file - - 3©  á  commenô  line¬   whicè  ió  useä  tï  embeä -explanatorù comments¬  whicè arå foò referencå purposeó onlù -anä noô seeî bù thå VFILEÒ user - - COMMAND LINE User Fcts - - Thå  commanä  linå consistó oæ á digit¬  zerï  oò  morå -spaceó (whicè arå ignored)¬ anä thå texô oæ thå commanä witè -embeddeä promptó foò useò input®  Theså promptó arå denoteä -bù  beinç  encloseä iî single- oò double-quoteó  (§  oò  ")® -Wheî  VFILEÒ  executeó theså commanä lines¬  iô  printó  thå -prompô  containeä withiî thå quoteó aó theù arå  encountereä -anä  waitó foò thå useò tï inpuô á linå oæ texô  (terminateä -bù á RETURN)¬  aô whicè poinô thå texô ió substituteä iî thå -commanä  linå wherå thå prompô is®  Iæ á prompô extendó  tï -thå  enä  oæ  á commanä line¬  iô neeä  noô  bå  terminated® -Example: - 1 copy 'Source File? ' 'Destination Dir? ' - -wilì  definå  useò functioî 1®  Thå useò ió  prompteä  witè -"Sourcå File¿  "¬  hå enteró hió text¬  iô ió substituteä iî -thå commanä line¬ hå ió prompteä foò "Destinatioî Dir¿ "¬ hå -agaiî  enteró  á  response¬   iô  ió  substituted¬  anä  thå -resultinç commanä linå ió chaineä to. - User Fcts - 1 copy 'Source File? ' 'Destination Dir? ' - -Iæ  thå useò respondó witè "myfile.txt¢ anä "C0:"¬  theî thå -commanä line - - copy myfile.txt C0: - -ió built® Notå thaô spaceó anä otheò characteró betweeî thå -promptó arå significant. - - 1 mcopy 'Dest Dir? '='Source File? ' - -will generate (to the same inputs) - - mcopy C0:=myfile.txt - - PASSED PARAMETERS User Fcts - - Threå  parameteró  maù bå passeä froí VFILEÒ  intï  thå -commanä  linå beinç generated®  Theså parameteró anä  theiò -symboló are: - - Symbol Parameter - %D Current Disk Letter - %U Current User Number (1 or 2 digits) - %F Current File Name (pted to by arrow) - %$ DU:FILENAME for Current File - - Iæ  thå  useò  musô inserô á  '%§  characteò  intï  thå -commanä  linå hå ió building¬  '%%§ placeó onå '%§ intï  thå -line® Example: - - echo Disk is %d, User is %u, File is %f - -printó (iæ thå useò ió iî A1µ anä ptinç tï MYFILE.TXT): - - Disk is A, User is 15, File is MYFILE.TXT - HELP BLOCK User Fcts - - Thå Helð Blocë iî thå VFILER.CMÄ filå ió simplù á blocë -oæ texô whicè extendó froí thå pounä sigî (#© iî thå filå tï -thå enä oæ thå file®  Thió helð informatioî ió displayeä tï -thå useò aó onå screen¬  anä iô ió thå responsibilitù oæ thå -persoî whï writeó thå VFILER.CMÄ filå tï seå thaô thió  bodù -oæ  texô  (includinç thå linå thå asterisë ió on©  doeó  noô -exceeä 2² lines® Example: - -# Help for Word Processing - - 1 - Run WordStar - 2 - Run WordMaster - 3 - Run ROFF4 - - COMMENT LINE User Fcts - - Á  commenô linå ió anù linå whicè doeó noô begiî witè á -digiô  oò  á  pounä sign®  Thå texô oæ  thaô  linå  ió  thå -comment® Iô ió noô displayeä tï thå VFILEÒ useò anä ió useä -onlù  foò  referencå tï thå persoî whï wrotå thå  VFILER.CMÄ -file® Example: - -! This is a comment -This is also a comment - - RUNNING ZEX User Fcts - - Likå  alì  standarä ZCPR³ Shells¬  VFILEÒ  ió  ablå  tï -supporô  thå executioî oæ thå thå ZEØ commanä filå processoò -oî  toð oæ itself®  Iæ ZEØ ió running¬  VFILEÒ wilì  simplù -prompô ZEØ foò inpuô ratheò thaî enterinç itó normaì screen- -orienteä displaù mode® Iî thió way¬ á commanä executeä froí -thå  VFILER.CMÄ  filå maù invokå ZEX¬  anä alì  oæ  thå  ZEØ -commanä  filå processinç wilì bå performeä beforå VFILEÒ  ió -reentered. - - SAMPLE VFILER.CMD User Fcts - -! VFILER Command File for Richard Conn -1 xdir 'XDIR Options? ' -2 protect %D%U:%F 'PROTECT Attributes? ' -3 wm %$ -4 t2a -5 echo Disk=%d User=%u File=%f DU:FILENAME = %$ -#VFILER Command File for Richard Conn - -The following VFILER Macros are provided -- - - 1 - XDIR with Options - 2 - PROTECT Current File - 3 - Edit Current File - 4 - TERM III - 5 - Echo Current File and Text - -:Tagging Commands - Tagging - Ô - Taç filå foò inclusioî foò masó copù tï anotheò  DÕ -(disk/user© area®  Filå remainó taggeä untiì eitheò á disë -log-iî  oò 'U§ ió useä tï untaç it®  Á 't§ markeò ió placeä -bù thå taggeä filenamå aó á remindeò thå filå ió taggeä  foò -masó copù oò masó delete. - - Õ  - Untaç filå previouslù taggeä foò masó  copy®  'U§ -caî  bå useä tï movå cursoò 'forward§ foò quicë untagginç oæ -files®  Logging-iî  drivå  agaiî witè 'N§ alsï  untagó  alì -files. - - Ç Ô oò Õ - Grouð (Mass© Taç oò Untag® Useò ió prompteä -foò thå operation¬  anä twï oæ hió optionó arå Ô anä U®  Iæ -eitheò  operatioî ió selected¬  tagginç oò untagginç  occuró -automaticallù  froí  thå cursoò positioî tï thå enä  oæ  thå -screeî  oî  alì fileó iî thió area®  Iæ thå useò wisheó  tï -theî seå thå accumulateä sizeó oæ thå taggeä files¬  thå Ç Æ -(Grouð Filå Size© commanä maù bå issued. - -:File Display Commands - Display - Ð - Prinô texô filå tï CP/Í lisô devicå (printer)® Anù -keypresó cancels. - - Ö  - Vie÷  texô filå oî console¬  witè  paginatioî  anä -single-linå turn-up®  ^D - v - ^X - -:Miscellaneous Commands - Misc - Á - Togglå Alphá Sort® Thió commanä reverseó thå senså -oæ thå sorô oæ thå currenô directory¬ reloadó thå directory¬ -anä refresheó thå screen¬ havinç sorteä iô iî thå ne÷ sense® -Sortinç  ió donå bù filå namå anä typå oò bù filå  typå  anä -name. - - È  - Invokeó  externaì HELÐ Information®  VFILEÒ  wilì -chaiî  tï  HELÐ anä displaù thå informatioî  iî  VFILER.HLP® -VFILEÒ  checkó  tï  seå  iæ HELÐ caî  bå  founä  alonç  patè -(externaì  iæ available¬  internaì iæ externaì patè  ió  noô -available©  anä doeó noô attempô tï chaiî iæ HELP.COÍ cannoô -bå found. - - Î - Logiî ne÷ DÕ areá foò displaù anä reseô systeí  foò -disë changes® Formaô oæ DÕ forí ió samå aó 'C§ foò copy. - - Misc - Ó  - Statuó oæ requesteä drive¬  showó  remaininç  disë -storagå   iî  kilobyteó  anä  numbeò  oæ  fileó  iî  currenô -directory. - - Ú - Ruî anù ZCPR³ Commanä Line®  Useò wilì bå prompteä -foò  commanä line¬  anä VFILEÒ wilì bå reentereä iî samå  DÕ -areá aó wheî commanä waó executed®  Commanä wilì executå iî -thå originaì DÕ area as indicated by the prompt. - - ^C - Exit to Operating System. - - ¯  oò  ¿  - Prinô Commanä Summarù  (Shorô  Helð  Info)® -VFILEÒ  maù bå assembleä tï omiô built-iî help¬  creatinç  á -VFILEÒ  whicè  ió  abouô 1Ë shorteò thaî á VFILEÒ  witè  thå -built-iî  help®  Iæ  thå built-iî helð  ió  omitted¬  theså -commandó chaiî tï thå VFILER.HLÐ filå instead. - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/VFILER.MAC b/Source/Images/d_bp/u15/VFILER.MAC deleted file mode 100644 index d0512e80..00000000 --- a/Source/Images/d_bp/u15/VFILER.MAC +++ /dev/null @@ -1,4466 +0,0 @@ - -; TITLE 'VFILER' - -; VERSION: 3.0 -; DATE: 26 June 84 -; AUTHOR: Richard Conn - -; Changes to make Version 3.4 by Richard Conn: -; Symbol CCP changed to CCPLEN (when Z3BASE.LIB was added, the -; symbol CCP in Z3BASE.LIB conflicted with this symbol in VFILER; -; how did version 3.3 ever assemble in the first place, unless someone -; has modified Z3BASE.LIB from the original format?) -; Comments on version 3.3 changes added, prefixed by - -; THE FOLLOWING MAJOR CHANGES WERE MADE BY JAY SAGE AND BOB DEMROW TO -; MAKE VERSION 3.3. The changes were built from version 3.1. - -; The following changes were contributed by Jay P. Sage and marked by -; on the lines or at the blocks changed or added: -; 1. Code modified to eliminate double loading of program, once to -; establish shell and once to run shell. Program now checks after -; shell is established to see if any commands are pending in the -; command line. If there are none, the code is run immediately -; without reloading from disk. Otherwise, pending commands are run -; first as in previous versions. -; Good idea -; 2. The disk logging command was extended to include setting of the -; file selection mask in system file name 4. This command was also -; renamed from 'N' to 'L' to be consistent with common usage in -; previous versions of VFILER and other programs. An equate is -; provided early in the code for those who want to change this. -; The response to the 'L' command is now a general ambiguous file -; specification. If it includes a directory specification, then -; that directory is logged into. Otherwise, one remains in the -; current directory. If it includes a file name specification, -; then that name is copied to system file name 4 and is used as a -; mask for file selection. Otherwise '*.*' is used automatically. -; Note that the colon must now be included to specify only a new -; directory. Since a carriage return alone cancels the command, -; '*.*' would have to be entered to stay in the currect directory -; but include all files. As a shortcut one can enter just a colon -; or semicolon. -; Fine; note that the change of the command name to 'N' was -; done in the first place to be consistent with FRIENDLY, -; the "commercial VFILER" sold by Ampro Computers; but, then -; again, if you use FRIENDLY, you probably don't use VFILER, -; so the problem of consistency may not come up -; 3. Several changes were made in the command table to allow for -; synonyms. The 'X' abort operation was deleted from the 'L' -; command but was made equivalent to control-c in the main command -; table. The functions control-a and control-f, though included in -; the help screen, had not previously been implemented. They are -; here made synonyms for '-' and '+', respectively. (The built-in -; help screen was modified to make this clear.) For ease in -; entering commands, '<' and ',' were made the same as control-s, -; and '>' and '.' were made the same as control-d. -; Fine; I debated for some time about adding synonyms, and -; had originally decided against it; let's try this change -; as-is and see how it works; however, re the addition of -; ^A and ^F as synonyms for - and +, I'm sorry I forgot to -; delete these from the Help screen -- they were intentionally -; omitted because of potential conflict with arrow keys from -; Z3TCAP -- if an arrow key generated ^A or ^F, then the ^A/^F -; movement functions were overriddent by ^A/^F arrows, so I -; decided to drop them completely and have only - and +; again, -; let's try this change for a while and see how it works out -; 4. When files are deleted with the 'D' command, notice to that -; effect is displayed on the command line at the bottom of the -; screen. -; 5. Highlighting on the 'Z80 Code' and '8080 Code' messages was -; deleted. -; Cosmetic -; 6. Rename function made to completely update file ring and display. -; This solves the problem of renamed files being out of place. -; Good idea - -; The following changes were contributed by R.I.Demrow and are marked by -; on all lines that were changed. -; 1. Replaced Z3ENV equate by MACLIB reference to Z3BASE.LIB. This -; library includes definitions for true and false, the value of -; Z3ENV, and the value of I8080 (indicates whether to use Z80 -; opcodes) -; Good idea; it is nice to have these equates carried in thru -; Z3BASE.LIB, but don't expect to find matching CRCs from one -; assembly to the next -- the COM files will differ depending -; on values in Z3BASE; I feel, tho, that the convenience of -; including Z3BASE outweighs the inconvenience of matching CRCs -; 2. Added highlighting to current file and current disk on top line -; of display. -; See comment under next change -; 3. Tagged files are now highlighted on the screen. -; There was a lot of debate during the design of FRIENDLY as -; to whether to point to a file via a pointer or via highlighting; -; the highlighting option was ruled against for the simple reason -; that pointing is very important and fundamental to the VFILER -; concept, and, on some terminals in certain kinds of lighting, -; it is nearly impossible to distinguish a highlighted file from -; one which is not highlighted; however, in this case, the file -; is highlighted AND followed by a tag character, so the best of -; both worlds is retained -; 4. Two new group functions were added: mass print and mass view. -; Not a bad idea, but I prefer using the PRINT and PAGE -; commands for these operations; note that a VFILER.CMD file -; could provide PRINT and PAGE easily without any cost inside -; of VFILER -; 5. The simulated clear-to-end-of-line function was corrected. It -; only cleared part of line before, and it had the wrong divisor in -; a modulus calculation. -; Good -; 6. Changed code to make use of TCAP information about length of -; printer page. That information was obtained in the previous code -; but was not utilized. -; Good - - -; PREVIOUS VERSIONS: 2.0 (18 Sep 83), 1.8 (17 Sep 83) -; PREVIOUS VERSIONS: 1.7 (9 Sep 83), 1.6 (18 Aug 83), 1.5 (20 July 83) -; PREVIOUS VERSIONS: 1.4 (19 July 83), 1.3 (18 July 83) -; PREVIOUS VERSIONS: 1.2 (18 July 83), 1.1 (17 July 83), 1.0 (16 July 83) -; DERIVATION: From FILER (Version 1.6) by Richard Conn -; FILER from DISK7, Version 7.6C, by Frank Gaude' - - -VERS EQU 34 ; Version Number - ; version number - - MACLIB Z3BASE.LIB ; USE LIB TO GET Z3ENV, I8080, FALSE, - ; and TRUE - -; VFILER is copyright (c) 1983, 1984, 1985 by Richard Conn -; All Rights Reserved -; VFILER may be used freely by the ZCPR3 Community - -; VFILER is a screen-oriented, ZCPR3-specific file utility. It can not be -; installed to run under conventional CP/M. VFILER -; extensively employs cursor addressing to position a pointer on the -; screen, allow the user to manipulate the pointer (up, down, right, left, -; next screen, previous screen, GOTO file). The pointer points to files -; in the current user directory and displays the user's position dynamically -; on the screen. Once pointing to a file, user commands can be used to -; manipulate the file (delete, copy, view on console, print on printer, tag -; for later copy or delete, and untag). In the way of being ZCPR3-specific, -; VFILER can chain to external programs via the MCL and then return (ala -; MENU), and it recognizes Named Directories (so the user can log into B:, B4:, -; and MYDIR:, for example). - -; VFILER is installed by Z3INS. - -; VFILER works with ZCPR3 only, with 32k or more of RAM. File copy -; functions are faster with large amounts of RAM. - -; VFILER can be assembled for use with a Z80 or 8080 microprocessor. - - -; SYSLIB, Z3LIB, and VLIB References -; - ext z3vinit,cls,gotoxy,ereol,envptr,getcrt,getprt,vprint - ext z3log,retud - ext fi0$open,f0$get,dutdir,fi0$close - ext sksp,putcl,getmdisk - ext cin,cout,caps,lout,crlf,lcrlf,pafdc,phlfdc - ext pfind,dnscan - ext getsh,getcl1,qshell,shpush,getzrun,putzex,putcst - ext getefcb,shpop,getsh2,getfn2,getshm,putshm - ext codend - ext stndout,stndend,getcl2,zprsfn ; -; -; Basic Definitions -; - -DIM EQU 1 ;GOTO DIM -BRIGHT EQU 2 ;GOTO BRIGHT - -; -; User-Customized Definition -; -VFNAME MACRO ;;Name of VFILER - DB 'VFILER' - ENDM -VFNFILL MACRO ;;Spaces to fill out name to 8 chars - DB ' ' - ENDM -; -Z80 EQU NOT I8080 ; from Z3BASE.LIB -BIHELP EQU TRUE ;TRUE to provide built-in help info -WARMBOOT EQU FALSE ;set TRUE to warmboot on exit -DEFALPHA EQU TRUE ;set TRUE to alpha by name and type, FALSE for - ; ... type and name by default -EPS EQU 18*4 ;N lines x 4 cols per screen - ; EPS = Entries Per Screen -TAGCH EQU '#' ;character used to mark tagged files -DIRCMD EQU 'L' ;command used to log new dir -- be sure it - ;does not conflict with other commands -- used - ;to be 'N' for new (I prefer 'L' for log) - -; -; Command Line Builder Constants -; -FPESC EQU '%' ;escape char -FPDISK EQU 'D' ;disk only (D) -FPUSER EQU 'U' ;user only (U) -FPFILE EQU 'F' ;file name only -MNOTE EQU '#' ;denotes comment area in macro file -UIN1 EQU 27H ;single quote for user input -UIN2 EQU 22H ;double quote for user input - -; -; Cursor Positioning Addresses -; -EPSLINE EQU (EPS/4)+4 ;position of last line of EPS -BANADR EQU 1*256+24 ;banner address -CURHOME EQU 3*256+1 ;home address of cursor -BOTADR EQU 24*256+1 ;bottom of screen -CPMADR EQU EPSLINE*256+1 ;command prompt message -CPADR EQU EPSLINE*256+22 ;command prompt -ERADR EQU (EPSLINE+1)*256+15 ;error message -FSADR EQU ERADR ;file size message -FNADR EQU 1*256+62 ;address of current file name -DUADR EQU 1*256+4 ;address of current DU - -; -; System Functions -; -RDCON EQU 1 -WRCON EQU 2 -PUNCH EQU 4 -LIST EQU 5 -DIRCON EQU 6 -RDBUF EQU 10 -CONST EQU 11 -RESETDK EQU 13 -LOGIN EQU 14 -OPEN EQU 15 -CLOSE EQU 16 -SRCHF EQU 17 -SRCHN EQU 18 -ERASE EQU 19 -READ EQU 20 -WRITE EQU 21 -MAKE EQU 22 -REN EQU 23 -INQDISK EQU 25 -SETDMA EQU 26 -INQALC EQU 27 -ATTR EQU 30 -GETPARM EQU 31 -SGUSER EQU 32 -COMPSZ EQU 35 - -; -; System Addresses -; -OS$BASE EQU 000H ;system base.. -CCPLEN EQU 800H ;..and 'ccp' length in bytes. - ; Changed name from CCP to CCPLEN -GET EQU 0FFH ;get user area e-reg value -BDOS EQU OS$BASE+05H -FCB EQU OS$BASE+5CH -FCBEXT EQU FCB+12 -FCBRNO EQU FCB+32 -FCB2 EQU OS$BASE+6CH -TBUF EQU OS$BASE+80H -TPA EQU OS$BASE+100H - -; -; ASCII Definitions -; -CTRLA EQU 'A'-'@' ; -CTRLC EQU 'C'-'@' ;..control-C.. -CTRLD EQU 'D'-'@' -CTRLE EQU 'E'-'@' -CTRLF EQU 'F'-'@' ; -CTRLR EQU 'R'-'@' -CTRLS EQU 'S'-'@' ;..XOFF.. -CTRLX EQU 'X'-'@' -BS EQU 08H ;..backspace.. -TAB EQU 09H ;..tab.. -LF EQU 0AH ;..linefeed.. -FF EQU 0CH ;..formfeed.. -CR EQU 0DH ;..carriage return.. -CAN EQU 18H ;..cancel.. -EOFCHAR EQU 1AH ;..end-of-file.. -CTRLZ EQU 1AH ;..clear screen.. -ESC EQU 1BH ;..and escape character. - -; -; MACROS TO PROVIDE Z80 EXTENSIONS -; MACROS INCLUDE: -; -; BR - JUMP RELATIVE -; BRC - JUMP RELATIVE IF CARRY -; BRNC - JUMP RELATIVE IF NO CARRY -; BRZ - JUMP RELATIVE IF ZERO -; BRNZ - JUMP RELATIVE IF NO ZERO -; BJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO -; -BR MACRO ?N ;;JUMP RELATIVE - IF Z80 - .z80 - jr ?N - .8080 - ELSE - jmp ?N - ENDIF - ENDM -; -BRC MACRO ?N ;;JUMP RELATIVE ON CARRY - IF Z80 - .z80 - jr c,?N - .8080 - ELSE - jc ?N - ENDIF - ENDM -; -BRNC MACRO ?N ;;JUMP RELATIVE ON NO CARRY - IF Z80 - .z80 - jr nc,?N - .8080 - ELSE - jnc ?N - ENDIF - ENDM -; -BRZ MACRO ?N ;;JUMP RELATIVE ON ZERO - IF Z80 - .z80 - jr z,?N - .8080 - ELSE - jz ?N - ENDIF - ENDM -; -BRNZ MACRO ?N ;;JUMP RELATIVE ON NO ZERO - IF Z80 - .z80 - jr nz,?N - .8080 - ELSE - jnz ?N - ENDIF - ENDM -; -BJNZ MACRO ?N ;;DECREMENT B AND JUMP RELATIVE ON NO ZERO - IF Z80 - .z80 - djnz ?N - .8080 - ELSE - dcr b - jnz ?N - ENDIF - ENDM -; -; END OF Z80 MACRO EXTENSIONS -; - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; -; MACLIB Z3BASE ; already included above - MACLIB SYSENV -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; Once Environment is Initialized, One of Three Major Functions -; will be Performed: -; 1. VFILER will be installed as a Shell if invoked explicitly -; by user command -; 2. The VFILER Function will be performed if VFILER is invoked -; by ZCPR3 as a Shell and ZEX is not Running -; 3. A Command Line will be Input by VFILER from ZEX and Passed -; on to ZCPR3 without Processing -; - call z3vinit ;initialize the ZCPR3 Env and the VLIB Env -; -; Set Opsys Stack Pointer -; - if not WARMBOOT - lxi h,0 ;clear hl-pair then.. - dad sp ;..add stack address. - shld stack - endif ;not warmboot - -; -; Check to see if VFILER was executed as a shell -; - call qshell ;get and test message from ZCPR3 - jz runsh ;execute shell procedures -; -; Initialize VFILER as a Shell -; - call shtest1 ;there must be a shell stack - call shtest2 ;there must be a command line buffer -; -; FUNCTION 1: Set Up VFILER as a Shell -; Run Shell Via Exit to Opsys -; - call getefcb ;determine name of program - brz shgo1 ;name not given, so use default - inx h ;pt to name - lxi d,filercmd ;define name of program - mvi b,8 - call moveb ;copy name -shgo1: - call idu ;set initial disk/user - lxi h,filercmd ;establish shell - call shpush ;push onto shell stack - brnz shgo2 ;error? - - call filsel ;select file mask -; -; Print Done Message -; - call vprint - db ' Shell Installed',cr,lf,0 - mvi b,0 ;shell message 0 - mvi a,0 ;no wait - call putshm ;set shell message - - ;changes made by -; jmp chain2 ;set IDU into command line and go - call chain2 ;set IDU into command line - call getcl2 ;see if any more commands on line - ora a - brz runsh ;if none, run shell immediately - jmp os$ccp1 ;else return to opsys - -; -; Establish File Selection (made into subroutine ) -; -filsel: - call getfn2 ;setup file name - lxi d,11*3 ;use 4th system file - dad d - lxi d,fcb+1 ;pt to FCB - xchg - mvi b,11 ;copy 11 chars - call moveb - lxi h,joker ;make wild if FCB is empty - mvi b,11 ;11 chars - ldax d ;check first char - cpi ' ' - cz moveb - ret -; -; Error in Shell Stack Installation -; -shgo2: - cpi 2 ;shell stack full - brnz shgo3 - call vprint - db ' Shell Stack Full',0 - ret -shgo3: - call vprint - db ' Shell Entry Size',0 - ret - -; -; VFILER was invoked as a Shell -; Check for ZEX Input in Progress -; -runsh: - call getzrun ;check ZEX message byte - jnz zexrun ;process ZEX command line if ZEX running -; -; FUNCTION 2: Run VFILER and Perform Main Function -; - mvi a,0 ;set no shell message - call putcst - call setup ;init buffers and pointers - call stackset ;setup stack -; -; Process Initial Help if Available and Requested -; - if BIHELP ;built-in help available? - lda fcb+1 ;check for initial help - cpi '/' - brnz runsh1 - call helpmsg ;print help message - call sak ;strike any key to continue - br runsh2 -runsh1: - endif ;BIHELP -; -; Check for Delay Before Resuming VFILER and Delay if Set -; - mvi b,0 - call getshm ;get shell message 0 - ani 80h ;check MSB - cnz sak ;pause for input -; -; Begin VFILER Processing -; -runsh2: - call stackset ;reset stack - call fload ;load files - push psw - call setscr ;set up screen display variables - pop psw - brnz runsh4 ;continue if OK -; -; Entry Point to Log Into New Dir and Resume -; -runsh3: - call logdir ;error - log into another dir - br runsh2 -; -; Entry Point for Command Processing -; Display Screen and Input/Process Command -; -runsh4: - call stackset ;reset stack - call refresh ;refresh screen display -; -; Display Current File and Input/Process Command -; -loopfn: - call loopfn1 ;print current file name -; -; Input/Process Command -; -loop: - call stackset ;reset stack - call loopfn2 ;get command from user - call loopfn3 ;process command in A - br loop ;continue -; -; Set Stack Pointer -; -stackset: - pop d ;get return address - lhld crctbl ;top of stack - sphl ;start local stack - push d ;return address on new stack - ret -; -; Check for Presence of Shell Stack -; -shtest1: - call getsh ;get shell stack data - rnz - pop psw ;clear stack - call vprint - db 'No Shell Stack',0 - ret - -; -; Check for Command Line -; -shtest2: - call getcl1 ;get command line data - rnz - pop psw ;clear stack - call vprint - db 'No Cmd Line',0 - ret - -; -; FUNCTION 3: Run ZEX on Top of VFILER -; Accept Command Line and Pass it to ZCPR3 -; -zexrun: - call vprint ;print prompt - db 'VFILER> ',0 - mvi a,1 ;tell ZEX that it is prompted - call putzex - call getcl1 ;pt to command line buffer - mov a,l ;set ptr to first char - adi 4 - mov c,a - mov a,h - aci 0 - mov b,a ;BC pts to first char - mov m,c ;store low - inx h - mov m,b ;store high - inx h ;pt to char count - xchg ;... in DE - mvi c,rdbuf ;input line via BDOS - push d ;save ptr - call bdos - pop h ;pt to char count - inx h - mov e,m ;get char count - inx h ;pt to first char - push h ;save ptr - mvi d,0 ;DE=char count - dad d - xra a ;A=0 - mov m,a ;store ending 0 - pop h ;pt to first char - call putzex ;resume ZEX (A=0) - call putcst ;set command status to normal (A=0) - ret ;return to opsys - -; -;************************************************** -; -; CRT Routine for VFILER -; -VCLS: - CALL CLS ;try to clear the screen - RNZ ;OK if done - PUSH H ;save regs - PUSH B - CALL GETCRT ;get CRT Data - INX H ;get number of lines on screen - MOV B,M ;B=number of lines -VCLS1: - CALL CRLF ;new line - BJNZ VCLS1 - POP B ;restore regs - POP H - RET -; -; EREOL Routine for VFILER -; -VEREOL: - CALL EREOL ;try to erase to EOL - RNZ ;OK if done - PUSH B ;save count - MVI A,' ' ;space out - CALL VEREOL1 ;send B spaces - POP B ;get count - MVI A,BS ;backspace in -VEREOL1: - CALL COUT ;send char - BJNZ VEREOL1 ;count down - RET -; -; Setup Screen Display Variables -; -SETSCR: - LXI H,CURHOME ;set cursor home - SHLD CURAT - LHLD RING ;set ring position -; -; Entry to Reset Ring Position at HL -; -SETSCR1: - SHLD RINGPOS -; -; Entry to Reset Local Ring Position at HL -; -SETSCR2: - SHLD LOCBEG ;front of ring - LXI D,EPS*13 ;new end? - DAD D - XCHG - LHLD RINGEND ;end of ring - XCHG - CALL CMPDEHL - BRC SETSCR3 - XCHG -SETSCR3: - XCHG - SHLD LOCEND - RET - -; -; Display file name of current file -; -LOOPFN1: - LXI H,FNADR ;position cursor for file name print - CALL GOTOXY - LHLD RINGPOS ;pt to current file name - INX H ;pt to first char -; JMP PRFN ;print file name - CALL STNDOUT ; turn on highlighting - CALL PRFN ; print file name - CALL STNDEND ; turnoff highlighting; - RET ; -; Get command from user and clear error line if any -; -LOOPFN2: - CALL ATCMD ;position at command prompt - CALL DKEYIN ;wait for character from keyboard - PUSH PSW ;save command - LDA ERMFLG ;error message? - ORA A ;0=no - CNZ ERCLR ;erase old error message - POP PSW ;get command - RET -; -; Process Command -; -LOOPFN3: - CPI MNOTE ;command summary - BRZ CPROCM - CPI '0' ;macro? - BRC CPROC0 - CPI '9'+1 ;macro? - BRNC CPROC0 -CPROCM: - CALL CMACRO ;process macro command - MOV B,A ;save command - CALL ERMSG - DB 'No U Fct ',0 - MOV A,B ;get macro digit - JMP COUT ;return for loop processing -CPROC0: - CALL CTPROC ;process command or return if not found - CALL ERMSG - DB 'Invld Cmd: ',0 - MOV A,B ;get char - CPI ' ' ;expand if less than space - BRNC CPROC1 - MVI A,'^' ;control - CALL COUT - MOV A,B ;get byte - ADI '@' ;convert to letter -CPROC1: - JMP COUT ;return for loop processing - -; -; SET UP BUFFERS -; -SETUP: - CALL RETUD ;get home DU - MOV A,B - STA H$DR ;home drive - MOV A,C - STA H$U$A ;home user area - CALL CODEND ;start of free space - LXI D,100H ;256 bytes/unit - DAD D - SHLD CRCTBL ;table for CRC list et al - DAD D - DAD D ;allow 512 bytes - SHLD CMDBUF ;command line buffer - MVI M,64 ;64 bytes in line - LXI D,70 ;arbitrary beyond EOL - DAD D - SHLD DUM$FCB ;dummy FCB - INR H - MVI L,0 ;next page - SHLD BUFENTRY ;free space to end of TPA - -; -; Set CRT/Printer Data -; - CALL GETCRT ;CRT DATA - MOV A,M - STA CWIDTH ;WIDTH - INX H - MOV B,M - INX H - MOV A,M - STA CTPP ;TEXT - MOV C,A - MOV A,B ;TOTAL NUMBER OF LINES - SUB C - DCR A ;1 LESS - STA CSPP ;LINES TO SKIP - CALL GETPRT ;PRINTER DATA - MOV A,M - STA LWIDTH ;WIDTH - INX H - MOV B,M - INX H - MOV A,M - STA LTPP ;TEXT - MOV C,A - MOV A,B ;TOTAL NUMBER OF LINES - SUB C - STA LSPP ;LINES TO SKIP - INX H - MOV A,M - STA LFFEED ;CAN FORM FEED? - -; -; Begin Further Inits -; - XRA A - STA HELPDISP ;no help display yet -; - MVI A,DEFALPHA ;alpha by name and type - STA ALPHA -; - LHLD ENVPTR ;pt to ZCPR3 Env Desc - LXI D,80H+10H ;pt to cursor commands - DAD D - LXI D,CTABLE ;pt to area - MVI B,4 ;4 commands -CURINIT: - MOV A,M ;get command - STAX D ;put it - INX H ;pt to next - INX D - INX D - INX D - BJNZ CURINIT -; - CALL IDU ;set initial disk/user - CALL LOGRDU ;log into it -; - LHLD BUFENTRY ;base address - SHLD RING ;beginning of ring -; - LXI H,CURHOME ;home address for cursor - SHLD CURAT -; - CALL GETMDISK ;get max disk number (1-N) - ADI '@' ;convert to ASCII (A-P) - STA MAXDR ;set letter -; - RET - -; set initial disk/user -IDU: - LXI D,FCB ;log into DU specification - CALL Z3LOG ;perform login -IDU1: - CALL RETUD ;get current DU in BC - MOV A,C ;get current user - CALL IDU$USET ;set it - MOV A,B ;get current disk - CALL IDU$DSET ;set it - RET -IDU$USET: - STA C$U$A ;..store as current and.. - STA O$USR ;..as original for exit. - STA R$U$A ;..requested user area - RET -IDU$DSET: - STA C$DR - STA R$DR ;requested disk - RET - -; check for existance of file whose first 12 FCB bytes are pted to by DE -; return with A=0 if not found, A=0FFH if found - -FILECHK: - LXI H,S$FCB ;copy into FCB - XCHG - MVI B,12 ;12 bytes - CALL MOVE ;copied into S$FCB - XCHG ;HL pts to FCB - CALL INITFCB ;init FCB - LXI D,S$FCB ;pt to FCB - JMP FFIND - -; -; Select drive and user area (system reset for disk change on-the-fly) -; -; -LOGDIR: - CALL CPRMPT ;prompt to get drive/user selection - DB 'Login DIR (and file mask): ',0 - CALL DEFSPEC ;define full file specification -LOG1: - CALL LOGRDU ;set current and log in - JMP CRLF ;new line and exit - -; -; Actually log into DU requested -; -LOGRDU: - LDA R$DR ;make requested disk current - STA C$DR - CALL RESET ;reset disk system - LDA R$U$A ;establish requested area.. - STA C$U$A ;..as current area. - CALL SET$USR - LXI H,0 ;initialize tagged.. - SHLD TAG$TOT ;..file size accumulator. - RET - -; -; Define file specification -; (comes before DEF$D$U and includes preparing to change system file 4 for new -; mask) -; -DEFSPEC: - CALL RDSPEC ;get user input - CALL TOKEN1 ;position HL to first token and test for end - JZ LOOP ;if no entry, loop back for another command - LXI D,FCB ;use default FCB - CALL ZPRSFN ;parse the filespec into FCB - CALL FILSEL ;copy filespec into system file 4 - CALL TOKEN1 ;back to first token - XRA A ;scan for DIR before DU - CALL DNSCAN ;scan again to get drive and user values - BRNZ DEFDU2 ;if found, enter new values - RET ;otherwise, just return - -; -; Define current drive and user area -; many modifications -; -DEF$D$U: - CALL RDSPEC ;read DU and filespec - CALL TOKEN1 ;position HL to first token - JZ LOOP - - ;delete this redundant test -; -; MOV A,M ;check for exit -; CALL CAPS -; CPI 'X' -; BRNZ DEFDU1 -; INX H ;check for space or EOL -; MOV A,M -; DCX H -; ANI 7FH ;mask MSB -; CPI ' '+1 -; JC OS$CCP ;abort -;DEFDU1: - - XRA A ;A=0 to scan for DIR before DU - CALL DNSCAN ;look for DU or DIR form and return DU - BRZ ERRET ;error -DEFDU2: - MOV A,B ;return disk and user - STA R$DR - INR A ;set FCB - STA FCB - MOV A,C - STA R$U$A - RET -; -; position to first token and set flag to show end of buffer -; -TOKEN1: - LHLD CMDBUF ;pt to possible drive - INX H - INX H - CALL SKSP ;skip over leading spaces and return - MOV A,M ;check for no input - ORA A - RET -; -; reads line of input from user -- pulled out as subroutine -; -RDSPEC: - LHLD CMDBUF ;pt to command line buffer - INX H - INX H - MVI B,20 ; # of blanks to.. - CALL FILL ;..clear 'cmdbuf'. - LHLD CMDBUF ;get DU selection from.. - XCHG - MVI C,RDBUF ;..console buffer read. - CALL BDOS - JMP CONVERT ;make sure alpha is upper case and return -; -; Error return and recovery from command cancellation -; -ERRET: - CALL ERMSG - DB 'DIR Entry Error',0 - JMP LOOP -COMCAN: - LDA CANFLG ;check for nature of abort - ORA A ;..from.. - JZ RUNSH2 ;no file found, so run the shell again - JMP RUNSH4 ;..error/command abort. -; -; find file along path (file FCB pted to by DE) -; on return, A=0FFH if found, A=0 if not found, and flags set -; -FFIND: - MVI A,0FFH ;look in current dir also - JMP PFIND ;path search from Z3LIB -; log in default directory -DLOGIN: - LDA C$DR ;disk in B - MOV B,A - LDA C$U$A ;user in C - MOV C,A ;fall thru to SLOGIN -; log in DU in BC -SLOGIN: - PUSH H ;save regs - PUSH D - PUSH B - MOV A,C ;set user - CALL SET$USR - POP B - MOV A,B ;set disk - CALL SET$DR - POP D ;restore regs - POP H - RET - -; e x i t - -; return to ccp - -; -; Entry point for VFILER exit -; -OS$CCP: - CALL SHPOP ;clear shell stack -; -; Entry point for command line exec -; -OS$CCP1: - LDA O$USR ;get and set original.. - CALL SET$USR ;..user area and.. - LXI D,TBUF ;..tidy up.. - MVI C,SETDMA ;..before going home. - CALL BDOS - - IF WARMBOOT - JMP OS$BASE - ENDIF ;warmboot - - IF NOT WARMBOOT - LHLD STACK ;put pointer.. - SPHL ;..back to 'sp'. - RET ;return to ccp - NOP ; to try jump to start - NOP - - ENDIF ;not warmboot - -; -; FLOAD loads the files into the buffer, setting up the ring -; Return with NZ if load OK, Z if no files loaded -; -FLOAD: - CALL FRESTOR ;get bytes remaining on drive (decode default) -; -; Set up file name from System File 4 -; Select all files if no entry in System File 4 -; - CALL GETFN2 ;pt to first system file name - LXI D,11*3 ;pt to 4th file name - DAD D - LXI D,FCB+1 ;pt to FCB - MVI B,11 ;11 bytes - CALL MOVEB - LXI H,JOKER ;..treat as '*.*' with 'joker'.. - MVI B,11 ; # of characters to move - LDAX D ;get first char of file name - CPI ' ' ;if space, fill with *.* - CZ MOVEB ;set field to *.* - LDAX D ;get first char of file name - CPI '/' ;if opt, fill with *.* - CZ MOVEB -; -; Build ring with filename positioned in default FCB area -; - MVI C,SETDMA ;initialize dma address.. - LXI D,TBUF ;..to default buffer. - CALL BDOS - XRA A ;clear search 'fcb'.. - STA FCBEXT ;extent byte.. - STA FCBRNO ;..and record number. - LXI D,FCB ;default FCB for search - CMA - STA CANFLG ;make cancel flag true - MVI C,SRCHF ;..of first occurrence. - CALL BDOS - INR A ; 0ffh --> 00h if no file found - BRNZ SETRING ;if found, branch and build ring. - STA CANFLG ;make log-cancel toggle false (0) - CALL ERMSG ;else say none found, fall thru to log. - DB 'No File Found',0 - XRA A ;Set Error Code - RET - -; establish ring (circular list) of filenames - -SETRING: - LHLD RING ;initialize ring pointer - SHLD RINGPOS ;start --> current position of ring - -; put each found name in ring. a-reg --> offset into 'tbuf' name storage - -TO$RING: - DCR A ;un-do 'inr' from above and below - ADD A ;times 32 --> position index - ADD A - ADD A - ADD A - ADD A - ADI TBUF ;add page offset and.. - MOV L,A ;..put address into.. - MVI H,0 ;..hl-pair. - LDA FCB ;get drive/user designator and.. - MOV M,A ;..put into 'fcb' buffer. - XCHG - LHLD RINGPOS ;pointer to current load point in ring - XCHG - MVI B,12 ;move drive designator and name to ring - CALL MOVE - XCHG ;de-pair contains next load point address - MVI M,' ' ;space for potential.. - INX H ;..tagging of files for mass copy. - SHLD RINGPOS ;store and search.. - MVI C,SRCHN ;..for next occurrence. - LXI D,FCB ;filename address field - CALL BDOS - INR A ;if all done, 0ffh --> 00h. - BRNZ TO$RING ;if not, put next name into ring. -; -; All filenames in ring -- setup ring size and copy-buffer start point -; - LHLD RINGPOS ;next load point of ring is start of buffer - SHLD RINGEND ;set ring end.. - SHLD BUFSTART ;..and copy-buffer start. - PUSH H - LHLD RING - LXI D,13 ;compare 'ringend' (tab base+13) - DAD D - XCHG - POP H - CALL CMPDEHL - BRNZ SORT ;sort if more than one file in ring - XRA A ;set NZ for Return - DCR A - RET -; -; Sort ring of filenames -; -SORT: - LHLD RING ;initialize 'i' sort variable and.. - SHLD RINGI - LXI D,13 ;..also 'j' variable. - DAD D - SHLD RINGJ -SORTLP: - LHLD RINGJ ;compare names 'i & j' - XCHG - LHLD RINGI - PUSH H ;save position pointers.. - PUSH D ;..for potential swap. - LDA ALPHA ;check for type of alphabetization - ORA A ;if Zero, alpha by type and name - JZ SORTTN - -; sort by file name and type - MVI B,12 ; # of characters to compare - CALL CMPSTR ;do comparison - BR NOCMP ;final test - -; sort by file type and name -SORTTN: - PUSH H ;save ptrs - PUSH D - LXI B,9 ;pt to type - DAD B - XCHG - DAD B - XCHG - MVI B,3 ;3 chars in file type - CALL CMPSTR ;compare type - POP D ;get ptrs - POP H - BRNZ NOCMP ;final test - PUSH H - PUSH D - MVI B,8 ;8 chars in file name - INX H ;pt to first - INX D - CALL CMPSTR ;compare name - POP D ;get ptrs - POP H - BRNZ NOCMP ;final test - LDAX D ;final compare and fall thru - CMP M - -; final test for swapping purposes -NOCMP: - POP D - POP H - MVI B,13 - BRNC NOSWAP -; -; Swap if 'j' string larger than 'i' -; -SWAP: - MOV C,M ;get character from one string.. - LDAX D ;..and one from other string. - MOV M,A ;second into first - MOV A,C ;first into second - STAX D - INX H ;bump swap pointers - INX D - BJNZ SWAP -NOSWAP: - LHLD RINGJ ;increment 'j' pointer - LXI D,13 - DAD D - SHLD RINGJ - XCHG ;see if end of 'j' loop - LHLD RINGEND - CALL CMPDEHL - JNZ SORTLP ;no, so more 'j' looping. - LHLD RINGI ;bump 'i' pointer - LXI D,13 - DAD D - SHLD RINGI - DAD D ;set start over 'j' pointer - SHLD RINGJ - XCHG ;see if end of 'i' loop - LHLD RINGEND - CALL CMPDEHL - JNZ SORTLP ;must be more 'i' loop to do -; -; Sort done -- initialize tables for fast crc calculations -; - CALL INITCRC -; -; Calculate buffer maximum available record capacity -; -B$SIZE: - LXI B,0 ;count records - LHLD BDOS+1 ;get 'bdos' entry (fbase) - - IF NOT WARMBOOT - LXI D,-(CCPLEN) - DAD D - ENDIF ;not warmboot - - DCX H - XCHG ;de-pair --> highest address of buffer - LHLD BUFSTART ;start address of buffer (end of ring list) -B$SIZE2: - INX B ;increase record count by one - PUSH D - LXI D,128 ; 128-byte record - DAD D ;buffer address + record size - POP D - CALL CMPDEHL ;compare for all done - BRNC B$SIZE2 ;more will fit? - DCX B ;set maximum record count less one - MOV A,B ;memory available for copy? - ORA C - BRNZ B$SIZE3 ;yes, buffer memory space available. - CALL ERMSG - DB 'No Room',0 - XRA A ;Error code - RET -B$SIZE3: - MOV L,C ;store.. - MOV H,B ;..maximum.. - SHLD REC$MAX ;..record count. - XRA A ;return NZ for OK - DCR A - RET -; -; left to right compare of two strings (de-pair points to 'a' string; -; hl-pair, to 'b'; b-reg contains string length.) -; -CMPSTR: - LDAX D ;get an 'a' string character and.. - CMP M ;..check against 'b' string character. - RNZ ;if not equal, set flag. - INX H ;bump compare.. - INX D ;..pointers and.. - DCR B ; (if compare, set as equal.) - BRNZ CMPSTR ;..do next character. - RET -; -; COMMAND: MACRO (0-9) -; Process macro command -; -CMACRO: - PUSH PSW ;save digit - LXI H,MACFCB ;set up name of macro file - LXI D,S$FCB - PUSH D - MVI B,12 ;12 chars - CALL MOVE - XCHG - CALL INITFCB ;init FCB - POP D ;pt to FCB - CALL FFIND ;search along path for file - BRNZ CMFOUND ;file found - POP PSW ;clear stack - POP D ;clear ret address - CALL ERMSG - DB 'File ',0 - LXI H,MACFCB+1 - CALL PRFN ;print file name - CALL VPRINT - DB ' NOT Found',0 - JMP LOOP -; found macro file -CMFOUND: - CALL SLOGIN ;log in - CALL FI0$CLOSE ; CLOSE FILE IF ALREADY OPEN - LXI D,S$FCB ;pt to FCB - CALL FI0$OPEN ;open for byte-oriented input - POP PSW ;get command - MOV C,A ;... in C -; new line -CMFL1: - CALL F0$GET ;get first char of line - JNZ CMFLERR ;EOF encountered - CMP C ;match? - BRZ CMFL3 -; skip out line -CMFL2: - CALL F0$GET ;skip out line - JNZ CMFLERR - CPI LF ;EOL? - BRNZ CMFL2 - BR CMFL1 -; found command -CMFL3: - MVI A,MNOTE ;macro note? - CMP C - JZ CMFLNOTE - PUSH D - LHLD CRCTBL ;buffer for command line - LXI D,256 ;+256 - DAD D - POP D -; skip leading blanks in command line -CMFL4: - CALL F0$GET ;get next char - BRNZ CMFL6 ;mark end of buffer and go - CPI ' ' ;skip leading blanks - BRZ CMFL4 -; load command line into buffer -CMFL5: - ANI 7FH ;mask char - CPI CR ;EOL? - BRZ CMFL6 - CPI CTRLZ ;EOF? - BRZ CMFL6 - CPI FPESC ;file pted to? - JZ CMFLIF - CPI UIN1 ;user input? - BRZ CMFL5A - CPI UIN2 - BRZ CMFL5A -CMFL50: - MOV M,A ;store char - INX H ;pt to next -CMFL51: - CALL F0$GET ;get next char - BRZ CMFL5 - BR CMFL6 - -; print prompt to user and get input -CMFL5A: - PUSH H ;save buffer ptr - CALL CPRMPT ;at command prompt line - DB 0 -CMFL5B: - CALL F0$GET ;get next char - BRNZ CMFL5B1 - ANI 7FH ;mask - CPI UIN1 ;end of prompt? - BRZ CMFL5C - CPI UIN2 - BRZ CMFL5C - CPI CR ;end of prompt? - BRZ CMFL5C - CPI CTRLZ ;eof? - BRZ CMFL5C - CALL COUT ;send char - BR CMFL5B -CMFL5B1: - MVI A,CTRLZ ;eof -CMFL5C: - PUSH PSW ;save offending char - LHLD BUFSTART ;pt to buffer - MVI M,128 ;128 char in line - INX H ;set no chars - MVI M,0 - DCX H ;pt to count - XCHG - MVI C,RDBUF ;get line from user - CALL BDOS - LHLD BUFSTART - INX H ;pt to count - MOV A,M ;get count - INX H ;pt to first char - PUSH H ;save ptr - ADD L - MOV L,A - MOV A,H - ACI 0 - MOV H,A ;HL pts to after last char - MVI M,0 ;store ending zero - POP H ;HL pts to first char of line - POP PSW ;get char - POP D ;DE pts to next char in buffer - MOV B,A ;char in B -CMFL5D: - MOV A,M ;copy chars - ORA A ;zero=done - BRZ CMFL5E - STAX D ;put char - INX H ;pt to next - INX D - BR CMFL5D -CMFL5E: - XCHG ;HL pts to next char in buffer - MOV A,B ;check offending char - CPI UIN1 ;user input? - BRZ CMFL51 - CPI UIN2 - BRNZ CMFL5 - BR CMFL51 -; complete buffer and test for content -CMFL6: - MVI M,0 ;store ending 0 - PUSH D - LHLD CRCTBL ;pt to first char in line - LXI D,256 - DAD D - POP D - MOV A,M ;get first char - ORA A ;empty? - BRNZ CMFL7 -; error return -CMFLERR: - PUSH B - CALL DLOGIN ;return home - POP B - MOV A,C ;invalid command - RET -; try to chain -CMFL7: - PUSH H ;save ptr - CALL DLOGIN ;return home - POP H - CALL CHAIN ;chain to command line pted to by HL - JMP LOOP - -; print documentation built into the macro file -CMFLNOTE: - CALL VCLS ;new screen - MVI C,0 ;set tab counter -CMFLN1: - CALL F0$GET ;get next char - BRNZ CMFLN4 ;done - ANI 7FH ;mask - CPI CTRLZ ;eof=done - BRZ CMFLN4 - CPI TAB ;tab process - BRZ CMFLN2 - CALL COUT ;print char - CPI CR ;new line? - BRZ CMFLN3 - INR C ;new pos - CPI LF - BRNZ CMFLN1 - DCR C ;back up position count - BR CMFLN1 -CMFLN2: - MVI A,' ' ;space over for tab - CALL COUT - INR C ;incr position - MOV A,C ;done? - ANI 7 ;every 8 - BRNZ CMFLN2 - BR CMFLN1 -CMFLN3: - MVI C,0 ;bol for CR - BR CMFLN1 -CMFLN4: - CALL DLOGIN ; RETURN HOME - LHLD RINGPOS ;print current file - INX H - CALL PRFN - CALL VPRINT - DB ' Enter Digit or RETURN - ',0 - CALL DKEYIN - POP D ;get ret address - CPI '0' ;in range? - JC RUNSH4 - CPI '9'+1 ;in range? - JNC RUNSH4 - PUSH D ;replace ret address - JMP CMACRO - -; insert file pted to (% prefix command) -CMFLIF: - CALL F0$GET ;get next char - JNZ CMFL6 - CPI FPESC ;doubled? - JZ CMFL50 - LXI D,CMFL51 ;return address - PUSH D ;... on stack - ANI 5FH ;capitalize - CPI FPFILE ;file only? - BRZ CMFLIF1 - CPI FPDISK ;disk only? - BRZ CMFLIF2 - CPI FPUSER ;user only? - BRZ CMFLIF3 - CALL CMFLIF2 ;Disk - CALL CMFLIF3 ;User - MVI M,':' ;separator - INX H ;fall thru to file name -CMFLIF1: - XCHG ;save ptr to next - LHLD RINGPOS ;pt to current file - INX H - MVI B,8 ;8 chars in filename - CALL CMFL5X - MVI A,'.' ;put dot - STAX D - INX D - MVI B,3 ;3 chars max - CALL CMFL5X - XCHG ;HL pts to next - RET -CMFLIF2: - LDA C$DR ;store disk - ADI 'A' - MOV M,A - INX H ;pt to next - RET -CMFLIF3: - LDA C$U$A ;user - CPI 10 ;less than 10? - BRC CMFLIF32 - MVI B,'0' ;compute 10's -CMFLIF30: - SUI 10 ;subtract 10's - BRC CMFLIF31 - INR B - BR CMFLIF30 -CMFLIF31: - ADI 10 - MOV M,B ;store 10's - INX H -CMFLIF32: - ADI '0' ;store 1's - MOV M,A - INX H - RET -CMFL5X: - MOV A,M ;get char - CPI ' ' - BRZ CMFL5X1 - STAX D ;put char - INX H ;pt to next - INX D - BJNZ CMFL5X - RET -CMFL5X1: - INX H ;advance - BJNZ CMFL5X1 - RET -; -; Process command from table -; -CTPROC: - MOV B,A ;command in B - LXI H,CTABLE ;pt to table - MOV A,M ;any cursor commands? - ORA A - JNZ CTPR1 - LXI H,CTAB1 -; -; Command table scanner -; HL = Table -; B = Command Letter -; -CTPR1: - MOV A,M ;get table command char - ORA A ;end of table? - RZ ;done if so - CMP B ;match? - BRZ CTPR2 - INX H ;skip to next entry - INX H - INX H - BR CTPR1 -CTPR2: - INX H ;pt to address - MOV A,M ;get low - INX H - MOV H,M ;get high - MOV L,A - XTHL ;address on stack - RET ;"jump" to routine - -; Command Table -CTABLE: - DB 0 ;user cursor positioning - DW UP - DB 0 - DW DOWN - DB 0 - DW FORWARD - DB 0 - DW REVERSE -CTAB1: - DB CTRLC ;if exit, then to opsys - DW OS$CCP - DB 'X' ;alternate exit - DW OS$CCP - DB CTRLR ;screen refresh? - DW RUNSH4 - DB CTRLE ;system cursor positioning - DW UP - DB CTRLX - DW DOWN - DB CTRLD - DW FORWARD - DB CTRLS - DW REVERSE - - DB '.' ;alternate commands - DW FORWARD - DB '>' - DW FORWARD - DB ',' - DW REVERSE - DB '<' - DW REVERSE - - DB CR ;nop - DW LOOP - DB '+' ;jump forward - DW JUMPF - DB CTRLF ;jump forward - DW JUMPF - DB '-' ;jump backward - DW JUMPB - DB CTRLA ;jump backward - DW JUMPB - DB ' ' ;go forward - DW FORWARD - DB BS ;back up? - DW REVERSE - DB 'A' ;alphabetize? - DW ALPHASW - DB 'C' ;copy a file? - DW FCOPY - DB 'D' ;delete a file? - DW FDEL - DB 'F' ;show file size? - DW FSIZE - DB 'G' ;group operation? - DW GROUP$OP - DB 'H' ;external help? - DW EXTHELP - DB 'J' ;jump to a file? - DW GOTO - DB DIRCMD ;log-in another drive? - DW RUNSH3 - DB 'P' ;output file to 'list' device? -; DW LSTFILE ; - DW SPRINT ; - DB 'Q' ;screen refresh? - DW RUNSH4 - DB 'R' ;rename? - DW RENAME - DB 'S' ;free bytes on.. - DW DSTAT ;..requested drive? - DB 'T' ;if tag, put TAGCH in.. - DW TAG ;..front of cursor. - DB 'U' ;remove TAGCH from.. - DW UNTAG ;..in front of cursor? - DB 'V' ; 'view' file at console? - DW VIEW - DB 'Z' ;run ZCPR3 command - DW RUNZCPR3 -; - IF BIHELP ;built-in help? - DB '?' ;help - DW HELP - DB '/' ;help also - DW HELP - ELSE - DB '?' ;help - DW EXTHELP - DB '/' ;help also - DW EXTHELP - ENDIF ;BIHELP -; - DB 0 ;end of table - -; h e l p (menu) - - IF BIHELP ;built-in Help? -HELPMSG: - CALL VPRINT - DB CR,LF,CR,LF - DB ' ' - DB '-- Tagging Commands -- --------- File Operat' - DB 'ions ----------',CR,LF - DB ' ' - DB ' T - ',DIM,'Tag File',BRIGHT - DB ' C - ',DIM,'Copy File',BRIGHT,' ' - DB 'D - ',DIM,'Delete File',BRIGHT,CR,LF - DB ' ' - DB ' U - ',DIM,'Untag File',BRIGHT - DB ' F - ',DIM,'File Size',BRIGHT,' ' - DB 'R - ',DIM,'Rename File',BRIGHT,CR,LF - DB ' ' - DB ' G - ',DIM,'Group ' - DB 'Copy/Delete/FSize/Tag/Untag',BRIGHT,CR,LF ; - DB ' ' - DB ' ',DIM,'Group ' ; - DB 'Print/View',BRIGHT,CR,LF,CR,LF ; - DB ' ' - DB '-- File Print & View -- --- User Functions ---',CR,LF - DB ' -- Cursor -- ' - DB 'P - ',DIM,'Print',BRIGHT - DB ' V - ',DIM,'View',BRIGHT - DB ' 0-9 - ',DIM,'Execute',BRIGHT,' ',MNOTE,' - ',DIM,'Help' - DB BRIGHT,CR,LF - DB ' ^E ' - DB CR,LF - DB ' ^ ' - DB '-- Movement Commands -- ---- Miscellaneous ----',CR,LF - DB ' ^S <-+-> ^D ' - DB ' - ',DIM,'File Forward' - DB BRIGHT,' A - ',DIM,'Toggle Alpha Sort',BRIGHT,CR,LF - DB ' v ' - DB ' - ',DIM,'File Backward' - DB BRIGHT,' H - ',DIM,'Help File',BRIGHT,CR,LF - DB ' ^X ' - DB ' + - ',DIM,'Screen Forward',BRIGHT - DB ' ' - - DB DIRCMD ;changes to reflect command choice - - DB ' - ',DIM,'Log DIR and/or Mask',BRIGHT,CR,LF - DB ' ' - DB ' - - ',DIM,'Screen Backward',BRIGHT - DB ' S - ',DIM,'Disk Status',BRIGHT,CR,LF - DB ' -- Screen -- ' - DB ' J - ',DIM,'Jump to a File',BRIGHT - DB ' Z - ',DIM,'ZCPR3 Command',BRIGHT,CR,LF - DB ' ^A ',DIM,'Backward',BRIGHT,' ' ; - DB ' Q - ',DIM,'Refresh Screen',BRIGHT - DB ' ^C - ',DIM,'Exit',BRIGHT,CR,LF - DB ' ^F ',DIM,'Forward',BRIGHT,' ' ; - - IF BIHELP ; - DB ' ' ; - DB '? or / - ',DIM,'Toggle Help Screen',BRIGHT ; - ENDIF ; - - DB 0 - RET -HELP: - LDA HELPDISP ;toggle flag - CMA - STA HELPDISP - JMP RUNSH4 ;refresh screen and restart - ENDIF ;BIHELP -; -; COMMAND: H -; -EXTHELP: - CALL CPRMPT - DB 'Read Help File (Y/N)? ',0 - CALL CIN - CALL CAPS - CPI 'Y' - JNZ LOOPFN - CALL ERMSG - DB DIM,'Chaining to Help File ...',BRIGHT,0 - LXI H,MOREHELP ;run HELP Command - CALL CHAIN ;chain to it - JMP LOOPFN - -; -; COMMAND: A -; -; Toggle alphabetize switch and reload files -; -ALPHASW: - LDA ALPHA ;toggle flag - CMA - STA ALPHA - CALL CPRMPT ;tell user what is happening - DB 'Sorting by File ',0 - LDA ALPHA ;get flag - ORA A ;check it - BRZ ASWTN - CALL VPRINT - DB 'Name and Type',0 - JMP RUNSH2 -ASWTN: - CALL VPRINT - DB 'Type and Name',0 - JMP RUNSH2 ;reload files - -; -; COMMAND: Z -; -; Execute ZCPR3 command line -; -RUNZCPR3: - CALL ERMSG ;position at error message line - DB 0 - LXI H,H$DR ;pt to Home Drive (followed by Home User) - CALL PRDU ;print DU - CALL VPRINT ;print prompt - DB '> ',0 - PUSH D - LHLD CRCTBL ;use last half of CRC Table - LXI D,256 - DAD D - POP D - MVI M,126 ;store length of line - INX H - MVI M,0 ;store count - DCX H ;pt to beginning - XCHG ;DE pts to buffer - PUSH D - MVI C,RDBUF ;Read Line from User - CALL BDOS - POP H - INX H ;pt to char count - MOV E,M - INX H ;pt to first char - MVI D,0 ;set no high-order offset - PUSH H ;save current ptr for later - DAD D - MVI M,0 ;store ending zero - POP H ;pt to first char of command line - MOV A,M ;abort if no first char - ORA A - JZ LOOP - CALL CHAIN ;chain to it - JMP LOOPFN ;continue - -; chain to command pted to by HL ending in zero - -CHAIN: - CALL PUTCL ;store command line - BRNZ CHAIN1 - CALL ERMSG - DB 'CL Err',0 - RET -CHAIN1: - MVI B,0 ;set shell message 0 - MVI A,80H ;enable wait - CALL PUTSHM - CALL CHAIN2 ; - JMP OS$CCP1 ;run command line - moved - - - ;made a subroutine -CHAIN2: - LDA C$DR ;get current disk - ADI 'A' ;convert to ASCII - STA FILE$D ;store in proper place - LDA C$U$A ;get current user - LXI H,FILE$U ;store user number - MVI C,'0' ;set char -CHAIN3: - SUI 10 ;convert to ASCII - BRC CHAIN4 - INR C ;increment 10's char - BR CHAIN3 -CHAIN4: - MOV M,C ;store 10's digit char - INX H ;pt to 1's digit - ADI 10+'0' ;add back for 1's digit - MOV M,A ;store 1's digit char - CALL GETSH2 ;pt to shell buffer - LXI D,8 ;skip 8 chars (VFILER Name) - DAD D - LXI D,FILE$D ;place DU - XCHG - MVI B,5 ;store 5 chars (duu:0) - CALL MOVEB - RET ; - -; -; COMMAND: G -; -; Group operation -; -GROUP$OP: - CALL CPRMPT - DB 'Group Cmd (Copy/View/Print/Delete/File Sizes/' ; - DB 'Tag/Untag)? ',0 ; - CALL KEYIN ;get response - MOV B,A ;command in B - LXI H,GTABLE ;pt to table - CALL CTPR1 ;process command - JMP LOOP ;resume if not found -; -; Group Command Table -; -GTABLE: - DB 'C' - DW MASS$COPY - DB 'D' - DW MASS$DEL - DB 'P' ; - DW MASS$PRINT ; - DB 'V' ; - DW MASS$VIEW ; - DB 'F' - DW MASS$FSIZE - DB 'T' - DW MASS$TAG - DB 'U' - DW MASS$UNTAG - DB 0 ;end of table - -; -; COMMAND: GU -; -MASS$UNTAG: - MVI B,' ' ;untag char -; -; Common Entry Point for Mass Untag/Tag - B = Untag/Tag Char -; -MUTLOOP: - LHLD RINGPOS ;move to tag - LXI D,12 - DAD D - MOV M,B ;set tag byte - INX H ;pt to next - SHLD RINGPOS - XCHG ;done? - LHLD LOCEND - CALL CMPDEHL - BRNZ MUTLOOP - LXI H,CURHOME ;reset cursor - SHLD CURAT - LHLD LOCBEG ;set ring position - JMP JFW0 ;reset screen from LOCBEG - -; -; COMMAND: GT -; -MASS$TAG: - MVI B,TAGCH ;tag char - BR MUTLOOP ;do work - -; -; COMMAND: U -; -UNTAG: - MVI B,' ' ;set tag byte -; -; Common Entry Point for Untag/Tag - B = Untag/Tag Char -; -UT: - LHLD RINGPOS ;move back one.. - LXI D,12 ;..character position.. - DAD D ;..and check tagging status. - MOV M,B ;if file previously tagged, remove.. - CALL REFFN ;refresh file name - JMP FORWARD - -; -; COMMAND: T -; -TAG: - MVI B,TAGCH ;tag char - BR UT ;do tag - -; -; Refresh file name with new tag -; -REFFN: - CALL CLRCUR ;clear cursor - MVI A,' ' ;one more space - CALL COUT - LHLD RINGPOS ;reprint file name -; INX H -; CALL PRFN -; MOV A,M ;print tag -; JMP COUT - CALL HILITFN ; brighten - RET ; - -; -; COMMAND: GF -; -MASS$FSIZE: - CALL WORKMSG ;print 'Working' msg - LXI H,0 ;zero total - SHLD TAG$TOT - LHLD RINGPOS ;save ring position - SHLD SRINGPOS - LHLD RING ;set new ring position - SHLD RINGPOS -; -; Main Loop to Compute File Sizes -; -MASS$FS: - LHLD RINGEND ;at end of ring? - XCHG - LHLD RINGPOS - CALL CMPDEHL ;same if so - BRZ MASS$FS2 - LXI D,12 ;pt to tag - DAD D - MOV A,M ;get tag - INX H ;pt to next file - CPI TAGCH ;tagged? - BRNZ MASS$FS1 ;skip if not tagged -; -; Compute Size of Tagged File -; - PUSH H ;save ptr to next file - CALL SIZER ;compute file size - XCHG ;size in DE - LHLD TAG$TOT ;get total - DAD D - SHLD TAG$TOT ;new total - POP H ;get ptr to next file -MASS$FS1: - SHLD RINGPOS ;set ptr to next file - BR MASS$FS -; -; File Size Accumulation Done - Print Result -; -MASS$FS2: - LHLD SRINGPOS ;restore ring position - SHLD RINGPOS - CALL FSNOTE ;print file size message - CALL VPRINT ;print specific - DB 'Tagged Files is ',0 - LHLD TAG$TOT ;get total - BR FSIZE1 ;print size in HL and return - -; -; COMMAND: F -; -; determine and display file size in kilobytes -- round up to next disk -; allocation block -- accumulate tagged file summation -; -FSIZE: - CALL SIZER ;compute file size of current file - PUSH H ;save value - CALL FSNOTE ;print file size message - LHLD RINGPOS ;print file name - INX H - CALL PRFN - CALL VPRINT ;print trailer - DB ' is ',0 - POP H ;get size -; -; Print file size in HL and exit to screen -; -FSIZE1: - CALL PHLFDC ;print value in HL as floating - MVI A,'K' ;print suffix - CALL COUT - JMP LOOPFN ;resume - -; -; Compute File Size at RINGPOS -; Return Size in HL -; -SIZER: - CALL RINGFCB ;move name to 's$fcb' -; -; Determine file record count and save in RCNT -; - MVI C,COMPSZ - LXI D,S$FCB - CALL BDOS - LHLD S$FCB+33 - SHLD RCNT ;save record count and.. - LXI H,0 - SHLD S$FCB+33 ;..reset opsys -; -; Round up to next disk allocation block -; - LDA B$MASK ;sectors/block - 1 - PUSH PSW ;save 'blm' - MOV L,A - XCHG - LHLD RCNT ;..use here. - DAD D ;round up to next block - MVI B,3+1 ;convert from.. - CALL SHIFTLP ;..records to kilobytes. - POP PSW ;retrieve 'blm' - RRC ;convert.. - RRC ;..to.. - RRC ;..kilobytes/block. - ANI 1FH - CMA ;finish rounding - ANA L - MOV L,A ;hl-pair contains # of kilobytes - RET - -; -; COMMAND: - (Previous Screen) -; -JUMPB: - LXI H,CURHOME ;set cursor home - SHLD CURAT - LHLD RING ;at front? - XCHG - LHLD LOCBEG - CALL CMPDEHL - BRZ JUMPBW ;back up and wrap around - SHLD LOCEND ;set new end - LXI D,-EPS*13 ;back up - DAD D - SHLD LOCBEG ;new beginning - SHLD RINGPOS ;new position - JMP RUNSH4 -JUMPBW: - LHLD LOCBEG ;at first screen? - XCHG - LHLD RING ;pt to first element of ring - CALL CMPDEHL - BRZ JBW0 ;advance to end - LXI H,-EPS*13 ;back up - DAD D ;first element of new local ring - BR JFW0 -JBW0: - LXI D,EPS*13 ;pt to next screen - DAD D - XCHG - LHLD RINGEND - CALL CMPDEHL - XCHG - BRZ JBW1 - BRC JBW0 -JBW1: - LXI D,-EPS*13 - DAD D ;pt to first element of new local ring - BR JFW0 -; -; COMMAND: + (Next Screen) -; -JUMPF: - LXI H,CURHOME ;set cursor to home - SHLD CURAT - LHLD LOCEND ;see if Local End <= Ring End - XCHG - LHLD RINGEND - CALL CMPDEHL - BRZ CMDLOOP - LHLD LOCEND ;new screen starting at LOCEND - BR JFW0 - -; -; Reset to Beginning of RING and Resume Command Looping -; -CMDLOOP: - CALL SETSCR ;reset all screen pointers -CMDLRET: - JMP RUNSH4 -; -; Reset RING Position to HL -; -JFW0: - CALL SETSCR1 ;reset RINGPOS on ... - BR CMDLRET -; -; Reset Local Ring to HL -; -JFW0A: - CALL SETSCR2 ;reset LOCBEG on ... - BR CMDLRET - -; -; COMMAND: ' ', Left-Arrow -; -FORWARD: - CALL CLRCUR ;clear cursor - CALL FOR0 ;position on screen and in ring - CALL SETCUR ;set cursor - JMP LOOPFN -; advance routine -FOR0: - LHLD RINGPOS ;at end of loop yet? - LXI D,13 ;i.e., will we be at end of loop? - DAD D - XCHG - LHLD LOCEND - CALL CMPDEHL ;compare 'present' to 'end' - BRNZ FORW ;to next print position - CALL CUR$FIRST ;position cursor - LHLD LOCBEG ;set position pointer to beginning and.. - SHLD RINGPOS - RET -FORW: - LHLD RINGPOS ;advance in ring - LXI D,13 - DAD D - SHLD RINGPOS ;new position - CALL CUR$NEXT ;position cursor - RET - -; -; COMMAND: BS, Right-Arrow -; -REVERSE: - CALL CLRCUR ;clear cursor - CALL REV0 ;position on screen and in ring - CALL SETCUR ;set cursor - JMP LOOPFN -; Back Up Routine -REV0: - LHLD LOCBEG - XCHG - LHLD RINGPOS ;see if at beginning of ring - CALL CMPDEHL - BRNZ REV1 ;skip position pointer reset if not.. - CALL CUR$LAST ;end of local ring - LHLD LOCEND ;set to end +1 to backup to end - LXI D,-13 - DAD D - SHLD RINGPOS - RET -REV1: - CALL CUR$BACK ;back up 1 -REV2: - LHLD RINGPOS - LXI D,-13 ;one ring position.. - DAD D ;..backwards. - SHLD RINGPOS - RET - -; -; COMMAND: Up-Arrow -; -UP: - CALL CLRCUR ;clear cursor - LHLD RINGPOS ;see if wrap around - LXI D,-13*4 ;4 entries - DAD D - XCHG - LHLD LOCBEG ;beginning of local screen - CALL CMPDEHL - BRC UP2 ;wrap around - MVI B,4 ;back up 4 entries -UP1: - PUSH B ;save count - CALL REV0 ;back up in ring and on screen (no print) - POP B ;get count - BJNZ UP1 - BR DOWN1A -UP2: - LHLD RINGPOS ;advance to beyond end - LXI D,13*4 - DAD D - XCHG - LHLD LOCEND ;compare to local end - XCHG - CALL CMPDEHL - BRZ DOWN1A ;at end, so too far - BRC DOWN1A ;beyond end, so back up - SHLD RINGPOS ;new ring position - LHLD CURAT ;advance cursor - INR H ;next line - SHLD CURAT - BR UP2 - -; -; COMMAND: Down-Arrow -; -DOWN: - CALL CLRCUR ;clear cursor - LHLD RINGPOS ;see if wrap around - LXI D,13*4 ;4 entries - DAD D - XCHG - LHLD LOCEND ;end of local screen - XCHG - CALL CMPDEHL - BRZ DOWN2 ;wrap around - BRC DOWN2 ;wrap around - MVI B,4 ;forward 4 entries -DOWN1: - PUSH B ;save count - CALL FOR0 ;advance in ring and on screen (no print) - POP B ;get count - BJNZ DOWN1 -DOWN1A: - CALL SETCUR ;set cursor - JMP LOOPFN -DOWN2: - LHLD CURAT ;preserve column - MOV B,L ;column number in B - LXI H,CURHOME ;home position - SHLD CURAT ;set new position - LHLD LOCBEG ;beginning of local ring - SHLD RINGPOS ;new ring position -DOWN3: - LHLD CURAT ;check for at top of column - MOV A,L ;get col - CMP B ;there? - BRZ DOWN1A - LHLD RINGPOS ;advance in ring - LXI D,13 ;13 bytes/entry - DAD D - SHLD RINGPOS - LHLD CURAT ;get cursor position - LXI D,19 ;advance 19 bytes/screen entry - DAD D - SHLD CURAT - BR DOWN3 - -; -; COMMAND: S -; -; Determine remaining storage on requested disk -; -DSTAT: - CALL CPRMPT - DB 'Status of Disk (Letter): ',0 - CALL KEYIN ;get char - PUSH PSW - CALL CRLF - POP PSW - SUI 'A' ;convert to number - JC LOOP - MOV B,A ;... in B - LDA MAXDR ;compare to max - SUI 'A' - CMP B - JC LOOPFN - MOV A,B ;get disk - STA R$DR ;requested drive - CALL RESET ;..login as current. - CALL FRESTOR ;determine free space remaining - CALL PRINT$FRE ;print value - LDA C$DR ;login original as.. - CALL SET$DR ;..current drive. - JMP LOOPFN - -; -; COMMAND: GD -; -MASS$DEL: - MOV A,B ; recover the opcode - STA MASSOP ; need it later - CALL CPRMPT - DB 'Mass Delete (Y/N/V=Verify)? ',0 - CALL KEYIN ;get response - CPI 'Y' - BRZ MD1 - CPI 'V' - JNZ LOOP ;return to position -MD1: - STA MDFLG ;set flag -; STA MASSOP - JMP MASS$RUN - -; -; COMMAND: D -; -FDEL: - XRA A ;set no mass operation - STA MFLAG - CALL DELETE ;delete file -; -; Was Deletion Done? Abort if Not -; - LDA DELCODE ;0=not done - ORA A - JZ LOOPFN ;abort if not -; -; Reset Local Display -; - LHLD LOCEND ;move in end - LXI D,-13 - DAD D - SHLD LOCEND - XCHG - LHLD RINGPOS ;position beyond end of ring? - CALL CMPDEHL - BRNZ FDEL1 -; -; Cursor Beyond End of Display -; - CALL CUR$BACK ;back up cursor - LHLD LOCEND ;reset position - LXI D,-13 - DAD D - SHLD RINGPOS -FDEL1: - LHLD LOCEND ;get local end - XCHG ;... in DE - LHLD LOCBEG ;erased all local files? - CALL CMPDEHL - JZ CMDLOOP ;reset - JMP JFW0A ;rescreen from LOCBEG - -; -; Delete filename at RINGPOS -; -DELETE: - XRA A - STA DELCODE ;set deletion not done - CALL RINGFCB ;get file name - LDA MFLAG ;mass operation? - ORA A ;0=no - BRZ DEL1A ;do delete with message -; -; Test for Verify on Mass Delete -; - LDA MDFLG ;verify? - CPI 'V' - BRNZ DEL1 ;delete without verify -; -; Verify and Delete only if Approved -; - CALL CPRMPT - DB 'Delete ',0 - CALL PRFNS ;print file name in S$FCB - CALL VPRINT - DB ' (Y/N)? ',0 - CALL KEYIN - CPI 'Y' - RNZ ;abort if not approved -; -; Delete File (Mass Operation) -; -DEL1: - LDA MDFLG ;mass operation - verify on? - CPI 'V' - BRZ DEL2 -DEL1A: CALL ERMSG ;print information for mass del w/o verify - DB 'Deleting File ',0 - CALL PRFNS -; -; Delete File in S$FCB -; -DEL2: - LXI H,S$FCB ;set file to R/W - CALL ATTRIB - RZ ;abort - LXI D,S$FCB ;point at delete 'fcb' - MVI C,ERASE ;erase function - CALL BDOS - INR A - BRNZ DELCL ;close up erased position -FNF$MSG: - CALL FNF1 ;show error message - JMP LOOPFN - -; -; Close up erased position -; -DELCL: - MVI A,0FFH - STA DELCODE ;set deletion done - LHLD RINGPOS ;prepare move up pointers - PUSH H - LXI D,13 ;13 bytes/entry - DAD D ;de-pair = 'to' location - POP D ;hl-pair = 'from' location -; -; Move 13-byte ring entries from HL to DE -; -MOVUP: - XCHG ;HL=dest - PUSH H ;check if at end - LHLD RINGEND ;get old end pointer - CALL CMPDEHL ;check against current end location - POP H - XCHG ;DE=dest - BRZ MOVDONE ;must be at end of ring - MVI B,13 ;one name size - CALL MOVE ;move one name up - BR MOVUP ;go check end parameters -; -; Move Complete -; -MOVDONE: - LHLD RING ;see if ring is empty - XCHG - SHLD RINGEND ;set new ring end if all moved - CALL CMPDEHL ;..(listend --> listpos --> ring) - RNZ - CALL ERMSG - DB 'List Empty',0 - JMP RUNSH3 ;go to drive/user area with files - -; -; COMMAND: R -; -; Set-up to rename file at cursor position -- scan keyboard buffer and -; move filename to destination FCB (DFCB) -; -RENAME: - LHLD RINGPOS ;move name from ring to rename 'fcb' - LXI D,D$FCB ;place to move name - MVI B,12 ;amount to move - CALL MOVE - CALL CPRMPT ;new name prompt - DB 'Rename File to: ',0 - LXI D,D$FCB+16 ;pt to FCB to fill - CALL FILENAME ;get file name - LXI H,D$FCB+1 ;check for any wild cards -- none permitted - MVI B,11 ;11 bytes -WILDCHK: - MOV A,M ;get char - INX H ;pt to next - CPI '?' ;wild? - BRZ WILDFND - BJNZ WILDCHK - -; copy old file status bit ($r/o or $sys) to new filename - -CPYBITS: - LXI D,D$FCB+1 ;first character of old name.. - LXI H,D$FCB+17 ;..and of new name. - MVI B,11 ; # of bytes with tag bits -CBITS1: - LDAX D ;fetch bit of old name character - ANI 80H ;strip upper bit and.. - MOV C,A ;..save in c-reg. - MVI A,7FH ;mask for character only - ANA M ;put masked character into a-reg - ORA C ;add old bit - MOV M,A ;copy new byte back - INX H ;bump copy pointers - INX D - BJNZ CBITS1 ;DJNZ - -; check if new filename already exists. if so, say so. then go -; to command loop without moving ring position - - LDA D$FCB ;copy new name to source 'fcb' - STA S$FCB - MVI B,11 - LXI H,D$FCB+17 ;copy new name to.. - LXI D,S$FCB+1 ;..source 'fcb' for existence check. - CALL MOVE - LXI H,S$FCB+12 ;clear 'fcb' system.. - CALL INITFCB ;..fields. - LXI D,S$FCB ;search to see if this file exists - MVI C,SRCHF ;search first function - CALL BDOS - INR A ; 0ffh --> 00h if file not found - BRZ RENFILE ;to rename, if duplicate doesn't exists. - CALL ERMSG ;announce the situation - DB 'File Already Exists',0 - JMP COMCAN ;try again? - -; wild char found in file name -- error - -WILDFND: - CALL ERMSG - DB 'AFN NOT Allowed',0 - JMP COMCAN - -; copy new name into ring position - -RENFILE: - ;following not needed with full screen refresh -; LHLD RINGPOS ;get ring position pointer -; INX H ;pt to name -; PUSH H ;save ptr -; XCHG -; LXI H,D$FCB+17 ;point at new name and.. -; MVI B,11 -; CALL MOVE ;..move. -; LHLD CURAT ;get current position on screen -; LXI D,4 ;advance 4 chars -; DAD D -; CALL GOTOXY -; POP H ;get ptr -; CALL PRFN ;print file name -; MOV A,M ;print tag -; CALL COUT - LXI D,D$FCB ;rename 'fcb' location - MVI C,REN ;rename function - CALL BDOS - INR A ; 0ffh --> 00h if rename error -; JNZ LOOP ;if okay, proceed, else.. -; JMP FNF$MSG ;..show no-file msg. - JZ FNF$MSG ;if error, report it - JMP RUNSH2 ;start over - -; get file name from user and process into FCB pted to by DE -FILENAME: - PUSH D ;save ptr - LHLD CMDBUF ;command line location - XCHG - MVI C,RDBUF ;console read-buffer function - CALL BDOS - CALL CONVERT ;capitalize alpha - POP H ;set to null drive - MVI M,0 ;..required by 'bdos'. - INX H - -; initialize new filename field with spaces - - PUSH H ;save start pointer - MVI B,11 ; # of spaces to 'blank' - CALL FILL - POP H - XCHG - LHLD CMDBUF ;put length.. - INX H - MOV C,M ;..in c-reg. - INX H - XCHG ;de-pair --> buffer pointer and hl-pair.. - CALL UNSPACE ;..--> 'fcb' pointer. remove leading spaces. - -; extend buffer to spaces beyond command length - -EXTEND: - PUSH H - MOV L,C ;double-byte remaining length - MVI H,0 - DAD D ;to buffer end +1 - MVI M,' ' ;force illegal character end - POP H - -; start filename scan - -SCAN: - MVI B,8 ; 8 characters in filename -SCAN1: - CALL CKLEGAL ;get and see if legal character - JC COMCAN ;all of command line? - CPI ' ' ;see if end of parameter field - RZ ;rename file - CPI '.' ;at end of filename - BRZ SCAN2 ;process filetype field - CPI '*' ;rest wild? - BRZ SCAN1B - MOV M,A ;put character into destination 'fcb' - INX H - BJNZ SCAN1 - -; entry if eight characters without a 'period' - -SCAN1A: - CALL CKLEGAL ;scan buffer up to period or end - RC ;no extent if not legal - CPI ' ' ;end of parameter field? - RZ - CPI '.' - BRNZ SCAN1A ;do till end or period - BR SCAN2A ;continue at correct place - -; make rest of entry wild - -SCAN1B: - MVI M,'?' ;fill with ?'s - INX H - BJNZ SCAN1B - LDAX D ;get next char - INX D ;pt to after dot - CPI '.' ;must be dot - JNZ COMCAN ;cancel if not - BR SCAN2A - -; build filetype field - -SCAN2: - INX H ;advance ptr to file type field - BJNZ SCAN2 -SCAN2A: - MVI B,3 ;length of filetype field -SCAN3: - CALL CKLEGAL ;get and check character - BRC SCAN4 ;name done if illegal - CPI ' ' ;end of parameter field? - BRZ SCAN4 - CPI '.' ;check if another period - BRZ SCAN4 - CPI '*' ;rest wild? - BRZ SCAN4B - MOV M,A - INX H - BJNZ SCAN3 ;get next character - BR SCAN4A -SCAN4: - INX H ;advance to end of type field - BJNZ SCAN4 -SCAN4A: - CALL INITFCB ;..and zero counter fields. - RET -SCAN4B: - MVI M,'?' ;make wild - INX H - BJNZ SCAN4B - BR SCAN4A ;complete rest - -; -; COMMAND: J -; -GOTO: - CALL CPRMPT - DB 'Jump to Filename: ',0 - LXI D,D$FCB ;pt to FCB - CALL FILENAME ;get file name - LHLD RING ;pt to first element of ring - SHLD RINGPOS ;set position - SHLD LOCBEG ;set local beginning - PUSH H - LHLD CRCTBL ;pt to CRC Table - MVI M,0 ;set local counter - POP H -GOTOL: - CALL GOTOCOMP ;compare - BRZ GOTOF ;we are there - PUSH H - LHLD CRCTBL ;pt to table - INR M - MOV A,M - POP H - CPI EPS - BRNZ GOTOL1 - LHLD CRCTBL ;zero first entry - MVI M,0 - LHLD LOCBEG ;reset local beginning - LXI D,EPS*13 - DAD D - SHLD LOCBEG -GOTOL1: - LHLD RINGPOS ;advance to next entry - LXI D,13 - DAD D - SHLD RINGPOS ;new position - XCHG ;position in DE - LHLD RINGEND ;check for completion - CALL CMPDEHL ;compare current position with end of ring - BRNZ GOTOL - LHLD RING ;pt to first element - SHLD RINGPOS ;set position - CALL FNF1 ;print message - JMP CMDLOOP -GOTOF: - LHLD LOCBEG ;we have local beginning - PUSH H - XCHG ;ring location in DE - LXI H,CURHOME ;set cursor ptr - SHLD CURAT -GOTOF0: - LHLD RINGPOS ;at position? - CALL CMPDEHL - BRZ GOTOF1 - LXI H,13 ;advance location - DAD D - PUSH H - CALL CUR$NEXT ;advance cursor - POP D ;pt to next ring position - BR GOTOF0 -GOTOF1: - POP H ;pt to local ring - JMP JFW0A ;process -GOTOCOMP: - LHLD RINGPOS ;pt to current entry - INX H ;pt to first char of file name - LXI D,D$FCB+1 ;pt to first char of new file - MVI B,11 ;11 bytes -GOTOC1: - LDAX D ;get char - CPI '?' ;match? - BRZ GOTOC2 - CMP M ;match? - RNZ ;no match -GOTOC2: - INX D ;pt to next - INX H - BJNZ GOTOC1 - RET - -; -; COMMAND: V -; -; Type file to console with pagination set to 'lps' -- single-line scroll -; using bar , to cancel, any other key to page screen. -; -VIEW: - CALL VIEWFL ; - JMP RUNSH4 ; - -VIEWFL: ; - CALL VCLS - CALL VPRINT - DB CR,LF,DIM,' Cancels, Turns Up One Line, ' - DB 'Other Keys Page Screen',BRIGHT,CR,LF,LF,0 - MVI A,1 ;initialize.. - STA LPSCNT ;..lines-per-screen counter. - STA VIEWFLG ; 'view' paginate if not zero - MVI A,WRCON ;write console out function - BR CURRENT ;to common i/o processing -; -; COMMAND: P -; -; Send file to logical list device -- any keypress cancels -; -SPRINT: ; -; -; Set Flags for First Time Thru and No Mass Print -; - XRA A ; A=0 - STA FIRST$M ; set for prompt for destination -; -; Do Print -; - CALL LSTFILE ; print file at RINGPOS -; -; Advance to Next File -; - JMP RUNSH4 ; refresh screen and reset stack -; -; -LSTFILE: - LDA FIRST$M ; by-pass prompt. - ORA A ; - BRNZ SKPPRMT ;..1st time thru in mass-print mode. - DCR A ; A=0FFH - STA FIRST$M ; set not first time any more - CALL CPRMPT - DB 'Print on LST Device (Y/N)? ',0 - CALL KEYIN ;get response - CPI 'Y' - JNZ LOOP -SKPPRMT: ; - CALL ERMSG - DB 'Printing ',0 - LHLD RINGPOS ;pt to file name - INX H - CALL PRFN ;print it - MVI A,1 ;one for.. - STA VIEWFLG ;..output to printer. - DCR A ;zero for.. - STA LPSCNT ;..lines-per-page counter - STA EOFLAG ; used to provide formfeed at end of file - MVI A,LIST ;out to 'list' device function and fall thru - -; output character for console/list/punch processing - -CURRENT: - STA CON$LST ;save bdos function - -; output file to console/printer/punch - - CALL RINGFCB ;position name to 'fcb' - XCHG ;HL pts to S$FCB - CALL INITFCB ;set 'fcb' for use - LXI D,TBUF ;set to use default dma buffer - MVI C,SETDMA ;address set function - CALL BDOS - LXI D,S$FCB ;open file for reading - MVI C,OPEN ;file open function code - CALL BDOS - INR A ; 0ffh --> 00h if open not okay - BRNZ ZEROCR ;if not okay, show error message. -; -; File Not Found Error -; -FNF: - CALL FNF1 ;print file not found message - JMP LOOP -; -; Print File Not Found Message -; -FNF1: - CALL ERMSG - DB 'File NOT Found',0 - RET -; -; Continue -; -ZEROCR: - XRA A - STA S$FCB+32 ;zero file 'current record' field - STA CHARCNT ;zero char count for tabbing - CALL PHEAD ;print heading if output to LST device -READMR: - LXI D,S$FCB ;point at file 'fcb' for reading - MVI C,READ ;record read function - CALL BDOS - ORA A ;check if read okay - BRNZ CURDONE ;eof? - LXI H,TBUF ;point at record just read - MVI B,128 ;set record character counter to output -READLP: - MOV A,M ;get a character - ANI 7FH ;force to 'ascii' - CPI EOFCHAR ;see if end-of-file - BRZ CURDONE ;back to ring loop if 'eof' - MOV E,A ;put character for 'bdos' call - PUSH B - PUSH H - PUSH D ; (character in e-reg) - LDA CON$LST ;get function for punch/list/console output - MOV C,A - MOV A,E ;check char - CPI TAB ;tabulate? - BRNZ NOTAB - MVI E,' ' ;space over -TABL: - PUSH B ;save key regs - PUSH D - CALL BDOS - POP D ;get key regs - POP B - CALL INCCCNT ;increment char count - ANI 7 ;check for done at every 8 - BRNZ TABL - BR TABDN -NOTAB: - CALL BDOS ;send character - CALL INCCCNT ;increment char count -TABDN: - LDA VIEWFLG ;if 'view'.. - ORA A - POP D ;get char in E in case PAGER is called - CNZ PAGER ;..check for 'lf'. - MVI E,GET ;get status or char - MVI C,DIRCON ;console status function - CALL BDOS ;status? - POP H - POP B - ANI 7FH ;if character there, then abort.. - CNZ CANVIEW ;already got char - INX H ;if not, bump buffer pointer. - BJNZ READLP ;no, more in present record. - BR READMR ;yes, get next record. -CURDONE: - MVI A,TRUE ; set eoflag for formfeed at end of file - STA EOFLAG ; - LDA CON$LST ;console? - CPI WRCON - JZ BOTTOM ; prompt for user - JMP FORMFD ; -; JMP RUNSH4 ;refresh screen and continue user input - -PAGER: - MOV A,E ; (character in e-reg) - CPI LF - RNZ - XRA A ;zero char count - STA CHARCNT - LDA CON$LST ;printer or console? - CPI LIST ;check for printer - BRZ PAGEP - LDA CTPP ;get number of lines of text per screen - MOV B,A ;... in B - LDA LPSCNT ;is counter.. - INR A ;..at.. - STA LPSCNT ;..limit.. - CMP B ;..of lines-per-screen? - RC ;no, return. - XRA A ;yes, initialize.. - STA LPSCNT ;..for next screen full. - CALL VPRINT - DB ' ',DIM,'[View More...]',BRIGHT,CR,0 ;show msg line - CALL DKEYIN ;wait for keyboard input - CPI ' ' ;see if bar.. - PUSH PSW - CALL VPRINT - DB ' ',CR,0 ;clear above msg line - POP PSW - BRNZ CANVIEW ;..if not, see if cancel. - LDA CTPP ;set for single line - DCR A - STA LPSCNT ;..scroll and.. - RET ;..return for one more line. - -PAGEP: - LDA LTPP ;get number of lines of text per page - MOV B,A ;... in B - LDA LPSCNT ;is counter.. - INR A ;..at.. - STA LPSCNT ;..limit.. - CMP B ;..of lines-per-screen? - RC ;no, return. -FORMFD: XRA A ; zero for.. - STA LPSCNT ;..lines-per-page counter - LDA LFFEED ;form feed available? - ORA A ;0=no - JZ PRFEED - CALL LCRLF ;new line - MVI A,FF ;send form feed char - CALL LOUT - LDA EOFLAG ; if true then output final formfeed - ORA A ; - RNZ ; don't do heading if final formfeed - JMP PHEAD ;print header and done -PRFEED: - LDA LSPP ;number of lines to skip - MOV B,A ;number of lines to skip - MVI C,LIST ;LST output -PAGELST: - CALL LCRLF ;new line on LST - BJNZ PAGELST - JMP PHEAD ;print heading and done - -CANVIEW: - CPI CTRLC ;^C? - JZ COMCAN - RET ;return for another page - -INCCCNT: - LDA CHARCNT ;increment char count - INR A - STA CHARCNT - RET - -PHEAD: - LDA CON$LST ;printing to printer? - CPI LIST - RNZ - LXI H,HEADMSG ;print heading -PHEAD1: - MOV A,M ;get char - ORA A ;done? - BRZ PHEAD2 - CALL LOUT ;send to printer - INX H ;pt to next - BR PHEAD1 -PHEAD2: - LXI H,S$FCB+1 ;pt to file name - MVI B,8 ;8 chars - CALL PHEAD3 - MVI A,'.' ;dot - CALL LOUT - MVI B,3 ;3 more chars - CALL PHEAD3 - CALL LCRLF ;new line - CALL LCRLF ;blank line - RET -PHEAD3: - MOV A,M ;get char - CALL LOUT ;LST it - INX H ;pt to next - BJNZ PHEAD3 - RET - -; -; COMMAND: GC -; -; Copy files tagged using the 't' command. auto-erase if file exists -; on requested destination drive or in user area. -; -MASS$COPY: - MOV A,B ; recover opcode - STA MASSOP ; - CALL ERMSG - DB 'Mass Copy',0 -; XRA A ;A=0 -; STA MASSOP ;set operation to mass copy -; -; Main Entry Point for Mass Operation of Copy or Delete -; On entry, MASSOP = 0 if copy, 0FFH if delete -; -MASS$RUN: - LHLD RINGPOS ;save position - SHLD SRINGPOS - LHLD RING - LXI D,-13 ;back up to before first ring element - DAD D - SHLD RINGPOS ;set position -; -; Set Flags for First Time Thru and Mass Operation -; - XRA A ;A=0 - STA FIRST$M ;set for prompt for dest with first file - DCR A ;A=0FFH - STA MFLAG ;this is a mass operation -; -; Main Mass Operation Loop -; -MASS$OLP: - LHLD RINGPOS ;re-entry point for next file - LXI D,13 ;advance to next - DAD D - SHLD RINGPOS - XCHG ;at ring.. -; -; Check for Loop Completion -- DE = Current RINGPOS -; -MASS$OLP1: - LHLD RINGEND ;..end yet? - CALL CMPDEHL ;compare present position with end -; BRZ MASS$OLX ;done - JZ MASS$OLX ; -; -; Check for Tagged File at RINGPOS -; - LHLD RINGPOS ;get position - LXI D,12 ;get 1st possible tag location - DAD D - MOV A,M ;get tag - CPI TAGCH - BRNZ MASS$OLP ;not tagged, so skip -; -; Select Mass Operation -; - LDA MASSOP ;get type of mass operation -; ORA A ;0=COPY -; BRZ MASS$OC ;do copy - CPI 'C' ; check if copy - BRZ MASS$OC ; yes its copy - CPI 'P' ; check if print - BRZ MASS$LST ; yes its print - CPI 'D' ; check if delete - BRZ MDELETE ; its delete - CPI 'V' ; check if view - BRZ MASS$FVIEW ; its view - CALL ERMSG ; should be one of above - DB 'Illegal character',0 ; - JMP LOOP ; get new comand - -; COMMAND: GP -; -; Print tagged files using the 't' command -; - -MASS$PRINT: ; - MOV A,B ; recover opcode - STA MASSOP ; - CALL ERMSG ; - DB 'Mass Print',0 ; - BR MASS$RUN ; - -MASS$LST: ; - CALL LSTFILE ; - BR MASS$OLP ; skip to next - -; COMMAND: GV -; -; View tagged files using the 't' command -; - -MASS$VIEW: ; - MOV A,B ; recover opcode - STA MASSOP ; - CALL ERMSG ; - DB 'Mass View',0 ; -; BR MASS$RUN ; - JMP MASS$RUN ; - -MASS$FVIEW: - CALL VIEWFL ; - BR MASS$OLP ; - - -; Do Mass Delete - Current File Delete -; -MDELETE: ; - CALL DELETE ;delete filename at RINGPOS -; -; Advance to Next File if Delete Aborted -; - LDA DELCODE ;deletion done? - ORA A ;0=no -; BRZ MASS$OLP ;skip to next if not - JZ MASS$OLP ; -; -; Stay at Current File if Delete Done - Ring was Compressed by Delete -; - LHLD RINGPOS ;get current ring position - XCHG ;... in DE (don't advance) -; BR MASS$OLP1 ;loop until thru ring list - JMP MASS$OLP1 ; -; -; Do Mass Copy - Current File Copy -; -MASS$OC: - CALL COPY ;do copy -; BR MASS$OLP ;loop until thru ring list - JMP MASS$OLP ; -; -; Exit Mass Operation Loop -; -MASS$OLX: - LHLD SRINGPOS ;reset ring position - SHLD RINGPOS - LDA MASSOP ; (if delete, restart) -; ORA A ;NZ=delete -; JNZ RUNSH2 - CPI 'D' ; check if delete - JZ RUNSH2 ; else either print or copy - LHLD LOCBEG ;copy, so reset local ring - JMP JFW0A ;rescreen - -; -; COMMAND: C -; -; Copy source file at current 'ring' position to another drive. set-up -; fcb's and buffer area and check for correct keyboard inputs. contains -; auto-crc file copy verification. -; -FCOPY: -; -; Set Flags for First Time Thru and No Mass Copy -; - XRA A ;A=0 - STA FIRST$M ;set for prompt for destination - STA MFLAG ;not a mass copy -; -; Do Copy -; - CALL COPY ;do copy of file at RINGPOS -; -; Advance to Next File -; - JMP FORWARD ;advance to next file -; -; Copy File at RINGPOS -; -COPY: - LXI H,0 ;initialize storage for.. - SHLD CRCVAL ;..'crc' working value. - CALL RINGFCB ;move from 'ring' to 'sfcb' - LXI H,S$FCB+12 ;set pointer to source extent field - CALL INITFCB - MVI B,32 ;copy source 'fcb' to destination 'fcb' - LXI H,S$FCB+1 ;from point.. - LXI D,D$FCB+1 ;..to point.. - CALL MOVE ;..move across. - LXI D,S$FCB ;open file for reading - MVI C,OPEN ;open function - CALL BDOS - INR A ; 0ffh --> 00h if bad open - JZ FNF ;file not found -; -; Source File is Open -- If first time thru, get dest dir -; -COPY2: - LDA FIRST$M ;by-pass prompt, drive/user compatibility.. - ORA A ;..test, and disk reset after.. - BRNZ COPY3M ;..1st time thru in mass-copy mode. - DCR A ;A=0FFH - STA FIRST$M ;set not first time any more - CALL CPRMPT ;prompt for drive selection - DB 'Copy to DIR: ',0 - CALL DEF$D$U -; -; Check to ensure that either drives or user areas are different -; - LDA FCB ;get requested drive from 'fcb' and.. - MOV B,A ;..put into b-reg for.. - LDA S$FCB ;..comparison - CMP B - BRNZ COPY3 ;branch if different - LDA R$U$A ;requested user area --> rua - MOV B,A - LDA C$U$A ;current user area --> cua - CMP B - BRNZ COPY3 - CALL ERMSG ;if not, show error condition: - DB 'Src DIR = Dest DIR',0 - JMP LOOP ;try again? -; -; First File Copy - Reset System -; -COPY3: - CALL RESET ;make sure disk is read/write - CALL DLOGIN ;return home -; -; Nth File Copy - Copy without Resetting System -; -COPY3M: - LDA FCB ;put requested drive into.. - STA D$FCB ;..place in destination fcb (used to log in) - LDA R$U$A ;toggle to.. - CALL SET$USR ;..requested user area. - LXI D,D$FCB ;search for duplicate - MVI C,SRCHF ; 'search first' function - CALL BDOS - INR A ;if not found, 0ffh --> 00h. then.. - BRZ COPY5 ;go to 'make' function for new file. - LDA MFLAG ;auto-erase.. - ORA A ;..if.. - BRZ COPY4M ;..in mass-copy mode. - CALL ERMSG ;If found, ask to replace: - DB 0 - LXI H,D$FCB+1 - CALL PRFN - CALL VPRINT - DB ' Exists on Dest -- Erase (Y/N)? ',0 - CALL KEYIN ;get answer - CPI 'Y' ;if yes, then delete and copy ... - BRZ COPY4M ;... else fall thru to CUA$LOG and exit -; -; Log into Current User Area -; -CUA$LOG: - LDA C$U$A ;reset to current user area - JMP SET$USR ;set user and return to caller - -; -; Erase destination file and proceed -; -COPY4M: -; -; Set File Attributes -; - LXI H,D$FCB ;pt to FCB - CALL ATTRIB ;clear bytes in FCB and set attr of file - BRZ CUA$LOG ;return to caller if R/W not permitted -; -; Delete old file at dest -; - LXI D,D$FCB ;delete file already existing - MVI C,ERASE ;erase function - CALL BDOS -; -; Create new file at dest -; -COPY5: - LXI D,D$FCB ;create new file and open for writing - MVI C,MAKE ;make function - CALL BDOS - INR A ;if directory full, 0ffh --> 00h. - BRNZ COPY6 ;if not, branch. - CALL ERMSG - DB 'Dest Dir Full',0 - JMP LOOPFN ;if error, back to ring processor. -; -; Perform Copy -; -COPY6: - CALL CPRMPT - DB 'Copying File ',0 - LXI H,D$FCB+1 ;print file name - CALL PRFNSX - CALL VPRINT - DB ' to ',0 - LDA D$FCB ;print dest DU - ADI '@' - CALL COUT ;print disk - LDA R$U$A ;get user - CALL PAFDC ;print user - MVI A,':' - CALL COUT - XRA A ;clear 'eof'.. - STA EOFLAG ;..flag. -COPY6A: - CALL CUA$LOG ;current user area - LXI H,0 ;clear current-record.. - SHLD REC$CNT ;..counter. - LHLD BUFSTART ;set buffer start pointer.. - SHLD BUF$PT ;..to begin pointer. -; -; read source file -- fill buffer memory or stop on 'eof' -- update 'crc' -; on-the-fly -; -COPY7: - LHLD BUF$PT ;set dma address to buffer pointer - XCHG ; de-pair --> dma address - MVI C,SETDMA - CALL BDOS - LXI D,S$FCB ;source 'fcb' for reading - MVI C,READ ;record read function - CALL BDOS - ORA A ; 00h --> read okay - BRZ S$RD$OK - DCR A ;eof? - BRZ COPY8 ;yes, end-of-file, set 'eof' flag. - CALL ERMSG - DB 'Read Error',0 - JMP LOOPFN -; -; Read OK - Update CRC -; -S$RD$OK: - LHLD BUF$PT - MVI B,128 -COPY7A: - MOV A,M ;get character and.. - CALL UPDCRC ;..add to 'crc' value. - INX H - DCR B - BRNZ COPY7A ;loop 'till record read finished -; -; Update Buffer Ptr and Record Count -; - LHLD BUF$PT ;bump buffer pointer.. - LXI D,128 ;..by.. - DAD D ;..one.. - SHLD BUF$PT ;..record. - LHLD REC$CNT ;bump buffer.. - INX H ;..record count and.. - SHLD REC$CNT ;..store. - XCHG ;ready to compare to.. -; -; Check for Full Buffer -; - LHLD REC$MAX ;..maximum record count (full-buffer). - CALL CMPDEHL ;compare - BRNZ COPY7 ;if not full, get next record. - BR COPY9 ;full, start first write session. -; -; Indicate end-of-file read -; -COPY8: - MVI A,TRUE ;set 'eof' flag - STA EOFLAG -; -; Write source file from memory buffer to destination -; -COPY9: - LDA R$U$A ;set user to requested.. - CALL SET$USR ;..area. - LHLD BUFSTART ;adjust buffer pointer.. - SHLD BUF$PT ;..to start address. -COPY10: - LHLD REC$CNT ;buffer empty? - MOV A,H - ORA L - BRZ COPY11 ;buffer empty, check 'eof' flag. - DCX H ;dec buffer record count for each write - SHLD REC$CNT - LHLD BUF$PT ;set up dma address - PUSH H ;save for size bump - XCHG ;pointer in de-pair - MVI C,SETDMA - CALL BDOS - POP H - LXI D,128 ;bump pointer one record length - DAD D - SHLD BUF$PT - LXI D,D$FCB ;destination file 'fcb' - MVI C,WRITE ;write record function - CALL BDOS - ORA A ; 00h --> write okay - BRZ COPY10 ;okay, do next record. else.. - CALL ERMSG ;..say disk write error. - DB 'Copy Disk Full',0 -; -; Error in Write -- Delete Destination File and Abort -; -C$ERA: - LXI D,D$FCB ;delete.. - MVI C,ERASE ;..partial.. - CALL BDOS ;..from directory. - JMP LOOPFN ;back to ring -; -; Destination Buffer Written - Check for End -; -COPY11: - LDA EOFLAG ;buffer all written, check for 'eof'. - ORA A - JZ COPY6A ;branch to read next buffer full - LXI D,D$FCB ;point at 'fcb' for file closure - MVI C,CLOSE - CALL BDOS - INR A ;if no-close-error then.. - BRNZ CRC$CMP ;..compare file crc's. - CALL ERMSG - DB 'Copy Close Error',0 - JMP C$ERA -; -; Read Destination File and Compare CRCs -; -CRC$CMP: - LHLD CRCVAL ;transfer 'crc' value to.. - SHLD CRCVAL2 ;..new storage area. - LXI H,0 ;clear working storage.. - SHLD CRCVAL ;..to continue. - LXI D,TBUF - MVI C,SETDMA - CALL BDOS - LXI H,D$FCB+12 - CALL INITFCB - LXI D,D$FCB - MVI C,OPEN - CALL BDOS - INR A ; 0ffh --> 00h if bad open - JZ BADCRC ;if bad open, just say 'bad-crc'. - XRA A ;zero 'fcb'.. - STA D$FCB+32 ;..'cr' field. -CRCWF1: - LXI D,D$FCB - MVI C,READ - CALL BDOS - ORA A ;read okay? - BRZ D$RD$OK ;yes, read more. - DCR A ;eof? - BRZ FINCRC ;yes, finish up and make 'crc' comparison. - CALL ERMSG - DB 'Copy Read Error',0 - JMP LOOP -; -; Block Read OK - Update CRC -; -D$RD$OK: - LXI H,TBUF - MVI B,128 -CRCWF2: - MOV A,M ;get character to.. - CALL UPDCRC ;..add to 'crc' value. - INX H - BJNZ CRCWF2 - BR CRCWF1 -; -; Read Complete - Check CRCs -; -FINCRC: - LHLD CRCVAL ;put written-file 'crc' into.. - XCHG ;..de-pair. - LHLD CRCVAL2 ;put read-file 'crc' and.. - CALL CMPDEHL ;..compare 'de/hl' for equality. - BRNZ BADCRC ;if not zero, show copy-error message. - CALL VPRINT ;if zero, show 'verified' message. - DB ' -- Verified',0 - JMP CUA$LOG ;return to current user and return to caller -; -; Error on Copy -; -BADCRC: - CALL CUA$LOG ;return to current user - CALL ERMSG - DB ' -- CRC Error',0 - JMP LOOP ;abort - -; -; clear attributes of file (HL) and set attributes on disk -; return code of 0FFH (NZ) indicates OK to proceed, 0 (Z) indicates abort -; -ATTRIB: - PUSH H ;save regs - PUSH H - PUSH D - LHLD DUM$FCB ;init FCB - LXI D,12 ;12 bytes in - DAD D - POP D - CALL INITFCB - LHLD DUM$FCB ;pt to dummy FCB - XCHG ;... in DE - POP H - MVI B,12 ;copy - PUSH D - CALL MOVE - POP D ;pt to FCB - MVI C,SRCHF ;look for file - CALL BDOS - INR A ;file not found = 0 - POP H - RZ ;abort if no file - PUSH H ;save ptr - DCR A ;adjust - RRC ;right 3 bits to indicate offset into BUFF - RRC - RRC - LXI H,TBUF ;pt to buffer - ADD L ;pt to FCB of file - ADI 9 ;pt to R/O Byte - MOV L,A - MOV A,M ;get byte - ANI 80H ;extract R/O Bit - BRZ ATTRIB0 - CALL ERMSG - DB 0 - POP H - PUSH H - INX H ;pt to file name - CALL PRFN ;print file name - CALL VPRINT - DB ' is R/O -- Erase (Y/N)? ',0 - CALL KEYIN - CPI 'Y' - JZ ATTRIB0 - POP H - XRA A ;error return - RET -ATTRIB0: - POP H ;get ptr - PUSH H ;save ptr - INX H ;pt to first char - MVI B,11 ;11 Bytes -ATTRIB1: - MOV A,M ;get byte - ANI 7FH ;mask it - MOV M,A ;put byte - INX H ;pt to next - DCR B ;count down - JNZ ATTRIB1 - POP D ;pt to FCB - MVI C,ATTR - CALL BDOS - XRA A - DCR A ;no error return - RET - -; -;************************************************** -; -; CRC subroutines -; -; initialize tables for fast crc calculations - -INITCRC: - LHLD CRCTBL - MVI C,0 ;table index -GLOOP: - XCHG - LXI H,0 ;initialize crc register pair - MOV A,C - PUSH B ;save index in c-reg - MVI B,8 - XRA H - MOV H,A -LLOOP: - DAD H - BRNC LSKIP - MVI A,10H ;generator is x^16 + x^12 + x^5 + x^0 as.. - XRA H ;..recommended by ccitt for asynchronous.. - MOV H,A ;..communications. produces the same.. - MVI A,21H ;..results as public domain programs.. - XRA L ;..chek, comm7, mdm7, and modem7. - MOV L,A -LSKIP: - BJNZ LLOOP - POP B - XCHG ;de-pair now has crc, hl pointing into table. - MOV M,D ;store high byte of crc.. - INR H - MOV M,E ;..and store low byte. - DCR H - INX H ;move to next table entry - INR C ;next index - BRNZ GLOOP - RET - -UPDCRC: - PUSH B ;update 'crc'.. - PUSH H ;..accumulator.. - LHLD CRCVAL ;pick up partial remainder - XCHG ;de-pair now has partial - MVI B,0 - XRA D - MOV C,A - LHLD CRCTBL - DAD B - MOV A,M - XRA E - MOV D,A - INR H - MOV E,M - XCHG - SHLD CRCVAL - POP H - POP B - RET - -; -;************************************************** -; -; WORKHORSE Routines -; -; conin routine (waits for response) -; -KEYIN: - CALL CIN ;get input - CALL CAPS ;capitalize - JMP COUT ;echo - -; direct console input w/o echo (waits for input) - -DKEYIN: - CALL CIN ;get char from BIOS - JMP CAPS ;capitalize - -; convert keyboard input to upper case - -CONVERT: - LHLD CMDBUF ; 'current keyboard buffer length'.. - INX H - MOV B,M ;..to b-reg. - MOV A,B - ORA A ;if zero length, skip conversion. - JZ COMCAN -CONVLP: - INX H ;point at character to capitalize - MOV A,M - CALL CAPS - MOV M,A ;put back into buffer - BJNZ CONVLP - RET -; -; Fill buffer with 'spaces' with count in b-reg -; -FILL: - MVI M,' ' ;put in space character - INX H - BJNZ FILL ;no, branch. - RET -; -; Ignore leading spaces (ls) in buffer, length in c-reg. -; -UNSPACE: - LDAX D ;get character - CPI ' ' - RNZ ;not blank, a file is entered. - INX D ;to next character - DCR C - JZ COMCAN ;all spaces --> command recovery error - BR UNSPACE -; -; Check for legal filename character -- return with carry set if illegal -; -CKLEGAL: - LDAX D ;get character from de-pair - INX D ;point at next character - CPI ' ' ;less than space? - RC ;return carry if unpermitted character - PUSH H - PUSH B - CPI '[' ;if greater than 'z', exit with.. - BRNC CKERR ;..carry set. - MVI B,CHR$TEND-CHR$TBL - LXI H,CHR$TBL -CHR$LP: - CMP M - BRZ CKERR - INX H - BJNZ CHR$LP - ORA A ;clear carry for good character - POP B - POP H - RET - -CKERR: - POP B - POP H - STC ;error exit with carry set - RET - -CHR$TBL: - DB ',',':',';','<','=','>' ;invalid character table -CHR$TEND: - DS 0 -; -; Print file name in S$FCB -; -PRFNSX: - PUSH H ;save regs - PUSH B - BR PRFNS0 -PRFNS: - PUSH H ;affect only PSW - PUSH B - LXI H,S$FCB+1 -PRFNS0: - CALL PRFN ;print file name - POP B ;restore - POP H - RET -; -; Print file name pted to by HL -; -PRFN: - MVI B,8 ;8 chars - CALL PRFNS1 - MVI A,'.' - CALL COUT - MVI B,3 ;file type and fall thru -PRFNS1: - MOV A,M ;get char - CALL COUT - INX H ;pt to next - BJNZ PRFNS1 - RET -; -; Copy filename from RINGPOS to SFCB -; -RINGFCB: - LHLD RINGPOS ;move name from ring to source 'fcb' - LXI D,S$FCB ;place to move filename and.. - MVI B,12 ;..amount to move (fall thru to MOVE) -; -; move subroutine -- move b-reg # of bytes from hl-pair to de-pair -; -MOVE: - MOV A,M ;get hl-pair referenced source byte - ANI 7FH ;strip attributes - STAX D ;put to de-pair referenced destination - INX H ;fix pointers for next search - INX D - BJNZ MOVE - RET - -MOVEB: - PUSH H ;SAVE HL, DE - PUSH D - CALL MOVE - POP D ;RESTORE DE, HL - POP H - RET -; -; Initialize FCB system fields (entry with hl-pair pointing to FCB) -; -INITFCB: - MVI B,21 ;fill ex, s1, s2, rc, cr counters with zeros. -INITLP: - MVI M,0 ;put zero (null) in memory - INX H - BJNZ INITLP - RET -; -; Disk system reset -- login requested drive -; -RESET: - MVI C,RESETDK ;reset system - CALL BDOS - LDA R$DR ;make requested drive.. -SET$DR: - MOV E,A ;..current - MVI C,LOGIN - JMP BDOS ;return to caller -; -; Set/reset (or get) user area (call with binary user area in a-reg) -; -SET$USR: - MOV E,A ;user number in E -GET$USR: - MVI C,SGUSER - JMP BDOS ;return to caller -; -; Compare de-pair to hl-pair and set flags accordingly -; -CMPDEHL: - MOV A,D ;see if high bytes set flags - CMP H - RNZ ;return if not equal - MOV A,E - CMP L ;low bytes set flags instead - RET -; -; Shift hl-pair b-reg bits (-1) to right (divider routine) -; -SHIFTLP: - DCR B - RZ - MOV A,H - ORA A - RAR - MOV H,A - MOV A,L - RAR - MOV L,A - BR SHIFTLP - -; -; Determine free storage remaining on selected drive -; -FRESTOR: - MVI C,INQDISK ;determine current drive - CALL BDOS ;returns 0 as a:, 1 as b:, etc. - INR A ;make 1 --> a:, 2 --> b:, etc. - STA FCB - MVI C,GETPARM ;current disk parameter block - CALL BDOS - INX H ;bump to.. - INX H - MOV A,M ;..block shift factor. - STA BSHIFTF ; 'bsh' - INX H ;bump to.. - MOV A,M ;..block mask. - STA B$MASK ; 'blm' - INX H ;bump to.. - INX H ;..get.. - MOV E,M ;..maximum block number.. - INX H ;..double.. - MOV D,M ;..byte. - XCHG - SHLD B$MAX ; 'dsm' - MVI C,INQALC ;address of allocation vector - CALL BDOS - XCHG ;get its length - LHLD B$MAX - INX H - LXI B,0 ;initialize block count to zero -GSPBYT: - PUSH D ;save allocation address - LDAX D - MVI E,8 ;set to process 8 bits (blocks) -GSPLUP: - RAL ;test bit - BRC NOT$FRE - INX B -NOT$FRE: - MOV D,A ;save bits - DCX H - MOV A,L - ORA H - BRZ END$ALC ;quit if out of blocks - MOV A,D ;restore bits - DCR E ;count down 8 bits - BRNZ GSPLUP ;branch to do another bit - POP D ;bump to next count.. - INX D ;..of allocation vector. - BR GSPBYT ;process it - -END$ALC: - POP D ;clear alloc vector pointer from stack - MOV L,C ;copy # blocks to hl-pair - MOV H,B - LDA BSHIFTF ;get block shift factor - SUI 3 ;convert from sectors to thousands (k) - BRZ PRT$FRE ;skip shifts if 1k blocks -FREK$LP: - DAD H ;multiply blocks by k-bytes per block - DCR A ;multiply by 2, 4, 8, or 16. - BRNZ FREK$LP -PRT$FRE: - SHLD DISKSP ;save disk space - RET -; -; Print free space on disk -; -PRINT$FRE: - CALL ERMSG ;position and set flags - DB 0 - LHLD DISKSP - CALL PHLFDC ; # of free k-bytes in hl-pair - CALL VPRINT - DB 'K Bytes on Disk',0 - RET - -; -;************************************************** -; -; MESSAGE Routines -; -; Print VFILER Banner -; -BANNER: - CALL VCLS ;clear screen - LXI H,BANADR - CALL GOTOXY - CALL VPRINT ;print banner - DB 'VFILER, Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0' - IF Z80 - DB ' ' -; DB DIM ; - DB '[Z80 Code]' -; DB BRIGHT ; - ELSE - DB ' ' -; DB DIM ; - DB '[8080 Code]' -; DB BRIGHT ; - ENDIF - DB 0 - RET -; -; Home the Cursor -; -CUR$FIRST: - LXI H,CURHOME ; HOME ADDRESS - SHLD CURAT ; SET CURSOR POSITION - JMP GOTOXY -; -; Last File Position -; -CUR$LAST: - LHLD RINGPOS ; ADVANCE - SHLD LOCPOS ; SET LOCAL POSITION -CL0: - LXI D,13 - DAD D - XCHG - LHLD LOCEND ; END OF LOCAL RING? - CALL CMPDEHL - RZ - XCHG ; NEW POSITION - SHLD LOCPOS - PUSH H ; SAVE POSITION - CALL CUR$NEXT ; ADVANCE CURSOR - POP H ; GET POSITION - BR CL0 -; -; Advance the Cursor -; -CUR$NEXT: - LHLD CURAT ; COMPUTE NEW POSITION - MOV A,L ; CHECK FOR NEW LINE - ADI 19 ; SIZE OF EACH ENTRY - CPI 70 - BRNC CN1 ; ADVANCE TO NEXT LINE - MOV L,A ; NEW POSITION - SHLD CURAT - JMP GOTOXY -CN1: - MOV A,H ; GET LINE - LXI H,CURHOME ; GET COL - MOV H,A ; SET LINE AND FALL GO TO CUR$DOWN - SHLD CURAT - BR CUR$DOWN -; -; Back Up the Cursor -; -CUR$BACK: - LXI H,CURHOME ; GET HOME - XCHG ; ... IN DE - LHLD CURAT - CALL CMPDEHL ; COMPARE - BRZ CUR$LAST ; GOTO END IF LAST - MOV A,L ; CHECK FOR FIRST COL - CMP E - BRZ CB1 - SUI 19 ; BACK UP ONE COL - MOV L,A - SHLD CURAT ; NEW POS - JMP GOTOXY -CB1: - MOV A,E ; GET HOME COL - ADI 19*3 ; GET LAST COL - MOV L,A - DCR H ; PREV LINE - SHLD CURAT - JMP GOTOXY -; -; Move Cursor Down One Line -; -CUR$DOWN: - LXI H,CURHOME ; GET HOME ADDRESS - MOV B,H ; LINE IN B - LHLD CURAT ; GET CURRENT ADDRESS - INR H ; MOVE DOWN - MOV A,H ; CHECK FOR TOO FAR - SUB B - CPI EPS/4 - BRNC CD1 - SHLD CURAT ; OK, SO SET POSITION - JMP GOTOXY -CD1: - MOV A,L ; GET COL - LXI H,CURHOME - MOV L,A - SHLD CURAT - JMP GOTOXY -; -; Refresh Screen -; -REFRESH: - LHLD CURAT ; SAVE CURSOR AND RING POSITIONS - SHLD SCURAT - LHLD RINGPOS - SHLD SRINGPOS - CALL BANNER ; PRINT BANNER -; - IF BIHELP ;built-in help? - LDA HELPDISP ;DISPLAY HELP? - ORA A ;0=NO - BRZ REF1 - CALL HELPMSG ;PRINT HELP MESSAGE - BR REF2 -REF1: - ENDIF ;BIHELP -; - CALL DISPFILES ; DISPLAY FILES -REF2: - LXI H,DUADR ; DU ADDRESS - CALL GOTOXY - LXI H,C$DR ; PT TO CURRENT DRIVE (FOLLOWED BY CUR USER) - CALL STNDOUT ; TURNON HIGHLIGHTING - CALL PRDU ; PRINT DU:DIR> - CALL STNDEND ; TURN OFF HIGHLIGHTING - LXI H,CPMADR ; COMMAND PROMPT MESSAGE - CALL GOTOXY - CALL VPRINT ; PROMPT WITH DRIVE PREFIX - DB DIM - DB 'Command (? = ',0 - LDA HELPDISP ; IN HELP NOW? - ORA A ; 0=NO - BRZ REF3 - CALL VPRINT - DB 'Files',0 - BR REF4 -REF3: - CALL VPRINT - DB 'Help',0 -REF4: - CALL VPRINT - DB ')?',BRIGHT,0 - LHLD SCURAT ; RESTORE CURSOR AND RING POSITIONS - SHLD CURAT - LHLD SRINGPOS - SHLD RINGPOS - CALL SETCUR ; RESTORE CURSOR ON SCREEN - RET -; -; Print DU pted to by HL -; -PRDU: - PUSH H ; SAVE REGS - PUSH B - MOV A,M ; GET DRIVE - MOV B,A - ADI 'A' ; CONVERT TO LETTER - CALL COUT - INX H ; PT TO USER - MOV A,M ; GET USER - MOV C,A - CALL PAFDC ; PRINT USER AS FLOATING - MVI A,':' ; PRINT COLON - CALL COUT - CALL DUTDIR ; SCAN NAMED DIRECTORY TABLE - BRZ PRDU2 ; NO NAME? - MVI B,8 ; PRINT NAME -PRDU1: - MOV A,M ; GET CHAR - CPI ' ' ; DONE IF SPACE ENCOUNTERED - BRZ PRDU3 - CALL COUT - INX H - BJNZ PRDU1 - BR PRDU3 -PRDU2: - CALL VPRINT - DB 'Noname',0 -PRDU3: - POP B ; RESTORE REGS - POP H - RET - -; -; Refresh File Display -; -DISPFILES: - CALL CUR$FIRST ; POSITION CURSOR AT FIRST POSITION - LHLD LOCBEG ; PT TO FIRST FILE NAME - SHLD LOCPOS ; SAVE LOCAL POSITION -DSPF1: - LHLD LOCEND ; AT END? - XCHG - LHLD LOCPOS - CALL CMPDEHL - JZ CUR$FIRST ; POSITION AT FIRST ENTRY AND RETURN - MVI B,4 ; 4 SPACES - MVI A,' ' -DSPF2: - CALL COUT - BJNZ DSPF2 - PUSH H ; SAVE CURRENT LOCAL POSITION IN RING -; INX H ; PT TO FILE NAME -; CALL PRFN ; PRINT FILE NAME -; MOV A,M ; PRINT TAG -; CALL COUT - CALL HILITFN ; brigten filename - POP H ; GET CURRENT LOCAL POSITION - LXI D,13 - DAD D - SHLD LOCPOS - CALL CUR$NEXT ; ADVANCE CURSOR - BR DSPF1 - -HILITFN: ; - PUSH H ; save for later - LXI D,12 ; locate the tag byte - DAD D ; - MOV A,M ; put tag byte in a for store - STA TAGFLG ; - POP H ; back to beginning of filename - INX H ; point to filename - LDA TAGFLG ; - CPI ' ' ; if space don't highlight - CNZ STNDOUT ; set highlight on - CALL PRFN ; put out filename - MOV A,M ; get tag byte - CALL COUT ; and output it - LDA TAGFLG ; - CPI ' ' ; - CNZ STNDEND ; turn off highlighting - RET ; -; Position Cursor at CURAT -; -SETCUR: - LDA HELPDISP ; NOGO IF IN HELP DISPLAY - ORA A - RNZ - LHLD CURAT - CALL GOTOXY - CALL VPRINT - DB DIM,'-->',BRIGHT,0 - RET -; -; Clear Cursor -; -CLRCUR: - LDA HELPDISP ; NOGO IF IN HELP DISPLAY - ORA A - RNZ - LHLD CURAT - CALL GOTOXY - CALL VPRINT - DB ' ',0 - RET -; -; Command Prompt -; -CPRMPT: - LXI H,CPADR ; GET ADDRESS -MPRINT: - PUSH H ; SAVE ADDRESS - CALL GOTOXY - PUSH B -; MVI B,76-(CPADR MOD 255) - LDA CWIDTH ; find screen length in chars - SUI (CPADR MOD 256)-1 ; determine number of char. to blank - MOV B,A ; put number in b - CALL VEREOL ; ERASE TO EOL - POP B - POP H ; GET ADDRESS - CALL GOTOXY ; POSITION CURSOR - JMP VPRINT ; PRINT MESSAGE AND RETURN -; -; Working Message -; -WORKMSG: - CALL ERMSG - DB DIM,'Working ...',BRIGHT,0 - RET -; -; Error Message -; -ERMSG: - MVI A,0FFH ; SET ERROR MESSAGE FLAG - STA ERMFLG - LXI H,ERADR ; GET ADDRESS - BR MPRINT -; -; Print File Size Info -; -FSNOTE: - CALL ERMSG ; USE THIS ROUTINE - DB 'Size of ',0 - RET -; -; Position for File Size Print -; -ATFS: - LXI H,FSADR+13 ; POSITION FOR PRINT OF FILE SIZE - JMP GOTOXY -; -; Clear Error Message -; -ERCLR: - XRA A ; CLEAR FLAG - STA ERMFLG - LXI H,ERADR ; POSITION - CALL GOTOXY - PUSH B -; MVI B,76-(ERADR MOD 255) - LDA CWIDTH ; find screen length in chars - SUI (ERADR MOD 256)-1 ; determine number of char. to blank - MOV B,A ; put number in b - CALL VEREOL ; ERASE TO EOL - POP B - RET -; -; Position at Command Prompt and Clear It -; -ATCMD: - LXI H,CPADR ; POSITION - CALL GOTOXY - PUSH B -; MVI B,76-(CPADR MOD 255) - LDA CWIDTH ; find screen length in chars - SUI (CPADR MOD 256)-1 ; determine number of char. to blank - MOV B,A ; put number in b - CALL VEREOL ; CLEAR MESSAGE - POP B - LXI H,CPADR ; REPOSITION - JMP GOTOXY -; -; Position at Bottom of Screen and Prompt for Continuation -; -BOTTOM: - LXI H,BOTADR ; POSITION - CALL GOTOXY -; -; Prompt for Continuation -; -SAK: - CALL VPRINT - DB DIM,'Strike Any Key -- ',BRIGHT,0 - JMP KEYIN - - -; -; S T O R A G E -; -; Initialized -; -HEADMSG: - DB 'File: ',0 -MOREHELP: - DB 'HELP ' ;HELP Command for further info - VFNAME ;VFILER Name - DB 0 -MACFCB: - DB 0 - VFNAME ;VFILER Name - VFNFILL ;Filler - DB 'CMD' -FILERCMD: - VFNAME ;VFILER Name - VFNFILL ;Filler - DB ' ' ;one space -FILE$D: - DB 'x' -FILE$U: - DB 'xx' - DB ':' ;colon - DB 0 -JOKER: - DB '???????????' ;*.* equivalent -FIRST$M: - DB FALSE ;1st time thru in mass-copy mode -MFLAG: - DB TRUE ;multiple file copy flag-->0 for mass copy -TAG$TOT: - DW 0 ;summation of tagged file sizes -CMDBUF: - DS 2 ;command buffer maximum length, usage, and.. -; -; Uninitialized -; -STACK: - DS 2 -LWIDTH: - DS 1 ;WIDTH OF LINE -LTPP: - DS 1 ;LINES OF TEXT PER PAGE -LSPP: - DS 1 ;LINES TO SKIP PER PAGE -LFFEED: - DS 1 ;PRINTER CAN FORMFEED? (0=NO) -CWIDTH: - DS 1 ;WIDTH OF SCREEN -CTPP: - DS 1 ;LINES OF TEXT PER SCREEN -CSPP: - DS 1 ;LINES TO SKIP PER SCREEN -ALPHA: - DS 1 ;alphabetization flag (0=type and name, 0FFH= - ;...name and type) -B$MAX: - DS 2 ;highest block number on drive -B$MASK: - DS 1 ;sec/blk-1 -BSHIFTF: - DS 1 ;# of shifts to multiply by sec/blk -BUFENTRY: - DS 2 ;buffer start -BUF$PT: - DS 2 ;copy buffer current pointer.. -BUFSTART: - DS 2 ;..and begin pointer. -CANFLG: - DS 1 ;no-file-found cancel flag -C$DR: - DS 1 ;'current drive' -C$U$A: - DS 1 ;'current user area' (must follow C$DR) -CHARCNT: - DS 1 ;character count for tab expansion -CON$LST: - DS 1 ;bdos function storage -CRCTBL: - DS 2 ;tables for 'crc' calculations -CRCVAL: - DS 2 ;2-byte 'crc' value of working file and.. -CRCVAL2: - DS 2 ;..of finished source read-file. -CURAT: - DS 2 ;current cursor position -DELCODE: - DS 1 ;deletion code (0=delete not done) -D$FCB: - DS 33 ;fcb for destination file/new name if rename -DISKSP: - DS 2 ;space remaining on disk -DUM$FCB: - DS 2 ;dummy FCB for file attributes -DRLET: - DS 1 ;scratch for drive letter -EOFLAG: - DS 1 ;file copy loop 'eof' flag -ERMFLG: - DS 1 ;error message present flag -H$DR: - DS 1 ;home drive -H$U$A: - DS 1 ;home user area (must follow H$DR) -HELPDISP: - DS 1 ;display help screen (0=no) -LPSCNT: - DS 1 ;lines-per-screen for 'view' -LOCBEG: - DS 2 ;local beginning of ring -LOCEND: - DS 2 ;local end of ring -LOCPOS: - DS 2 ;local ring position (temp) -MASSOP: - DS 1 ;mass file operation code (0=no) -MAXDR: - DS 1 ;max driver letter -MDFLG: - DS 1 ;mass delete verify flag -O$USR: - DS 1 ;store initial user area for exit -R$DR: - DS 1 ;'requested drive' -RCNT: - DS 2 ;# of records in file and.. -REC$CNT: - DS 2 ;..currently in ram buffer. -REC$MAX: - DS 2 ;maximum 128-byte record capacity of buffer -RING: - DS 2 ;ptr to beginning of ring -RINGI: - DS 2 ;ring sort pointer -RINGJ: - DS 2 ;another ring sort pointer -RINGEND: - DS 2 ;current ring end pointer -RINGPOS: - DS 2 ;current ring position in scan -R$U$A: - DS 1 ;'requested user area' -SCURAT: - DS 2 ;save cursor position -S$FCB: - DS 36 ;fcb for source (random record) file -SRINGPOS: - DS 2 ;save ring position -TAGFLG: ; temp for tag - DS 1 ; -T$DR: - DS 1 ;temp disk -TEST$RT: - DS 1 ;intermediate right-justify data -T$U$A: - DS 1 ;temp user -T$UN$FG: - DS 1 ;tag/untag file summation switch -USER: - DS 1 ;temp user buffer -VIEWFLG: - DS 1 ; (00h) 1-->to list/punch else to crt 'view' - - END - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/VFILR4-1.LBR b/Source/Images/d_bp/u15/VFILR4-1.LBR deleted file mode 100644 index dfb7af8a..00000000 Binary files a/Source/Images/d_bp/u15/VFILR4-1.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/VFILR4-2.LBR b/Source/Images/d_bp/u15/VFILR4-2.LBR deleted file mode 100644 index f5682fa1..00000000 Binary files a/Source/Images/d_bp/u15/VFILR4-2.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/VMENU.COM b/Source/Images/d_bp/u15/VMENU.COM deleted file mode 100644 index af4eee94..00000000 Binary files a/Source/Images/d_bp/u15/VMENU.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/VMENU.HLP b/Source/Images/d_bp/u15/VMENU.HLP deleted file mode 100644 index 2db7bd92..00000000 --- a/Source/Images/d_bp/u15/VMENU.HLP +++ /dev/null @@ -1,903 +0,0 @@ -; - - - The ZCPR3 VMENU Shell - - -- ZCPR3 Utilities -- - 1 - VMENU - 2 - VMENUCK - - -- Using VMENU -- -- Programming VMENU -- - U - Using VMENU P - Programming *.VMN Files - S - Summary of User Cmds C - *.VMN Internal Commands - E - VMENU Error Messages M - Programming Cmd Summary - Z - VMENU and ZCPR3 - -:1 -Command: VMENU 1.0 - -Syntax: - VMENU <-- run MENU.VMN on all files in dir -or - VMENU afn <-- run MENU.VMN on files selected by afn -or - VMENÕ afî ufî <-- ruî menõ (ufn© on selecteä files - -Function: - - VMENÕ  ió thå ZCPR³ menõ front-enä processor®  Iô ió á -ZCPR³ Shelì whicè readó á *.VMÎ filå anä processeó  commandó -froí it. - -Options: None - -Comments: - VMENÕ  ió á truå ZCPR³ Shell®  Iô ió describeä iî thió -HELÐ file. - Selected Error Messages: - - "Nï Commanä Line¢ meanó thaô thå ZCPR³ Systeí doeó  noô -supporô  aî externaì Commanä Linå Buffer®  VMENÕ musô  havå -thió tï run. - - "Nï  Shelì Stack¢ meanó thaô thå ZCPR³ Systeí doeó  noô -supporô á Shelì Stack® VMENÕ musô havå thió tï run. - - "Shelì  Stacë Full¢ meanó thaô thå Shelì Stacë ió  fulì -anä VMENÕ cannoô pusè itselæ ontï thå stack. - - "Shelì  Stacë Size¢ meanó thaô thå Shelì Stacë elementó -arå toï shorô foò VMENÕ tï storå itó parameters. - - "TPÁ  Full¢ meanó thaô therå ió noô enougè rooí iî  thå -TPÁ tï loaä thå *.VMÎ file. - -Examples of Use: - See this HELP file - - VMENÕ ió thå ZCPR³ Menu-Orienteä Commanä  Preprocessor® -Iô  actó aó á front-enä tï ZCPR3¬  providinç á menu-orienteä -useò interfacå tï ZCPR3® Itó functioî caî bå representeä bù -thå followinç diagram: - ------- ------- ------- ------- - |V | |Z | |B | |P | - User | M | | C | | D | | g | - Menu ---->| E |--->| P |--->| O |--->| m | - Command | N | | R | | S | | s | - | U| | 3| | | | | - ------- ------- ------- ------- - - Thå "Useò Menõ Command¢ ió á singlå characteò thaô  thå -useò  strikeó  whicè instructó VMENÕ tï perforí á  function® -Oncå  VMENÕ  beginó processinç thió function¬  iô  buildó  á -commanä  linå  foò ZCPR3¬  optionallù askinç  thå  useò  foò -furtheò  inpuô  (sucè aó á filå name)¬  anä theî passeó  thå -commanä  linå tï ZCPR³ viá thå Commanä Linå  Buffer®  ZCPR³ -theî runó thå commanä linå returnó tï VMENU. - - VMENÕ  buildó commanä lineó baseä oî simplå inpuô  froí -thå user®  Thå useò neeä neveò kno÷ whaô thå actuaì commanä -linå is® Thå commanä linå itselæ ió alwayó oæ thå form: - - - - Aó  aî example¬  á commanä builô bù VMENÕ tï  ruî  XDIÒ -witè  useò inpuô foò á filå namå specification¬  coulä  looë -likå thå following: - - XDIR - - - Wheî VMENÕ ió executed¬  iô lookó foò thå filå MENU.VMÎ -iî thå currenô directory®  Iæ iô findó one¬ iô loadó iô anä -beginó  processing®  Iæ  iô doeó noô finä  one¬  iô  simplù -exits®  Á  filå namå maù bå specifieä iî thå VMENÕ  commanä -linå tï selecô á filå otheò thaî MENU.VMN. - - Thå  MENU.VMΠ filå caî contaiî uð tï 25µ menuó  tï  bå -processeä bù VMENU®  Thå VMENÕ wilì begiî processinç aô thå -firsô menõ iî MENU.VMN. - - - VMENÕ  itselæ  ió á COÍ file¬  likå anù  otheò  prograí -undeò  ZCPR3®  Unlikå  mosô  otheò  programs¬  however¬  iô -generateó  commanä lineó tï bå executeä bù ZCPR³ anä  storeó -itó  returî commanä iî thå Shelì Stack®  Iî thió waù á looð -ió seô up: - - -->--+->- VMENU ->- ZCPR3 ->-+ - ^ v - | | - +-<- Command Line -<----+ - - Onlù  VMENÕ  itselæ  oò á ZCPR³ tooì  likå  SHCTRÌ  caî -terminatå thió loop® Iæ thå VMENÕ programmeò wishes¬ hå caî -seô  uð  thå MENU.VMÎ filå sï thaô thió looð wilì  neveò  bå -exited¬ oò hå caî seô uð thå filå tï allo÷ anyonå tï exiô aô -anù  timå oò jusô á speciaì persoî whï knowó á  passworä  tï -exiô  wheî  hå  wisheó to®  Therå ió á loô  oæ  flexibilitù -designeä intï thå system¬  anä iô wilì bå discusseä lateò iî -thå sectioî oî programminç MENU.VMÎ files. - Á  MENU.VMΠ filå caî bå seô uð tï  executå  anù  ZCPR³ -commanä oò sequencå oæ commands® Thå MENU.VMÎ filå caî alsï -bå seô uð tï noô allo÷ thå useò tï leavå VMENU¬ tï allo÷ hií -tï leavå VMENÕ aô will¬  oò tï allo÷ hií tï leavå VMENÕ onlù -iæ hå knowó á password. - - Thió  HELÐ filå ió divideä intï twï basiã  parts®  Thå -infï  sectionó  oî  "Usinç  VMENU¢  anä  "Summarù  oæ  VMENÕ -Commands¢ arå designeä tï bå reaä bù á persoî wantinç tï uså -VMENÕ  buô  noô wantinç tï learî ho÷ VMENÕ workó oò  ho÷  tï -prograí  it®  Theså sectionó describå ho÷ tï movå froí  onå -menõ  tï another¬  ho÷ tï issuå VMENÕ commands¬  anä ho÷  tï -leavå VMENÕ iæ thå optioî ió presenteä tï him. - - Thå  otheò  sectionó  oæ thió HELР filå  describå  thå -programminç  aspectó oæ VMENÕ anä arå intendeä tï bå useä aó -aî  onlinå referencå foò thå VMENÕ  programmer®  Thå  VMENÕ -commanä  programminç summarù ió especiallù usefuì iî thaô iô -provideó   á  summarù  oæ  thå  commandó  whicè  thå   VMENÕ -programmeò maù issuå tï VMENÕ withiî á *.VMÎ file. -:U - - Wheî VMENÕ ió firsô invoked¬  iô wilì bå installeä aó á -Shell¬   anä  controì  wilì  returî  tï  thå  ZCPR³  commanä -processoò  foò  thå  nexô commanä iî  thå  line®  Wheî  thå -commanä  linå ió exhausted¬  ZCPR³ wilì realizå thaô á shelì -has been installed and invoke VMENU as a shell. - - VMENÕ wilì theî comå up¬ loaä thå nameó oæ thå fileó iî -thå currenô disë directory¬  loaä thå menõ file¬ anä displaù -uð  tï sixteeî fileó anä thå firsô menõ iî thå menõ filå  tï -the user. The user will then be prompted for a command. - - Iæ  aô anù timå á Menõ Displaù ió garbled¬  jusô strikå -thå ^Ò key® ^Ò refresheó thå menõ aô alì times. - - - Thå  prompô  whicè appearó aô thå bottoí  oæ  thå  Menõ -displaù haó thå followinç generaì form: - -Command (=Menu,^C=Z3,*=1st Menu,<=Prev Menu,>=Next Menu) - - - Therå  caî  bå uð tï 25µ menuó iî onå  VMENU.VMΠ file® -Thå  VMENÕ  commanä  prompô varieó  tï  reflecô  this®  Foò -instance¬  iæ  onlù  onå Menõ waó presenô anä thå optioî  tï -aborô ouô oæ VMENÕ tï ZCPR³ waó noô available¬ theî thå Menõ -Commanä prompô woulä takå itó simplesô form¬ lookinç like: - -Command (=Menu) - - - Strikå  ^Ò aô thió timå tï refresè thå Menõ Displaù  oò -strikå thå characteò oæ á Menõ Option®  Theså arå thå  onlù -choices¬  anä  strikinç á characteò whicè ió noô thå  RETURÎ -keù oò á menõ optioî resultó iî thå belì sounding. - - - Iæ  thå  thå optioî tï exiô tï ZCPR³ waó availablå  anä -therå  ió  onlù  onå Menõ iî thå  MENU.VMΠ file¬  theî  thå -commanä linå wilì looë likå this: - -Command (=Menu,^C=Z3) - - - Thå  optioî oæ abortinç tï ZCPR³ bù strikinç  Control-à -(holä  dowî  oî thå Control¬  oò CTRL¬  keù anä  strikå  thå -letteò C© ió no÷ available®  Thió wilì returî tï ZCPR³  anä -exiô VMENU. - - Onå  brieæ notå oî optioî letteró beforå goinç on®  Iæ -onå  oæ youò optionó ió á letteò iî thå rangå froí Á  tï  Z¬ -theî caså ió noô significant¬  anä yoõ caî invokå thå optioî -A¬ say¬ bù strikinç aî upper- oò lower-caså A. - - - Iæ  therå ió morå thaî onå menõ iî thå *.VMÎ file¬  thå -commanä linå optionó becomå slightlù morå complex¬  buô theù -arå stilì quitå easù tï follow. - - Iî  thå followinç examples¬  assumå thaô thå optioî  tï -exiô tï ZCPR³ ió off¬ sï thå "^C=Z3¢ optioî wilì NOÔ appear. - - Froí thå firsô menõ iî thå file¬  thå commanä linå wilì -looë likå thå following: - -Command (=Menu,>=Next Menu) - - - Tï advancå tï thå nexô menu¬  strikå thå ">¢ oò thå ".¢ -character®  Oî mosô keyboards¬ ">¢ ió thå shifô oæ thå "."¬ -sï VMENÕ permitó easù movemenô withouô havinç tï worrù abouô -shiftinç thå keyboarä alì thå time. - - - Iæ aô thå lasô menõ iî thå file¬  thå commanä linå wilì -looë likå thå following: - -Command (=Menu,*=1st Menu,<=Prev Menu) - - - Thió  allowó  thå useò tï strikå thå "*¢  characteò  tï -jumð  bacë tï thå firsô menõ iî hió *.VMÎ file®  Iæ "<¢  oò -",¢  ió strucë ("<¢ ió usuallù thå shifô oæ thå  ",")¬  theî -thå  useò wilì bacë uð onå menõ tï thå previouó menõ iî  thå -file. - - Iæ thå useò ió somewherå iî thå middlå oæ thå  MENU.VMÎ -file¬ hió commanä linå wilì looë likå this: - -Command (=Menu,*=1st Menu,<=Prev Menu,>=Next Menu) - - - Again¬  "*¢ wilì gï directlù tï thå firsô menu¬  "<¢ oò -",¢ wilì gï tï thå previouó menu¬  anä ">¢ oò ".¢ wilì gï tï -thå  nexô  menu®  Strikinç thå RETURÎ keù wilì refresè  thå -menõ display. - - Iî  summary¬  movinç abouô withiî VMENÕ ió quitå  easy® -"*¢  moveó thå useò tï thå firsô menu¬  "<¢ tï thå  previouó -menu¬ ">¢ tï thå nexô menu. - -:S - - The full Menu Command Line looks like the following: - -Command (=Menu,^C=Z3,*=1st Menu,<=Prev Menu,>=Last Menu) - - - The Menu Commands are: - - Command Function - - ^R Refresh Menu Display (RETURN Key) - ^C Exit to ZCPR3 (Control-C) - * Jump to the First Menu - < or , Jump to the Previous Menu - > or . Jump to the Next Menu - other Menu Option or Invalid Command; letters are - automatically capitalized, so a=A - -:P - - Programming *.VMN Files - - Thå  *.VMΠ filå  ió simplù á texô filå  whicè  maù  bå -createä  witè  anù  conventionaì  CP/Í   editor¬   includinç -WordStar®  VMENÕ  ignoreó  thå Mosô Significanô Biô oæ  alì -bytes¬ sï editoró likå WordStar¬ whicè occasionallù seô thió -bit¬ caî bå used. - - Alì *.VMÎ fileó havå thå samå generaì  structure®  Thå -firsô  linå ió eitheò á globaì optioî linå oò thå  beginninç -oæ á menõ display®  Iæ á globaì optioî line¬ iô beginó witè -thå  characteò  "-"¬   anä  thió  characteò  ió  immediatelù -followeä  bù  globaì optioî characters®  Thå globaì  optioî -line¬ theî lookó likå this: - --option - - Afteò thå globaì optioî line¬  iæ any¬  comeó thå firsô -menu® Eacè menõ ió structureä aó follows: - - #option - - # - menu commands - - The following are two sample Menu File structures: - - -option #option - #option - # - # commands - commands ## - #option - - # - commands - ## - Therå ió onå optioî character®  Iî usinç it¬  caså  ió -noô significant®  Thió optioî characteò ió "X"¬ whicè telló -VMENÕ tï allo÷ thå useò tï exiô tï ZCPR3. - - Thå  Ø  optioî enableó thå facilitù whicè  permitó  thå -useò tï typå ^à anä returî tï ZCPR3. - - Wheî VMENÕ firsô comeó up¬  thå Ø optioî ió turneä off® -Thå useò cannoô exiô tï ZCPR3. - - Thå  globaì optionó line¬  which¬  iæ present¬  ió  thå -firsô linå oæ thå file¬  turnó oî thió optioî foò thå courså -oæ  thå sessioî iî general®  Thaô is¬  iæ á globaì  optionó -linå like - - -x - -ió useä (caså ió insignificant)¬ theî thå abilitù tï exiô tï -ZCPR3 is enabled for all menus. - - - Thå  globaì optionó linå turnó oî thå Ø optioî foò  alì -menuó iî general® However¬ thå Ø optioî maù bå presenteä oî -thå  firsô  linå  oæ eacè menõ  immediatelù  afteò  thå  "#¢ -characteò  tï  temporarilù complemenô thå settinç foò thå  Ø -optioî foò onlù thaô menu. - - Iæ  thå Ø optioî ió NOÔ includeä iî thå globaì  optionó -line¬  iô  ió  turneä OFÆ foò alì  menuó  iî  general®  Thå -defaulô  selecteä  bù  usinç  thå  globaì  optionó  linå  ió -overriddeî oî á per-menõ basió bù thå locaì menõ options. - - Example: - - - -x - #x - No exit to ZCPR3 is permitted - # - commands - #x - No exit to ZCPR3. - # - commands - # - Thå useò maù exit to ZCPR3. - # - commands - ## - -:C - - *.VMN Commands - - Thió   sectioî  describeó  thå  techniquå  anä  optionó -availablå  foò creatinç commanä lineó iî *.VMΠ files®  Thå -informatioî  hereiî ió organizeä intï thå followinç  subjecô -areas: - - o Syntax of the command line - - o :nn Option - - o ! Option - - o "text" prompts and input - - o Variables ($D, $U, $Fn, $Nn, $Tn, $Pp, $$) - - o Highlighting (^A, ^B) - - Syntax - Thå commandó iî á *.VMÎ filå follo÷ á simplå structure® -Eacè commanä occupieó onlù onå line¬  anä blanë lineó iî thå -commanä  grouð  arå  noô permitted®  Thå  commanä  linå  ió -structureä aó follows: - - l[o][command] - -where: - l is the single character used to invoke the command - note that it may be upper- or lower-case - o is an opening option, which is one of: - :nn -- go to Menu nn - ! -- have VMENU wait when the command is finished - command is an optional ZCPR3 command; note that if - the option is ":nn", then a command here makes no - sense - - :nn Opt - Thå  ":nn¢  optioî telló VMENÕ tï movå tï  á  differenô -menõ  iî  thå  *.VMÎ file®  Thå firsô  menõ  ió  numbeò  1® -Example: - - -x - # - 1st Menu: A - Goto Menu 2 3 - Goto Menu 3 - # - a:2 - 3:3 - # - 2nd Menu Command: 3 - Goto Menu 3 - # - 3:3 - #x - 3rd Menu Command: 2 - Goto Menu 2 - # - 2:2 - ## - :nn Opt - Iî thå firsô menu¬ thå useò maù strike: - - "a¢ oò "A¢ tï gotï Menõ 2 - "3¢ tï gotï Menõ 3 - ">¢  oò  ".¢ tï gotï thå nexô menõ (Menõ 2) - ^à tï gotï ZCPR3 - - In the second menu, the user may strike: - - "3" to goto Menu 3 - "*" or "<" or "," to goto Menu 1 - ">" or "." to goto Menu 3 - ^C to goto ZCPR3 - - In the third menu, the user may strike: - - "2" or "<" or "," to goto Menu 2 - "*" to goto Menu 1 - - ! Opt - Thå  "!¢ optioî causeó VMENÕ tï pauså anä asë thå  useò -tï "Strikå Anù Key¢ beforå continuinç afteò thå commanä linå -haó  beeî processed®  Iî thió way¬  iæ á commanä  generateó -informatioî  tï bå reaä bù thå useò beforå VMENÕ clearó  hió -screen¬  thå "!¢ optioî maù bå useä tï givå thå useò alì thå -timå hå wantó tï reaä thió display. - - "prompt" - Embeddeä  withiî  anù commanä linå maù bå á prompô  foò -useò input® Thió prompô takeó thå forí of - - "prompt to user" - -Wheî  encountered¬  VMENÕ wilì advancå tï thå nexô linå  anä -prinô thå texô containeä withiî thå quotes® VMENÕ wilì theî -waiô foò thå useò tï inpuô anù texô hå desireó followeä bù á -RETURN®   Aô  thió  point¬  thå  texô  thå  useò  inpuô  ió -capitalizeä anä placeä intï thå commanä linå aô thå poinô oæ -thå prompt. - - Iæ  thå  prompô appearó aô thå enä oæ á  VMENÕ  commanä -line¬  thå trailinç quotå ió noô required®  Aó manù promptó -aó   desireä  maù  appeaò  withiî  á  VMENÕ  commanä   line® -Examples: - - "prompt" - -x - # - A - Run XDIR without Pause or Input - B - Run XDIR and Pause before Returning to VMENU - C - Run XDIR, Allow User Input, and Pause before - Returning to VMENU - M - Run MCOPY, Allow User Input of Dest Dir, Allow - User Input of Source Dir and File, and Pause - before returning to VMENU - Z - Run Any ZCPR3 Command and Pause before - Returning to VMENU - # - m!mcopy "Destination Dir? "="Source DIR:AFN? " - z!"Enter Command Line -- - axdir - b!xdir - c!xdir "Enter Ambiguous File Name -- - ## - - "prompt" - Notå  thå Spacå righô beforå thå "Prompô forí iî thå  Ã -command®  Thió spacå ió significanô tï keeð thå commanä anä -useò  inpuô froí runninç together®  Thió "ruî together¢  ió -desireä  foò thå Ú command®  Alsï notå thå duaì prompô  foò -thå Í command. - - Witè thå Í command¬  thå followinç promptó wilì  appeaò -(anä samplå input): - - Destination Dir? BACKUP: - Source DIR:AFN? *.TXT - -anä thå followinç commanä linå ió built: - - MCOPY BACKUP:=*.TXT - - Variables - Thå  commanä  texô  whicè  ió specifieä  iî  thå  VMENÕ -commanä linå caî contaiî embeddeä variableó whicè VMENÕ wilì -expanä wheî thå commanä linå ió processed® Theså variables¬ -whicè  arå denoteä bù á dollaò sigî ($© followeä bù  onå  oò -twï characters¬ arå defineä aó follows: - - Variable Expands as - -------- ---------- - $D Current Disk - $U Current User Area - $Fn FILENAME.TYP for ZCPR3 System File n - $Nn FILENAME for ZCPR3 System File n - $Tn TYP for ZCPR3 System File n - $Pp Name of File being Pointed to - $$ Place a single $ in command line - - Theså  variableó  caî alsï bå useä iî thå menõ  displaù -itself¬  anä  theiò  valueó  wilì bå  substituteä  wheî  thå -displaù ió generated® Example: - Variables - -x - # - Menu to Run M80 Assembler - Current File: $F1 - Directory: $D$U - F - Define File - E - Edit $F1 P - Page $F1 - A - Assemble $F1 - # - fsetfile 1 "Filename? " - eedit $f1 - azex m80 $n1 - ppage $f1 - ## - - Variables -Notes: - - 1® Thå ZCPR³ utilitù SETFILÅ ió useä tï definå thå namå -oæ  á  ZCPR³  Systeí File®  Therå  arå  fouò  Systeí  Fileó -available¬  anä theù caî bå referenceä bù $F± tï $F4¬ $N± tï -$N4¬ anä $T± tï $T4. - - 2®  Thå Á commanä showó thå executioî oæ ZEX® VMENÕ ió -á truå ZCPR³ Shell¬ and¬ aó such¬ ZEØ commandó caî bå issueä -froí  iô anä wilì ruî oî toð oæ it®  Thå prompô foò thå ZEØ -commanä lineó wilì bå "Menu>". - - 3®  Assuminç thaô "MYFILE.MAC¢ ió assigneä tï thå ZCPR³ -Systeí Filå ± anä thå useò ió loggeä intï disë  useò 1¬ thå -followinç  screeî  showó ho÷ thå displaù anä  thå  resultinç -commanä lineó wilì bå expandeä wheî executioî occurs: - - Variables - Display - - Menu to Run M80 Assembler - Current File: MYFILE.MAC - Directory: B1 - F - Define File - E - Edit MYFILE.MAC P - Page MYFILE.MAC - A - Assemble MYFILE.MAC - - - Command Lines - Menu Command Expansion - - fsetfile 1 "Filename? " SETFILE 1 "Filename? " - eedit $f1 EDIT MYFILE.MAC - azex m80 $n1 ZEX M80 MYFILE - ppage $f1 PAGE MYFILE.MAC - - Highlighting - Jusô  likå thå HELÐ utilitù caî takå advantagå  oæ  thå -highlightinç facilitù provideä iî thå Z3TCAP¬  sï caî VMENU® -Foò  thoså  ZCPR³  Systemó witè á  properly-installeä  TCAP¬ -VMENÕ  wilì  uså  thå cleaò screeî commanä  tï  refresè  thå -user'ó  screeî anä highlightinç caî bå enableä anä  disableä -bù  embeddinç ^Á (tï turî oî highlighting© anä ^  (tï  turî -ofæ highlighting© intï thå *.VMÎ file. - - Iô  ió recommendeä thaô wheî highlightinç ió turneä on¬ -iô  shoulä  bå turneä ofæ iî thå samå linå  foò  consistencù -sakå anä appearance. - - Example: - - Highlighting - # - ^AThis is highlighted^B and this is not - # - -wilì appeaò witè "Thió ió highlighted¢ iî á highlighteä modå -likå this: - - This is highlighted and this is not - - - Variables - - Thå  $Pð  variablå ió alsï availablå tï thå useò  undeò -VMENU®  $Pð returnó informatioî oî thå filå currentlù beinç -pointeä tï bù thå useò oî thå screen® Thió variablå haó thå -following forms: - - Form Expands Into - $PF FILENAME.TYP of the pointed-to file - $PN FILENAME of the pointed-to file - $PT TYP of the pointed-to file - - Foò instance¬ iæ thå filå currentlù beinç pointeä tï ió -named MYFILE.TXT, then the command line: - - ECHO FILENAME.TYP=$PF FILENAME=$PN TYP=$PT - -will output: - - FILENAME.TYP=MYFILE.TXT FILENAME=MYFILE TYP=TXT - Variables - Example: - - -x - # - Menu to Run M80 Assembler - Directory: $D$U - Å - Ediô Pointed-tï Filå - Ð - Pagå Pointed-tï File - A - Assemble Pointed-to File - # - eedit $pf - azex m80 $pn - ppage $pf - ## - - Variables -Notes: - - 1® Thå Å anä Ð commandó builä commanä lineó containinç -the full file name and type of the file being pointed to. - - 2®  Thå Á commanä showó thå executioî oæ ZEX® VMENÕ ió -á truå ZCPR³ Shell¬ and¬ aó such¬ ZEØ commandó caî bå issueä -froí  iô anä wilì ruî oî toð oæ it®  Thå prompô foò thå ZEØ -commanä lineó wilì bå "VMenu>". - - 3® Assuminç thaô MYFILE.MAà ió beinç pointeä tï bù thå -user¬ thå followinç showó thå expansioî oæ thå commanä lineó -for this example: - - Menu Command Expansion - eedit $pf EDIT MYFILE.MAC - azex m80 $pn ZEX M80 MYFILE - ppage $pf PAGE MYFILE.MAC - - Variables - - Thå  firsô entrù iî anù VMENÕ filå displaù ió nameä "Nï -File"¬  anä  thió  entry¬  wheî pointeä tï bù thå  useò  anä -expandeä intï thå commanä line¬  ió translateä intï á prompô -foò thå useò tï inpuô thå namå oæ á file®  Thió featurå  ió -provideä  aó á conveniencå tï thå useò sï thaô hå wilì  havå -thå  abilitù  tï easilù specifù ne÷ fileó whicè dï  noô  yeô -exisô  tï thå VMENÕ commandó (sucè aó foò aî editoò  commanä -in which the user wants to create a new file). - - Iæ  thå  pointeò ió aô "Nï File¢ anä thå  commanä  linå -useó  severaì  referenceó  tï thå pointeò (aó  iî  thå  ECHÏ -commanä examplå above)¬  theî thå useò ió prompteä onlù oncå -foò  thå  namå oæ thå file¬  anä eacè referencå deriveó  itó -information from this name. - - Closing - Closing Notes - - Aó  manù commandó aó thå printablå ASCIÉ characteò  seô -(withouô   lower-caså   letteró   anä  thå   VMENÕ   commanä -characters©  wilì allo÷ arå permitteä bù VMENU®  Thå  text¬ -however¬  foò eacè menõ musô bå ablå tï fiô oî á screeî witè -thå filå directorù displaù aô thå toð anä thå commanä prompô -aô  thå bottom®  Thió meanó thaô thå texô cannoô exceeä  1¶ -lines. - - VMENÕ  fitó iî nicelù tï thå ZCPR³ Systeí oæ  programs® -Thå  informatioî  sectioî oî "VMENU'ó  Relationshið  tï  thå -ZCPR³  System¢  explainó  ho÷  VMENÕ  anä  thå  otheò  ZCPR³ -programó worë together. - - Thå  followinç  ASCIÉ  characteró maù NOÔ  bå  useä  aó -commandó sincå theù arå useä elsewhere: - - # % , . < > * - -:M - - VMENU Programming Command Summary - - Eacè  VMENÕ commanä occupieó onlù onå line¬  anä  blanë -lineó  iî thå commanä grouð arå noô permitted®  Thå commanä -linå ió structureä aó follows: - - l[o][command] - -where: - l is the single character used to invoke the command - note that it may be upper- or lower-case - o is an opening option, which is one of: - :nn -- go to Menu nn - ! -- have VMENU wait when the command is finished - command is an optional ZCPR3 command; note that if - the option is ":nn", then a command here makes no - sense - - -The VMENU commands are: - - Command Function - - :nn Goto Menu nn, where the first menu is Menu 1 - ! Wait after command line is executed before - processing the menu - "Prompt" Prompt the user for input and accept it - - -The VMENU variables are: - - Variable Expands to - - $D Current Disk - $U Current User - $Fn FILENAME.TYP for System File n - $Nn FILENAME for System File n - $Tn TYP for System File n - $PF FILENAME.TYP for Pointed-to File - $PN FILENAME for Pointed-to File - $PT TYP for Pointed-to File - $$ $ - -Noteº Systeí Fileó caî bå defineä bù thå SETFILÅ command. - -The Highlighting Embedded Characters are: - - ^A Turn ON Highlighting - ^B Turn OFF Highlighting - -Noteº  Iô ió recommendeä thaô iæ highlightinç ió turneä  on¬ -it should be turned off in the same line. - - - -Thå  followinç ASCIÉ characteró maù NOÔ bå useä aó  commandó -sincå theù arå useä elsewhere: - - # % , . < > * - - - -:Z - - VMENU's Relationship to the ZCPR3 System - - VMENU¬ likå mosô oæ thå ZCPR³ utilities¬ interactó witè -thå systeí aó á wholå anä cannoô bå useä witè systemó  otheò -thaî  ZCPR3®   Iî  particular¬  VMENÕ  requireó  thå  ZCPR³ -Multiplå  Commanä Linå Buffeò anä Shelì Stacë facilitieó  tï -bå  availablå  tï  iô anä cannoô ruî  withouô  them®  VMENÕ -invokeó  commanä  lineó  viá thå  Commanä  Linå  Buffeò  anä -returnó  tï itselæ thrõ thå Shelì Stack®  Iô alsï useó  thå -ZCPR³  Systeí Fileó foò somå oæ itó variableó anä thå Z3TCAÐ -facilitù foò itó screeî manipulatioî (highlighting). - - VMENU is installed by Z3INS. - - - Also¬ CÄ (Changå Directory© anä STARTUÐ (or¬ SÔ foò CD© -caî  comå intï plaù witè VMENU®  Wheî CÄ logó intï  tï  ne÷ -directory¬  iô  lookó foò thå filå ST.COÍ anä executeó iô iæ -therå  ió one®  SÔ ió simplù STARTUÐ renamed¬  anä  STARTUÐ -wilì  loaä thå Multiplå Commanä Linå Buffeò witè  á  commanä -linå anä theî terminate. - - Froí thå poinô oæ vie÷ oæ VMENU¬  thå commanä loadeä bù -SÔ  coulä bå VMENU®  Thå effecô oæ thió ió tï automaticallù -enteò  VMENÕ  wheî  thå useò employó CÄ  tï  enteò  á  giveî -directory. - - Hence¬  bù  usinç CD¬  á useò caî enteò á directorù anä -suddenlù  finä  himselæ iî á menõ insteaä oæ  aô  thå  ZCPR³ -commanä  level®  Thió  ió  gooä foò  applicationó  wherå  á -directorù  ió  seô  asidå foò á specifiã  purposå  anä  onlù -certaiî  operationó  arå  tï bå performeä  iî  it¬  sucè  aó -cataloginç diskó oò handlinç accounts. - - - No÷  thaô VMENÕ ió runninç foò thå directory¬  á  VMENÕ -commanä  coulä  bå anotheò CÄ tï anotheò directory®  Oò  iô -coulä simplù bå á DUº form® Example: - - # - A - Enter ZCPR Directory - B - Enter A0: - # - acd zcpr: - ba0: - # - - Here¬  iæ Á ió issued¬ theî CÄ wilì movå intï ZCPRº anä -executå ST.COÍ iæ therå ió onå there®  Iæ  ió issued¬  thå -useò ió loggeä intï A0:®  VMENÕ ió thå nexô commanä iî botè -caseó (invokeä aó á Shell)¬ sï VMENÕ automaticallù reinvokeó -anä lookó foò MENU.VMN®  Iæ iô findó it¬  wå arå iî anotheò -VMENÕ  system¬  and¬  iæ iô doesn't¬  wå arå bacë  tï  ZCPR³ -commanä level. - - Undeò thå Á option¬ iæ CÄ findó ST.COM¬ SÔ wilì executå -itó functioî and¬  unlesó thió functioî popó thå Shelì Stacë -(SHCTRÌ  POР command)¬  VMENÕ  wilì reinvokå  afteò  iô  ió -complete. - - Undeò  thå  option¬  wå wilì ruî VMENÕ nexô anä simplù -exiô iæ á MENU.VMÎ filå ió noô found. - - - VMENÕ  interactó  heavilù witè thå ZCPR³  Systeí  Fileó -whicè  arå  defineä  aó  á parô  oæ  thå  ZCPR³  Environmenô -Descriptor®  Therå arå fouò Systeí Files¬ anä threå oæ theí -are used by VMENU for various purposes: - - File Purpose - 2 Name of Current File - 3 Name of Menu File - 4 Name (containing wild cards) used to - Select Files for VMENU File Display - - Systeí  Filå  ² containó thå namå oæ thå currenô  VMENÕ -file®  Bù  changinç thió name¬  á transienô caî  causå  thå -pointeò  oæ VMENÕ tï poinô tï somå otheò filå wheî VMENÕ  ió -reinvoked. - - - Systeí  Filå ³ containó thå namå oæ thå menõ filå whicè -VMENÕ ió usinç tï derivå menõ displayó anä commanä from® Bù -changinç thió entry¬  á transienô caî selecô differenô  menõ -files dynamically. - - Systeí  Filå ´ ió useä tï indicatå whicè fileó (sucè aó -*.TXÔ  oò *.*© arå selecteä foò displaù bù VMENÕ wheî iô  ió -invoked®  Bù  changinç thió entry¬  thå naturå oæ thå  filå -display can be changed dynamically. - -:E - - VMENU Error Messages - - Iî ordeò tï makå VMENÕ aó smalì aó possible¬  thå erroò -messageó havå beeî reduceä tï á minimum®  VMENÕ provideó  á -minimuí indicatioî thaô somethinç ió wronç anä aborts. - - Thå  prograí  VMENUCË  ió  designeä tï  telì  yoõ  morå -specificallù  whaô  ió wrong®  VMENUCË ió  á  *.VMΠ Syntaø -Checker¬ anä iô lookó foò alì sortó oæ erroò conditionó thaô -caî occuò iî á *.VMÎ file. - - VMENÕ provideó thå followinç minimaì erroò messages: - - - Message Meaning - - No Shell Stack Shell Stack Not Available - No Command Line Command Line Buffer Not Avail - Shell Stack Full Shell Stack is Full - Shell Stack Size Shell Stack Entries are too - short for VMENU cmd line - File x.typ Not - Found Menu File Not Found - TPA Full Memory is Full - User Command is in Error - Structure Error *.VMN File Structure Error - -:2 - -Command: VMENUCK 1.0 - -Syntax: - VMENUCK dir:ufn <-- default file type is VMN - -Function: - - VMENUCË ió useä tï checë thå syntaø oæ á *.VMÎ filå foò -thå  ZCPR³ Menõ Shell¬  VMENU®  VMENÕ ió optimizeä foò sizå -anä speed¬  and¬  iî deepinç iô small¬  built-iî diagnosticó -werå reduceä tï thå minimum® VMENUCË ió intendeä tï bå useä -tï  analyzå *.VMÎ fileó anä providå informativå  diagnosticó -oî anù syntacticaì erroró witè them. - -Options: - None - - -Comments: - - VMENUCË checkó tï seå iæ thå sizå oæ thå *.VMÎ filå  ió -toï largå foò thå TPÁ availablå tï thå VMENÕ command®  Thió -ió aî additionaì checë beyonä thå normaì syntaø check. - - VMENUCË  identifieó  thå  locatioî oæ  erroró  bù  linå -number® Thå firsô linå iî thå filå ió linå numbeò 1. - -Selected Error Messages: - - Self-Explanatory. - -Examples of Use: - - VMENUCK MYMENU - -- perform check on MYMENU.VMN - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/VMENU.MAC b/Source/Images/d_bp/u15/VMENU.MAC deleted file mode 100644 index fb91e70f..00000000 --- a/Source/Images/d_bp/u15/VMENU.MAC +++ /dev/null @@ -1,2655 +0,0 @@ -; PROGRAM: VMENU -; VERSION: 1.0 -; DATE: 26 June 84 -; AUTHOR: Richard Conn -; PREVIOUS VERSIONS: None -; -z3env equ 0f400h -VERS EQU 10 ;version number - -; VMENU is copyright (c) 1984 by Richard Conn -; All Rights Reserved -; VMENU may be used freely by the ZCPR3 Community - -; VMENU is a screen-oriented, ZCPR3-specific file utility. It can not be -; installed to run under conventional CP/M. VMENU -; extensively employs cursor addressing to position a pointer on the -; screen, allow the user to manipulate the pointer (up, down, right, left, -; next screen, previous screen, GOTO file). The pointer points to files -; in the current user directory and displays the user's position dynamically -; on the screen. Once pointing to a file, user commands can be used to -; manipulate the file according to options presented in the menu displayed to -; the user. MENU and VMENU are compatible. In the way of being ZCPR3- -; specific, VMENU can chain to external programs via the Command Line Buffer -; and then return, and it recognizes Named Directories (so the user can log -; into B:, B4:, and MYDIR:, for example). - -; VMENU is installed by Z3INS. - -; VMENU works with ZCPR3 only, with 32k or more of RAM. - -; VMENU can be assembled for use with a Z80 or 8080 microprocessor. - -; -; SYSLIB, Z3LIB, and VLIB References -; - ext z3vinit,cls,gotoxy,ereol,vprint,envptr,stndout,stndend - ext pafdc,dutdir - ext qshell,getefcb,shpush,shpop,getcrt,getfn2,zprsfn - ext putshm,getshm,getsh,getzrun,getcl1,putzex,putcst - ext cin,cout,caps,crlf,bline,sksp - ext f$open,f$read,f$close,initfcb - ext retud - ext codend - -; -; Basic Definitions -; -TRUE EQU 0FFH ;define true and.. -FALSE EQU 0 ;..false. -; -DIM EQU 1 ;GOTO DIM -BRIGHT EQU 2 ;GOTO BRIGHT -ELTSIZ EQU 11 ;size of file name and type element - -; -; User-Customized Definition -; -VMNAME MACRO ;;Name of VMENU - DB 'VMENU' - ENDM -VMNFILL MACRO ;;Spaces to fill out name to 8 chars - DB ' ' - ENDM -; -Z80 EQU TRUE ;TRUE to use Z80 Instructions -WARMBOOT EQU FALSE ;set TRUE to warmboot on exit -EPS EQU 4*4 ;N lines x 4 cols per screen - ; EPS = Entries Per Screen - -; -; Command Line Builder Constants -; -FPESC EQU '%' ;escape char -FPDISK EQU 'D' ;disk only (D) -FPUSER EQU 'U' ;user only (U) -FPFILE EQU 'F' ;filename.typ -FPNAME EQU 'N' ;file name only -FPTYPE EQU 'T' ;file type only -FPPTR EQU 'P' ;file entry being pointed to -MNOTE EQU '#' ;denotes comment area in macro file -UIN1 EQU 27H ;single quote for user input -UIN2 EQU 22H ;double quote for user input - -; -; Menu Constants -; - -; 1 Special Menu Command Chars -RNM EQU '>' ;NEXT MENU -RNMP EQU '.' ;NEXT MENU PRIME (ALTERNATE) -RLM EQU '<' ;LAST MENU -RLMP EQU ',' ;LAST MENU PRIME (ALTERNATE) -RFM EQU '*' ;FIRST MENU - -; 2 Internal Menu Control Chars -MCMD EQU ':' ;COMMAND TO JUMP TO ANOTHER MENU -PCHAR EQU '"' ;INDICATES AUTO PROMPT FOR SPECIFIC CMD -MINDIC EQU '#' ;MENU SECTION INDICATOR -MFIRST EQU '%' ;FIRST MENU INDICATOR -GOPTION EQU '-' ;GLOBAL OPTION INDICATOR -WOPTION EQU '!' ;ACTIVATES WAIT UPON RETURN - -; 3 Menu Option Chars -XOPTION EQU 'X' ;DISABLE ZCPR3 RETURN - -; 4 Miscellaneous -IBUFSZ EQU 254 ;SIZE OF INPUT LINE BUFFER -VARFLAG EQU '$' ;VARIABLE FLAG - ;(FOLLOWED BY D,U,Fn,Nn,Tn) -CMDSEP EQU ';' ;ZCPR3 COMMAND SEPARATOR - -; -; Cursor Positioning Addresses -; -EPSLINE EQU (EPS/4)+3 ;position of last line of EPS + 1 -BANADR EQU 1*256+24 ;banner address -CURHOME EQU 3*256+1 ;home address of cursor -BOTADR EQU 23*256+1 ;bottom of screen -CPMADR EQU 22*256+1 ;command prompt message -CPADR EQU CPMADR+27 ;command prompt address (cursor position) -ERADR EQU CPMADR+256+15 ;error message -FNADR EQU 1*256+62 ;address of current file name -MOREADR EQU FNADR+1*256 ;address of more files message -DUADR EQU 1*256+4 ;address of current DU - -; -; System Functions -; -RDCON EQU 1 -WRCON EQU 2 -PUNCH EQU 4 -LIST EQU 5 -DIRCON EQU 6 -RDBUF EQU 10 -CONST EQU 11 -LOGIN EQU 14 -OPEN EQU 15 -CLOSE EQU 16 -SRCHF EQU 17 -SRCHN EQU 18 -ERASE EQU 19 -READ EQU 20 -WRITE EQU 21 -MAKE EQU 22 -REN EQU 23 -INQDISK EQU 25 -SETDMA EQU 26 -INQALC EQU 27 -ATTR EQU 30 -GETPARM EQU 31 -SGUSER EQU 32 -COMPSZ EQU 35 - -; -; System Addresses -; -OS$BASE EQU 000H ;system base.. -CCP EQU 800H ;..and 'ccp' length in bytes. -GET EQU 0FFH ;get user area e-reg value -BDOS EQU OS$BASE+05H -FCB EQU OS$BASE+5CH -FCBEXT EQU FCB+12 -FCBRNO EQU FCB+32 -FCB2 EQU OS$BASE+6CH -TBUFF EQU OS$BASE+80H -TPA EQU OS$BASE+100H - -; -; ASCII Definitions -; -CTRLC EQU 'C'-'@' ;..control-C.. -CTRLD EQU 'D'-'@' -CTRLE EQU 'E'-'@' -CTRLR EQU 'R'-'@' -CTRLS EQU 'S'-'@' ;..XOFF.. -CTRLX EQU 'X'-'@' -BEL EQU 07H ;..bell.. -BS EQU 08H ;..backspace.. -TAB EQU 09H ;..tab.. -LF EQU 0AH ;..linefeed.. -FF EQU 0CH ;..formfeed.. -CR EQU 0DH ;..carriage return.. -CAN EQU 18H ;..cancel.. -EOFCHAR EQU 1AH ;..end-of-file.. -CTRLZ EQU 1AH ;..clear screen.. -ESC EQU 1BH ;..and escape character. - -; -; MACROS TO PROVIDE Z80 EXTENSIONS -; MACROS INCLUDE: -; -; BR - JUMP RELATIVE -; BRC - JUMP RELATIVE IF CARRY -; BRNC - JUMP RELATIVE IF NO CARRY -; BRZ - JUMP RELATIVE IF ZERO -; BRNZ - JUMP RELATIVE IF NO ZERO -; BJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO -; -BR MACRO ?N ;;JUMP RELATIVE - IF Z80 - .z80 - jr ?N - .8080 - ELSE - jmp ?N - ENDIF - ENDM -; -BRC MACRO ?N ;;JUMP RELATIVE ON CARRY - IF Z80 - .z80 - jr c,?N - .8080 - ELSE - jc ?N - ENDIF - ENDM -; -BRNC MACRO ?N ;;JUMP RELATIVE ON NO CARRY - IF Z80 - .z80 - jr nc,?N - .8080 - ELSE - jnc ?N - ENDIF - ENDM -; -BRZ MACRO ?N ;;JUMP RELATIVE ON ZERO - IF Z80 - .z80 - jr z,?N - .8080 - ELSE - jz ?N - ENDIF - ENDM -; -BRNZ MACRO ?N ;;JUMP RELATIVE ON NO ZERO - IF Z80 - .z80 - jr nz,?N - .8080 - ELSE - jnz ?N - ENDIF - ENDM -; -BJNZ MACRO ?N ;;DECREMENT B AND JUMP RELATIVE ON NO ZERO - IF Z80 - .z80 - djnz ?N - .8080 - ELSE - dcr b - jnz ?N - ENDIF - ENDM -; -; END OF Z80 MACRO EXTENSIONS -; - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; Once Environment is Initialized, One of Three Major Functions -; will be Performed: -; 1. VMENU will be installed as a Shell if invoked explicitly -; by user command -; 2. The VMENU Function will be performed if VMENU is invoked -; by ZCPR3 as a Shell and ZEX is not Running -; 3. A Command Line will be Input by VMENU from ZEX and Passed -; on to ZCPR3 without Processing -; - call z3vinit ;initialize the ZCPR3 Env and the VLIB Env -; -; Set Opsys Stack Pointer -; - if not WARMBOOT - lxi h,0 ;clear hl-pair then.. - dad sp ;..add stack address. - shld stack - endif ;not warmboot - -; -; Check to see if VMENU was executed as a shell -; - call qshell ;get and test message from ZCPR3 - jz runsh ;execute shell procedures -; -; Initialize VMENU as a Shell -; - call shtest1 ;there must be a shell stack - call shtest2 ;there must be a command line buffer -; -; FUNCTION 1: Set Up VMENU as a Shell -; Run Shell Via Exit to Opsys -; - call getefcb ;determine name of program - brz shgo1 ;name not given, so use default - inx h ;pt to name - lxi d,filercmd ;define name of program - mvi b,8 - call moveb ;copy name -shgo1: - lxi h,filercmd ;establish shell - call shpush ;push onto shell stack - brnz shgo2 ;error? -; -; Establish File Selection -; 3rd System File = Name of Menu File (2nd token) -; 4th System File = Name of AFN to Select Files (1st token) -; - call getfn2 ;setup file name - lxi d,11 ;use 2nd system file - dad d - xchg ;destination in DE - lxi h,joker ;pt to joker - mvi b,11 ;copy joker into 2nd system file - call move ;... so selection is on joker - xchg ;HL now pts to 3rd system file - push h ;save ptr to name of Menu File - lxi d,fcb2+1 ;pt to FCB - xchg - mvi b,11 ;copy 11 chars - call move - push d ;save ptr to file spec - lxi h,fcb+1 ;pt to FCB (use 4th system file name) - mvi b,11 ;copy 11 chars - call move - pop d ;get ptr to file spec - lxi h,joker ;make wild if none - mvi b,11 ;11 chars - ldax d ;get first char - cpi ' ' ;wild if space - cz moveb ;copy - ldax d - cpi '/' ;wild if option - cz moveb - pop d ;get ptr to name of menu file - lxi h,menufile ;pt to menu file name (default) - ldax d ;check for no file name given - mvi b,11 ;11 chars - cpi ' ' ;if none, set default - cz moveb - lxi b,8 ;check file type - dad b - xchg - dad b - xchg - ldax d ;check for file type - mvi b,3 ;3 chars - cpi ' ' ;if none, set default - cz move -; -; Print Done Message -; -simsg: - mvi a,0 ;default to menu 0 - mvi b,1 ;shell message 1 contains menu number - call putshm -; - mvi b,0 ;shell message 0 - mvi a,0 ;no wait - call putshm ;set shell message -; - call vprint - db ' Shell Installed',0 -; - jmp os$ccp1 ;return to opsys -; -; Error in Shell Stack Installation -; -shgo2: - cpi 2 ;shell stack full - brnz shgo3 - call vprint - db ' Shell Stack Full',0 - ret -shgo3: - call vprint - db ' Shell Entry Size',0 - ret - -; -; VMENU was invoked as a Shell -; Check for ZEX Input in Progress -; -runsh: - call getzrun ;check ZEX message byte - jnz zexrun ;process ZEX command line if ZEX running -; -; Check for Delay Before Resuming VMENU and Delay if Set -; - mvi b,0 - call getshm ;get shell message 0 - ani 80h ;check MSB - cnz sak ;pause for input - mvi a,0 ;set normal command status - call putcst -; -; FUNCTION 2: Run VMENU and Perform Main Function -; - call setup ;init buffers and pointers - call stackset ;setup stack -; -; Begin VMENU Processing -; -runsh2: - call stackset ;reset stack - call fileload ;load files - call setscr ;set up screen display variables - call findcfile ;locate current file - call menuload ;load menu file -; -; Entry Point for Command Processing -; Display Screen and Input/Process Command -; -runsh3: - call stackset ;reset stack - call refresh ;refresh screen display -; -; Display Current File and Input/Process Command -; -loopfn: - call prcfn1 ;print current file name -; -; Input/Process Command -; -loop: - call stackset ;reset stack - call prompt ;get command from user - call cmdproc ;process command in A - call icmsg ;print invalid command msg - br loop ;continue -; -; Set Stack Pointer -; -stackset: - pop d ;get return address - lhld ibuf ;top of stack - sphl ;start local stack - push d ;return address on new stack - ret -; -; Check for Presence of Shell Stack -; -shtest1: - call getsh ;get shell stack data - rnz - pop psw ;clear stack - call vprint - db 'No Shell Stack',0 - ret - -; -; Check for Command Line -; -shtest2: - call getcl1 ;get command line data - rnz - pop psw ;clear stack - call vprint - db 'No Cmd Line',0 - ret - -; -; FUNCTION 3: Run ZEX on Top of VMENU -; Accept Command Line and Pass it to ZCPR3 -; -zexrun: - call vprint ;print prompt - db 'VMENU> ',0 - mvi a,1 ;tell ZEX that it is prompted - call putzex - call getcl1 ;pt to command line buffer - mov a,l ;set ptr to first char - adi 4 - mov c,a - mov a,h - aci 0 - mov b,a ;BC pts to first char - mov m,c ;store low - inx h - mov m,b ;store high - inx h ;pt to char count - xchg ;... in DE - mvi c,rdbuf ;input line via BDOS - push d ;save ptr - call bdos - pop h ;pt to char count - inx h - mov e,m ;get char count - inx h ;pt to first char - push h ;save ptr - mvi d,0 ;DE=char count - dad d - xra a ;A=0 - mov m,a ;store ending 0 - pop h ;pt to first char - call sksp ;skip to first non-blank character - mov a,m ;get it - cpi ';' ;comment line? - jz zexrun1 ;process comment line - call putzex ;resume ZEX (A=0) - call putcst ;set command status to normal (A=0) - ret ;return to opsys -zexrun1: - call crlf ;new line - jmp zexrun - -; -;************************************************** -; -; CRT Routine for VMENU -; -VCLS: - CALL CLS ;try to clear the screen - RNZ ;OK if done - PUSH H ;save regs - PUSH B - CALL GETCRT ;get CRT Data - INX H ;get number of lines on screen - MOV B,M ;B=number of lines -VCLS1: - CALL CRLF ;new line - BJNZ VCLS1 - POP B ;restore regs - POP H - RET -; -; EREOL Routine for VMENU -; -VEREOL: - CALL EREOL ;try to erase to EOL - RNZ ;OK if done - PUSH B ;save count - MVI A,' ' ;space out - CALL VEREOL1 ;send B spaces - POP B ;get count - MVI A,BS ;backspace in -VEREOL1: - CALL COUT ;send char - BJNZ VEREOL1 ;count down - RET -; -; Setup Screen Display Variables -; -SETSCR: - LXI H,CURHOME ;set cursor home - SHLD CURAT - LHLD RING ;set ring position - CALL SETMORE ;set more flag if more files on screen -; -; Entry to Reset Ring Position at HL -; -SETSCR1: - SHLD RINGPOS ;set current file to first file in ring -; -; Entry to Reset Local Ring Position at HL -; -SETSCR2: - SHLD LOCBEG ;front of ring - LXI D,EPS*ELTSIZ ;new end? - DAD D - XCHG - LHLD RINGEND ;end of ring - XCHG - CALL CMPDEHL - BRC SETSCR3 - XCHG -SETSCR3: - XCHG - SHLD LOCEND - RET - -; -; Set More Flag - Count Files on Screen and See if Display Exceeded -; -SETMORE: - PUSH H ;SAVE REGS - PUSH D - PUSH B - XRA A ;CLEAR FLAG - STA MORE - MVI B,EPS ;COUNT DOWN - LXI D,ELTSIZ ;SIZE OF ELEMENT -SETMORE1: - MOV A,M ;GET CHAR - ORA A ;DONE IF ZERO - JZ SETMDONE - DAD D ;PT TO NEXT - DCR B ;COUNT DOWN - JNZ SETMORE1 - MOV A,M ;GET CHAR - ORA A ;DONE IF ZERO - JZ SETMDONE - MVI A,0FFH ;SET FLAG - STA MORE -SETMDONE: - POP B ;RESTORE REGS - POP D - POP H - RET - -; -; Search for Current File starting at position in HL -; -FINDCFILE: - CALL GETFN2 ;get ptr to current file - LXI D,11 - DAD D ;... which is 2nd System File - XCHG ;... ptr in DE -; -; Next group of EPS files for file display -; -FINDCF1: - LXI H,CURHOME ;set cursor - SHLD CURAT - LHLD LOCBEG ;pt to first file in list - MVI B,EPS ;number of files in display -; -; Check current file -; -FINDCF2: - SHLD RINGPOS ;set position of current ring element -; -; Check for end of file ring -; - MOV A,M ;end of list? - ORA A ;done if so - BRZ FINDCF4 -; -; Compare candidate file against file in ring -; - PUSH H ;save ptr to file - PUSH D ;save ptr to System File - PUSH B ;save count - MVI B,ELTSIZ ;compare - CALL CMPSTR - POP B ;get count - POP D ;get ptr to System File - POP H ;get ptr to file - BRZ FINDCF5 ;we found it - BRC FINDCF5 ;we found following file -; -; Advance to next file in ring -; - PUSH B ;save count - LXI B,ELTSIZ ;pt to next element - DAD B -; -; Advance to next file on screen -; - PUSH H - LHLD CURAT ;get cursor position - MOV A,L - ADI 19 ;advance cursor - MOV L,A - CPI 70 - BRC FINDCF3 - MOV A,H ;get current line - LXI H,CURHOME ;get home row - MOV H,A ;set current line - INR H ;next line -FINDCF3: - SHLD CURAT ;set cursor - POP H - POP B ;get count -; -; Count down files in current display -; - BJNZ FINDCF2 ;count down - MOV A,M ;any following elements in ring? - ORA A ;0=no - BRZ FINDCF4 -; -; End of current display - set new display -; - SHLD LOCBEG ;new local beginning - BR FINDCF1 ;continue search -; -; File beyond end of file display - set pointers to first file -; -FINDCF4: - LXI H,CURHOME ;set cursor to first file - SHLD CURAT - LHLD RING ;pt to first file - SHLD RINGPOS - SHLD LOCBEG ;set local beginning -; -; Done - Set Local Ring -; -FINDCF5: - LHLD LOCBEG ;pt to local ring - JMP SETSCR2 - -; -; Display file name of current file -; Side Effect: Change Name of 2nd System File to Current File -; -PRCFN1: - LXI H,FNADR ;position cursor for file name print - CALL GOTOXY - CALL GETFN2 ;pt to system file name - LXI D,11 ;pt to 2nd System File Name - DAD D - XCHG ;... in DE - LHLD RINGPOS ;pt to current file name - MVI B,11 ;copy into 2nd System File Name - CALL MOVEB - JMP PRFN ;print file name -; -; Process Command -; -ICMSG: - CALL ERMSG - DB 'Invld Cmd: ',0 - MOV A,B ;get char - CPI ' ' ;expand if less than space - JNC COUT - MVI A,'^' ;control - CALL COUT - MOV A,B ;get byte - ADI '@' ;convert to letter - JMP COUT ;return for loop processing - -; -; SET UP BUFFERS -; -SETUP: - CALL RETUD ;get home DU - MOV A,B - STA H$DR ;home drive - MOV A,C - STA H$U$A ;home user area - CALL CODEND ;start of free space - LXI D,256 ;256 bytes/unit - DAD D - SHLD IBUF ;input line buffer and top of stack - MVI M,IBUFSZ ;number of bytes in line - DAD D - SHLD EXPLINE ;expansion line - DAD D - SHLD MENUFCB ;dummy FCB - DAD D ;next page - SHLD BUFFER ;free space to end of TPA - -; -; Begin Further Inits -; - LHLD ENVPTR ;pt to ZCPR3 Env Desc - LXI D,80H+10H ;pt to cursor commands - DAD D - LXI D,CTABLE ;pt to area - MVI B,4 ;4 commands -CURINIT: - MOV A,M ;get command - STAX D ;put it - INX H ;pt to next - INX D - INX D - INX D - BJNZ CURINIT -; - LHLD BUFFER ;base address - SHLD RING ;beginning of ring -; - XRA A ;clear error message flag - STA ERMFLG -; - RET - -; e x i t - -; return to ccp - -; -; Entry point for VMENU exit -; -OS$CCP: - CALL SHPOP ;clear shell stack -; -; Entry point for command line exec -; -OS$CCP1: - LXI D,TBUFF ;..tidy up.. - MVI C,SETDMA ;..before going home. - CALL BDOS - - IF WARMBOOT - JMP OS$BASE - ENDIF ;warmboot - - IF NOT WARMBOOT - LHLD STACK ;put pointer.. - SPHL ;..back to 'sp'. - RET ;return to ccp - ENDIF ;not warmboot - -; -; FLOAD loads the files into the buffer, setting up the ring -; Return with NZ if load OK, Z if no files loaded -; -FILELOAD: -; -; Set up file name from System File 4 -; Select all files if no entry in System File 4 -; - CALL GETFN2 ;pt to first system file name - LXI D,11*3 ;pt to 4th file name - DAD D - LXI D,JOKER ;setup Joker if none - XCHG - LDAX D ;any chars? - MVI B,11 ;11 bytes - CPI ' ' - CZ MOVEB - XCHG ;HL pts to system file name - LXI D,FCB+1 ;pt to FCB - MVI B,11 ;11 bytes - CALL MOVEB -; -; Build ring with filename positioned in default FCB area -; - LHLD RING ;pt to ring - MVI B,ELTSIZ ;set first element to 'noname' -FILEL1: - MVI M,1 ;store ^A's - INX H ;pt to next - BJNZ FILEL1 - SHLD RINGPOS ;set ring position - SHLD RINGEND ;set ring end in case this is the only one - MVI M,0 ;store ending 0 - MVI C,SETDMA ;initialize dma address.. - LXI D,TBUFF ;..to default buffer. - CALL BDOS - XRA A ;clear search 'fcb'.. - STA FCBEXT ;extent byte.. - STA FCBRNO ;..and record number. - LXI D,FCB ;default FCB for search - CMA - MVI C,SRCHF ;..of first occurrence. - CALL BDOS - INR A ; 0ffh --> 00h if no file found - RZ - -; put each found name in ring. a-reg --> offset into 'tbuf' name storage - -SETRING: - DCR A ;un-do 'inr' from above and below - ADD A ;times 32 --> position index - ADD A - ADD A - ADD A - ADD A - ADI TBUFF+1 ;add page offset and.. - MOV L,A ;..put address into.. - MVI H,0 ;..hl-pair. - XCHG - LHLD RINGPOS ;pointer to current load point in ring - XCHG - MVI B,ELTSIZ ;move name to ring - CALL MOVE - XCHG ;de-pair contains next load point address - SHLD RINGPOS ;store and search.. - MVI C,SRCHN ;..for next occurrence. - LXI D,FCB ;filename address field - CALL BDOS - INR A ;if all done, 0ffh --> 00h. - BRNZ SETRING ;if not, put next name into ring. -; -; All filenames in ring -- setup ring size and copy-buffer start point -; - LHLD RINGPOS ;next load point of ring is start of buffer - SHLD RINGEND ;set ring end.. - MVI M,0 ;store ending 0 -; -; Sort ring of filenames -; -SORT: - LHLD RING ;initialize 'i' sort variable and.. - SHLD RINGI - LXI D,ELTSIZ ;..also 'j' variable. - DAD D - SHLD RINGJ -; -; Main Sort Loop -; -SORTLP: - LHLD RINGJ ;compare names 'i & j' - XCHG - LHLD RINGI - PUSH H ;save position pointers.. - PUSH D ;..for potential swap. - -; sort by file name and type - MVI B,ELTSIZ ; # of characters to compare - CALL CMPSTR ;do comparison - -; final test for swapping purposes -NOCMP: - POP D - POP H - MVI B,ELTSIZ - BRNC NOSWAP -; -; Swap if 'j' string larger than 'i' -; -SWAP: - MOV C,M ;get character from one string.. - LDAX D ;..and one from other string. - MOV M,A ;second into first - MOV A,C ;first into second - STAX D - INX H ;bump swap pointers - INX D - BJNZ SWAP -NOSWAP: - LHLD RINGJ ;increment 'j' pointer - LXI D,ELTSIZ - DAD D - SHLD RINGJ - XCHG ;see if end of 'j' loop - LHLD RINGEND - CALL CMPDEHL - BRNZ SORTLP ;no, so more 'j' looping. - LHLD RINGI ;bump 'i' pointer - LXI D,ELTSIZ - DAD D - SHLD RINGI - DAD D ;set start over 'j' pointer - SHLD RINGJ - XCHG ;see if end of 'i' loop - LHLD RINGEND - CALL CMPDEHL - BRNZ SORTLP ;must be more 'i' loop to do - RET -; -; left to right compare of two strings (de-pair points to 'a' string; -; hl-pair, to 'b'; b-reg contains string length.) -; -CMPSTR: - LDAX D ;get an 'a' string character and.. - CMP M ;..check against 'b' string character. - RNZ ;if not equal, set flag. - INX H ;bump compare.. - INX D ;..pointers and.. - BJNZ CMPSTR ;..do next character. - RET - -; -; Process command from table -; -CTPROC: - MOV B,A ;command in B - LXI H,CTABLE ;pt to table - MOV A,M ;any cursor commands? - ORA A - JNZ CTPR1 - LXI H,CTAB1 -; -; Command table scanner -; HL = Table -; B = Command Letter -; -CTPR1: - MOV A,M ;get table command char - ORA A ;end of table? - RZ ;done if so - CMP B ;match? - BRZ CTPR2 - INX H ;skip to next entry - INX H - INX H - BR CTPR1 -CTPR2: - INX H ;pt to address - MOV A,M ;get low - INX H - MOV H,M ;get high - MOV L,A - XTHL ;address on stack - RET ;"jump" to routine - -; Command Table -CTABLE: - DB 0 ;user cursor positioning - DW UP - DB 0 - DW DOWN - DB 0 - DW FORWARD - DB 0 - DW REVERSE -CTAB1: - DB CTRLC ;if exit, then to opsys - DW OS$CCP - DB CTRLR ;screen refresh? - DW RUNSH3 - DB CTRLE ;system cursor positioning - DW UP - DB CTRLX - DW DOWN - DB CTRLD - DW FORWARD - DB CTRLS - DW REVERSE - DB CR ;nop - DW LOOP - DB '+' ;jump forward - DW JUMPF - DB '-' ;jump backward - DW JUMPB - DB ' ' ;go forward - DW FORWARD - DB BS ;back up? - DW REVERSE -; - DB 0 ;end of table - -; -; COMMAND: - (Previous Screen) -; -JUMPB: - LXI H,CURHOME ;set cursor home - SHLD CURAT - LHLD RING ;at front? - XCHG - LHLD LOCBEG - CALL CMPDEHL - BRZ JUMPBW ;back up and wrap around - SHLD LOCEND ;set new end - LXI D,-EPS*ELTSIZ ;back up - DAD D - SHLD LOCBEG ;new beginning - SHLD RINGPOS ;new position - JMP RUNSH3 -JUMPBW: - LHLD LOCBEG ;at first screen? - XCHG - LHLD RING ;pt to first element of ring - CALL CMPDEHL - BRZ JBW0 ;advance to end - LXI H,-EPS*ELTSIZ ;back up - DAD D ;first element of new local ring - BR JFW0 -JBW0: - LXI D,EPS*ELTSIZ ;pt to next screen - DAD D - XCHG - LHLD RINGEND - CALL CMPDEHL - XCHG - BRZ JBW1 - BRC JBW0 -JBW1: - LXI D,-EPS*ELTSIZ - DAD D ;pt to first element of new local ring - BR JFW0 -; -; COMMAND: + (Next Screen) -; -JUMPF: - LXI H,CURHOME ;set cursor to home - SHLD CURAT - LHLD LOCEND ;see if Local End <= Ring End - XCHG - LHLD RINGEND - CALL CMPDEHL - BRZ CMDLOOP - LHLD LOCEND ;new screen starting at LOCEND - BR JFW0 - -; -; Reset to Beginning of RING and Resume Command Looping -; -CMDLOOP: - CALL SETSCR ;reset all screen pointers -CMDLRET: - JMP RUNSH3 -; -; Reset RING Position to HL -; -JFW0: - CALL SETSCR1 ;reset RINGPOS on ... - BR CMDLRET -; -; Reset Local Ring to HL -; -JFW0A: - CALL SETSCR2 ;reset LOCBEG on ... - BR CMDLRET - -; -; COMMAND: ' ', Left-Arrow -; -FORWARD: - CALL CLRCUR ;clear cursor - CALL FOR0 ;position on screen and in ring - CALL SETCUR ;set cursor - JMP LOOPFN -; advance routine -FOR0: - LHLD RINGPOS ;at end of loop yet? - LXI D,ELTSIZ ;i.e., will we be at end of loop? - DAD D - XCHG - LHLD LOCEND - CALL CMPDEHL ;compare 'present' to 'end' - BRNZ FORW ;to next print position - CALL CUR$FIRST ;position cursor - LHLD LOCBEG ;set position pointer to beginning and.. - SHLD RINGPOS - RET -FORW: - LHLD RINGPOS ;advance in ring - LXI D,ELTSIZ - DAD D - SHLD RINGPOS ;new position - CALL CUR$NEXT ;position cursor - RET - -; -; COMMAND: BS, Right-Arrow -; -REVERSE: - CALL CLRCUR ;clear cursor - CALL REV0 ;position on screen and in ring - CALL SETCUR ;set cursor - JMP LOOPFN -; Back Up Routine -REV0: - LHLD LOCBEG - XCHG - LHLD RINGPOS ;see if at beginning of ring - CALL CMPDEHL - BRNZ REV1 ;skip position pointer reset if not.. - CALL CUR$LAST ;end of local ring - LHLD LOCEND ;set to end +1 to backup to end - LXI D,-ELTSIZ - DAD D - SHLD RINGPOS - RET -REV1: - CALL CUR$BACK ;back up 1 -REV2: - LHLD RINGPOS - LXI D,-ELTSIZ ;one ring position.. - DAD D ;..backwards. - SHLD RINGPOS - RET - -; -; COMMAND: Up-Arrow -; -UP: - CALL CLRCUR ;clear cursor - LHLD RINGPOS ;see if wrap around - LXI D,-ELTSIZ*4 ;4 entries - DAD D - XCHG - LHLD LOCBEG ;beginning of local screen - CALL CMPDEHL - BRC UP2 ;wrap around - MVI B,4 ;back up 4 entries -UP1: - PUSH B ;save count - CALL REV0 ;back up in ring and on screen (no print) - POP B ;get count - BJNZ UP1 - BR DOWN1A -UP2: - LHLD RINGPOS ;advance to beyond end - LXI D,ELTSIZ*4 - DAD D - XCHG - LHLD LOCEND ;compare to local end - XCHG - CALL CMPDEHL - BRZ DOWN1A ;at end, so too far - BRC DOWN1A ;beyond end, so back up - SHLD RINGPOS ;new ring position - LHLD CURAT ;advance cursor - INR H ;next line - SHLD CURAT - BR UP2 - -; -; COMMAND: Down-Arrow -; -DOWN: - CALL CLRCUR ;clear cursor - LHLD RINGPOS ;see if wrap around - LXI D,ELTSIZ*4 ;4 entries - DAD D - XCHG - LHLD LOCEND ;end of local screen - XCHG - CALL CMPDEHL - BRZ DOWN2 ;wrap around - BRC DOWN2 ;wrap around - MVI B,4 ;forward 4 entries -DOWN1: - PUSH B ;save count - CALL FOR0 ;advance in ring and on screen (no print) - POP B ;get count - BJNZ DOWN1 -DOWN1A: - CALL SETCUR ;set cursor - JMP LOOPFN -DOWN2: - LHLD CURAT ;preserve column - MOV B,L ;column number in B - LXI H,CURHOME ;home position - SHLD CURAT ;set new position - LHLD LOCBEG ;beginning of local ring - SHLD RINGPOS ;new ring position -DOWN3: - LHLD CURAT ;check for at top of column - MOV A,L ;get col - CMP B ;there? - BRZ DOWN1A - LHLD RINGPOS ;advance in ring - LXI D,ELTSIZ ;ELTSIZ bytes/entry - DAD D - SHLD RINGPOS - LHLD CURAT ;get cursor position - LXI D,19 ;advance 19 bytes/screen entry - DAD D - SHLD CURAT - BR DOWN3 - -; -;************************************************** -; -; WORKHORSE Routines -; -; conin routine (waits for response) -; -KEYIN: - CALL CIN ;get input - JMP CAPS ;capitalize - -; -; Fill buffer with 'spaces' with count in b-reg -; -FILL: - MVI M,' ' ;put in space character - INX H - BJNZ FILL ;no, branch. - RET -; -; Check for legal filename character -- return with carry set if illegal -; -CKLEGAL: - LDAX D ;get character from de-pair - INX D ;point at next character - CPI ' ' ;less than space? - RC ;return carry if unpermitted character - PUSH H - PUSH B - CPI '[' ;if greater than 'z', exit with.. - BRNC CKERR ;..carry set. - MVI B,CHR$TEND-CHR$TBL - LXI H,CHR$TBL -CHR$LP: - CMP M - BRZ CKERR - INX H - BJNZ CHR$LP - ORA A ;clear carry for good character - POP B - POP H - RET - -CKERR: - POP B - POP H - STC ;error exit with carry set - RET - -CHR$TBL: - DB ',',':',';','<','=','>' ;invalid character table -CHR$TEND: - DS 0 -; -; Print file name pted to by HL -; Advance HL 11 bytes -; -PRFN: - MOV A,M ;check for 'noname' - CPI 1 ;no name? - BRZ PRFN1 - MVI B,8 ;8 chars - CALL PRFNS1 - MVI A,'.' - CALL COUT - MVI B,3 ;file type and fall thru -PRFNS1: - MOV A,M ;get char - CALL COUT - INX H ;pt to next - BJNZ PRFNS1 - RET -PRFN1: - CALL VPRINT - DB ' No File' - DB ' ' - DB ' ',0 - MVI B,11 ;advance 11 chars -PRFN2: - INX H ;pt to next - BJNZ PRFN2 - RET - -; -; move subroutine -- move b-reg # of bytes from hl-pair to de-pair -; -MOVE: - MOV A,M ;get hl-pair referenced source byte - ANI 7FH ;strip attributes - STAX D ;put to de-pair referenced destination - INX H ;fix pointers for next search - INX D - BJNZ MOVE - RET - -MOVEB: - PUSH H ;SAVE HL, DE - PUSH D - CALL MOVE - POP D ;RESTORE DE, HL - POP H - RET -; -; Compare de-pair to hl-pair and set flags accordingly -; -CMPDEHL: - MOV A,D ;see if high bytes set flags - CMP H - RNZ ;return if not equal - MOV A,E - CMP L ;low bytes set flags instead - RET -; -; Shift hl-pair b-reg bits (-1) to right (divider routine) -; -SHIFTLP: - DCR B - RZ - MOV A,H - ORA A - RAR - MOV H,A - MOV A,L - RAR - MOV L,A - BR SHIFTLP - -; -;************************************************** -; -; MESSAGE Routines -; -; Print VMENU Banner -; -BANNER: - CALL VCLS ;clear screen - LXI H,BANADR - CALL GOTOXY - CALL VPRINT ;print banner - DB 'VMENU, Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0' - IF Z80 - DB ' ',DIM,'[Z80 Code]',BRIGHT - ELSE - DB ' ',DIM,'[8080 Code]',BRIGHT - ENDIF - DB 0 - RET -; -; Print DU:DIR and MORE Message -; -DIRMORE: - LXI H,DUADR ; POSITION CURSOR - CALL GOTOXY - CALL RETUD ; GET CURRENT DISK AND USER - MOV A,B ; PRINT DISK - ADI 'A' - CALL COUT - MOV A,C ; PRINT USER - CALL PAFDC ; FLOADING DECIMAL - MVI A,':' - CALL COUT - CALL DUTDIR ; GET DIR NAME - BRZ NODIR - MVI B,8 ; 8 CHARS IN NAME -PRNAME: - MOV A,M ; GET CHAR - CPI ' '+1 ; CHECK FOR DONE - BRC PRMORE - CALL COUT ; PRINT CHAR - INX H - BJNZ PRNAME - BR PRMORE -NODIR: - CALL VPRINT - DB 'Noname',0 -PRMORE: - LDA MORE ; CHECK FLAG - ORA A ; 0=NO MORE - RZ - LXI H,MOREADR - CALL GOTOXY ; POSITION CURSOR - CALL VPRINT - DB DIM,'[More Files]',BRIGHT,0 - RET - -; -; Home the Cursor -; -CUR$FIRST: - LXI H,CURHOME ; HOME ADDRESS - SHLD CURAT ; SET CURSOR POSITION - JMP GOTOXY -; -; Last File Position -; -CUR$LAST: - LHLD RINGPOS ; ADVANCE - SHLD LOCPOS ; SET LOCAL POSITION -CL0: - LXI D,ELTSIZ - DAD D - XCHG - LHLD LOCEND ; END OF LOCAL RING? - CALL CMPDEHL - RZ - XCHG ; NEW POSITION - SHLD LOCPOS - PUSH H ; SAVE POSITION - CALL CUR$NEXT ; ADVANCE CURSOR - POP H ; GET POSITION - BR CL0 -; -; Advance the Cursor -; -CUR$NEXT: - LHLD CURAT ; COMPUTE NEW POSITION - MOV A,L ; CHECK FOR NEW LINE - ADI 19 ; SIZE OF EACH ENTRY - CPI 70 - BRNC CN1 ; ADVANCE TO NEXT LINE - MOV L,A ; NEW POSITION - SHLD CURAT - JMP GOTOXY -CN1: - MOV A,H ; GET LINE - LXI H,CURHOME ; GET COL - MOV H,A ; SET LINE AND FALL GO TO CUR$DOWN - SHLD CURAT - BR CUR$DOWN -; -; Back Up the Cursor -; -CUR$BACK: - LXI H,CURHOME ; GET HOME - XCHG ; ... IN DE - LHLD CURAT - CALL CMPDEHL ; COMPARE - BRZ CUR$LAST ; GOTO END IF LAST - MOV A,L ; CHECK FOR FIRST COL - CMP E - BRZ CB1 - SUI 19 ; BACK UP ONE COL - MOV L,A - SHLD CURAT ; NEW POS - JMP GOTOXY -CB1: - MOV A,E ; GET HOME COL - ADI 19*3 ; GET LAST COL - MOV L,A - DCR H ; PREV LINE - SHLD CURAT - JMP GOTOXY -; -; Move Cursor Down One Line -; -CUR$DOWN: - LXI H,CURHOME ; GET HOME ADDRESS - MOV B,H ; LINE IN B - LHLD CURAT ; GET CURRENT ADDRESS - INR H ; MOVE DOWN - MOV A,H ; CHECK FOR TOO FAR - SUB B - CPI EPS/4 - BRNC CD1 - SHLD CURAT ; OK, SO SET POSITION - JMP GOTOXY -CD1: - MOV A,L ; GET COL - LXI H,CURHOME - MOV L,A - SHLD CURAT - JMP GOTOXY -; -; Refresh Screen -; -REFRESH: - LHLD CURAT ; SAVE CURSOR AND RING POSITIONS - SHLD SCURAT - LHLD RINGPOS - SHLD SRINGPOS - CALL BANNER ; PRINT BANNER - CALL DIRMORE ; PRINT CURRENT DIRECTORY AND MORE MESSAGE - CALL DISPFILES ; DISPLAY FILES - CALL DISPMENU ; DISPLAY MENU - LHLD SCURAT ; RESTORE CURSOR AND RING POSITIONS - SHLD CURAT - LHLD SRINGPOS - SHLD RINGPOS - CALL SETCUR ; RESTORE CURSOR ON SCREEN - call atcmd - call vprint - db DIM,'Command (CR=Menu',0 - lda cpmok ;OK to return to ZCPR3? - ora a ;0=No - cnz prmptc - lhld cstart ;pt to first char - mov a,m ;get it - ani 7FH ;mask - cpi MFIRST - cnz prmptf ;print previous menu prompt if not first menu - lda nmenfl ;next menu available? - ora a ;0=No - cnz prmptn ;print next menu prompt - call vprint - db ') - ',BRIGHT,0 - RET - -; -; Print ZCPR3 Return Prompt -; -prmptc: - call vprint - db ', ^C=Z3',0 - ret -; -; Print First/Last Menu Chars -; -prmptf: - call vprint - db ', ',RFM,'=1st Menu, ',RLM,'=Prev Menu',0 - ret -; -; Print next menu message -; -prmptn: - call vprint - db ', ',RNM,'=Next Menu',0 - ret - -; -; Refresh File Display -; -DISPFILES: - CALL CUR$FIRST ; POSITION CURSOR AT FIRST POSITION - LHLD LOCBEG ; PT TO FIRST FILE NAME - SHLD LOCPOS ; SAVE LOCAL POSITION -DSPF1: - LHLD LOCEND ; AT END? - XCHG - LHLD LOCPOS - CALL CMPDEHL - JZ CUR$FIRST ; POSITION AT FIRST ENTRY AND RETURN - MVI B,4 ; 4 SPACES - MVI A,' ' -DSPF2: - CALL COUT - BJNZ DSPF2 - CALL PRFN ; PRINT FILE NAME (HL IS ADVANCED) - SHLD LOCPOS - CALL CUR$NEXT ; ADVANCE CURSOR - BR DSPF1 -; -; Position Cursor at CURAT -; -SETCUR: - LHLD CURAT - CALL GOTOXY - CALL VPRINT - DB '-->',0 - RET -; -; Clear Cursor -; -CLRCUR: - LHLD CURAT - CALL GOTOXY - CALL VPRINT - DB ' ',0 - RET -; -; Working Message -; -WORKMSG: - CALL ERMSG - DB DIM,'Working ...',BRIGHT,0 - RET -; -; Error Message -; -ERMSG: - MVI A,0FFH ; SET ERROR MESSAGE FLAG - STA ERMFLG - LXI H,ERADR ; GET ADDRESS - CALL GOTOXY - JMP VPRINT -; -; Clear Error Message -; -ERCLR: - XRA A ; CLEAR FLAG - STA ERMFLG - LXI H,ERADR ; POSITION - CALL GOTOXY - PUSH B - MVI B,76-(ERADR MOD 255) - CALL VEREOL ; ERASE TO EOL - POP B - RET -; -; Position at Command Prompt and Clear It -; -ATCMD: - LXI H,CPMADR ; POSITION - CALL GOTOXY - PUSH B - MVI B,76-(CPMADR MOD 255) - CALL VEREOL ; CLEAR MESSAGE - POP B - LXI H,CPMADR ; REPOSITION - JMP GOTOXY -; -; Position at Bottom of Screen and Prompt for Continuation -; -BOTTOM: - LXI H,BOTADR ; POSITION - CALL GOTOXY -; -; Prompt for Continuation -; -SAK: - CALL VPRINT - DB DIM,'Strike Any Key -- ',BRIGHT,0 - JMP KEYIN - -; -; Open Menu File -; -menuload: - lhld menufcb ;pt to menu fcb - inx h - push h - call getfn2 ;copy FCB into MENU FCB - lxi d,11*2 ;pt to 3rd system file name - dad d - pop d ;DE pts to first char of MENU FCB file name - mvi b,11 ;11 bytes - call moveb - dcx d ;pt to fcb - call initfcb ;init fcb - call f$open ;open file - brz menu1 ;abort if no menu - call vprint - db CR,LF,' File ',0 - lhld menufcb ;pt to file name - inx h - call prfn - call vprint - db ' Not Found',0 - jmp os$ccp ;abort -; -; Load Menu File from disk -; -menu1: - call menustrt ;get address of buffer for menu load - xchg ;... in DE -; -; Load next block from Menu File -- DE pts to Load Address -; -mload: - lhld menufcb ;pt to FCB - xchg ;... in DE, HL = load address - call f$read ;read in next block - ora a ;error? - brnz mloaddn ;load done if error - lxi d,tbuff ;copy from TBUFF into memory pted to by HL - xchg ;HL is source, DE is dest - mvi b,128 ;128 bytes - call move - lhld bdos+1 ;get address of top of TPA - mov a,h ;set to bottom of ZCPR3 - sui 10 - cmp d ;about to overflow ZCPR3? - brnc mload ;continue if not - call vprint - db CR,LF,' TPA Full',0 - jmp os$ccp - -; -; Init Flags and Clear MSB of all bytes in Menu File -; -mloaddn: - call f$close ;close input file - mvi m,CTRLZ ;ensure EOF mark - xra a ;A=0 - sta cpmok ;turn off ZCPR3 return flag - call menustrt ;pt to first menu char - push h ;save ptr -menul1: - mov a,m ;get byte - ani 7FH ;mask out MSB - mov m,a ;put byte - inx h ;pt to next - cpi CTRLZ ;EOF? - brnz menul1 ;continue if not -; -; Mark all Menu Sections -; - pop h ;HL pts to first byte of menu - mvi b,0FFH ;set menu counter -; -; Skip to Next Menu -; -menul2: - mov a,m ;get byte - cpi CTRLZ ;error? - jz mstrerr ;structure error if so - cpi MINDIC ;menu indicator (start of menu?) - brnz menul4 - ori 80H ;beginning of menu found -- set MSB - mov m,a ;put byte - inr b ;increment menu count - inx h ;pt to next - mov a,m ;get byte - cpi MINDIC ;menu indicator (end of menu?) - brz menul5 ;done if so - cpi CTRLZ ;error? - jz mstrerr -; -; Skip out Menu Display -; -menul3: - call lskipt ;skip to beginning of next line - brz menul4 ;found menu indicator - cpi CTRLZ ;error? - jz mstrerr - br menul3 ;continue if not -; -; Skip to Next Menu -; -menul4: - call lskipt ;skip to beginning of next menu - brz menul2 ;resume if at beginning of next menu - cpi CTRLZ ;error? - jz mstrerr - br menul4 -; -; Check Menu Options -; -menul5: - call menustrt ;pt to first menu char - mov a,m ;check for option - cpi GOPTION ;global option char? - jnz mfile ;if no global option, scan for menu files - inx h ;pt to option char -option: - mov a,m ;get option char - call caps ;capitalize - inx h ;pt to next - cpi CR ;done? - brz optdn - cpi XOPTION ;exit OK? - jnz mstrerr ;option error if not -; -; Disable Exit to ZCPR3 -; - mvi a,0FFH ;turn flag off - sta cpmok - br option -; -; Option Processing Done -; -optdn: - inx h ;skip LF - -; -; Check for Menu Display -; -mfile: - mov a,m ;get first byte - ani 7FH ;mask - cpi MINDIC ;start of menu? - jnz mstrerr - -; -; Check and Set First Menu -; - shld mstart ;save start address of first menu item - mvi m,MFIRST+80H ;set first char of first menu - ret - -; -; Entry Point for Menu Display -; -dispmenu: - mvi h,epsline ;pt to first line of menu - mvi l,1 ;col 1 - call gotoxy ;position there - lhld mstart ;pt to first byte of current menu - mvi b,1 ;shell message 1 contains menu number - call getshm ;get menu number flag - cnz mchc0 ;skip to proper menu - shld cstart ;save start address of current menu - inx h ;pt to first char after menu indicator char -dispm1: - mov a,m ;get char - call caps ;capitalize - inx h ;pt to next - cpi CR ;end of options? - brz dispm2 - cpi XOPTION ;ZCPR3 return? - jnz mstrerr ;error if not -; -; Toggle ZCPR3 Return Option -; - lda cpmok ;get flag - cma ;toggle - sta cpmok - br dispm1 -; -; Done with Menu-Specific Option Processing -; -dispm2: - call lskip ;skip to LF - call getnlines ;get line count in A - sta pagcnt ;set count -; -; Print Next Line of Menu if not Starting with ESCAPE Char (MINDIC) -; -dispm3: - mov a,m ;get first char of line - ani 7FH ;mask - cpi MINDIC ;done? - brz dispm4 - call expand ;expand line pted to by HL - push h ;save ptr to next line - xchg ;HL pts to expanded line - call lprintx ;print line pted to by HL ending in - pop h ;pt to next line - br dispm3 -; -; Done with Menu Display -; -dispm4: - call lskip ;skip to first char of next line (option char) - shld optstrt ;set start address of options -; -; Determine if Another Menu Follows -; - xra a ;A=0 - sta nmenfl ;set for no next menu -dispm5: - mov a,m ;ok? - ani 7FH ;mask - cpi CTRLZ ;error if EOF - jz mstrerr - cpi MINDIC ;next menu? - brnz dispm6 - inx h ;double indicator if end - mov a,m - cpi MINDIC ;end? - rz - mvi a,0FFH ;set next menu - sta nmenfl - ret -dispm6: - call lskip ;skip to next line - br dispm5 - -; -; Ready for Option Input -; The following Flags/Values are now set: -; OPTSTRT -- Address of First Menu Option -; NMENFL -- 0 if no next menu, 0FFH if next menu -; CSTART -- Address of First Char of Current Menu -; MSTART -- Start Address of MINDIC Before Menu Display -; (MSTART)=MFIRST with MSB Set -prompt: - lxi h,cpadr ;position for input - call gotoxy - mvi a,0ffh - sta pagcnt ;turn off paging - call keyin ;get user input - PUSH PSW ;save command - LDA ERMFLG ;error message? - ORA A ;0=no - CNZ ERCLR ;erase old error message - POP PSW ;get command - ret - -; -; Process Command -; -cmdproc: - call ctproc ;process movement or exit command - -; -; Check for Command to Return to First Menu -; - lhld cstart ;pt to first char of menu - mov a,m ;get it - ani 7FH ;mask - cpi MFIRST - brz prmpt1 - mov a,b ;get command - cpi RFM ;return to first menu? - brnz prmpt1 - lhld mstart ;pt to first menu - mvi b,1 ;shell message 1 is menu number - xra a ;A=0=menu 0 - jmp putshm ;reenter shell at first menu - -; -; Check for Command to go to Next Menu -; -prmpt1: - lda nmenfl ;next menu available? - ora a ;0=No - brz prmpt2 - mov a,b ;get command - cpi RNMP ;goto next menu? - brz rnmx - cpi RNM ;goto next menu? - brnz prmpt2 -rnmx: - mvi b,1 ;shell message 1 is menu number - call getshm ;increment menu number - inr a - call putshm ;reenter menu system at new menu - jmp os$ccp1 -; -; Check for Command to go to Last Menu -; -prmpt2: - mov a,m ;get menu char - ani 7FH ;at first menu? - cpi MFIRST - brz prmpt3 ;skip if at first menu - mov a,b ;get command - cpi RLMP ;goto last menu? - brz lstmnu - cpi RLM ;goto last menu? - brnz prmpt3 -lstmnu: - mvi b,1 ;shell message 1 is menu number - call getshm ;decrement menu number - dcr a - call putshm ;reenter shell at last menu - jmp os$ccp1 -; -; This is where additional functions may be added -; -prmpt3: - -; -; Check for Option Letter -; - lhld optstrt ;pt to first option char -prmptx: - mov a,m ;get it - ani 7FH ;mask MSB - call caps ;capitalize - cpi MINDIC ;at next menu? - rz - cmp b ;match user selection? - brz prmptd - call lskip ;skip to next line - br prmptx - -; -; Process Option -; -prmptd: - mvi b,0 ;shell message 0, bit 7 = wait flag - call getshm - ani 7FH ;set no wait - call putshm - inx h ;pt to first letter of command - mov a,m ;get it - cpi MCMD ;invoke other menu? - jz mchcmd ;menu change command - cpi WOPTION ;turn on wait? - brnz prmptg - mvi b,0 ;shell message 0, bit 7 = wait flag - call getshm - ori 80h ;set wait flag - call putshm ;set shell message - inx h ;skip option char -prmptg: - call expand ;expand line, DE pts to result -; -; Run Command Pted to by DE -; -runcmnd: - call getcl1 ;get address of command buffer - mov b,h ;... in BC also - mov c,l - mvi a,4 ;HL=HL+4 for address of first char - add l - mov l,a - mov a,h - aci 0 - mov h,a - mov a,l ;store address - stax b - inx b - mov a,h - stax b -; -; Copy Command Line in DE into Buffer in HL -; -cmdcpy: - ldax d ;get command letter - call caps ;capitalize it - ora a ;done? - brz ccpyd - cpi CR ;done? - brz ccpyd - cpi PCHAR ;prompt? - brz ccpyp - mov m,a ;store it - inx h ;pt to next - inx d - br cmdcpy -ccpyd: - mvi m,0 ;store ending 0 - jmp os$ccp1 ;optionally display command -; -; Prompt User for Input and Accept It -; -ccpyp: - inx d ;pt to first char of prompt - call crlf ;new line -ccpyp1: - ldax d ;get char - cpi PCHAR ;end of prompt? - brz ccpyp2 - cpi CR ;new line? - brz ccpyp3 - call cout ;echo char - inx d ;pt to next char - br ccpyp1 ;continue looping -ccpyp2: - inx d ;pt to char after closing PCHAR -ccpyp3: - push d ;save ptr to next char - xchg ;DE pts to buffer - mvi a,0FFH ;capitalize input from user - lhld ibuf ;input line buffer - call bline ;get input from user - xchg ;HL pts to buffer, DE pts to user input -cmdlp: - ldax d ;get char from user - ora a ;end of input? - brz cmdlp1 ;store rest of line - mov m,a ;store char - inx h ;pt to next - inx d - br cmdlp -cmdlp1: - pop d ;DE pts to next char, HL pts to buffer - br cmdcpy ;resume copying - -; -; Menu Change Command -- Jump to Specified Menu -; -mchcmd: - inx h ;pt to menu number - call eval ;convert to decimal number in A - sta menuno ;save menu number - call mchc0 ;skip to desired menu to check for it - lda menuno ;get menu number - mvi b,1 ;menu number is shell message 1 - jmp putshm ;set message and reenter shell - -; -; Entry Point if MENU is Reinvoked -; -mchc0: - mov b,a ;menu number in B - inr b ;increment for following decrement - lhld mstart ;pt to start of menu -mchc1: - dcr b ;count down - rz ;done if found -mchc2: - call lskipt ;skip to next line - brnz mchc2 ;continue if not end of menu display - cpi CTRLZ ;EOF? - jz mstrerr -mchc3: - call lskipt ;skip to next line - brnz mchc3 ;continue if not at end of menu commands - cpi CTRLZ ;EOF? - jz mstrerr - inx h ;end of MENU.MNU? - mov a,m ;yes if double MINDIC - ani 7FH ;mask - cpi MINDIC - jz mstrerr ;error if so - dcx h ;pt to first char - br mchc1 ;continue - -; -; Print Line pted to by HL Ending in -; Decrement PAGCNT -; -lprintx: - call lprint ;print without - jmp crlf ;do -; -; Print Line Pted to by HL; Decrement PAGCNT -; -lprint: - lda pagcnt ;check for page overflow - ora a ;do nothing - brz lskip ;... except skip out line - mvi b,0 ;set tab counter -lprnt0: - mov a,m ;get char - inx h ;pt to next - ani 7FH ;mask MSB - cpi DIM ;goto standout mode? - brz lprnt3 - cpi BRIGHT ;end standout mode? - brz lprnt4 - cpi TAB ;tabulate? - brz lprnt2 - cpi CR ;done? - brz lprnt1 - call cout ;print - inr b ;incr tab counter - br lprnt0 -lprnt1: - inx h ;pt to first char of next line - lda pagcnt ;count down pages - dcr a - sta pagcnt - ret -lprnt2: - mvi a,' ' ;print - call cout - inr b ;incr tab counter - mov a,b ;done? - ani 7 ;every 8 - brnz lprnt2 - br lprnt0 -lprnt3: - call stndout ;enter standout mode - br lprnt0 -lprnt4: - call stndend ;end standout mode - br lprnt0 - -; -; Skip to Beginning of Next Line and Test First Char for Menu Indicator -; -lskipt: - call lskip ;skip - mov a,m ;get char - ani 7FH ;mask - cpi MINDIC ;test - ret - -; -; Skip to Beginning of Next Line -; -lskip: - mov a,m ;get char - ani 7FH ;mask out MSB - cpi CTRLZ ;EOF? - rz - inx h ;pt to next - cpi LF ;EOL? - brnz lskip - ret - -; -; Menu Structure Error -- FATAL -; This message is printed to indicate an error in the structure of -; the MENU.MNU file. -; -mstrerr: - call vprint - db CR,LF,' Structure Error',0 - jmp os$ccp - -; -; Expand Line Pted to by HL into Scratch Area -; Return with HL pting to next line, DE pting to current line -; -expand: - xchg - lxi h,noname ;init no name file - mvi m,1 ;set no entry - lhld expline ;pt to buffer - xchg -exp1: - mov a,m ;get next char - ani 7fh ;mask MSB - stax d ;store char - cpi CR ;end of line? - jz expx - inx h ;pt to next - inx d - cpi VARFLAG ;variable follows? - brnz exp1 -; -; Variable Identified - Process it -; - mov a,m ;get next char - inx h ;pt to next - cpi VARFLAG ;one variable char? - brz exp1 ;resume if double VARFLAG - dcx d ;pt to variable position - ani 7FH ;mask - call caps ;capitalize variable - cpi FPDISK ;current disk? - brz expdisk - cpi FPUSER ;current user? - brz expuser - cpi FPFILE ;filename.typ? - brz expfile - cpi FPNAME ;filename? - brz expname - cpi FPPTR ;file being pointed to? - brz exppfile - cpi FPTYPE ;filetype? - brz exptype - br exp1 ;resume expansion -; -; Expand Exit -; -expx: - inx h ;pt to line feed - mov a,m ;get it - cpi LF ;line feed? - brnz expx1 - inx h ;pt to char after line feed -expx1: - xchg ;DE pts to next line - lhld expline ;pt to expanded line - xchg ;HL pts to next line, DE pts to expanded line - ret - -; -; Expand Disk -; -expdisk: - call retud ;get disk in B - mov a,b ;get disk number (A=0) - adi 'A' ;convert to ASCII - stax d ;store letter - inx d ;pt to next - br exp1 ;resume expansion -; -; Expand User -; -expuser: - call retud ;get user in C - mov a,c ;get user number - mvi b,10 ;subtract 10's - mvi c,'0' ;set char -expu1: - sub b ;-10 - brc expu2 - inr c ;increment digit - br expu1 -expu2: - add b ;+10 - adi '0' ;convert 1's to ASCII - mov b,a ;B=1's - mov a,c ;get 10's - stax d ;store 10's - inx d - mov a,b ;get 1's - stax d ;store 1's - inx d ;pt to next - br exp1 ;resume -; -; Expand File -; -expfile: - call getfnum ;get file number - jz exp1 ;resume if error - push h ;save ptr to next char - call ptfn ;set ptr to file name - call putn ;put file name - mvi a,'.' - stax d ;store dot - inx d ;pt to next - call putt ;put file type - pop h ;restore ptr - jmp exp1 ;resume -; -; Expand Name -; -expname: - call getfnum ;get file number - jz exp1 ;resume if error - push h ;save ptr to next char - call ptfn ;set ptr to file name - call putn ;put file name - pop h ;restore ptr - jmp exp1 ;resume -; -; Expand Type -; -exptype: - call getfnum ;get file number - jz exp1 ;resume if error - push h ;save ptr to next char - call ptfn ;set ptr to file name - mvi a,8 ;add 8 - add l - mov l,a - mov a,h - aci 0 - mov h,a - call putt ;put file type - pop h - jmp exp1 ;resume -; -; Expand File at Pointer -; -exppfile: - mov a,m ;get option char - ani 7FH ;mask - call caps ;capitalize - cpi FPFILE ;filename.typ? - brz exppf - cpi FPNAME ;filename only? - brz exppn - cpi FPTYPE ;filetype only? - brz exppt - jmp exp1 ;abort if error -; -; Extract full filename.typ of file being pointed to -; -exppf: - inx h ;pt to next char - push h ;save ptr to next char - lhld ringpos ;set ring position - call cknoname ;check and substitute no file - call putn ;put name pted to by HL - mvi a,'.' ;store dot - stax d - inx d - call putt ;put type pted to by HL - pop h - jmp exp1 ;continue -; -; Expand file name of file being pointed to -; -exppn: - inx h ;pt to next char - push h ;save ptr to next char - lhld ringpos ;set ring position - call cknoname ;check and substitute no file - call putn ;put name - pop h - jmp exp1 -; -; Expand file type of file being pointed to -; -exppt: - inx h ;pt to next char - push h ;save ptr to next char - push d ;save DE - lhld ringpos ;pt to ring entry - call cknoname ;check and substitute no file - lxi d,8 ;pt to file type - dad d - pop d ;get DE - call putt ;put type - pop h - jmp exp1 -; -; Check to see if HL pts to 'noname' and, if so, substitute name -; -cknoname: - push d ;save DE - push b ;save BC - call ckno ;do check - pop b ;get BC - pop d ;restore DE - ret -ckno: - mov a,m ;get char - cpi 1 ;no name? - rnz - lxi h,noname ;pt to no name - mov a,m ;check for definition - cpi 1 ;no name? - rnz - xchg ;HL pts to file name - call ermsg - db 'File Name? ',0 - lhld ibuf ;pt to input buffer - mvi a,0ffh ;capitalize input - call bline ;get line from user - call sksp ;skip spaces - xchg - lhld menufcb ;pt to dummy FCB - xchg - call zprsfn ;parse file name into FCB - inx d ;pt to first char - lxi h,noname ;pt to name buffer - xchg - mvi b,11 ;copy into buffer - call moveb - ret ;HL pts to name -; -; Pt to File Name whose Number (1-4) is in A -; -ptfn: - mov b,a ;get number in B - call getfn2 ;pt to file name 2 - push d ;save DE - mov a,b ;file 0? - ora a - brz ptfnx - lxi d,11 ;size of file name and type -ptfn1: - dad d ;pt to next - bjnz ptfn1 -ptfnx: - pop d ;restore DE - ret -; -; Put File Name pted to by HL -; -putn: - mvi b,8 ;8 chars - br putc -; -; Put File Type pted to by HL -; -putt: - mvi b,3 ;3 chars -; -; Copy Chars from HL to DE for up to B bytes -- flush if space -; -putc: - mov a,m ;get next char - cpi ' ' ;skip spaces - brz putc1 - stax d ;put next char - inx d ;pt to next -putc1: - inx h ;pt to next - bjnz putc - ret - -; -; Get File Number (1 to 4) -; If valid number, return with value in A and HL pting to next char -; If not valid, return with Z and HL pting to last char (F, N, T) -; -getfnum: - mov a,m ;get char - sui '1' ;convert - brc getfne ;error - cpi 4 ;range? - brnc getfne - inx h ;pt to next char - ret ;NZ from CPI 4 -getfne: - dcx h ;error return - xra a - ret - -; -; Return Number of Lines on CRT in A -; -getnlines: - push h ;save HL - call getcrt ;get CRT info - inx h ;pt to number of lines - mov a,m ;get count - pop h ;restore HL - sui EPSLINE+1 ;subtract number of lines in file display - ; ... + 1 for footer - ret - -; -; Convert char string pted to by HL into decimal number in A -; On Entry, HL pts to first digit char -; On Exit, HL pts to after last digit char and A=number -; -eval: - push b ;save BC - mvi b,0 ;set value -eval1: - mov a,m ;get digit - sui '0' ;convert to binary - brc eval2 - cpi 10 ;range? - brnc eval2 - inx h ;pt to next digit - mov c,a ;new digit in C - mov a,b ;multiply B by 10 - add a ;*2 - add a ;*4 - add b ;*5 - add a ;*10 - add c ;add in new digit - mov b,a ;result in B - br eval1 -eval2: - mov a,b ;result in A - pop b ;restore ptr - ret - -; -; Compute Address of Buffer for Menu Load -; -menustrt: - lhld ringend ;get address of buffer for menu load - inr h ;next page - mvi l,0 - ret - -; -; S T O R A G E -; -; Initialized -; -FILERCMD: - VMNAME ;VMENU Name - VMNFILL ;Filler - DB ' ' ;one space - DB 0 ;end of shell command -JOKER: - DB '???????????' ;*.* equivalent -MENUFILE: - db 'MENU ' - db 'VMN' - -; -; Uninitialized -; -STACK: - DS 2 -BUFFER: - DS 2 ;buffer start -CURAT: - DS 2 ;current cursor position -ERMFLG: - DS 1 ;error message flag -EXPLINE: - DS 2 ;buffer to expand line in -H$DR: - DS 1 ;home drive -H$U$A: - DS 1 ;home user area (must follow H$DR) -IBUF: - DS 2 ;input line buffer -LOCBEG: - DS 2 ;local beginning of ring -LOCEND: - DS 2 ;local end of ring -LOCPOS: - DS 2 ;local ring position (temp) -MENUFCB: - DS 2 ;FCB for Menu File -NONAME: - DS 11 ;dummy user-defined file name -RING: - DS 2 ;ptr to beginning of ring -RINGI: - DS 2 ;ring sort pointer -RINGJ: - DS 2 ;another ring sort pointer -RINGEND: - DS 2 ;current ring end pointer -RINGPOS: - DS 2 ;current ring position in scan -SCURAT: - DS 2 ;save cursor position -SRINGPOS: - DS 2 ;save ring position -; -; Menu Buffers -; -more: - ds 1 ;More Files Flag -optstrt: - ds 2 ;Address of First Option in Current Menu -mstart: - ds 2 ;Address of First Menu -cstart: - ds 2 ;Address of Current Menu -nmenfl: - ds 1 ;Next Menu Available Flag (0=No) -menuno: - ds 1 ;Number of Menu -pagcnt: - ds 1 ;Paging Counter -cpmok: - ds 1 ;OK to Return to ZCPR3 (0=No) - - END - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/VMENU24.LBR b/Source/Images/d_bp/u15/VMENU24.LBR deleted file mode 100644 index fdab2f95..00000000 Binary files a/Source/Images/d_bp/u15/VMENU24.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/VMENUCK.COM b/Source/Images/d_bp/u15/VMENUCK.COM deleted file mode 100644 index 920b68e4..00000000 Binary files a/Source/Images/d_bp/u15/VMENUCK.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/VMENUCK.MAC b/Source/Images/d_bp/u15/VMENUCK.MAC deleted file mode 100644 index f16f591f..00000000 --- a/Source/Images/d_bp/u15/VMENUCK.MAC +++ /dev/null @@ -1,551 +0,0 @@ -; -; PROGRAM: VMENUCK -; AUTHOR: RICHARD CONN -; VERSION: 1.0 -; DATE: 22 July 84 -; PREVIOUS VERSIONS: None -; DERIVATION: MENUCK 1.0 (18 May 84) -; -VERS EQU 10 ;VERSION NUMBER -z3env SET 0f400h - -; -; VMENUCK is used to check the syntax of a MENU.VMN file for the ZCPR3 -; menu processor, VMENU. VMENU was optimized for size and runtime speed, and -; I tried to keep the size under 2K (and succeeded, for that matter). In -; keeping VMENU small, the error diagnostics it gives are quite limited, with -; a variety of errors producing the message "Str Err" for MENU.VMN -; structure error. -; -; VMENUCK is intended to be used to check the syntax and other features -; of a user's MENU.VMN before allowing VMENU to run with it. In this way, -; many errors may be caught before the MENU.VMN file comes into common use, -; and there is plenty of space for informative diagnostics. -; - -; -; MENU Constants -; -MCMD EQU ':' ;Menu Jump Command -MINDIC EQU '#' ;Menu Indic -GOPTION EQU '-' ;Global Option Indic -XOPTION EQU 'X' -VARFLAG EQU '$' ;Variable Flag - -; -; CP/M Constants -; -bentry equ 5 ;BDOS Entry -fcb equ 5ch ;FCB -tbuff equ 80h ;Temp I/O Buffer -cr equ 0dh -lf equ 0ah -EOF equ 'Z'-'@' ;^Z=EOF - -; -; Externals -; - ext z3init,zfname,z3log - - ext caps,crlf,eval10,retud - ext f$open,f$close,f$read - ext print,cout - ext moveb - ext phldc,padc,pfn2,pafdc - ext codend - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - - call print - db 'VMENUCK Version ' - db (vers/10)+'0','.',(vers mod 10)+'0',0 - - lda fcb+1 ;get first char - cpi ' ' ;no file name? - jz help - cpi '/' ;option? - jnz start1 -; -; Print Help Message -; -help: - call print - db cr,lf,'Syntax:' - db cr,lf,' VMENUCK dir:filename.typ <-- Check File' - db cr,lf,' VMENUCK dir:filename <-- Check filename.VMN' - db 0 - ret - -; -; Begin serious processing -- locate the file pted to by HL -; -start1: - lxi d,fcb ;pt to FCB - call z3log ;log into indicated FCB - -; -; Set File Type to MNU if not specified -; -start2: - lxi h,fcb+9 ;pt to file type - mov a,m ;get first char - cpi ' ' ;set type if - jnz start3 - push b ;save BC - lxi d,mnutyp ;set type to MNU - xchg - mvi b,3 ;3 bytes - call moveb - pop b ;get BC -; -; Try to Open the File -; -start3: - lxi d,fcb ;prepare to open file - xra a ;A=0 to select current disk - stax d - call f$open ;open file - jz readfile ;read in file if OK - call print - db cr,lf,' File Not Found',0 - ret -; -; Read in File -; -readfile: - call codend ;get address of first block -readloop: - lxi d,fcb ;read block - call f$read ;do it - ora a ;check for error - jnz readdone - lxi d,tbuff ;pt to block just read in - mvi b,128 ;128 bytes -readmove: - ldax d ;get byte - ani 7fh ;mask MSB - mov m,a ;put byte - inx h ;pt to next - inx d - dcr b ;count down - jnz readmove - xchg ;DE pts to next block - lhld bentry+1 ;get address of BDOS - mov a,h ;check for possible overflow - sui 10 ;10 pages below BDOS is limit - cmp d ;within range? - xchg ;HL pts to next block - jnc readloop ;continue read if within range - call print - db cr,lf,' TPA Overflow -- VMENU File is Too Big',0 - ret -; -; Read is Done -- Store Ending ^Z and Set Initial Values -; -readdone: - mvi m,EOF ;Store ^Z to ensure EOF - lxi d,fcb ;Close File - call f$close - mvi a,0ffh ;A = -1 - sta menunum ;set menu number - sta maxnum ;set max number of all menus - lxi h,0 ;HL=0 - shld errors ;Set Error Count to 0 - inx h ;HL=1 - shld linenum ;Set Line Number to 1 -; -; Count Number of Menus -; - call codend ;Pt to First Byte - mov a,m ;get first byte -; -; Skip to Beginning of Menu Display -; -mdskip: - cpi EOF ;EOF? - jz mdone - cpi MINDIC ;beginning of display? - jz mcgo ;now go skip commands - call lskip ;skip to next line - jmp mdskip -mcgo: - inx h ;pt to char after MINDIC - mov a,m ;another MINDIC? - cpi MINDIC - jz mdone ;done if 2 in a row - lda maxnum ;get menu number count - inr a ;found another one - sta maxnum -mcskip: - call lskip ;skip to next line - jz mdone ;done if premature EOF - cpi MINDIC ;end of display? - jnz mcskip - inx h ;pt to char after MINDIC - mov a,m ;get it - jmp mdskip -; -; Check for Valid First Character -; -mdone: - call print - db cr,lf,'VMenu Syntax Check on ',0 - call retud ;get dir - mov a,b ;get disk - adi 'A' - call cout - mov a,c ;get user - call pafdc - mvi a,':' - call cout - lxi d,fcb+1 ;pt to FCB - call pfn2 - call print ;Print Header - db cr,lf - db cr,lf,' Line Comment/Error Message' - db cr,lf,' ---- ---------------------',0 - - xra a ;set no global option - sta gopt - call codend ;get address of first byte - mov a,m ;get first char - cpi GOPTION ;global options? - jnz newmenu ;process globals - mvi a,0ffh ;set global option - sta gopt - call lprint - db '** Global Options Detected **',0 - call optchk ;check options - xra a ;set no global option - sta gopt - call nxtline ;advance to next line -; -; This is the main entry point for processing a menu -; -newmenu: - mov a,m ;get Menu Indicator - cpi MINDIC ;must be MINDIC - jz nm1 - call newerr ;add to error count - call lprint - db ' New Menu Expected, But ',MINDIC,' NOT Found -- ' - db 'Aborting',0 - jmp errxit -; -; Print that we have a new menu -; -nm1: - call lprint - db '** Menu Number ',0 - lda menunum ;increment menu number - inr a - sta menunum - call padc - call optchk ;check options -; -; Skip Thru Display -; -nm2: - call nxtline ;skip to next line - jnz nm2a ;continue if no EOF -earlyeof: - call newerr ;add to error count - call lprint - db ' Premature EOF Encountered',0 - jmp errxit -nm2a: - cpi MINDIC ;Menu Indicator? - jnz nm2 ;Continue -; -; Move Thru Menu Commands -; -nm3: - call mcmd1 ;check Menu Command Line - jz earlyeof - call lcheck ;check line - cpi MINDIC ;check for menu indicator - jnz nm3 ;continue until menu indicator encountered - inx h ;check for 2 indicators in a row for end - mov a,m ;get 2nd char - dcx h ;back up in case it is not - cpi MINDIC ;2 in a row? - jnz newmenu ;process as new menu if not -errxit: - call lprint - db '** End of Menu Check **',cr,lf,' ',0 - lhld errors ;check error count - mov a,h ;check for Zero - ora l - jnz err1 - call print - db 'No',0 - jmp err2 -err1: - call phldc ;print as decimal -err2: - call print - db ' Errors Detected',0 - ret - -; -; Utilities -; - -; -; LPRINT -- Print "Line # "+text -; -lprint: - call crlf ;new line - push h ;save HL - lhld linenum ;get line number - call phldc ;print as decimal - pop h ;restore HL - mvi a,' ' ;print - call cout - jmp print ;print text -; -; NXTLINE -- Advance to next line, check for EOF, and increment Line Number -; LSKIP -- Advance to next line and check for EOF -; Return with HL pting to first char of next line and Z Set if EOF -; -nxtline: - push h ;increment line count - lhld linenum ;add 1 - inx h - shld linenum - pop h ;fall thru to skipping -lskip: - mov a,m ;get char - cpi EOF ;EOF? - rz - inx h ;pt to next - cpi lf ;line feed? - jnz lskip ;continue if not - mov a,m ;get first char of next line - cpi EOF ;check for EOF - ret -; -; MCMD1 -- Check Menu Line, check for EOF, and increment Line Number -; Return with HL pting to first char of next line and Z Set if EOF -; -mcmd1: - mov a,m ;get char - cpi EOF ;EOF? - jz mcmdx - inx h ;pt to next - cpi VARFLAG ;variable? - jz mcmd2 - cpi lf ;line feed? - jnz mcmd1 ;continue if not -mcmdx: - push h ;increment line count - lhld linenum ;add 1 - inx h - shld linenum - pop h ;fall thru to skipping - mov a,m ;get first char of next line - cpi EOF ;check for EOF - ret -; -; Check Variable -; -mcmd2: - mov a,m ;get char - ani 7fh ;mask - call caps ;capitalize - inx h ;pt to next - cpi VARFLAG ;OK if double VARFLAG - jz mcmd1 - cpi 'D' ;OK if D - jz mcmd1 - cpi 'U' ;OK if U - jz mcmd1 - cpi 'F' ;filename.typ? - jz mcmd3 - cpi 'N' ;filename? - jz mcmd3 - cpi 'T' ;filetype? - jz mcmd3 - cpi 'P' ;pointed-to file? - jz mcmd6 -; -; Invalid Variable -; - dcx h ;pt to previous (bad char) - push psw ;save char - call lprint - db ' Variable Error (Not $, D, U, F, N, or T) - ',0 - pop psw ;get char - call cout ;print it - call newerr ;increment error count - jmp mcmd1 -; -; Digit from 1 to 4 should follow -; -mcmd3: - mov a,m ;get next char - inx h ;pt to next - ani 7fh ;mask and cap - call caps - cpi '1' ;must be from 1 to 4 - jc mcmd4 - cpi '5' - jc mcmd1 -; -; Invalid Digit -; -mcmd4: - push psw - call lprint - db ' Invalid Digit for F, N, or T Variable (not 1-4) - ',0 -mcmd5: - pop psw - dcx h ;pt to invalid char - call cout - call newerr ;increment error count - jmp mcmd1 - -; -; Check for Pointed to File -; -mcmd6: - mov a,m ;get next char - inx h ;pt to next - ani 7fh ;mask - call caps - cpi 'F' - jz mcmd1 - cpi 'N' - jz mcmd1 - cpi 'T' - jz mcmd1 - push psw ;save char - call lprint - db ' Invalid Pointed-to File Option (not F, N, or T) - ',0 - jmp mcmd5 ;process error and back up ptr - -; -; OPTCHK -- Check Line Pted to by HL for Valid GOPTION and MINDIC options -; Do Not Affect HL -; Print Error Message and Character if Invalid Option Found -; -optchk: - push h ;save HL - push b - inx h ;skip indicator -optclp: - mov a,m ;get char - call caps ;capitalize - inx h ;pt to next - cpi cr ;EOL? - jz optcdn - mov b,a ;char in B - cpi XOPTION ;only exit option allowed - jz optclp - call newerr ;increment error count - call lprint - db ' Invalid Option: ',0 - mov a,b ;get char - call cout ;print char - jmp optclp -optcdn: - pop b - pop h ;restore ptr - ret -; -; Increment Error Count -; -newerr: - push h ;save HL - lhld errors ;increment error count - inx h - shld errors - pop h ;restore HL - ret -; -; Check Line, especially looking for Menu Jump -; -lcheck: - push h ;save ptr to first char - inx h ;pt to 2nd char - mov a,m ;get it - cpi MCMD ;menu jump? - jnz lchk1 - inx h ;pt to menu number - call eval10 ;convert to binary in DE - mov a,d ;D must be 0 - ora a ;check - jz lchk0 -lchker: - call newerr ;increment error count - call lprint - db ' Menu Number Out of Range',0 - jmp lchk1 -lchk0: - lda maxnum ;get max menu number - cmp e ;check for range - jc lchker -lchk1: - pop h ;restore ptr - mov a,m ;get first char in line - ret -; -; Skip HL over Blanks -; -sblank: - mov a,m ;get char - inx h ;pt to next - cpi ' ' ;blank? - jz sblank ;continue skipping - dcx h ;pt to non-blank - ret - -; -; Buffers -; -mnutyp: - db 'VMN' -errors: - ds 2 ;error count -linenum: - ds 2 ;current line number -menunum: - ds 1 ;current menu number -maxnum: - ds 1 ;max menu number -gopt: - ds 1 ;global option flag - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/VMENUFUN.LBR b/Source/Images/d_bp/u15/VMENUFUN.LBR deleted file mode 100644 index 6e9bc62a..00000000 Binary files a/Source/Images/d_bp/u15/VMENUFUN.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/WHEEL.COM b/Source/Images/d_bp/u15/WHEEL.COM deleted file mode 100644 index 15a5c85c..00000000 Binary files a/Source/Images/d_bp/u15/WHEEL.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/WHEEL.MAC b/Source/Images/d_bp/u15/WHEEL.MAC deleted file mode 100644 index 63937ed8..00000000 --- a/Source/Images/d_bp/u15/WHEEL.MAC +++ /dev/null @@ -1,218 +0,0 @@ -; -; PROGRAM: WHEEL -; VERSION: 3.0 -; AUTHOR: RICHARD CONN -; DATE: 8 MAR 84 -; PREVIOUS VERSIONS: 1.1 (24 JAN 83), 1.0 (14 Jan 83) -; -vers equ 30 - -; -; WHEEL is used to set and clear the WHEEL byte. It is invoked by -; one of the following forms: -; -; WHEEL // <-- Print Help -; WHEEL <-- Print Wheel Status -; WHEEL password SET <-- Set Wheel Byte -; WHEEL password <-- Set Wheel Byte -; WHEEL password RESET <-- Reset (Clear) Wheel Byte -; WHEEL /S or WHEEL /R <-- Set or Reset Wheel Byte -; (Type Password Later Sans Echo) -; - -; -; CP/M Constants -; -cpm equ 0 -z3env SET 0f400h ; Environment Descriptor -bdose equ cpm+5 -pass equ cpm+5dh ; 1st FCB is password -cmnd equ cpm+6dh ; 2nd FCB is command -tbuff equ cpm+80h -ctrlz equ 'Z'-'@' -cr equ 0dh -lf equ 0ah - -; -; SYSLIB Routines -; - ext print,caps,codend,inline,z3init,getwhl,putwhl,qprint - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - jmp start0 -; -; ** Wheel Password ** -; - db ctrlz ;prevents reading via TYPE -ppass: - db 'SYSTEM ' ;Wheel Password (8 Chars) -; -; Print Banner -; -start0: - call qprint - db 'WHEEL, Version ' - db vers/10+'0','.',(vers mod 10)+'0',cr,lf,0 - -; -; Begin Processing -; - lda pass ; get password - cpi ' ' ; help? - jz pwhlstat - cpi '/' - jnz start1 - lda pass+1 ; get option - sta cmnd ; store command - cpi 'R' ; reset? - jz inpass - cpi 'S' ; Set? - jz inpass -; -; Print Help Message -; -help: - call print - db cr,lf,' WHEEL is used to Set and Reset (Clear) the Wheel' - db cr,lf,'Byte in order to enable (Wheel Byte is Set) or disable' - db cr,lf,'(Wheel Byte is Reset) certain commands within ZCPR2.' - db cr,lf - db cr,lf,'The forms of the WHEEL command are:' - db cr,lf,' WHEEL // <-- Print Help' - db cr,lf,' WHEEL <-- Print Wheel Byte Setting' - db cr,lf,' WHEEL password SET <-- Set Wheel Byte' - db cr,lf,' WHEEL password <-- Set Wheel Byte' - db cr,lf,' WHEEL password RESET <-- Reset (Clear) Wheel Byte' - db cr,lf,' WHEEL /S or WHEEL /R <-- Set or Reset Wheel Byte' - db cr,lf,' but allow user to type' - db ' in password' - db cr,lf,' without echo' - db cr,lf,0 - ret - -; -; Print Wheel Byte Setting -; -pwhlstat: - call print - db ' Wheel Byte is ',0 - call getwhl ;get wheel byte -pronoff: - ora a ;0=off - jz proff - call print - db 'ON',0 - ret -proff: - call print - db 'OFF',0 - ret - -; -; Input Password without echo and then process it -; -inpass: - call print - db ' Wheel Password? ',0 - call codend ; pt to scratch area - xra a ; no echo - call inline ; get line from user - push h ; save ptr to first char - mvi b,8 ; 8 chars -inp1: - mov a,m ; capitalize input - call caps - mov m,a - inx h ; pt to next - ora a ; done? - jz inp2 - dcr b ;count down - jnz inp1 - jmp inp4 -inp2: - dcx h ;pt to null - mvi a,' ' ;space fill -inp3: - mov m,a ;store space - inx h - dcr b - jnz inp3 -inp4: - pop h ; get ptr to first char - jmp start2 -; -; Process Password -; -start1: - lxi h,pass ; pt to user password -start2: - lxi d,ppass ; pt to WHEEL password - mvi b,8 ; 8 chars max -passlp: - ldax d ; get WHEEL password - cmp m ; match? - jnz nopass - inx h ; pt to next - inx d - dcr b ; count down - jnz passlp -; -; Password Approved -; - lda cmnd ; check command - cpi 'R' ; reset? - jz reset -; -; Set Wheel Byte -; - mvi a,0ffh ;set wheel byte - call putwhl - jmp pwhlstat ;print status -; -; Reset Wheel Byte -; -reset: - xra a ;reset wheel byte - call putwhl - jmp pwhlstat ;print status -; -; Password Not Approved -; -nopass: - call print - db cr,lf,' Invalid Password',0 - ret - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/WILDCAT.TXT b/Source/Images/d_bp/u15/WILDCAT.TXT deleted file mode 100644 index 2da9d87a..00000000 --- a/Source/Images/d_bp/u15/WILDCAT.TXT +++ /dev/null @@ -1,358 +0,0 @@ -ALIAS-1.LBR -ALIAS-2.LBR -ALIAS.COM -ALIAS.HLP -ALIAS.HQP -ALIAS.ZEX -ALIAS.ZQX -ALIAS0.MAC -ALIAS0.MQC -ALIAS1.MAC -ALIAS1.MQC -CD.COM -CD.MAC -CD.MQC -CLEAND15.LBR -CLEANDIR.COM -CLEANDIR.MAC -CLEANDIR.MQC -CLNDR13B.LBR -CMD.COM -CMD.MAC -CMD.MQC -CMDFILES.HLP -CMDFILES.HQP -CMDRUN.COM -CMDRUN.MAC -CMDRUN.MQC -COMMENT.COM -COMMENT.MAC -COMMENT.MQC -COMPARE.HLP -COMPARE.HQP -CPSEL.COM -CPSEL.MAC -CPSEL.MQC -CRC.COM -CRC.MAC -CRC.MQC -DBRCPREL.LBR -DEBUGRCP.AQM -DEBUGRCP.ASM -DEV.COM -DEV.MAC -DEV.MQC -DEV10.LBR -DEVICE.COM -DEVICE.MAC -DEVICE.MQC -DEVICE10.LBR -DIFF.COM -DIFF.MAC -DIFF.MQC -DIFF21.LBR -DIR.COM -DIR.MAC -DIR.MQC -DIR14.LBR -DIRS.HLP -DIRS.HQP -DPGFILE.LBR -DPROG.COM -DPROG.HLP -DPROG.HQP -DPROG.MAC -DPROG.MQC -DPROG12.LBR -DU3.COM -DU3.HLP -DU3.HQP -DU3.MAC -DU3.MQC -DU312.LBR -ECHO.COM -ECHO.MAC -ECHO.MQC -ERASE.COM -ERASE.MAC -ERASE.MQC -ERROR1.COM -ERROR1.MAC -ERROR1.MQC -ERROR2.COM -ERROR2.MAC -ERROR2.MQC -ERROR3.COM -ERROR3.MAC -ERROR3.MQC -ERROR4.COM -ERROR4.MAC -ERROR4.MQC -ERRORX.COM -ERRORX.MAC -ERRORX.MQC -FINDF.COM -FINDF.MAC -FINDF.MQC -FINDF26.LBR -FINDF26A.LBR -GOTO.COM -GOTO.MAC -GOTO.MQC -GRDEMO.LBR -HELP.COM -HELP.HLP -HELP.HQP -HELP.MAC -HELP.MQC -HELPCK.COM -HELPCK.MAC -HELPCK.MQC -HELPPR.COM -HELPPR.MAC -HELPPR.MQC -HELPSYS.HLP -HELPSYS.HQP -IF.COM -IF.HLP -IF.HQP -IF.MAC -IF.MQC -IFSTAT.COM -IFSTAT.MAC -IFSTAT.MQC -IO.HLP -IO.HQP -LDR-UPD.COM -LDR-UPD.MSG -LDR.COM -LDR.MAC -LDR.MQC -LDR15.LBR -LGET11.LBR -LLF11.LBR -LUZ3.LBR -LX12.LBR -LX14.LBR -MCOPY.COM -MCOPY.MAC -MCOPY.MQC -MCOPY44.LBR -MCOPY45B.LBR -MENU.COM -MENU.HLP -MENU.HQP -MENU.MAC -MENU.MQC -MENUCK.COM -MENUCK.MAC -MENUCK.MQC -MKDIR.COM -MKDIR.MAC -MKDIR.MQC -MU3.COM -MU3.HLP -MU3.HQP -MU3.MAC -MU3.MQC -NDIRS.HLP -NDIRS.HQP -NEWTCAP.Z80 -NEWTCAP.ZZ0 -NOTE.COM -NOTE.MAC -NOTE.MQC -PAGE.COM -PAGE.MAC -PAGE.MQC -PATH.COM -PATH.MAC -PATH.MQC -PATH31.LBR -PPAL.DOC -PRINT.COM -PRINT.MAC -PRINT.MQC -PRINTHLP.LBR -PROTECT.COM -PROTECT.MAC -PROTECT.MQC -PWD.COM -PWD.MAC -PWD.MQC -QUIET.COM -QUIET.MAC -QUIET.MQC -READ.ME -READ.MQ -RECORD.COM -RECORD.MAC -RECORD.MQC -REG.COM -REG.MAC -REG.MQC -RENAME.COM -RENAME.MAC -RENAME.MQC -RENAME31.LBR -SAK.COM -SAK.MAC -SAK.MQC -SETFILE.COM -SETFILE.MAC -SETFILE.MQC -SF.COM -SF.Z80 -SH.COM -SH.HLP -SH.HQP -SH.MAC -SH.MQC -SH11.LBR -SHCTRL.COM -SHCTRL.MAC -SHCTRL.MQC -SHDEFINE.COM -SHDEFINE.MAC -SHDEFINE.MQC -SHFILE.COM -SHFILE.MAC -SHFILE.MQC -SHOW.COM -SHOW.MAC -SHOW.MQC -SHSET.COM -SHSET.MAC -SHSET.MQC -SHUTILS2.LBR -SHVAR.COM -SHVAR.MAC -SHVAR.MQC -SHVAR11.LBR -SUB.COM -SUB.MAC -SUB.MQC -SYSENV.AQM -SYSENV.ASM -SYSENV.LIB -SYSENV.LQB -SYSFCP.AQM -SYSFCP.ASM -SYSFCP1.LIB -SYSFCP1.LQB -SYSFCP11.LBR -SYSFCP2.LIB -SYSFCP2.LQB -SYSIOP.AQM -SYSIOP.ASM -SYSNDR.AQM -SYSNDR.ASM -SYSNDR.LIB -SYSNDR.LQB -SYSRCP.AQM -SYSRCP.ASM -SYSRCP.HLP -SYSRCP.HQP -SYSRCP1.LIB -SYSRCP1.LQB -SYSRCP11.LBR -SYSRCP2.LIB -SYSRCP2.LQB -SYSRCP3.LIB -SYSRCP3.LQB -SYSRCP4.LIB -SYSRCP4.LQB -T3M-HI2.Z80 -T3M-HI2.ZZ0 -T3T-24-1.Z80 -T3T-24-1.ZQ0 -TCCHECK.COM -TCCHECK.MAC -TCCHECK.MQC -TCMAKE.COM -TCMAKE.MAC -TCMAKE.MQC -TCSELECT.COM -TCSELECT.MAC -TCSELECT.MQC -UNERASE.COM -UNERASE.MAC -UNERASE.MQC -VF-BOX11.LBR -VF41.IQF -VF41H.LBR -VF42A.LBR -VFILER.COM -VFILER.HLP -VFILER.HQP -VFILER.MAC -VFILER.MQC -VFILR4-1.LBR -VFILR4-2.LBR -VMENU.COM -VMENU.HLP -VMENU.HQP -VMENU.MAC -VMENU.MQC -VMENU24.LBR -VMENUCK.COM -VMENUCK.MAC -VMENUCK.MQC -VMENUFUN.LBR -WHEEL.COM -WHEEL.MAC -WHEEL.MQC -WYSE.DPG -XD.COM -XD.MAC -XD.MQC -XDIR.COM -XDIR.MAC -XDIR.MQC -Z3BASE1.LIB -Z3BASE1.LQB -Z3BASE2.LIB -Z3BASE2.LQB -Z3FILES.PH1 -Z3FILES.PH2 -Z3FILES.PQ2 -Z3FILES2.PH2 -Z3FILES2.PQ2 -Z3HDR1.LIB -Z3HDR1.LQB -Z3HDR2.LIB -Z3HDR2.LQB -Z3LDRBUG.LBR -Z3LOC.COM -Z3LOC.MAC -Z3LOC.MQC -Z3LOC11.LBR -Z3RES.HLP -Z3RES.HQP -Z3TCAP.AQM -Z3TCAP.ASM -Z3TCAP.HLP -Z3TCAP.HQP -Z3TCAP.TCP -Z3TCAP.TQP -Z3TCAP22.LBR -Z3UTIL1.HLP -Z3UTIL1.HQP -Z3UTIL2.HLP -Z3UTIL2.HQP -Z3UTIL3.HLP -Z3UTIL3.HQP -ZCPR3.AQM -ZCPR3.ASM -ZCPR3.HLP -ZCPR3.HQP -ZCPR3.INS -ZCPR3.IQS -ZCPR3DIR.BQG -ZCPR3DIR.BUG -ZEX.AQM -ZEX.ASM -ZEX.COM -ZEX.ZEX -ZEX.ZQX -ZSYSTEM.INS diff --git a/Source/Images/d_bp/u15/WYSE.DPG b/Source/Images/d_bp/u15/WYSE.DPG deleted file mode 100644 index 9db75516..00000000 --- a/Source/Images/d_bp/u15/WYSE.DPG +++ /dev/null @@ -1,133 +0,0 @@ -; -; Programming Definitions for Wyse WY-50 Terminal -; Revision 1.0 by John Lin, September 1, 1985 -; -; Character Definitions: -; --esc (%c) "\1bh" ; The ESCAPE Character --cr "\r" ; --del (%c) "\7fh" ; --ctrlp "^P" ; ^P -; -; -; Define Functions: -; -; A. Function Key: -; -; SEQUENCE: FKEY Fn|FnS SEQ DEL -; fkey - Prefix -; fn or fns - Function Key Number or Number Shifted -; seq - Contents of Function Key (8 Chars) -; del - Terminator -; --fkey esc "z" --f1 "@" --f1s "`" --f2 "A" --f2s "a" --f3 "B" --f3s "b" --f4 "C" --f4s "c" --f5 "D" --f5s "d" --f6 "E" --f6s "e" --f7 "F" --f7s "f" --f8 "G" --f8s "g" --f9 "H" --f9s "h" --f10 "I" --f10s "i" --f11 "J" --f11s "j" --f12 "K" --f12s "k" --f13 "L" --f13s "l" --f14 "M" --f14s "m" --f15 "N" --f15s "n" --f16 "O" --f16s "o" -; -; -; B. Cursor: -; -; 1. C_OFF No Cursor -; 2. C_ON Cursor On -; 3. C_BB Blinking Block -; 4. C_SB Steady Block -; 5. C_BU Blinking Underline -; 6. C_SU Steady Underline -; --c_off esc "`0" --c_on esc "`1" --c_bb esc "`5" --c_sb esc "`2" --c_bu esc "`3" --c_su esc "`4" -; -; -; C. Display User Line: -; -; 1. DISP_USER Display User Line -; 2. UNDSP_USER Turn Off User Line -; --disp_user esc "A14" --undsp_user esc "A10" -; -; -; D. Screen: -; -; 1. SCREEN_OFF Turn Screen Off -; 2. SCREEN_ON Turn Screen On -; --screen_off esc "`8" --screen_on esc "`9" -; -; -; E. Clear Screen: -; -; 1. CLS Clear the Screen -; --cls "^Z" -; -; F. Send Message to Host Msg Field: -; -; 1. HMF Send Msg to Host Message Field -; --hmf esc "F" -; -; -; -; Commands: -; -undsp_user -c_bb -fkey f1 "Dir A:\r" del -fkey f2 "Dir B:\r" del -fkey f3 "Dir E:\r" del -fkey f4 "Dir " del -; -fkey f5 "Type " del -fkey f6 "Era " del -fkey f7 "Ren " del -fkey f8 "Swp\r" del -; -fkey f9 "Multidsk\r" del -fkey f10 "Amprodsk\r" del -fkey f11 "Eset\r" del -fkey f12 "Du\r" del -; -fkey f13 "DDT " del -fkey f14 "Mac " del -fkey f15 "Zex " del -fkey f16 "Safety\r" del -; -cls -hmf "System Key Configuration Activated" cr -; diff --git a/Source/Images/d_bp/u15/XD.COM b/Source/Images/d_bp/u15/XD.COM deleted file mode 100644 index b0009ae5..00000000 Binary files a/Source/Images/d_bp/u15/XD.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/XD.MAC b/Source/Images/d_bp/u15/XD.MAC deleted file mode 100644 index 4ac66e24..00000000 --- a/Source/Images/d_bp/u15/XD.MAC +++ /dev/null @@ -1,856 +0,0 @@ -; -; PROGRAM: XD III -; AUTHOR: RICHARD CONN -; VERSION: 1.2 -; DATE: 8 Apr 84 -; PREVIOUS VERSIONS: 1.1 (14 Jan 84), 1.0 (19 Nov 83) -; DERIVATION: XDIR III, Version 1.6 (19 Nov 83) -; -vers equ 12 -z3env SET 0f400h - -; -; XD III -- Simple Extended Disk Directory Program -; ZCPR3 Only -; -; XD III produces a formatted, alphabetized listing of the contents -; of the disk directory of the implied (current logged-in) or specified disk. -; -; XD III is invoked by a command line of the following form -- -; -; XD dir:filename.typ ooo... -; or -; -; XD /oooo... -; -; where: -; dir is an optional directory name or a disk/user specification (du) -; if dir is omitted, XD III defaults to the current disk/user -; filename.typ is an ambiguous file name and type (* and ? may be used) -; o are option letters as follows: -; Aa - Set the attributes of the files to be displayed; -; a=S for System Files, a=N for Non-System Files -; a=A for All Files (System and Non-System) -; Oo - Set Output Parameters; -; o=A to Toggle File Attributes, o=F to Form Feed at end -; o=G to Toggle Grouping, o=H to Toggle Hor/Vert -; P - Print display as well as show it on the screen -; PF - Same as POF -; Options may be combined as desired; note that AA is the same as AS and AN, -; but AS by itself negates AN and vice-versa, with AN taking precident -; - - -; -; CP/M Equates -; -base equ 0 -wboot equ base -bdose equ base+5 -fcb equ base+5ch -buff equ base+80h -cr equ 0dh -ff equ 0ch -lf equ 0ah -esize equ 16 ; size of directory entries -optch equ '/' ; option char -maxent equ 60 ; maximum number of entries/screen - -; -; External Routines -; - ext bdos ; BDOS - ext z3init ; init ZCPR3 environment descriptor ptr - ext z3log ; log into ZCPR3 DU/DIR - ext dirqs ; quick directory load with sizes - ext dfree ; free space computer - ext dparam ; disk parameter extractor - ext fsize ; compute file size - ext retud ; get current user and disk - ext print ; print routines - ext pstr - ext lcrlf ; CRLF to printer - ext caps ; capitalize char - ext cin ; console in char - ext lout ; print char - ext cout ; console out char - ext crlf ; new line - ext fillb ; memory fill - ext moveb ; memory move - ext codend ; beginning of buffer area - ext sctlfl,sout,scrlf,sprint,spstr,shldc,sadc ; S-output - ext dutdir ; DU to DIR form - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env -; -; Branch to Start of Program -; - jmp start0 - -; -; Other Buffers (Set by GENINS) -; -igrp: db 0ffh ; Group by file type and name -ifmt: db 0 ; vertical format -iatt: db 10000000b ; Non-System files only -irs: db 0ffh ; enable attribute display (0=no) -iff: db 0 ; enable form feed at end (0=no) - -; -; Command Line Option Table -; -optab: - db 'A' ; Attribute Selection - dw opta - db 'O' ; Output Control - dw opto - db 'P' ; Print Control - dw optp - db 0 - -; -; **** Start of XD III **** -; -start0: - -; Save stack ptr for return later - lxi h,0 ; get stack - dad sp - shld stack ; save stack ptr for return - call codend ; determine free space (CODEND also pts to Command - ; Line Save Area) - lxi d,100h ; block size to save - dad d - dad d ; allow for 256-byte stack - shld buffer ; start of free buffer area - sphl ; set stack ptr - -; Save command line in CMDLNE buffer - call codend ; pt to command line buffer - xchg ; ... in DE - lxi h,buff+1 ; copy input line into command line buffer -start1: - mov a,m ; get byte - stax d ; put byte - inx h ; pt to next - inx d - ora a ; end of line? - jnz start1 - -; log into DU or DIR - lxi d,fcb ; extract file name into fcb, and get user and disk - call z3log ; ZCPR3 command line interpretation - -; Get and save current user number -noext: - call retud ; get current user and disk - mov a,c ; get user into A - sta aflg ; current user number - -; Set flag values - lda irs ; get RS display option - sta rsflg ; set RS display option - lda iff ; get form feed option - sta ffflg ; set form feed option - lda igrp ; set grouping (file name/type or type/name) - sta gflg - lda ifmt ; set listing format (vertical or horizontal, 0=vert) - sta hflg - lda iatt ; set file attributes - mov c,a ; save in c - lda aflg ; get current user number - ora c ; mask in file attributes - sta aflg ; save flag - xra a ; A=0 - sta pflg ; set no printer output - inr a ; A=1 for console only - sta sctlfl ; set switched output flag - -; Assume wild file name - lxi h,fcb+1 ; store '?' chars - mvi b,11 ; 11 chars - mov a,m ; check for entry specified - cpi ' ' ; test for space (means no entry) - mvi a,'?' ; prep for '?' fill - cz fillb - mov a,m ; check for option caught - cpi optch ; test for option flag - mvi a,'?' ; prep for '?' fill - cz fillb - -; Scan command line for options - call codend ; pt to first char - call sblank ; skip over blanks - ora a ; end of line? - jz xdir ; begin main processing - inx h ; prep for invalid option - cpi optch ; option? - jz opt ; process options - dcx h ; ok to process for dir:filename.typ form -; -; Skip over characters of file name -; -skipo1: - mov a,m ; get char - inx h ; pt to next - cpi ' ' - jz skipo2 - ora a - jnz skipo1 - jmp xdir ; run XDIR if no options follow -; -; Scan complete -- look for possible following option char -; -skipo2: - call sblank ; skip over blanks - mov a,m ; option char follows? - cpi optch - jnz opt - inx h ; skip over option char -; -; Look for options -- main loop; HL pts to next char -; -opt: - mov a,m ; get option char - inx h ; pt to next - ora a ; end of line? - jz xdir ; begin main processing - cpi ' ' ; skip over spaces - jz opt - cpi optch ; option char? - jz opterr ; loop back if so - lxi d,optab ; pt to option table - mov b,a ; option char in b -; -; Scan option table -; -opt1: - ldax d ; get option table char - ora a ; end of table? - jz opterr ; invalid option error - cmp b ; compare to passed option - jz opt2 ; process if match - inx d ; skip address - inx d - inx d ; pt to next opt char - jmp opt1 -; -; Process option found -; -opt2: - inx d ; pt to low-order address - ldax d ; get it - mov c,a ; low in C - inx d ; pt to high-order address - ldax d ; get it - mov b,a ; high in B - push b ; BC on stack - ret ; Process option routine -; -; Option A -- File Attributes -; -opta: - mov a,m ; get next option letter - cpi 'N' ; Non-System files? - jz optan - cpi 'S' ; System files? - jz optas - cpi 'A' ; All files? - jnz opterr ; error if not -; -; Option AA -- All Files -; -optaa: - mvi c,11000000b ; System and Non-system -optaret: - lda aflg ; get flag - ani 3fh ; leave in user selection - ora c ; mask in sys/non-sys - sta aflg ; restore flag - inx h ; pt to next - jmp opt -; -; Option AS -- System Files -; -optas: - mvi c,01000000b ; System Only - jmp optaret -; -; Option AN -- Non-System Files -; -optan: - mvi c,10000000b ; Non-system Only - jmp optaret -; -; Option P -- enable it; Printer output -; -optp: - mvi a,0ffh ; ON - sta pflg - sta sctlfl ; set S-output control - mov a,m ; get possible 2nd letter - cpi 'F' ; set form feed if F - jnz opt ; process as next option letter if not F - inx h ; pt to next - jmp optof -; -; Option O -- control Output parameters -; -opto: - mov a,m ; get 2nd letter - inx h ; pt to next - cpi 'A' ; attributes? - jz optoa - cpi 'F' ; form feed? - jz optof - cpi 'G' ; grouping? - jz optog - cpi 'H' ; horizontal/vertical? - jz optoh - dcx h ; adjust back - jmp opterr -; -; Toggle File Attributes Flag -; -optoa: - lda rsflg ; flip flag - cma - sta rsflg - jmp opt -; -; Toggle Form Feed Flag -; -optof: - lda ffflg ; flip flag - cma - sta ffflg - jmp opt -; -; Toggle Grouping -; -optog: - lda gflg ; flip flag - cma - sta gflg ; 0=file name and type - jmp opt -; -; Toggle Horizontal/Vertical Listing -; -optoh: - lda hflg ; flip flag - cma - sta hflg ; 0=vertical - jmp opt -; -; Option error message -; -opterr: - mvi a,1 ; set console only - sta sctlfl ; set output control flag - call banner ; print banner - call print - db cr,lf,'Syntax:' - db cr,lf,' XD dir:filename.typ ooo...' - db cr,lf,'or XD /oooo...' - db cr,lf,'Option letters are:' - db cr,lf,' Aa - Set and Display of file attributes' - db cr,lf,' a=S for System, a=N for Non-System' - db cr,lf,' a=A for All Files (System and Non-System)' - db cr,lf,' Oo - Toggle Output Control Options' - db cr,lf,' o=A for File Attributes, o=F for Form Feed' - db cr,lf,' o=G for Grouping, o=H for Horiz/Vert Format' - db cr,lf,' P - Send display to printer' - db cr,lf,' PF - Same as POF' - db 0 - -; Return to CP/M -return: - lhld stack ; get old stack ptr - sphl - ret ; return to CP/M - -; Memory Overflow Error -memerr: - call sprint - db 'TPA Error',0 - jmp return - -; Print banner of XD III -banner: - call sprint - db 'XD III Version ' - db vers/10+'0','.',(vers mod 10)+'0',0 - ret - -; -; Begin XD III processing -; -xdir: - lxi d,fcb ; pt to FCB - xra a - stax d ; select current disk - -; Check for Print Option and Print New Line if so -xdirst: - lda pflg ; printer output? - ora a ; 0ffH=yes - cnz lcrlf ; new line - -; Get Files from Disk - push d ; save ptr to FCB - call dparam ; get disk parameters for DFREE - call dfree ; compute amount of free space on disk - xchg ; amount in hl - shld freesiz ; save free space count - pop d ; get regs - lhld buffer ; pt to free space - lda gflg ; get grouping flag - ani 20h ; mask for sort bit (0=name/type) - mov c,a - lda aflg ; get attributes flag - ora c ; mask in grouping bit - call dirqs ; quick directory load with file sizes - jz memerr ; memory overflow error? - shld firstf ; save ptr to first file - mov h,b ; HL=file count - mov l,c - shld fcount ; save file count - shld countf ; save file down count - lxi h,0 ; set file size counter - shld totsiz ; save counter - lda pflg ; set temp flag - sta pflgt - -; -; Main Directory Print Routine -- This routine displays the directory to -; the console, printer, or disk as desired -; -; Print header lines and one screen of entries -xdir2: - lda pflg ; save printer output flag - sta pflgs - lda pflgt ; use temp flag - sta pflg - xra a ; A=0 - sta pflgt ; clear temp flag - -; Print: Main Banner - call banner ; print banner - -; Check for any files - lhld countf ; get file down count - mov a,h ; any files? - ora l - jnz xdir6 - call sprint ; print everywhere - db cr,lf,'No files selected',0 - jmp xdir10 - -; -; This is the main looping entry point for each screen display -; -xdir6: -; -; This is the header which is printed if the files in only one user area are -; displayed -; - call scrlf ; specific user selected - call hdr2 - lda rsflg - ora a ; Z=no - cnz sp0 - call sp2 - call hdr2 - lda rsflg - ora a ; Z=no - cnz sp0 - call sp2 - call hdr2 - lda rsflg - ora a - cnz sp0 - call scrlf - call hdr1 - lda rsflg - ora a - cnz sp1 - call sp2 - call hdr1 - lda rsflg - ora a - cnz sp1 - call sp2 - call hdr1 - lda rsflg - ora a - cnz sp1 - jmp xdir6b -sp0: - call sprint - db ' RS',0 - ret -sp1: - call sprint - db ' --',0 - ret -sp2: - call sprint - db ' ',0 - ret -hdr1: - call sprint - db '-------- --- ------',0 - ret -hdr2: - call sprint - db 'Filename.Typ Size K',0 - ret - -; -; Prepare Columnar Output -; -xdir6b: - lda pflgs ; restore print flag - sta pflg - lhld countf ; get file count down - lxi d,maxent ; assume maxent entries to print - mov a,h ; within range? - ora a ; outside of range if not - jnz xdir7 ; subtract entries to print from total entries - mov a,l ; within range? - cpi maxent ; less than maxent entries left? - jnc xdir7 ; subtract entries to print from total entries - mov d,h ; DE=HL=number of entries to print - mov e,l -xdir7: - mov a,l ; subtract entries to print (DE) from total (HL) - sub e - mov l,a - mov a,h - sbb d - mov h,a ; HL=result - shld countf ; save new down count - mov b,h ; BC=count - mov c,l - lhld firstf ; pt to first file -; -; At this point, BC=number of remaining entries, DE=number of entries to -; print, and HL pts to first entry to print -; - shld ptr1 ; save ptr to 1st entry - lda hflg ; horizontal listing? - ora a ; 0ffh = yes - jnz xdir7c ; don't worry about columns if horizontal - push d ; save count - call divde3 ; divide DE by 3, result*esize in BC, remainder in A - lxi d,esize ; DE=ESIZE (size of entry) - dad b ; add BC as a minimum - ora a ; any remainder? - jz xdir7a ; skip if none - dad d ; add in ESIZE for additional length of 1st col -xdir7a: - shld ptr2 ; save ptr to col 2 - dad b ; add BC as a minimum - cpi 2 ; if remainder 2, add ESIZE for additional - jc xdir7b - dad d ; add in ESIZE -xdir7b: - shld ptr3 ; save ptr to col 3 - pop d ; get count in de -; -; Main entry print routine -; -xdir7c: - mvi d,1 ; set 3's counter -xdir8: - lhld ptr1 ; pt to first entry - call prentry ; print entry - shld ptr1 ; put ptr - lda hflg ; horizontal? - ora a ; 0ffh = yes - jnz xdir9 - dcr e ; count down - jz xdir10 - lhld ptr2 ; get ptr - call prentsp ; print entry with 2 leading spaces - shld ptr2 ; put ptr - dcr e ; count down - jz xdir10 - lhld ptr3 ; get ptr - call prentsp ; print entry with 2 leading spaces - shld ptr3 ; put ptr -xdir9: - dcr e ; count down - jnz xdir8 ; continue if not zero - shld firstf ; save ptr to first of next set of entries to print - lhld countf ; get count of remaining entries -; -; At this point, HL=number of entries left -; - mov a,h ; anything left? - ora l - jz xdir10 - lda pflg ; printer output? - ora a ; 0=no - jnz xdir6 - call print ; screen break - db cr,lf,' --> Screen Break -- Strike any char <-- ',0 - call cin ; get response - cpi 3 ; abort? - jz return - jmp xdir6 ; new screen display -; -; Print end statistics and exit -; -xdir10: -; -; Print DU -; - call sprint ; print everywhere - db cr,lf,' ',0 - call retud ; get current disk - mov a,b ; ... in A - adi 'A' ; convert to ASCII - call sout ; print everywhere - mov a,c ; user in A - call sadc ; get number - call sprint - db ': ',0 - call dutdir ; convert to DIR form - jz xdir11 -; -; Print DIR Name -; - mvi b,8 ; output name -dirout: - mov a,m ; get char - cpi ' ' ; don't print spaces - cnz sout - inx h ; pt to next - dcr b ; count down - jnz dirout - -; -; Print Selected File Statistics -; -xdir11: - call sprint - db ' --',0 - lhld fcount ; print file count - call shldc ; print it everywhere - call sprint - db ' Files Using ',0 - lhld totsiz ; get total of file sizes - call shldc ; print it everywhere - call sprint - db 'K',0 - -; -; Print Space Remaining on Disk -; Entry Point if No Files Found -; - call sprint - db ' (',0 - lhld freesiz ; get amount of free space - call shldc ; print it everywhere - call sprint - db 'K Left)',0 - lda pflg ; new line if printer output - ora a - jz return - call scrlf ; new line for printer - lda pflg ; print output - mov b,a - lda ffflg ; form feed - ana b ; if print and form feed ... NZ is set - mvi a,ff ; form feed char - cnz lout ; form feed to printer - jmp return - -; -; General Utility Routines -; - -; -; Print disk entry for normal directory display functions -; -prentsp: - call sp2 ; print entry with 2 leading spaces -prentry: - dcr d ; count counter - jnz prent1 - mvi d,3 ; reset count - call scrlf -prent1: - shld entptr ; save entry ptr - inx h ; pt to first char of file name - mvi b,8 ; print 8 chars - call prch - mvi a,'.' ; print dot - call sout - push h ; save RS ptr - mvi b,3 ; print 3 chars - call prch - push d ; save de - lhld entptr ; pt to entry - call sp2 ; skip 2 spaces - call fsize ; compute file size - lhld totsiz ; get total file size counter - dad d ; add in new file - shld totsiz ; save new total file size counter - xchg ; get file size into HL - call shldc ; print HL value - pop d ; get de - pop h ; pt to RS - lda rsflg ; print RS fields? - ora a ; Z=no - jz pren2a - mvi a,' ' ; print 1 space - call sout - mvi b,'R' ; letter - call prletx ; print R if bit set - inx h - mvi b,'S' ; letter - call prletx ; print S if bit set - dcx h ; ... for following inx h -pren2a: - inx h ; point correctly -prent3: - lxi b,6 ; pt to next entry - dad b - ret -; -; Print B chars pted to by HL -; -prch: - mov a,m ; get char - inx h ; pt to next - ani 7fh ; mask out msb - cpi ' ' ; within range? - jnc prch1 ; print special char if not valid char - mvi a,'?' ; print ? if not valid char -prch1: - call sout ; print it - dcr b ; count down - jnz prch - ret -; -; Extended Print Routines -; -prletx: - mov a,m ; get byte - ani 80h ; look at msb - jz prlets - mov a,b ; get letter - jmp sout -prlets: - mvi a,' ' ; print - jmp sout -; -; Divide DE by 3; return with BC=result*esize, a=remainder -; -divde3: - push d ; save de, hl - push h - mvi d,0 ; make sure D=0 - mov a,e ; value in A -divd31: - sui 3 ; subtract 3 - jc divd32 - jz divd33 - inr d ; add 1 to result - jmp divd31 -divd32: - adi 3 ; add back in - jmp divd34 -divd33: - inr d ; add 1 for even division -divd34: - sta rem ; save remainder - lxi b,esize - lxi h,0 -divd35: - mov a,d ; done? - ora a ; 0=yes - jz divd36 - dcr d - dad b ; add in another ESIZE - jmp divd35 -divd36: - mov b,h ; BC is result - mov c,l - lda rem ; A is remainder - pop h ; restore regs - pop d - ret -; -; Skip blanks -; -sblank: - mov a,m ; pt to char - cpi ' ' ; blank? - rnz - inx h ; pt to next - jmp sblank - -; -; Buffers -; -aflg: ds 1 ; attibute flag -gflg: ds 1 ; 0=group by name/type -hflg: ds 1 ; 0=vertical list -pflg: ds 1 ; printer output on flag -crcnt: ds 1 ; entry counter -fmark: ds 1 ; first file marker -pflgt: ds 1 -pflgs: ds 1 -rsflg: ds 1 ; RS Display Flag -ffflg: ds 1 ; form feed flag -rem: ds 1 ; remainder buffer -firstf: ds 2 ; ptr to first file of group to print -fcount: ds 2 ; count of files -countf: ds 2 ; down count of files -freesiz: - ds 2 ; amount of free space on disk -totsiz: - ds 2 ; total size of all files -ptr1: ds 2 ; col output ptrs -ptr2: ds 2 -ptr3: ds 2 -entptr: ds 2 ; current entry ptr -buffer: ds 2 ; pointer to free area -stack: ds 2 ; stack ptr - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/XDIR.COM b/Source/Images/d_bp/u15/XDIR.COM deleted file mode 100644 index 71feb005..00000000 Binary files a/Source/Images/d_bp/u15/XDIR.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/XDIR.MAC b/Source/Images/d_bp/u15/XDIR.MAC deleted file mode 100644 index 3ea67b5c..00000000 --- a/Source/Images/d_bp/u15/XDIR.MAC +++ /dev/null @@ -1,1888 +0,0 @@ -; -; PROGRAM: XDIR III -; AUTHOR: RICHARD CONN -; VERSION: 2.0 -; DATE: 9 APR 84 -; PREVIOUS VERSIONS: 1.6 (19 NOV 83) -; PREVIOUS VERSIONS: 1.5 (9 JAN 83), 1.4 (6 JAN 83), 1.3 (7 DEC 82) -; PREVIOUS VERSIONS: 1.2 (2 NOV 82), 1.1 (30 OCT 82), 1.0 (20 OCT 82) -; -vers equ 20 -z3env SET 0f400h - -; -; XDIR III -- Extended Disk Directory Program -; ZCPR3 Version -; -; XDIR III produces a formatted, alphabetized listing of the contents -; of the disk directory of the implied (current logged-in) or specified disk. -; -; XDIR III is invoked by a command line of the following form -- -; -; XDIR dir:filename.typ ooo... -; or -; -; XDIR /oooo... -; -; where: -; dir is an optional directory name or a disk/user specification (du) -; if dir is omitted, XDIR III defaults to the current disk/user -; filename.typ is an ambiguous file name and type (* and ? may be used) -; o are option letters as follows: -; Aa - Set the attributes of the files to be displayed; -; a=S for System Files, a=N for Non-System Files -; a=A for All Files (System and Non-System) -; D - Send Output to Disk as well as screen -; Ff - Engage File Name Buffer Facility -; f=L to Log File Names to Disk -; f=P to Print Names Logged to Disk -; f=S to Scan Disk for File Names and Compare to Logged -; I - Inspect files selected by FL option for inclusion -; N - Negate selection; select those files which do NOT -; match the ambiguous file name -; Oo - Set Output Parameters; -; o=A to Toggle File Attributes, o=F to Form Feed at end -; o=G to Toggle Grouping, o=H to Toggle Hor/Vert -; P - Print display as well as show it on the screen -; PF - Same as POF -; U - Select All User Areas -; -; Options may be combined as desired; note that AA is the same as AS and AN, -; but AS by itself negates AN and vice-versa, with AN taking precident -; - - -; -; CP/M Equates -; -base equ 0 -wboot equ base -bdose equ base+5 -fcb equ base+5ch -buff equ base+80h -ctrlc equ 'C'-'@' -cr equ 0dh -ff equ 0ch -lf equ 0ah -esize equ 16 ; size of directory entries -optch equ '/' ; option char -maxent equ 54 ; maximum number of entries/screen - -; -; External Routines -; - ext bdos ; BDOS - ext dutdir ; convert DU to DIR form - ext z3log ; log into DU or DIR - ext z3init ; init buffers - ext dbuffer ; disk routines - ext dfree - ext diralpha - ext dirsload - ext dirpack - ext dirnpack - ext dirsel - ext dparam - ext fsize - ext fo0$open ; byte-oriented file output - ext fo0$close - ext f0$put - ext fo1$open - ext fo1$close - ext f1$put - ext fi1$open - ext fi1$close - ext f1$get - ext bbline ; input line editor - ext retud ; get current user and disk - ext print ; print routines - ext pstr - ext lpstr - ext lcrlf - ext caps ; capitalize char - ext cin ; console in char - ext lout ; print char - ext cout ; console out char - ext crlf ; new line - ext madc ; a as dec chars in memory - ext mhldc ; hl as dec chars in memory - ext fillb ; memory fill - ext moveb ; memory move - ext codend ; beginning of buffer area - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - jmp start0 -; -; Other Buffers (Set by GENINS) -; -igrp: db 0ffh ; Group by file type and name -ifmt: db 0 ; vertical format -iatt: db 10000000b ; Non-System files only -iscn: db 0 ; 0=dir display, 0ffh=scan for files by default -fenab: db 0ffh ; enable F options (0=no) -lenab: db 0ffh ; enable FL option (0=no) -asenab: db 0ffh ; enable AS option (0=no) -irs: db 0ffh ; enable attribute display (0=no) -iff: db 0 ; enable form feed at end (0=no) - -; -; Command Line Option Table -; -optab: - db 'A' - dw opta - db 'D' - dw optd - db 'F' - dw optf - db 'I' - dw opti - db 'N' - dw optn - db 'O' - dw opto - db 'P' - dw optp - db 'U' - dw optu - db 0 - -; -; **** Start of XDIR III **** -; -start0: - -; -; Save stack ptr for return later -; - lxi h,0 ; get stack - dad sp - shld stack ; save stack ptr for return - call codend ; determine free space (CODEND also pts to Command - ; Line Save Area) - lxi d,100h ; block size to save - dad d - dad d ; allow for 256-byte stack - shld buffer ; start of free buffer area - sphl ; set stack ptr - -; -; Save command line in CMDLNE buffer -; - call codend ; pt to command line buffer - xchg ; ... in DE - lxi h,buff+1 ; copy input line into command line buffer -start1: - mov a,m ; get byte - stax d ; put byte - inx h ; pt to next - inx d - ora a ; end of line? - jnz start1 - -; -; Get and save current user number -; -noext: - call retud ; get current user and disk - mov a,b ; get disk into A - sta curdisk ; current disk number - mov a,c ; set current user - sta curuser - -; -; Log into DU or DIR -; - lxi d,fcb ; use data determined by ZCPR3 - call z3log ; ZCPR3 command line interpretation - call retud ; get current user and disk - mov a,c ; set current user - sta aflg - mov a,b ; set disk - sta disk - -; -; Set flag values -; - lda irs ; get RS display option - sta rsflg ; set RS display option - lda iff ; get form feed option - sta ffflg ; set form feed option - lda igrp ; set grouping (file name/type or type/name) - sta gflg - lda ifmt ; set listing format (vertical or horizontal, 0=vert) - sta hflg - lda iatt ; set file attributes - mov c,a ; save in c - lda aflg ; get current user number - ora c ; mask in file attributes - sta aflg ; save flag - lda iscn ; set initial function (Scan or Dir) - sta fflg - xra a ; A=0 - sta nflg ; set no negation - sta dflg ; set no disk output - sta pflg ; set no printer output - sta iflg ; set no file name inspection (for /FP) - -; -; Assume wild file name -; - lxi h,fcb+1 ; store '?' chars - mvi b,11 ; 11 chars - mov a,m ; check for entry specified - cpi ' ' ; test for space (means no entry) - mvi a,'?' ; prepare for '?' fill - cz fillb - mov a,m ; check for option caught - cpi optch ; test for option flag - mvi a,'?' ; prepare for '?' fill - cz fillb - -; -; Scan command line for options -; - call codend ; pt to first char - call sblank ; skip over blanks - ora a ; end of line? - jz xdir ; begin main processing - inx h ; prep for invalid option - cpi optch ; option? - jz opt ; process options - dcx h ; ok to process for dir:filename.typ form -; -; skip over character of file name -; -skipo1: - mov a,m ; get char - inx h ; pt to next - cpi ' ' - jz skipo2 - ora a - jnz skipo1 - jmp xdir ; run XDIR if no options follow -; -; Scan complete -- look for possible following option char -; -skipo2: - call sblank ; skip over blanks - mov a,m ; option char follows? - cpi optch - jnz opt - inx h ; skip over option char -; -; Look for options -- main loop; HL pts to next char -; -opt: - mov a,m ; get option char - inx h ; pt to next - ora a ; end of line? - jz xdir ; begin main processing - cpi ' ' ; skip over spaces - jz opt - cpi optch ; option char? - jz opterr ; loop back if so - lxi d,optab ; pt to option table - mov b,a ; option char in b -; -; Scan option table -; -opt1: - ldax d ; get option table char - ora a ; end of table? - jz opterr ; invalid option error - cmp b ; compare to passed option - jz opt2 ; process if match - inx d ; skip address - inx d - inx d ; pt to next opt char - jmp opt1 -; -; Process option found -; -opt2: - inx d ; pt to low-order address - ldax d ; get it - mov c,a ; low in C - inx d ; pt to high-order address - ldax d ; get it - mov b,a ; high in B - push b ; BC on stack - ret ; Process option routine -; -; Option A -- File Attributes -; -opta: - mov a,m ; get next option letter - cpi 'N' ; Non-System files? - jz optan - cpi 'S' ; System files? - jz optas - cpi 'A' ; All files? - jnz opterr ; error if not -; -; Option AA -- All Files -; -optaa: - lda asenab ; enable system files? - ora a ; 0=no - jz optan - mvi c,11000000b ; System and Non-system -optaret: - lda aflg ; get flag - ani 3fh ; leave in user selection - ora c ; mask in sys/non-sys - sta aflg ; restore flag - inx h ; pt to next - jmp opt -; -; Option AS -- System Files -; -optas: - lda asenab ; enable system files? - ora a ; 0=no - jz optan - mvi c,01000000b ; System Only - jmp optaret -; -; Option AN -- Non-System Files -; -optan: - mvi c,10000000b ; Non-system Only - jmp optaret - -; -; Option F - select file name buffer functions -; -optf: - mvi a,0ffh ; set flag - sta fflg - mov a,m ; get option char - sta fopt - cpi 'L' ; log file names to disk - jz optfok - cpi 'P' ; print names of files - jz optfok - cpi 'S' ; scan disk for files - jz optfok - jmp opterr ; error otherwise -optfok: - inx h ; pt to next option letter - jmp opt - -; -; Option I -- enable it; inspect for FL option only -; -opti: - mvi a,0ffh ; ON - sta iflg - jmp opt - -; -; Option D -- enable it; Disk output -; -optd: - mvi a,0ffh ; ON - sta dflg - jmp opt - -; -; Option P -- enable it; Printer output -; -optp: - mvi a,0ffh ; ON - sta pflg - mov a,m ; get possible 2nd letter - cpi 'F' ; set form feed if F - jnz opt ; process as next option letter if not F - inx h ; pt to next - jmp optof - -; -; Option O -- control Output parameters -; -opto: - mov a,m ; get 2nd letter - inx h ; pt to next - cpi 'A' ; attributes? - jz optoa - cpi 'F' ; form feed? - jz optof - cpi 'G' ; grouping? - jz optog - cpi 'H' ; horizontal/vertical? - jz optoh - dcx h ; adjust back - jmp opterr -; -; Toggle File Attributes Flag -; -optoa: - lda rsflg ; flip flag - cma - sta rsflg - jmp opt -; -; Toggle Form Feed Flag -; -optof: - lda ffflg ; flip flag - cma - sta ffflg - jmp opt -; -; Toggle Grouping -; -optog: - lda gflg ; flip flag - cma - sta gflg ; 0=file name and type - jmp opt -; -; Toggle Horizontal/Vertical Listing -; -optoh: - lda hflg ; flip flag - cma - sta hflg ; 0=vertical - jmp opt - -; -; Option N -- enable it; Negate Selection -; -optn: - mvi a,0ffh ; ON - sta nflg - jmp opt - -; -; Option U - enable it; Select All User Areas -; -optu: - lda aflg ; get current attributes flag - ori 20h ; select all user areas - sta aflg ; put flag back - jmp opt - -; -; Option error message -; -opterr: - xra a ; set no disk or printer output - sta dflg - sta pflg - call banner ; print banner - call print - db cr,lf,'Syntax:' - db cr,lf,' XDIR dir:filename.typ ooo...' - db cr,lf,'or XDIR /oooo...' - db cr,lf,'Options:' - db cr,lf,' Aa - File Attributes' - db cr,lf,' a=S for System, a=N for Non-System' - db cr,lf,' a=A for All Files (System and Non-System)' - db cr,lf,' D - Send Output to Disk File XDIR.DIR' - db cr,lf,' Ff - Enable a File Buffer Function' - db cr,lf,' f=L for Log Names to FNAMES.DIR' - db cr,lf,' f=P to Print Names stored in FNAMES.DIR' - db cr,lf,' f=S to Scan Disk and Compare to FNAMES.DIR' - db cr,lf,' I - Inspect Logged Files (FL Option Only)' - db cr,lf,' N - Negate Selection' - db cr,lf,' Oo - Toggle Output Features' - db cr,lf,' o=A for File Attributes, o=F for Form Feed' - db cr,lf,' o=G for Grouping, o=H for Horiz/Vert Format' - db cr,lf,' P - Send Display to Printer' - db cr,lf,' PF - Same as POF' - db cr,lf,' U - Select All User Areas' - db 0 - -; -; Return to CP/M -; -return: - lda dflg ; disk output? - ora a ; 0=no - cnz fo0$close ; close file if so - lhld stack ; get old stack ptr - sphl - ret ; return to CP/M - -; -; Memory Overflow Error -; -memerr: - call printx - db cr,lf,'TPA Error',0 - jmp return - -; -; Print banner of XDIR III -; -banner: - call printx - db 'XDIR III, Version ' - db vers/10+'0','.',(vers mod 10)+'0',0 - ret - -; -; Begin XDIR III processing -; -xdir: - -; -; This section disables the /Ff option and /FL option if default set -; - lda fenab ; enable FFLG? (/Ff option) - ora a ; 0=no - jnz xdst1 - xra a ; turn off FFLG - sta fflg -xdst1: - lda lenab ; enable FL option? - ora a ; 0=no - jnz xdst2 - lda fflg ; FFLG on? - ora a ; 0=no - jz xdst2 - lda fopt ; check for L - cpi 'L' - jnz xdst2 - mvi a,'P' ; switch L to P - sta fopt -xdst2: - lda fflg ; file name buffer option? - ora a ; 0=no - jz xdirst - xra a ; A=0 - sta gflg ; group by file name and type - lda fopt ; print immediately if P option - cpi 'P' ; print? - jnz xdirst - call banner ; print banner - jmp xdirfp ; print file names - -; Check for Print Option and Ask for and Print Header if so -xdirst: - lda pflg ; printer output? - ora a ; 0=no - jz xdirgo - call print ; message to user - db cr,lf,'Please Input Header: ',0 - xra a ; no caps - call bbline ; input line from user - ora a ; no chars? - jz xdirgo - call lcrlf ; new line - call lpstr ; print header line - call lcrlf ; new line - -; Get Files from Disk -xdirgo: - lhld buffer ; end of code - call dbuffer ; set buffers - jz memerr ; memory overflow error? - push h ; save regs - push d - call dfree ; compute amount of free space on disk - xchg ; amount in hl - shld freesiz ; save free space count - pop d ; get regs - pop h - call dirsload ; load with sizing information - jz memerr ; memory overflow error? - push h ; save hl - mov h,b ; HL=number of files loaded - mov l,c - shld totfil ; save total count - push b ; save bc - lda curdisk ; prepare to relog in disk - mov e,a - mvi c,14 ; select disk - call bdos - lda curuser ; prepare to relog in user - mov e,a - mvi c,32 ; select user - call bdos - -; Open disk file if necessary for disk output - lda dflg ; disk output? - ora a ; 0=no - jz xdir0 - lxi d,dskfcb ; open disk file for char output - call fo0$open ; open file for output -xdir0: - pop b ; get count - pop h ; get ptr - -; Continue processing; select desired files - lda aflg ; get file attributes - lxi d,fcb ; get ptr to fcb - call dirsel ; select files - -; Now, pack and alphabetize directory - lda nflg ; negate selection? - ora a ; 0=no - cz dirpack ; select marked entries - cnz dirnpack ; select unmarked entries - lda gflg ; get grouping flag - call diralpha ; alphabetize directory - shld firstf ; save ptr to first file - mov h,b ; HL=file count - mov l,c - shld fcount ; save file count - shld countf ; save file down count - lxi h,0 ; set file size counter - shld totsiz ; save counter - lda dflg ; set temp flags - sta dflgt - lda pflg - sta pflgt - -; -; Major feature selection -- -; Two major features of XDIR are selected at this time: -; 1. Directory Display Functions -; 2. File Name Buffer Functions -; At this point, the following key values are know: -; FIRSTF - Pointer to First File -; FCOUNT, COUNTF - Number of Files -; - lda fflg ; get flag - ora a ; Z=Directory Display, NZ=File Name Buffer Fcts - jnz xdirf ; Do File Name Buffer Fcts - -; -; Main Directory Print Routine -- This routine displays the directory to -; the console, printer, or disk as desired -; -; Print header lines and one screen of entries -xdir2: - lda dflg ; save disk and print output flags - sta dflgs - lda pflg - sta pflgs - lda dflgt ; use temp flags - sta dflg - lda pflgt - sta pflg - xra a ; A=0 - sta dflgt ; clear temp flags so no banner 2nd time around - sta pflgt - -; Print: Main Banner - call banner ; print banner - -; Print: Horizontal/Vertical Listing Message - call printx - db ' ',0 - lda hflg ; get horizontal/vertical flag - ora a ; 0=vertical - jnz xdir2a - call printx - db 'Vertical',0 - jmp xdir3 -xdir2a: - call printx - db 'Horizontal',0 - -; Print: Listing by File Name and Type or Type and Name Message -xdir3: - call printx - db ' Listing by File ',0 - lda gflg ; grouping flag - ora a ; 0=name and type - jnz xdir3a - call printx - db 'Name/Type',0 - jmp xdir4 -xdir3a: - call printx - db 'Type/Name',0 - -; -; Print: Disk and User -; -xdir4: - call printx ; print everywhere - db cr,lf,' Disk: ',0 - lda disk ; get current disk - adi 'A' ; convert to ASCII - call coutx ; print everywhere - call printx ; print everywhere - db ' User: ',0 - lda aflg ; get user number - ani 20h ; all? - jz xdir4b - call printx - db 'All',0 - jmp xdir5 -xdir4b: - lda aflg ; get selected user - ani 1fh ; select user number - lxi d,numbuf ; store number in buffer - call madc ; get number - mvi b,3 ; 3 digits - call prnumx ; print number everywhere - -; -; Print: Directory Name -; -xdir5: - lda aflg ; check for all users - mov c,a ; save in C - ani 20h - jnz xdir5fa - mov a,c ; get user - ani 1fh ; mask for just user - mov c,a - lda disk ; select disk - mov b,a - call dutdir ; determine if name available - jz xdir5fa - call printx - db ' Name: ',0 - mvi b,8 ; 8 chars to name -xdir5n: - mov a,m ; get char - inx h ; pt to next - cpi ' ' ; don't print spaces - cnz coutx - dcr b ; count down - jnz xdir5n -; -; Print: Selected File Attributes -; -xdir5fa: - call printx - db ', File Attributes: ',0 - lda aflg ; get flag - push psw ; save A - ani 80h ; Non-system? - jz xdir5a - call printx - db ' Non-System',0 -xdir5a: - pop psw ; get A - ani 40h ; System? - jz xdir5b - call printx - db ' System',0 - -; See if any files selected -xdir5b: - lhld countf ; get file down count - mov a,h ; any files? - ora l - jnz xdir6 - call printx ; print everywhere - db cr,lf,'No files selected -- ',0 - jmp xdir11 - -; -; This is the main looping entry point for each screen display -; -xdir6: - lda aflg ; all users selected? - ani 20h - jnz xdir6a -; -; This is the header which is printed if the files in only one user area are -; displayed -; - call crlfx ; new line - call hdr2 ; pt to header - lda rsflg - ora a ; Z=no - cnz sp0 ; print RS - call sp2 ; print leading spaces - call hdr2 ; print header - lda rsflg - ora a ; Z=no - cnz sp0 ; print RS - call sp2 ; print leading spaces - call hdr2 ; print header - lda rsflg - ora a - cnz sp0 - call crlfx ; new line - call hdr1 ; print underlines - lda rsflg - ora a - cnz sp1 - call sp2 ; leading spaces - call hdr1 ; underlines - lda rsflg - ora a - cnz sp1 - call sp2 ; leading spaces - call hdr1 ; underlines - lda rsflg - ora a - cnz sp1 - jmp xdir6b -; -; General-Purpose Header Print Routines -; -sp0: - call printx - db ' RS',0 - ret -sp1: - call printx - db ' --',0 - ret -sp2: - call printx - db ' ',0 - ret -spu: - call printx - db ' U ',0 - ret -spu1: - call printx - db ' ',0 - ret -spu2: - call printx - db ' - ',0 - ret -hdr1: - call printx - db '-------- --- ------',0 - ret -hdr2: - call printx - db 'Filename.Typ Size K',0 - ret -; -; This is the header which is printed if the files in all user areas are -; displayed -; -xdir6a: - call crlfx - call spu ; print U - call hdr2 ; print header - lda rsflg - ora a - cnz sp0 ; RS - call spu1 - call spu ; print U - call hdr2 ; print header - lda rsflg - ora a - cnz sp0 ; RS - call spu1 - call spu ; print U - call hdr2 ; print header - lda rsflg - ora a - cnz sp0 ; RS - call crlfx - call spu2 ; 1 underscore - call hdr1 ; underscores - lda rsflg - ora a - cnz sp1 - call spu1 - call spu2 ; 1 underscore - call hdr1 ; underscores - lda rsflg - ora a - cnz sp1 - call spu1 - call spu2 ; 1 underscore - call hdr1 ; underscores - lda rsflg - ora a - cnz sp1 - -; -; Prepare Columnar Output -; -xdir6b: - lda dflgs ; restore disk and print flags - sta dflg - lda pflgs - sta pflg - lhld countf ; get file count down - lxi d,maxent ; assume maxent entries to print - mov a,h ; within range? - ora a ; outside of range if not - jnz xdir7 ; subtract entries to print from total entries - mov a,l ; within range? - cpi maxent ; less than maxent entries left? - jnc xdir7 ; subtract entries to print from total entries - mov d,h ; DE=HL=number of entries to print - mov e,l -xdir7: - mov a,l ; subtract entries to print (DE) from total (HL) - sub e - mov l,a - mov a,h - sbb d - mov h,a ; HL=result - shld countf ; save new down count - mov b,h ; BC=count - mov c,l - lhld firstf ; pt to first file -; -; At this point, BC=number of remaining entries, DE=number of entries to -; print, and HL pts to first entry to print -; - shld ptr1 ; save ptr to 1st entry - lda hflg ; horizontal listing? - ora a ; 0ffh = yes - jnz xdir7c ; don't worry about columns if horizontal - push d ; save count - call divde3 ; divide DE by 3, result*esize in BC, remainder in A - lxi d,esize ; DE=ESIZE (size of entry) - dad b ; add BC as a minimum - ora a ; any remainder? - jz xdir7a ; skip if none - dad d ; add in ESIZE for additional length of 1st col -xdir7a: - shld ptr2 ; save ptr to col 2 - dad b ; add BC as a minimum - cpi 2 ; if remainder 2, add ESIZE for additional - jc xdir7b - dad d ; add in ESIZE -xdir7b: - shld ptr3 ; save ptr to col 3 - pop d ; get count in de -; -; Main entry print routine -; -xdir7c: - mvi d,1 ; set 3's counter -xdir8: - lhld ptr1 ; pt to first entry - call prentry ; print entry - shld ptr1 ; put ptr - lda hflg ; horizontal? - ora a ; 0ffh = yes - jnz xdir9 - dcr e ; count down - jz xdir10 - lhld ptr2 ; get ptr - call prentry ; print entry - shld ptr2 ; put ptr - dcr e ; count down - jz xdir10 - lhld ptr3 ; get ptr - call prentry ; print entry - shld ptr3 ; put ptr -xdir9: - dcr e ; count down - jnz xdir8 ; continue if not zero - shld firstf ; save ptr to first of next set of entries to print - lhld countf ; get count of remaining entries -; -; At this point, HL=number of entries left -; - mov a,h ; anything left? - ora l - jz xdir10 - lda dflg ; no message if disk or printer output - mov b,a - lda pflg - ora b - jnz xdir6 - call print ; screen break - db cr,lf,' --> Screen Break -- Strike any char <-- ',0 - call cin ; get response - cpi ctrlc ; abort? - jz return - jmp xdir6 ; new screen display -; -; Print end statistics and exit -; -xdir10: - call crlfx ; new line - lhld fcount ; print file count - call prhlx ; print it everywhere - call printx - db ' Files Using ',0 - lhld totsiz ; get total of file sizes - call prhlx ; print it everywhere - call printx - db 'K, ',0 - lhld totfil ; print total file count - call prhlx ; print it everywhere - call printx - db ' Files on Disk and ',0 - -; -; Print Amount of Free Space Left on Disk -; Entry Point if No Files Found -; -xdir11: - lhld freesiz ; get amount of free space - call prhlx ; print it everywhere - call printx - db 'K Left',0 - lda dflg ; if disk or printer output, new line - mov b,a - lda pflg - ora b - jz return - call crlfx ; new line for disk and/or printer - lda pflg ; print output - mov b,a - lda ffflg ; form feed - ana b ; if print and form feed ... NZ is set - mvi a,ff ; form feed char - cnz lout ; form feed to printer - jmp return - -; -; File Name Buffer Functions -; -xdirf: - call banner ; print banner - lda iscn ; just scan? - ora a ; 0=no - jnz xdirfs - lda fopt ; get option of F command - cpi 'L' ; log names to disk? - jz xdirfl - cpi 'S' ; scan names on disk? - jz xdirfs -; -; File Name Print Option; /FP option -; -xdirfp: - call openin ; open FNAMES.DIR for input -xdfp0: - call printx - db cr,lf,cr,lf - db 'Printout of Recorded File Names --',cr,lf,' ',0 -; -; Extract File Name Count -; - call f1$get ; get low count - jnz geterr - mov l,a ; save in L - call f1$get ; get high count - jnz geterr - mov h,a ; save in H - push h ; save HL - call prhlx ; print HL everywhere - call printx - db ' File Names',cr,lf,0 - call prfhdr ; print file name header - pop h ; get HL - mvi c,0 ; set entry counter - -; -; Loop for extracting names from FNAMES.DIR and printing them -; -xdfp1: - mov a,h ; no more entries? - ora l - jz xdfp2 - dcx h ; count down - call getdfn ; get next disk file name from FNAMES.DIR - call prfnfx ; print file name entry - inr c ; increment count - mov a,c ; new line time? - ani 3 - cz crlfx - jmp xdfp1 -xdfp2: - call fi1$close - call crlfx ; new line - jmp return - -; -; Log File Names to Disk; /FL option -; Structure of FNAMES.DIR file is: -; File Name Count, Low-Order Byte -; File Name Count, High-Order Byte -; File Names, stored as 12 bytes -- User Number, FN, and FT -; -xdirfl: - lxi d,fnfcb ; open file for output - call fo1$open - jz xdfl1 - call printx - db cr,lf,'Cannot Create FNAMES.DIR',0 - jmp return - -; Log Files to Disk with possible initial inspect and select by user -xdfl1: - lda iflg ; inspect? - ora a ; 0=no - cnz flinsp ; inspect if selected - -; Print file count - call printx - db cr,lf,cr,lf - db 'Logging File Names to Disk --',cr,lf,' ',0 - lhld fcount ; get count - call prhlx ; print it - call printx - db ' File Names',cr,lf,0 - -; Check file count and print appropriate header - lhld fcount ; get number of files - mov a,h ; any files? - ora l - jz xdfl1a - call prfhdr ; print file name header - jmp xdfl1b -xdfl1a: - call printx ; no files - db ' No Files to be Logged',0 - -; Store file count to disk -xdfl1b: - mov a,l ; store low count - call f1$put - jnz puterr - mov a,h ; store high count - call f1$put - jnz puterr - xchg ; ... in DE - lhld firstf ; pt to first file - mvi c,0 ; set display counter - -; Loop to store files names -xdfl2: - mov a,d ; done? - ora e - jz xdfl3 - dcx d ; count down - -; Write entry to disk - push d ; save count - push h ; save ptr to file - mov a,m ; get user number - call f1$put ; save it - jnz puterr - lxi d,numbuf ; print user number - push d ; save ptr - call madc - pop d ; get ptr - inx d ; pt to 1st digit - ldax d ; get it - call coutx - inx d ; pt to last digit - ldax d ; get it - call coutx - mvi a,' ' ; - call coutx - inx h ; pt to FN - mvi b,8 ; 8 chars - call xdput - mvi a,'.' - call coutx - mvi b,3 ; 3 chars - call xdput - mvi a,' ' ; print - call coutx - call coutx - inr c ; increment count - mov a,c ; get count - ani 3 - cz crlfx - pop h ; get ptr to first file - pop d ; get count - push b - lxi b,esize ; pt to next file - dad b - pop b - jmp xdfl2 - -; Done with creation of FNAMES.DIR -xdfl3: - call fo1$close ; close file - call crlfx - jmp return - -; Write B chars pted to by HL to FNAMES.DIR and user -xdput: - mov a,m ; get char - call coutx ; print it everywhere - call f1$put ; put it on disk - jnz puterr - inx h ; pt to next - dcr b ; count down - jnz xdput - ret - -; -; Inspect Files for Logging to Disk -; -flinsp: - lhld fcount ; get count of files - xchg ; ... in DE - mov a,d ; any files selected? - ora e - rz ; abort if none - -; Inspection banner - call printx - db cr,lf,'Inspection of Files to be Logged',0 - lhld firstf ; pt to first file - -; Main inspection loop -flil1: - mov a,d ; any files selected? - ora e - jz flil3 ; done if not - dcx d ; count down - push d ; save count - lxi d,dfnbuf ; copy file name to buffer - mvi b,12 ; 12 bytes - call moveb - call printx - db cr,lf,'Log ',0 - call prfnfx ; print file name for prompt - call printx - db ' to Disk (Y/N)? ',0 - call cin ; get response - call caps ; capitalize - call coutx - cpi 'N' ; No? - jz flil2 - mov a,m ; mark user number - ori 80h - mov m,a -flil2: - lxi d,esize ; skip to next entry - dad d - pop d ; get count - jmp flil1 -flil3: - lhld fcount ; get number of files - mov b,h ; count in BC - mov c,l - lhld firstf ; pt to first file - call dirpack ; pack directory - mov h,b ; new count in HL - mov l,c - shld fcount ; set counts - shld countf - ret - -; -; Error Message for Output -; -puterr: - call printx - db cr,lf,'Disk Write Error',0 - jmp return - -; -; Scan Disk for File Names; /FS option -; -xdirfs: - call printx - db cr,lf,'File Name Scanner',0 - call openin ; open FNAMES.DIR for input -xdfs1: - call printx - db cr,lf,'Files Named in FNAMES.DIR missing from Disk --',cr,lf,0 - -; Get file name count - call f1$get ; get file name count from disk - jnz geterr - mov c,a ; store low - call f1$get - jnz geterr - mov b,a ; store high - lhld fcount ; get count of number of files - xchg ; ... in DE - lhld firstf ; pt to first file - xra a ; A=0 - sta crcnt ; set counter for CRLF - sta fmark ; mark no first file yet - -; -; At this point, HL pts to first file in buffer, DE is number of files in -; buffer, and BC is number of files in FNAMES.DIR -; - mov a,b ; any names in FNAMES.DIR? - ora c - jz xdfs5 ; mark all names in buffer if not - call getdfn ; get first disk name -xdfs2: - mov a,b ; see if any more files in FNAMES.DIR - ora c - jz xdfs5 ; mark rest of files in buffer and continue - mov a,d ; see if any more files in buffer - ora e - jz xdfs6 ; name rest of files in FNAMES.DIR as missing and cont - call compfn ; compare to file name pted to by HL - jz xdfs3a ; advance to next file if they match - jc xdfs3 ; mark file name pted to by HL as additional - lda fmark ; first file? - ora a ; 0=yes - jnz xdfs2a - mvi a,0ffh ; set mark - sta fmark - call prfhdr ; print header -xdfs2a: - call prfnfx ; print file name in FNAMES.DIR - dcx b ; count down - mov a,b ; done? - ora c - jz xdfs2 - call getdfn ; get next name - lda crcnt ; get entry counter - inr a ; increment - sta crcnt - ani 3 ; mask - cz crlfx ; new line every 4 - jmp xdfs2 -xdfs3: - mov a,m ; get user number - ori 80h ; mark it - mov m,a ; put it back - jmp xdfs4 -xdfs3a: - call getdfn ; get next name - dcx b ; count down on names -xdfs4: - push d ; save count - lxi d,esize ; pt to next entry - dad d - pop d ; get count - dcx d ; count down - jmp xdfs2 ; continue - -; Mark rest of files in buffer -xdfs5: - mov a,d ; check count - ora e - jz xdfs7 - dcx d ; count down - mov a,m ; get user number - ori 80h ; mark it - mov m,a ; put user number - lxi b,esize ; skip to next file - dad b - jmp xdfs5 ; continue - -; Name rest of files in FNAMES.DIR as missing -xdfs6: - call prfnfx ; print file name in FNAMES.DIR - dcx b ; count down - mov a,b ; done? - ora c - jz xdfs7 ; next phase - lda crcnt ; get entry counter - inr a ; increment - sta crcnt - ani 3 ; mask - cz crlfx ; new line every 4 - call getdfn ; get next name - jmp xdfs6 - -; Part 2 of Scan - Name Additional Files -xdfs7: - lda fmark ; no files printed? - ora a ; 0=none - jnz xdfs7a - call printx - db ' No Files Missing',0 -xdfs7a: - xra a ; A=0 - sta fmark ; set mark for 2nd part - call printx - db cr,lf,'Additional Files on Disk NOT in FNAMES.DIR --',cr,lf,0 - lhld fcount ; get count of files - xchg ; ... in DE - lhld firstf ; pt to first file - xra a ; A=0 - sta crcnt ; set counter -xdfs8: - mov a,d ; check count - ora e - jz xdfs9 ; done if zero - dcx d ; count down - mov a,m ; get user number - ani 80h ; marked? - jz xdfs8b ; skip if not - mov a,m ; get user number - ani 7fh ; mask - mov m,a ; replace - lda fmark ; first time? - ora a ; 0=yes - jnz xdfs8a - mvi a,0ffh ; set mark - sta fmark - call prfhdr ; print header -xdfs8a: - push d ; save count - lxi d,dfnbuf ; copy to buffer for print - mvi b,12 ; 12 bytes - call moveb ; copy - pop d - call prfnfx ; print file name - lda crcnt ; count down - inr a - sta crcnt - ani 3 ; new line? - cz crlfx -xdfs8b: - lxi b,esize ; pt to next entry - dad b - jmp xdfs8 ; continue - -; Done with Scan -xdfs9: - lda fmark ; no files printed? - ora a ; 0=none - jnz xdfs9a - call printx - db ' No Additional Files',0 -xdfs9a: - jmp return - -; -; Compare file name pted to by HL with that in DFNBUF; return with Z if same, -; C if (HL)<(DFNBUF) -; -compfn: - push h ; save regs - push d - push b - lxi d,dfnbuf ; pt to buffer - xchg ; DE pts to file name, HL pts to DFNBUF - push h ; save ptrs - push d - mvi b,11 ; compare FN and FT -cfn1: - inx h ; pt to next - inx d - mov a,m ; get char from DFNBUF - ani 7fh ; mask MSB - mov c,a ; save in C - ldax d ; get name in memory buffer - ani 7fh ; mask MSB - cmp c ; compare to name in DFNBUF - jnz cfn2 ; not same, so exit with flag set - dcr b ; count down - jnz cfn1 - pop d ; same so far, so compare user numbers - pop h - mov a,m ; get user number - ani 7fh ; mask MSB - mov c,a ; save in C - ldax d ; get user number - ani 7fh ; mask MSB - cmp c ; compare - push h ; fill stack for ext - push h -cfn2: - pop h ; clear stack - pop h - pop b ; get regs and exit - pop d - pop h - ret - -; -; General Utility Routines -; - -; -; Print user and file name stored in DFNBUF for /Ff functions -; -prfnfx: - push h ; save regs - push d - push b - lxi h,dfnbuf ; pt to first byte of buffer - mov a,m ; get first byte (user number) - lxi d,numbuf ; convert to chars in memory - call madc - lxi d,numbuf+1 ; pt to first char - ldax d ; get it - call coutx - inx d ; pt to 2nd char - ldax d ; get it - call coutx - mvi a,' ' ; - call coutx - inx h ; pt to FN - mvi b,8 ; 8 chars for FN - call prch - mvi a,'.' - call coutx - mvi b,3 ; 3 chars for FT - call prch - call prfhs ; 2 - pop b ; get regs - pop d - pop h - ret -; -; Get next User Number, FN, and FT from disk and save it in buffer -; -getdfn: - push h ; save regs - push d - push b - lxi h,dfnbuf ; pt to buffer - mvi b,12 ; 12 bytes -getdf1: - call f1$get ; get user - jnz geterr - mov m,a ; store user - inx h ; pt to next - dcr b ; count down - jnz getdf1 - pop b ; restore regs - pop d - pop h - ret -; -; Print File Buffer Names Header Everywhere -; -prfhdr: - mvi b,3 ; 3 times -prfhd1: - call prfh1 ; print header - call prfhs ; print 2 spaces - dcr b - jnz prfhd1 - call prfh1 - call crlfx - mvi b,3 ; 3 times -prfhd2: - call prfh2 ; print header - call prfhs ; print 2 spaces - dcr b - jnz prfhd2 - call prfh2 - call crlfx - ret -prfhs: - call printx - db ' ',0 - ret -prfh1: - call printx - db ' U Filename.Typ',0 - ret -prfh2: - call printx - db ' - -------- ---',0 - ret -; -; Get Error Message and Abort -; -geterr: - call printx - db cr,lf,'Premature EOF',0 - jmp return -; -; Open FNAMES.DIR for byte-oriented input -; -openin: - lxi d,fnfcb ; open file - call fi1$open ; open for input - rz - call printx - db cr,lf,'FNAMES.DIR Not Found',0 - jmp return -; -; Print disk entry for normal directory display functions -; -prentry: - dcr d ; count counter - jnz prent1 - mvi d,3 ; reset count - call crlfx -prent1: - shld entptr ; save entry ptr - lda aflg ; all users selected? - ani 20h - jz prent2 -; -; The following prints the user number if all user numbers are selected -; - push h ; save regs - push d - push b - mov a,m ; get user number - ani 1fh ; mask it - lxi d,numbuf - call madc ; convert to chars in memory - lxi h,numbuf+1 ; pt to first char - mov a,m ; get it - call coutx - inx h ; get 2nd char - mov a,m - call coutx - mvi a,' ' ; print - call coutx - pop b ; get regs - pop d - pop h -prent2: - inx h ; pt to first char of file name - mvi b,8 ; print 8 chars - call prch - mvi a,'.' ; print dot - call coutx - push h ; save RS ptr - mvi b,3 ; print 3 chars - call prch - push d ; save de - lhld entptr ; pt to entry - mvi a,' ' ; skip 2 spaces - call coutx - call coutx - call fsize ; compute file size - lhld totsiz ; get total file size counter - dad d ; add in new file - shld totsiz ; save new total file size counter - xchg ; get file size into HL - call prhlx ; print HL value - pop d ; get de - pop h ; pt to RS - lda rsflg ; print RS fields? - ora a ; Z=no - jz pren2a - mvi a,' ' ; print 1 space - call coutx - mvi b,'R' ; letter - call prletx ; print R if bit set - inx h - mvi b,'S' ; letter - call prletx ; print S if bit set - dcx h ; ... for following inx h -pren2a: - inx h ; point correctly - mvi a,' ' ; 1 space - call coutx - lda aflg ; all users? - ani 20h - jnz prent3 -; -; The following prints 2 additional spaces if only one user area is selected -; - mvi a,' ' ; 2 more spaces for not all users - call coutx - call coutx -prent3: - lxi b,6 ; pt to next entry - dad b - ret -; -; Print B chars pted to by HL -; -prch: - mov a,m ; get char - inx h ; pt to next - ani 7fh ; mask out msb - cpi ' ' ; within range? - jnc prch1 ; print special char if not valid char - mvi a,'?' ; print ? if not valid char -prch1: - call coutx ; print it - dcr b ; count down - jnz prch - ret -; -; Extended Print Routines -; -prletx: - mov a,m ; get byte - ani 80h ; look at msb - jz prlets - mov a,b ; get letter - call coutx - ret -prlets: - mvi a,' ' ; print - call coutx - ret -prhlx: - lxi d,numbuf ; store in number buffer - call mhldc ; hl into memory as decimal - mvi b,5 ; 5 digits -prnumx: - lxi h,numbuf ; pt to buffer -prnum: - mov a,m ; get digit - inx h ; pt to next - call coutx ; print everywhere - dcr b ; count down - jnz prnum - ret -printx: - xthl ; pt to string - call prxl ; print string at HL - xthl - ret -prxl: - mov a,m ; get byte - inx h ; pt to next - ora a ; done? - rz - call coutx ; print everywhere - jmp prxl -coutx: - push b ; save bc - push psw ; save char - ani 7fh ; mask out msb - mov b,a ; char in B - call cout ; print to screen - lda pflg ; printer on? - ora a ; 0=no - mov a,b ; get char - cnz lout ; printer output if on - lda dflg ; disk on? - ora a ; 0=no - mov a,b ; get char - cnz f0$put ; output to file - pop psw ; get char - pop b ; get bc - ret -crlfx: - push psw ; save A - call printx - db cr,lf,0 - pop psw ; get A - ret -; -; Divide DE by 3; return with BC=result*esize, a=remainder -; -divde3: - push d ; save de, hl - push h - mvi d,0 ; make sure D=0 - mov a,e ; value in A -divd31: - sui 3 ; subtract 3 - jc divd32 - jz divd33 - inr d ; add 1 to result - jmp divd31 -divd32: - adi 3 ; add back in - jmp divd34 -divd33: - inr d ; add 1 for even division -divd34: - sta rem ; save remainder - lxi b,esize - lxi h,0 -divd35: - mov a,d ; done? - ora a ; 0=yes - jz divd36 - dcr d - dad b ; add in another ESIZE - jmp divd35 -divd36: - mov b,h ; BC is result - mov c,l - lda rem ; A is remainder - pop h ; restore regs - pop d - ret -; -; Skip blanks -; -sblank: - mov a,m ; pt to char - cpi ' ' ; blank? - rnz - inx h ; pt to next - jmp sblank - -; -; Buffers -; -aflg: ds 1 ; attibute flag -dflg: ds 1 ; disk output on flag -fflg: ds 1 ; 0=no file name buffer function -gflg: ds 1 ; 0=group by name/type -hflg: ds 1 ; 0=vertical list -iflg: ds 1 ; 0=no inspect -nflg: ds 1 ; 0=no negate -pflg: ds 1 ; printer output on flag -fopt: ds 1 ; file name buffer option -crcnt: ds 1 ; entry counter -fmark: ds 1 ; first file marker -dflgt: ds 1 ; temp flags -pflgt: ds 1 -dflgs: ds 1 -pflgs: ds 1 -rsflg: ds 1 ; RS Display Flag -ffflg: ds 1 ; form feed flag -disk: ds 1 ; selected disk -curdisk: - ds 1 ; current disk -curuser: - ds 1 ; current user -rem: ds 1 ; remainder buffer -firstf: ds 2 ; ptr to first file of group to print -totfil: ds 2 ; total number of files on disk -fcount: ds 2 ; count of files -countf: ds 2 ; down count of files -freesiz: - ds 2 ; amount of free space on disk -totsiz: - ds 2 ; total size of all files -ptr1: ds 2 ; col output ptrs -ptr2: ds 2 -ptr3: ds 2 -entptr: ds 2 ; current entry ptr -numbuf: ds 6 ; number buffer -dfnbuf: - ds 12 ; disk file name buffer -dskfcb: - db 0 - db 'XDIR DIR' - db 0,0,0,0 - ds 16 - ds 4 -fnfcb: - db 0 - db 'FNAMES DIR' - db 0,0,0,0 - ds 16 - ds 4 -cmdlne: ds 2 ; pointer to command line -buffer: ds 2 ; pointer to free space buffer -stack: ds 2 ; stack ptr - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3BASE1.LIB b/Source/Images/d_bp/u15/Z3BASE1.LIB deleted file mode 100644 index 6cf429da..00000000 --- a/Source/Images/d_bp/u15/Z3BASE1.LIB +++ /dev/null @@ -1,276 +0,0 @@ -; Z3BASE - Maximum Configuration -; Offset: 5100H - -;**************************************************************** -;* * -;* Z3BASE.LIB -- Base Addresses for ZCPR3 System * -;* by Richard Conn * -;* * -;* These addresses are used by the following System * -;* Segments: * -;* * -;* Segment Function * -;* ------- -------- * -;* ABOOTFD Boot System from Floppy Disk * -;* ABOOTHD Boot System from Hard Disk * -;* BDOSZ Customized BDOS * -;* CBIOSZ Customized BIOS * -;* ZCPR3 ZCPR3 Command Processor * -;* *.ENV All Environment Descriptors * -;* *.FCP All Flow Command Packages * -;* *.IOP All Input/Output Packages * -;* *.NDR All Named Directory Definition Files * -;* *.RCP All Resident Command Packages * -;* * -;* * -;* Memory Map of System: * -;* * -;* Address Range Size Function * -;* ------------- ------- -------- * -;* 0 - FF 256 b Standard CP/M Buffers except * -;* 40 - 4A 11 b for ZCPR3 External Path * -;* 4B 1 b Wheel Byte * -;* 100 - BFFF ~48 K TPA * -;* C000 - C7FF 2 K ZCPR3 Command Processor * -;* C800 - D5FF 3.5K BDOSZ * -;* D600 - E3FF 3.5K CBIOSZ with Buffers * -;* E400 - EBFF 2 K Resident Command Package * -;* EC00 - F1FF 1.5K Redirectable I/O Driver Package * -;* F200 - F3FF 0.5K Flow Command Package * -;* F400 - F4FF 256 b Environment Descriptors * -;* Bytes 00H-7FH: Z3 Parameters * -;* Bytes 80H-FFH: Z3 Terminal Cap * -;* F500 - F57F 128 b ZCPR3 Shell Stack * -;* F580 - F5CF 80 b ZCPR3 Message Buffers * -;* Byte 0: Error Flag (Z/NZ) * -;* Byte 1: IF (8 Levels) * -;* Byte 2: IF Active (8 Levels) * -;* Byte 3: Z3 Cmd Status * -;* 00B - Normal * -;* 01B - Shell * -;* 10B - Error * -;* Bytes 4&5: Error Address if 10B * -;* Byte 6: Program Error Code * -;* Byte 7: ZEX Message Byte * -;* 00B - Normal * -;* 01B - Z3 Prompt * -;* 10B - Suspend Intercept * -;* Byte 8: ZEX Running Flag (0=No) * -;* Bytes 9-10: Address of Next * -;* Char for ZEX to Return * -;* Bytes 11-12: Address of First * -;* Char in ZEX Memory- * -;* Based File Buffer * -;* Byte 13: SH Control Byte * -;* Bit 0: Enable SHCMT * -;* Bit 1: Enable SHECHO * -;* Bit 7: Enable Shell * -;* Entry Wait * -;* Bytes 14-15: Shell Scratch * -;* Bytes 10H-2FH: Error Cmd * -;* Bytes 30H-39H: Registers * -;* Bytes 3AH-3FH: Reserved * -;* Bytes 40H-4FH: User-Defined * -;* F5D0 - F5FF 48 b ZCPR3 External FCB * -;* F600 - F6FF 256 b Memory-Based Named Directory * -;* F700 - F7CF 208 b Multiple Command Line Buffer * -;* F7D0 - F7FF 48 b ZCPR3 External Stack * -;* F800 - FBFF 1 K Disk Controller EPROM * -;* FC00 - FFFF 1 K Disk Controller RAM * -;* * -;**************************************************************** - -; -; True and False -; -FALSE equ 0 -TRUE equ NOT FALSE - - -;* -;* ZCPR3 BASE EQUATES -;* - -; -; 1. VERSION NUMBERS, MEMORY SIZE, and CP/M BASE ADDRESS -; -; The following equates define the version numbers of the ZCPR3 -; Command Processor and the CBIOSZ. They also explicitly state the size -; of the TPA for inclusion in the CBIOSZ header printed at Cold Boot. -; -Z3REV EQU 30 ; ZCPR3 REV NUMBER -CBREV EQU 41 ; CBIOSZ REV NUMBER -MSIZE EQU 48 ; SIZE OF TPA -; -; BASE - Base Address of user's CP/M system (normally 0 for DR version) -; This equate allows easy modification by non-standard CP/M (eg,H89) -; -BASE EQU 0 - -; -; 2. PROCESSOR SELECTION -; -; The following equate selects the use of the 8080/8085 micro or -; the Z80 micro for the target for ZCPR3. Note that selecting the -; 8080/8085 should be done ONLY if you have an 8080 or 8085. If you have -; a Z80, by all means select this one since the code is much smaller and -; you can cram more features into the system as a result. -; If the processor is an 8080 or 8085, set this equate to TRUE. -; If the processor is a Z80, set it to FALSE. -; -I8080 EQU FALSE - -; -; 3. EXTERNAL PATH -; -; The following equates define the address of the ZCPR3 External -; Path and the number of two-byte elements contained in this path (maximum). -; If there is no ZCPR3 External Path, both of these values should be set to 0. -; -EXPATH EQU 40H ; EXTERNAL PATH -EXPATHS EQU 5 ; 5 2-byte Path Elements - ; (PATH SIZE = EXPATHS*2 + 1) - -; -; 4. WHEEL BYTE -; -; The following equate defines the address of the ZCPR3 Wheel Byte. -; If there is no ZCPR3 Wheel Byte, this value should be set to 0. -; -Z3WHL EQU 4BH ; WHEEL BYTE ADDRESS - - -; -; 5. CCP LOCATION -; -; The following equate defines the address of the ZCPR3 Command -; Processor. This address MUST be supplied. -; -CCP EQU 0C000H ; ZCPR3 COMMAND PROCESSOR - - -; -; 6. RCP LOCATION -; -; The following equates define the address of the ZCPR3 Resident -; Command Package and its size in 128-byte blocks. If there is no -; ZCPR3 Resident Command Package, both of these values should be 0. -; -RCP EQU 0E400H ; RESIDENT COMMAND PACKAGE -RCPS EQU 16 ; 16 128-byte Blocks (2K bytes) - - -; -; 7. IOP LOCATION -; -; The following equates define the address of the ZCPR3 Input/Output -; Package and its size in 128-byte blocks. If there is no ZCPR3 Input/Output -; Package, both of these values should be 0. -; -IOP EQU 0EC00H ; REDIRECTABLE I/O PACKAGE -IOPS EQU 12 ; 12 128-byte Blocks (1.5K bytes) - - -; -; 8. FCP LOCATION -; -; The following equates define the address of the ZCPR3 Flow Command -; Package and its size in 128-byte blocks. If there is no ZCPR3 Flow Command -; Package, both of these values should be 0. -; -FCP EQU 0F200H ; FLOW COMMAND PACKAGE -FCPS EQU 4 ; 4 128-byte Blocks (0.5K bytes) - - -; -; 9. ENV LOCATION -; -; The following equates define the address of the ZCPR3 Environment -; Descriptor and its size in 128-byte blocks. If there is no ZCPR3 Environment -; Descriptor, both of these values should be 0. -; -Z3ENV EQU 0F400H ; ENVIRONMENT DESCRIPTORS -Z3ENVS EQU 2 ; SIZE OF ENVIRONMENT DESCRIPTOR IN 128-BYTE BLOCKS - - -; -; 10. SHELL STACK -; -; The following equates define the address of the ZCPR3 Shell Stack, -; the number of entries permitted in the ZCPR3 Shell Stack, and the size -; of each entry in the Shell Stack in terms of bytes. If there is no ZCPR3 -; Shell Stack, all three values should be 0. -; -SHSTK EQU 0F500H ; ZCPR3 SHELL STACK -SHSTKS EQU 4 ; NUMBER OF SHSIZE-BYTE SHELL STACK ENTRIES -SHSIZE EQU 32 ; SIZE OF A SHELL STACK ENTRY - ; (STACK SIZE = SHSTKS * SHSIZE) - - -; -; 11. ZCPR3 MESSAGES -; -; The following equate defines the address of the ZCPR3 Message Buffer. -; This buffer is always 80 bytes long. If there is no ZCPR3 Message Buffer, -; this address should be 0. -; -Z3MSG EQU 0F580H ; ZCPR3 MESSAGE BUFFER - - -; -; 12. EXTERNAL FCB -; -; The following equate defines the address of the ZCPR3 External FCB. -; This buffer is always 36 bytes long. If there is no ZCPR3 External FCB, -; this address should be 0. -; -EXTFCB EQU 0F5D0H ; ZCPR3 EXTERNAL FCB - - -; -; 13. NAMED DIRECTORY BUFFER -; -; The following equates define the address and size (in terms of 18-byte -; entries) of the ZCPR3 Named Directory Buffer. If there is no such buffer, -; both of these values should be 0. -; -Z3NDIR EQU 0F600H ; ZCPR3 NAMED DIRECTORY AREA -Z3NDIRS EQU 14 ; 14 18-byte Named Directory Elements permitted - ; (NDIR SIZE = Z3NDIRS*18 + 1 for trailing 0) - - -; -; 14. COMMAND LINE -; -; The following equates define the address and size (in terms of bytes) -; of the ZCPR3 Command Line Buffer (formerly called the Multiple Command Line -; Buffer under ZCPR2). If there is no such buffer, both of these values should -; be 0. -; -Z3CL EQU 0F700H ; ZCPR3 COMMAND LINE BUFFER -Z3CLS EQU 200 ; SIZE OF COMMAND LINE BUFFER - - -; -; 15. EXTERNAL STACK -; -; The following equate defines the address of the ZCPR3 External Stack. -; This stack is always 48 bytes in size. If there is no such stack, this -; value should be 0. -; -EXTSTK EQU 0F7D0H ; ZCPR3 EXTERNAL STACK - - -; -; 16. USER EQUATES -; -; The following equates are available for the implementer's target -; system. These are implementation-defined. -; -DJEPROM EQU 0F800H ; EPROM BASE ADDRESS - - -;* -;* END of ZCPR3 BASE EQUATES -;* - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3BASE2.LIB b/Source/Images/d_bp/u15/Z3BASE2.LIB deleted file mode 100644 index 059b0bbc..00000000 --- a/Source/Images/d_bp/u15/Z3BASE2.LIB +++ /dev/null @@ -1,273 +0,0 @@ -; Z3BASE - Minimum Configuration -; Offset: 4100H - -;**************************************************************** -;* * -;* Z3BASE.LIB -- Base Addresses for ZCPR3 System * -;* by Richard Conn * -;* * -;* These addresses are used by the following System * -;* Segments: * -;* * -;* Segment Function * -;* ------- -------- * -;* ABOOTFD Boot System from Floppy Disk * -;* ABOOTHD Boot System from Hard Disk * -;* BDOSZ Customized BDOS * -;* CBIOSZ Customized BIOS * -;* ZCPR3 ZCPR3 Command Processor * -;* *.ENV All Environment Descriptors * -;* *.FCP All Flow Command Packages * -;* *.IOP All Input/Output Packages * -;* *.NDR All Named Directory Definition Files * -;* *.RCP All Resident Command Packages * -;* * -;* * -;* Memory Map of System: * -;* * -;* Address Range Size Function * -;* ------------- ------- -------- * -;* 0 - FF 256 b Standard CP/M Buffers except * -;* 40 - 4A 11 b for ZCPR3 External Path * -;* 4B 1 b Wheel Byte * -;* 100 - CFFF ~52 K TPA * -;* D000 - D7FF 2 K ZCPR3 Command Processor * -;* D800 - E5FF 3.5K BDOSZ * -;* E600 - F3FF 3.5K CBIOSZ with Buffers * -;* F400 - F4FF 256 b Environment Descriptors * -;* Bytes 00H-7FH: Z3 Parameters * -;* Bytes 80H-FFH: Z3 Terminal Cap * -;* F500 - F57F 128 b ZCPR3 Shell Stack * -;* F580 - F5CF 80 b ZCPR3 Message Buffers * -;* Byte 0: Error Flag (Z/NZ) * -;* Byte 1: IF (8 Levels) * -;* Byte 2: IF Active (8 Levels) * -;* Byte 3: Z3 Cmd Status * -;* 00B - Normal * -;* 01B - Shell * -;* 10B - Error * -;* Bytes 4&5: Error Address if 10B * -;* Byte 6: Program Error Code * -;* Byte 7: ZEX Message Byte * -;* 00B - Normal * -;* 01B - Z3 Prompt * -;* 10B - Suspend Intercept * -;* Byte 8: ZEX Running Flag (0=No) * -;* Bytes 9-10: Address of Next * -;* Char for ZEX to Return * -;* Bytes 11-12: Address of First * -;* Char in ZEX Memory- * -;* Based File Buffer * -;* Byte 13: SH Control Byte * -;* Bit 0: Enable SHCMT * -;* Bit 1: Enable SHECHO * -;* Bit 7: Enable Shell * -;* Entry Wait * -;* Bytes 14-15: Shell Scratch * -;* Bytes 10H-2FH: Error Cmd * -;* Bytes 30H-39H: Registers * -;* Bytes 3AH-3FH: Reserved * -;* Bytes 40H-4FH: User-Defined * -;* F5D0 - F5FF 48 b ZCPR3 External FCB * -;* F600 - F6FF 256 b Memory-Based Named Directory * -;* F700 - F7CF 208 b Multiple Command Line Buffer * -;* F7D0 - F7FF 48 b ZCPR3 External Stack * -;* F800 - FBFF 1 K Disk Controller EPROM * -;* FC00 - FFFF 1 K Disk Controller RAM * -;* * -;**************************************************************** - -; -; True and False -; -FALSE equ 0 -TRUE equ NOT FALSE - - -;* -;* ZCPR3 BASE EQUATES -;* - -; -; 1. VERSION NUMBERS, MEMORY SIZE, and CP/M BASE ADDRESS -; -; The following equates define the version numbers of the ZCPR3 -; Command Processor and the CBIOSZ. They also explicitly state the size -; of the TPA for inclusion in the CBIOSZ header printed at Cold Boot. -; -Z3REV EQU 30 ; ZCPR3 REV NUMBER -CBREV EQU 41 ; CBIOSZ REV NUMBER -MSIZE EQU 52 ; SIZE OF TPA -; -; BASE - Base Address of user's CP/M system (normally 0 for DR version) -; This equate allows easy modification by non-standard CP/M (eg,H89) -; -BASE EQU 0 - -; -; 2. PROCESSOR SELECTION -; -; The following equate selects the use of the 8080/8085 micro or -; the Z80 micro for the target for ZCPR3. Note that selecting the -; 8080/8085 should be done ONLY if you have an 8080 or 8085. If you have -; a Z80, by all means select this one since the code is much smaller and -; you can cram more features into the system as a result. -; If the processor is an 8080 or 8085, set this equate to TRUE. -; If the processor is a Z80, set it to FALSE. -; -I8080 EQU FALSE - -; -; 3. EXTERNAL PATH -; -; The following equates define the address of the ZCPR3 External -; Path and the number of two-byte elements contained in this path (maximum). -; If there is no ZCPR3 External Path, both of these values should be set to 0. -; -EXPATH EQU 40H ; EXTERNAL PATH -EXPATHS EQU 5 ; 5 2-byte Path Elements - ; (PATH SIZE = EXPATHS*2 + 1) - -; -; 4. WHEEL BYTE -; -; The following equate defines the address of the ZCPR3 Wheel Byte. -; If there is no ZCPR3 Wheel Byte, this value should be set to 0. -; -Z3WHL EQU 4BH ; WHEEL BYTE ADDRESS - - -; -; 5. CCP LOCATION -; -; The following equate defines the address of the ZCPR3 Command -; Processor. This address MUST be supplied. -; -CCP EQU 0D000H ; ZCPR3 COMMAND PROCESSOR - - -; -; 6. RCP LOCATION -; -; The following equates define the address of the ZCPR3 Resident -; Command Package and its size in 128-byte blocks. If there is no -; ZCPR3 Resident Command Package, both of these values should be 0. -; -RCP EQU 00000H ; RESIDENT COMMAND PACKAGE -RCPS EQU 00 ; 00 128-byte Blocks (0K bytes) - - -; -; 7. IOP LOCATION -; -; The following equates define the address of the ZCPR3 Input/Output -; Package and its size in 128-byte blocks. If there is no ZCPR3 Input/Output -; Package, both of these values should be 0. -; -IOP EQU 00000H ; REDIRECTABLE I/O PACKAGE -IOPS EQU 00 ; 00 128-byte Blocks (0K bytes) - - -; -; 8. FCP LOCATION -; -; The following equates define the address of the ZCPR3 Flow Command -; Package and its size in 128-byte blocks. If there is no ZCPR3 Flow Command -; Package, both of these values should be 0. -; -FCP EQU 00000H ; FLOW COMMAND PACKAGE -FCPS EQU 0 ; 0 128-byte Blocks (0K bytes) - - -; -; 9. ENV LOCATION -; -; The following equates define the address of the ZCPR3 Environment -; Descriptor and its size in 128-byte blocks. If there is no ZCPR3 Environment -; Descriptor, both of these values should be 0. -; -Z3ENV EQU 0F400H ; ENVIRONMENT DESCRIPTORS -Z3ENVS EQU 2 ; SIZE OF ENVIRONMENT DESCRIPTOR IN 128-BYTE BLOCKS - - -; -; 10. SHELL STACK -; -; The following equates define the address of the ZCPR3 Shell Stack, -; the number of entries permitted in the ZCPR3 Shell Stack, and the size -; of each entry in the Shell Stack in terms of bytes. If there is no ZCPR3 -; Shell Stack, all three values should be 0. -; -SHSTK EQU 0F500H ; ZCPR3 SHELL STACK -SHSTKS EQU 4 ; NUMBER OF SHSIZE-BYTE SHELL STACK ENTRIES -SHSIZE EQU 32 ; SIZE OF A SHELL STACK ENTRY - ; (STACK SIZE = SHSTKS * SHSIZE) - - -; -; 11. ZCPR3 MESSAGES -; -; The following equate defines the address of the ZCPR3 Message Buffer. -; This buffer is always 80 bytes long. If there is no ZCPR3 Message Buffer, -; this address should be 0. -; -Z3MSG EQU 0F580H ; ZCPR3 MESSAGE BUFFER - - -; -; 12. EXTERNAL FCB -; -; The following equate defines the address of the ZCPR3 External FCB. -; This buffer is always 36 bytes long. If there is no ZCPR3 External FCB, -; this address should be 0. -; -EXTFCB EQU 0F5D0H ; ZCPR3 EXTERNAL FCB - - -; -; 13. NAMED DIRECTORY BUFFER -; -; The following equates define the address and size (in terms of 18-byte -; entries) of the ZCPR3 Named Directory Buffer. If there is no such buffer, -; both of these values should be 0. -; -Z3NDIR EQU 0F600H ; ZCPR3 NAMED DIRECTORY AREA -Z3NDIRS EQU 14 ; 14 18-byte Named Directory Elements permitted - ; (NDIR SIZE = Z3NDIRS*18 + 1 for trailing 0) - - -; -; 14. COMMAND LINE -; -; The following equates define the address and size (in terms of bytes) -; of the ZCPR3 Command Line Buffer (formerly called the Multiple Command Line -; Buffer under ZCPR2). If there is no such buffer, both of these values should -; be 0. -; -Z3CL EQU 0F700H ; ZCPR3 COMMAND LINE BUFFER -Z3CLS EQU 200 ; SIZE OF COMMAND LINE BUFFER - - -; -; 15. EXTERNAL STACK -; -; The following equate defines the address of the ZCPR3 External Stack. -; This stack is always 48 bytes in size. If there is no such stack, this -; value should be 0. -; -EXTSTK EQU 0F7D0H ; ZCPR3 EXTERNAL STACK - - -; -; 16. USER EQUATES -; -; The following equates are available for the implementer's target -; system. These are implementation-defined. -; -DJEPROM EQU 0F800H ; EPROM BASE ADDRESS - - -;* -;* END of ZCPR3 BASE EQUATES -;* - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3FILES.PH1 b/Source/Images/d_bp/u15/Z3FILES.PH1 deleted file mode 100644 index 952b4976..00000000 --- a/Source/Images/d_bp/u15/Z3FILES.PH1 +++ /dev/null @@ -1,454 +0,0 @@ - - - Echelon, Inc. ZCPR3 Distribution Files, Phase 1 - (Copyright 1984 Richard Conn) - - ZCPR3 Core Disk 1 -- - Filename.Typ Size Recs CRC Lines - 1 ALIAS .COM 4K 30 669A N/A - 2 CD .COM 1K 7 49C8 N/A - 3 COMMENT .COM 1K 5 9629 N/A - 4 DIR .COM 2K 16 BE35 N/A - 5 ECHO .COM 1K 4 DB5A N/A - 6 ERROR1 .COM 2K 12 E682 N/A - 7 ERROR2 .COM 3K 18 A088 N/A - 8 HELP .COM 3K 24 5708 N/A - 9 LDR .COM 3K 20 517E N/A - 10 MENU .COM 4K 27 1591 N/A - 11 MENUCK .COM 3K 20 4F74 N/A - 12 MKDIR .COM 6K 41 148B N/A - 13 PATH .COM 2K 10 653A N/A - 14 PWD .COM 1K 8 5DA2 N/A - 15 SYSENV .ASM 1K 5 4C5C 30 - 16 SYSENV .LIB 4K 26 CF64 135 - 17 SYSIOP .ASM 32K 254 1DCD 1220 - 18 SYSNDR .ASM 1K 3 3872 16 - 19 SYSNDR .LIB 2K 10 DA46 82 - 20 Z3BASE1 .LIB 9K 66 2C69 275 - 21 Z3BASE2 .LIB 8K 64 17AD 272 - 22 Z3HDR1 .LIB 19K 150 6B50 608 - 23 Z3HDR2 .LIB 19K 150 2C19 608 - 24 ZCPR3 .ASM 66K 522 2857 2906 - 25 ZCPR3 .INS 4K 28 52CF 160 - - ZCPR3 Core Disk 2 -- - Filename.Typ Size Recs CRC Lines - 1 DISK7 .COM 4K 32 547C N/A - 2 DISK77B .COM 4K 32 1A90 N/A - 3 DISK77B .DOC 6K 45 88BE 95 - 4 PATH .COM 2K 10 653A N/A - 5 PRINT .COM 6K 42 1214 N/A - 6 SAK .COM 1K 7 8616 N/A - 7 SETFILE .COM 1K 4 28D4 N/A - 8 SHOW .COM 8K 62 A876 N/A - 9 SYSFCP .ASM 18K 137 7012 944 - 10 SYSRCP .ASM 44K 352 6315 2305 - 12 Z3TCAP .ASM 24K 189 3701 872 - 13 SYSFCP1 .LIB 6K 43 C3BB 213 - 14 SYSFCP2 .LIB 6K 43 2324 213 - 15 SYSRCP1 .LIB 11K 81 F030 366 - 16 SYSRCP2 .LIB 11K 81 790C 367 - 17 SYSRCP3 .LIB 11K 81 52FB 366 - 18 SYSRCP4 .LIB 11K 81 871D 366 - 19 SYSLIB .REL 21K 161 2921 N/A - 20 VLIB .REL 2K 13 01A1 N/A - 21 Z3LIB .REL 7K 56 61B8 N/A - 22 Z3TCAP .TCP 7K 51 FB17 N/A - - - ZCPR3 Utilities COM Disk 1 -- - Filename.Typ Size Recs CRC Version - 1 ALIAS .COM 4K 30 82D4 1.1 - 2 CD .COM 1K 7 DA48 3.0 - 3 CMDRUN .COM 1K 2 21B5 N/A - 4 COMMENT .COM 1K 5 3C4A 2.0 - 5 CPSEL .COM 1K 8 CCAA 1.0 - 6 CRC .COM 6K 41 A89C 2.0 - 7 DEV .COM 2K 14 F755 1.0 - 8 DEVICE .COM 3K 17 153E 1.0 - 9 DIFF .COM 4K 25 45A7 2.0 - 10 DIR .COM 2K 16 9B8A 1.0 - 11 ECHO .COM 1K 4 F2D6 1.0 - 12 ERASE .COM 3K 20 E71E 5.0 - 13 ERROR1 .COM 2K 12 5EB7 1.0 - 14 ERROR2 .COM 3K 18 2F03 1.0 - 15 ERROR3 .COM 1K 5 8542 1.0 - 16 ERROR4 .COM 1K 5 86D1 1.0 - 17 ERRORX .COM 1K 3 F941 1.0 - 18 FINDF .COM 2K 14 D2A6 2.0 - 19 GOTO .COM 1K 6 6ADA 1.0 - 20 HELP .COM 3K 24 928B 5.0 - 21 HELPCK .COM 2K 16 F3B3 1.0 - 22 HELPPR .COM 5K 35 12E7 1.0 - 23 IF .COM 3K 18 418D 1.1 - 24 IFSTAT .COM 1K 3 6586 1.0 - 25 LDR .COM 3K 20 517E 1.0 - 26 MCOPY .COM 4K 32 8341 4.0 - 27 MENU .COM 4K 27 8CED 3.2 - 28 MENUCK .COM 3K 20 3CDC 1.0 - 29 MKDIR .COM 6K 41 014B 3.0 - 30 NOTE .COM 1K 1 CB9E 1.0 - 31 PAGE .COM 5K 36 DF9F 2.0 - 32 PATH .COM 2K 10 E421 3.0 - 33 PRINT .COM 6K 42 0492 2.0 - 34 PROTECT .COM 4K 28 A130 3.0 - 35 PWD .COM 1K 8 2B9B 1.0 - 36 QUIET .COM 1K 4 DF6B 1.0 - 37 RECORD .COM 1K 8 C2B4 3.0 - 38 REG .COM 1K 8 1CC4 1.0 - 39 RENAME .COM 4K 27 A2F2 3.0 - 40 SAK .COM 1K 7 7842 2.0 - 41 SETFILE .COM 1K 4 00B2 1.0 - 42 SH .COM 4K 28 A89E 1.0 - 43 SHCTRL .COM 1K 7 E37A 1.0 - 44 SHDEFINE.COM 3K 23 0DEA 1.0 - 45 SHFILE .COM 1K 4 634F 1.0 - 46 SHOW .COM 8K 62 808A 1.0 - 47 SHVAR .COM 3K 23 4D89 1.0 - 48 SUB .COM 3K 20 59E5 3.0 - 49 TCCHECK .COM 2K 14 7235 1.0 - 50 TCMAKE .COM 6K 47 B3A0 1.0 - 51 TCSELECT.COM 3K 22 7C29 1.0 - 52 UNERASE .COM 2K 13 5057 1.0 - 53 WHEEL .COM 2K 11 0CD0 3.0 - 54 XD .COM 4K 28 465B 1.2 - 55 XDIR .COM 8K 62 7248 2.0 - 56 Z3INS .COM 2K 16 DFB7 1.0 - 57 Z3LOC .COM 1K 7 A908 1.0 - 58 ZEX .COM 6K 48 5E36 3.0 - - ZCPR3 Utilities HELP Disk 2 -- - Filename.Typ Size Recs CRC Lines - 1 ALIAS .HLP 5K 35 9C58 166 - 2 CMDFILES.HLP 24K 192 4475 728 - 3 COMPARE .HLP 5K 33 26B6 148 - 4 DIRS .HLP 21K 166 29F5 602 - 5 HELP .HLP 1K 7 54CD 20 - 6 HELPSYS .HLP 29K 230 99DA 792 - 7 IF .HLP 13K 99 45A4 457 - 8 IO .HLP 12K 92 21E3 389 - 9 MENU .HLP 32K 253 9059 892 - 10 NDIRS .HLP 16K 122 33D7 439 - 11 SH .HLP 13K 101 6646 419 - 12 SYSRCP .HLP 6K 48 F633 231 - - ZCPR3 Utilities HELP Disk 3 -- - Filename.Typ Size Recs CRC Lines - 1 Z3RES .HLP 8K 64 800E 221 - 2 Z3TCAP .HLP 40K 314 381F 1105 - 3 Z3UTIL1 .HLP 30K 234 4B2D 988 - 4 Z3UTIL2 .HLP 21K 166 D3E6 763 - 5 ZCPR3 .HLP 4K 30 666E 105 - - ZCPR3 Utilities Source Disk 4 -- - Filename.Typ Size Recs CRC Lines - 1 ALIAS .ZEX 2K 9 6DBE 63 - 2 ALIAS0 .MAC 8K 63 5072 431 - 3 ALIAS1 .MAC 10K 75 DB42 513 - 4 CD .MAC 3K 22 4202 151 - 5 CMDRUN .MAC 1K 7 F21D 50 - 6 COMMENT .MAC 4K 28 FF64 195 - 7 CPSEL .MAC 7K 52 2669 364 - 8 CRC .MAC 18K 141 15ED 914 - 9 DEV .MAC 9K 71 D980 492 - 10 DEVICE .MAC 11K 84 6EED 576 - 11 DIFF .MAC 15K 115 B983 724 - 12 DIR .MAC 7K 54 2227 373 - 13 ECHO .MAC 4K 28 824C 180 - 14 ERASE .MAC 10K 79 765E 492 - 15 ERROR1 .MAC 8K 57 7BF1 308 - 16 ERROR2 .MAC 9K 66 DFF6 367 - 17 ERROR3 .MAC 4K 27 85FA 153 - 18 ERROR4 .MAC 4K 31 D179 178 - 19 ERRORX .MAC 2K 9 7F9C 68 - 20 FINDF .MAC 22K 171 4220 1049 - 21 GOTO .MAC 4K 27 4536 203 - 22 HELP .MAC 25K 195 FF6A 1207 - 23 HELPCK .MAC 10K 77 A576 519 - 24 HELPPR .MAC 28K 219 CFB6 1380 - 25 IF .MAC 10K 77 F529 526 - 26 IFSTAT .MAC 2K 11 234E 85 - - ZCPR3 Utilities Source Disk 5 -- - Filename.Typ Size Recs CRC Lines - 1 LDR .MAC 11K 88 E5E0 552 - 2 MCOPY .MAC 22K 170 B694 1059 - 3 MENU .MAC 31K 241 D3F6 1509 - 4 MENUCK .MAC 11K 87 B04C 545 - 5 MKDIR .MAC 19K 145 64CB 981 - 6 NOTE .MAC 1K 7 986F 51 - 7 PAGE .MAC 24K 187 AEFF 1182 - 8 PATH .MAC 9K 69 7D6A 459 - 9 PRINT .MAC 28K 219 A093 1403 - 10 PROTECT .MAC 13K 97 E175 590 - 11 PWD .MAC 5K 37 DF00 248 - 12 QUIET .MAC 3K 17 FA09 138 - 13 RECORD .MAC 4K 30 4EE7 193 - 14 REG .MAC 5K 37 401A 266 - 15 RENAME .MAC 13K 103 C4F5 592 - 16 SAK .MAC 5K 38 62C2 244 - 17 SETFILE .MAC 2K 16 73D5 107 - 18 SHCTRL .MAC 3K 21 CAE6 147 - 19 SHOW .MAC 31K 247 8770 1752 - - ZCPR3 Utilities Source Disk 6 -- - Filename.Typ Size Recs CRC Lines - 1 SH .MAC 16K 125 768D 806 - 2 SHDEFINE.MAC 11K 87 396F 658 - 3 SHFILE .MAC 2K 15 3417 104 - 4 SHVAR .MAC 11K 88 6B60 655 - 5 SUB .MAC 23K 183 4AA9 1042 - 6 TCCHECK .MAC 5K 40 7079 280 - 7 TCMAKE .MAC 19K 148 A0C7 1084 - 8 TCSELECT.MAC 11K 87 927E 571 - 9 UNERASE .MAC 14K 110 A09A 726 - 10 WHEEL .MAC 4K 32 FFCF 217 - 11 XD .MAC 18K 144 B1B2 855 - 12 XDIR .MAC 38K 304 8B4B 1887 - 13 Z3INS .MAC 10K 80 7F27 539 - 14 Z3LOC .MAC 4K 30 3583 211 - 15 ZEX .ASM 45K 360 48BD 2194 - 16 ZEX .ZEX 4K 32 782C 180 - - ZCPR3 Utilities Documentation Disk 7 -- - Filename.Typ Size Recs CRC Lines - 1 Z3INS .IDX 4K 32 6044 232 - 2 Z3INS .SI 31K 241 836B 771 - 3 Z3INS .TOC 13K 101 D54E 207 - 4 Z3INS1 .SI 11K 85 30E0 267 - 5 Z3INS2 .SI 11K 88 2800 339 - 6 Z3INS3 .SI 55K 439 FCCF 1919 - 7 Z3INS4 .SI 28K 224 16D3 998 - 8 Z3INS5 .SI 5K 39 984C 153 - 9 Z3INS6 .SI 33K 259 D8A1 1014 - 10 Z3INS7 .SI 2K 12 F0A3 32 - 11 Z3INS8 .SI 5K 34 EB11 154 - - ZCPR3 Utilities Documentation Disk 8 -- - Filename.Typ Size Recs CRC Lines - 1 Z3USER .IDX 1K 3 9F34 30 - 2 Z3USER .SI 54K 428 7D58 1886 - 3 Z3USER .TOC 1K 6 1810 24 - - SYSLIB3 Source Disk 1 -- - Filename.Typ Size Recs CRC Lines - 1 S0FILEIO.MAC 2K 12 6AA7 86 - 2 S1FILEIO.MAC 2K 12 29E9 86 - 3 S2FILEIO.MAC 2K 12 EE8F 86 - 4 S3FILEIO.MAC 2K 12 B0F6 86 - 5 SALLOC .MAC 3K 22 F78F 113 - 6 SBBLINE .MAC 3K 17 1D79 88 - 7 SBDOS .MAC 1K 4 D833 26 - 8 SBIN .MAC 1K 4 AC82 27 - 9 SBIOS .MAC 3K 17 241E 79 - 10 SBIST .MAC 1K 4 3522 28 - 11 SBLINE .MAC 3K 21 1871 98 - 12 SBOUT .MAC 1K 4 4DF6 30 - 13 SCAPIN .MAC 1K 4 DF2E 28 - 14 SCAPS .MAC 1K 4 22F3 24 - 15 SCAPSTR .MAC 1K 5 FCEA 35 - 16 SCATH .MAC 1K 5 A665 33 - 17 SCCOUT .MAC 2K 9 A488 59 - 18 SCIN .MAC 1K 7 47D4 43 - 19 SCLINE .MAC 2K 11 583E 57 - 20 SCLOUT .MAC 2K 9 2A8B 59 - 21 SCODEND .MAC 1K 8 4F9C 44 - 22 SCOMP .MAC 2K 10 C619 56 - 23 SCOMPHD .MAC 1K 4 67BE 27 - 24 SCONDIN .MAC 1K 6 6666 33 - 25 SCOUT .MAC 1K 7 0A76 46 - 26 SCPOUT .MAC 2K 9 F3B0 59 - 27 SCRC .MAC 3K 24 9649 120 - 28 SCRC1 .MAC 3K 24 7A5D 120 - 29 SCRC2 .MAC 3K 23 E929 118 - 30 SCRLF .MAC 1K 6 6CD3 42 - 31 SCST .MAC 1K 7 B601 45 - 32 SDIR .MAC 2K 15 D2C8 64 - 33 SDIR00 .MAC 2K 15 D5BC 64 - 34 SDIR01 .MAC 2K 12 C259 63 - 35 SDIR02 .MAC 3K 17 5193 104 - 36 SDIR03 .MAC 3K 17 D263 85 - 37 SDIR04 .MAC 2K 11 5228 62 - 38 SDIR05 .MAC 7K 56 754A 282 - 39 SDIR06 .MAC 10K 79 D1DF 423 - 40 SDIR07 .MAC 3K 17 4FA3 111 - 41 SDIR08 .MAC 2K 12 4F2F 65 - 42 SDIR09 .MAC 2K 14 75BA 83 - 43 SDIR10 .MAC 2K 13 3DE7 72 - 44 SDIRBF .MAC 1K 5 F2DC 31 - 45 SDIRQ .MAC 17K 136 6004 708 - 46 SDIRQS .MAC 20K 155 51F3 786 - 47 SEN .MAC 1K 3 F9CF 23 - 48 SEPRINT .MAC 1K 5 2A31 26 - 49 SEPSTR .MAC 2K 15 68B3 91 - 50 SEVAL .MAC 4K 25 13D5 146 - 51 SEVAL1 .MAC 2K 9 782D 66 - 52 SEVAL2 .MAC 2K 11 1BDC 74 - 53 SEVAL3 .MAC 2K 10 BD45 66 - 54 SEVAL4 .MAC 2K 9 10A5 58 - 55 SFCLOS .MAC 1K 4 710C 33 - 56 SFDEL .MAC 1K 4 BB5B 28 - 57 SFEXIST .MAC 1K 5 2C94 31 - 58 SFILEIO .MAC 9K 72 4F9C 418 - 59 SFILL .MAC 2K 10 A547 70 - 60 SFMAKE .MAC 1K 5 5A73 31 - - SYSLIB3 Source Disk 2 -- - Filename.Typ Size Recs CRC Lines - 1 SFNAME .MAC 5K 39 EB46 245 - 2 SFOPEN .MAC 2K 10 6B08 64 - 3 SFREAD .MAC 1K 4 3E4E 30 - 4 SFRENAME.MAC 2K 12 6A58 80 - 5 SFSIZE .MAC 2K 12 DCDF 91 - 6 SFWRIT .MAC 1K 4 67E3 30 - 7 SFXIO .MAC 9K 65 7928 406 - 8 SGFA .MAC 3K 20 DDA9 130 - 9 SGUA .MAC 1K 5 C628 43 - 10 SINITFCB.MAC 1K 8 FFE8 47 - 11 SINLINE .MAC 6K 44 4103 285 - 12 SINSTR .MAC 2K 12 3077 71 - 13 SISALNUM.MAC 1K 6 2867 40 - 14 SISALPHA.MAC 1K 6 02B4 41 - 15 SISCTRL .MAC 1K 6 533C 40 - 16 SISDIGIT.MAC 1K 6 EDAB 38 - 17 SISGRAPH.MAC 1K 6 EEF8 38 - 18 SISHEX .MAC 1K 6 1958 43 - 19 SISPRINT.MAC 1K 6 EC30 38 - 20 SISPUN .MAC 2K 9 0F59 58 - 21 SISSP .MAC 1K 8 7B4B 59 - 22 SLA2HC .MAC 1K 6 70AD 38 - 23 SLADC .MAC 2K 11 72AE 75 - 24 SLAFDC .MAC 2K 10 843B 62 - 25 SLCRLF .MAC 1K 6 A98A 42 - 26 SLFN1 .MAC 1K 6 A6FF 40 - 27 SLFN2 .MAC 1K 6 82BC 41 - 28 SLFN3 .MAC 1K 8 658E 54 - 29 SLHL4HC .MAC 1K 4 DBC3 28 - 30 SLHL5DC .MAC 2K 14 7961 93 - 31 SLHLFDC .MAC 2K 12 2F66 82 - 32 SLOUT .MAC 1K 7 4084 46 - 33 SLPRINT .MAC 1K 4 67D0 25 - 34 SLPSTR .MAC 2K 14 65D7 90 - 35 SMA2HC .MAC 1K 8 0DC7 40 - 36 SMADC .MAC 2K 14 016F 84 - 37 SMAFDC .MAC 2K 12 BEC3 70 - 38 SMFN1 .MAC 1K 6 3A43 42 - 39 SMFN2 .MAC 1K 6 C23B 45 - 40 SMFN3 .MAC 1K 8 002A 57 - 41 SMHL4HC .MAC 1K 5 9C15 28 - 42 SMHL5DC .MAC 3K 19 F0F5 115 - 43 SMHLFDC .MAC 2K 16 1C5D 108 - 44 SMOVE .MAC 3K 19 67FF 131 - 45 SMTH01 .MAC 1K 4 FD05 33 - 46 SMTH02 .MAC 1K 5 47EC 33 - 47 SMTH03 .MAC 1K 4 8800 30 - 48 SMTH04 .MAC 1K 4 FAD3 28 - 49 SMTH05 .MAC 1K 5 41F7 34 - 50 SMTH06 .MAC 1K 5 9661 34 - 51 SMTH07 .MAC 1K 3 78BD 26 - 52 SMTH08 .MAC 1K 3 AD88 26 - 53 SMTH09 .MAC 1K 3 3EC8 26 - 54 SMTH10 .MAC 1K 4 729D 34 - 55 SMTH11 .MAC 2K 13 7150 98 - 56 SMTH12 .MAC 2K 13 E277 95 - -.cp 5 - SYSLIB3 REL and Source Disk 3 -- - Filename.Typ Size Recs CRC Lines - 1 SPA2HC .MAC 1K 6 FD07 38 - 2 SPADC .MAC 2K 11 35AA 74 - 3 SPAFDC .MAC 2K 10 8746 62 - 4 SPAUSE .MAC 3K 23 A2B8 123 - 5 SPFN1 .MAC 1K 6 5BD1 40 - 6 SPFN2 .MAC 1K 6 6756 41 - 7 SPFN3 .MAC 1K 8 B9E6 54 - 8 SPHL4HC .MAC 1K 4 3F9B 28 - 9 SPHL5DC .MAC 2K 14 D706 92 - 10 SPHLFDC .MAC 2K 12 A7C8 82 - 11 SPOUT .MAC 1K 7 915C 46 - 12 SPRINT .MAC 1K 4 A2A3 25 - 13 SPSTR .MAC 2K 14 A7FD 90 - 14 SRAND .MAC 2K 13 476E 81 - 15 SRIN .MAC 1K 7 1844 43 - 16 SRREAD .MAC 2K 9 F01A 58 - 17 SRWRITE .MAC 2K 9 35C7 58 - 18 SSA2HC .MAC 1K 6 6057 38 - 19 SSADC .MAC 2K 11 1A64 75 - 20 SSAFDC .MAC 2K 10 B9F3 62 - 21 SSCANNER.MAC 2K 12 C2D3 73 - 22 SSCFA .MAC 2K 16 E939 117 - 23 SSCOUT .MAC 1K 6 0636 39 - 24 SSCRLF .MAC 1K 5 6327 33 - 25 SSCTLFL .MAC 1K 4 D7AB 21 - 26 SSFA .MAC 2K 16 9FAC 117 - 27 SSFN1 .MAC 1K 6 A43E 41 - 28 SSFN2 .MAC 1K 6 0E8D 42 - 29 SSFN3 .MAC 1K 8 C4B7 55 - 30 SSHL4HC .MAC 1K 4 4D97 28 - 31 SSHL5DC .MAC 2K 14 6FBA 93 - 32 SSHLFDC .MAC 2K 13 C39D 82 - 33 SSKPUN .MAC 1K 8 A057 48 - 34 SSKSP .MAC 1K 8 490D 48 - 35 SSORT .MAC 14K 111 E332 564 - 36 SSOUT .MAC 1K 5 CA1A 39 - 37 SSPRINT .MAC 1K 4 42CC 26 - 38 SSPSTR .MAC 2K 14 9D1B 89 - 39 SSUA .MAC 1K 6 EA5F 47 - 40 SUD1 .MAC 1K 8 635C 74 - 41 SUD2 .MAC 1K 5 589A 50 - 42 SUD3 .MAC 1K 6 A69A 50 - 43 SVERSION.MAC 1K 5 F1A9 30 - 44 SYSLIB .REL 21K 161 2921 N/A - 45 SYSLIB27.REL 14K 107 1C54 N/A - 46 SYSTEST .MAC 4K 26 C997 129 - 47 SYSTEST0.MAC 4K 29 B39E 194 - 48 SYSTEST1.MAC 3K 21 5D8C 114 - 49 SYSTEST2.MAC 4K 30 9E05 151 - 50 SYSTEST3.MAC 4K 26 92EA 148 - 51 SYSTEST4.MAC 6K 46 02CE 244 - 52 SYSTEST5.MAC 2K 16 2DAF 98 - 53 SYSTEST6.MAC 5K 35 A9F5 211 - 54 SYSTEST7.MAC 5K 36 5138 233 - - SYSLIB3 HELP Disk 4 -- - Filename.Typ Size Recs CRC Lines - 1 SYS2-3 .TXT 9K 71 6B3B 239 - 2 SYSLIB .HLP 2K 9 8184 38 - 3 SYSLIB0 .HLP 14K 112 86FE 355 - 4 SYSLIB1 .HLP 20K 159 8FBB 588 - 5 SYSLIB2 .HLP 5K 33 6DD5 154 - 6 SYSLIB3 .HLP 15K 119 F85C 435 - 7 SYSLIB4 .HLP 12K 90 E7A6 390 - 8 SYSLIB5 .HLP 12K 90 F417 412 - 9 SYSLIB6 .HLP 8K 60 F45A 276 - 10 SYSLIB7 .HLP 6K 45 152C 266 - 11 SYSLIB8 .HLP 5K 37 3CA8 173 - 12 SYSLIB9 .HLP 3K 23 4292 82 - 13 SYSLIBA .HLP 7K 55 6442 192 - 14 SYSLIBB .HLP 5K 39 2009 126 - 15 SYSLIBC .HLP 9K 71 F96C 302 - 16 SYSLIBD .HLP 5K 33 489A 134 - 17 SYSLIBE .HLP 8K 62 55D3 232 - 18 SYSLIBF .HLP 4K 25 2A54 104 - 19 SYSLIBG .HLP 3K 21 EE4C 88 - 20 SYSLIBH .HLP 2K 14 6F02 67 - 21 SYSLIBI .HLP 6K 44 DC1E 158 - - - Z3-DOT-COM Disk 1 -- - (Copyright 1984 Alpha Systems Corporation) - Filename.Typ Size Recs CRC - 1 CPY .COM 2K 15 B43A - 2 ENV .SPR 2K 10 BA1F - 3 SYSFCP .SPR 1K 7 DBE6 - 4 SYSRCP .SPR 3K 20 BDBD - 5 VID .COM 2K 12 AF2F - 6 Z3 .INS 1K 1 E205 - 7 Z3BIO .SPR 1K 7 9FE6 - 8 Z3COM .SUB 1K 1 2899 - 9 Z3CPR .SPR 3K 20 2A87 - 10 Z3L .COM 2K 15 D40E - 11 Z3MOV .BIN 1K 1 D93B - - - diff --git a/Source/Images/d_bp/u15/Z3FILES.PH2 b/Source/Images/d_bp/u15/Z3FILES.PH2 deleted file mode 100644 index b43cc0ce..00000000 --- a/Source/Images/d_bp/u15/Z3FILES.PH2 +++ /dev/null @@ -1,266 +0,0 @@ -.po 7 -.cw 10 -.foZCPR3 File Distribution Page # - - - ZCPR3 Files Distributed by Echelon, Inc. - - -ZCPR3 Core Disk 1 -- - Filename.Typ Size Recs CRC - 1 ALIAS .COM 4K 30 669A 12 SYSRCP .ASM 44K 352 6315 - 2 CD .COM 1K 7 49C8 13 SYSRCP1 .LIB 11K 81 F030 - 3 CLEANDIR.COM 2K 12 ADAF 14 SYSRCP2 .LIB 11K 81 790C - 4 CMD .COM 1K 7 ED3B 15 SYSRCP3 .LIB 11K 81 52FB - 5 COMMENT .COM 1K 5 9629 16 SYSRCP4 .LIB 11K 81 871D - 6 DIR .COM 2K 16 BE35 17 TCCHECK .COM 2K 14 0578 - 7 ECHO .COM 1K 4 DB5A 18 TCMAKE .COM 6K 47 817E - 8 ERROR1 .COM 2K 12 E682 19 TCSELECT.COM 3K 22 694E - 9 ERROR2 .COM 3K 18 A088 20 VLIB .REL 2K 13 01A1 - 10 EX .COM 3K 20 8344 21 WHEEL .COM 2K 11 1B9A - 11 HELP .COM 3K 24 1847 22 XD .COM 4K 28 B251 - 12 LDR .COM 3K 21 FFC4 23 Z3INS .COM 2K 16 611D - 13 MENU .COM 4K 29 E81F 24 Z3LIB .REL 8K 61 8F30 - 14 MENUCK .COM 3K 20 4F74 25 Z3LOC .COM 1K 7 0001 - 15 MKDIR .COM 6K 41 49D9 26 Z3TCAP .ASM 27K 213 1B36 - 16 MLOAD .COM 2K 15 5BF0 27 Z3TCAP .TCP 8K 58 D2C1 - 17 MU3 .COM 3K 23 55BD 28 ZCPR3 .INS 2K 10 7557 - 18 PATH .COM 2K 10 653A - 19 PWD .COM 1K 8 5DA2 ZCPR3 Utilities COM Disk 1 -- - 20 RELS .UTL 2K 16 6BF8 Filename.Typ Size Recs CRC - 21 SHSET .COM 1K 7 4F00 1 ALIAS .COM 4K 30 82D4 - 22 SYSENV .ASM 1K 5 4C5C 2 CD .COM 1K 7 DA48 - 23 SYSENV .LIB 4K 26 CF64 3 CMDRUN .COM 1K 2 21B5 - 24 SYSIOP .ASM 32K 254 1DCD 4 COMMENT .COM 1K 5 3C4A - 25 SYSNDR .ASM 1K 3 3872 5 CPSEL .COM 1K 8 CCAA - 26 SYSNDR .LIB 2K 10 DA46 6 CRC .COM 6K 41 A89C - 27 VFILER .COM 11K 84 8923 7 DEV .COM 2K 14 F755 - 28 VMENU .COM 6K 46 A582 8 DEVICE .COM 3K 17 153E - 29 VMENUCK .COM 3K 21 9E17 9 DIFF .COM 4K 25 45A7 - 30 Z3BASE1 .LIB 9K 66 2C69 10 DIR .COM 2K 16 9B8A - 31 Z3BASE2 .LIB 8K 64 17AD 11 DISK7OCC.COM 4K 32 1A90 - 32 Z3HDR1 .LIB 19K 150 6B50 12 DU3 .COM 12K 89 D1BF -.he ZCPR3 File List - 33 Z3HDR2 .LIB 19K 150 2C19 13 ECHO .COM 1K 4 F2D6 - 34 ZCPR3 .ASM 66K 522 2857 14 ERASE .COM 3K 20 E71E - 35 ZCPR3 .INS 2K 10 7557 15 ERROR1 .COM 2K 12 5EB7 - 16 ERROR2 .COM 3K 18 2F03 -ZCPR3 Core Disk 2 -- 17 ERROR3 .COM 1K 5 8542 - Filename.Typ Size Recs CRC 18 ERROR4 .COM 1K 5 86D1 - 1 DISK7 .COM 4K 32 1A90 19 ERRORX .COM 1K 3 F941 - 2 DISK77B .DOC 6K 45 88BE 20 FINDF .COM 2K 14 48F6 - 3 PATH .COM 2K 10 653A 21 GOTO .COM 1K 6 6ADA - 4 PRINT .COM 6K 42 1214 22 HELP .COM 3K 24 928B - 5 SAK .COM 1K 7 8616 23 HELPCK .COM 2K 16 F3B3 - 6 SETFILE .COM 1K 4 28D4 24 HELPPR .COM 5K 35 12E7 - 7 SHOW .COM 8K 62 A876 25 IF .COM 3K 18 418D - 8 SYSFCP .ASM 18K 137 7012 26 IFSTAT .COM 1K 3 6586 - 9 SYSFCP1 .LIB 6K 43 C3BB 27 LDR .COM 3K 21 FFC4 - 10 SYSFCP2 .LIB 6K 43 2324 28 MCOPY .COM 5K 33 A9F4 - 11 SYSLIB .REL 21K 161 2921 29 MENU .COM 4K 29 E81F - - 30 MENUCK .COM 3K 20 3CDC ZCPR3 Utilities HELP Disk 3 -- - 31 MKDIR .COM 6K 41 49D9 Filename.Typ Size Recs CRC - 32 MU3 .COM 3K 23 55BD 1 CLEANDIR.COM 2K 12 ADAF - 33 NOTE .COM 1K 1 CB9E 2 CMD .COM 1K 7 ED3B - 34 PAGE .COM 5K 36 DF9F 3 DU3 .HLP 38K 300 B790 - 35 PATH .COM 2K 10 E421 4 MU3 .HLP 7K 50 20CF - 36 PRINT .COM 6K 42 0492 5 SHSET .COM 1K 7 4F00 - 37 PROTECT .COM 4K 28 A130 6 VFILER .HLP 21K 165 40BB - 38 PWD .COM 1K 8 2B9B 7 VMENU .COM 6K 46 A582 - 39 QUIET .COM 1K 4 DF6B 8 VMENU .HLP 32K 253 7DE7 - 40 RECORD .COM 1K 8 C2B4 9 VMENUCK .COM 3K 21 9E17 - 41 REG .COM 1K 8 1CC4 10 Z3RES .HLP 8K 64 800E - 42 RENAME .COM 4K 27 A2F2 11 Z3TCAP .HLP 40K 314 381F - 43 SAK .COM 1K 7 7842 12 Z3UTIL1 .HLP 30K 234 4B2D - 44 SETFILE .COM 1K 4 00B2 13 Z3UTIL2 .HLP 21K 166 D3E6 - 45 SH .COM 4K 28 A89E 14 Z3UTIL3 .HLP 7K 52 0A0F - 46 SHCTRL .COM 1K 7 E37A 15 ZCPR3 .HLP 4K 30 666E - 47 SHDEFINE.COM 3K 23 0DEA - 48 SHFILE .COM 1K 4 634F  ZCPR3 Utilities Source Disk 4 -- - 49 SHOW .COM 8K 62 808A Filename.Typ Size Recs CRC - 50 SHVAR .COM 3K 23 4D89 1 ALIAS .ZEX 2K 9 6DBE - 51 SUB .COM 3K 20 59E5 2 ALIAS0 .MAC 8K 63 5072 - 52 TCCHECK .COM 2K 14 7235 3 ALIAS1 .MAC 10K 75 DB42 - 53 TCMAKE .COM 6K 47 B3A0 4 CD .MAC 3K 22 4202 - 54 TCSELECT.COM 3K 22 F8DA 5 CMDRUN .MAC 1K 7 F21D - 55 UNERASE .COM 2K 13 030A 6 COMMENT .MAC 4K 28 FF64 - 56 VFILER .COM 11K 84 8923 7 CPSEL .MAC 7K 52 2669 - 57 WHEEL .COM 2K 11 0CD0 8 CRC .MAC 18K 141 15ED - 58 XD .COM 4K 28 465B 9 DEV .MAC 9K 71 D980 - 59 XDIR .COM 8K 62 7248 10 DEVICE .MAC 11K 84 6EED - 60 Z3INS .COM 2K 16 DFB7 11 DIFF .MAC 15K 115 B983 - 61 Z3LOC .COM 1K 7 E319 12 DIR .MAC 7K 54 2227 - 62 ZCPR3 .INS 2K 10 7557 13 ECHO .MAC 4K 28 824C - 63 ZEX .COM 6K 48 5E36 14 ERASE .MAC 10K 79 765E - 15 ERROR1 .MAC 8K 57 7BF1 -ZCPR3 Utilities HELP Disk 2 -- 16 ERROR2 .MAC 9K 66 DFF6 - Filename.Typ Size Recs CRC 17 ERROR3 .MAC 4K 27 85FA - 1 ALIAS .HLP 5K 35 9C58 18 ERROR4 .MAC 4K 31 D179 - 2 CMDFILES.HLP 24K 192 4475 19 ERRORX .MAC 2K 9 7F9C - 3 COMPARE .HLP 5K 33 26B6 20 FINDF .COM 2K 14 48F6 - 4 DEBUGRCP.ASM 28K 218 454D 21 GOTO .MAC 4K 27 4536 - 5 DIRS .HLP 21K 166 29F5 22 HELP51 .MAC 25K 196 73A1 - 6 DPROG .MAC 19K 148 F153 23 HELPCK .MAC 10K 77 A576 - 7 HELP .HLP 1K 7 54CD 24 HELPPR .MAC 28K 219 CFB6 - 8 HELPSYS .HLP 29K 230 99DA 25 IF .MAC 10K 77 F529 - 9 IF .HLP 13K 99 45A4 26 IFSTAT .MAC 2K 11 234E - 10 IO .HLP 12K 92 21E3 - 11 MENU .HLP 32K 253 9059  ZCPR3 Utilities Source Disk 5 -- - 12 NDIRS .HLP 16K 122 33D7 Filename.Typ Size Recs CRC - 13 READ .ME 1K 3 9089 1 LDR11 .MAC 13K 97 F1DA - 14 SH .HLP 13K 101 6646 2 MCOPY41 .MAC 22K 172 D935 - 15 SYSRCP .HLP 6K 48 F633 3 MENU34 .MAC 32K 253 56E5 - 16 ZCPR3 .HLP 4K 30 666E 4 MENUCK .MAC 11K 87 B04C - - - - 5 MKDIR31 .MAC 19K 145 AB4B  SYSLIB3 Source Disk 1 -- - 6 NOTE .MAC 1K 7 986F Filename.Typ Size Recs CRC - 7 PAGE .MAC 24K 187 AEFF 1 S0FILEIO.MAC 2K 12 6AA7 - 8 PATH .MAC 9K 69 7D6A 2 S1FILEIO.MAC 2K 12 29E9 - 9 PRINT .MAC 28K 219 A093 3 S2FILEIO.MAC 2K 12 EE8F - 10 PROTECT .MAC 13K 97 E175 4 S3FILEIO.MAC 2K 12 B0F6 - 11 PWD .MAC 5K 37 DF00 5 SALLOC .MAC 3K 22 F78F - 12 QUIET .MAC 3K 17 FA09 6 SBBLINE .MAC 3K 17 1D79 - 13 RECORD .MAC 4K 30 4EE7 7 SBDOS .MAC 1K 4 D833 - 14 REG .MAC 5K 37 401A 8 SBIN .MAC 1K 4 AC82 - 15 RENAME .MAC 13K 103 C4F5 9 SBIOS .MAC 3K 17 241E - 16 SAK .MAC 5K 38 62C2 10 SBIST .MAC 1K 4 3522 - 17 SHOW .MAC 31K 247 8770 11 SBLINE .MAC 3K 21 1871 - 12 SBOUT .MAC 1K 4 4DF6 -ZCPR3 Utilities Source Disk 6 -- 13 SCAPIN .MAC 1K 4 DF2E - Filename.Typ Size Recs CRC 14 SCAPS .MAC 1K 4 22F3 - 1 SETFILE .MAC 2K 16 73D5 15 SCAPSTR .MAC 1K 5 FCEA - 2 SH .MAC 16K 125 768D 16 SCATH .MAC 1K 5 A665 - 3 SHCTRL .MAC 3K 21 CAE6 17 SCCOUT .MAC 2K 9 A488 - 4 SHDEFINE.MAC 11K 87 396F 18 SCIN .MAC 1K 7 47D4 - 5 SHFILE .MAC 2K 15 3417 19 SCLINE .MAC 2K 11 583E - 6 SHVAR .MAC 11K 88 6B60 20 SCLOUT .MAC 2K 9 2A8B - 7 SUB31 .MAC 24K 187 945E 21 SCODEND .MAC 1K 8 4F9C - 8 TCCHECK .MAC 5K 40 7079 22 SCOMP .MAC 2K 10 C619 - 9 TCMAKE .MAC 19K 148 A0C7 23 SCOMPHD .MAC 1K 4 67BE - 10 TCSELECT.MAC 11K 87 927E 24 SCONDIN .MAC 1K 6 6666 - 11 UNERASE .MAC 14K 111 41BF 25 SCOUT .MAC 1K 7 0A76 - 12 WHEEL .MAC 4K 32 FFCF 26 SCPOUT .MAC 2K 9 F3B0 - 13 XD .MAC 18K 144 B1B2 27 SCRC .MAC 3K 24 9649 - 14 XDIR .MAC 38K 304 8B4B 28 SCRC1 .MAC 3K 24 7A5D - 15 Z3INS .MAC 10K 80 7F27 29 SCRC2 .MAC 3K 23 E929 - 16 Z3LOC11 .MAC 4K 32 7C65 30 SCRLF .MAC 1K 6 6CD3 - 17 ZEX .ASM 45K 360 48BD 31 SCST .MAC 1K 7 B601 - 18 ZEX .ZEX 4K 32 782C 32 SDIR .MAC 2K 15 D2C8 - 33 SDIR00 .MAC 2K 15 D5BC -ZCPR3 Utilities Doc Disk 7 -- 34 SDIR01 .MAC 2K 12 C259 - Filename.Typ Size Recs CRC 35 SDIR02 .MAC 3K 17 5193 - 1 Z3INS .IDX 4K 32 6044 36 SDIR03 .MAC 3K 17 D263 - 2 Z3INS .SI 31K 241 836B 37 SDIR04 .MAC 2K 11 5228 - 3 Z3INS .TOC 13K 101 D54E 38 SDIR05 .MAC 7K 56 754A - 4 Z3INS1 .SI 11K 85 30E0 39 SDIR06 .MAC 10K 79 D1DF - 5 Z3INS2 .SI 11K 88 2800 40 SDIR07 .MAC 3K 17 4FA3 - 6 Z3INS3 .SI 55K 439 FCCF 41 SDIR08 .MAC 2K 12 4F2F - 7 Z3INS4 .SI 28K 224 16D3 42 SDIR09 .MAC 2K 14 75BA - 8 Z3INS5 .SI 5K 39 984C 43 SDIR10 .MAC 2K 13 3DE7 - 9 Z3INS6 .SI 33K 259 D8A1 44 SDIRBF .MAC 1K 5 F2DC - 10 Z3INS7 .SI 2K 12 F0A3 45 SDIRQ .MAC 17K 136 6004 - 11 Z3INS8 .SI 5K 34 EB11 46 SDIRQS .MAC 20K 155 51F3 - 47 SEN .MAC 1K 3 F9CF -ZCPR3 Utilities Doc Disk 8 -- 48 SEPRINT .MAC 1K 5 2A31 - Filename.Typ Size Recs CRC 49 SEPSTR .MAC 2K 15 68B3 - 1 Z3USER .IDX 1K 3 9F34 50 SEVAL .MAC 4K 25 13D5 - 2 Z3USER .SI 54K 428 7D58 51 SEVAL1 .MAC 2K 9 782D - 3 Z3USER .TOC 1K 6 1810 52 SEVAL2 .MAC 2K 11 1BDC - 53 SEVAL3 .MAC 2K 10 BD45 - 54 SEVAL4 .MAC 2K 9 10A5 46 SMTH02 .MAC 1K 5 47EC - 55 SFCLOS .MAC 1K 4 710C 47 SMTH03 .MAC 1K 4 8800 - 56 SFDEL .MAC 1K 4 BB5B 48 SMTH04 .MAC 1K 4 FAD3 - 57 SFEXIST .MAC 1K 5 2C94 49 SMTH05 .MAC 1K 5 41F7 - 58 SFILEIO .MAC 9K 72 4F9C 50 SMTH06 .MAC 1K 5 9661 - 59 SFILL .MAC 2K 10 A547 51 SMTH07 .MAC 1K 3 78BD - 60 SFMAKE .MAC 1K 5 5A73 52 SMTH08 .MAC 1K 3 AD88 - 53 SMTH09 .MAC 1K 3 3EC8 -SYSLIB3 Source Disk 2 -- 54 SMTH10 .MAC 1K 4 729D - Filename.Typ Size Recs CRC 55 SMTH11 .MAC 2K 13 7150 - 1 SFNAME .MAC 5K 39 EB46 56 SMTH12 .MAC 2K 13 E277 - 2 SFOPEN .MAC 2K 10 6B08 - 3 SFREAD .MAC 1K 4 3E4E  SYSLIB3 REL and Source Disk 3 -- - 4 SFRENAME.MAC 2K 12 6A58 Filename.Typ Size Recs CRC - 5 SFSIZE .MAC 2K 12 DCDF 1 SPA2HC .MAC 1K 6 FD07 - 6 SFWRIT .MAC 1K 4 67E3 2 SPADC .MAC 2K 11 35AA - 7 SFXIO .MAC 9K 65 7928 3 SPAFDC .MAC 2K 10 8746 - 8 SGFA .MAC 3K 20 DDA9 4 SPAUSE .MAC 3K 23 A2B8 - 9 SGUA .MAC 1K 5 C628 5 SPFN1 .MAC 1K 6 5BD1 - 10 SINITFCB.MAC 1K 8 FFE8 6 SPFN2 .MAC 1K 6 6756 - 11 SINLINE .MAC 6K 44 4103 7 SPFN3 .MAC 1K 8 B9E6 - 12 SINSTR .MAC 2K 12 3077 8 SPHL4HC .MAC 1K 4 3F9B - 13 SISALNUM.MAC 1K 6 2867 9 SPHL5DC .MAC 2K 14 D706 - 14 SISALPHA.MAC 1K 6 02B4 10 SPHLFDC .MAC 2K 12 A7C8 - 15 SISCTRL .MAC 1K 6 533C 11 SPOUT .MAC 1K 7 915C - 16 SISDIGIT.MAC 1K 6 EDAB 12 SPRINT .MAC 1K 4 A2A3 - 17 SISGRAPH.MAC 1K 6 EEF8 13 SPSTR .MAC 2K 14 A7FD - 18 SISHEX .MAC 1K 6 1958 14 SRAND .MAC 2K 13 476E - 19 SISPRINT.MAC 1K 6 EC30 15 SRIN .MAC 1K 7 1844 - 20 SISPUN .MAC 2K 9 0F59 16 SRREAD .MAC 2K 9 F01A - 21 SISSP .MAC 1K 8 7B4B 17 SRWRITE .MAC 2K 9 35C7 - 22 SLA2HC .MAC 1K 6 70AD 18 SSA2HC .MAC 1K 6 6057 - 23 SLADC .MAC 2K 11 72AE 19 SSADC .MAC 2K 11 1A64 - 24 SLAFDC .MAC 2K 10 843B 20 SSAFDC .MAC 2K 10 B9F3 - 25 SLCRLF .MAC 1K 6 A98A 21 SSCANNER.MAC 2K 12 C2D3 - 26 SLFN1 .MAC 1K 6 A6FF 22 SSCFA .MAC 2K 16 E939 - 27 SLFN2 .MAC 1K 6 82BC 23 SSCOUT .MAC 1K 6 0636 - 28 SLFN3 .MAC 1K 8 658E 24 SSCRLF .MAC 1K 5 6327 - 29 SLHL4HC .MAC 1K 4 DBC3 25 SSCTLFL .MAC 1K 4 D7AB - 30 SLHL5DC .MAC 2K 14 7961 26 SSFA .MAC 2K 16 9FAC - 31 SLHLFDC .MAC 2K 12 2F66 27 SSFN1 .MAC 1K 6 A43E - 32 SLOUT .MAC 1K 7 4084 28 SSFN2 .MAC 1K 6 0E8D - 33 SLPRINT .MAC 1K 4 67D0 29 SSFN3 .MAC 1K 8 C4B7 - 34 SLPSTR .MAC 2K 14 65D7 30 SSHL4HC .MAC 1K 4 4D97 - 35 SMA2HC .MAC 1K 8 0DC7 31 SSHL5DC .MAC 2K 14 6FBA - 36 SMADC .MAC 2K 14 016F 32 SSHLFDC .MAC 2K 13 C39D - 37 SMAFDC .MAC 2K 12 BEC3 33 SSKPUN .MAC 1K 8 A057 - 38 SMFN1 .MAC 1K 6 3A43 34 SSKSP .MAC 1K 8 490D - 39 SMFN2 .MAC 1K 6 C23B 35 SSORT .MAC 14K 111 E332 - 40 SMFN3 .MAC 1K 8 002A 36 SSOUT .MAC 1K 5 CA1A - 41 SMHL4HC .MAC 1K 5 9C15 37 SSPRINT .MAC 1K 4 42CC - 42 SMHL5DC .MAC 3K 19 F0F5 38 SSPSTR .MAC 2K 14 9D1B - 43 SMHLFDC .MAC 2K 16 1C5D 39 SSUA .MAC 1K 6 EA5F - 44 SMOVE .MAC 3K 19 67FF 40 SUD1 .MAC 1K 8 635C - 45 SMTH01 .MAC 1K 4 FD05 41 SUD2 .MAC 1K 5 589A - - 42 SUD3 .MAC 1K 6 A69A - 43 SVERSION.MAC 1K 5 F1A9 - 44 SYSLIB .REL 21K 161 2921 - 45 SYSLIB27.REL 14K 107 1C54 - 46 SYSTEST .MAC 4K 26 C997 - 47 SYSTEST0.MAC 4K 29 B39E - 48 SYSTEST1.MAC 3K 21 5D8C - 49 SYSTEST2.MAC 4K 30 9E05 - 50 SYSTEST3.MAC 4K 26 92EA - 51 SYSTEST4.MAC 6K 46 02CE - 52 SYSTEST5.MAC 2K 16 2DAF - 53 SYSTEST6.MAC 5K 35 A9F5 - 54 SYSTEST7.MAC 5K 36 5138 - -SYSLIB3 HELP Disk 4 -- - Filename.Typ Size Recs CRC - 1 SYS2-3 .TXT 9K 71 6B3B - 2 SYSLIB .HLP 2K 9 8184 - 3 SYSLIB0 .HLP 14K 112 86FE - 4 SYSLIB1 .HLP 20K 159 8FBB - 5 SYSLIB2 .HLP 5K 33 6DD5 - 6 SYSLIB3 .HLP 15K 119 F85C - 7 SYSLIB4 .HLP 12K 90 E7A6 - 8 SYSLIB5 .HLP 12K 90 F417 - 9 SYSLIB6 .HLP 8K 60 F45A - 10 SYSLIB7 .HLP 6K 45 152C - 11 SYSLIB8 .HLP 5K 37 3CA8 - 12 SYSLIB9 .HLP 3K 23 4292 - 13 SYSLIBA .HLP 7K 55 6442 - 14 SYSLIBB .HLP 5K 39 2009 - 15 SYSLIBC .HLP 9K 71 F96C - 16 SYSLIBD .HLP 5K 33 489A - 17 SYSLIBE .HLP 8K 62 55D3 - 18 SYSLIBF .HLP 4K 25 2A54 - 19 SYSLIBG .HLP 3K 21 EE4C - 20 SYSLIBH .HLP 2K 14 6F02 - 21 SYSLIBI .HLP 6K 44 DC1E - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3FILES.PQ2 b/Source/Images/d_bp/u15/Z3FILES.PQ2 deleted file mode 100644 index 185f9777..00000000 Binary files a/Source/Images/d_bp/u15/Z3FILES.PQ2 and /dev/null differ diff --git a/Source/Images/d_bp/u15/Z3FILES2.PH2 b/Source/Images/d_bp/u15/Z3FILES2.PH2 deleted file mode 100644 index f4c4b69f..00000000 --- a/Source/Images/d_bp/u15/Z3FILES2.PH2 +++ /dev/null @@ -1,266 +0,0 @@ -.po 7 -.cw 10 -.foZCPR3 File Distribution Page # - - - ZCPR3 Files Distributed by Echelon, Inc. - (Phase2 Plus) - -ZCPR3 Core Disk 1 -- - Filename.Typ Size Recs CRC - 1 ALIAS .COM 4K 30 669A 12 SYSRCP .ASM 44K 352 6315 - 2 CD .COM 1K 7 49C8 13 SYSRCP1 .LIB 11K 81 F030 - 3 CLEANDIR.COM 2K 12 ADAF 14 SYSRCP2 .LIB 11K 81 790C - 4 CMD .COM 1K 7 ED3B 15 SYSRCP3 .LIB 11K 81 52FB - 5 COMMENT .COM 1K 5 9629 16 SYSRCP4 .LIB 11K 81 871D - 6 DIR .COM 2K 16 BE35 17 TCCHECK .COM 2K 14 0578 - 7 ECHO .COM 1K 4 DB5A 18 TCMAKE .COM 6K 47 817E - 8 ERROR1 .COM 2K 12 E682 19 TCSELECT.COM 3K 22 F8DA - 9 ERROR2 .COM 3K 18 A088 20 VLIB .REL 2K 13 01A1 - 10 EX .COM 3K 20 8344 21 WHEEL .COM 2K 11 1B9A - 11 HELP .COM 3K 24 4F74 22 XD .COM 4K 28 B251 - 12 LDR .COM 3K 21 FFC4 23 Z3INS .COM 2K 16 611D - 13 MENU .COM 4K 29 E81F 24 Z3LIB .REL 8K 61 8F30 - 14 MENUCK .COM 3K 20 4F74 25 Z3LOC .COM 1K 7 0001 - 15 MKDIR .COM 6K 41 49D9 26 Z3TCAP .ASM 29K 225 DCED - 16 MLOAD .COM 2K 15 5BF0 27 Z3TCAP .TCP 8K 61 4E9F - 17 MU3 .COM 3K 23 55BD 28 ZCPR3 .INS 2K 10 7557 - 18 PATH .COM 2K 10 653A - 19 PWD .COM 1K 8 5DA2 ZCPR3 Utilities COM Disk 1 -- - 20 RELS .UTL 2K 16 6BF8 Filename.Typ Size Recs CRC - 21 SHSET .COM 1K 7 4F00 1 ALIAS .COM 4K 30 82D4 - 22 SYSENV .ASM 1K 5 4C5C 2 CD .COM 1K 7 DA48 - 23 SYSENV .LIB 4K 26 CF64 3 CMDRUN .COM 1K 2 21B5 - 24 SYSIOP .ASM 32K 254 1DCD 4 COMMENT .COM 1K 5 3C4A - 25 SYSNDR .ASM 1K 3 3872 5 CPSEL .COM 1K 8 CCAA - 26 SYSNDR .LIB 2K 10 DA46 6 CRC .COM 6K 41 A89C - 27 VFILER .COM 11K 84 8923 7 DEV .COM 2K 14 F755 - 28 VMENU .COM 6K 46 A582 8 DEVICE .COM 3K 17 153E - 29 VMENUCK .COM 3K 21 9E17 9 DIFF .COM 4K 25 45A7 - 30 Z3BASE1 .LIB 9K 66 2C69 10 DIR .COM 2K 16 9B8A - 31 Z3BASE2 .LIB 8K 64 17AD 11 DISK7OCC.COM 4K 32 1A90 - 32 Z3HDR1 .LIB 19K 150 6B50 12 DU3 .COM 11K 87 A0CE -.he ZCPR3 File List - 33 Z3HDR2 .LIB 19K 150 2C19 13 ECHO .COM 1K 4 F2D6 - 34 ZCPR3 .ASM 66K 522 2857 14 ERASE .COM 3K 20 E71E - 35 ZCPR3 .INS 2K 10 7557 15 ERROR1 .COM 2K 12 5EB7 - 16 ERROR2 .COM 3K 18 2F03 -ZCPR3 Core Disk 2 -- 17 ERROR3 .COM 1K 5 8542 - Filename.Typ Size Recs CRC 18 ERROR4 .COM 1K 5 86D1 - 1 DISK7 .COM 4K 32 1A90 19 ERRORX .COM 1K 3 F941 - 2 DISK77B .DOC 6K 45 88BE 20 FINDF .COM 2K 14 48F6 - 3 PATH .COM 2K 10 653A 21 GOTO .COM 1K 6 6ADA - 4 PRINT .COM 6K 42 1214 22 HELP .COM 3K 24 4F76 - 5 SAK .COM 1K 7 8616 23 HELPCK .COM 2K 16 F3B3 - 6 SETFILE .COM 1K 4 28D4 24 HELPPR .COM 5K 35 12E7 - 7 SHOW .COM 8K 62 A876 25 IF .COM 3K 18 418D - 8 SYSFCP .ASM 18K 137 7012 26 IFSTAT .COM 1K 3 6586 - 9 SYSFCP1 .LIB 6K 43 C3BB 27 LDR .COM 3K 21 FFC4 - 10 SYSFCP2 .LIB 6K 43 2324 28 MCOPY .COM 5K 33 A9F4 - 11 SYSLIB .REL 21K 161 2921 29 MENU .COM 4K 29 E81F - - 30 MENUCK .COM 3K 20 3CDC ZCPR3 Utilities HELP Disk 3 -- - 31 MKDIR .COM 6K 41 49D9 Filename.Typ Size Recs CRC - 32 MU3 .COM 3K 23 55BD 1 CLEANDIR.COM 2K 12 ADAF - 33 NOTE .COM 1K 1 CB9E 2 CMD .COM 1K 7 ED3B - 34 PAGE .COM 5K 36 DF9F 3 DU3 .HLP 38K 300 B790 - 35 PATH .COM 2K 10 E421 4 MU3 .HLP 7K 50 20CF - 36 PRINT .COM 6K 42 0492 5 SHSET .COM 1K 7 4F00 - 37 PROTECT .COM 4K 28 A130 6 VFILER .HLP 21K 165 40BB - 38 PWD .COM 1K 8 2B9B 7 VMENU .COM 6K 46 A582 - 39 QUIET .COM 1K 4 DF6B 8 VMENU .HLP 32K 253 7DE7 - 40 RECORD .COM 1K 8 C2B4 9 VMENUCK .COM 3K 21 9E17 - 41 REG .COM 1K 8 1CC4 10 Z3RES .HLP 8K 64 800E - 42 RENAME .COM 4K 27 A2F2 11 Z3TCAP .HLP 40K 314 381F - 43 SAK .COM 1K 7 7842 12 Z3UTIL1 .HLP 30K 234 4B2D - 44 SETFILE .COM 1K 4 00B2 13 Z3UTIL2 .HLP 21K 166 D3E6 - 45 SH .COM 4K 28 A89E 14 Z3UTIL3 .HLP 7K 52 0A0F - 46 SHCTRL .COM 1K 7 E37A 15 ZCPR3 .HLP 4K 30 666E - 47 SHDEFINE.COM 3K 23 0DEA - 48 SHFILE .COM 1K 4 634F  ZCPR3 Utilities Source Disk 4 -- - 49 SHOW .COM 8K 62 808A Filename.Typ Size Recs CRC - 50 SHVAR .COM 3K 23 4D89 1 ALIAS .ZEX 2K 9 6DBE - 51 SUB .COM 3K 20 59E5 2 ALIAS0 .MAC 8K 63 5072 - 52 TCCHECK .COM 2K 14 7235 3 ALIAS1 .MAC 10K 75 DB42 - 53 TCMAKE .COM 6K 47 B3A0 4 CD .MAC 3K 22 4202 - 54 TCSELECT.COM 3K 22 F8DA 5 CMDRUN .MAC 1K 7 F21D - 55 UNERASE .COM 2K 13 030A 6 COMMENT .MAC 4K 28 FF64 - 56 VFILER .COM 11K 84 8923 7 CPSEL .MAC 7K 52 2669 - 57 WHEEL .COM 2K 11 0CD0 8 CRC .MAC 18K 141 15ED - 58 XD .COM 4K 28 465B 9 DEV .MAC 9K 71 D980 - 59 XDIR .COM 8K 62 7248 10 DEVICE .MAC 11K 84 6EED - 60 Z3INS .COM 2K 16 DFB7 11 DIFF .MAC 15K 115 B983 - 61 Z3LOC .COM 1K 7 E319 12 DIR .MAC 7K 54 2227 - 62 ZCPR3 .INS 2K 10 7557 13 ECHO .MAC 4K 28 824C - 63 ZEX .COM 5K 39 0F87 14 ERASE .MAC 10K 79 765E - 15 ERROR1 .MAC 8K 57 7BF1 -ZCPR3 Utilities HELP Disk 2 -- 16 ERROR2 .MAC 9K 66 DFF6 - Filename.Typ Size Recs CRC 17 ERROR3 .MAC 4K 27 85FA - 1 ALIAS .HLP 5K 35 9C58 18 ERROR4 .MAC 4K 31 D179 - 2 CMDFILES.HLP 24K 192 4475 19 ERRORX .MAC 2K 9 7F9C - 3 COMPARE .HLP 5K 33 26B6 20 FINDF .COM 2K 14 48F6 - 4 DEBUGRCP.ASM 28K 218 454D 21 GOTO .MAC 4K 27 4536 - 5 DIRS .HLP 21K 166 29F5 22 HELP52 .MAC 26K 202 B87D - 6 DPROG11 .MAC 20K 155 6E2F 23 HELPCK .MAC 10K 77 A576 - 7 HELP .HLP 1K 7 54CD 24 HELPPR .MAC 28K 219 CFB6 - 8 HELPSYS .HLP 29K 230 99DA 25 IF .MAC 10K 77 F529 - 9 IF .HLP 13K 99 45A4 26 IFSTAT .MAC 2K 11 234E - 10 IO .HLP 12K 92 21E3 - 11 MENU .HLP 32K 253 9059  ZCPR3 Utilities Source Disk 5 -- - 12 NDIRS .HLP 16K 122 33D7 Filename.Typ Size Recs CRC - 13 READ .ME 1K 3 9089 1 LDR11 .MAC 13K 97 F1DA - 14 SH .HLP 13K 101 6646 2 MCOPY41 .MAC 22K 172 D935 - 15 SYSRCP .HLP 6K 48 F633 3 MENU34 .MAC 32K 253 56E5 - 16 ZCPR3 .HLP 4K 30 666E 4 MENUCK .MAC 11K 87 B04C - 5A DPROG .HLP 9K 69 D5AE - - - 5 MKDIR31 .MAC 19K 145 AB4B  SYSLIB3 Source Disk 1 -- - 6 NOTE .MAC 1K 7 986F Filename.Typ Size Recs CRC - 7 PAGE .MAC 24K 187 AEFF 1 S0FILEIO.MAC 2K 12 6AA7 - 8 PATH .MAC 9K 69 7D6A 2 S1FILEIO.MAC 2K 12 29E9 - 9 PRINT .MAC 28K 219 A093 3 S2FILEIO.MAC 2K 12 EE8F - 10 PROTECT .MAC 13K 97 E175 4 S3FILEIO.MAC 2K 12 B0F6 - 11 PWD .MAC 5K 37 DF00 5 SALLOC .MAC 3K 22 F78F - 12 QUIET .MAC 3K 17 FA09 6 SBBLINE .MAC 3K 17 1D79 - 13 RECORD .MAC 4K 30 4EE7 7 SBDOS .MAC 1K 4 D833 - 14 REG .MAC 5K 37 401A 8 SBIN .MAC 1K 4 AC82 - 15 RENAME .MAC 13K 103 C4F5 9 SBIOS .MAC 3K 17 241E - 16 SAK .MAC 5K 38 62C2 10 SBIST .MAC 1K 4 3522 - 17 SHOW .MAC 31K 247 8770 11 SBLINE .MAC 3K 21 1871 - 12 SBOUT .MAC 1K 4 4DF6 -ZCPR3 Utilities Source Disk 6 -- 13 SCAPIN .MAC 1K 4 DF2E - Filename.Typ Size Recs CRC 14 SCAPS .MAC 1K 4 22F3 - 1 SETFILE .MAC 2K 16 73D5 15 SCAPSTR .MAC 1K 5 FCEA - 2 SH .MAC 16K 125 768D 16 SCATH .MAC 1K 5 A665 - 3 SHCTRL .MAC 3K 21 CAE6 17 SCCOUT .MAC 2K 9 A488 - 4 SHDEFINE.MAC 11K 87 396F 18 SCIN .MAC 1K 7 47D4 - 5 SHFILE .MAC 2K 15 3417 19 SCLINE .MAC 2K 11 583E - 6 SHVAR .MAC 11K 88 6B60 20 SCLOUT .MAC 2K 9 2A8B - 7 SUB31 .MAC 24K 187 945E 21 SCODEND .MAC 1K 8 4F9C - 8 TCCHECK .MAC 5K 40 7079 22 SCOMP .MAC 2K 10 C619 - 9 TCMAKE .MAC 19K 148 A0C7 23 SCOMPHD .MAC 1K 4 67BE - 10 TCSELECT.MAC 11K 87 927E 24 SCONDIN .MAC 1K 6 6666 - 11 UNERASE .MAC 14K 111 41BF 25 SCOUT .MAC 1K 7 0A76 - 12 WHEEL .MAC 4K 32 FFCF 26 SCPOUT .MAC 2K 9 F3B0 - 13 XD .MAC 18K 144 B1B2 27 SCRC .MAC 3K 24 9649 - 14 XDIR .MAC 38K 304 8B4B 28 SCRC1 .MAC 3K 24 7A5D - 15 Z3INS .MAC 10K 80 7F27 29 SCRC2 .MAC 3K 23 E929 - 16 Z3LOC11 .MAC 4K 32 7C65 30 SCRLF .MAC 1K 6 6CD3 - 17 ZEX31 .ASM 46K 368 4E2C 31 SCST .MAC 1K 7 B601 - 32 SDIR .MAC 2K 15 D2C8 - 33 SDIR00 .MAC 2K 15 D5BC -ZCPR3 Utilities Doc Disk 7 -- 34 SDIR01 .MAC 2K 12 C259 - Filename.Typ Size Recs CRC 35 SDIR02 .MAC 3K 17 5193 - 1 Z3INS .IDX 4K 32 6044 36 SDIR03 .MAC 3K 17 D263 - 2 Z3INS .SI 31K 241 836B 37 SDIR04 .MAC 2K 11 5228 - 3 Z3INS .TOC 13K 101 D54E 38 SDIR05 .MAC 7K 56 754A - 4 Z3INS1 .SI 11K 85 30E0 39 SDIR06 .MAC 10K 79 D1DF - 5 Z3INS2 .SI 11K 88 2800 40 SDIR07 .MAC 3K 17 4FA3 - 6 Z3INS3 .SI 55K 439 FCCF 41 SDIR08 .MAC 2K 12 4F2F - 7 Z3INS4 .SI 28K 224 16D3 42 SDIR09 .MAC 2K 14 75BA - 8 Z3INS5 .SI 5K 39 984C 43 SDIR10 .MAC 2K 13 3DE7 - 9 Z3INS6 .SI 33K 259 D8A1 44 SDIRBF .MAC 1K 5 F2DC - 10 Z3INS7 .SI 2K 12 F0A3 45 SDIRQ .MAC 17K 136 6004 - 11 Z3INS8 .SI 5K 34 EB11 46 SDIRQS .MAC 20K 155 51F3 - 47 SEN .MAC 1K 3 F9CF -ZCPR3 Utilities Doc Disk 8 -- 48 SEPRINT .MAC 1K 5 2A31 - Filename.Typ Size Recs CRC 49 SEPSTR .MAC 2K 15 68B3 - 1 Z3USER .IDX 1K 3 9F34 50 SEVAL .MAC 4K 25 13D5 - 2 Z3USER .SI 54K 428 7D58 51 SEVAL1 .MAC 2K 9 782D - 3 Z3USER .TOC 1K 6 1810 52 SEVAL2 .MAC 2K 11 1BDC - 4 ZEX .ZEX 4K 32 782C 53 SEVAL3 .MAC 2K 10 BD45 - 54 SEVAL4 .MAC 2K 9 10A5 46 SMTH02 .MAC 1K 5 47EC - 55 SFCLOS .MAC 1K 4 710C 47 SMTH03 .MAC 1K 4 8800 - 56 SFDEL .MAC 1K 4 BB5B 48 SMTH04 .MAC 1K 4 FAD3 - 57 SFEXIST .MAC 1K 5 2C94 49 SMTH05 .MAC 1K 5 41F7 - 58 SFILEIO .MAC 9K 72 4F9C 50 SMTH06 .MAC 1K 5 9661 - 59 SFILL .MAC 2K 10 A547 51 SMTH07 .MAC 1K 3 78BD - 60 SFMAKE .MAC 1K 5 5A73 52 SMTH08 .MAC 1K 3 AD88 - 53 SMTH09 .MAC 1K 3 3EC8 -SYSLIB3 Source Disk 2 -- 54 SMTH10 .MAC 1K 4 729D - Filename.Typ Size Recs CRC 55 SMTH11 .MAC 2K 13 7150 - 1 SFNAME .MAC 5K 39 EB46 56 SMTH12 .MAC 2K 13 E277 - 2 SFOPEN .MAC 2K 10 6B08 - 3 SFREAD .MAC 1K 4 3E4E  SYSLIB3 REL and Source Disk 3 -- - 4 SFRENAME.MAC 2K 12 6A58 Filename.Typ Size Recs CRC - 5 SFSIZE .MAC 2K 12 DCDF 1 SPA2HC .MAC 1K 6 FD07 - 6 SFWRIT .MAC 1K 4 67E3 2 SPADC .MAC 2K 11 35AA - 7 SFXIO .MAC 9K 65 7928 3 SPAFDC .MAC 2K 10 8746 - 8 SGFA .MAC 3K 20 DDA9 4 SPAUSE .MAC 3K 23 A2B8 - 9 SGUA .MAC 1K 5 C628 5 SPFN1 .MAC 1K 6 5BD1 - 10 SINITFCB.MAC 1K 8 FFE8 6 SPFN2 .MAC 1K 6 6756 - 11 SINLINE .MAC 6K 44 4103 7 SPFN3 .MAC 1K 8 B9E6 - 12 SINSTR .MAC 2K 12 3077 8 SPHL4HC .MAC 1K 4 3F9B - 13 SISALNUM.MAC 1K 6 2867 9 SPHL5DC .MAC 2K 14 D706 - 14 SISALPHA.MAC 1K 6 02B4 10 SPHLFDC .MAC 2K 12 A7C8 - 15 SISCTRL .MAC 1K 6 533C 11 SPOUT .MAC 1K 7 915C - 16 SISDIGIT.MAC 1K 6 EDAB 12 SPRINT .MAC 1K 4 A2A3 - 17 SISGRAPH.MAC 1K 6 EEF8 13 SPSTR .MAC 2K 14 A7FD - 18 SISHEX .MAC 1K 6 1958 14 SRAND .MAC 2K 13 476E - 19 SISPRINT.MAC 1K 6 EC30 15 SRIN .MAC 1K 7 1844 - 20 SISPUN .MAC 2K 9 0F59 16 SRREAD .MAC 2K 9 F01A - 21 SISSP .MAC 1K 8 7B4B 17 SRWRITE .MAC 2K 9 35C7 - 22 SLA2HC .MAC 1K 6 70AD 18 SSA2HC .MAC 1K 6 6057 - 23 SLADC .MAC 2K 11 72AE 19 SSADC .MAC 2K 11 1A64 - 24 SLAFDC .MAC 2K 10 843B 20 SSAFDC .MAC 2K 10 B9F3 - 25 SLCRLF .MAC 1K 6 A98A 21 SSCANNER.MAC 2K 12 C2D3 - 26 SLFN1 .MAC 1K 6 A6FF 22 SSCFA .MAC 2K 16 E939 - 27 SLFN2 .MAC 1K 6 82BC 23 SSCOUT .MAC 1K 6 0636 - 28 SLFN3 .MAC 1K 8 658E 24 SSCRLF .MAC 1K 5 6327 - 29 SLHL4HC .MAC 1K 4 DBC3 25 SSCTLFL .MAC 1K 4 D7AB - 30 SLHL5DC .MAC 2K 14 7961 26 SSFA .MAC 2K 16 9FAC - 31 SLHLFDC .MAC 2K 12 2F66 27 SSFN1 .MAC 1K 6 A43E - 32 SLOUT .MAC 1K 7 4084 28 SSFN2 .MAC 1K 6 0E8D - 33 SLPRINT .MAC 1K 4 67D0 29 SSFN3 .MAC 1K 8 C4B7 - 34 SLPSTR .MAC 2K 14 65D7 30 SSHL4HC .MAC 1K 4 4D97 - 35 SMA2HC .MAC 1K 8 0DC7 31 SSHL5DC .MAC 2K 14 6FBA - 36 SMADC .MAC 2K 14 016F 32 SSHLFDC .MAC 2K 13 C39D - 37 SMAFDC .MAC 2K 12 BEC3 33 SSKPUN .MAC 1K 8 A057 - 38 SMFN1 .MAC 1K 6 3A43 34 SSKSP .MAC 1K 8 490D - 39 SMFN2 .MAC 1K 6 C23B 35 SSORT .MAC 14K 111 E332 - 40 SMFN3 .MAC 1K 8 002A 36 SSOUT .MAC 1K 5 CA1A - 41 SMHL4HC .MAC 1K 5 9C15 37 SSPRINT .MAC 1K 4 42CC - 42 SMHL5DC .MAC 3K 19 F0F5 38 SSPSTR .MAC 2K 14 9D1B - 43 SMHLFDC .MAC 2K 16 1C5D 39 SSUA .MAC 1K 6 EA5F - 44 SMOVE .MAC 3K 19 67FF 40 SUD1 .MAC 1K 8 635C - 45 SMTH01 .MAC 1K 4 FD05 41 SUD2 .MAC 1K 5 589A - - 42 SUD3 .MAC 1K 6 A69A - 43 SVERSION.MAC 1K 5 F1A9 - 44 SYSLIB .REL 21K 161 2921 - 45 SYSLIB27.REL 14K 107 1C54 - 46 SYSTEST .MAC 4K 26 C997 - 47 SYSTEST0.MAC 4K 29 B39E - 48 SYSTEST1.MAC 3K 21 5D8C - 49 SYSTEST2.MAC 4K 30 9E05 - 50 SYSTEST3.MAC 4K 26 92EA - 51 SYSTEST4.MAC 6K 46 02CE - 52 SYSTEST5.MAC 2K 16 2DAF - 53 SYSTEST6.MAC 5K 35 A9F5 - 54 SYSTEST7.MAC 5K 36 5138 - -SYSLIB3 HELP Disk 4 -- - Filename.Typ Size Recs CRC - 1 SYS2-3 .TXT 9K 71 6B3B - 2 SYSLIB .HLP 2K 9 8184 - 3 SYSLIB0 .HLP 14K 112 86FE - 4 SYSLIB1 .HLP 20K 159 8FBB - 5 SYSLIB2 .HLP 5K 33 6DD5 - 6 SYSLIB3 .HLP 15K 119 F85C - 7 SYSLIB4 .HLP 12K 90 E7A6 - 8 SYSLIB5 .HLP 12K 90 F417 - 9 SYSLIB6 .HLP 8K 60 F45A - 10 SYSLIB7 .HLP 6K 45 152C - 11 SYSLIB8 .HLP 5K 37 3CA8 - 12 SYSLIB9 .HLP 3K 23 4292 - 13 SYSLIBA .HLP 7K 55 6442 - 14 SYSLIBB .HLP 5K 39 2009 - 15 SYSLIBC .HLP 9K 71 F96C - 16 SYSLIBD .HLP 5K 33 489A - 17 SYSLIBE .HLP 8K 62 55D3 - 18 SYSLIBF .HLP 4K 25 2A54 - 19 SYSLIBG .HLP 3K 21 EE4C - 20 SYSLIBH .HLP 2K 14 6F02 - 21 SYSLIBI .HLP 6K 44 DC1E - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3FILES2.PQ2 b/Source/Images/d_bp/u15/Z3FILES2.PQ2 deleted file mode 100644 index 136f2538..00000000 Binary files a/Source/Images/d_bp/u15/Z3FILES2.PQ2 and /dev/null differ diff --git a/Source/Images/d_bp/u15/Z3HDR1.LIB b/Source/Images/d_bp/u15/Z3HDR1.LIB deleted file mode 100644 index 826021a7..00000000 --- a/Source/Images/d_bp/u15/Z3HDR1.LIB +++ /dev/null @@ -1,609 +0,0 @@ -; Z3HDR - Maximum Configuration -; Offset: 5100H - -************************************************************************* -* * -* Z C P R 3 -- Z80-Based Command Processor Replacement, Version 3.0 * -* * -* Copyright (c) 1984 by Richard Conn * -* Copyright Pending, US Government * -* All Rights Reserved * -* * -* ZCPR3 was written by Richard Conn, who assumes no responsibility * -* or liability for its use. ZCPR3 is released to the CP/M user * -* community for non-commercial use only. * -* * -* All registered users of CP/M are encouraged to freely copy and use * -* ZCPR3 and its associated utilities on their registered systems for * -* non-commercial purposes. * -* * -* Any commercial use of ZCPR3 is prohibited unless approved by the * -* author, Richard Conn, or his authorized agent, Echelon, Inc, in * -* writing. * -* * -* This is the RELEASE VERSION of ZCPR3. * -* * -************************************************************************* - -; -; Module: Z3HDR -; Author: Richard Conn -; Module Used By: ZCPR3 Version 3.x -; Note: Z3HDR contains the key customization equates for ZCPR3. These -; equates allow the user to select various ZCPR3 options and do an -; extensive amount of tailoring of ZCPR3 to the user's desires. -; - -; -; 1. BASIC SYSTEM DEFINITIONS -; -; The following equates may be used to customize this CPR for the user's -; system and integration technique. The following equate are provided: -; -; REL - TRUE if integration is to be done via MOVCPM -; - FALSE if integration is to be done via DDT and SYSGEN -; -; CPRLOC - Base Page Address of CPR; this value can be obtained by running -; the CCPLOC program on your system, and if REL is FALSE, this -; value is supplied through the Z3BASE.LIB CCP equate -; -REL EQU FALSE -; - IF REL -CPRLOC EQU 0 - ELSE -CPRLOC EQU CCP ;VALUE PROVIDED IN Z3BASE.LIB - ENDIF - -; -; 2. DEFAULT FILE TYPES -; -; The following macros define the file types of the command object files -; (COM files under CP/M 2.2) to be loaded when a non-resident ZCPR3 command -; is given and of the indirect command files (SUB files under CP/M 2.2) to -; be used to extract commands from when the indirect command facility is -; invoked. -; -COMTYP MACRO - DB 'COM' - ENDM - -SUBTYP MACRO - DB 'SUB' - ENDM - -; -; 3. SUBMIT FILE PROCESSING -; -; The following flag enables the ability of ZCPR3 to process -; SUBMIT files (command files of the form $$$.SUB). If SUBON is TRUE, then -; ZCPR3 will process such files like CP/M's CCP normally does; if SUBON is -; FALSE, ZCPR3 will not process such files (ignore them). In such a case, -; only indirect command file facilities like ZEX will work. Much code is -; saved inside of the ZCPR3 Command Processor if SUBON is set to FALSE, -; but this rather useful facility is lost. -; -SUBON EQU TRUE - - -; -; 4. COMMAND PREFIX -; -; The following flag allows ZCPR3 to accept commands of the form -; "du:command params" or "dir:command params". If DRVPREFIX is TRUE, -; this form is accepted; if FALSE, this form is not accepted. -; -DRVPREFIX equ TRUE - - -; -; 5. COMMAND ATTRIBUTES -; -; The following equate allows the user to select the attributes of the -; COM files which are selected for execution. The ZCPR3 Command Processor -; can be made to execute only COM files with the System attribute set, with -; the Directory (non-System) attribute set, or with either attribute set. -; The following values are defined for this equate: -; -; COMATT Files Selected -; 0 System -; 80H Directory -; 1 Both System and Directory -; -COMATT equ 01H - - -; -; 6. ZCPR3 RESIDENT COMMAND ACTIVATION AND WHEEL FACILITY -; -; The following equates enable various ZCPR3-resident commands. -; The user may invoke these as desired, but should keep in mind the size -; of the resulting ZCPR3 and make sure it does not exceed the required -; limits. -; -DIRON equ FALSE ;DIR COMMAND -LTON equ FALSE ;LIST, TYPE COMMANDS -GOON equ TRUE ;GO COMMAND -ERAON equ FALSE ;ERA COMMAND -SAVEON equ TRUE ;SAVE COMMAND -RENON equ FALSE ;REN COMMAND -GETON equ TRUE ;GET COMMAND -JUMPON equ FALSE ;JUMP COMMAND -NOTEON equ FALSE ;NOTE COMMAND - -; -; The Wheel equate table enables the WHEEL facility of ZCPR3. With this -; facility, a WHEEL BYTE, which exists somewhere in memory, is examined -; before a set of installer-selected commands are executed. -; If this byte is not zero, then the command proceeds. If it is zero, -; then the command is not allowed to proceed and is exited with an error -; message. -; -; The following set of equates make each of the indicated commands -; selectable to respond to the Wheel Byte or not. For instance, if -; WERA=TRUE, then it responds to the Wheel Byte; if WERA=FALSE, it does not. -; - IF Z3WHL NE 0 ;IF A WHEEL BYTE ADDRESS IS DEFINED -WERA equ FALSE ;Make ERA a Wheel-Oriented Command -WREN equ FALSE ; " REN " " " " -WLT equ FALSE ; " L/T " " " " (LIST/TYPE) -WGO equ FALSE ; " GO " " " " -WSAVE equ FALSE ; " SAVE " " " " -WGET equ FALSE ; " GET " " " " -WJUMP equ FALSE ; " JUMP " " " " -WDU equ FALSE ; " DU: " " " " (DU/DIR Change) -WHEEL equ WERA OR WREN OR WLT OR WGO OR WSAVE OR WGET OR WJUMP OR WDU - ENDIF ;Z3WHL - -; -; 7. ZCPR3 RESIDENT COMMAND TABLE -; -; This table consists of the names of the various ZCPR3-resident -; commands and their addresses. The NCHARS equate defines how many -; characters long each name may be, and all table entries must be exactly -; the indicated number of characters (trailing spaces are used to fill -; out shorter names). -; -; Each table entry is structured as follows: -; -; DB 'CMND' ;Name of Command (NCHARS long) -; DB CMNDADR ;Address of Command within ZCPR3 -; -; The installer should only change the names of the commands as -; desired and should not, as a rule, touch the address definition since -; this is fixed within the body of ZCPR3. -; -NCHARS EQU 4 ;NUMBER OF CHARS/COMMAND - -CTABLE MACRO -; - IF DIRON - DB 'DIR ' - DW DIR ;DIRECTORY DISPLAY COMMAND - ENDIF -; - IF LTON - DB 'LIST' - DW LIST ;LIST FILE ON PRINTER COMMAND - DB 'TYPE' - DW TYPE ;TYPE FILE ON CONSOLE COMMAND - ENDIF -; - IF GOON - DB 'GO ' - DW GO ;EXECUTE CURRENT TPA COMMAND - ENDIF -; - IF ERAON - DB 'ERA ' - DW ERA ;ERASE FILES COMMAND - ENDIF -; - IF SAVEON - DB 'SAVE' - DW SAVE ;SAVE TPA COMMAND - ENDIF -; - IF RENON - DB 'REN ' - DW REN ;RENAME FILES COMMAND - ENDIF -; - IF GETON - DB 'GET ' - DW GET ;LOAD FILE INTO TPA COMMAND - ENDIF -; - IF JUMPON - DB 'JUMP' - DW JUMP ;JUMP TO ANY MEMORY LOCATION COMMAND - ENDIF -; - IF NOTEON - DB 'NOTE' - DW NOTE ;NOTE - NULL COMMAND (NOP) - ENDIF -; - ENDM - - -; -; 8. CONTROLS ON ZCPR3 RESIDENT COMMANDS -; -; The following sets of equates provide special controls and -; parameters on various ZCPR3-resident commands. -; - -; -; The following equates set the width of the spacing between the -; file names for the DIR command and the character used to separate file -; names from one another on the same line. -; -; Assuming that FENCE is set to the character '|', If WIDE is TRUE, -; then the output will look like: -; -; filename.typ__|__filename.typ ... -; -; while if WIDE is FALSE, the output will look like: -; -; filename.typ_|_filename.typ ... -; -; (underscore represents a space) -; -WIDE EQU TRUE -FENCE EQU '|' - -; -; The following equates define two flags which are used in -; conjunction with the DIR command on the command line. SYSFLG is -; the character used to indicate to DIR that all files, both System -; and Non-System, are to be displayed. SOFLG is the character used -; to indicate to DIR that only the System files are to be displayed. -; By default, DIR displays non-System files. -; -; For example, if SYSFLG is set to 'A' and SOFLG is set to -; 'S', then: -; DIR *.COM A -; -; displays all COM files with both System and non-System attributes -; while: -; DIR *.COM S -; -; displays only COM files with the System attribute. Naturally: -; -; DIR *.COM -; -; displays only COM files with the non-System attribute. -; -SYSFLG EQU 'A' -SOFLG EQU 'S' - -; -; The following equate causes ERA to confirm the files to be erased -; before it goes ahead and erases them. If ERAOK is TRUE, then the user -; will be prompted each time; if it is FALSE, then the user will not be -; prompted. -; -ERAOK equ FALSE - -; -; If ERAOK is TRUE, the following equate adds a Verify option to the -; ERA command which causes the user to be prompted only if the Verify -; option letter, defined by ERDFLG, is given after the file name. If -; ERAV is TRUE, then the user will be asked to verify only when ERDFLG -; is contained in the command line; if ERAV is FALSE, the user will always -; be asked to verify. -; -; For example, if ERAOK is TRUE, ERAV is TRUE, and ERDFLG is 'V', -; then the command: -; ERA *.* V -; will result in the file names being displayed and the user being asked -; for verification. If the V option were not given, the user would not -; be asked for verification. -; -ERAV equ FALSE -ERDFLG equ 'V' - -; -; The following equates set the paging parameters for the TYPE -; command. -; -; PGDFLT determines if TYPE pages by default. If PGDFLT is TRUE, -; then: -; TYPE FILE.TXT -; -; will be paged. If PGDFLT is FALSE, the above command will not be paged. -; -; PGDFLG defines the option character in the TYPE command line which -; is used to toggle the default set by PGDFLT. Assuming that PGDFLG is set -; to 'P', then: -; TYPE FILE.TXT P -; -; will page the file listing if PGDFLT is FALSE and not page it if PGDFLT is -; TRUE. -; -PGDFLT EQU TRUE -PGDFLG EQU 'P' - -; -; The following equate defines the number of lines on the user's CRT -; screen for use by the TYPE command when it is paging. This value is usually -; 24. -; -NLINES EQU 24 - -; -; The following equate defines the option letter used with the -; SAVE command to indicate that the associated number is 128-byte sectors -; as opposed to 256-byte pages. For example, if SECTFLG is set to 'S', then: -; -; SAVE 25 FILE.BIN S -; -; save 25 128-byte sectors starting at location 100H into the file named -; FILE.BIN. IF the S option was not present, SAVE would have saved 25 -; 256-byte blocks starting at location 100H into the file named FILE.BIN. -; -SECTFLG EQU 'S' - -; -; 9. PATH DEFINITION -; -; The following equate specifies the address of the PATH to be followed -; for the PATH command-search if the PATH is to be initialized by the BIOS -; and set by the user via a PATH.COM program. The value of PATH should -; be the address of the PATH data area in memory. If the internal PATH -; provided by ZCPR3 is to be used, then PATHBASE should be equated to 0, -; which selects the PATH located just after the MEMLOAD routine. If the -; external PATH is to be used, then PATHBASE should be set to the address -; of the external path. -; -; A PATH is a series of byte-pairs, terminated by a binary 0. The first -; byte of each pair is the disk number (1-16 for disks A-P), and the second -; byte of each pair is the user number (0-31). The special character '$' -; indicates the current user or current disk. For example, the path -; from current disk/current user to current disk/user 0 to disk A/user 0 -; is selected by the following sequence: -; -; DB '$$' ;current disk/user -; DB '$',0 ;current disk/user 0 -; DB 1,0 ;disk A/user 0 -; DB 0 ;end of path -; - IF EXPATH NE 0 ;External Path Selected -; -; This equate defines the base address of the external path -; -PATH equ EXPATH ;External ZCPR3 PATH at CBIOS Buffer Area - - ELSE ;Internal Path Selected -; -; The following macro defines the n-element internal path -; -IPATH MACRO - db 'A'-'@','$' ;Disk A, Current User - db 'A'-'@',0 ;Disk A, User 0 - db 0 ;End of Path -- MUST be here - ENDM -; - ENDIF - -; -; The following flag enables ZCPR3 to perform an optimized path -; search when it is searching along a path for a file. If this equate -; is TRUE, ZCPR3 will build a path in memory of absolute entries (A1, B7, etc) -; from the symbolic path (one containing '$') which is the path it would -; otherwise use. This new path would contain no duplicate path elements, -; where a symbolic path analysis may. For example, if the path is: -; -; db 'A'-'@','$' ;disk A, current user -; db 'A'-'@',15 ;disk A, user 15 -; db 0 -; -; then if the user is logged into A15, setting the below equate to TRUE -; would allow ZCPR3 to build the path: -; -; db 'A'-'@',15 ;only one entry -; db 0 -; -; in the analysis of this symbolic path, while with this equate FALSE, -; ZCPR3 may log into A15 as many as three times (once for the default -; and twice more for the symbolic path) in looking for a file which is -; not found before it gives up. Using this minimum path facility costs -; some code in ZCPR3, but it speeds up processing noticably in some cases. -; -; Enable this equate if MINIMUM PATH SEARCH is to be employed. -; -MINPATH EQU TRUE - -; -; In searching for a file along a path, ZCPR3 can be commanded -; to always look in the current logged-in directory before beginning -; the path search. This equate controls this feature. If SCANCUR -; is set to TRUE, the current directory need never be referenced in -; a symbolic path expression (DB '$','$') since SCANCUR insures that -; the current directory is scanned. -; -; Enable this equate if the current DU is always to be scanned. -; -SCANCUR EQU TRUE - - -; -; 10. DU AND DIR CONTROLS -; - -; -; The following equate enables the appearance of the current disk/user -; in the ZCPR3 prompt. If set to FALSE, the prompt appears as '>' (assuming -; > is the current value of CPRMPT). If set to TRUE, the prompt appears -; as 'd>' or 'dn>'. (see INCLNDR below) -; -INCLDU equ TRUE - -; -; The following equate allows ZCPR3 to accept the DU: prefix or -; login form for input. Set this to TRUE if DU: prefix is to be allowed. -; -; Setting this equate to TRUE allows the following forms: -; -; A>B1: -; A>TYPE B4:FILE.TXT -; A>B: -; A>1: -; -ACCPTDU EQU TRUE - -; -; This equate enables ZCPR3 to process DIR: forms internally -; through the memory-based named directory buffer. This equate and -; the NDBASE address should be TRUE (non-zero) in order to enable -; ZCPR3 to process named directories. -; -; If NDINCP is TRUE, the following forms are allowed: -; -; A>ROOT: -; A>TYPE TEXT:FILE.TXT -; -; if the other associated equates (below) are set correctly. -; -NDINCP EQU TRUE - -; -; The following equate will cause the name of the current directory -; to be displayed as part of the prompt along with the DU form if enabled. -; (see INCLDU above) -; -; For example, if INCLNDR is TRUE, the prompt would look like: -; -; B7:TEXT> -- if INCLDU is also TRUE -; TEXT> -- if INCLDU is FALSE -; -INCLNDR EQU TRUE - -; -; The following equate allows ZCPR3 to accept the DIR: prefix or -; login form for input. Set this to TRUE if DIR: prefix is to be allowed. -; -; Setting this equate to TRUE allows the following forms: -; -; A>ROOT: -; A>TYPE TEXT:FILE.TXT -; -ACCPTND EQU TRUE - -; -; The following equate determines the hierarchy of DU:/DIR: evaluation. -; Set this to TRUE if DU: is to be tested for before DIR: or set this to -; FALSE if DIR: is to be tested for before DU:. If this is FALSE, named -; directories like C: (standing for C work area - NOT disk C) are permitted. -; -; Assuming that a directory for C programs, named 'C', and a root -; directory, named 'ROOT', exist, then if DUFIRST is set to FALSE: -; -; A>C: -- logs the user into the directory named 'C' -; A>ROOT: -- logs the user into the directory named 'ROOT' -; -; while if DUFIRST is set to TRUE: -; -; A>C: -- logs the user into disk C: (dir C can't be accessed) -; A>ROOT: -- logs the user into the directory named 'ROOT' -; -DUFIRST EQU FALSE - -; -; Enable password check on named directory references. If a named -; directory is referenced and has a password associated with it, ZCPR3 -; will ask the user for this password and approve the reference only -; if he gives a valid response. One and only one try is permitted. -; Setting this equate to TRUE will enable the password check facility. -; -PWCHECK EQU TRUE - - -; -; 11. COMMAND LINE BUFFER CONTROL -; -; The MULTCMD equate enables the feature of having more than -; one command on the same line, separated by a separation char -; which is defined by the CMDSEP equate. If this feature is -; enabled, the command line buffer and buffer pointers are -; moved outside of ZCPR3 at the indicated address of Z3CL. -; -; MULTCMD indicates if the ability to have more than one command -; on a line is to be enabled, and CMDSEP is the character used to separate -; these commands. For example, if CMDSEP is ';' and MULTCMD is TRUE, then -; commands like this are possible: -; -; ERA *.BAK;DIR -; - IF Z3CL NE 0 -MULTCMD equ TRUE - ELSE -MULTCMD equ FALSE - ENDIF -CMDSEP equ ';' - - -; -; 12. CMDRUN -- ZCPR3 EXTENDED COMMAND PROCESSING FACILITY -; -; This equate enables the ZCPR3 CMDRUN facility. If CMDRUN is TRUE, then -; another stage of command processing is invoked should ZCPR3 fail to find -; a COM file when the user gives a command. This stage involves invoking -; the COM file specified by CMDFCB and giving it the current command line -; as an argument. In this way, if, say, M80 PROG2 fails as a command, -; a new command like LRUNZ M80 PROG2, SUB M80 PROG2, or ZEX M80 PROG2 may -; be processed. If the new command fails, an appropriate error message is -; given. -; -; The ROOTONLY option causes ZCPR3 to only look at the Root (bottom of -; path) for the Extended Command Processor if it is set to TRUE. If it -; is set to FALSE, the path is searched for the Extended Command Processor. -; The tradeoff here is that ROOTONLY = TRUE is less flexible but somewhat -; faster than ROOTONLY = FALSE. -; -CMDRUN equ FALSE ; Enable the Facility - - if CMDRUN -ROOTONLY equ TRUE ; TRUE if look at Root Only for Extended - ; Command Processor, FALSE if look along - ; path -CMDFCB MACRO - db 0 - db 'CMDRUN ' ;Name of Program - db 'COM' ;File Type - ENDM - endif ;CMDRUN - - -; -; 13. FLOW COMMAND FACILITY -; -; This equate enables ZCPR3 to respond to IF processing. -; ZCPR3 simply flushes commands if a FALSE IF is currently engaged. -; FCPs must be enabled for IFON to work correctly. -; -IFON EQU TRUE - - -; -; 14. MISCELLANEOUS EQUATES -; -MAXUSR EQU 31 ;MAXIMUM USER NUMBER ACCESSABLE -MAXDISK EQU 4 ;MAXIMUM NUMBER OF DISKS ACCESSABLE - -SUPRES EQU TRUE ;SUPRESSES USER # REPORT FOR USER 0 - -SPRMPT EQU '$' ;CPR PROMPT INDICATING SUBMIT COMMAND -CPRMPT EQU '>' ;CPR PROMPT INDICATING USER COMMAND - -NUMBASE EQU 'H' ;CHAR USED TO SWITCH FROM DEFAULT NUMBER BASE - -CURIND EQU '$' ;SYMBOL FOR CURRENT DISK OR USER - -COMMENT EQU ';' ;LINES BEGINNING WITH THIS CHAR ARE COMMENTS - -; -; END OF ZCPR3 CUSTOMIZATION SECTION -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3HDR2.LIB b/Source/Images/d_bp/u15/Z3HDR2.LIB deleted file mode 100644 index 400f0838..00000000 --- a/Source/Images/d_bp/u15/Z3HDR2.LIB +++ /dev/null @@ -1,609 +0,0 @@ -; Z3HDR - Minimum Configuration -; Offset: 4100H - -************************************************************************* -* * -* Z C P R 3 -- Z80-Based Command Processor Replacement, Version 3.0 * -* * -* Copyright (c) 1984 by Richard Conn * -* Copyright Pending, US Government * -* All Rights Reserved * -* * -* ZCPR3 was written by Richard Conn, who assumes no responsibility * -* or liability for its use. ZCPR3 is released to the CP/M user * -* community for non-commercial use only. * -* * -* All registered users of CP/M are encouraged to freely copy and use * -* ZCPR3 and its associated utilities on their registered systems for * -* non-commercial purposes. * -* * -* Any commercial use of ZCPR3 is prohibited unless approved by the * -* author, Richard Conn, or his authorized agent, Echelon, Inc, in * -* writing. * -* * -* This is the RELEASE VERSION of ZCPR3. * -* * -************************************************************************* - -; -; Module: Z3HDR -; Author: Richard Conn -; Module Used By: ZCPR3 Version 3.x -; Note: Z3HDR contains the key customization equates for ZCPR3. These -; equates allow the user to select various ZCPR3 options and do an -; extensive amount of tailoring of ZCPR3 to the user's desires. -; - -; -; 1. BASIC SYSTEM DEFINITIONS -; -; The following equates may be used to customize this CPR for the user's -; system and integration technique. The following equate are provided: -; -; REL - TRUE if integration is to be done via MOVCPM -; - FALSE if integration is to be done via DDT and SYSGEN -; -; CPRLOC - Base Page Address of CPR; this value can be obtained by running -; the CCPLOC program on your system, and if REL is FALSE, this -; value is supplied through the Z3BASE.LIB CCP equate -; -REL EQU FALSE -; - IF REL -CPRLOC EQU 0 - ELSE -CPRLOC EQU CCP ;VALUE PROVIDED IN Z3BASE.LIB - ENDIF - -; -; 2. DEFAULT FILE TYPES -; -; The following macros define the file types of the command object files -; (COM files under CP/M 2.2) to be loaded when a non-resident ZCPR3 command -; is given and of the indirect command files (SUB files under CP/M 2.2) to -; be used to extract commands from when the indirect command facility is -; invoked. -; -COMTYP MACRO - DB 'COM' - ENDM - -SUBTYP MACRO - DB 'SUB' - ENDM - -; -; 3. SUBMIT FILE PROCESSING -; -; The following flag enables the ability of ZCPR3 to process -; SUBMIT files (command files of the form $$$.SUB). If SUBON is TRUE, then -; ZCPR3 will process such files like CP/M's CCP normally does; if SUBON is -; FALSE, ZCPR3 will not process such files (ignore them). In such a case, -; only indirect command file facilities like ZEX will work. Much code is -; saved inside of the ZCPR3 Command Processor if SUBON is set to FALSE, -; but this rather useful facility is lost. -; -SUBON EQU TRUE - - -; -; 4. COMMAND PREFIX -; -; The following flag allows ZCPR3 to accept commands of the form -; "du:command params" or "dir:command params". If DRVPREFIX is TRUE, -; this form is accepted; if FALSE, this form is not accepted. -; -DRVPREFIX equ TRUE - - -; -; 5. COMMAND ATTRIBUTES -; -; The following equate allows the user to select the attributes of the -; COM files which are selected for execution. The ZCPR3 Command Processor -; can be made to execute only COM files with the System attribute set, with -; the Directory (non-System) attribute set, or with either attribute set. -; The following values are defined for this equate: -; -; COMATT Files Selected -; 0 System -; 80H Directory -; 1 Both System and Directory -; -COMATT equ 01H - - -; -; 6. ZCPR3 RESIDENT COMMAND ACTIVATION AND WHEEL FACILITY -; -; The following equates enable various ZCPR3-resident commands. -; The user may invoke these as desired, but should keep in mind the size -; of the resulting ZCPR3 and make sure it does not exceed the required -; limits. -; -DIRON equ FALSE ;DIR COMMAND -LTON equ TRUE ;LIST, TYPE COMMANDS -GOON equ TRUE ;GO COMMAND -ERAON equ TRUE ;ERA COMMAND -SAVEON equ FALSE ;SAVE COMMAND -RENON equ FALSE ;REN COMMAND -GETON equ FALSE ;GET COMMAND -JUMPON equ FALSE ;JUMP COMMAND -NOTEON equ TRUE ;NOTE COMMAND - -; -; The Wheel equate table enables the WHEEL facility of ZCPR3. With this -; facility, a WHEEL BYTE, which exists somewhere in memory, is examined -; before a set of installer-selected commands are executed. -; If this byte is not zero, then the command proceeds. If it is zero, -; then the command is not allowed to proceed and is exited with an error -; message. -; -; The following set of equates make each of the indicated commands -; selectable to respond to the Wheel Byte or not. For instance, if -; WERA=TRUE, then it responds to the Wheel Byte; if WERA=FALSE, it does not. -; - IF Z3WHL NE 0 ;IF A WHEEL BYTE ADDRESS IS DEFINED -WERA equ FALSE ;Make ERA a Wheel-Oriented Command -WREN equ FALSE ; " REN " " " " -WLT equ FALSE ; " L/T " " " " (LIST/TYPE) -WGO equ FALSE ; " GO " " " " -WSAVE equ FALSE ; " SAVE " " " " -WGET equ FALSE ; " GET " " " " -WJUMP equ FALSE ; " JUMP " " " " -WDU equ FALSE ; " DU: " " " " (DU/DIR Change) -WHEEL equ WERA OR WREN OR WLT OR WGO OR WSAVE OR WGET OR WJUMP OR WDU - ENDIF ;Z3WHL - -; -; 7. ZCPR3 RESIDENT COMMAND TABLE -; -; This table consists of the names of the various ZCPR3-resident -; commands and their addresses. The NCHARS equate defines how many -; characters long each name may be, and all table entries must be exactly -; the indicated number of characters (trailing spaces are used to fill -; out shorter names). -; -; Each table entry is structured as follows: -; -; DB 'CMND' ;Name of Command (NCHARS long) -; DB CMNDADR ;Address of Command within ZCPR3 -; -; The installer should only change the names of the commands as -; desired and should not, as a rule, touch the address definition since -; this is fixed within the body of ZCPR3. -; -NCHARS EQU 4 ;NUMBER OF CHARS/COMMAND - -CTABLE MACRO -; - IF DIRON - DB 'DIR ' - DW DIR ;DIRECTORY DISPLAY COMMAND - ENDIF -; - IF LTON - DB 'LIST' - DW LIST ;LIST FILE ON PRINTER COMMAND - DB 'TYPE' - DW TYPE ;TYPE FILE ON CONSOLE COMMAND - ENDIF -; - IF GOON - DB 'GO ' - DW GO ;EXECUTE CURRENT TPA COMMAND - ENDIF -; - IF ERAON - DB 'ERA ' - DW ERA ;ERASE FILES COMMAND - ENDIF -; - IF SAVEON - DB 'SAVE' - DW SAVE ;SAVE TPA COMMAND - ENDIF -; - IF RENON - DB 'REN ' - DW REN ;RENAME FILES COMMAND - ENDIF -; - IF GETON - DB 'GET ' - DW GET ;LOAD FILE INTO TPA COMMAND - ENDIF -; - IF JUMPON - DB 'JUMP' - DW JUMP ;JUMP TO ANY MEMORY LOCATION COMMAND - ENDIF -; - IF NOTEON - DB 'NOTE' - DW NOTE ;NOTE - NULL COMMAND (NOP) - ENDIF -; - ENDM - - -; -; 8. CONTROLS ON ZCPR3 RESIDENT COMMANDS -; -; The following sets of equates provide special controls and -; parameters on various ZCPR3-resident commands. -; - -; -; The following equates set the width of the spacing between the -; file names for the DIR command and the character used to separate file -; names from one another on the same line. -; -; Assuming that FENCE is set to the character '|', If WIDE is TRUE, -; then the output will look like: -; -; filename.typ__|__filename.typ ... -; -; while if WIDE is FALSE, the output will look like: -; -; filename.typ_|_filename.typ ... -; -; (underscore represents a space) -; -WIDE EQU TRUE -FENCE EQU '|' - -; -; The following equates define two flags which are used in -; conjunction with the DIR command on the command line. SYSFLG is -; the character used to indicate to DIR that all files, both System -; and Non-System, are to be displayed. SOFLG is the character used -; to indicate to DIR that only the System files are to be displayed. -; By default, DIR displays non-System files. -; -; For example, if SYSFLG is set to 'A' and SOFLG is set to -; 'S', then: -; DIR *.COM A -; -; displays all COM files with both System and non-System attributes -; while: -; DIR *.COM S -; -; displays only COM files with the System attribute. Naturally: -; -; DIR *.COM -; -; displays only COM files with the non-System attribute. -; -SYSFLG EQU 'A' -SOFLG EQU 'S' - -; -; The following equate causes ERA to confirm the files to be erased -; before it goes ahead and erases them. If ERAOK is TRUE, then the user -; will be prompted each time; if it is FALSE, then the user will not be -; prompted. -; -ERAOK equ FALSE - -; -; If ERAOK is TRUE, the following equate adds a Verify option to the -; ERA command which causes the user to be prompted only if the Verify -; option letter, defined by ERDFLG, is given after the file name. If -; ERAV is TRUE, then the user will be asked to verify only when ERDFLG -; is contained in the command line; if ERAV is FALSE, the user will always -; be asked to verify. -; -; For example, if ERAOK is TRUE, ERAV is TRUE, and ERDFLG is 'V', -; then the command: -; ERA *.* V -; will result in the file names being displayed and the user being asked -; for verification. If the V option were not given, the user would not -; be asked for verification. -; -ERAV equ FALSE -ERDFLG equ 'V' - -; -; The following equates set the paging parameters for the TYPE -; command. -; -; PGDFLT determines if TYPE pages by default. If PGDFLT is TRUE, -; then: -; TYPE FILE.TXT -; -; will be paged. If PGDFLT is FALSE, the above command will not be paged. -; -; PGDFLG defines the option character in the TYPE command line which -; is used to toggle the default set by PGDFLT. Assuming that PGDFLG is set -; to 'P', then: -; TYPE FILE.TXT P -; -; will page the file listing if PGDFLT is FALSE and not page it if PGDFLT is -; TRUE. -; -PGDFLT EQU TRUE -PGDFLG EQU 'P' - -; -; The following equate defines the number of lines on the user's CRT -; screen for use by the TYPE command when it is paging. This value is usually -; 24. -; -NLINES EQU 24 - -; -; The following equate defines the option letter used with the -; SAVE command to indicate that the associated number is 128-byte sectors -; as opposed to 256-byte pages. For example, if SECTFLG is set to 'S', then: -; -; SAVE 25 FILE.BIN S -; -; save 25 128-byte sectors starting at location 100H into the file named -; FILE.BIN. IF the S option was not present, SAVE would have saved 25 -; 256-byte blocks starting at location 100H into the file named FILE.BIN. -; -SECTFLG EQU 'S' - -; -; 9. PATH DEFINITION -; -; The following equate specifies the address of the PATH to be followed -; for the PATH command-search if the PATH is to be initialized by the BIOS -; and set by the user via a PATH.COM program. The value of PATH should -; be the address of the PATH data area in memory. If the internal PATH -; provided by ZCPR3 is to be used, then PATHBASE should be equated to 0, -; which selects the PATH located just after the MEMLOAD routine. If the -; external PATH is to be used, then PATHBASE should be set to the address -; of the external path. -; -; A PATH is a series of byte-pairs, terminated by a binary 0. The first -; byte of each pair is the disk number (1-16 for disks A-P), and the second -; byte of each pair is the user number (0-31). The special character '$' -; indicates the current user or current disk. For example, the path -; from current disk/current user to current disk/user 0 to disk A/user 0 -; is selected by the following sequence: -; -; DB '$$' ;current disk/user -; DB '$',0 ;current disk/user 0 -; DB 1,0 ;disk A/user 0 -; DB 0 ;end of path -; - IF EXPATH NE 0 ;External Path Selected -; -; This equate defines the base address of the external path -; -PATH equ EXPATH ;External ZCPR3 PATH at CBIOS Buffer Area - - ELSE ;Internal Path Selected -; -; The following macro defines the n-element internal path -; -IPATH MACRO - db 'A'-'@','$' ;Disk A, Current User - db 'A'-'@',0 ;Disk A, User 0 - db 0 ;End of Path -- MUST be here - ENDM -; - ENDIF - -; -; The following flag enables ZCPR3 to perform an optimized path -; search when it is searching along a path for a file. If this equate -; is TRUE, ZCPR3 will build a path in memory of absolute entries (A1, B7, etc) -; from the symbolic path (one containing '$') which is the path it would -; otherwise use. This new path would contain no duplicate path elements, -; where a symbolic path analysis may. For example, if the path is: -; -; db 'A'-'@','$' ;disk A, current user -; db 'A'-'@',15 ;disk A, user 15 -; db 0 -; -; then if the user is logged into A15, setting the below equate to TRUE -; would allow ZCPR3 to build the path: -; -; db 'A'-'@',15 ;only one entry -; db 0 -; -; in the analysis of this symbolic path, while with this equate FALSE, -; ZCPR3 may log into A15 as many as three times (once for the default -; and twice more for the symbolic path) in looking for a file which is -; not found before it gives up. Using this minimum path facility costs -; some code in ZCPR3, but it speeds up processing noticably in some cases. -; -; Enable this equate if MINIMUM PATH SEARCH is to be employed. -; -MINPATH EQU TRUE - -; -; In searching for a file along a path, ZCPR3 can be commanded -; to always look in the current logged-in directory before beginning -; the path search. This equate controls this feature. If SCANCUR -; is set to TRUE, the current directory need never be referenced in -; a symbolic path expression (DB '$','$') since SCANCUR insures that -; the current directory is scanned. -; -; Enable this equate if the current DU is always to be scanned. -; -SCANCUR EQU TRUE - - -; -; 10. DU AND DIR CONTROLS -; - -; -; The following equate enables the appearance of the current disk/user -; in the ZCPR3 prompt. If set to FALSE, the prompt appears as '>' (assuming -; > is the current value of CPRMPT). If set to TRUE, the prompt appears -; as 'd>' or 'dn>'. (see INCLNDR below) -; -INCLDU equ TRUE - -; -; The following equate allows ZCPR3 to accept the DU: prefix or -; login form for input. Set this to TRUE if DU: prefix is to be allowed. -; -; Setting this equate to TRUE allows the following forms: -; -; A>B1: -; A>TYPE B4:FILE.TXT -; A>B: -; A>1: -; -ACCPTDU EQU TRUE - -; -; This equate enables ZCPR3 to process DIR: forms internally -; through the memory-based named directory buffer. This equate and -; the NDBASE address should be TRUE (non-zero) in order to enable -; ZCPR3 to process named directories. -; -; If NDINCP is TRUE, the following forms are allowed: -; -; A>ROOT: -; A>TYPE TEXT:FILE.TXT -; -; if the other associated equates (below) are set correctly. -; -NDINCP EQU TRUE - -; -; The following equate will cause the name of the current directory -; to be displayed as part of the prompt along with the DU form if enabled. -; (see INCLDU above) -; -; For example, if INCLNDR is TRUE, the prompt would look like: -; -; B7:TEXT> -- if INCLDU is also TRUE -; TEXT> -- if INCLDU is FALSE -; -INCLNDR EQU TRUE - -; -; The following equate allows ZCPR3 to accept the DIR: prefix or -; login form for input. Set this to TRUE if DIR: prefix is to be allowed. -; -; Setting this equate to TRUE allows the following forms: -; -; A>ROOT: -; A>TYPE TEXT:FILE.TXT -; -ACCPTND EQU TRUE - -; -; The following equate determines the hierarchy of DU:/DIR: evaluation. -; Set this to TRUE if DU: is to be tested for before DIR: or set this to -; FALSE if DIR: is to be tested for before DU:. If this is FALSE, named -; directories like C: (standing for C work area - NOT disk C) are permitted. -; -; Assuming that a directory for C programs, named 'C', and a root -; directory, named 'ROOT', exist, then if DUFIRST is set to FALSE: -; -; A>C: -- logs the user into the directory named 'C' -; A>ROOT: -- logs the user into the directory named 'ROOT' -; -; while if DUFIRST is set to TRUE: -; -; A>C: -- logs the user into disk C: (dir C can't be accessed) -; A>ROOT: -- logs the user into the directory named 'ROOT' -; -DUFIRST EQU FALSE - -; -; Enable password check on named directory references. If a named -; directory is referenced and has a password associated with it, ZCPR3 -; will ask the user for this password and approve the reference only -; if he gives a valid response. One and only one try is permitted. -; Setting this equate to TRUE will enable the password check facility. -; -PWCHECK EQU FALSE - - -; -; 11. COMMAND LINE BUFFER CONTROL -; -; The MULTCMD equate enables the feature of having more than -; one command on the same line, separated by a separation char -; which is defined by the CMDSEP equate. If this feature is -; enabled, the command line buffer and buffer pointers are -; moved outside of ZCPR3 at the indicated address of Z3CL. -; -; MULTCMD indicates if the ability to have more than one command -; on a line is to be enabled, and CMDSEP is the character used to separate -; these commands. For example, if CMDSEP is ';' and MULTCMD is TRUE, then -; commands like this are possible: -; -; ERA *.BAK;DIR -; - IF Z3CL NE 0 -MULTCMD equ TRUE - ELSE -MULTCMD equ FALSE - ENDIF -CMDSEP equ ';' - - -; -; 12. CMDRUN -- ZCPR3 EXTENDED COMMAND PROCESSING FACILITY -; -; This equate enables the ZCPR3 CMDRUN facility. If CMDRUN is TRUE, then -; another stage of command processing is invoked should ZCPR3 fail to find -; a COM file when the user gives a command. This stage involves invoking -; the COM file specified by CMDFCB and giving it the current command line -; as an argument. In this way, if, say, M80 PROG2 fails as a command, -; a new command like LRUNZ M80 PROG2, SUB M80 PROG2, or ZEX M80 PROG2 may -; be processed. If the new command fails, an appropriate error message is -; given. -; -; The ROOTONLY option causes ZCPR3 to only look at the Root (bottom of -; path) for the Extended Command Processor if it is set to TRUE. If it -; is set to FALSE, the path is searched for the Extended Command Processor. -; The tradeoff here is that ROOTONLY = TRUE is less flexible but somewhat -; faster than ROOTONLY = FALSE. -; -CMDRUN equ FALSE ; Enable the Facility - - if CMDRUN -ROOTONLY equ TRUE ; TRUE if look at Root Only for Extended - ; Command Processor, FALSE if look along - ; path -CMDFCB MACRO - db 0 - db 'CMDRUN ' ;Name of Program - db 'COM' ;File Type - ENDM - endif ;CMDRUN - - -; -; 13. FLOW COMMAND FACILITY -; -; This equate enables ZCPR3 to respond to IF processing. -; ZCPR3 simply flushes commands if a FALSE IF is currently engaged. -; FCPs must be enabled for IFON to work correctly. -; -IFON EQU FALSE - - -; -; 14. MISCELLANEOUS EQUATES -; -MAXUSR EQU 31 ;MAXIMUM USER NUMBER ACCESSABLE -MAXDISK EQU 4 ;MAXIMUM NUMBER OF DISKS ACCESSABLE - -SUPRES EQU TRUE ;SUPRESSES USER # REPORT FOR USER 0 - -SPRMPT EQU '$' ;CPR PROMPT INDICATING SUBMIT COMMAND -CPRMPT EQU '>' ;CPR PROMPT INDICATING USER COMMAND - -NUMBASE EQU 'H' ;CHAR USED TO SWITCH FROM DEFAULT NUMBER BASE - -CURIND EQU '$' ;SYMBOL FOR CURRENT DISK OR USER - -COMMENT EQU ';' ;LINES BEGINNING WITH THIS CHAR ARE COMMENTS - -; -; END OF ZCPR3 CUSTOMIZATION SECTION -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3LDRBUG.LBR b/Source/Images/d_bp/u15/Z3LDRBUG.LBR deleted file mode 100644 index 8a70b2e9..00000000 Binary files a/Source/Images/d_bp/u15/Z3LDRBUG.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/Z3LOC.MAC b/Source/Images/d_bp/u15/Z3LOC.MAC deleted file mode 100644 index 9090661a..00000000 --- a/Source/Images/d_bp/u15/Z3LOC.MAC +++ /dev/null @@ -1,212 +0,0 @@ -; -; PROGRAM: Z3LOC -; AUTHOR: RICHARD CONN -; VERSION: 1.0 -; DATE: 18 MAY 84 -; PREVIOUS VERSIONS: None -; DERIVATION: CCPLOC 1.1 (6 Jan 83) -; -VERS EQU 10 -z3env SET 0f400h - -; -; Z3LOC -- ZCPR3 Environment Element Locator -; -; The purpose of Z3LOC is to locate the addresses of the running -; ZCPR3 CCP, BDOS, and BIOS, and to display these values to the user. -; If the Z option is given, the addresses of the following system elements -; are also presented: -; -; External Path -; RCP -; IOP -; FCP -; Named Directory -; Command Line Buffer -; Shell Stack -; Environment Descriptor -; External FCB -; ZCPR3 Message Buffer -; External Stack -; Wheel Byte -; - -; -; CP/M Constants -; -bdos equ 5 ; BDOS Entry -fcb equ 5dh ; 1st char in FCB -cr equ 0dh -lf equ 0ah - -; -; Externals -; - ext z3init,envptr - ext print,phl4hc,cout,crlf - -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB Z3BASE.LIB - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env and the VLIB Env - call print - db 'Z3LOC Version ' - db (vers/10)+'0','.',(vers mod 10)+'0',0 - lda fcb ;check for help - cpi 'Z' ;Z is only option - jz start1 - cpi ' ' ;no option? - jz start1 - call print - db cr,lf,' Z3LOC or Z3LOC Z' - db cr,lf,'Z3LOC gives the addresses of the CCP, BDOS, and BIOS.' - db cr,lf,'Z3LOC Z gives all key ZCPR3 addresses.',0 - ret -start1: - call print - db cr,lf,'ZCPR3 Element Base Address' - db cr,lf,'------------- ------------',0 - - lhld bdos+1 ;get base address of BDOS - mvi l,0 ;set to even boundary - lxi d,-800H ;back up to start of CCP (size of CCP) - dad d ;HL pts to CCP - call print - db cr,lf,' CCP ',0 - call prdata - - lhld bdos+1 ;just get base address of BDOS again - call print - db cr,lf,' BDOS ',0 - call prdata - - mvi l,0 ;set even page - lxi d,0e00h ;size of BDOS - dad d ;HL pts to BIOS - call print - db cr,lf,' BIOS ',0 - call prdata - - call crlf ;new line - lda fcb ;check for Z option - cpi 'Z' - rnz ;done if not Z - - call print - db cr,lf,'Env Descriptor ',0 - lxi d,18 ;offset to env descriptor element - call z3data - call crlf - - call print - db cr,lf,'Pack: FCP ',0 - lxi d,9 - call z3data - - call print - db cr,lf,' IOP ',0 - lxi d,6 - call z3data - - call print - db cr,lf,' RCP ',0 - lxi d,3 - call z3data - call crlf - - call print - db cr,lf,'Buf: Cmd Line ',0 - lxi d,15 - call z3data - - call print - db cr,lf,' Ext FCB ',0 - lxi d,27 - call z3data - - call print - db cr,lf,' Ext Path ',0 - lxi d,0 - call z3data - - call print - db cr,lf,' Ext Stk ',0 - lxi d,29 - call z3data - - call print - db cr,lf,' Messages ',0 - lxi d,25 - call z3data - - call print - db cr,lf,' Named Dir ',0 - lxi d,12 - call z3data - - call print - db cr,lf,' Shell Stk ',0 - lxi d,21 - call z3data - - call print - db cr,lf,' Wheel Byte ',0 - lxi d,32 - call z3data - - jmp crlf ;new line and exit - -; -; Z3DATA -- Print Data Fields for a ZCPR3 Element -; -z3data: - lhld envptr ;pt to environment - dad d ;HL pts to element - lxi d,9 ;add 9 for initial offset - dad d ;fall thru to PRDATA - mov e,m ;get address - inx h - mov d,m - xchg - -; -; PRDATA -- Print Data Field (Base Address) -; -prdata: - call print - db ' ',0 - call phl4hc ;print full address - call print - db ' H',0 - ret - - end - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3LOC.OLD b/Source/Images/d_bp/u15/Z3LOC.OLD deleted file mode 100644 index e7f7844d..00000000 Binary files a/Source/Images/d_bp/u15/Z3LOC.OLD and /dev/null differ diff --git a/Source/Images/d_bp/u15/Z3LOC11.LBR b/Source/Images/d_bp/u15/Z3LOC11.LBR deleted file mode 100644 index b5f59537..00000000 Binary files a/Source/Images/d_bp/u15/Z3LOC11.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/Z3RES.HLP b/Source/Images/d_bp/u15/Z3RES.HLP deleted file mode 100644 index c65cf3b6..00000000 --- a/Source/Images/d_bp/u15/Z3RES.HLP +++ /dev/null @@ -1,220 +0,0 @@ -ZCPR3 Resident Commands -DIR Directory Display -ERA Erase Files -GET Load File into Memory -GO Re-execute Last Transient -JUMP Branch to Memory Address -NOTE Comment -REN Rename File -SAVE Write Memory Image to Disk -TYPE and LIST Commands -The DU and DIR Forms for Changing Disk and User -:ZCPR3 Resident Commands - - Likå  thå CP/Í 2.² CCP¬  ZCPR³ containó  somå  commandó -withiî itself®  Iô containó alì oæ thå CCÐ commandó (excepô -USER¬ whicè isn'ô needeä anymore© anä á fe÷ more¬ buô alì oæ -thå  ZCPR³  residenô  commandó arå  differenô  witè  logicaì -extensionó tï thå CCÐ commands. - - Thå  followinç  discussioî  applieó tï thå alì  oæ  thå -commandó  iî thå ZCPR³ Commanä Processoò  Replacement®  Thå -particulaò  selectioî oæ commandó availablå aô anù onå  timå -ió  installation-dependent®  Thå recommendeä  configuratioî -wherå  alì oæ thå residenô commandó arå enableä witè alì  oæ -theiò optionó turneä oî ió covereä here. - - Iî thå followinç discussion¬  "afn¢ referó tï thå  CP/Í -ambiguouó   filå  namå  forí  (containinç  "?¢  and/oò   "*¢ -characters©  anä  "ufn¢ referó tï thå CP/Í unambiguouó  filå -namå forí (doeó noô contaiî thå ambiguouó characters). - - - Thå DUº  oò DIRº  prefixeó maù bå useä wheneveò á  filå -namå  ió  used®  Bù  attachinç thió  prefix¬  thå  filå  ió -identifieä  tï  residå iî thå indicateä directorù (disë  anä -useò  area)®  Tï  revie÷ thå DUº  form¬  iô  ió  á  logicaì -extensioî  tï thå Dº  prefiø undeò conventionaì  CP/M®  Thå -useò numbeò ió added¬ however® Thå DIRº forí ió á mnemonic¬ -likå PASCAL¬  whicè ió relateä tï á disë anä useò areá bù aî -associatioî iî thå Nameä Directory. - - Iæ  á prefiø oæ Dº  ió used¬  iô referó tï thå  currenô -useò areá oî thå indicateä disk® Iæ á prefiø oæ Uº ió used¬ -iô  referó  tï thå indicateä useò areá oî thå currenô  disk® -DU:¬  oæ  course¬  referó tï thå indicateä useò areá oî  thå -indicateä disk. - - - Foò example¬ iæ thå useò ió loggeä intï Disë B¬ Useò 1¬ -theî thå followinç ió true: - - A:MYFILE.TXÔ -- referó tï MYFILE.TXÔ oî Disë A¬ Useò 1 - 4:MYFILE.TXT -- refers to MYFILE.TXT on Disk B, User 4 - A4:MYFILE.TXT -- refers to MYFILE.TXT on Disk A, User 4 - MYFILE.TXT -- refers to MYFILE.TXT on Disk B, User 1 - -:The DIR Command - - Thå  DIÒ  commanä ió useä tï displaù thå nameó  oæ  thå -fileó iî thå currenô directory® Iô haó threå basiã formó -- - - Display $DIR File Names DIR DU:afn - Display $SYS File Names DIR DU:afn S - Display All File Names DIR DU:afn A - - Assumå  thå  useò  ió  loggeä  intï  Disë  B¬  Useò  1® -Examples: - - DIR 4: <-- Gives all non-System files - on B4 - DIR 4: A <-- Gives all files on B4 - DIR A4:*.HLP A <-- Gives all files of type - HLP on A4 - DIR *.* S <-- Gives all System files on B1 - -:The ERA Command - - Thå ERÁ commanä ió useä tï eraså files® Iô ió noô ablå -tï eraså Read/Onlù files¬ buô iô caî eraså Systeí files® Iô -haó twï basiã formó -- - - Erase Specified Files ERA DU:afn - Erase with Verify ERA DU:afn V - - ERÁ  printó thå nameó oæ thå fileó iô erases®  Iæ  yoõ -havå selecteä thå Verifù option¬  iô alsï promptó yoõ beforå -iô eraseó theí (oò aborts¬ iæ yoõ desire). - -:The GET Command - - GEÔ  ió useä tï loaä á filå anywherå intï  memory®  Iô -requireó   twï   argumentsº   á  numbeò  (assumeä   tï   bå -hexadecimal©  oæ  thå 256-bytå pagå iî memorù  aô  whicè  tï -starô thå loaä anä thå namå oæ thå file. - - Load File Into Memory GET adr DU:ufn - - Notå thaô thió "adr¢ ió á pagå number¬  sï adr=± referó -tï 100H¬ adr=2ä referó tï 2D00H¬ etc. - -:The GO Command - Š Thå  GÏ  commanä ió useä tï reexecutå thå lasô  prograí -loadeä intï thå TPÁ withouô havinç tï reloaä it. - - Reexecute Last Transient GO params - Without Reloading It - - Thå  parameteró  arå  parseä  aó  witè  anù   transienô -command¬  anä  thå appropriatå bufferó arå loadeä bù  ZCPR3® -Aó usual¬  ZCPR³ "calls¢ thå prograí loadeä aô 100È afteò iô -haó finisheä witè thå parsinç anä buffeò loading. - -:The JUMP Command - - JUMÐ ió useä tï brancè tï anywherå iî memory® Iô takeó -onlù  onå argument¬  whicè ió thå addresó aô whicè tï  jump® -Thió  addresó caî bå tï anù bytå iî memorù (iô ió á fulì 16- -biô address)¬ anä iô ió assumeä tï bå á hexadecimaì number. - - Call Subroutine Anywhere in JUMP adr - Memory - -:The NOTE Command - - NOTÅ  ió useä tï expresó comments®  Á  linå  beginninç -witè á semicoloî (;© ió á comment¬  anä á commanä whoså verâ -ió  NOTÅ (therå maù bå manù commandó oî onå line¬  separateä -by semicolons) is a comment. - - Comment NOTE anytext - -:The REN Command - - Thå REÎ commanä ió useä tï changå thå namå oæ onå  filå -tï  another®  Again¬  iô  caî  noô  changå thå  namå  oæ  á -Read/Onlù file® Iô haó onlù onå basiã forí -- - - Renamå Filå REÎ DU:ufn1=ufn² - - Likå  ERA¬  REÎ caî "see¢ Systeí fileó aó welì  aó  DIÒ -files. - - Iæ  ufn±  alreadù exists¬  REÎ wilì asë thå useò iæ  hå -wantó tï Eraså iô (witè thå prompô "Eraså ufn1?"). - -:The SAVE Command - - Thå  SAVÅ commanä ió useä tï savå thå contentó  oæ  thå -TPÁ  ontï  disë aó á file®  Iô acceptó  twï  argumentsº  á -numbeò  anä  á filå name®  Thå filå namå maù bå  optionallù -followeä  bù thå letteò "S¢ tï indicatå thaô thå  numbeò  ió -thå numbeò oæ 128-bytå Sectoró (Blocks© tï bå saved¬ and¬ iæ -thió  optioî letteò ió omitted¬  thå numbeò ió assumeä tï bå -thå numbeò oæ 256-bytå Pageó tï bå saved®  Thå SAVÅ commanä -haó twï basiã formó -- - Š Save Memory into File SAVE n DU:ufn - Save Memory into File SAVE n DU:ufn S - and Specify Number of - Blocks - - Iæ thå number¬  n¬ ió followeä bù thå suffiø "H"¬ aó iî -"FH¢  oò "2DH"¬  theî î ió takeî tï bå á hexadecimaì  value® -Iæ  nï suffiø ió given¬  î ió assumeä tï bå  decimal®  Thió -hexadecimaì  optioî eliminateó thå neeä foò conversioî  froí -thå valueó supplieä bù debuggers¬ likå DDT. - - Iæ thå indicateä filå alreadù exists¬ SAVÅ wilì asë thå -useò iæ hå wisheó tï eraså iô witè thå prompô "Eraså ufn?". - -:The TYPE and LIST Commands - - TYPÅ anä LISÔ arå useä tï displaù fileó oî thå  consolå -anä printer¬  resp®  TYPÅ pageó bù default¬  stoppinç afteò -thå  screeî ió filled®  Theså twï commandó havå threå basiã -formó -- - - Print File on Console TYPE DU:ufn P - Without Paging - Print File on Console TYPE DU:ufn - With Paging - Print File on Printer LIST DU:ufn - - The file may be either System or DIR. - -:The DU and DIR Forms for Changing Disk and User - - Thå  DÕ  forí  standinç alonå ió useä  tï  loç  intï  á -differenô  directory®  Therå arå threå basiã formó oæ  thió -commanä -- - - Change Disk D: - Change User U: - Change Disk and User at DU: - Same Time - - - Thå  DIÒ  forí standinç alonå maù alsï bå useä  tï  loç -into a different directory. The format is: - - DIR: -like - TEXT: - - Nameä  directorieó havå passwordó associateä witè them¬ -sï iæ anù DIRº directorù referencå haó á non-blanë password¬ -thå useò wilì bå prompteä foò thå password®  Thå  directorù -referencå  wilì  bå  reseô tï hió currenô directorù  iæ  thå -password is invalid. - - - Thå  DUº  forí maù bå disableä undeò  ZCPR3¬  anä  thió -leaveó onlù thå DIRº  form®  Usinç thå DIRº form¬ directorù -access can be controlled: - - 1. only disk/user areas named can be referenced - - 2. password protection is provided - - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3TCAP.AQM b/Source/Images/d_bp/u15/Z3TCAP.AQM deleted file mode 100644 index 8262a6f7..00000000 Binary files a/Source/Images/d_bp/u15/Z3TCAP.AQM and /dev/null differ diff --git a/Source/Images/d_bp/u15/Z3TCAP.ASM b/Source/Images/d_bp/u15/Z3TCAP.ASM deleted file mode 100644 index a698a4a9..00000000 --- a/Source/Images/d_bp/u15/Z3TCAP.ASM +++ /dev/null @@ -1,1024 +0,0 @@ -; ZCPR3 System Segment: Z3TCAP (Terminal Capabilities File) -; Author: Richard Conn -; Version: 1.3 - -; Modified slightly and added some more terminals. 13 Sep 84 jww -; More terminals. 25 Sept 84 jww -; More terminals. 12 Oct 84 jww -; More terminals. 28 Oct 84 jww (Version 1.3) - -esc equ 1bh ; Escape character jww - -; -; Z3TCAP is divided into to main parts -- the index, which contains -; a set of 16-byte entries describing the names of the terminals to follow -; and the main body, which contains the details on the terminals themselves. -; Origin does not make any difference since everything is relative anyway. -; The index is always an integral number of 128-byte blocks in size, and -; each terminal entry in the main body is 128 bytes in size. -; - - ORG 100H ; just for consistency - -; -; Z3TCAP INDEX -; Structure is: -; DS 16 ; Name of Terminal -; ... -; DB ' ' ; Blank Entry Marks End -; DS 16*n ; Required to fill out last 128-byte block -; - DB 'AA Ambassador ' ;Name of Terminal - DB 'ADDS Consul 980 ' ;Name of Terminal - DB 'ADDS Regent 20 ' ;Name of Terminal - DB 'ADDS Viewpoint ' ;Name of Terminal - DB 'ADM 2 ' ;Name of Terminal - DB 'ADM 31 ' ;Name of Terminal - DB 'ADM 3A ' ;Name of Terminal - DB 'ADM 42 ' ;Name of Terminal - DB 'Bantam 550 ' ;Name of Terminal - DB 'CDC 456 ' ;Name of Terminal - DB 'Concept 100 ' ;Name of Terminal - DB 'Concept 108 ' ;Name of Terminal - DB 'CT82 ' ;Name of Terminal - DB 'DEC VT52 ' ;Name of Terminal - DB 'DEC VT100 ' ;Name of Terminal - DB 'Dialogue 80 ' ;Name of Terminal - DB 'Direct 800/A ' ;Name of Terminal - DB 'Epson GENEVA ' ;Name of Terminal - DB 'Epson QX-10 ' ;Name of Terminal - DB 'General Trm 100A' ;Name of Terminal - DB 'Hazeltine 1420 ' ;Name of Terminal - DB 'Hazeltine 1500 ' ;Name of Terminal - DB 'Hazeltine 1510 ' ;Name of Terminal - DB 'Hazeltine 1520 ' ;Name of Terminal - DB 'H19 (ANSI Mode) ' ;Name of Terminal - DB 'H19 (Heath Mode)' ;Name of Terminal - DB 'HP 2621 ' ;Name of Terminal - DB 'IBM 3101 ' ;Name of Terminal - DB 'Kaypro II ' ;Name of Terminal - DB 'Kaypro 10 ' ;Name of Terminal - DB 'Micro Bee ' ;Name of Terminal - DB 'Microterm ACT IV' ;Name of Terminal - DB 'Microterm ACT V ' ;Name of Terminal - DB 'NorthStar Advant' ;Name of Terminal - DB 'Osborne I ' ;Name of Terminal - DB 'P Elmer 1100 ' ;Name of Terminal - DB 'P Elmer 1200 ' ;Name of Terminal - DB 'Qume QVT 102 ' ;Name of Terminal - DB 'SOROC 120 ' ;Name of Terminal - DB 'Super Bee ' ;Name of Terminal - DB 'TAB 132 ' ;Name of Terminal - DB 'Teleray 1061 ' ;Name of Terminal - DB 'Teleray 3800 ' ;Name of Terminal - DB 'TTY 4424 ' ;Name of Terminal - DB 'TVI 912 ' ;Name of Terminal - DB 'TVI 920 ' ;Name of Terminal - DB 'TVI 950 ' ;Name of Terminal - DB 'TVI 970 ' ;Name of Terminal - DB 'VC 404 ' ;Name of Terminal - DB 'VC 415 ' ;Name of Terminal - DB 'Visual 200 ' ;Name of Terminal - DB 'WYSE 50 ' ;Name of Terminal - - DB ' 1.3 ' ; Last Entry -; -; Compute Space Remaining to Fill 128-byte Block -; -endsp equ 128-($-$/128*128) - if (endsp eq 128) - DS 0 - else - DS endsp - endif - -; -; TERMS - Terminal Data -; Structure is: -; DS 16 ; Name of Terminal -; DS 1 ; Char for Cursor UP -; DS 1 ; Char for Cursor DOWN -; DS 1 ; Char for Cursor RIGHT -; DS 1 ; Char for Cursor LEFT -; DS 1 ; Delay After CL -; DS 1 ; Delay After CM -; DS 1 ; Delay After CE -; DS N ; CL string, ending in 0 -; DS N ; CM string, ending in 0 -; DS N ; CE string, ending in 0 -; DS N ; SO string, ending in 0 -; DS N ; SE string, ending in 0 -; DS N ; TI string, ending in 0 -; DS N ; TE string, ending in 0 -; - -; Terminal xxxx -TTABLE: - DB 'AA Ambassador ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 156 ;CL Delay - DB 00 ;CM Delay - DB 05 ;CE Delay - DB esc,'[H',esc,'[J',0 ;CL String - DB esc,'[%i%d;%dH',0 ;CM String - DB esc,'[K',0 ;CE String - DB esc,'[7m',0 ;SO String - DB esc,'[m',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'ADDS Consul 980 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',80h,'K'-'@','@',0 ;CL String - DB 'K'-'@','%+@',esc,'E'-'@','%2',0 ;CM String - DB 0 ;CE String - DB 'Y'-'@',1eh,'N'-'@',0 ;SO String - DB 'O'-'@',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'ADDS Regent 20 ' ;Name of Terminal - DB 'Z'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'F'-'@' ;Cursor RIGHT - DB 'U'-'@' ;Cursor LEFT - DB 0 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',0 ;CL String - DB esc,'Y%+ %+ ',0 ;CM String - DB esc,'K',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'ADDS Viewpoint ' ;Name of Terminal - DB 'Z'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'F'-'@' ;Cursor RIGHT - DB 'U'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',0 ;CL String - DB esc,'Y%+ %+ ',0 ;CM String - DB esc,'K',0 ;CE String - DB 'N'-'@',0 ;SO String - DB 'O'-'@',0 ;SE String - DB esc,'0A',0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'ADM 2 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 0 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,';',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'ADM 31 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 0 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'*',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB esc,'G1',0 ;SO String - DB esc,'G0',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'ADM 3A ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 01 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'Z'-'@',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB 0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'ADM 42 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,';',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB esc,'G4',0 ;SO String - DB esc,'G0',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Bantam 550 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 20 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'K',0 ;CL String - DB esc,'X%+ ',esc,'Y%+ ',0 ;CM String - DB esc,'I',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'CDC 456 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'Y'-'@','X'-'@',0 ;CL String - DB esc,'1%+ %+ ',0 ;CM String - DB 'V'-'@',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Concept 100 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 16 ;CE Delay - DB 'L'-'@','L'-'@',0 ;CL String - DB esc,'a','%+ %+ ',0 ;CM String - DB esc,'U'-'@',0 ;CE String - DB esc,'E',esc,'D',0 ;SO String - DB esc,'d',esc,'e',0 ;SE String - DB esc,'U',esc,'v 8p',esc,'p',0dh,0 ;TI String - DB esc,'v ',80h,80h,80h,80h,80h,80h - DB esc,'p',0dh,0ah,0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Concept 108 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 16 ;CE Delay - DB esc,'?',esc,'E'-'@',0 ;CL String - DB esc,'a','%+ %+ ',0 ;CM String - DB esc,'S'-'@',0 ;CE String - DB esc,'D',0 ;SO String - DB esc,'d',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'CT82 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',0 ;CL String - DB '%r','K'-'@','%.%.',0 ;CM String - DB 'F'-'@',0 ;CE String - DB 1eh,'V'-'@',0 ;SO String - DB 1eh,'F'-'@',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'DEC VT52 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'H',esc,'J',0 ;CL String - DB esc,'Y%+ %+ ',0 ;CM String - DB esc,'K',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'DEC VT100 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 50 ;CL Delay - DB 05 ;CM Delay - DB 03 ;CE Delay - DB esc,'[;H',esc,'[2J',0 ;CL String - DB esc,'[%i%d;%dH',0 ;CM String - DB esc,'[K',0 ;CE String - DB esc,'[7m',0 ;SO String - DB esc,'[m',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Dialogue 80 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 75 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'*',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'t',0 ;CE String - DB esc,'j',0 ;SO String - DB esc,'k',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Direct 800/A ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'[1;1H',esc,'[2J',0 ;CL String - DB esc,'[%i%d;%dH',0 ;CM String - DB esc,'[K',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Epson GENEVA ' ;Name of Terminal - DB 00 ;Cursor UP - DB 00 ;Cursor DOWN - DB 00 ;Cursor RIGHT - DB 00 ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'*',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Epson QX-10 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'Z'-'@',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB esc,')',0 ;SO String - DB esc,'(',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'General Trm 100A' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',0 ;CL String - DB esc,'f%r%+ %+ ',0 ;CM String - DB esc,'K',0 ;CE String - DB esc,'b',0 ;SO String - DB esc,'a',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Hazeltine 1420 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,1ch,0 ;CL String - DB esc,'Q'-'@','%r%.%+ ',0 ;CM String - DB esc,'O'-'@',0 ;CE String - DB esc,1fh,0 ;SO String - DB esc,'Y'-'@',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Hazeltine 1500 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB '~',1ch,0 ;CL String - DB '~','Q'-'@','%r%.%+ ',0 ;CM String (correct - not same - DB '~','O'-'@',0 ;CE String as UNIX TERMCAP entry) - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Hazeltine 1510 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,1ch,0 ;CL String - DB esc,'Q'-'@','%r%.%+ ',0 ;CM String (correct?) - DB esc,'O'-'@',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Hazeltine 1520 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB '~',1ch,0 ;CL String - DB '~','Q'-'@','%r%.%+ ',80h,0 ;CM String (correct?) - DB '~','O'-'@',0 ;CE String - DB '~',1fh,0 ;SO String - DB '~','Y'-'@',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'H19 (ANSI Mode) ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'[2J',0 ;CL String - DB esc,'[%d;%dH',0 ;CM String - DB esc,'[K',0 ;CE String - DB esc,'[7m',0 ;SO String - DB esc,'[m',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'H19 (Heath Mode)' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'E',0 ;CL String - DB esc,'Y%+ %+ ',0 ;CM String - DB esc,'K',0 ;CE String - DB esc,'p',0 ;SO String - DB esc,'q',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'HP 2621 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'H',esc,'J',0 ;CL String - DB esc,'&a%r%dc%dY',0 ;CM String - DB 0 ;CE String - DB esc,'&dD',0 ;SO String - DB esc,'&d@',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'IBM 3101 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'K',0 ;CL String - DB esc,'Y%+ %+ ',0 ;CM String - DB esc,'I',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Kaypro II ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'Z'-'@',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB 0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Kaypro 10 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'Z'-'@',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB 'X'-'@',0 ;CE String - DB esc,'B1',0 ;SO String - DB esc,'C1',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Micro Bee ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'E',0 ;CL String - DB esc,'F%+ %+ ',0 ;CM String - DB esc,'K',0 ;CE String - DB esc,'dP',0 ;SO String - DB esc,'d@',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Microterm ACT IV' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',0 ;CL String - DB 'T'-'@','%.%.',0 ;CM String - DB 1eh,0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Microterm ACT V ' ;Name of Terminal - DB 'Z'-'@' ;Cursor UP - DB 'K'-'@' ;Cursor DOWN - DB 'X'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',0 ;CL String - DB 'T'-'@','%.%.',0 ;CM String - DB 1eh,0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'NorthStar Advant' ;Name of Terminal - DB 'B'-'@'+80h ;Cursor UP - DB 'J'-'@'+80h ;Cursor DOWN - DB 'F'-'@'+80h ;Cursor RIGHT - DB 'H'-'@'+80h ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 1EH,0FH,0 ;CL String - DB ESC,'=%+ %+ ',0 ;CM String - DB 0EH,0 ;CE String - DB 1,0 ;SO String - DB 2,0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Osborne I ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'Z'-'@',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB esc,')',0 ;SO String - DB esc,'(',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'P Elmer 1100 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 132 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'H',esc,'J',0 ;CL String - DB esc,'X%+ ',esc,'Y%+ ',0 ;CM String - DB esc,'I',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'P Elmer 1200 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 132 ;CL Delay - DB 00 ;CM Delay - DB 06 ;CE Delay - DB esc,'H',esc,'J',0 ;CL String - DB esc,'X%+ ',esc,'Y%+ ',0 ;CM String - DB esc,'I',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Qume QVT 102 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'Z'-'@',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB esc,'(',0 ;SO String - DB esc,')',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'SOROC 120 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 02 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'*',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Super Bee ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 03 ;CL Delay - DB 00 ;CM Delay - DB 03 ;CE Delay - DB esc,'H',esc,'J',0 ;CL String - DB esc,'F%r%3%3',0 ;CM String - DB esc,'K',0 ;CE String - DB esc,'_1',0 ;SO String - DB esc,'_0',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'TAB 132 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 50 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'[;H',esc,'[2J',0 ;CL String - DB esc,'[%i%d;%dH',0 ;CM String - DB 0 ;CE String - DB esc,'[7m',0 ;SO String - DB esc,'[m',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Teleray 1061 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 01 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',0 ;CL String - DB esc,'Y%+ %+ ',0 ;CM String - DB esc,'K',0 ;CE String - DB esc,'RD',0 ;SO String - DB esc,'R@',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Teleray 3800 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',0 ;CL String - DB esc,'Y%+ %+ ',0 ;CM String - DB esc,'K',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'TTY 4424 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'[2;H',esc,'[J',0 ;CL String - DB esc,'[%i%2;%2H',esc,'[B',0 ;CM String - DB esc,'[K',0 ;CE String - DB esc,'[7m',0 ;SO String - DB esc,'[m',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'TVI 912 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'Z'-'@',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB esc,')',0 ;SO String - DB esc,'(',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'TVI 920 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'Z'-'@',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'T',0 ;CE String - DB esc,')',0 ;SO String - DB esc,'(',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'TVI 950 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'V'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'*',0 ;CL String - DB esc,'=%+ %+ ',0 ;CM String - DB esc,'t',0 ;CE String - DB esc,')',0 ;SO String - DB esc,'(',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'TVI 970 ' ;Name of Terminal - DB 0 ;Cursor UP - DB 0 ;Cursor DOWN - DB 0 ;Cursor RIGHT - DB 0 ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'[2J',0 ;CL String - DB esc,'[%2;%2H',0 ;CM String - DB esc,'[0K',0 ;CE String - DB esc,'[2;7m',0 ;SO String - DB esc,'[7;0m',0 ;SE String - DB esc,'[0;0z',0 ;TI String - DB esc,'[0;1z',0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'VC 404 ' ;Name of Terminal - DB 'Z'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'U'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 40 ;CL Delay - DB 00 ;CM Delay - DB 20 ;CE Delay - DB 'X'-'@',0 ;CL String - DB 'P'-'@','%+ %+ ',0 ;CM String - DB 'V'-'@',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'VC 415 ' ;Name of Terminal - DB 'Z'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'U'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 'L'-'@',0 ;CL String - DB 'P'-'@','%.%.',0 ;CM String - DB 'V'-'@',0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'Visual 200 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'v',0 ;CL String - DB esc,'Y%+ %+ ',0 ;CM String - DB esc,'x' ;CE String (4 times) - DB esc,'x' - DB esc,'x' - DB esc,'x' - DB 0 ;End of CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB 'WYSE 50 ' ;Name of Terminal - DB 'K'-'@' ;Cursor UP - DB 'J'-'@' ;Cursor DOWN - DB 'L'-'@' ;Cursor RIGHT - DB 'H'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB esc,'+',0 ;CL String - DB esc,'%ia%dR%dC',0 ;CM String - DB esc,'T',0 ;CE String - DB esc,')',0 ;SO String - DB esc,'(',0 ;SE String - DB 0 ;TI String - DB 0 ;TE String - -; Terminal xxxx - ORG $/80H*80H+80H ;Next Record - DB ' 1.3 ' ;Name of Terminal - DB 'E'-'@' ;Cursor UP (Wordstar Defaults) - DB 'X'-'@' ;Cursor DOWN - DB 'D'-'@' ;Cursor RIGHT - DB 'S'-'@' ;Cursor LEFT - DB 00 ;CL Delay - DB 00 ;CM Delay - DB 00 ;CE Delay - DB 0 ;CL String - DB 0 ;CM String - DB 0 ;CE String - DB 0 ;SO String - DB 0 ;SE String - DB 0 ;TI String - DB 0 ;TE String - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3TCAP.HLP b/Source/Images/d_bp/u15/Z3TCAP.HLP deleted file mode 100644 index d9424054..00000000 --- a/Source/Images/d_bp/u15/Z3TCAP.HLP +++ /dev/null @@ -1,1106 +0,0 @@ -; - - - ZCPR3 Terminal Capabilities (TCAP) - - -- Utilities -- -- Documentation -- - 1 - TCCHECK I - Introduction - 2 - TCMAKE S - Z3T Structure - 3 - TCSELECT G - General Control Seqs - C - Cursor Control Seqs - 4 - Z3TCAP V - VLIB Overview - - -:I - ZCPR3 Terminal Capabilities (TCAP) - Introduction - Thå  ZCPR³ Terminaì Capabilitieó (TCAP© Facilitù ió  aî -integraì  parô oæ thå ZCPR³ System®  Bù meanó oæ  thå  TCAÐ -Facility¬  thå user'ó terminaì ió defineä tï ZCPR³ iî sucè á -waù  thaô programó iî thå ZCPR³ Systeí caî perforí á varietù -oæ screen-orienteä functionó witè thå user'ó terminal®  Thå -TCAÐ Facilitù ió fundamentaì tï ZCPR3¬  anä iô ió á parô  oæ -thå ZCPR³ Environmenô Descriptor. - - Thå  TCAÐ entrieó contaiî thå followinç informatioî  oî -their respective terminals: - - o initialization/deinitialization sequences - o characters generated by the arrow keys - o sequence for clearing the screen - o sequence for positioning the cursor - o sequence for erasing to end of line - o highlight/non-highlight sequences - - Introduction - Witè thió information¬  programó sucè aó VFILER¬ VMENU¬ -anä  HELР caî  perforí theiò functionó witè á  mucè  higheò -degreå  oæ  "flash¢ anä user-friendlinesó  thaî  theù  woulä -otherwise®  Bù  simplù  loadinç thå TCAÐ entrù foò  anotheò -terminaì intï thå environmenô descriptor¬ alì ZCPR³ programó -arå automaticallù reconfigureä foò thå ne÷ terminaì anä  caî -continue to function without modification. - - Twï  utilitieó  arå provideä tï assisô thå useò iî  thå -creatioî  oæ Z3T fileó foò hió terminals®  TCSELECÔ  allowó -thå  useò  tï selecô á predefineä terminaì froí  thå  Z3TCAÐ -file¬  anä TCMAKÅ allowó thå useò tï definå á terminaì whicè -is not covered by the Z3TCAP file. - - Mosô  oæ  thå  informatioî iî thió  HLР filå  provideó -detailó  oî  thå structurå oæ thå Z3T fileó  anä  giveó  thå -TCMAKÅ useò enougè detaiì tï definå hió terminal® Providinç -this information is the main purpose of this HLP file. - - Introduction - Thå   filå  Z3TCAР containó  informatioî  oî  oveò  4° -terminals®  Thå  TCSELECÔ prograí printó á numbeò oæ  menuó -containinç  thå  nameó  oæ thå terminaló iî  thió  filå  anä -allowó  thå  useò tï selecô  one¬  storinç  itó  informatioî -eitheò   directlù   intï  thå  memory-residenô   Environmenô -Descriptoò  oò  intï á filå oæ typå Z3T whicè maù  lateò  bå -loadeä bù thå LDÒ utility. - - Iæ  thå user'ó terminaì ió noô alreadù defineä  iî  thå -Z3TCAР file¬  thå  TCMAKÅ  prograí ió useä  tï  definå  hió -terminal®  TCMAKÅ  allowó thå useò tï interactivelù  definå -eacè oæ thå keù attributeó oæ hió terminaì anä creatå á filå -oæ typå Z3T wheî done® Thió filå maù lateò bå loadeä bù thå -LDÒ utility. - - -:S - Internal Structure of a Z3T File - Structure - Á  Z3T Filå defineó thå characteristicó oæ á particulaò Introduction -terminal® Eacè Z3T filå containó thå followinç information: - - o the name of the terminal - o the codes generated by the arrow keys - o the byte sequences required: - to clear the screen - to position the cursor - to clear to end of line - to highlight chars - to initialize and deinitialize the terminal - - Iî  detail¬  thå followinç ió thå exacô structurå oæ  á -Z3T file: - - Structure - Z3T File Structure, Overview Introduction - -Z3T_FILE: -name: - DS 16 ; Name of Terminal -arrows: - DS 4 ; Bytes generated by arrow keys -delays: - DS 3 ; Delays for Screen Clear, Cursor Motion, and - ; Clear to End-of-Line - -cl: DS N1+1 ; Sequence used for Screen Clear -cm: DS N2+1 ; Sequence used for Cursor Motion (gotoxy) -ce: DS N3+1 ; Sequence used for Clear to End-of-Line -so: DS N4+1 ; Sequence used to begin highlighting -se: DS N5+1 ; Sequence used to end highlighting -ti: DS N6+1 ; Sequence used to initialize terminal -to: DS N7+1 ; Sequence used to deinitialize terminal - - Structure - Thå  followinç frameó definå thå TCAР records®  Theså Introduction -records are: - - 1. the name of the terminal - 2. the definition of the arrow keys - 3. the delay constants for screen clear, cursor - motion, and clear to end-of-line - 4. the definition of the screen clear char sequence - 5. the defn of the cursor motion char seq - 6. the defn of the clear to EOL char seq - 7. the defn of the highlight/end-highlight char seq - 8. the defn of the init/deinit terminal char seq - - Eacè  oæ  theså recorä  definitionó  ió  similarº  thå -structurå  oæ thå recorä (iî assemblù languagå terminology)¬ -commentó  oî ho÷ thå recorä ió defineä anä whaô  valueó  arå -valiä  foò it¬  anä exampleó oæ valiä recorä structureó  arå -provideä foò eacè recorä definition. - - Structure -1. Terminal Name 1 Term Name - -Structure: - DS 16 ; Name of Terminal (Space Fill on Right) - -Comment: - Thå  namå oæ thå terminaì ió alwayó 1¶ byteó long®  Iæ -thå namå takeó lesó thaî 1¶ bytes¬  spacå filì occuró  righô -of the last character. - -Examples: - DB 'ADDS Consul 980 ' - DB 'ADM 2 ' - - - Structure -2. Arrow Keys 2 Arrow Keys - -Structure: - DS 1 ; Byte Generated by Cursor UP - DS 1 ; Byte Generated by Cursor DOWN - DS 1 ; Byte Generated by Cursor RIGHT - DS 1 ; Byte Generated by Cursor LEFT - -Comment: - Iæ  youò  terminaì haó arro÷ keyó oî iô WHICÈ  GENERATÅ -ONLÙ ONÅ BYTÅ WHEÎ DEPRESSED¬ theî theså keyó maù bå defineä -iî thå Z3T file®  Wheî á prograí calló foò thå uså oæ arro÷ -keys, it will use the values stored here. - - Structure - Iæ youò terminaì doeó noô havå arro÷ keyó oò haó  arro÷ 2 Arrow Keys -keyó whicè generatå morå thaî onå bytå wheî depressed¬ theså -keyó maù noô bå defineä iî thå Z3T file® Zerï (0© ió storeä -iî alì fouò byteó oæ thå "arro÷ key¢ record®  Iî thió case¬ -thå  prograí  wilì  responä  tï thå  Worä  Staò  (trademark¬ -Micropro© arro÷ keù conventioî (^Å ió UP¬  ^Ø ió DOWN¬ ^Ä ió -RIGHT, and ^S is LEFT): - - ^E - ^ - | - ^S <--+--> ^D - | - v - ^X - - Structure -Examples: 2 Arrow Keys - DB 'K'-'@' ; ADM 31 ^K for Cursor UP - DB 'J'-'@' ; ^J for Cursor DOWN - DB 'L'-'@' ; ^L for Cursor RIGHT - DB 'H'-'@' ; ^H for Cursor LEFT - - DB 0,0,0,0 ; None for H19 because of 2-char seqs - ; Word Star Convention will be used - - - Structure -3. Function Delays 3 Delays - -Structure: - DS 1 ; Delay (in mS) after sending clear screen - DS 1 ; Delay (in mS) after sending gotoxy - DS 1 ; Delay (in mS) after sending clear to EOL - -Comment: - Eacè oæ theså byteó defineó thå numbeò oæ  millisecondó -á  prograí wilì delaù afteò sendinç á particulaò sequencå tï -thå  user'ó terminal®  Somå terminaló requirå thió typå  oæ -delay®  Iæ á sequencå requireó nï delay¬  thå valuå oæ zerï -(0) should be placed in the corresponding byte. - -Examples: - DB 20,0,0 ; BANTAM 550 - 20mS for Clear Screen, 0 - ; for Cursor Motion and Clear to EOL - - DB 0,0,0 ; TVI 950 - No Delays - Structure -4. Clear Screen Sequence 4 Clear Screen - -Structure: - DS N1 ; Bytes in clear screen sequence - DB 0 - -Comment: - Thió  sequencå oæ bytes¬  uð tï buô noô  includinç  thå -terminatinç  0¬  ió senô tï thå user'ó terminaì iî ordeò  tï -cleaò  hió screen®  Iæ iô ió necessarù tï includå á  binarù -zero in this sequence, the two bytes - - DB '\',0 - -wilì  transmiô aô onå binarù 0 and - - DB '\\' - -wilì transmiô aó onå backslash® - Structure - Iî general¬ á backslasè (\© ió thå quotå character¬ anä 4 Clear Screen -anù  bytå  whicè followó iô ió transmitteä literallù tï  thå -user'ó terminal. - - Iæ  á terminaì requireó thaô trailinç nulló follo÷  thå -lasô  characteò  oæ thå sequencå foò thå purposå  oæ  screeî -settlinç  (ratheò thaî usinç thå delaù byte)¬  nulló caî  bå -appended into the sequence by using the quote character. - - -Examples: - DB 1BH,';',0 ; Clear Screen for ADM2 - DB 'L'-'@',0 ; Clear Screen for ADDS Viewpoint - DB 1BH,'?',1BH,'E'-'@',0 - ; Clear Screen for Concept 108 - - Structure -5. Cursor Motion (GOTOXY) Sequence 5 Cursor Motion - -Structure: - DS N2 ; Bytes in gotoxy sequence - DB 0 - -Comments: - Thió  sequencå oæ byteó ió senô tï thå user'ó  terminaì -iî  ordeò tï positioî thå cursoò oî hió screen®  Thå  quotå -characteò  (\©  caî  bå used¬  likå  iî  thå  Cursoò  Motioî -sequence¬ tï allo÷ quotå characteró anä nulló tï bå sent. - - Unlikå  thå  otheò sequenceó iî thå TCAР records¬  thå -Cursoò Motioî sequenceó varù dependinç upoî thå positioî  oî -thå  screen® - - Structure - Foò  instance¬  tï placå thå cursoò aô ro÷ 4¬  columî ´ 5 Cursor Motion -(homå ió ro÷ 0¬ coì 0© oî á TVÉ 950¬ thå sequence - - DB 1BH,'=$$',0 - -is used, but to position at row 6, column 6, the sequence - - DB 1BH,'=&&',0 - -is used. - Iî ordeò tï expresó sucè variable-valuå sequences¬  thå -ZCPR³  TCAР provideó  foò  equationó whicè  definå  ho÷  tï -compute the byte to be output. The TCAP sequence: - - DB 1BH,'=%+ %+ ',0 - -defineó  ho÷ tï computå thå valueó tï bå outpuô iî ordeò  tï -move the cursor for the TVI 950. - Structure - The TCAP Cursor Motion sequence 5 Cursor Motion - - DB 1BH,'=%+ %+ ',0 - -is broken down as follows: - - Element Meaning - ------- ------- - 1BH Output 1B hex (the ESCAPE char) - '=' Output the character '=' - '%« ' Adä § § (20H© tï thå ro÷ valuå anä output - '%+ ' Add ' ' (20H) to the column value and output - - Thå  percenô characteò (%© instructó thå cursoò  motioî -sequencå interpreteò tï looë foò á command¬ anä iô processeó -thå  followinç  characteró aó such®  Iæ iô  ió  desireä  tï -outpuô '%§ itself¬ thå sequencå '\%§ ió used. - - Structure - Thå  commandó recognizeä bù thå cursoò  motioî  commanä 5 Cursor Motion -interpreteò wilì no÷ bå discusseä iî detail® Theså commandó -are the following (case is not significant): - - %R - Reverse order from row/col to col/row - %I - Home position is (1,1) rather than (0,0) - %. - Print current value (row or col) in binary - %2 - Print current value as 2 ASCII decimal digits - %3 - Print current value as 3 ASCII decimal digits - %d - Print current value as N ASCII decimal digits - (no leading zeroes) - %+n - Add n to current value and output in binary - %>xù - Adä ù tï currenô valuå iæ iô ió greater - than x - - Structure - Thå cursoò motioî sequencå interpreteò assumeó thaô thå 5 Cursor Motion -valuå  oæ  thå  ro÷ wilì bå outpuô beforå thå valuå  oæ  thå -column. If the column is to be first, the command - - '%r' or '%R' - -instructó  thå cursoò motioî sequencå interpreteò tï  outpuô -thå  columî  anä theî thå row®  Thå '%R§  commanä  musô  bå -presenô  iî  thå sequencå beforå thå firsô valuå ió  output¬ -anä  '%R§ actó solelù tï commanä thå interpreteò  (nï  byteó -are output by '%R'). - - Structure - Thå  cursoò  motioî sequencå interpreteò  alsï  assumeó 5 Cursor Motion -thaô thå valuå oæ thå homå positioî ió ro÷ 0¬  columî 0® Iæ -iô  ió convenienô tï seô thió positioî tï ro÷ 1¬  columî  1¬ -the command - - '%i' or '%I' - -ió  used®  Likå '%R'¬  '%I§ musô bå useä beforå  thå  firsô -valuå ió output. - - The TVI 950 can be defined in two ways: - - DB 1BH,'=%+ %+ ',0 -or - DB 1BH,'%i=%+',1FH,'%+',1FH,0 - - Structure - Thå  resô  oæ thå cursoò  motioî  sequencå  interpreteò 5 Cursor Motion -commandó deaì witè thå formaô oæ thå output® Theù allo÷ thå -following types of outputs: - -%. binary value (^A is output as 1) -%2 2 ASCII Decimal Digits (^A is output as '01') -%3 3 ASCII Decimal Digits (^A is output as '001') -%d As many ASCII Decimal Digits as needed (^A as '1') -%+n Add offset ('%+ ' outputs ^A as 1+' ' or '!') -%>xy Add offset if limit reached ('%> '1 outputs ^A as 1 - and '!' as '"') - - Tï summarize: - - Structure - Cursor Motion Interpreter Commands 5 Cursor Motion - - Command Output Format - ------- ------------- - %. Binary Value - %2 2 ASCII Decimal Digit Chars ('23') - %3 3 ASCII Decimal Digit Chars ('123') - %ä Aó manù ASCIÉ Decimaì Digiô Charó aó needed - %+n Add the value of the byte following the '+' - and output in binary - %>xy If value > x, output value+y in binary; else - output value in binary - - Command Cursor Motion Interpreter Action - ------- -------------------------------- - %i Set Home to 1,1 (default is 0,0) - %r Output Col, then Row (default is Row, then Col) - - Structure -Examples: 5 Cursor Motion - DB 1BH,'Y%+ %+ ',0 ; ADDS Viewpoint - - 1BH = output 1BH (ESCAPE char) - 'Y' = output char 'Y' - '%+ ' = output row + ' ' (20H) in binary - '%+ ' = output col + ' ' (20H) in binary - - DB 1BH,'[%d;%dH',0 ; H19 (ANSI Mode) - - 1BH = output 1BH (ESCAPE char) - '[' = output char '[' - '%d' = output row as ASCII decimal digits - ';' = output char ';' - '%d' = output col as ASCII decimal digits - 'H' = output char 'H' - - Structure -6. Clear to End of Line 6 Clear to EOL - -Structure: - DS N3 ; Bytes in clear to end of line sequence - DB 0 - -Comments: - Thå  Cleaò tï Enä oæ Linå sequencå ió useä tï cleaò thå -linå  startinç  aô  thå cursoò positioî tï thå  enä  oæ  thå -screen. Only this part of the current line is cleared. - - Thå ruleó foò specifyinç thió sequencå arå thå samå  aó -those for Screen Clear. - -Example: - DB 1BH,'T',0 ; ADM 2 - - - Structure -7. Begin Highlighting (Standout Mode) and End Highlighting 7 Highlighting - -Sequences: - DS N4 ; Bytes in sequence to begin highlighting - DB 0 - - DS N5 ; Bytes in sequence to end highlighting - DB 0 - -Comments: - Thå  "begiî  highlighting¢  sequencå ió useä  tï  begiî -highlighô modå oî thå user'ó terminal®  Thió maù bå reverså -video¬ dim¬ oò somå otheò non-standarä methoä foò displayinç -characteró  oî  thå  screen®  Iî ordeò foò  á  terminaì  tï -supporô thió feature¬ thå followinç musô bå true: - - Structure - 1® Issuinç thió sequencå musô NOÔ changå thå positioî 7 Highlighting -oæ thå cursoò oî thå screen. - - 2®  Characteró highlighteä musô bå outpuô iî exactlù -thå samå waù non-highlighteä characteró arå (eg¬ settinç thå -MSB of the highlighted chars is not allowed). - - These sequences are always used as follows: - - 1. the BEGIN HIGHLIGHT sequence is output - 2. a set of characters to highlight is output - 3. the END HIGHLIGHT sequence is output - - Thå  ruleó foò specifyinç theså sequenceó arå thå  samå -aó thoså foò Screeî Clear. - - Structure -Example: 7 Highlighting - DB 'N'-'@',0 ;ADDS Viewpoint - - Structure -8. Terminal Initialization and Deinitialization 8 Term Init - -Sequences: - DS N6 ; Bytes in sequence to init terminal - DB 0 - - DS N7 ; Bytes in sequence to deinit terminal - DB 0 - -Comments: - Beforå  anù videï routineó arå executed¬  thå  terminaì -initializatioî sequencå ió senô tï thå terminal®  Afteò thå -uså  oæ  thå  terminaì  ió  completeä  bù  á  program¬   thå -deinitialization sequence is sent. - - Thå ruleó foò specifyinç thió sequencå arå thå samå  aó -those for Screen Clear. - - -:G - General Terminal Control Sequences - Control 1 - The structure of most TCAP control sequences is: - - DS N ; Bytes in sequence - DB 0 - - Thió  sequencå  oæ bytes¬  uð tï buô noô includinç  thå -terminatinç  0¬  ió senô tï thå user'ó terminaì iî ordeò  tï -perforí  somå  function®  Iæ iô ió necessarù tï  includå  á -binarù zerï iî thió sequence¬ thå twï bytes - - DB '\',0 - -wilì transmiô as onå binarù ° and - - DB '\\' - -wilì transmiô aó onå backslash® - - Control 1 - Á  backslasè (\© ió thå quotå character¬  anä anù  bytå -whicè  followó  iô ió transmitteä literallù  tï  thå  user'ó -terminal. - - Iæ  á terminaì requireó thaô trailinç nulló follo÷  thå -lasô  characteò  oæ thå sequencå foò thå purposå  oæ  screeî -settlinç  (ratheò thaî usinç thå delaù byte)¬  nulló caî  bå -appended into the sequence by using the quote character. - - Cursoò  Motioî  sequenceó follo÷ theså ruleó  witè  thå -additioî  thaô  thå characteò "%¢ prefixeó á  cursoò  motioî -interpreteò command® Iæ iô ió desireä tï simplù outpuô thió -characteò iî á cursoò motioî sequence¬  thå quotå  characteò -can be used: - - DB '\%' - -:C - Cursor Motion Control Sequences - Control 2 - Cursoò  Motioî  sequenceó arå differenô froí thå  otheò -sequenceó  defineä  iî  thå  TCAР iî  thaô  cursoò   motioî -sequenceó  contaiî  embeddeä commandó foò thå cursoò  motioî -interpreter®   Alì  Cursoò  Motioî  sequenceó  arå  oæ  thå -following general format: - - - - Foò example¬  thå DEà VT10° terminaì useó thå followinç -sequence for cursor motion: - - DB 1BH,'[%i%d;%dH',0 -where: - 1BH,'[' = prefix chars 1BH (ESCAPE) and '[' - %i = command: home is 1,1 - %d = command: output row as ASCII dec chars - ';' = infix char ';' - %d = command: output col as ASCII dec chars - 'H' = suffix char 'H' - Control 2 - Thå prefix¬  infix¬ anä postfiø sequenceó arå optional¬ -anä onlù thå commandó tï outpuô thå ro÷ anä coì arå requireä -in any cursor motion sequence definition. - - Cursoò Motioî ió thå onlù requireä entrù iî á TCAР foò -á  terminal®  Alì otheò sequenceó maù bå emptù (null)¬  anä -thå  lacë oæ theså otheò sequenceó wilì bå compensateä  for® -Cursoò motion¬  however¬  cannoô bå simulateä easilù anä  ió -required. - - Thå followinç tablå summarizeó alì oæ thå Cursoò Motioî -interpreter commands. - - Control 2 - Cursor Motion Interpreter Commands - - Command Output Format - ------- ------------- - %. Binary Value - %2 2 ASCII Decimal Digit Chars ('23') - %3 3 ASCII Decimal Digit Chars ('123') - %ä Aó manù ASCIÉ Decimaì Digiô Charó aó needed - %+n Add the value of the byte following the '+' - and output in binary - %>xy If value > x, output value+y in binary; else - output value in binary - - Command Cursor Motion Interpreter Action - ------- -------------------------------- - %i Set Home to 1,1 (default is 0,0) - %r Output Col, then Row (default is Row, then Col) - - Control 2 -Examples: - DB 1BH,'Y%+ %+ ',0 ; ADDS Viewpoint - - 1BH = output 1BH (ESCAPE char) - 'Y' = output char 'Y' - '%+ ' = output row + ' ' (20H) in binary - '%+ ' = output col + ' ' (20H) in binary - - DB 1BH,'[%d;%dH',0 ; H19 (ANSI Mode) - - 1BH = output 1BH (ESCAPE char) - '[' = output char '[' - '%d' = output row as ASCII decimal digits - ';' = output char ';' - '%d' = output col as ASCII decimal digits - 'H' = output char 'H' - -:V - Overview of VLIB - VLIB - VLI (Videï LIBrary© ió thå ZCPR³ librarù whicè ió useä -tï  providå á serieó oæ low-leveì routineó foò Z3TCAÐ accesó -tï thå ZCPR³ systeí programmer®  VLI ió describeä iî  mucè -morå  detaiì  iî thå VLIB.HLÐ file¬  anä thió overvie÷  onlù -serves to summarize its capabilities. - - Thå VLI routinå Z3VINIÔ ió useä tï initializå VLI foò -uså  witè  á  ZCPR³  system®   Thå  addresó  oæ  thå  ZCPR³ -environmenô  descriptoò ió passeä tï thå Z3VINIÔ routinå  iî -HL¬  anä  alì VLI routineó kno÷ thå addresó oæ  thå  Z3TCAÐ -entry from that point forward. - - The low-level functions provided by VLIB are: - - VLIB - Routine Function - ------- -------- - TINIT Initialize terminal - DINIT Deinitialize terminal - - CLS Clear screen - - EREOL Erase to End of Line - - GOTOXY Position Cursor - - STNDOUT Begin highlighting - STNDEND End highlighting - - AT Position Cursor - - GXYMSG Print message, with highlighting, at XY - VPRINT Print message with highlighting - -:4 - Standard ZCPR3 TCAP File - Z3TCAP - Thå  filå  Z3TCAР containó  informatioî  oî  oveò   4° -terminals®  Iô  ió provideä aó á parô oæ thå ZCPR³  System¬ -anä iô ió useä bù TCSELECT®  TCSELECÔ caî displaù thå nameó -oæ  thå terminaló containeä iî Z3TCAÐ anä allo÷ thå useò  tï -selecô one¬ generatinç á *.Z3T filå oò storinç thå selectioî -directlù  intï memorù foò immediatå uså bù thå ZCPR³  Systeí -utilities. - -:1 - -Command: TCCHECK 1.0 - -Syntax: - TCCHECK ufn <-- default file type is TCP -or - TCCHECK <-- check Z3TCAP.TCP - -Function: - TCCHECË  checkó á Z3TCAP.TCÐ filå foò valiä formaô  anä -reports any errors and statistical information on it. - -Options: - None - - -Comments: - TCCHECË   ió   intendeä  tï  ruî  iî  á   non-installeä -environmenô (sucè aó wheî thå useò firsô receiveó ZCPR3)¬ sï -thå  Z3TCAP.TCР filå beinç checkeä musô bå iî  thå  currenô -directory. - -Selected Error Messages: - Self-Explanatory - -Examples of Use: - - TCCHECK - -- check Z3TCAP.TCP - - TCCHECK - TCAP Check Program - TCCHECK - TCCHECË   ió   useä  tï  checë  thå  Z3TCAР filå   foò -consistency® Itó solå functioî ió tï ensurå thå validitù oæ -the Z3TCAP file and provide some statistics on it. - - Sample run of TCCHECK: - -B4:SCR2>tccheck -TCCHECK, Version 1.0 File Z3TCAP .TCP Not Found - Aborting - -- Note: Z3TCAP.TCP MUST be in the same directory - -B4:SCR2>root: -A15:ROOT>tccheck -TCCHECK, Version 1.0 -Z3TCAP File Check of Z3TCAP .TCP Version 1.1 - File Checks with 44 Terminals Defined - - - -:2 - -Command: TCMAKE 1.0 - -Syntax: - TCMAKE ufn <-- default file type is Z3T - -Function: - TCMAKÅ  allowó  thå useò tï  interactivelù  definå  thå -characteristicó  oæ hió terminaì anä storå thió  informatioî -iî thå filå referenced® Thió filå maù theî bå loadeä bù thå -LDR utility. - -Options: - None - - -Comments: - A sample TCMAKE session is located in this HELP file. - -Selected Error Messages: - Self-Explanatory - -Examples of Use: - See following frames - - - - TCMAKE - TCAP Entry Definition Program - TCMAKE - TCMAKÅ ió useä tï creatå á *.Z3T file®  Oncå  created¬ -thå  ZCPR³ utilitù LDÒ caî loaä iô intï memorù aô thå propeò -location (command is "LDR filename.Z3T"). - - Sample run of TCMAKE: - -B4:SCR2>tcmake // -TCMAKE, Version 1.0 -TCMAKE - Create a Z3T File -Syntax: - TCMAKE outfile -or- TCMAKE outfile.typ - -where "outfile" is the file to be generated by -the execution of TCMAKE. If no file type is -given, a file type of Z3T is the default. - - TCMAKE -B4:SCR2>tcmake myterm2 -TCMAKE, Version 1.0 - - ** Z3TCAP Main Menu for File MYTERM2 .Z3T ** - -Define: 1. Clear Screen Sequence - 2. Cursor Motion Sequence - 3. Clear to End of Line Sequence - 4. Standout Mode Sequences - 5. Terminal Init/Deinit Sequences - 6. Arrow Keys - 7. Terminal Name - -Status: S. Print Status (Definitions so far) - -Exit: X. Exit and Write File - Q. Quit and Abort Program without Writing File - -Command? 2 - TCMAKE -Cursor Motion Definition - 1. Timing Delay - Enter Delay Time in Milliseconds: 5 - 2. Enter R if Row/Column or C for Column/Row: R - 3. Enter Equation for Row: %+ - 4. Enter Equation for Column: %+ - 5. Enter Prefix Byte Sequence - Char #1 - Type Char, .=Number, or =Done: Enter Number: 1bh - Char #2 - Type Char, .=Number, or =Done: Char = - Char #3 - Type Char, .=Number, or =Done: - 6. Enter Middle Byte Sequence - Char #1 - Type Char, .=Number, or =Done: - 7. Enter Suffix Byte Sequence - Char #1 - Type Char, .=Number, or =Done: - - TCMAKE - ** Z3TCAP Main Menu for File MYTERM2 .Z3T ** - -Define: 1. Clear Screen Sequence - 2. Cursor Motion Sequence - 3. Clear to End of Line Sequence - 4. Standout Mode Sequences - 5. Terminal Init/Deinit Sequences - 6. Arrow Keys - 7. Terminal Name - -Status: S. Print Status (Definitions so far) - -Exit: X. Exit and Write File - Q. Quit and Abort Program without Writing File - -Command? 6 - - TCMAKE -Arrow Key Definition - Your Terminal's Arrow Keys may be defined ONLY - if they generate only one character each. If they - do, type Y to continue. If not, type anything else. - Define Arrow Keys (Y/N)? Y - Strike the Appropriate Arrow Key - 1. Arrow UP? ^K - 2. Arrow DOWN? ^V - 3. Arrow RIGHT? ^L - 4. Arrow LEFT? ^H - - TCMAKE - ** Z3TCAP Main Menu for File MYTERM2 .Z3T ** - -Define: 1. Clear Screen Sequence - 2. Cursor Motion Sequence - 3. Clear to End of Line Sequence - 4. Standout Mode Sequences - 5. Terminal Init/Deinit Sequences - 6. Arrow Keys - 7. Terminal Name - -Status: S. Print Status (Definitions so far) - -Exit: X. Exit and Write File - Q. Quit and Abort Program without Writing File - -Command? S - - TCMAKE - ** Z3TCAP Status for File MYTERM2 .Z3T ** - -Review: 1. Clear Screen Definition - 2. Cursor Motion Definition - 3. Clear to End of Line Definition - 4. Standout Mode Definition - 5. Terminal Init/Deinit Definition - 6. Arrow Key Definition - 7. Terminal Name Definition - -Exit: X. Exit to Main Menu - -Command? 1 -Review of Clear Screen Definition - 1. Timing Delay = 0 Milliseconds - 2. Clear Screen Sequence: - (1) ^[ 1BH (2) * 2AH - Strike Any Key to Continue - - - TCMAKE - ** Z3TCAP Status for File MYTERM2 .Z3T ** - -Review: 1. Clear Screen Definition - 2. Cursor Motion Definition - 3. Clear to End of Line Definition - 4. Standout Mode Definition - 5. Terminal Init/Deinit Definition - 6. Arrow Key Definition - 7. Terminal Name Definition - -Exit: X. Exit to Main Menu - -Command? 2 - - TCMAKE -Review of Cursor Motion Data - 1. Timing Delay = 5 Milliseconds - 2. Row or Column First: R - 3. Row Equation: -->%+ <-- - 4. Column Equation: -->%+ <-- - 5. Prefix Byte Sequence: - (1) ^[ 1BH (2) = 3DH - 6. Middle Byte Sequence: - -- Empty -- - 7. Suffix Byte Sequence: - -- Empty -- - Strike Any Key to Continue - - - TCMAKE - ** Z3TCAP Status for File MYTERM2 .Z3T ** - -Review: 1. Clear Screen Definition - 2. Cursor Motion Definition - 3. Clear to End of Line Definition - 4. Standout Mode Definition - 5. Terminal Init/Deinit Definition - 6. Arrow Key Definition - 7. Terminal Name Definition - -Exit: X. Exit to Main Menu - -Command? 6 - - TCMAKE -Review of Arrow Key Definitions - 1. Arrow UP = ^K - 2. Arrow DOWN = ^V - 3. Arrow RIGHT = ^L - 4. Arrow LEFT = ^H - Strike Any Key to Continue - - - TCMAKE - ** Z3TCAP Status for File MYTERM2 .Z3T ** - -Review: 1. Clear Screen Definition - 2. Cursor Motion Definition - 3. Clear to End of Line Definition - 4. Standout Mode Definition - 5. Terminal Init/Deinit Definition - 6. Arrow Key Definition - 7. Terminal Name Definition - -Exit: X. Exit to Main Menu - -Command? X - - TCMAKE - ** Z3TCAP Main Menu for File MYTERM2 .Z3T ** - -Define: 1. Clear Screen Sequence - 2. Cursor Motion Sequence - 3. Clear to End of Line Sequence - 4. Standout Mode Sequences - 5. Terminal Init/Deinit Sequences - 6. Arrow Keys - 7. Terminal Name - -Status: S. Print Status (Definitions so far) - -Exit: X. Exit and Write File - Q. Quit and Abort Program without Writing File - -Command? X - Selected Terminal is: Rick's Terminal -- Confirm (Y/N)? Y -File MYTERM2 .Z3T Created -:3 - -Command: TCSELECT 1.0 - -Syntax: - TCSELECT ufn <-- default file type is Z3T -or - TCSELECT <-- selection stored in Env Desc - -Function: - - TCSELECÔ  allowó  thå useò tï interactivelù revie÷  thå -contentó oæ á Z3TCAP.TCÐ filå anä selecô á terminaì froí it® -Iæ aî unambigouó filå namå ió specifieä iî thå commanä line¬ -TCSELECÔ storeó thå selectioî intï thå indicateä  file®  Iæ -nï  filå  namå  ió  given¬  TCSELECÔ  storeó  thå  selectioî -directlù   intï   thå  TCAР sectioî  oæ  thå   memory-baseä -Environmenô Descriptor. - -Options: - None - -Comments: - None - -Selected Error Messages: - Self-Explanatory - -Examples of Use: - See following frames - - - TCSELECT - TCAP Entry Selection Program - TCSELECT - TCSELECÔ ió useä tï selecô á terminaì froí thå standarä -Z3TCAÐ file®  Thå selecteä terminaì maù bå loadeä  directlù -intï memorù oò á *.Z3T filå maù bå created® Iæ á *.Z3T filå -ió created¬ thå ZCPR³ utilitù LDÒ caî loaä iô intï memorù aô -the proper location (command is "LDR filename.Z3T"). - - Sample run of TCSELECT: - - TCSELECT -B4:SCR2>tcselect // -TCSELECT, Version 1.0 -TCSELECT - Select Entry from Z3TCAP.TCP -Syntax: - TCSELECT outfile -or- TCSELECT outfile.typ - -where "outfile" is the file to be generated by -the execution of TCSELECT. If no file type is -given, a file type of Z3T is the default. - -Syntax: - TCSELECT - -where this alternate form may be used to store -the Z3TCAP entry for the selected terminal directly -into the Z3 Environment Descriptor. - - TCSELECT -Example 1: Create MYTERM.TCP Example 1 - -B4:SCR2>tcselect myterm -TCSELECT, Version 1.0 - -** Terminal Menu 1 for Z3TCAP Version 1.1 ** - -A. AA Ambassador K. Concept 100 -B. ADDS Consul 980 L. Concept 108 -C. ADDS Regent 20 M. CT82 -D. ADDS Viewpoint N. DEC VT52 -E. ADM 2 O. DEC VT100 -F. ADM 31 P. Dialogue 80 -G. ADM 3A Q. Direct 800/A -H. ADM 42 R. General Trm 100A -I. Bantam 550 S. Hazeltine 1420 -J. CDC 456 T. Hazeltine 1500 - -Enter Selection, + for Next, or ^C to Exit - + - TCSELECT -** Terminal Menu 2 for Z3TCAP Version 1.1 ** Example 1 - -A. Hazeltine 1510 K. P Elmer 1200 -B. Hazeltine 1520 L. SOROC 120 -C. H19 (ANSI Mode) M. Super Bee -D. H19 (Heath Mode) N. TAB 132 -E. HP 2621 O. Teleray 1061 -F. IBM 3101 P. Teleray 3800 -G. Micro Bee Q. TTY 4424 -H. Microterm ACT IV R. TVI 912 -I. Microterm ACT V S. TVI 920 -J. P Elmer 1100 T. TVI 950 - -Enter Selection, - for Last, + for Next, or ^C to Exit - + - - TCSELECT -** Terminal Menu 3 for Z3TCAP Version 1.1 ** Example 1 - -A. VC 404 -B. VC 415 -C. Visual 200 -D. WYSE 50 - -Enter Selection, - for Last, or ^C to Exit - - - - TCSELECT -** Terminal Menu 2 for Z3TCAP Version 1.1 ** Example 1 - -A. Hazeltine 1510 K. P Elmer 1200 -B. Hazeltine 1520 L. SOROC 120 -C. H19 (ANSI Mode) M. Super Bee -D. H19 (Heath Mode) N. TAB 132 -E. HP 2621 O. Teleray 1061 -F. IBM 3101 P. Teleray 3800 -G. Micro Bee Q. TTY 4424 -H. Microterm ACT IV R. TVI 912 -I. Microterm ACT V S. TVI 920 -J. P Elmer 1100 T. TVI 950 - -Enter Selection, - for Last, + for Next, or ^C to Exit - T - - Selected Terminal is: TVI 950 -- Confirm (Y/N)? N - - TCSELECT -** Terminal Menu 2 for Z3TCAP Version 1.1 ** Example 1 - -A. Hazeltine 1510 K. P Elmer 1200 -B. Hazeltine 1520 L. SOROC 120 -C. H19 (ANSI Mode) M. Super Bee -D. H19 (Heath Mode) N. TAB 132 -E. HP 2621 O. Teleray 1061 -F. IBM 3101 P. Teleray 3800 -G. Micro Bee Q. TTY 4424 -H. Microterm ACT IV R. TVI 912 -I. Microterm ACT V S. TVI 920 -J. P Elmer 1100 T. TVI 950 - -Enter Selection, - for Last, + for Next, or ^C to Exit - S - - Selected Terminal is: TVI 920 -- Confirm (Y/N)? Y - -File MYTERM .Z3T Created - - -- Example 2: Select terminal and store it in memory TCSELECT -B4:SCR2>tcselect Example 2 -TCSELECT, Version 1.0 - -** Terminal Menu 1 for Z3TCAP Version 1.1 ** - -A. AA Ambassador K. Concept 100 -B. ADDS Consul 980 L. Concept 108 -C. ADDS Regent 20 M. CT82 -D. ADDS Viewpoint N. DEC VT52 -E. ADM 2 O. DEC VT100 -F. ADM 31 P. Dialogue 80 -G. ADM 3A Q. Direct 800/A -H. ADM 42 R. General Trm 100A -I. Bantam 550 S. Hazeltine 1420 -J. CDC 456 T. Hazeltine 1500 - -Enter Selection, + for Next, or ^C to Exit - + - - TCSELECT -** Terminal Menu 2 for Z3TCAP Version 1.1 ** Example 2 - -A. Hazeltine 1510 K. P Elmer 1200 -B. Hazeltine 1520 L. SOROC 120 -C. H19 (ANSI Mode) M. Super Bee -D. H19 (Heath Mode) N. TAB 132 -E. HP 2621 O. Teleray 1061 -F. IBM 3101 P. Teleray 3800 -G. Micro Bee Q. TTY 4424 -H. Microterm ACT IV R. TVI 912 -I. Microterm ACT V S. TVI 920 -J. P Elmer 1100 T. TVI 950 - -Enter Selection, - for Last, + for Next, or ^C to Exit - T - - Selected Terminal is: TVI 950 -- Confirm (Y/N)? Y - - ZCPR3 Environment Descriptor Loaded - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3TCAP.TCP b/Source/Images/d_bp/u15/Z3TCAP.TCP deleted file mode 100644 index 1b4c203a..00000000 Binary files a/Source/Images/d_bp/u15/Z3TCAP.TCP and /dev/null differ diff --git a/Source/Images/d_bp/u15/Z3TCAP.TQP b/Source/Images/d_bp/u15/Z3TCAP.TQP deleted file mode 100644 index 6866bc5c..00000000 Binary files a/Source/Images/d_bp/u15/Z3TCAP.TQP and /dev/null differ diff --git a/Source/Images/d_bp/u15/Z3TCAP22.LBR b/Source/Images/d_bp/u15/Z3TCAP22.LBR deleted file mode 100644 index bcc4cda7..00000000 Binary files a/Source/Images/d_bp/u15/Z3TCAP22.LBR and /dev/null differ diff --git a/Source/Images/d_bp/u15/Z3UTIL1.HLP b/Source/Images/d_bp/u15/Z3UTIL1.HLP deleted file mode 100644 index ac0ab794..00000000 --- a/Source/Images/d_bp/u15/Z3UTIL1.HLP +++ /dev/null @@ -1,989 +0,0 @@ -General-Purpose ZCPR3 Utilities -COMMENT "Block Comment" Utility -ECHO Echo Command Line -ERASE Erase Files -FINDF Search Disks for Files -MCOPY Copy Files -NOTE Comment Line -PAGE Page Files to Console -PRINT Print Files on Printer -PROTECT Set File Protection -RENAME Rename Files -SAK Alarm and Command Line Abort -UNERASE Unerase Files -WHEEL Set/Reset Wheel Byte -:General-Purpose ZCPR3 Utilities - - Thió   seô  oæ  utilitieó  consistó  oæ  thå  followinç -general-purpose programs: - - Command Function - COMMENT Type comment lines - ECHO Echo command line tail to CON: or LST: - ERASE Erase files - FINDF Find files - MCOPY Copy files - NOTE Comment line - PAGE Enhanced TYPE of a file to CON: - PRINT Print a file to LST: - PROTECT Set protection attributes on files - RENAME Rename files - SAK Interrupt command processing - TINIT Program TVI 950 CRT - UNERASE Unerase files - WHEEL Set user priveleges - - Somå  oæ  theså commandó providå functionó  similaò  tï -thoså  provideä iî thå ZCPR³ Commanä Processoò anä  Residenô -Commanä  Packages®  Thå  followinç tablå  summarizeó  theså -relateä commandsº  Thå residenô commandó SAVE¬  JUMP¬  GET¬ -anä  GÏ  havå  nï  counterpartó  bù  thå  naturå  oæ   theiò -functions. - - - -Resident Transient Additional Functions - DIR XDIR Sorts Display, Prints File Sizes, Negative - XD Selection, Disk Output, Printer Output, - DIR File Scan Function - - ERA ERASE File List, Inspect Mode, Can Erase R/O - Files, File Protection - - REN RENAME File List, Inspect Mode, Wild Cards - Permitted, Control Mode, File Protection - - TYPE PAGE File List, Screen Wrap, Speed Change - - LIST PRINT File List, Headings, Page Numbering, - Time Stamp, Paging, Skip to Specified Page - - CP MCOPY File List, AFNs, Verify, Inspect - - - Alì  oæ thå transientó discusseä herå whicè accepô botè -filå  nameó anä optionó aó argumentó wilì noô accepô á  filå -namå  beginninç witè á slash®  Thió ió á trade-ofæ  ..®  iô -shoulä  bå  easù tï omiô thå filå namå (assuminç  alì  fileó -selected© anä jumð righô tï thå options®  Tï bå consistent¬ -thå  slasè waó selecteä tï bå thå optioî delimiteò  wheî  nï -filå nameó werå tï bå specified. - - Aó  á generaì rulå foò alì ZCPR³ transients¬  iæ á filå -namå ió omitted¬ theî thå ¯ characteò musô proceeä thå firsô -option®  Aî invaliä optioî invokeó á built-iî Helð facilitù -withiî  alì  oæ thå transients¬  anä ¯ ió  neveò  aî  optioî -character: - - command filename.typ o... <-- form with file spec - command /o... <-- form without file spec - command // <-- always gives help - - - Manù  transientó supporô filå listó wherå á singlå filå -namå waó giveî before® Iî theså cases¬ thå useò caî specifù -á  lisô oæ filå specó separateä bù commaó iî thå  filå  namå -position: - - command dir:f1.typ,dir:f2.typ,... o... - - Iî general¬  anù timå thaô thå dº  prefiø coulä bå useä -undeò  CP/M¬  thå  DUº  oò  DIRº  prefixeó caî  bå  useä  iî -conjunctioî   witè  ZCPR³  utilities®   Onlù  onå  oò   twï -exceptionó  exisô  foò thió rule¬  anä  theù  arå  logicallù -noted. - -:The COMMENT Command - -Command: COMMENT 2.0 - -Syntax: - - COMMENT - -Function: - - COMMENÔ ió allowó thå useò tï typå aó manù lineó aó  hå -wisheó  withouô  theí beinç processeä bù ZCPR3®  Iô haó  nï -arguments. - - Iæ thå useò strikeó á ^P¬ alì subsequenô lineó hå typeó -will be printed on the printer. - -Options: - - None - - -Comments: - - COMMENÔ   haó  twï  maiî  applicationó  iî  thå   ZCPR³ -environment: - - 1®  Wheî  thå consolå displayó arå  beinç  recorded¬ -COMMENÔ  allowó thå useò tï easilù typå noteó tï thå  futurå -readeò  withouô havinç tï begiî lineó witè á semicoloî  (;)» -alì  oæ  theså lineó arå clearlù showî tï bå commentó  sincå -theù begiî witè thå prompô "Comment>". - - 2®  Wheî consolå I/Ï ió redirecteä tï twï  differenô -users¬  sucè aó CRÔ anä MODEÍ I/Ï iî parallel¬  theî COMMENÔ -maù  bå  useä  tï  providå á simplå mechanisí  foò  theí  tï -communicate»  botè  useró  caî typå tï  eacè  otheò  withouô -havinç   anù   effecô  oî  thå  systeí  (sucè   aó   commanä -processing). - - - COMMENÔ  ió  aborteä  bù  strikinç á ^à aó  thå  firsô -characteò  oæ á line®  Backspacå anä Deletå botè  servå  tï -echï  aó Backspace¬  space¬  backspace¬  anä ^Ø anä ^Õ  botè -eraså thå currenô line® ^Ð toggleó printing. - - Iæ COMMENÔ ió tï bå useä tï chaô betweeî twï users¬  iô -ió  recommendeä  thaô aî over/ouô protocoì bå  employeä  (aó -recommendeä  witè  thå UNIØ  [trademark¬  Belì  LabsÝ  WRITÅ -program)®   Thå  firsô  useò  types¬  and¬  wheî  finished¬ -terminateó  witè thå letteò "o¢ foò over®  Thå seconä  useò -typeó  anä signaló completioî thå samå way®  Completioî  oæ -thå conversatioî maù bå signalleä bù "o+o¢ foò oveò anä out. - - -Selected Error Messages: - - COMMENT generates no error messages. - - -Examples of Use: - -Comment> Hi, Charlie, how's it going? o -Comment> Hi, Rick, fine ... and you? o -Comment> Fine, Charlie -Comment> Here is how I use XDIR -- let me do the typing -Comment¾ froí no÷ on» jusô watch¬ anä I'lì reenteò COMMENT -Comment> when done ... here goes o+o - - -:The ECHO Command - -Command: ECHO 1.0 - -Syntax: - - ECHO text - -Function: - - ECHÏ  echoeó thå texô whicè followó iô tï thå  CONº  oò -LSTº devices® Iæ thå firsô non-blanë characteò oæ thió texô -is a '$', then ECHO sends its output to the LST: device. - -Options: - - None - - -Comments: - - The purpose of ECHO is two-fold: - - 1® tï providå á convenienô waù tï senä messageó tï -thå  consolå  durinç  thå  executioî oæ á  commanä  filå  oò -command line; for example: - - ECHO Assembling;ASM myfile.BBZ;ECHO Loading;LOAD myfile - -aó á singlå multiplå commanä linå wilì prinô thå informativå -messageó  "ASSEMBLING¢ anä "LINKING¢ durinç  thå  respectivå -commands - - - 2®  tï  providå  á convenienô waù tï senä  escapå -sequenceó  tï  thå CRÔ oò printer»  ECHÏ doeó  nï  characteò -translation¬  usinç direcô BIOÓ calls¬  sï sequenceó useä tï -prograí  intelligenô deviceó caî bå issueä bù  runninç  echï -and typing in those sequences; for example: - - ECHO ^Z - -coulä  cleaò thå CRÔ screeî iæ ^Z cleareä thå screeî oî  thå -user's terminal and - ECHO $^L - -wilì forí feeä thå printeò (assuminç thå printeò respondó tï -the form feed character) - - NOTEº   sincå   thå  commanä  inpuô  linå   editoò -capitalizeó   thå   commanä  lines¬   anù   characteró   arå -automaticallù capitalizeä wheî echoed - - -Selected Error Messages: - - ECHO generates no error messages - -Examples of Use: - - ECHO hello, world - -- send text "HELLO, WORLD" to console - - -:The ERASE Command - -Command: ERASE 5.0 - -Syntax: - - ERASE dir:afn1,dir:afn2,... o... - -Function: - - ERASÅ eraseó fileó iî thå filå list®  Onlù  non-systeí -fileó arå selecteä bù default¬ buô thå Ó optioî allowó ERASÅ -to select System files as well. - - -Options: - - S -- Include System Files; if S is not present, then - ERASE does not "see" System Files - - R -- Erase Read/Only Files without asking the user for - permission; if ERASE encounters a Read/Only file - whilå iô ió performinç itó functioî without the R - optioî enabled¬ iô wilì asë thå useò iæ hå wants - to erase the file before it does so; with the R - option, ERASE goes ahead and erases the file - - I -- Inspect; ERASE can be instructed to display each - filå tï thå useò anä asë permissioî beforå the - file is erased; if the user gives permission - and ERASE discovers that the file is R/O with - the R option off, it will ask a second time - before going ahead - - -Comments: - - None - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - ERASE text:*.txt,asm:*.tmp - -- erase the *.TXT files in TEXT: directory and - *.TMP files in ASM: directory - - ERASE *.* I - -- erase *.* in the current directory with - inspection - -:The FINDF Command - -Command: FINDF 2.0 - -Syntax: - - FINDF afn1,afn2,... o - -Function: - - FINDÆ  searcheó througè alì oæ thå knowî diskó anä useò -areaó  foò  anä  fileó matchinç anù oæ  thå  indicateä  filå -specifications. - -Options: - - S - Include System Files - - -Comments: - - FINDÆ  wilì onlù searcè foò Non-Systeí fileó unlesó thå -Ó  optioî  ió includeä iî thå commanä line¬  aô  whicè  timå -FINDÆ wilì searcè foò botè Systeí anä Non-Systeí files. - - Thå  searcè  beginó aô disë Á anä extendó  untiì  FINDÆ -encounteró  thå  lasô possiblå disë oò á disë whicè  ió  noô -loaded. - - All user areas (0 to 31) are examined. - - FINDÆ displayó thå nameó oæ thå fileó found¬ groupeä bù -disk and user area. - - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - FINDF xdir.com s - -- search all files (both System and Non-System) - for XDIR.COM - - FINDF xd.com,help.hlp,myfile.txt - -- searcè alì Non-Systeí fileó foò XD.COM, - HELP.HLP, and MYFILE.TXT - -:The MCOPY Command - -Command: MCOPY 4.0 - -Syntax: - - MCOPY dir:=dir:afn1,afn2,dir:=dir:afn3,... o... - -Function: - - MCOPÙ  ió  á filå copù prograí designeä foò  uså  undeò -ZCPR3®  Iô  supportó manù featureó relateä specificallù  tï -thå ZCPR³ Systeí anä ió verù intimatelù tieä intï thå  ZCPR³ -System. - - Thå  basiã  purposå oæ MCOPÙ ió tï copù fileó froí  onå -directorù (disk/useò area© tï anotheò undeò ZCPR3. - - - MCOPÙ onlù copieó files»  MCOPÙ DOEÓ NOÔ RENAMÅ  FILES® -Thió  ió  á majoò differencå foò thoså useä tï  PIP®  MCOPÙ -text:f1.txt=f2.txô jusô copieó F2.TXÔ intï TEXTº  directory¬ -buô iô ió stilì nameä F2.TXÔ (F1.TXÔ ió ignored). - -Options: - - E -- Test for Existence of File on Destination and - User Approves Copy before Copy is Done - - I -- User Approves Each File before Copy Begins - - M -- Multiple Copy (Repeat) Facility - This allows the user to backup several files to - several disks by copying all the specified files, - prompting the user for a new disk, and then - copying the files again, continuing until the user - tells MCOPY to stop - - - Q -- Quiet Operation (No Activity Displays) - - V -- Verify Copies - - Thå Å optioî (Existencå Test© lookó oî thå  destinatioî -directorù  tï seå iæ thå filå iô ió abouô tï copù ió alreadù -there®  Iô theî telló thå useò oæ itó findingó anä askó hií -iæ hå wantó tï gï aheaä witè thå copy®  Thå useò maù  elecô -tï copù oò noô copù aó hå desires. - - Thå  É optioî (Inspect© displayó alì fileó whicè  matcè -thå  indicateä  sourcå fileó tï thå user¬  allowinç  hií  tï -selecô  whicè  fileó hå wantó tï copy®  Iô theî copieó  thå -selecteä files®  MCOPÙ performó thió operatioî foò eacè seô -oæ fileó iî thå commanä linå (separateä bù commas). - - - Thå Í optioî (Multiplå Copy© pauseó beforå startinç thå -copy¬  allowinç thå useò tï aborô thå procedurå oò inserô  á -disë intï thå source¬  thå destination¬ oò botè anä instrucô -MCOPÙ tï proceed® Afteò copyinç alì oæ thå indicateä files¬ -MCOPÙ  theî pauseó again¬  allowinç thå useò tï agaiî changå -disks® Thió continueó untiì thå useò abortó thå procedure. - - Thå  Ñ  optioî  (Quiet© turnó ofæ  thå  MCOPÙ  activitù -display®  Iî normaì operation¬  MCOPÙ ió constantlù tellinç -thå useò whaô iô ió doing®  É feeì thaô thió ió betteò thaî -quietlù  havinç  problemó withouô thå useò knowinç  whaô  ió -goinç on®  MCOPÙ payó attentioî tï thå QUIEÔ flaç oæ ZCPR3¬ -and the initial mode of MCOPY is set by this flag. - - - Thå Ö optioî (Verify© ió useä tï checë thå copieä  filå -tï insurå thaô thå copù ió good®  Witè thió optioî engaged¬ -MCOPÙ  computeó  á CRà valuå oæ thå sourcå filå aó iô  readó -it®  Wheî  MCOPÙ  haó  completeä thå  copy¬  iô  readó  thå -destinatioî filå back¬  computinç itó CRà value¬  and¬  wheî -complete¬  iô compareó thå twï CRà values¬  tellinç thå useò -iæ aî erroò iî thå copù occurreä (i.e.¬ differenô CRà valueó -resulted). - - -Comments: - - MCOPÙ  ió alsï intendeä tï bå useä foò backuð purposes® -Iô  haó thå abilitù tï repeatedlù copù á seô oæ  fileó  froí -onå  directorù tï another¬  pausinç betweeî successivå  copù -passeó tï allo÷ thå useò tï changå disks®  Á keù tï thå uså -oæ MCOPÙ iî generaì ió thaô oncå MCOPÙ haó beguî operations¬ -thå  useò  neeä neveò concerî himselæ witè Warí Bootinç  thå -systeí afteò changinç disks» MCOPÙ ió doinç thaô foò him. - - Iæ  á  destinatioî directorù ió  noô  specified¬  MCOPÙ -lookó  foò  á directorù nameä BACKUPº  anä  copieó  tï  thió -directorù iæ found® Iæ therå ió nï directorù nameä BACKUP:¬ -MCOPÙ  wilì  copù  tï B0º  (thió caî bå changeä  bù  DDÔ  oò -reassembly). - - - Iî copyinç á filå froí onå directorù tï another¬  MCOPÙ -performó thå followinç steps: - - 1®  Iô  logó intï thå sourcå directorù anä  scanó -foò thå fileó specifieä bù thå user - - 2®   Iô  logó  intï  thå  destinatioî  directory¬ -determineó  iæ á copù oæ thå filå existó oî thå  destinatioî -anä deleteó iô iæ iô does - - 3®  MCOPÙ copieó thå filå iî thå sourcå directorù -intï thå destinatioî directory - - 4®  MCOPÙ setó thå attributeó oæ thå filå iî  thå -destinatioî  directorù tï bå thå samå aó thoså iî thå sourcå -directory - - 5®  MCOPÙ optionallù verifieó botè fileó bù meanó -oæ á CRà Check - -Selected Error Messages: - - "NÏ Fileó -- ^à tï Abort¢ meanó thaô nï fileó  matchinç -the indicated file spec were found. - - "TPÁ  Ovfl¢ meanó thaô therå waó noô enougè rooí iî thå -Transient Program Area to support MCOPY. - - "Disë  Full¢  meanó thaô therå ió nï morå rooí  oî  thå -destination disk for the files. - - -Examples of Use: - - MCOPY FILE1.*,HELP:FILE2.HLP,TEMP:=TEST.TXT,HI.* - - Fileó  matchinç  FILE1.ª iî thå currenô  directorù  arå -copieä tï BACKUP:¬  thå filå FILE2.HLÐ iî directorù HELР ió -copieä  tï  BACKUP:¬   thå  filå  TEST.TXÔ  iî  thå  currenô -directorù ió copieä tï TEMP:¬ anä thå fileó matchinç HI.ª iî -thå currenô directorù arå copieä tï TEMP:. - - Oncå á DIR:½ ió encountered¬ thå defaulô destinatioî ió -redefined®  Encounterinç á differencå source¬ however¬ doeó -noô changå whaô thå defaulô sourcå directorù is. - -:The NOTE Command - -Command: NOTE 1.0 - -Syntax: - - NOTE text - -Function: - - NOTÅ ió á do-nothinç commanä - iô implementó á comment® -No operation is performed at all. - -Options: - - None - - -Comments: - - Anù  linå  beginninç witè á semicoloî (;© ió á  commenô -line®  Witè  multiplå commanä lines¬  however¬  iô  ió  noô -possiblå  tï  embeä  á  commenô  phraså  iî  thå  middlå  oò -beginninç  oæ  á  commanä linå withouô á nulì  routinå  likå -NOTE. NOTE was created to: - - allow comments to be embedded in command lines - - provide a comment that stands out from the simple - semicolon line - -Selected Error Messages: - None - -Examples of Use: - NOTE this is a comment - -:The PAGE Command - -Command: PAGE 2.0 - -Syntax: - - PAGE dir:afn1,dir:afn2,... o... - -Function: - - Thå  PAGÅ commanä ió useä tï lisô fileó oî thå console® -Iô offeró advantageó oveò TYPÅ iî thaô PAGÅ knowó thå  widtè -oæ  thå  screeî  anä  handleó wraparounä  (whicè  ió  á  biç -complainô  witè  TYPÅ  wheî tryinç tï  pagå  througè  "wide¢ -listingó  likå thaô produceä bù thå assemblers)®  PAGÅ alsï -acceptó á filå list. - - -Options: - - 0-9 - Set Character Print Speed Delay - I - Inspect files - L - Number lines - P - Disable pause at end of screen - Sn - Skip to page n and then begin - -Comments: - - Whilå á filå ió beinç pageä tï thå user¬  thå useò  caî -strikå  onå  oæ thå digitó tï varù thå speeä oæ  thå  outpuô -dynamically®  ° ió thå fastest¬  ¹ ió thå slowest® Iî thió -way¬  thå  useò caî easilù scaî á filå bù runninç PAGÅ  witè -thå Ð optioî (sï iô doeó noô stoð wheî thå screeî ió filled© -anä  strikinç  á  digiô froí timå tï timå tï speeä  uð  oveò -sectionó  hå isn'ô interesteä iî anä slo÷ dowî foò  sectionó -hå is. - - - Whilå thå outpuô ió beinç directeä tï thå screen¬  PAGÅ -supportó  thå followinç single-characteò commandó tï  changå -thå outpuô displaù iî onå waù oò another: - - 0 to 9 - change speed (0=slowest, 9=fastest) - - P or p - toggle pause when screen fills - (the user can dynamically turn on and off - the ability to delay when a screen fills) - - ^X - skip to next file - - ^C - abort to operating system - - ^S - pause output; any key will resume, and all - of these commands (except ^S) will work - - - PAGÅ  ió  constantlù acceptinç useò  input¬  anä  theså -commandó arå iî effecô alì oæ thå time®  Thió includeó  thå -timå  wheî  PAGÅ  haó pauseä afteò fillinç thå  screeî  (itó -default)¬  sï thå useò caî turî ofæ paginç oò varù thå speeä -aô thió time¬  iæ sï desired®  Anù otheò characteò wilì  bå -ignored. - -Selected Error Messages: - - Self-Explanatory - - -Examples of Use: - - PAGE *.txt p8 - -- page all *.TXT files, and begin with paging - off (don't pause at the end of the screen) - and speed set to 8 - - PAGE myfile.txt s5 - -- page MYFILE.TXT, starting at page 5 - -:The PRINT Command - -Command: PRINT 2.0 - -Syntax: - - PRINT dir:afn1,dir:afn2,... o... - -Function: - - Thå  PRINÔ commanä ió useä tï prinô á filå oî thå  LSTº -device¬  likå LISÔ does¬  buô offeró manù morå options®  Iô -wilì  prinô  á heading¬  pagå thå file¬  numbeò  thå  pages¬ -numbeò thå lines¬ placå á date/timå stamð oî thå output¬ puô -thå filå namå oî thå output¬ anä others. - - -Options: - - E - Exact Print (Expand Tabs, Form Feed, No Line or - Page Numbers, No Heading) - - F - Toggle default of file name display on page header - (defaulô ió ON¬ so Æ turnó ofæ name display) - - Htext - Define Heading text to appear - at the top of each page - - I - Inspect Files (allow user to select files before - printing begins) - - L - Enable numbering of each line - - - M - Disable Multiple Run Flag - (if multiple run is ON, then no "Set Top of Form" - message appears for each file and PRINT moves - from one file to another unattended); default is - with Multiple Run ON - - N - Disable numbering of each page - - On - Offset each line - Move each line in the indicated number of chars - from the left of the page - - Sn - Start printing on page n - - T - Toggle date/time stamp in the header of each page - (a TIME subroutine must be assembled into PRINT - to enable the date/time stamp feature) - - -Comments: - - Thå  specifiã  featureó oæ thå printeò arå seô  bù  thå -ZCPR³  Environmenô  Descriptor®  Sucè featureó includå  thå -numbeò oæ physicaì lineó oî á page¬  thå numbeò oæ lineó  oæ -texô  oî  á page¬  thå widtè oæ á linå  iî  characters¬  anä -whetheò  thå printeò caî forí feeä oò not®  Thå Environmenô -Descriptoò containó optionó foò fouò printers¬ anä thå CPSEÌ -utilitù caî bå useä tï selecô thå desireä seô oæ attributes. - - Thå date/timå stamð featurå ió verù  machine-dependent¬ -anä PRINÔ haó tï bå reassembleä tï supporô it. - - While PRINT is running, the following commands work: - - ^C Abort and return to operating system - - ^X Skip to top of next page and skip to next file - - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - PRINT text:*.txt,*.txt o10n - -- print all *.TXT files in the TEXT: directory - and in the current directory; offset all - lines by 10 columns, and do not number pages - - PRINT myfile.txt s25 - -- print MYFILE.TXT starting at page 25 - -:The PROTECT Command - -Command: PROTECT 3.0 - -Syntax: - - PROTECT dir:afn1,dir:afn2,... keys o... - -Function: - - Thå   PROTECÔ   commanä  replaceó  thå  attributå   seô -capabilitieó   oæ   thå  STAÔ  transienô   anä   addó   morå -flexibility®  PROTECÔ  ió  designeä  tï allo÷ thå  useò  tï -specifù thå attributeó (Read/Only¬  System¬ anä Archive© anä -taç bitó (thå Mosô Significanô Bitó oæ thå eighô  characteró -iî á filå name© oæ á filå oò seô oæ files. - - PROTECT always "sees" both System and Non-System files. - - -Options: - - Thå  KEYÓ arå thå attributeó selected®  Thå  followinç -keys are allowed: - - R¬ S¬ Á -- Enablå Read/Only¬ System¬ anä Archive - - n, 1 <= n <= 8 -- Set Tag Bits - - The following options are also available: - - I -- Inspect C -- Control - - Inspecô  Modå  allowó  thå useò tï looë  aô  eacè  filå -beforå iô ió "protected¢ anä permiô oò disallo÷ thå functioî -tï bå performeä oî á case-by-caså basis. - - - Controì  Modå  allowó thå useò tï seå thå namå oæ  eacè -filå selecteä anä manuallù seô itó attributeó anä taç  bits® -Iî responså tï thå Controì Modå prompt¬ thå useò caî typå iî -anù combinatioî oæ thå letteró A¬  R¬  S¬ anä thå digitó 1-¸ -(the KEYS). - -Comments: - - None - -Selected Error Messages: - - Self-Explanatory - - -Examples of Use: - - PROTECT A4:*.COM,ROOT:*.COM RSI - Set the Attributes of all COM files in directories A4 - and ROOT to Read/Only and System. Turn off the Archive - attribute and all tag bits. Allow the user to inspect - each file before the operation is performed. - - PROTECT ROOT:*.TXT - Clear all attributes and all tag bits of all files of - type TXT in the directory named ROOT - - PROTECT A: C - Allow the user to manually set all attributes and tag - bits of all files on Disk A in the current user - -:The RENAME Command - -Command: RENAME 3.0 - -Syntax: - - RENAME dir:afn1=afno1,dir:afn2=afno2,... o... - -Function: - - RENAMÅ ió useä tï changå thå namå oæ onå oò morå files® -Ambiguous file names and inspection are permitted. - -Options: - - C - Control Mode; manually specify each file name - I - Inspect and approve each rename - S - Include System files - - -Comments: - - Thå  RENAMÅ  commanä ió á brotheò tï thå  REΠ residenô -command® Therå arå manù majoò differences¬ however: - - . RENAMÅ allowó  ambiguouó filå nameó tï thå used - . RENAMÅ supports an Inspect Mode, where the user is - presented with each name change and allowed to - approve of it before it is done - . RENAME supports a Control Mode, where the user is - presented with each file to be RENAMEd and allowed - to manually enter the new name or not rename the - file - . RENAME accepts a list of files - . RENAME does not "see" System files unless told to - . RENAME can rename Read/Only files - . RENAME sets the attibutes (R/O and SYS) of the - new file names to be the same as those on the - old file names - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - RENAME *.txt C - -- rename all *.TXT files to something else; - display the file name to the user and allow - him to manually enter the new name - - RENAME asm:*.mac=*.asm - -- rename all *.ASM files to *.MAC - -:The SAK Command - -Command: SAK 2.0 - -Syntax: - - SAK o... - - -Function: - - SAË  (Strikå  Anù  Key© waó designeä  tï  providå  somå -simplå  utilitù functions¬  onå oæ whicè ió associateä  witè -thå Multiplå Commanä Linå featurå oæ ZCPR3® Iô waó designeä -foò thå followinç purposes: - - 1. to allow the user to program a wait in a multiple - command line until he instructs the system to - continue - - 2. to allow the user to abort a multiple command line - - 3. to allow the user to program an interruptable delay - in the execution of a multiple command line - - 4. to provide a simple alarm for the user - - -Options: - - A - DO NOT allow the user to abort the command line - - B - Ring the bell at the user's terminal occasionally - - Pn - Pause n seconds and continue if no response by - that time - -Comments: - - Witè NÏ options¬  SAË waitó foò useò input¬  anä iæ thå -useò strikeó á ^C¬ theî thå multiplå commanä linå ió aborteä -anä controì ió returneä tï thå user. - - - SAË  ió  particularlù  usefuì iæ  thå  useò  wisheó  tï -interjecô  á delaù iî á multiplå commanä linå generateä bù á -Menu®  Onå sucè applicatioî waó tï displaù thå timå tï  thå -user¬  calì hió attentioî tï iô (viá ECHO)¬ givå hií á delaù -(viá  SAK)¬  anä  theî invokå dBASÅ IÉ witè aî  initializinç -commanä file. - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - SAK BP10 - -- ring the bell occasionally and pause for 10 - seconds; if the user does not strike a - a command by that time (^C to abort), then - resume command line execution with the next - command -:The UNERASE Command - -Command: UNERASE 1.0 - -Syntax: - - UNERASE afn1,afn2,... o... - -Function: - - UNERASÅ  recoveró  fileó  whicè  havå  beeî  previouslù -eraseä iæ iô ió possiblå tï dï so® Aó á rule¬ UNERASÅ haó á -mucè  greateò  chancå oæ succesó iæ iô ió  useä  immediatelù -after the files were erased. - -Options: - - L - List Erased Files Only (do not attempt recovery) - P - Pause for Disk Change and then try - Z - Place Recovered Files in User Area 0 (default is - current user area) - -Comments: - - Wheî  ZCPR³ (anä CP/M© eraseó á file¬  thå  informatioî -containeä  iî thå filå anä thå directorù referencå  tï  thaô -informatioî  ió  noô  deleteä  immediately®   Instead¬  thå -directorù  entrù  ió simplù markeä aó beinç deleted®  Aó  á -result¬  bù  changinç  thió deletå marë  bacë  tï  somethinç -normal (which is a user number), the file is recovered. - - Afteò  á filå haó beeî deleted¬  twï eventó caî  happeî -whicè caî risë thå successfuì recoverù oæ thå file®  Onå ió -thaô  ne÷ directorù entrieó caî bå madå intï thå  directory¬ -anä  onå oò morå oæ theså maù overwritå thå entrù whicè  waó -madå  foò thå filå tï bå recovered®  Thå otheò ió thaô  thå -spacå  takeî  oî  disë  bù thå filå maù  bå  overwritteî  bù -another file. - - - Eacè  oæ  theså eventó ió possiblå wheî ne÷  fileó  arå -created®  Foò  thió reason¬  UNERASÅ caî bå useä witè  somå -degreå  oæ succesó onlù iæ nï fileó werå createä  afteò  thå -files to be recovered were erased. - - UNERASÅ  ió noô alwayó successful¬  however®  If¬  foò -instance, the following events took place: - - 1. the files MYFILE.TXT, HISFILE.TXT, and T.TXT - were created and then erased - 2. a new file T.TXT was created and then erased - 3. UNERASE T.TXT was issued - it is possible that - both previous T.TXT files would be recovered, - and a "weird" dual file named T.TXT would be - in your directory - - - UNERASÅ printó thå nameó oæ thå fileó iô ió recovering¬ -and¬ iæ á namå appearó twï oò morå times¬ theî theså earlieò -fileó  oæ  thå  samå  namå  arå  beinç   recovered®   Thoså -experienceä  witè DU2/DU³ caî probablù correcô thå situatioî -anä  recoveò thå correcô file®  Otheró wilì simplù  havå  á -corrupteä  directorù  whicè caî onlù bå restoreä bù  erasinç -T.TXT, thereby loosing both files again. - -Selected Error Messages: - - Self-Explanatory - - -Examples of Use: - - UNERASE myfile.txt,hisfile.txt - -- try to recover MYFILE.TXT and HISFILE.TXT - - UNERASE myfile.txt Z - -- trù tï recoveò MYFILE.TXÔ anä placå iô iî Useò 0 - - UNERASE myfile.txt L - -- see if MYFILE.TXT can be recovered (duplicates - may also appear in this way) - -:The WHEEL Command - -Command: WHEEL 3.0 - -Syntax: - - WHEEL password S or WHEEL password <-- Set Wheel Byte -or - WHEEL password R <-- Reset Wheel Byte -or - WHEEL /S or WHEEL /R <-- Enter Password - without echo - -Function: - - Thå WHEEÌ commanä ió useä tï enablå anä disablå certaiî -privelegeä commandó anä commanä features®  Iô doeó thió  bù -setting and resetting the Wheel Byte. - - -Options: - - Shown above - -Comments: - - Thå  Wheeì  Passworä ió hard-codeä intï  thå  WHEEL.COÍ -file. It may be changed by DDT or reassembly. - - WHEEÌ haó aî RCÐ counterpart¬ WHL¬ whicè maù alsï bå iî -effect. WHEEL and WHL can respond to different passwords. - -Selected Error Messages: - - "Invaliä  Password¢  meanó thaô thå giveî passworä  waó -not correct. - - -Examples of Use: - - WHEEL mypass - -- seô Wheeì Bytå iæ MYPASÓ ió thå correcô password - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3UTIL2.HLP b/Source/Images/d_bp/u15/Z3UTIL2.HLP deleted file mode 100644 index 39a7cc87..00000000 --- a/Source/Images/d_bp/u15/Z3UTIL2.HLP +++ /dev/null @@ -1,764 +0,0 @@ -The ZCPR3 System-Oriented Utilities -CMDRUN Extended Command Processor (ECP) -ERRORn Error Handlers -LDR ZCPR3 System Segment Loader -PATH Path Display and Set -QUIET Display and Set the Quiet Flag -REG Register Display and Manipulation -SETFILE System File Assignment -SHCTRL Shell Stack Display and Manipulation -SHOW System Configuration Display and Error Handler -Z3INS ZCPR3 System Installation Program -Z3LOC ZCPR3 System Segment Locator -:The ZCPR3 System-Oriented Utilities - - Thió  HELР filå  containó informatioî oî  thoså  ZCPR³ -utilitieó   whicè  accesó  featureó  oæ  thå  ZCPR³   Systeí -specifically. These features include: - - o Extended Command Processors - o Error Handlers - o the ZCPR3 System Segments - o the ZCPR3 Command Search Path - o the System Registers - o the System Files - o the ZCPR3 System Addresses - o the ZCPR3 System Status - -:CMDRUN Extended Command Processor (ECP) - -Command: CMDRUN - -Syntax: - - CMDRUN text (this command is usually executed by - ZCPR3 itself and not the user) -Function: - - CMDRUΠ ió á samplå Extendeä Commanä Processor®  Iô ió -invokeä automaticallù bù ZCPR³ wheî thå useò commanä ió  noô -founä  viá  thå commanä searcè patè anä nï erroò handleò  ió -engaged. - - Thå  texô  whicè followó thå verâ ió thå  texô  oæ  thå -original command line. - - -Options: - - None - -Comments: - - CMDRUΠ ió  onlù á simplå sample®  Iô showó  thaô  thå -originaì  commanä linå ió no÷ availablå iî thå commanä  taiì -buffeò (aô 80H)®  Thå formaì CMDRUÎ whicè thå useò programó -foò  hió ZCPR³ Systeí caî extracô thå originaì commanä  linå -from this buffer and manipulate it as desired. - -Selected Error Messages: - - None - -Examples of Use: - - None - -:ERRORn Error Handlers - ERROR1 -Command: ERROR1 1.0 - -Syntax: - - ERROR1 - -Function: - - ERROR±  ió  aî Erroò Handler®  Iæ thå useò  runó  thió -program¬ iô installó itselæ aó thå systeí erroò handler® Iæ -ZCPR³ cannoô finä thå COÍ filå referenceä bù á commanä verb¬ -iô  invokeó  thå  installeä Erroò  Handleò  anä  passeó  thå -commanä linå tï it. - -Options: - None - - ERROR1 -Comments: - - ERROR± displayó thå erroò linå tï thå useò anä provideó -hií witè fouò optionó aó tï ho÷ tï procesó thió line: - - 1. Replace the command in error with a new command - 2. Skip the command in error and resume execution - with the next command - 3. Replace the entire command line - 4® Thro÷ awaù thå commanä linå anä resumå user - control - -Selected Error Messages: - Self-Explanatory - -Examples of Use: - - ERROR1 - -- install Error Handler - ERROR2 -Command: ERROR2 1.0 - -Syntax: - - ERROR2 - -Function: - - ERROR2  ió  aî Erroò Handler®  Iæ thå useò  runó  thió -program¬ iô installó itselæ aó thå systeí erroò handler® Iæ -ZCPR³ cannoô finä thå COÍ filå referenceä bù á commanä verb¬ -iô  invokeó  thå  installeä Erroò  Handleò  anä  passeó  thå -commanä linå tï it. - -Options: - None - - ERROR2 -Comments: - - ERROR2 displayó thå erroò linå tï thå useò anä provideó -hií witè fouò optionó aó tï ho÷ tï procesó thió line: - - 1. Replace the command in error with a new command - 2. Skip the command in error and resume execution - with the next command - 3. Replace the entire command line - 4® Thro÷ awaù thå commanä linå anä resumå user - control - - Unlikå ERROR1¬ ERROR² ió screen-oriented¬ havinç á mucè -"flashier" display. It uses the Z3TCAP for support. - -Selected Error Messages: - Self-Explanatory - - ERROR2 -Examples of Use: - - ERROR2 - -- install Error Handler - - ERROR3 -Command: ERROR3 1.0 - -Syntax: - - ERROR3 - -Function: - - ERROR3  ió  aî Erroò Handler®  Iæ thå useò  runó  thió -program¬ iô installó itselæ aó thå systeí erroò handler® Iæ -ZCPR³ cannoô finä thå COÍ filå referenceä bù á commanä verb¬ -iô  invokeó  thå  installeä Erroò  Handleò  anä  passeó  thå -commanä linå tï it. - -Options: - None - - ERROR3 -Comments: - - ERROR³  displayó thå namå oæ thå COÍ filå whicè waó noô -founä anä theî flusheó thå commanä line¬  returninç  controì -to the user. - -Selected Error Messages: - None - -Examples of Use: - - ERROR3 - -- install ERROR3 - - ERROR4 -Command: ERROR4 1.0 - -Syntax: - - ERROR4 - -Function: - - ERROR4  ió  aî Erroò Handler®  Iæ thå useò  runó  thió -program¬ iô installó itselæ aó thå systeí erroò handler® Iæ -ZCPR³ cannoô finä thå COÍ filå referenceä bù á commanä verb¬ -iô  invokeó  thå  installeä Erroò  Handleò  anä  passeó  thå -commanä linå tï it. - -Options: - None - - ERROR4 -Comments: - - ERROR´  printó  thå namå oæ thå COÍ filå whicè waó  noô -founä  anä theî advanceó tï thå nexô commanä iî thå  commanä -linå buffer®  Iæ therå ió nï nexô command¬  useò controì ió -resumed®  Iæ  therå ió á nexô  command¬  commanä  executioî -resumes there. - -Selected Error Messages: - None - -Examples of Use: - - ERROR4 - -- install Error Handler - - ERRORX -Command: ERRORX 1.0 - -Syntax: - - ERRORX - -Function: - - ERRORØ disengageó thå currenô erroò handler¬ leavinç nï -erroò  handleò enabled®  Thå defaulô erroò controì facilitù -oæ ZCPR³ ió no÷ iî effect¬  wherå iæ aî erroò occuró iî  thå -commanä  line¬  thå commanä linå froí thaô poinô forwarä  ió -printed (followed by a '?'). - -Options: - None - - ERRORX -Comments: - - None - -Selected Error Messages: - - No error messages are generated by ERRORX. - -Examples of Use: - - ERRORX - -- disengage any Error Handler currently enabled - -:LDR ZCPR3 System Segment Loader - -Command: LDR 1.0 - -Syntax: - - LDR ufn1,ufn2,... - -Function: - - LDÒ  ió  á  general-purposå Systeí Segmenô  loadeò  foò -ZCPR3® Iô loadó alì oæ thå ZCPR³ Systeí Segmentó intï theiò -appropriatå  buffers¬  checkinç oî theiò formaô anä  contenô -beforå  approvinç  anä completinç eacè  load®  Eacè  Systeí -Segment is specified unambiguously. - -Options: - - None - - Comments: - - Thå  followinç Systeí Segmentó arå loadeä  intï  memorù -buffers by LDR: - - *.ENV files - Environment Descriptors - *.FCP files - Flow Command Packages - *.IOP files - Input/Output Packages - *.NDR files - Named Directory Files - *.RCP files - Resident Command Packages - *.Z3T files - Z3TCAP Entries - - Foò  eacè  filå loaded¬  thå contentó oæ thå  filå  arå -loadeä intï á memorù buffeò anä examined® Baseä oî thå filå -type¬  segment-uniquå  structuraì checkó arå performed®  Iæ -thå  checkó  arå  passed¬  thå segmenô ió  copieä  intï  thå -correcô  memorù  buffeò baseä oî thå datá containeä  iî  thå -Environmenô Descriptor®  Iæ thå checkó arå noô  passed¬  aî -erroò  messagå  ió issueä anä thå nexô filå iî thå  lisô  ió -processed. - - Sincå  thå  Environmenô Descriptoò (whicè ió  currentlù -residinç  iî  itó  memorù buffer© ió  useä  tï  providå  thå -addresó  tï whicè tï copù thå loadeä Systeí Segment¬  iô  ió -importanô  thaô  thå  Environmenô Descriptoò  bå  thå  firsô -segmenô  loadeä bù LDR®  Aî alternativå tï thió ió thaô thå -BIOÓ maù initializå thå Environmenô Descriptoò oî Colä Boot¬ -buô  thió  woulä requirå á relativelù  largå  BIOÓ  overheaä -(over 128 bytes for the initial Environment Descriptor). - - Wheî LDÒ loadó aî Environmenô Descriptor¬  iô placeó iô -aô  thå  addresó  oæ thå Environmenô  Descriptoò  whicè  waó -installeä iî LDÒ durinç thå ZCPR³ Systeí installation®  Anù -otheò  Systeí Segmenô ió loadeä baseä oî thå contentó oæ thå -current Environment Descriptor in memory. - - -Selected Error Messages: - - "filename.tyð ió noô á Valiä Type¢ meanó thaô thå  filå -typå oæ thå indicateä filå ió noô onå oæ ENV¬ FCP¬ IOP¬ NDR¬ -RCP, or Z3T. - - "filename.tyð  Containó  á Formaô Flaw¢ meanó thaô  thå -structure of the indicated file was not correct. - -Examples of Use: - - LDR SYS.ENV,MYIO.IOP,MYCMDS.RCP,MYIFS.FCP - -- loaä SYS.ENV¬ and¬ baseä oî thå datá iî thió - Environment Descriptor, load the I/O Package - MYIO.IOP, the Resident Command Package - MYCMDS.RCP, and the Flow Command Package MYIFS.FCP - - LDR TERM1.Z3T - -- replace the current Z3TCAP entry with TERM1.Z3T -:PATH Path Display and Set - -Command: PATH 3.0 - -Syntax: - - PATH -or - PATH path-expression - -Function: - - PATÈ  allowó thå useò tï dï twï thingó  -- displaù  thå -currenô patè oò seô á ne÷ path®  Thå displaù showó thå patè -iî  threå  formatsº  Symbolic¬  Absolutå  (DU)¬  anä  Nameä -Directorù  (DIR)®  Thå patè expressioî maù intermiø anù  oæ -theså formató aó desireä tï expresó thå ne÷ path. - -Options: - - None - -Comments: - - Thå  PATÈ  Commanä  ió useä  tï  dynamicallù  changå  á -memory-baseä  filå  searcè patè oò thå ZCPR³ commanä  searcè -path®  Witè  PATH¬  thå  useò caî definå á ne÷ patè  tï  bå -followeä oò hå caî vie÷ whaô thå currenô patè is. - - PATÈ determineó thå addresó oæ thå patè iô ió goinç  tï -work with from the ZCPR3 Environment Descriptor. - - Thå  PATÈ commanä dealó witè patè expressions®  Á patè -expressioî  ió  á sequencå oæ directorù nameó whicè  caî  bå -expresseä  aó "ambiguous¢ DÕ forms¬  absolutå DÕ  forms¬  oò -Nameä Directorù forms. - - - Aî  absolutå  DÕ  forí indicateó  jusô  á  disë  letteò -(currenô useò ió assumed)¬  jusô á useò numbeò (currenô disë -ió  assumed)¬  oò botè á disë letteò anä á useò number®  Aî -"ambiguous¢ DÕ forí ió onå iî whicè thå disë letteò oò  useò -numbeò  oò  botè ió replaceä witè á "$¢  character¬  meaninç -"currenô disk¢ oò "currenô user"®  Á Nameä Directorù  form¬ -oæ course¬ ió simplù thå namå oæ á directory. - - Tï illustrate¬  let'ó saù thaô thå useò ió loggeä  intï -B1® Thå path - - $0 A$ A0 ROOT - -represents the sequence - - B0 to A1 to A0 to ROOT - - -Selected Error Messages: - - "Baä Expressioî aô ¢ indicateó therå waó aî erroò -in the path expression at the indicated point. - -Examples of Use: - - PATH $0 A$ A15 - - seô  patè froí currenô disk/useò ° tï disë A/currenô -useò tï disë A/useò 15 - - PATH A$ ROOT - - set path from disk A/current user to ROOT: - -:QUIET Display and Set the Quiet Flag - -Command: QUIET 1.0 - -Syntax: - - QUIET o - -Function: - - QUIEÔ ió useä tï set¬ reset¬ anä displaù thå Quieô Flaç -in the ZCPR3 Environment Descriptor. - -Options: - - D - Display the Quiet Flag - R - Reset (turn OFF) the Quiet Flag - S - Set (turn ON) the Quiet Flag - - -Comments: - - Manù  ZCPR³ utilitieó reaä thå Quieô Flaç iî thå  ZCPR³ -Environmenô  Descriptoò  anä responä  accordingly®  Iæ  thå -Quieô  Flaç ió Seô (ON)¬  theî certaiî informativå  messageó -arå  suppresseä iî ordeò tï cuô dowî oî thå "noise¢  createä -bù thå command®  Iæ thå Quieô Flaç ió Reseô (OFF)¬ theî alì -messages are displayed. - -Selected Error Messages: - - Nï  Erroò Messageó arå generated®  Aî invaliä  commanä -results in the Help screen being displayed. - - -Examples of Use: - - QUIET R - - turn OFF (Reset) the Quiet Flag - - QUIET DISPLAY - - Display the Quiet Flag - -:REG Register Display and Manipulation - -Command: REG 1.0 - -Syntax: - - REG Dr or REG r <-- Display Register r - REG Mr <-- Minus (r=r-1) Register r - REG Pr <-- Plus (r=r+1) Register r - REG Sr value <-- Set (r=value) Register r - -Function: - - REÇ displays¬  addó ± to¬  subtractó ± from¬ anä setó á -valuå tï thå indicateä register® Á ZCPR³ Registeò ió á one- -byte buffer (values are ranged from 0 to 255 decimal). - - Thå  valuå  useä tï indicatå á registeò ió á  characteò -froí '0§ tï '9'®  Thå characteò '#§ indicateó alì registeró -("REG S# 0" stores 0 to all ten registers). - - -Options: - - Shown Above - -Comments: - - Registers are used for two purposes: - - 1. to support looping in ZEX command files - (do something N times) - - 2. to pass parameter values from one program to - another program which is executed later - - REÇ  haó á counterparô commanä iî thå  Systeí  Residenô -Command Package provided in the ZCPR3 distribution. - - -Selected Error Messages: - - "Invlä Reç IDº c¢ meanó thaô thå registeò indicateä waó -not symbolized by '0' to '9' or '#'. - -Examples of Use: - - REG S5 25 - -- Register 5 = 25 - - REG M# - -- 1 is subtracted from all registers - -:SETFILE System File Assignment - -Command: SETFILE 1.0 - -Syntax: - - SETFILE n afn -or - SETFILE n - -Function: - - SETFILÅ seô thå namå oæ ZCPR³ Systeí Filå î (wherå î ió -± tï 4© tï thå indicateä ambiguouó filå name®  Iæ nï AFÎ ió -given¬  thå currenô contentó oæ thå indicateä Systeí Filå ió -displayed. A file number is required. - -Options: - - None - - Comments: - - ZCPR³  Systeí Fileó arå referenceä bù somå oæ thå ZCPR³ -utilities¬  MENÕ  anä ALIAÓ iî particular®  SETFILÅ ió  thå -meanó  bù whicè thå contentó oæ theså filå namå  bufferó  ió -defined. - -Selected Error Messages: - - "Invaliä Filå Namå Numbeò (noô 1-4)¢ meanó thaô á valiä -filå  numbeò waó noô giveî afteò thå SETFILÅ verâ (SETFILÅ î -afn). - -Examples of Use: - - SETFILE 1 myfile.txt - - System File 1 is set to MYFILE.TXT - - SETFILE 4 - - the name of System File 4 is displayed -:SHCTRL Shell Stack Display and Manipulation - -Command: SHCTRL 1.0 - -Syntax: - - SHCTRL o - -Function: - - SHCTRÌ  ió  useä tï providå somå controì oæ  thå  ZCPR³ -Shelì  Stacë  froí thå commanä line®  Thå contentó  oæ  thå -Shelì Stacë caî bå displayeä anä poppeä onå leveì oò cleareä -completely. - - -Options: - - C - Clear the Shell Stack (no Shell is in effect) - D - Display Shell Stack - P - Pop the Shell Stack (the current Shell is stopped - and the next Shell on the stack is invoked) - -Comments: - - Onlù  onå  optioî maù bå useä iî conjunctioî  witè  thå -SHCTRÌ  command®  Anù characteró followinç thió optioî  arå -ignored. - - SHCTRÌ  ió  intendeä tï bå useä iî situationó  wherå  á -directorù changå ió desireä anä á Shell¬ sucè aó MENU¬ ió iî -execution®  Thå  Shelì Stacë caî bå popped¬  thå  directorù -changå   performed¬   anä  thå  originaì  Shelì   explicitlù -reinvoked. - - -Selected Error Messages: - - None - Help is printed if invalid option - -Examples of Use: - - SHCTRL P - - pop the Shell Stack one level - - SHCTRL D - - display the contents of the Shell Stack - - -:SHOW System Configuration Display and Error Handler - -Command: SHOW 1.0 - -Syntax: - - SHOW o - -Function: - - SHO× ió thå ZCPR³ Environmenô Displaù utility® Detailó -oæ thå ZCPR³ Environmenô Descriptor¬  whaô systeí facilitieó -arå  available¬  anä whaô thå statuó oæ theså facilitieó  ió -arå  somå  oæ thå itemó includeä iî  thå  numerouó  displayó -which are generated by SHOW. - - SHO× caî bå invokeä aó aî Erroò Handler¬  iî whicè caså -itó  Erroò Handleò displaù caî givå thå commanä linå  statuó -anä  itó otheò displays¬  sucè aó memorù examine¬  maù provå -useful to analyze the state of the ZCPR3 System. - - Options: - - E - Install SHOW as an Error Handler - (no SHOW displays are invoked) - -Comments: - SHOW provides the following displays to the user: - - 1. Package Data 3. ZCPR3 System - - Flow Command Package - Environment Descriptor - - Input/Output Package - Message Buffers - - Resident Command Package - CRT and Printer Data - - System File Definitions - 2. Environment Data - - Error Handler - - Memory Display Utility - - Named Directory Display - - Path Expression - - Shell Stack - - - SHO× ió screen-orienteä anä wilì noô functioî correctlù -withouô propeò Z3TCAÐ support®  Thå Environmenô  Descriptoò -MUST be installed with a valid Z3TCAP entry. - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - Trù  iô  - you'lì likå it¡  SHO×  ió  totallù  screen- -orienteä  anä  wilì noô begiî tï functioî correctlù  withouô -propeò  Z3TCAР support®  Iæ thå useò enteró  SHO×  withouô -proper support, the X command exits SHOW. - -:Z3INS ZCPR3 System Installation Program - -Command: Z3INS 1.0 - -Syntax: - - Z3INS ufn1 ufn2 - - UFN1 must be an Environment Descriptor - UFN2 must be a Z3INS Installation File - -Function: - - Z3INÓ  installó thå fileó nameä iî á Z3INÓ Installatioî -Filå  witè datá froí thå Environmenô  Descriptoò  specified® -All files must be ZCPR3 Utilities. - - Thå   defaulô   filå  typeó  arå  ENÖ  foò  UFN±   (thå -Environment Descriptor) and INS (the Installation File). - - -Options: - - None - -Comments: - - Z3INÓ ió thå installatioî prograí foò thå ZCPR³ System® -Alì utilitieó provideä iî thå ZCPR³ distributioî excepô  foò -ZEX may be installed for a target system by using Z3INS. - - Á  ZCPR³  Installatioî  Filå  ió  simplù  á  texô  filå -containinç twï typeó oæ linesº á commenô line¬ whicè beginó -witè  á semicoloî (;)¬  anä á linå containinç aî unambiguouó -file name, which is a file to be installed. Example: - - - ; This is an installation file for my new utilities - util1.com - util2.com - ; UTIL3 is really neat - util3.com - - -- Sample Z3INS Installation File -- - - - Caså ió noô significant®  Leadinç spaceó oî eacè  linå -are ignored. Any file name MUST be unambiguous. - - Thå  Environmenô  Descriptoò referenceä iî thå  commanä -linå ió á standarä ZCPR³ Systeî Environmenô descriptoò whicè -is created by assembling a file like SYSENV.ASM. - - -Selected Error Messages: - - Alì   erroò  messageó  arå  verù  completå  anä   self- -explanatory. - -Examples of Use: - - Z3INS SYS.ENV NEWFILES.INS - -- Install the files listed in NEWFILES.INS with - the data contained in SYS.ENV - - Z3INS NEWENV DIST - -- Install the files listed in DIST.INS with - the data contained in NEWENV.ENV - -:Z3LOC ZCPR3 System Segment Locator - -Command: Z3LOC 1.0 - -Syntax: - - Z3LOC o - -Function: - - Z3LOà ió useä tï locatå anä displaù thå  addresseó  oæ -thå runninç ZCPR³ Commanä Processoò Replacement¬  BDOS¬  anä -BIOS®  Iô maù alsï bå ruî undeò conventionaì CP/Í tï locatå -anä  displaù  thå addresseó oæ thå runninç CP/Í 2.²  Consolå -Command Processor, BDOS, and BIOS. - - Z3LOà ió alsï ablå tï displaù thå addresseó oæ á numbeò -oæ  ZCPR³ Systeí Segmentó anä datá areaó iæ thå Ú optioî  ió -given®  Thå  Ú optioî shoulä noô bå giveî iæ runninç  Z3LOà -under CP/M 2.2. - - -Options: - - Z - Display addresses and data on ZCPR3 System Segments - and data areas - -Comments: - - Iæ  thå  Ú optioî ió giveî (Ú shoulä onlù bå  giveî  iæ -runninç  Z3LOà undeò  ZCPR3)¬   thå  followinç   additionaì -address information is provided: - - ï Externaì Patè ï Residenô Commanä Package - o Input/Output Package o Flow Command Package - o Named Directory Buffer o Command Line Buffer - o Shell Stack o Environment Descriptor - o External FCB o ZCPR3 Message Buffer - o External Stack o Wheel Byte - - -Selected Error Messages: - - Z3LOà generateó nï erroò messages®  Aî invaliä optioî -invokes a help screen. - -Examples of Use: - - Z3LOC - -- run Z3LOC for CPR/CCP, BDOS, and BIOS display - (may be used this way under CP/M 2.2) - - Z3LOC Z - -- display ZCPR3 data as well - (may be used this way under ZCPR3 only) - - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/Z3UTIL3.HLP b/Source/Images/d_bp/u15/Z3UTIL3.HLP deleted file mode 100644 index 83d79d32..00000000 --- a/Source/Images/d_bp/u15/Z3UTIL3.HLP +++ /dev/null @@ -1,237 +0,0 @@ -Note ZCPR3 Utilities -CLEANDIR Physical Directory Cleanup -CMD Input Command Line -MU Memory Utility RCP -SHSET Define Shell Sequence -:Note ZCPR3 Utilities - - Thió  seô  oæ  ZCPR³ utilitieó arå  general-purposå  iî -naturå  anä  havå  beeî  provideä witè  thå  ZCPR³  Phaså  ² -release® Alì utilitieó excepô thå RCÐ caî bå installeä oî á -targeô ZCPR³ Systeí bù runninç Z3INS. - -:CLEANDIR Physical Directory Cleanup -Command: CLEANDIR 1.0 - -Syntax: - CLEANDIR dir: o -or - CLEANDIR o - -Function: - CLEANDIÒ "cleans¢ á physicaì disë directory®  Iô loadó -thå  directorù  oæ thå targeô disë  intï  memory¬  sortó  iô -alphabeticallù  withiî  eacè useò areá (ascendinç  ordeò  bù -default)¬  anä  writeó iô ouô tï disë witè Eµ filì oæ unuseä -directorù entries. - - Á DIRº  prefiø ió allowed¬  buô onlù thå disë referencå -ió meaningful¬  sï iæ "CLEANDIÒ ROOT:¢ ió issueä wherå ROOTº -is A15:, then disk A is cleaned. - -Options: - D - sort user areas and files in Descending Order - -Comments: - - CLEANDIR'ó  sorô  oî thå disë directorù buyó  thå  useò -several advantages: - - 1®  Utilitieó whicè sorô thå disë directorù  afteò -loadinç  it¬  likå XDIR¬  ruî fasteò sincå thå directorù  ió -already sorted. - - 2®  Thå  possibilitù oæ recoverinç fileó  bù  thå -UNERASÅ commanä ió increaseä iæ CLEANDIÒ haó beeî ruî oî thå -directorù recentlù beforå thå fileó werå erased®  Notå thaô -anù  eraseä fileó absolutelù cannoô bå recovereä bù  UNERASÅ -iæ  CLEANDIÒ  waó ruî betweeî thå timå theù werå eraseä  anä -UNERASE was executed. - - 3®  Uså  oæ DU2/DU³ tï looë aô thå  directorù  ió -facilitated if the directory is already sorted by CLEANDIR. - - -Selected Error Messages: - - Self-Explanatory - -Examples of Use: - - CLEANDIR - -- clean current disk in ascending order - - CLEANDIR A: D - -- clean disk A in descending order - - CLEANDIR TEXT: - -- clean the disk which the directory named TEXT - is defined for in ascending order - - CLEANDIR D - -- clean current disk in descending order - -:CMD Input Command Line -Command: CMD 1.0 - -Syntax: - - CMD cmd1;cmd2;... -or - CMD or CMD;cmd2;... - -Function: - - Iæ  CMÄ haó aî argument¬  iô buildó á ne÷ commanä  linå -whicè  beginó witè thió argumenô anä proceedó witè thå  resô -oæ thå commanä line® Foò example¬ thå firsô form: - - CMD cmd1;cmd2;... - -is translated into: - - cmd1;cmd2;... - - - Thió  ió  gooä  becauså sourceó sucè  aó  MENU¬  VMENU¬ -anä  VFILEÒ  caî  enteò thå "cmd1¢ variablå  froí  thå  useò -selection manually. - - Iæ CMÄ haó nï argument¬ thå useò ió prompteä foò input¬ -anä  thió inpuô ió inserteä intï thå commanä streaí  aô  thå -poinô oæ thå CMÄ command® Thió ió mucè morå useful¬ sucè aó -wheî  SHSEÔ  ió useä tï definå á shelì  sequence¬  anä  thió -sequencå  ió tï bå exiteä aô somå time®  Foò  example¬  thå -second form: - - CMD;cmd2;... - -is translated into: - - mycmd;cmd2;... - -if the user typed in "mycmd" in response to the prompt. - - CMÄ setó thå erroò messagå wheneveò iô runs®  ERROÒ ió -turned on if no line was input to CMD. - -Options: None - -Comments: - - CMÄ  waó  builô  foò uså specificallù  witè  thå  SHSEÔ -command¬  althï iô maù finä otheò applications® Thå probleí -thaô CMÄ addresseó ió thå caså wherå thå maiî prograí iî thå -shelì sequencå knowó nothinç abouô shells¬ anä iô ió desireä -to leave the sequence sometime. CMD provides this out. - - Foò  instance¬  iæ MU³ ió tï bå useä aó thå maiî shell¬ -then: - SHSET MU3;CMD - -wilì ruî MU3¬  allo÷ thå useò tï dï whaô hå wants¬  anä theî -reenter MU3. If the user entered the command - - - SHCTRL POP - -thå shelì stacë woulä bå poppeä anä thå "MU3;CMD¢ looð woulä -be broken. - - Additionally¬  CMÄ setó thå ERROÒ messagå oæ ZCPR3¬  sï -thaô  programó  oî dowî thå linå caî determinå iæ inpuô  waó -madå wheî CMÄ waó run®  Iæ thå useò simplù strikeó á RETURÎ -iî responså tï thå CMÄ prompt¬ aî erroò ió indicated® Testó -caî lateò bå made¬ likå IÆ ERROR¬ tï checë thió anä makå thå -command flow change depending on the outcome. - -Selected Error Messages: - - None - self-explanatory - -Examples of Use: - - See above -:MU Memory Utility RCP -Command: MU RCP 1.0A - -Syntax: - - MU <-- invoke MU at 100H -or MU address <-- invoke MU at indicated address - -Function: - - MÕ ió identicaì tï MU³ iî function¬  witè thå exceptioî -thaô   thå  È  commanä  (Hexadecimaì  Calculator©   ió   noô -supported®  Thå  differencå  betweeî MÕ anä MU³ ió thaô  MÕ -executeó aó aî RCÐ anä MU³ executeó aó á transient®  Aó  aî -RCP¬  MÕ  allowó thå useò tï examinå thå TPÁ withouô concerî -foò sidå effects¬  sï debugginç transientó ió simplifieä  bù -thió command®  Iô ió thå onlù maiî commanä iî thå DEBUG.RCÐ -provided in the ZCPR3 release. - - -Options: None - -Comments: - - MÕ maù bå invokeä aó á Shelì bù thå SHSEÔ command® Thå -à commanä caî bå useä froí withiî MÕ tï executå anù desireä -commanä line¬  includinç thå "SHCTRÌ POP¢ commanä whicè popó -MÕ  froí  thå Shelì Stack¬  terminatinç itó operatioî  aó  á -Shell. - -Selected Error Messages: None - -Examples of Use: - - MU <-- run MU - MU 0F400 <-- run MU but position at 0F400H - -:SHSET Define Shell Sequence -Command: SHSET 1.0 - -Syntax: - - SHSET cmd1;cmd2;... - -Function: - - SHSEÔ  defineó  thå  commandó whicè follo÷  iô  aó  thå -commanä sequencå tï bå placeä oî thå toð oæ thå shelì stack® -Iô placeó thió sequencå there®  Consequently¬ oncå SHSEÔ ió -executeä  oî á sequencå oæ commands¬  theså commandó wilì bå -cycleä  thrõ  timå anä timå agaiî untiì thå shelì  stacë  ió -cleared or popped. - -Options: - - None - - -Comments: - - SHSEÔ  provideó aî easù mechanisí tï makå  anù  commanä -sequencå  intï á shell®  Consequently¬  non-ZCPR³ programs¬ -likå  MBASIC¬  DBASÅ II¬  WORÄ STAR¬  anä otheró caî  becomå -shells under ZCPR3. - - Carå  shoulä bå takeî witè SHSEÔ iî allowinç thå  shelì -tï  bå  exiteä  iæ iô ió sï desired®  Thå  utilitù  CMÄ  ió -sometimes useful for this. - -Selected Error Messages: - - None - self-explanatory - - -Examples of Use: - - SHSET MBASIC;CMD - -- define the sequence MBASIC;CMD to be a shell - - SHSET WS - -- define Word Star to be a shell - - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ZCPR3.AQM b/Source/Images/d_bp/u15/ZCPR3.AQM deleted file mode 100644 index 64198f09..00000000 Binary files a/Source/Images/d_bp/u15/ZCPR3.AQM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ZCPR3.ASM b/Source/Images/d_bp/u15/ZCPR3.ASM deleted file mode 100644 index 33f2a15f..00000000 --- a/Source/Images/d_bp/u15/ZCPR3.ASM +++ /dev/null @@ -1,2907 +0,0 @@ - -************************************************************************* -* * -* Z C P R 3 -- Z80-Based Command Processor Replacement, Version 3.0 * -* * -* Copyright (c) 1984 by Richard Conn * -* Copyright US Government * -* All Rights Reserved * -* * -* ZCPR3 was written by Richard Conn, who assumes no responsibility * -* or liability for its use. ZCPR3 is released to the CP/M user * -* community for non-commercial use only. * -* * -* All registered users of CP/M are encouraged to freely copy and use * -* ZCPR3 and its associated utilities on their registered systems for * -* non-commercial purposes. * -* * -* Any commercial use of ZCPR3 is prohibited unless approved by the * -* author, Richard Conn, or his authorized agent, Echelon, Inc, in * -* writing. * -* * -* This is the RELEASE VERSION of ZCPR3. Dated: 21 Apr 84 * -* * -************************************************************************* - -; -; ZCPR3 -- CP/M Z80 Command Processor Replacement (ZCPR) Version 3.0 -; -; ZCPR3 is based upon ZCPR2 -; -;******** Structure Notes ******** -; -; ZCPR3 is divided into a number of major sections. The following -; is an outline of these sections and the names of the major routines -; located therein. -; -; Section Function/Routines -; ------- ----------------- -; -; -- Opening Comments, Equates, and Macro Definitions -; -; 0 JMP Table into ZCPR3 -; ENTRY -; -; 1 Buffers -; 1. Input Command Line and Default Command -; 2. File Type of COM File -; 3. SUBMIT File Control Block -; 4. Command File Control Block -; 5. Line Count Buffer -; 6. Resident Command Table -; -; 2 CPR Starting Modules -; CPR1 CPR RESTRT RS0 RS1 -; RS2 PARSER SCANNER DUSCAN DIRSCAN -; PASSCK SKSP TSTEOL INITFCB IFCB -; FILL PRNNF -; -; 3 Utilities -; CONIN CRLF CONOUT LCOUT LSTOUT -; PAGER READF READ BDOSB NOTE -; PRINTC PRINT PRIN1 GETDRV DEFDMA -; DMASET RESET BDOSJP LOGIN OPENF -; OPEN GRBDOS CLOSE SEARF SEAR1 -; SEARN SUBKIL DELETE GETUSR SETUSR -; -; 4 CPR Utilities -; SETUD UCASE PROMPT READBUF BREAK -; SDELM ADDAH LDIR NUMBER NUMERR -; HEXNUM FCBLOG SLOGIN WHLCHK CMDSER -; -; 5 CPR-Resident Commands and Functions -; 5A DIR DIRPR PRFN DIRPTR GETSBIT -; 5B ERA -; 5C LIST -; 5D TYPE -; 5E SAVE AMBCHK EXTEST -; 5F REN -; 5G JUMP -; 5H GO -; 5I COMDIR COM CALLPROG -; 5J GET MLOAD DLOGIN PRNLE PATH -; MPATH STACK PWLIN -; - -; -; The following MACLIB statements load all the user-selected equates -; which are used to customize ZCPR3 for the user's working environment. -; - MACLIB Z3BASE - MACLIB Z3HDR -; -CTRLC EQU 03H -TAB EQU 09H -LF EQU 0AH -CR EQU 0DH -; -WBOOT EQU BASE+0000H ;CP/M WARM BOOT ADDRESS -UDFLAG EQU BASE+0004H ;USER NUM IN HIGH NYBBLE, DISK IN LOW -BDOS EQU BASE+0005H ;BDOS FUNCTION CALL ENTRY PT -TFCB EQU BASE+005CH ;DEFAULT FCB BUFFER -TFCB2 EQU TFCB+16 ;2ND FCB -TBUFF EQU BASE+0080H ;DEFAULT DISK I/O BUFFER -TPA EQU BASE+0100H ;BASE OF TPA -BIOS EQU CCP+0800H+0E00H ;BIOS Location -; -$-MACRO ;FIRST TURN OFF THE EXPANSIONS -; -; MACROS TO PROVIDE Z80 EXTENSIONS -; MACROS INCLUDE: -; -; JR - JUMP RELATIVE -; JRC - JUMP RELATIVE IF CARRY -; JRNC - JUMP RELATIVE IF NO CARRY -; JRZ - JUMP RELATIVE IF ZERO -; JRNZ - JUMP RELATIVE IF NO ZERO -; DJNZ - DECREMENT B AND JUMP RELATIVE IF NO ZERO -; PUTRG - SAVE REGISTERS -; GETRG - RESTORE REGISTERS -; -; @GENDD MACRO USED FOR CHECKING AND GENERATING -; 8-BIT JUMP RELATIVE DISPLACEMENTS -; -@GENDD MACRO ?DD ;;USED FOR CHECKING RANGE OF 8-BIT DISPLACEMENTS - IF (?DD GT 7FH) AND (?DD LT 0FF80H) - DB 100H,?DD ;Displacement Range Error - ELSE - DB ?DD - ENDIF ;;RANGE ERROR - ENDM -; -; -; Z80 MACRO EXTENSIONS -; -JR MACRO ?N ;;JUMP RELATIVE - IF I8080 ;;8080/8085 - JMP ?N - ELSE ;;Z80 - DB 18H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRC MACRO ?N ;;JUMP RELATIVE ON CARRY - IF I8080 ;;8080/8085 - JC ?N - ELSE ;;Z80 - DB 38H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRNC MACRO ?N ;;JUMP RELATIVE ON NO CARRY - IF I8080 ;;8080/8085 - JNC ?N - ELSE ;;Z80 - DB 30H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRZ MACRO ?N ;;JUMP RELATIVE ON ZERO - IF I8080 ;;8080/8085 - JZ ?N - ELSE ;;Z80 - DB 28H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -JRNZ MACRO ?N ;;JUMP RELATIVE ON NO ZERO - IF I8080 ;;8080/8085 - JNZ ?N - ELSE ;;Z80 - DB 20H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -DJNZ MACRO ?N ;;DECREMENT B AND JUMP RELATIVE ON NO ZERO - IF I8080 ;;8080/8085 - DCR B - JNZ ?N - ELSE ;;Z80 - DB 10H - @GENDD ?N-$-1 - ENDIF ;;I8080 - ENDM -; -PUTRG MACRO - PUSH H ;;SAVE REGISTERS IN ORDER - PUSH D - PUSH B - ENDM -; -GETRG MACRO - POP B ;;RESTORE REGISTERS IN ORDER - POP D - POP H - ENDM -; -; END OF Z80 MACRO EXTENSIONS -; -; -;**** Section 0 **** -; - ORG CPRLOC -; -; ENTRY POINTS INTO ZCPR3 -; -; IF MULTCMD (MULTIPLE COMMANDS ON ONE LINE) is FALSE: -; If ZCPR3 is entered at location CPRLOC (at the JMP to CPR), then -; the default command in CMDLIN will be processed. If ZCPR3 is entered -; at location CPRLOC+3 (at the JMP to CPR1), then the default command in -; CMDLIN will NOT be processed. -; NOTE: Entry into ZCPR3 at CPRLOC is permitted, but in order for this -; to work, CMDLIN MUST be initialized to contain the command line (ending in 0) -; and the C register MUST contain a valid User/Disk Flag -; (the most significant nybble contains the User Number and the least -; significant nybble contains the Disk Number). -; -; IF MULTCMD is TRUE: -; Entry at CPR or CPR1 has the same effect. Multiple command processing -; will still continue. -; -; If MULTCMD is FALSE, a user program need only load the buffer -; CMDLIN with the desired command line, terminated by a zero, in order to -; have this command line executed. If MULTCMD is TRUE, a user program must -; load this buffer as before, but he must also set the NXTCHR pointer to -; point to the first character of the command line. -; -; NOTE: ***** (BIG STAR) ***** Programs such as SYNONYM3 will fail if -; multiple commands are enabled, but this feature is so very useful that I -; feel it is worth the sacrifice. Some ZCPR3 utilities, like ALIAS and MENU, -; require multiple commands, and this feature also permits simple chaining -; of programs to be possible under the ZCPR3 environment. -; -; Enjoy using ZCPR3! -; Richard Conn -; -ENTRY: - JMP CPR ; Process potential default command - JMP CPR1 ; Do NOT process potential default command -; -;**** Section 1 **** -; BUFFERS ET AL -; -; **** 1. INPUT COMMAND LINE AND DEFAULT COMMAND -; - IF MULTCMD ;MULTIPLE COMMANDS ALLOWED? -; -; For Multiple Commands, the command line buffer (CMDLIN) is located external -; to ZCPR3 so that it is not overlayed during Warm Boots; the same is true -; for NXTCHR, the 2nd key buffer. BUFSIZ and CHRCNT are not important and -; are provided so the BDOS READLN function can load CMDLIN directly and -; a user program can see how much space is available in CMDLIN for its text. -; -NXTCHR EQU Z3CL ;NXTCHR STORED EXTERNALLY (2 bytes) -BUFSIZ EQU NXTCHR+2 ;BUFSIZ STORED EXTERNALLY (1 byte) -CHRCNT EQU BUFSIZ+1 ;CHRCNT STORED EXTERNALLY (1 byte) -CMDLIN EQU CHRCNT+1 ;CMDLIN STORED EXTERNALLY (long) -BUFLEN EQU Z3CLS ;LENGTH OF BUFFER -; - ELSE -; -; If no multiple commands are permitted, these buffers are left internal -; to ZCPR3 so that the original CCP command line facility (as used by -; programs like SYNONYM3) can be left intact. -; -BUFLEN EQU 80 ;MAXIMUM BUFFER LENGTH -BUFSIZ: - DB BUFLEN ;MAXIMUM BUFFER LENGTH -CHRCNT: - DB 0 ;NUMBER OF VALID CHARS IN COMMAND LINE -CMDLIN: - DB ' ' ;DEFAULT (COLD BOOT) COMMAND - DB 0 ;COMMAND STRING TERMINATOR - DS BUFLEN-($-CMDLIN)+1 ;TOTAL IS 'BUFLEN' BYTES -; -NXTCHR: - DW CMDLIN ;POINTER TO COMMAND INPUT BUFFER -; - ENDIF ;MULTCMD -; - -; -; **** 2. FILE TYPE FOR COMMAND -; -COMMSG: - COMTYP ;USE MACRO FROM Z3HDR.LIB -; - IF SUBON ;IF SUBMIT FACILITY ENABLED ... -; -; **** 3. SUBMIT FILE CONTROL BLOCK -; -SUBFCB: - DB 1 ;DISK NAME SET TO DEFAULT TO DRIVE A: - DB '$$$' ;FILE NAME - DB ' ' - SUBTYP ;USE MACRO FROM Z3HDR.LIB - DB 0 ;EXTENT NUMBER - DB 0 ;S1 -SUBFS2: - DS 1 ;S2 -SUBFRC: - DS 1 ;RECORD COUNT - DS 16 ;DISK GROUP MAP -SUBFCR: - DS 1 ;CURRENT RECORD NUMBER -; - ENDIF ;SUBON -; -; **** 4. COMMAND FILE CONTROL BLOCK -; - IF EXTFCB NE 0 ;MAY BE PLACED EXTERNAL TO ZCPR3 -; -FCBDN EQU EXTFCB ;DISK NAME -FCBFN EQU FCBDN+1 ;FILE NAME -FCBFT EQU FCBFN+8 ;FILE TYPE -FCBDM EQU FCBFT+7 ;DISK GROUP MAP -FCBCR EQU FCBDM+16 ;CURRENT RECORD NUMBER -; - ELSE ;OR INTERNAL TO ZCPR3 -; -FCBDN: - DS 1 ;DISK NAME -FCBFN: - DS 8 ;FILE NAME -FCBFT: - DS 3 ;FILE TYPE - DS 1 ;EXTENT NUMBER - DS 2 ;S1 AND S2 - DS 1 ;RECORD COUNT -FCBDM: - DS 16 ;DISK GROUP MAP -FCBCR: - DS 1 ;CURRENT RECORD NUMBER -; - ENDIF ;EXTFCB -; - -; -; **** 5. LINE COUNT BUFFER -; - IF LTON -PAGCNT: - DB NLINES-2 ;LINES LEFT ON PAGE - ENDIF ;LTON -; -; **** 6. RESIDENT COMMAND TABLE -; EACH TABLE ENTRY IS STRUCTURED AS FOLLOWS: -; DB 'NAME' ;NCHARS LONG -; DW ADDRESS ;ADDRESS OF COMMAND -; -CMDTBL: - DB NCHARS ;SIZE OF TEXT IN COMMAND TABLE - CTABLE ;DEFINE COMMAND TABLE VIA MACRO IN Z3HDR FILE - DB 0 ;END OF TABLE -; - -; -;**** Section 2 **** -; ZCPR3 STARTING POINTS -; -; START ZCPR3 AND DON'T PROCESS DEFAULT COMMAND STORED IF MULTIPLE COMMANDS -; ARE NOT ALLOWED -; -CPR1: -; - IF NOT MULTCMD ;IF MULTIPLE COMMANDS NOT ALLOWED -; - XRA A ;SET END OF COMMAND LINE SO NO DEFAULT COMMAND - STA CMDLIN ;FIRST CHAR OF BUFFER -; - ENDIF ;NOT MULTCMD -; -; START ZCPR3 AND POSSIBLY PROCESS DEFAULT COMMAND -; -; NOTE ON MODIFICATION BY Ron Fowler: BDOS RETURNS 0FFH IN -; ACCUMULATOR WHENEVER IT LOGS IN A DIRECTORY, IF ANY -; FILE NAME CONTAINS A '$' IN IT. THIS IS NOW USED AS -; A CLUE TO DETERMINE WHETHER OR NOT TO DO A SEARCH -; FOR SUBMIT FILE, IN ORDER TO ELIMINATE WASTEFUL SEARCHES. -; -CPR: - LXI SP,STACK ;RESET STACK -; - IF NOT MULTCMD ;ONLY ONE COMMAND PERMITTED - LXI H,CMDLIN ;SET PTR TO BEGINNING OF COMMAND LINE - SHLD NXTCHR - ENDIF ;NOT MULTCMD -; - PUSH B - MOV A,C ;C=USER/DISK NUMBER (SEE LOC 4) - RAR ;EXTRACT USER NUMBER - RAR - RAR - RAR - ANI 0FH - STA CURUSR ;SET USER - CALL SETUSR ;SET USER NUMBER - CALL RESET ;RESET DISK SYSTEM -; - IF SUBON ;IF SUBMIT FACILITY ENABLED -; - STA RNGSUB ;SAVE SUBMIT CLUE FROM DRIVE A: -; - ENDIF ;SUBON -; - POP B - MOV A,C ;C=USER/DISK NUMBER (SEE LOC 4) - ANI 0FH ;EXTRACT CURRENT DISK DRIVE - STA CURDR ;SET IT - CNZ LOGIN ;LOG IN DEFAULT DISK IF NOT ALREADY LOGGED IN - CALL SETUD ;SET USER/DISK FLAG - CALL DEFDMA ;SET DEFAULT DMA ADDRESS -; - IF SUBON ;CHECK FOR $$$.SUB IF SUBMIT FACILITY IS ON -; - LXI D,SUBFCB ;CHECK FOR $$$.SUB ON CURRENT DISK -RNGSUB EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;2ND BYTE (IMMEDIATE ARG) IS THE RNGSUB FLAG - ORA A ;SET FLAGS ON CLUE - CNZ SEAR1 - STA RNGSUB ;SET FLAG (0=NO $$$.SUB) -; - ENDIF ;SUBON -; - JR RS1 ;CHECK COMMAND LINE FOR CONTENT -; -; PROMPT USER AND INPUT COMMAND LINE FROM HIM -; -RESTRT: - LXI SP,STACK ;RESET STACK -; -; READ INPUT LINE FROM USER OR $$$.SUB -; -RS0: -; - IF Z3MSG NE 0 - XRA A ;SET NO OUTPUT MESSAGE - STA Z3MSG+3 ;ZCPR3 COMMAND STATUS - INR A ;SET ZCPR3 INPUT PROMPT - STA Z3MSG+7 ;ZEX MESSAGE BYTE - ENDIF ;Z3MSG NE 0 -; - LXI H,CMDLIN ;SET POINTER TO FIRST CHAR IN COMMAND LINE - SHLD NXTCHR ;POINTER TO NEXT CHARACTER TO PROCESS - MVI M,0 ;ZERO OUT COMMAND LINE IN CASE OF WARM BOOT - PUSH H ;SAVE PTR - CALL READBUF ;INPUT COMMAND LINE FROM USER (OR $$$.SUB) -; - IF Z3MSG NE 0 - XRA A ;NORMAL PROCESSING RESUMED - STA Z3MSG+7 ;ZEX MESSAGE BYTE - ENDIF -; - POP H ;GET PTR - MOV A,M ;CHECK FOR COMMENT LINE - CPI COMMENT ;BEGINS WITH COMMENT CHAR? - JRZ RS0 ;INPUT ANOTHER LINE IF SO -; -; PROCESS INPUT LINE; NXTCHR PTS TO FIRST LETTER OF COMMAND -; -RS1: - LXI SP,STACK ;RESET STACK -; -; RETURN TO CURRENT DIRECTORY AND POINT TO NEXT CHAR IN COMMAND LINE -; - CALL DLOGIN ;RETURN TO CURRENT DIRECTORY - LHLD NXTCHR ;PT TO FIRST CHAR OF NEXT COMMAND - PUSH H ;SAVE PTR -; -; CAPITALIZE COMMAND LINE -; -CAPBUF: - MOV A,M ;CAPITALIZE COMMAND CHAR - CALL UCASE - MOV M,A - INX H ;PT TO NEXT CHAR - ORA A ;EOL? - JRNZ CAPBUF - POP H ;GET PTR TO FIRST CHAR IN LINE -; -; SET POINTER FOR MULTIPLE COMMAND LINE PROCESSING TO FIRST CHAR OF NEW CMND -; -RS2: - CALL SKSP ;SKIP OVER SPACES - ORA A ;END OF LINE? - JRZ RESTRT - CPI CTRLC ;ABORT CHAR? - JRZ RESTRT -; - IF MULTCMD ;MULTIPLE COMMANDS ALLOWED? - MOV A,M ;GET FIRST CHAR OF COMMAND - CPI CMDSEP ;IS IT A COMMAND SEPARATOR? - JRNZ RS3 - INX H ;SKIP IT IF IT IS - JR RS2 - ENDIF ;MULTCMD -; -RS3: - SHLD NXTCHR ;SET PTR TO FIRST CHAR OF NEW COMMAND LINE - SHLD CURCMD ;SAVE PTR TO COMMAND LINE FOR ERROR RETURN -; -; PARSE COMMAND LINE PTED TO BY HL -; - CALL PARSER ;PARSE ENTIRE COMMAND LINE -; -; CHECK FOR SHELL INVOCATION AND RUN IT IF SO -; - IF Z3MSG NE 0 - LDA Z3MSG+3 ;GET COMMAND STATUS - CPI 1 ;SHELL? - JZ RS4 - ENDIF ;Z3MSG NE 0 -; -; IF IFON AND FCP AVAILABLE, TRY TO RUN FROM FCP -; - IF IFON AND (FCP NE 0) - LXI H,FCP+5 ;PT TO COMMAND TABLE - CALL CMDSCAN ;SCAN TABLE - JZ CALLP ;RUN IF FOUND (NO LEADING CRLF) - ENDIF ;IFON AND (FCP NE 0) -; -; IF IFON, THEN CHECK FOR RUNNING IF AND FLUSH COMMAND LINE IF ENABLED -; - IF IFON - LXI H,Z3MSG+1 ;PT TO IF BYTE - MOV A,M ;GET IT - ORA A ;SEE IF ANY IF - JRZ RS4 ;CONTINUE IF NOT - INX H ;PT TO IF ACTIVE BYTE - ANA M ;SEE IF CURRENT IF IS ACTIVE - JRZ RS1 ;SKIP IF NOT - ENDIF ;IFON -RS4: -; -; IF DIR: PREFIX, HANDLE AS COM FILE -; -COLON EQU $+1 ;FLAG FOR IN-THE-CODE MODIFICATION - MVI A,0 ;COMMAND OF THE FORM 'DIR:COMMAND'? - ORA A ;0=NO - JNZ COMDIR ;PROCESS AS COM FILE IF DIR: FORM -; -; CHECK FOR RESIDENT COMMAND -; - CALL CMDSER ;SCAN FOR CPR-RESIDENT COMMAND - JZ CALLP ;RUN CPR-RESIDENT COMMAND WITH NO LEADING CRLF -; -; CHECK FOR RESIDENT COMMAND PACKAGE -; - IF RCP NE 0 - LXI H,RCP+5 ;PT TO RCP COMMAND TABLE - CALL CMDSCAN ;CHECK FOR RCP - JZ CALLPROG - ENDIF -; -; PROCESS AS COM FILE -; - JMP COM ;PROCESS COM FILE - -; -; ERROR PROCESSOR -; -ERROR: -; - IF SUBON ;IF SUBMIT FACILITY IS ON -; - CALL SUBKIL ;TERMINATE ACTIVE $$$.SUB IF ANY -; - ENDIF ;SUBON -; - CALL CRLF ;NEW LINE -; - IF Z3MSG NE 0 ;MESSAGES ENABLED? -; - LDA Z3MSG+3 ;WAS ERROR CAUSED BY NO SHELL? - ANI 1 ;BIT 0 SAYS ZCPR3 TRIED TO RUN A SHELL - JRNZ ERRSH ;ABORT SHELL - LDA Z3MSG ;GET ERROR HANDLER MESSAGE - MOV B,A ;... IN B - ORA A ;FLUSH AND RESUME? - JRZ ERR0 - MVI A,2 ;SET ERROR FLAG - STA Z3MSG+3 ;IN SHELL STATUS BUFFER - LHLD CURCMD ;PT TO BEGINNING OF ERROR - SHLD Z3MSG+4 ;SAVE IN MESSAGE - LXI H,Z3MSG+10H ;PT TO COMMAND LINE - SHLD NXTCHR ;NEXT CHARACTER TO EXECUTE - JMP RS1 ;RUN CONTENTS OF BUFFER -; -; CLEAR SHELL STACK AND RESTART COMMAND PROCESSING -; -ERRSH: -; - IF SHSTK NE 0 ;IF SHELL STACK AVAILABLE - XRA A ;CLEAR SHELL STACK - STA SHSTK - ENDIF -; - JMP RESTRT ;RESTART PROCESSING -ERR0: -; - ENDIF ;Z3MSG NE 0 -; -CURCMD EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - LXI H,0 ;PT TO BEGINNING OF COMMAND LINE -ERR1: - MOV A,M ;GET CHAR - ORA A ;END OF LINE? - JRZ ERR2 - CALL CONOUT ;PRINT COMMAND CHAR - INX H ;PT TO NEXT CHAR - JR ERR1 ;CONTINUE -ERR2: - CALL PRINT ;PRINT '?' - DB '?'+80H -ERR3: - JMP RESTRT ;RESTART CPR - -; -; PARSE COMMAND LINE PTED TO BY HL -; RETURN WITH NZ IF ERROR IN COMMAND NAME -; -PARSER: -; -; INITIALIZE THE COMMAND AND TOKEN FCBS -; - LXI D,FCBDN ;PT TO COMMAND FCB - CALL INITFCB ;INIT IT - LXI D,TFCB ;PT TO TOKEN FCB - CALL INITFCB ;INIT IT -; -; EXTRACT COMMAND NAME -; - LXI D,FCBDN ;PLACE COMMAND NAME INTO COMMAND FCB - CALL SCANNER ;EXTRACT COMMAND NAME - JRNZ ERROR ;ERROR RETURN -; -; CHECK FOR ERROR IN COMMAND NAME (FILE TYPE GIVEN) -; - LXI D,FCBFT ;PT TO FILE TYPE - LDAX D ;GET FIRST CHAR OF FILE TYPE - CPI ' ' ;MUST BE BLANK, OR ERROR - JRNZ ERROR ;ERROR RETURN -; -; SET TYPE OF COMMAND -; - PUSH H ;SAVE PTR TO NEXT BYTE - LXI H,COMMSG ;PLACE DEFAULT FILE TYPE (COM) INTO FCB - MVI B,3 ;3 BYTES - CALL LDIR - POP H ;GET PTR TO NEXT BYTE -; -; SET DIR: PREFIX FLAG -; -MYCOLON EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;PREVIOUS TOKEN CONTAINED A COLON? - STA COLON -; -; SAVE POINTER TO COMMAND TAIL FOR LATER COPY INTO TBUFF AND FIND END OF -; COMMAND LINE; THIS IS ALSO THE ENTRY POINT FOR CMDRUN FACILITY TO -; PARSE THE ENTIRE COMMAND LINE AS A TAIL -; -PARSET: - SHLD TAILSV ;SAVE PTR TO COMMAND TAIL - PUSH H ;SAVE PTR -CTAIL: - MOV A,M ;GET CHAR - CALL TSTEOL ;AT EOL? - JRZ CTAIL1 - INX H ;PT TO NEXT - JR CTAIL -CTAIL1: - SHLD NXTCHR ;SAVE PTR TO NEXT LINE - POP H ;GET PTR TO COMMAND TAIL -; -; EXTRACT FIRST TOKEN -; - CALL SKSP ;SKIP OVER SPACES - RZ ;DONE IF EOL OR END OF COMMAND - LXI D,TFCB ;STORE FIRST TOKEN IN TFCB - CALL SCANNER ;EXTRACT TOKEN -; -; EXTRACT SECOND TOKEN -; - CALL SKSP ;SKIP OVER SPACES - RZ ;DONE IF EOL OR END OF COMMAND - LXI D,TFCB+16 ;PT TO 2ND FCB AND FALL THRU TO SCANNER -; -; EXTRACT TOKEN FROM COMMAND LINE AND PLACE IT INTO FCB PTED TO BY DE -; FORMAT FCBDN FCB IF TOKEN RESEMBLES FILE NAME AND TYPE (FILENAME.TYP) -; ON INPUT, HL PTS TO NEXT CHAR AND DE PTS TO FCB -; ON OUTPUT, HL PTS TO DELIMITER AFTER TOKEN AND ZERO FLAG IS RESET -; IF '?' IS IN TOKEN -; -; ENTRY POINTS: -; SCANNER - LOAD TOKEN INTO FCB PTED TO BY DE -; -SCANNER: - XRA A ;A=0 - STAX D ;SET DEFAULT DRIVE - STA MYCOLON ;SET NO COLON - STA TEMPDR ;SET TEMPORARY DRIVE NUMBER TO DEFAULT - STA QMCNT ;ZERO QUESTION MARK COUNTER - LDA CURUSR ;GET CURRENT USER - STA TEMPUSR ;SET TEMPUSR - PUSH D ;SAVE PTR TO FIRST BYTE OF FCB - MVI B,8 ;8 CHARS MAX - CALL SCANF ;PLACE FIRST TOKEN INTO FILE NAME FIELD - POP D ;GET PTR TO FIRST BYTE OF FCB - MOV A,M ;GET TERMINATING CHAR - STA ENDCHAR ;SET ENDING CHAR - CPI ':' ;COLON? - JRNZ SCAN1 ;NO, WE HAVE A FILE NAME - STA MYCOLON ;SET COLON - INX H ;PT TO CHAR AFTER COLON -; -; SCAN TOKEN FOR DIR: FORM, WHICH MEANS WE HAVE A USER/DISK SPECIFICATION -; HL PTS TO CHAR AFTER COLON -; - IF (Z3NDIR NE 0) AND NDINCP ;NAMED DIRS AVAILABLE -; - IF DUFIRST ;DU: BEFORE DIR: -; -; CHECK FOR DU: FORM -; - IF ACCPTDU ;PERMIT DU: FORM - PUSH D ;SAVE PTR TO FCB DN - PUSH H ;SAVE PTR TO NEXT CHAR IN LINE - CALL DUSCAN ;CHECK FOR DU: FORM - POP H ;GET PTR TO NEXT CHAR - POP D ;GET PTR TO FCB - JRZ SUD1 ;GOT IT - ENDIF ;ACCPTDU -; -; CHECK FOR DIR: FORM -; - IF ACCPTND ;PERMIT DIR: FORM - PUSH D ;SAVE PTR TO FCB - PUSH H ;SAVE PTR TO NEXT CHAR - CALL DIRSCAN ;CHECK FOR DIR: FORM - POP H ;GET PTR TO NEXT CHAR - POP D ;GET PTR TO FCB - JRNZ SCAN1 ;ERROR IN PREFIX - ENDIF ;ACCPTND -SUD1: -; - ELSE ;DIR: BEFORE DU: -; -; CHECK FOR DIR: FORM -; - IF ACCPTND ;PERMIT DIR: FORM - PUSH D ;SAVE PTR TO FCB - PUSH H ;SAVE PTR TO NEXT CHAR - CALL DIRSCAN ;CHECK FOR DIR: FORM - POP H ;GET PTR TO NEXT CHAR - POP D ;GET PTR TO FCB - JRZ SUD1 ;GOT IT - ENDIF ;ACCPTND -; -; CHECK FOR DU: FORM -; - IF ACCPTDU ;PERMIT DU: FORM - PUSH D ;SAVE PTR TO FCB DN - PUSH H ;SAVE PTR TO NEXT CHAR IN LINE - CALL DUSCAN ;CHECK FOR DU: FORM - POP H ;GET PTR TO NEXT CHAR - POP D ;GET PTR TO FCB - JRNZ SCAN1 ;ERROR IN PREFIX - ENDIF ;ACCPTDU -SUD1: -; - ENDIF ;DUFIRST -; - ELSE ;DU ONLY -; -; CHECK FOR DU: FORM -; - IF ACCPTDU ;ALLOW DU: FORM - PUSH D ;SAVE PTR TO FCB DN - PUSH H ;SAVE PTR TO NEXT CHAR IN LINE - CALL DUSCAN ;CHECK FOR DU: FORM - POP H ;GET PTR TO NEXT CHAR - POP D ;GET PTR TO FCB - JRNZ SCAN1 ;ERROR IN PREFIX - ENDIF ;ACCPTDU -; - ENDIF ;(Z3NDIR NE 0) AND NDINCP -; -; SET DRIVE REFERENCED -; - LDA TEMPDR ;SET DRIVE - STAX D ;... IN FCB -; -; REINIT FCB PTED TO BY DE -; - PUSH D ;SAVE PTR - INX D ;PT TO FN FIELD - CALL IFCB ;ONLY PARTIAL INIT (17 BYTES TOTAL) - POP D -; -; EXTRACT FILENAME FIELD -; - XRA A - STA QMCNT ;ZERO QUESTION MARK COUNTER - PUSH D ;SAVE PTR TO FIRST BYTE OF FCB - MVI B,8 ;8 CHARS MAX - CALL SCANF ;STORE FILE NAME - POP D ;GET PTR TO FIRST BYTE OF FCB - MOV A,M ;GET OFFENDING CHAR - STA ENDCHAR ;SET ENDING CHAR -; -; SKIP TO FILE TYPE FIELD -; HL PTS TO NEXT CHAR, DE PTS TO DN FIELD OF FCB -; -SCAN1: -ENDCHAR EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;GET ENDING CHAR - XCHG - LXI B,8 ;PT TO BEFORE FILE TYPE FIELD OF FCB - DAD B - XCHG -; -; EXTRACT FILETYPE FIELD -; - MVI B,3 ;PREPARE TO EXTRACT FILE TYPE - CPI '.' ;IF '.', WE HAVE A TYPE - JRNZ SCAN2 - INX H ;PT TO CHAR AFTER '.' - PUSH D - CALL SCANF ;GET FCB FILE TYPE - POP D -SCAN2: -; -; SET USER NUMBER REFERENCED -; HL PTS TO NEXT CHAR, DE PTS TO BEFORE FCB FT -; - XCHG - LXI B,5 ;PT TO S1 FIELD - DAD B - XCHG - LDA TEMPUSR ;STORE USER NUMBER HERE - STAX D -; -; SKIP TO SPACE, CHAR AFTER =, OR EOL -; HL PTS TO NEXT CHAR IN LINE -; -SCAN3: - MOV A,M ;GET NEXT CHAR - CPI ' '+1 ;DONE IF LESS THAN SPACE - JRC SCAN4 - CALL TSTEOL ;EOL? - JRZ SCAN4 - INX H ;PT TO NEXT - CPI '=' ;EQUATE? - JRNZ SCAN3 -SCAN4: -; -; SET ZERO FLAG TO INDICATE PRESENCE OF '?' IN DIR:FILENAME.TYP -; -QMCNT EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;NUMBER OF QUESTION MARKS - ORA A ;SET ZERO FLAG - RET -; -; SCANF -- SCAN TOKEN PTED TO BY HL FOR A MAX OF B BYTES; PLACE IT INTO -; FILE NAME FIELD PTED TO BY DE; EXPAND AND INTERPRET WILD CARDS OF -; '*' AND '?'; ON EXIT, DE PTS TO TERMINATING DELIMITER -; -SCANF: - CALL SDELM ;DONE IF DELIMITER ENCOUNTERED - RZ - INX D ;PT TO NEXT BYTE IN FCB - CPI '*' ;IS (DE) A WILD CARD? - JRNZ SCANF1 ;CONTINUE IF NOT - MVI A,'?' ;PLACE '?' IN FCB AND DON'T ADVANCE HL IF SO - STAX D - CALL SCQ ;SCANNER COUNT QUESTION MARKS - JR SCANF2 -SCANF1: - STAX D ;STORE FILENAME CHAR IN FCB - INX H ;PT TO NEXT CHAR IN COMMAND LINE - CPI '?' ;CHECK FOR QUESTION MARK (WILD) - CZ SCQ ;SCANNER COUNT QUESTION MARKS -SCANF2: - DJNZ SCANF ;DECREMENT CHAR COUNT UNTIL 8 ELAPSED -SCANF3: - CALL SDELM ;8 CHARS OR MORE - SKIP UNTIL DELIMITER - RZ ;ZERO FLAG SET IF DELIMITER FOUND - INX H ;PT TO NEXT CHAR IN COMMAND LINE - JR SCANF3 -; -; INCREMENT QUESTION MARK COUNT FOR SCANNER -; THIS ROUTINE INCREMENTS THE COUNT OF THE NUMBER OF QUESTION MARKS IN -; THE CURRENT FCB ENTRY -; -SCQ: - PUSH H ;SAVE HL - LXI H,QMCNT ;GET COUNT - INR M ;INCREMENT - POP H ;GET HL - RET -; -; SCAN FOR AND EXTRACT DISK/USER INFO ASSUMING DU: FORM -; ON ENTRY, DE PTS TO FIRST BYTE OF FCB CONTAINING POSSIBLE DU FORM -; ON EXIT, ZERO FLAG SET MEAN OK AND TEMPDR AND TEMPUSR SET -; - IF ACCPTDU ;ALLOW DU: FORM -DUSCAN: - XCHG ;PTR IN HL - INX H ;PT TO FIRST BYTE OF FN - MOV A,M ;GET FIRST CHAR - CPI 'A' ;CONVERT POSSIBLE DRIVE SPEC TO NUMBER - JRC DUS1 ;IF LESS THAN 'A', MUST BE DIGIT -; -; SET DISK NUMBER (A=1) -; - SUI 'A'-1 ;CONVERT DRIVE NUMBER TO 1-16 - CPI MAXDISK+1 ;WITHIN RANGE? - JRNC DUSE1 ;INVALID DISK NUMBER - STA TEMPDR ;SET TEMPORARY DRIVE NUMBER - INX H ;PT TO NEXT CHAR - MOV A,M ;SEE IF IT IS A SPACE - CPI ' ' - RZ - CALL DIGCK ;CHECK FOR DIGIT - RC -; -; SET USER NUMBER -; -DUS1: - PUSH H ;SAVE PTR TO DIGITS - MVI B,2 ;UP TO 2 DIGITS -DUS1A: - MOV A,M ;CHECK FOR DIGIT OR SPACE - CPI ' ' ;IF SPACE, THEN NO DIGIT - JRZ DUS2 - CALL DIGCK ;CHECK FOR DIGIT - JRC DUSE - INX H - DJNZ DUS1A ;COUNT DOWN - MOV A,M ;3RD CHAR - CPI ' ' ;MUST BE SPACE - JRNZ DUSE -DUS2: - POP H - CALL NUM0A ;GET NUMBER - CPI MAXUSR+1 ;WITHIN LIMIT? - JRNC DUSE1 - STA TEMPUSR ;SAVE USER NUMBER - XRA A ;SET OK - RET -DUSE: - POP H ;CLEAR STACK -DUSE1: - XRA A - DCR A - RET -; - ENDIF ;ACCPTDU -; - IF (Z3NDIR NE 0) AND NDINCP AND ACCPTND -; -; SCAN FOR DIR FORM -; ON ENTRY, DE PTS TO FCB CONTAINING NAME TO CHECK FOR -; ON EXIT, IF FOUND, Z AND TEMPUSR AND TEMPDR SET -; -DIRSCAN: - XCHG ;PTR IN HL - INX H ;PT TO FN - LXI D,Z3NDIR ;PT TO FIRST ENTRY IN MEMORY-BASED DIR -DIRS1: - LDAX D ;GET NEXT CHAR - ORA A ;ZERO IF END OF DIR - JRZ DIRSERR - INX D ;PT TO DIR NAME - INX D - PUSH H ;SAVE PTR TO FILE NAME - PUSH D ;SAVE PTR TO DIR ENTRY - MVI B,8 ;MATCH? -DIRS2: - LDAX D ;GET BYTE - CMP M ;COMPARE - JRNZ DIRS3 - INX H ;PT TO NEXT - INX D - DJNZ DIRS2 ;COUNT DOWN -DIRS3: - POP D ;RESTORE REGS - POP H - JRZ DIRS4 - XCHG ;ADVANCE TO NEXT ENTRY - LXI B,16 ;8 BYTES FOR NAME + 8 BYTES FOR PASSWORD - DAD B - XCHG - JR DIRS1 -; -; NO DIR match -; -DIRSERR: - XRA A ;RETURN NZ - DCR A - RET -; -; DIR match -; -DIRS4: -; - IF PWCHECK - PUSH D ;SAVE PTR TO DE - LXI B,8 ;PT TO PW - XCHG ;HL PTS TO ENTRY - DAD B - CALL PASSCK ;CHECK FOR PW - POP D ;GET PTR - JNZ DIRSERR - ENDIF ;PWCHECK -; - DCX D ;PT TO USER - LDAX D ;GET USER - STA TEMPUSR - DCX D ;PT TO DISK - LDAX D ;GET IT - STA TEMPDR ;A=1 - XRA A ;SET Z - RET -; - ENDIF ;(Z3NDIR NE 0) AND NDINCP AND ACCPTND -; - IF PWCHECK -; -; CHECK FOR PASSWORD PTED TO BY HL -; RETURN WITH ZERO FLAG SET IF MATCH -; -PASSCK: - MOV A,M ;CHECK FOR NO PW - CPI ' ' - RZ - PUSH H ;SAVE PTR - CALL PRINT - DB CR,LF,'PW?',' '+80H - LXI D,PWLIN - MVI A,9 ;SET CHAR COUNT - STAX D - MVI C,10 ;BDOS READLN - PUSH D - CALL BDOS - POP H ;GET PTR TO BUFFER - INX H ;PT TO CHAR COUNT - MOV A,M ;GET CHAR COUNT - INX H ;PT TO FIRST CHAR - PUSH H ;SAVE PTR - CALL ADDAH ;HL PTS TO AFTER LAST CHAR - MVI M,' ' ;PLACE SPACE - POP D ;PT TO USER INPUT - POP H ;PT TO PASSWORD - MVI B,8 ;8 CHARS MAX -PWCK: - LDAX D ;GET NEXT CHAR - CALL UCASE ;CAPITALIZE USER INPUT - CMP M ;COMPARE FOR MATCH - RNZ ;NO MATCH - CPI ' ' ;DONE? - RZ - INX H ;PT TO NEXT - INX D - DJNZ PWCK - XRA A ;SET ZERO FLAG - RET -; - ENDIF ;PWCHECK - -; -; SKIP OVER SPACES PTED TO BY HL -; ON RETURN, ZERO FLAG SET MEANS WE HIT EOL OR CMDSEP -; -SKSP: - MOV A,M ;GET NEXT CHAR - INX H ;PT TO NEXT - CPI ' ' ;SPACE? - JRZ SKSP - DCX H ;PT TO NON-SPACE -; -; CHECK TO SEE IF CHAR IN A IS EOL OR CMDSEP -; -TSTEOL: - ORA A ;EOL? -; - IF MULTCMD ;MULTIPLE COMMANDS SUPPORTED? - RZ ;RETURN WITH FLAG - CPI CMDSEP ;COMMAND SEPARATOR? - ENDIF ;MULTCMD -; - RET - -; -; INIT FCB PTED TO BY DE -; -INITFCB: - XRA A - STAX D ;SET DEFAULT DISK (DN BYTE IS 0) - INX D ;PT TO FILE NAME FIELD - CALL IFCB ;FILL 1ST PART OF FCB; FALL THRU TO IFCB TO RUN AGAIN -; -; FILL FN, FT, EX, S1, S2, RC, AND FOLLOWING CR (OR DN) FIELDS -; -IFCB: - MVI B,11 ;STORE 11 SPACES - MVI A,' ' - CALL FILL - XRA A - STAX D ;SET EX TO ZERO - INX D - LDA CURUSR - STAX D ;SET S1 TO CURRENT USER - INX D - MVI B,3 ;STORE 3 ZEROES - XRA A ;FALL THRU TO FILL -; -; FILL MEMORY POINTED TO BY DE WITH CHAR IN A FOR B BYTES -; -FILL: - STAX D ;FILL WITH BYTE IN A - INX D ;PT TO NEXT - DJNZ FILL - RET -; -; No File Error Message -; -PRNNF: - CALL PRINTC ;NO FILE MESSAGE - DB 'No Fil','e'+80H - RET -; -;**** Section 3 **** -; I/O UTILITIES -; -; OUTPUT CHAR IN REG A TO CONSOLE AND DON'T CHANGE BC -; -CONIN: - MVI C,1 ;INPUT CHAR - CALL BDOS ;GET INPUT CHAR WITH ^S PROCESSING AND ECHO - JMP UCASE ;CAPITALIZE -; -; OUTPUT -; -CRLF: - MVI A,CR - CALL CONOUT - MVI A,LF ;FALL THRU TO CONOUT -; -CONOUT: - PUTRG ;SAVE REGS - MVI C,2 -OUTPUT: - MOV E,A - CALL BDOS - GETRG ;GET REGS - RET -; -LCOUT: - PUSH PSW ;OUTPUT CHAR TO CON: OR LST: DEP ON PRFLG -PRFLG EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;2ND BYTE (IMMEDIATE ARG) IS THE PRINT FLAG - ORA A ;0=TYPE - JRZ LC1 - POP PSW ;GET CHAR -; -; OUTPUT CHAR IN REG A TO LIST DEVICE -; -LSTOUT: - PUTRG ;SAVE REGISTERS - MVI C,5 - JR OUTPUT -LC1: - POP PSW ;GET CHAR - PUSH PSW - CALL CONOUT ;OUTPUT TO CON: - POP PSW -; - IF LTON - CPI LF ;CHECK FOR PAGING - RNZ -; -; PAGING ROUTINES -; PAGER COUNTS DOWN LINES AND PAUSES FOR INPUT (DIRECT) IF COUNT EXPIRES -; PAGSET SETS LINES/PAGE COUNT -; -PAGER: - PUSH H - LXI H,PAGCNT ;COUNT DOWN - DCR M - JRNZ PAGER1 ;JUMP IF NOT END OF PAGE - MVI M,NLINES-2 ;REFILL COUNTER -; -PGFLG EQU $+1 ;POINTER TO IN-THE-CODE BUFFER PGFLG - MVI A,0 ;0 MAY BE CHANGED BY PGFLG EQUATE - CPI PGDFLG ;PAGE DEFAULT OVERRIDE OPTION WANTED? -; - IF PGDFLT ;IF PAGING IS DEFAULT - JRZ PAGER1 ; PGDFLG MEANS NO PAGING - ELSE ;IF PAGING NOT DEFAULT - JRNZ PAGER1 ; PGDFLG MEANS PLEASE PAGINATE -; - ENDIF ;PGDFLG -; - PUSH B ;SAVE REG - CALL BIOS+9 ;BIOS CONSOLE INPUT ROUTINE - POP B ;GET REG - CPI 'C'-'@' ;^C - JZ RS1 ;RESTART CPR -PAGER1: - POP H ;RESTORE HL - - ENDIF ;LTON -; - RET ;RETURN FOR LC1 IF NOT LTON -; -; READ FILE BLOCK FUNCTION -; -READF: - LXI D,TFCB ;FALL THRU TO READ -READ: - MVI C,14H ;FALL THRU TO BDOSB -; -; CALL BDOS AND SAVE BC -; -BDOSB: - PUSH B - CALL BDOS - POP B - ORA A -; -; THIS RETURN IS FOR BDOSB AND FOR THE NULL FUNCTION CALLED NOTE -; -NOTE: - RET -; -; PRINT STRING (ENDING IN CHAR WITH MSB SET) PTED TO BY RET ADR -; START WITH -; -PRINTC: - CALL CRLF ;NEW LINE -; -PRINT: - XTHL ;GET PTR TO STRING - CALL PRIN1 ;PRINT STRING - XTHL ;RESTORE HL AND RET ADR - RET -; -; PRINT STRING (ENDING IN 0 OR BYTE WITH MSB SET) PTED TO BY HL -; -PRIN1: - MOV A,M ;GET NEXT BYTE - INX H ;PT TO NEXT BYTE - ORA A ;END OF STRING? - RZ ;STRING TERMINATED BY BINARY 0 - PUSH PSW ;SAVE FLAGS - ANI 7FH ;MASK OUT MSB - CALL CONOUT ;PRINT CHAR - POP PSW ;GET FLAGS - RM ;STRING TERMINATED BY MSB SET - JR PRIN1 -; -; BDOS FUNCTION ROUTINES -; -; -; RETURN NUMBER OF CURRENT DISK IN A -; -GETDRV: - MVI C,19H - JR BDOSJP -; -; SET 80H AS DMA ADDRESS -; -DEFDMA: - LXI D,TBUFF ;80H=TBUFF -DMASET: - MVI C,1AH - JR BDOSJP -; -RESET: - MVI C,0DH -BDOSJP: - JMP BDOS -; -LOGIN: - MOV E,A - MVI C,0EH - JR BDOSJP ;SAVE SOME CODE SPACE -; -OPENF: - XRA A - STA FCBCR - LXI D,FCBDN ;FALL THRU TO OPEN -; -OPEN: - MVI C,0FH ;FALL THRU TO GRBDOS -; -GRBDOS: - CALL BDOS - INR A ;SET ZERO FLAG FOR ERROR RETURN - RET -; -CLOSE: - MVI C,10H - JR GRBDOS -; -SEARF: - LXI D,TFCB ;SPECIFY FCB -SEAR1: - MVI C,11H - JR GRBDOS -; -SEARN: - MVI C,12H - JR GRBDOS -; -; CHECK FOR SUBMIT FILE IN EXECUTION AND ABORT IT IF SO -; - IF SUBON ;ENABLE ONLY IF SUBMIT FACILITY IS ENABLED -; -SUBKIL: - LXI H,RNGSUB ;CHECK FOR SUBMIT FILE IN EXECUTION - MOV A,M - ORA A ;0=NO - RZ - MVI M,0 ;ABORT SUBMIT FILE - LXI D,SUBFCB ;DELETE $$$.SUB -; - ENDIF ;SUBON -; -DELETE: - MVI C,13H - JR BDOSJP ;SAVE MORE SPACE -; -; GET/SET USER NUMBER -; -GETUSR: - MVI A,0FFH ;GET CURRENT USER NUMBER -SETUSR: - MOV E,A ;USER NUMBER IN E - MVI C,20H ;SET USER NUMBER TO VALUE IN E (GET IF E=FFH) - JR BDOSJP ;MORE SPACE SAVING -; -; END OF BDOS FUNCTIONS -; -; -;**** Section 4 **** -; ZCPR3 UTILITIES -; -; SET USER/DISK FLAG TO CURRENT USER AND DEFAULT DISK -; -SETUD: - CALL GETUSR ;GET NUMBER OF CURRENT USER - ANI 0FH ;MASK SURE 4 BITS - ADD A ;PLACE IT IN HIGH NYBBLE - ADD A - ADD A - ADD A - LXI H,CURDR ;MASK IN CURRENT DRIVE NUMBER (LOW NYBBLE) - ORA M ;MASK IN - STA UDFLAG ;SET USER/DISK NUMBER - RET -; -; CONVERT CHAR IN A TO UPPER CASE -; -UCASE: - ANI 7FH ;MASK OUT MSB - CPI 61H ;LOWER-CASE A - RC - CPI 7BH ;GREATER THAN LOWER-CASE Z? - RNC - ANI 5FH ;CAPITALIZE - RET -; -; PRINT DU (DIR) PROMPT -; -PROMPT: -; -; PRINT PROMPT (DU>) -; - CALL CRLF ;PRINT PROMPT -; - IF INCLDU ;IF DRIVE IN PROMPT - LDA CURDR ;CURRENT DRIVE IS PART OF PROMPT - ADI 'A' ;CONVERT TO ASCII A-P - CALL CONOUT - LDA CURUSR ;GET USER NUMBER -; - IF SUPRES ;IF SUPPRESSING USR # REPORT FOR USR 0 - ORA A - JRZ PRMPT2 - ENDIF ;SUPRES -; - CPI 10 ;USER < 10? - JRC PRMPT1 - SUI 10 ;SUBTRACT 10 FROM IT - PUSH PSW ;SAVE IT - MVI A,'1' ;OUTPUT 10'S DIGIT - CALL CONOUT - POP PSW -PRMPT1: - ADI '0' ;OUTPUT 1'S DIGIT (CONVERT TO ASCII) - CALL CONOUT -PRMPT2: - ENDIF ;INCLDU -; -; PRINT NDIR ENTRY IF ANY -; - IF INCLNDR AND (Z3NDIR NE 0) -; - LDA CURDR ;GET CURRENT DU IN BC - INR A - MOV B,A - LDA CURUSR - MOV C,A - LXI H,Z3NDIR ;SCAN DIRECTORY FOR MATCH -; -; MAIN LOOP FOR SCANNING NDR FOR DU IN BC -; -PRMPT3: - MOV A,M ;END OF NDR? - ORA A - RZ - INX H ;PT TO USER - CMP B ;COMPARE DISK - JRNZ PRMPT5 - MOV A,M ;COMPARE USER - CMP C - JRNZ PRMPT5 -; -; MATCH OF DU -; - IF INCLDU ;SEPARATE DU AND NDR WITH COLON - MVI A,':' ;PRINT SEPARATOR - CALL CONOUT - ENDIF ;INCLDU -; - MVI B,8 ;8 CHARS MAX -PRMPT4: - INX H ;PT TO NEXT CHAR - MOV A,M ;GET NEXT CHAR - CPI ' ' ;DONE IF SPACE - RZ - CALL CONOUT ;PRINT CHAR - DJNZ PRMPT4 ;COUNT DOWN - RET -; -; ADVANCE TO NEXT DU -; -PRMPT5: - LXI D,16+1 ;SKIP USER (1 BYTE) AND NAME/PW (16 BYTES) - DAD D - JR PRMPT3 ;CONTINUE SCAN -; - ENDIF ;INCLNDR AND (Z3NDIR NE 0) -; - RET -; -; INPUT NEXT COMMAND TO CPR -; This routine determines if a SUBMIT file is being processed -; and extracts the command line from it if so or from the user's console -; -READBUF: -; - IF SUBON ;IF SUBMIT FACILITY IS ENABLED, CHECK FOR IT -; - LDA RNGSUB ;SUBMIT FILE CURRENTLY IN EXECUTION? - ORA A ;0=NO - JRZ RB1 ;GET LINE FROM CONSOLE IF NOT - LXI D,SUBFCB ;OPEN $$$.SUB - PUSH D ;SAVE DE - CALL OPEN - POP D ;RESTORE DE - JRZ RB1 ;ERASE $$$.SUB IF END OF FILE AND GET CMND - LDA SUBFRC ;GET VALUE OF LAST RECORD IN FILE - DCR A ;PT TO NEXT TO LAST RECORD - STA SUBFCR ;SAVE NEW VALUE OF LAST RECORD IN $$$.SUB - CALL READ ;DE=SUBFCB - JRNZ RB1 ;ABORT $$$.SUB IF ERROR IN READING LAST REC - LXI D,CHRCNT ;COPY LAST RECORD (NEXT SUBMIT CMND) TO CHRCNT - LXI H,TBUFF ; FROM TBUFF - MVI B,BUFLEN ;NUMBER OF BYTES - CALL LDIR - LXI H,SUBFS2 ;PT TO S2 OF $$$.SUB FCB - MVI M,0 ;SET S2 TO ZERO - INX H ;PT TO RECORD COUNT - DCR M ;DECREMENT RECORD COUNT OF $$$.SUB - LXI D,SUBFCB ;CLOSE $$$.SUB - CALL CLOSE - JRZ RB1 ;ABORT $$$.SUB IF ERROR - CALL PROMPT ;PRINT PROMPT - MVI A,SPRMPT ;PRINT SUBMIT PROMPT TRAILER - CALL CONOUT - LXI H,CMDLIN ;PRINT COMMAND LINE FROM $$$.SUB - CALL PRIN1 - CALL BREAK ;CHECK FOR ABORT (ANY CHAR) - RNZ ;IF NO ^C, RETURN TO CALLER AND RUN - CALL SUBKIL ;KILL $$$.SUB IF ABORT - JMP RESTRT ;RESTART CPR -; -; INPUT COMMAND LINE FROM USER CONSOLE -; -RB1: - CALL SUBKIL ;ERASE $$$.SUB IF PRESENT -; - ENDIF ;SUBON -; -; IF SHELL STACKS ARE IMPLEMENTED, CHECK FOR CONTENT AT THIS TIME -; - IF SHSTK NE 0 -; - LXI H,SHSTK ;PT TO STACK - MOV A,M ;CHECK FIRST BYTE - CPI ' '+1 ;SEE IF ANY ENTRY - JRC RB2 ;GET USER INPUT IF NONE -; - ENDIF ;SHSTK NE 0 -; - IF (SHSTK NE 0) OR (Z3MSG NE 0) -; -RUNBUF: - LXI D,CMDLIN ;PT TO FIRST CHAR OF COMMAND LINE - MVI B,SHSIZE ;COPY SHELL LINE INTO COMMAND LINE BUFFER - CALL LDIR ;DO COPY - XCHG ;HL PTS TO END OF LINE - MVI A,1 ;SAY SHELL WAS INVOKED - STA Z3MSG+3 ;Z3 OUTPUT MESSAGE - JR RB3 ;STORE ENDING ZERO AND EXIT -RB2: -; - ENDIF ;(SHSTK NE 0) OR (Z3MSG NE 0) -; - CALL PROMPT ;PRINT PROMPT - MVI A,CPRMPT ;PRINT PROMPT TRAILER - CALL CONOUT - MVI C,0AH ;READ COMMAND LINE FROM USER - LXI D,BUFSIZ ;PT TO BUFFER SIZE BYTE OF COMMAND LINE - CALL BDOS -; -; STORE ZERO AT END OF COMMAND LINE -; - LXI H,CHRCNT ;PT TO CHAR COUNT - MOV A,M ;GET CHAR COUNT - INX H ;PT TO FIRST CHAR OF COMMAND LINE - CALL ADDAH ;PT TO AFTER LAST CHAR OF COMMAND LINE -RB3: - MVI M,0 ;STORE ENDING ZERO - RET -; -; CHECK FOR ANY CHAR FROM USER CONSOLE; RET W/ZERO SET IF NONE -; -BREAK: - PUTRG ;SAVE REGISTERS - CALL BIOS+6 ;CONSOLE STATUS CHECK - ORA A ;SET FLAGS - CNZ BIOS+9 ;GET INPUT CHAR WITH ^S PROCESSING - CPI 'S'-'@' ;PAUSE IF ^S - CZ BIOS+9 ;GET NEXT CHAR - GETRG ;RESTORE REGISTERS - CPI 'C'-'@' ;CHECK FOR ABORT - RET - -; -; CHECK TO SEE IF HL PTS TO DELIMITER; IF SO, RET W/ZERO FLAG SET -; -SDELM: - MOV A,M ;GET NEXT CHAR FROM LINE - CPI ' '+1 ;DELIM IF <= - JRC ZERO - CPI '=' ;'='=DELIMITER - RZ - CPI 5FH ;UNDERSCORE=DELIMITER - RZ - CPI '.' ;'.'=DELIMITER - RZ - CPI ':' ;':'=DELIMITER - RZ - CPI ',' ;','=DELIMITER - RZ -; - IF CMDSEP NE ';' - CPI ';' ;';'=DELIMITER - RZ - ENDIF -; - CPI '<' ;'<'=DELIMITER - RZ - CPI '>' ;'>'=DELIMITER - RZ - JMP TSTEOL ;CHECK FOR EOL -ZERO: - XRA A ;SET ZERO FLAG - RET -; -; ADD A TO HL (HL=HL+A) -; -ADDAH: - ADD L - MOV L,A - RNC - INR H - RET -; -; COPY FROM HL TO DE FOR B BYTES -; -LDIR: - MOV A,M ;GET BYTE - STAX D ;PUT BYTE - INX H ;PT TO NEXT - INX D - DJNZ LDIR - RET -; -; EXTRACT DECIMAL NUMBER FROM COMMAND LINE -; RETURN WITH VALUE IN REG A; ALL REGISTERS MAY BE AFFECTED -; -NUMBER: - LXI H,TFCB+8 ;PT TO END OF TOKEN FOR CONVERSION - MVI B,8 ;8 CHARS MAX -; -; CHECK FOR SUFFIX FOR HEXADECIMAL NUMBER -; -NUMS: - MOV A,M ;GET CHARS FROM END, SEARCHING FOR SUFFIX - DCX H ;BACK UP - CPI ' ' ;SPACE? - JRNZ NUMS1 ;CHECK FOR SUFFIX - DJNZ NUMS ;COUNT DOWN - JR NUM0 ;BY DEFAULT, PROCESS -NUMS1: - CPI NUMBASE ;CHECK AGAINST BASE SWITCH FLAG - JRZ HEXNUM -; -; PROCESS DECIMAL NUMBER -; -NUM0: - LXI H,TFCB+1 ;PT TO BEGINNING OF TOKEN -NUM0A: - LXI B,1100H ;C=ACCUMULATED VALUE, B=CHAR COUNT - ; (C=0, B=11) -NUM1: - MOV A,M ;GET CHAR - CALL SDELM ;DONE IF DELIMITER - JRZ NUM2 - INX H ;PT TO NEXT CHAR - CALL DIGCK ;CHECK FOR DIGIT IN A - JRC NUMERR - MOV D,A ;DIGIT IN D - MOV A,C ;NEW VALUE = OLD VALUE * 10 - RLC ;*2 - JRC NUMERR - RLC ;*4 - JRC NUMERR - ADD C ;*5 - JRC NUMERR - RLC ;*10 - JRC NUMERR - ADD D ;NEW VALUE = OLD VALUE * 10 + DIGIT - JRC NUMERR ;CHECK FOR RANGE ERROR - MOV C,A ;SET NEW VALUE - DJNZ NUM1 ;COUNT DOWN -; -; RETURN FROM NUMBER -; -NUM2: - MOV A,C ;GET ACCUMULATED VALUE - RET -; -; NUMBER ERROR ROUTINE FOR SPACE CONSERVATION -; -NUMERR: - JMP ERROR ;USE ERROR ROUTINE - THIS IS RELATIVE PT -; -; CHECK TO SEE IF A IS A DIGIT -; IF SO, RETURN ITS VALUE -; IF NOT, RETURN WITH CARRY SET -; -DIGCK: - SUI '0' ;DIGIT? - RC ;ERROR - CPI 10 ;RANGE? - JRNC DIGCK1 - CMC ;FLIP CARRY - RET -DIGCK1: - STC ;SET CARRY - RET -; -; EXTRACT HEXADECIMAL NUMBER FROM COMMAND LINE -; RETURN WITH VALUE IN REG A; ALL REGISTERS MAY BE AFFECTED -; -HEXNUM: - LXI H,TFCB+1 ;PT TO TOKEN FOR CONVERSION - LXI D,0 ;DE=ACCUMULATED VALUE - MVI B,11 ;B=CHAR COUNT -HNUM1: - MOV A,M ;GET CHAR - CPI ' ' ;DONE? - JRZ HNUM3 ;RETURN IF SO - CPI NUMBASE ;DONE IF NUMBASE SUFFIX - JRZ HNUM3 - SUI '0' ;CONVERT TO BINARY - JRC NUMERR ;RETURN AND DONE IF ERROR - CPI 10 ;0-9? - JRC HNUM2 - SUI 7 ;A-F? - CPI 10H ;ERROR? - JRNC NUMERR -HNUM2: - INX H ;PT TO NEXT CHAR - MOV C,A ;DIGIT IN C - MOV A,D ;GET ACCUMULATED VALUE - RLC ;EXCHANGE NYBBLES - RLC - RLC - RLC - ANI 0F0H ;MASK OUT LOW NYBBLE - MOV D,A - MOV A,E ;SWITCH LOW-ORDER NYBBLES - RLC - RLC - RLC - RLC - MOV E,A ;HIGH NYBBLE OF E=NEW HIGH OF E, - ; LOW NYBBLE OF E=NEW LOW OF D - ANI 0FH ;GET NEW LOW OF D - ORA D ;MASK IN HIGH OF D - MOV D,A ;NEW HIGH BYTE IN D - MOV A,E - ANI 0F0H ;MASK OUT LOW OF E - ORA C ;MASK IN NEW LOW - MOV E,A ;NEW LOW BYTE IN E - DJNZ HNUM1 ;COUNT DOWN -; -; RETURN FROM HEXNUM -; -HNUM3: - XCHG ;RETURNED VALUE IN HL - MOV A,L ;LOW-ORDER BYTE IN A - RET -; -; LOG INTO DU CONTAINED IN FCB PTED TO BY DE -; -FCBLOG: - PUSH D ;SAVE PTR TO FCB - XCHG - MOV A,M ;GET DRIVE - STA TEMPDR ;SET TEMP DRIVE - LXI B,13 ;PT TO S1 FIELD - DAD B - MOV A,M ;GET USER - STA TEMPUSR ;SET TEMP USER - CALL SLOGIN ;LOG IN - POP D ;GET PTR TO FCB - RET -; -; CHECK FOR SPECIFIED DRIVE AND LOG IT IN -; -SLOGIN: -TEMPDR EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;2ND BYTE (IMMEDIATE ARG) IS TEMPDR - ORA A ;0=CURRENT DRIVE - JRNZ SLOG1 - LDA CURDR ;LOG IN CURRENT DRIVE - INR A ;ADD 1 FOR NEXT DCR -SLOG1: - DCR A ;ADJUST FOR PROPER DISK NUMBER (A=0) - CALL LOGIN ;LOG IN NEW DRIVE -TEMPUSR EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;2ND BYTE IS USER TO BE SELECTED - JMP SETUSR ;LOG IN NEW USER -; -; ROUTINE TO CHECK FOR A WHEEL BYTE AS NON-ZERO -; IF WHEEL BYTE IS ZERO, THEN ABORT (POP STACK AND RETURN) -; -; - IF WHEEL ;WHEEL FACILITY? -WHLCHK: - LDA Z3WHL ;GET WHEEL BYTE - ORA A ;ZERO? - RNZ ;OK IF NOT - JMP ERROR ;PROCESS AS ERROR - ENDIF ;WHEEL -; - -; -; CMDTBL (COMMAND TABLE) SCANNER -; ON RETURN, HL CONTAINS ADDRESS OF COMMAND IF CPR-RESIDENT -; ON RETURN, ZERO FLAG SET MEANS CPR-RESIDENT COMMAND -; -CMDSER: - LXI H,CMDTBL ;PT TO COMMAND TABLE -; -; ENTRY POINT TO PERMIT RCP TABLE TO BE SCANNED -; -CMDSCAN: - MOV B,M ;GET SIZE OF COMMAND TEXT - INX H ;PT TO FIRST COMMAND -CMS1: - MOV A,M ;CHECK FOR END OF TABLE - ORA A - JRZ CMS5 - LXI D,FCBFN ;PT TO STORED COMMAND NAME - PUSH B ;SAVE SIZE OF COMMAND TEXT -CMS2: - LDAX D ;COMPARE AGAINST TABLE ENTRY - CMP M - JRNZ CMS3 ;NO MATCH - INX D ;PT TO NEXT CHAR - INX H - DJNZ CMS2 ;COUNT DOWN - LDAX D ;NEXT CHAR IN INPUT COMMAND MUST BE - CPI ' ' - JRNZ CMS4 - POP B ;CLEAR STACK - MOV A,M ;GET ADDRESS FROM TABLE INTO HL - INX H - MOV H,M - MOV L,A ;HL CONTAINS ADDRESS - XRA A ;ZERO FLAG SET FOR COMMAND FOUND - RET ;COMMAND IS RESIDENT (ZERO FLAG SET) -CMS3: - INX H ;SKIP TO NEXT COMMAND TABLE ENTRY - DJNZ CMS3 -CMS4: - POP B ;GET SIZE OF COMMAND TEXT - INX H ;SKIP ADDRESS - INX H - JR CMS1 -CMS5: - XRA A ;SET NZ - DCR A ;COMMAND NOT FOUND IF NZ - RET - -; -;**** Section 5 **** -; CPR-Resident Commands -; -; -;Section 5A -;Command: DIR -;Function: To display a directory of the files on disk -;Forms: -; DIR Displays the DIR files -; DIR S Displays the SYS files -; DIR A Display both DIR and SYS files -;Notes: -; The flag SYSFLG defines the letter used to display both DIR and -; SYS files (A in the above Forms section) -; The flag SOFLG defines the letter used to display only the SYS -; files (S in the above Forms section) -; The flag WIDE determines if the file names are spaced further -; apart (WIDE=TRUE) for 80-col screens -; The flag FENCE defines the character used to separate the file -; names -; - IF DIRON ;DIR ENABLED -; -DIR: - LXI D,TFCB ;PT TO TARGET FCB - PUSH D ;SAVE PTR - INX D ;PT TO FILE NAME - LDAX D ;GET FIRST CHAR - CPI ' ' ;IF , MAKE ALL WILD - JRNZ DIR1 - MVI B,11 ;11 BYTES - MVI A,'?' ;WILD - CALL FILL -DIR1: - POP D ;GET PTR TO FCB - LXI D,TFCB ;PT TO TARGET FCB - CALL FCBLOG ;LOG IN TEMP DISK/USER - LDA TFCB2+1 ;LOOK AT NEXT INPUT CHAR - MVI B,80H ;PREPARE FOR DIR-ONLY SELECTION - CPI ' ' - JRZ DIRPR ;THERE IS NO FLAG, SO DIR ONLY - MVI B,1 ;SET FOR BOTH DIR AND SYS FILES - CPI SYSFLG ;SYSTEM AND DIR FLAG SPECIFIER? - JRZ DIRPR ;GOT SYSTEM SPECIFIER - CPI SOFLG ;SYS ONLY? - JRNZ DIRPR - DCR B ;B=0 FOR SYS FILES ONLY - ;DROP INTO DIRPR TO PRINT DIRECTORY - ; THEN RESTART CPR -; - ENDIF ;DIRON -; -; DIRECTORY PRINT ROUTINE; ON ENTRY, B REG IS SET AS FOLLOWS: -; 0 FOR ONLY SYSTEM FILES, 80H FOR ONLY DIR FILES, 1 FOR BOTH -; - IF DIRON OR ERAON -; -DIRPR: - MOV A,B ;GET FLAG - STA SYSTST ;SET SYSTEM TEST FLAG - MVI E,0 ;SET COLUMN COUNTER TO ZERO - PUSH D ;SAVE COLUMN COUNTER (E) - CALL SEARF ;SEARCH FOR SPECIFIED FILE (FIRST OCCURRENCE) - JRNZ DIR3 - CALL PRNNF ;PRINT NO FILE MSG; REG A NOT CHANGED - XRA A ;SET ZERO FLAG IN CASE CALLED BY ERA - POP D ;RESTORE DE - RET -; -; ENTRY SELECTION LOOP; ON ENTRY, A=OFFSET FROM SEARF OR SEARN -; -DIR3: - CALL GETSBIT ;GET AND TEST FOR TYPE OF FILES - JRZ DIR6 - POP D ;GET ENTRY COUNT (= COUNTER) - MOV A,E ;GET ENTRY COUNTER - INR E ;INCREMENT ENTRY COUNTER - PUSH D ;SAVE IT - ANI 03H ;OUTPUT IF 4 ENTRIES PRINTED IN LINE - JRNZ DIR4 - CALL CRLF ;NEW LINE - JR DIR5 -DIR4: - CALL PRINT -; - IF WIDE -; - DB ' ' ;2 SPACES - DB FENCE ;THEN FENCE CHAR - DB ' ',' '+80H ;THEN 2 MORE SPACES -; - ELSE -; - DB ' ' ;SPACE - DB FENCE ;THEN FENCE CHAR - DB ' '+80H ;THEN SPACE -; - ENDIF ;WIDE -; -DIR5: -; MVI B,01H ;PT TO 1ST BYTE OF FILE NAME -; MOV A,B ;A=OFFSET - MVI A,1 ;PT TO 1ST BYTE OF FILE NAME - CALL DIRPTR ;HL NOW PTS TO 1ST BYTE OF FILE NAME - CALL PRFN ;PRINT FILE NAME -DIR6: - CALL BREAK ;CHECK FOR ABORT - JRZ DIR7 - CALL SEARN ;SEARCH FOR NEXT FILE - JRNZ DIR3 ;CONTINUE IF FILE FOUND -DIR7: - POP D ;RESTORE STACK - MVI A,0FFH ;SET NZ FLAG - ORA A - RET -; - ENDIF ;DIRON OR ERAON -; -; PRINT FILE NAME PTED TO BY HL -; -PRFN: - MVI B,8 ;8 CHARS - CALL PRFN1 - MVI A,'.' ;DOT - CALL CONOUT - MVI B,3 ;3 CHARS -PRFN1: - MOV A,M ; GET CHAR - INX H ; PT TO NEXT - CALL CONOUT ; PRINT CHAR - DCR B ; COUNT DOWN - JRNZ PRFN1 - RET -; -; PT TO DIRECTORY ENTRY IN TBUFF WHOSE OFFSET IS SPECIFIED BY A AND C -; -DIRPTR: - LXI H,TBUFF ;PT TO TEMP BUFFER - ADD C ;PT TO 1ST BYTE OF DIR ENTRY - CALL ADDAH ;PT TO DESIRED BYTE IN DIR ENTRY - MOV A,M ;GET DESIRED BYTE - RET -; -; AFTER A SEARCH, RETURN NZ SET IF DESIRED TYPE OF FILE FOUND, Z IF NOT -; THIS ALGORITHM LOOKS AT THE SYSTEM BIT OF THE LOCATED FILE; THIS -; BIT IS SET TO 1 IF THE FILE IS A SYSTEM FILE AND 0 IF NOT A SYSTEM -; FILE. THE FOLLOWING EXCLUSIVE OR MASKS ARE APPLIED TO RETURN Z OR NZ -; AS REQUIRED BY THE CALLING PROGRAM: -; -; SYSTEM BYTE: X 0 0 0 0 0 0 0 (AFTER 80H MASK, X=1 IF SYS, 0 IF DIR) -; -; SYS-ONLY : 0 0 0 0 0 0 0 0 (XOR 0 = 0 if X=0, = 80H if X=1) -; DIR-ONLY : 1 0 0 0 0 0 0 0 (XOR 80H = 80h if X=0, = 0 if X=1) -; BOTH : 0 0 0 0 0 0 0 1 (XOR 1 = 81H or 1H, NZ in both cases) -; -GETSBIT: - DCR A ;ADJUST TO RETURNED VALUE - RRC ;CONVERT NUMBER TO OFFSET INTO TBUFF - RRC - RRC - ANI 60H - MOV C,A ;OFFSET INTO TBUFF IN C (C=OFFSET TO ENTRY) - MVI A,10 ;ADD 10 TO PT TO SYSTEM FILE ATTRIBUTE BIT - CALL DIRPTR ;A=SYSTEM BYTE - ANI 80H ;LOOK AT ONLY SYSTEM BIT -SYSTST EQU $+1 ;IN-THE-CODE VARIABLE - XRI 0 ; IF SYSTST=0, SYS ONLY; IF SYSTST=80H, DIR - ; ONLY; IF SYSTST=1, BOTH SYS AND DIR - RET ;NZ IF OK, Z IF NOT OK -; -;Section 5B -;Command: ERA -;Function: Erase files -;Forms: -; ERA Erase Specified files and print their names -; ERA V Erase Specified files and print their names, but ask -; for verification before Erase is done -;Notes: -; Several Key Flags affect this command: -; ERAV - If TRUE, the V option is enabled, and the character -; which turns it on (the V) is defined by ERDFLG -; ERAOK - If TRUE, the OK? prompt is enabled -; If ERAOK is FALSE, the verification feature is disabled regardless -; of what value ERAV has -; If ERAOK is TRUE, then: -; If ERAV is TRUE, verification is requested only if the V -; flag (actual letter defined by ERDFLG) is in the -; command line -; If ERAV is FALSE, verification is always requested, and a -; V flag in the command line will cause an error -; message to be printed (V?) after the ERA is completed -; - IF ERAON ;ERA ENABLED? -; -ERA: -; - IF WERA ;WHEEL FACILITY ENABLED? - CALL WHLCHK ;CHECK FOR IT - ENDIF ;WERA -; - IF ERAV AND ERAOK ;V FLAG AND OK? ENABLED? - LDA TFCB2+1 ;GET ERAFLG IF IT'S THERE - STA ERAFLG ;SAVE IT AS A FLAG - ENDIF ;ERAV -; - LXI D,TFCB ;PT TO TARGET FCB - CALL FCBLOG ;LOG INTO DU IN FCB - MVI B,1 ;DISPLAY ALL MATCHING FILES - CALL DIRPR ;PRINT DIRECTORY OF ERASED FILES - RZ ;ABORT IF NO FILES -; - IF ERAOK ;PRINT PROMPT -; - IF ERAV ;TEST VERIFY FLAG -; -ERAFLG EQU $+1 ;ADDRESS OF FLAG - MVI A,0 ;2ND BYTE IS FLAG - CPI ERDFLG ;IS IT A VERIFY OPTION? - JRNZ ERA2 ;SKIP PROMPT IF IT IS NOT -; - ENDIF ;ERAV -; - CALL PRINTC - DB 'OK to Erase','?'+80H - CALL CONIN ;GET REPLY - CPI 'Y' ;YES? - RNZ ;ABORT IF NOT -; - ENDIF ;ERAOK -; -ERA2: - LXI D,TFCB ;DELETE FILE SPECIFIED - JMP DELETE ;DELETE FILE AND REENTER CCP -; - ENDIF ;ERAON -; -;Section 5C -;Command: LIST -;Function: Print out specified file on the LST: Device -;Forms: -; LIST Print file (NO Paging) -;Notes: -; The flags which apply to TYPE do not take effect with LIST -; - IF LTON ;LIST AND TYPE ENABLED? -; -LIST: - MVI A,0FFH ;TURN ON PRINTER FLAG - JR TYPE0 -; -;Section 5D -;Command: TYPE -;Function: Print out specified file on the CON: Device -;Forms: -; TYPE Print file -; TYPE 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: - XRA A ;TURN OFF PRINTER FLAG -; -; ENTRY POINT FOR CPR LIST FUNCTION (LIST) -; -TYPE0: - STA PRFLG ;SET FLAG -; - IF WLT ;WHEEL ON? - CALL WHLCHK ;CHECK WHEEL BYTE - ENDIF ;WLT -; - LDA TFCB2+1 ;GET PGDFLG IF IT'S THERE - STA PGFLG ;SAVE IT AS A FLAG - LXI D,TFCB ;PT TO TARGET FILE FCB - CALL AMBCHK ;CHECK FOR QUESTION MARKS IN TFCB - RZ ;ERROR IF ANY QUESTION MARKS - CALL FCBLOG ;LOG INTO DU IN FCB - LXI D,TFCB ;PT TO SELECT FILE - CALL OPEN ;OPEN SELECTED FILE - JZ PRNNF ;ABORT IF ERROR - CALL CRLF ;NEW LINE - MVI A,NLINES-1 ;SET LINE COUNT - STA PAGCNT - LXI B,080H ;SET CHAR POSITION AND TAB COUNT - ; (B=0=TAB, C=080H=CHAR POSITION) -; -; MAIN LOOP FOR LOADING NEXT BLOCK -; -TYPE2: - MOV A,C ;GET CHAR COUNT - CPI 80H - JRC TYPE3 - PUSH H ;READ NEXT BLOCK - PUSH B - CALL READF - POP B - POP H - RNZ ;ERROR? - MVI C,0 ;SET CHAR COUNT - LXI H,TBUFF ;PT TO FIRST CHAR -; -; MAIN LOOP FOR PRINTING CHARS IN TBUFF -; -TYPE3: - MOV A,M ;GET NEXT CHAR - ANI 7FH ;MASK OUT MSB - CPI 1AH ;END OF FILE (^Z)? - RZ ;RESTART CPR IF SO -; -; OUTPUT CHAR TO CON: OR LST: DEVICE WITH TABULATION -; - CPI CR ;RESET TAB COUNT? - JRZ TYPE4 - CPI LF ;RESET TAB COUNT? - JRZ TYPE4 - CPI TAB ;TAB? - JRZ TYPE5 -; -; OUTPUT CHAR AND INCREMENT CHAR COUNT -; - CALL LCOUT ;OUTPUT CHAR - INR B ;INCREMENT TAB COUNT - JR TYPE6 -; -; OUTPUT OR AND RESET TAB COUNT -; -TYPE4: - CALL LCOUT ;OUTPUT OR - MVI B,0 ;RESET TAB COUNTER - JR TYPE6 -; -; TABULATE -; -TYPE5: - MVI A,' ' ; - CALL LCOUT - INR B ;INCR POS COUNT - MOV A,B - ANI 7 - JRNZ TYPE5 -; -; CONTINUE PROCESSING -; -TYPE6: - INR C ;INCREMENT CHAR COUNT - INX H ;PT TO NEXT CHAR - CALL BREAK ;CHECK FOR ABORT - RZ ;RESTART IF SO - JR TYPE2 -; - ENDIF ;LTON -; -;Section 5E -;Command: SAVE -;Function: To save the contents of the TPA onto disk as a file -;Forms: -; SAVE -; Save specified number of pages (start at 100H) -; from TPA into specified file; is in DEC -; SAVE S -; Like SAVE above, but numeric argument specifies -; number of sectors rather than pages -;Notes: -; The MULTCMD flag (Multiple Commands Allowed) expands the code slightly, -; but is required to support multiple commands with SAVE -; The SECTFLG defines the letter which indicates a sector count -; (S in the Forms section above) -; - IF SAVEON ;SAVE ENABLED? -; -SAVE: -; - IF WSAVE ;WHEEL FACILITY? - CALL WHLCHK ;CHECK FOR WHEEL BYTE - ENDIF ;WSAVE -; - CALL NUMBER ;EXTRACT NUMBER FROM COMMAND LINE - MOV L,A ;HL=PAGE COUNT - MVI H,0 - PUSH H ;SAVE PAGE COUNT - LXI H,TFCB2 ;COPY 2ND FCB INTO POSITION OF FIRST - LXI D,TFCB - PUSH D ;SAVE PTR TO FCB - MVI B,14 ;14 BYTES - CALL LDIR - POP D ;GET PTR TO FCB - CALL AMBCHK ;CHECK FOR AMBIGUOUS - POP H - RZ ;ABORT IF SO - PUSH H - CALL EXTEST ;TEST FOR EXISTENCE OF FILE AND ABORT IF SO - MVI C,16H ;BDOS MAKE FILE - CALL GRBDOS - POP H ;GET PAGE COUNT - JRZ SAVE3 ;ERROR? - LXI D,TPA-128 ;PT TO START OF SAVE AREA (TPA) - DAD H ;DOUBLE 256-BYTE BLOCK COUNT FOR SECTOR COUNT - XCHG ;DE IS COUNT, HL IS NEXT BLOCK - 128 BYTES -SAVE1: - MOV A,D ;DONE WITH SAVE? - ORA E ;DE=0 IF SO - JRZ SAVE2 - DCX D ;COUNT DOWN ON SECTORS - PUSH D ;SAVE PTR TO BLOCK TO SAVE - LXI D,128 ;128 BYTES PER SECTOR - DAD D ;PT TO NEXT SECTOR - PUSH H ;SAVE ON STACK - XCHG ;DE IS ADDRESS - CALL DMASET ;SET DMA ADDRESS FOR WRITE (ADDRESS IN DE) - LXI D,TFCB ;WRITE SECTOR - MVI C,15H ;BDOS WRITE SECTOR - CALL BDOSB ;SAVE BC - POP H ;GET PTR TO NEXT SECTOR IN HL - POP D ;GET SECTOR COUNT IN DE - JRNZ SAVE3 ;WRITE ERROR? - JR SAVE1 ;CONTINUE -SAVE2: - LXI D,TFCB ;CLOSE SAVED FILE - CALL CLOSE - INR A ;ERROR? - JRNZ SAVE4 -SAVE3: - CALL PRNLE ;PRINT 'NO SPACE' ERROR -SAVE4: - JMP DEFDMA ;SET DMA TO 0080 AND RESTART CPR -; - ENDIF ;SAVEON -; - IF LTON OR SAVEON OR RENON ;FOR LIST/TYPE, SAVE, AND REN FCTS -; -; TEST FCB PTED TO BY DE TO SEE IF ANY ? CHARS IN IT -; RETURN WITH Z IF SO, NZ IF NOT; DON'T AFFECT DE -; -AMBCHK: - PUSH D - INX D ;PT TO FIRST CHAR - MVI B,11 ;11 CHARS -AMB1: - LDAX D ;GET CHAR - CPI '?' ;ERROR? - JRZ AMB2 - INX D ;PT TO NEXT - DJNZ AMB1 - DCR B ;SET NZ - POP D ;RESTORE PTR - RET -AMB2: - CALL PRINT - DB CR,LF,'AFN Erro','r'+80H - XRA A ;SET ZERO FLAG - POP D ;RESTORE PTR - RET -; - ENDIF ;LTON OR SAVEON -; -; Test File in FCB for existence, ask user to delete if so, and abort if he -; choses not to -; - IF SAVEON OR RENON ;FOR SAVE AND REN FUNCTIONS -; -EXTEST: - LXI D,TFCB ;PT TO FCB - PUSH D ;SAVE PTR - CALL FCBLOG ;LOG INTO DU - CALL SEARF ;LOOK FOR SPECIFIED FILE - POP D ;GET PTR TO FCB - RZ ;OK IF NOT FOUND - PUSH D ;SAVE PTR TO FCB - CALL PRINTC - DB 'Erase',' '+80H - LXI H,TFCB+1 ;PT TO FILE NAME FIELD - CALL PRFN ;PRINT IT - MVI A,'?' ;PRINT QUESTION - CALL CONOUT - CALL CONIN ;GET RESPONSE - POP D ;GET PTR TO FCB - CPI 'Y' ;KEY ON YES - JNZ ERR3 ;RESTART AS ERROR IF NO - PUSH D ;SAVE PTR TO FCB - CALL DELETE ;DELETE FILE - POP D ;GET PTR TO FCB - RET -; - ENDIF ;SAVEON OR RENON -; -;Section 5F -;Command: REN -;Function: To change the name of an existing file -;Forms: -; REN = Perform function -; - IF RENON ;REN ENABLED? -; -REN: -; - IF WREN ;WHEEL FACILITY? - CALL WHLCHK ;CHECK FOR WHEEL BYTE - ENDIF ;WREN -; - LXI D,TFCB ;CHECK FOR AMBIGUITY IN FIRST FILE NAME - CALL AMBCHK - RZ - LXI D,TFCB2 ;CHECK FOR AMBIGUITY IN SECOND FILE NAME - CALL AMBCHK - RZ - CALL EXTEST ;TEST FOR FILE EXISTENCE AND RETURN - ; IF FILE DOESN'T EXIST; ABORT IF IT DOES - MVI B,16 ;EXCHANGE NEW AND OLD FILE NAMES - LXI H,TFCB ;PT TO NEW - LXI D,TFCB2 ;PT TO OLD -REN0: - LDAX D ;GET OLD - MOV C,A - MOV A,M ;GET NEW - STAX D ;PUT NEW - MOV M,C ;PUT OLD - INX H ;ADVANCE - INX D - DJNZ REN0 -; -; PERFORM RENAME FUNCTION -; - LXI D,TFCB ;RENAME FILE - XRA A - STAX D ;SET CURRENT DISK - MVI C,17H ;BDOS RENAME FCT - CALL GRBDOS - RNZ - JMP PRNNF ;PRINT NO FILE MSG -; - ENDIF ;RENON -; -;Section 5G -;Command: JUMP -;Function: To Call the program (subroutine) at the specified address -; without loading from disk -;Forms: -; JUMP Call at ; is in HEX -; - IF JUMPON ;JUMP ENABLED? -; -JUMP: - -; - IF WJUMP ;WHEEL FACILITY? - CALL WHLCHK ;CHECK FOR WHEEL BYTE - ENDIF ;WJUMP -; - CALL HEXNUM ;GET LOAD ADDRESS IN HL - JR CALLPROG ;PERFORM CALL -; - ENDIF ;JUMPON -; -;Section 5H -;Command: GO -;Function: To Call the program in the TPA without loading -; loading from disk. Same as JUMP 100H, but much -; more convenient, especially when used with -; parameters for programs like STAT. Also can be -; allowed on remote-access systems with no problems. -; -;Form: -; GO -; - IF GOON ;GO ENABLED? -; -GO: - -; - IF WGO ;WHEEL FACILITY? - CALL WHLCHK ;CHECK FOR WHEEL BYTE - ENDIF ;WGO -; - LXI H,TPA ;Always to TPA - JR CALLPROG ;Perform call -; - ENDIF ;GOON -; -;Section 5I -;Command: COM file processing -;Function: To load the specified COM file from disk and execute it -;Forms: -;Notes: -; COM files are processed as follows -- -; 1. File name buffers are initialized and a preliminary -; error check is done -; 2. MLOAD is used to search for the file along the Path -; and load it into the TPA -; 3. CALLPROG is used to set up the buffers to be used by -; the transient (FCB at 5CH, FCB at 6CH, BUFF at 80H) -; and run the program -; The flag MULTCMD comes into play frequently here; it mainly serves -; to save space if MULTCMD is FALSE and enables Multiple -; Commands on the same line if MULTCMD is TRUE -; -COMDIR: - IF DRVPREFIX -; - LDA FCBFN ;ANY COMMAND? - CPI ' ' ;' ' MEANS COMMAND WAS 'DIR:' TO SWITCH - JRNZ COM ;NOT , SO MUST BE TRANSIENT OR ERROR -; -; ENTRY POINT TO SELECT USER/DISK VIA DIR: PREFIX -; - IF WDU ;WHEEL FACILITY? - CALL WHLCHK ;CHECK FOR WHEEL BYTE - ENDIF ;WDU -; - LDA FCBDN+13 ;GET SELECTED USER - CPI 16 ;OUT OF RANGE? - JNC ERROR - LXI D,FCBDN ;PT TO FCB - CALL FCBLOG ;LOG INTO DU - LDA TEMPUSR ;GET TEMPORARY USER - STA CURUSR ;SET CURRENT USER (MAKE PERMANENT) - LDA TEMPDR ;GET SELECTED DISK - ORA A ;IF 0 (DEFAULT), NO CHANGE - JRZ COMDR - DCR A ;ADJUST FOR LOGIN - STA CURDR ;SET CURRENT DRIVE -COMDR: - CALL SETUD ;SET UD BYTE - JMP RS1 ;RESUME COMMAND LINE PROCESSING -; - ENDIF ;DRVPREFIX -; -; PROCESS COMMAND -; -COM: -; - IF CMDRUN ;COMMAND RUN FACILITY AVAILABLE? - MVI A,0FFH ;USE IT IF AVAILABLE (MLOAD INPUT) - ENDIF ;CMDRUN -; - -; -; SET EXECUTION AND LOAD ADDRESS -; - LXI H,TPA ;TRANSIENT PROGRAM AREA - PUSH H ;SAVE TPA ADDRESS FOR EXECUTION - CALL MLOAD ;LOAD MEMORY WITH FILE SPECIFIED IN CMD LINE - POP H ;GET EXECUTION ADDRESS; FALL THRU TO CALLPROG -; -; CALLPROG IS THE ENTRY POINT FOR THE EXECUTION OF THE LOADED -; PROGRAM; ON ENTRY TO THIS ROUTINE, HL MUST CONTAIN THE EXECUTION -; ADDRESS OF THE PROGRAM (SUBROUTINE) TO EXECUTE -; -CALLPROG: - CALL CRLF ;LEADING NEW LINE -CALLP: - SHLD EXECADR ;PERFORM IN-LINE CODE MODIFICATION -; -; COPY COMMAND TAIL INTO TBUFF -; -TAILSV EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - LXI H,0 ;ADDRESS OF FIRST CHAR OF COMMAND TAIL - LXI D,TBUFF ;PT TO TBUFF - PUSH D ;SAVE PTR - MVI B,0 ;SET COUNTER - INX D ;PT TO FIRST CHAR -TAIL: - MOV A,M ;GET CHAR - CALL TSTEOL ;CHECK FOR EOL - JRZ TAIL1 - STAX D ;PUT CHAR - INX H ;PT TO NEXT - INX D - INR B ;INCREMENT COUNT - JR TAIL -TAIL1: - XRA A ;STORE ENDING ZERO - STAX D - POP H ;GET PTR - MOV M,B ;SAVE COUNT -; -; RUN LOADED TRANSIENT PROGRAM -; - CALL DEFDMA ;SET DMA TO 0080 -; -; EXECUTION (CALL) OF PROGRAM (SUBROUTINE) OCCURS HERE -; -EXECADR EQU $+1 ;CHANGE ADDRESS FOR IN-LINE CODE MODIFICATION - CALL TPA ;CALL TRANSIENT -; -; RETURN FROM EXECUTION -; - CALL DEFDMA ;SET DMA TO 0080, IN CASE PROG CHANGED IT - JMP RS1 ;RESTART CPR AND CONTINUE COMMAND PROCESSING -; -;Section 5J -;Command: GET -;Function: To load the specified file from disk to the specified address -;Forms: -; GET Load the specified file at the specified page; -; is in HEX -; - IF GETON ;GET ENABLED? -; -GET: -; - IF WGET ;WHEEL ON? - CALL WHLCHK ;CHECK WHEEL BYTE - ENDIF ;WGET -; - LXI H,TFCB2 ;COPY TFCB2 TO FCBDN FOR LOAD - LXI D,FCBDN - MVI B,14 ;14 BYTES (INCLUDES DU) - CALL LDIR - CALL HEXNUM ;GET LOAD ADDRESS IN HL -; -; FALL THRU TO MLOAD -; - IF CMDRUN ;COMMAND RUN FACILITY AVAILABLE? - XRA A ;NO CMDRUN IF FACILITY IS THERE (MLOAD INPUT) - ENDIF ;CMDRUN -; - ENDIF ;GETON - -; -; MEMORY LOAD SUBROUTINE -; -; LOAD MEMORY WITH THE FILE WHOSE NAME IS SPECIFIED IN THE COMMAND LINE -; ON INPUT, HL CONTAINS STARTING ADDRESS TO LOAD -; -; EXIT POINTS ARE A RETURN AND LOG IN CURRENT USER/DISK IF NO ERROR, -; A JMP TO ERROR IF COM FILE NOT FOUND OR A MESSAGE AND ABORT IF MEMORY FULL -; -MLOAD: -; - IF CMDRUN ;CMDRUN FACILITY? - STA CRFLAG ;SAVE FLAG - ENDIF ;CMDRUN -; - SHLD LOADADR ;SET LOAD ADDRESS - XCHG ;LOAD ADDRESS IN DE - CALL DMASET ;SET DMA ADDRESS -; -; MLA is a reentry point for a non-standard CP/M Modification -; The PATH command-search is implemented by this routine -; -MLA: -; -; Set attributes of COM files which match search -; - MVI A,COMATT ;CUSTOMIZER-SPECIFIED ATTRIBUTES - STA SYSTST ;SET FLAG - -; -; Analyze current path, generating a minimal, optimal absolute -; path equivalent in the buffer MPATH -; - IF MINPATH ;IF MINIMUM PATH SEARCH EMPLOYED - XRA A - STA MPATH ;SET EMPTY PATH -; - IF DRVPREFIX ;PAY ATTENTION TO DU:COM PREFIX? -; -; Convert DU in FCBDN into absolute expression in MPATH -; - LXI D,MPATH ;BUILD MPATH BUFFER - LXI H,FCBDN ;HL PTS TO FCB, DE PTS TO MPATH - MOV A,M ;GET DRIVE - ORA A ;SELECT CURRENT - JRNZ MLAMPD - LDA CURDR ;SET CURRENT DRIVE - INR A ;ADJUST FOR PATH -MLAMPD: - STAX D ;SET DRIVE - INX D ;PT TO USER - LXI B,13 ;PT TO USER - DAD B - MOV A,M ;GET USER - STAX D ;SAVE USER - INX D ;PT TO NEXT - XRA A ;A=0 - STAX D ;STORE ENDING 0 IN MPATH - ENDIF ;DRVPREFIX -; - IF SCANCUR ;SCAN CURRENT DU AT ALL TIMES? - LDA CURDR ;GET CURRENT DRIVE - INR A ;ADD 1 FOR A=1 - MOV B,A - LDA CURUSR ;GET CURRENT USER - MOV C,A ;BC=DU - LXI H,PATH ;PT TO FIRST PATH ELEMENT - JR MPATHBC ;PLACE ENTRY INTO MPATH - ENDIF ;SCANCUR -; -; Convert symbolic path at PATH into absolute path at MPATH -; - LXI H,PATH ;PT TO SYMBOLIC PATH -MPATH1: - MOV A,M ;CHECK FOR END OF SYMBOLIC PATH - ORA A ;0=END OF PATH - JRZ MPATH7 -; -; Place absolute form for current path element in BC -; - ANI 7FH ;MASK OUT SYSTEM BIT - CPI CURIND ;CHECK FOR CURRENT DRIVE - JRNZ MPATH2 - LDA CURDR ;GET CURRENT DRIVE - INR A ;ADJUST FOR A=1 -MPATH2: - MOV B,A ;DRIVE IN B (1=A) - INX H ;PT TO USER - MOV A,M ;GET USER - INX H ;PT TO NEXT ELEMENT - ANI 7FH ;MASK OUT SYSTEM BIT - CPI CURIND ;CHECK FOR CURRENT USER - JRNZ MPATH3 - LDA CURUSR ;GET CURRENT USER -MPATH3: - MOV C,A ;SET USER IN C -; -; Scan MPATH for DU element in BC -; -MPATHBC: - PUSH H ;SAVE PTR TO NEXT PATH ELEMENT - LXI H,MPATH ;PT TO MINIMUM PATH -MPATH4: - MOV A,M ;CHECK FOR END OF PATH - ORA A - JRZ MPATH6 - INX H ;PT TO USER - CMP B ;CHECK FOR DISK MATCH - JRNZ MPATH5 - MOV A,M ;GET USER - CMP C ;CHECK FOR USER MATCH - JRNZ MPATH5 - POP H ;MATCH, SO BC IS DUPLICATE - JR MPATH1 ;CONTINUE -MPATH5: - INX H ;PT TO NEXT ELEMENT - JR MPATH4 -; -; No match, so BC is a unique DU and store it in path -; -MPATH6: - MOV M,B ;STORE DRIVE - INX H - MOV M,C ;STORE USER - INX H - MVI M,0 ;STORE ENDING 0 - POP H ;PT TO NEXT ENTRY - JR MPATH1 ;CONTINUE -; -; MPATH now contains the minimal path -; -MPATH7: -; - ENDIF ;MINPATH -; -; Non-MINPATH Processing: -; If DRVPREFIX or SCANCUR are TRUE, look in DU in FCBDN -; - IF (NOT MINPATH) AND (DRVPREFIX OR SCANCUR) - LXI D,FCBDN ;LOOK FOR FILE - CALL FCBLOG ;LOG INTO FCB - CALL SEAR1 - JNZ MLA4 - ENDIF ;(NOT MINPATH) AND (DRVPREFIX OR SCANCUR) -; -; Select current disk at all times -; - XRA A - STA FCBDN ;SET CURRENT DISK -MLARUN: -; -; The following selects the path to be followed; if the Minimal Path is -; available, it is followed; else, the Symbolic Path is followed -; - IF MINPATH ;IF MINIMAL PATH USED - LXI H,MPATH ;PT TO MINIMAL PATH - - ELSE ;NOT MINPATH - LXI H,PATH ;PT TO SYMBOLIC PATH - - ENDIF ;MINPATH -; -; This is the main path search loop; HL pts to the next path element -; -MLA0: - MOV A,M ;GET DRIVE - ORA A ;0=DONE=COMMAND NOT FOUND -; - IF NOT CMDRUN ;ERROR ABORT IF NO COMMAND RUN FACILITY - JZ ERROR ;PATH EXHAUSTED -; - ELSE ;CONTINUE PROCESSING FOR COMMAND RUN -; -; CMDRUN Facility -; - JRNZ NOCRUN ;NOT READY FOR CMD RUN YET -CRFLAG EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;CHECK CRFLAG - ORA A ;0=NO - JZ ERROR ;PROCESS AS ERROR IF CMD RUN EXHAUSTED -; - IF ROOTONLY ;ONLY LOOK FOR EXT COMMAND PROCESSOR AT ROOT - PUSH H ;SAVE PTR TO PATH END - ENDIF ;ROOTONLY -; - XRA A ;DO NOT REENTER THIS CODE - STA CRFLAG ;SET ZERO FOR NO ENTRY - LXI H,CFCB ;SET CFCB AS COMMAND - LXI D,FCBDN ;... BY COPYING IT INTO FCBDN - MVI B,12 ;ONLY 12 BYTES REQUIRED - CALL LDIR - LHLD CURCMD ;GET PTR TO CURRENT COMMAND LINE - CALL PARSET ;PARSE AS COMMAND TAIL -; - IF ROOTONLY ;LOOK FOR EXT COMMAND PROCESSOR AT ROOT ONLY? - JR MLA3RT ;PROCESS FROM PATH END - ELSE ;FOLLOW PATH LOOKING FOR EXT COMMAND PROCESSOR -; - JR MLARUN ;NOW TRY THE RUN FROM THE PATH -; - ENDIF ;ROOTONLY -; -CFCB: - CMDFCB ;FCB DEFINING INITIAL COMMAND -NOCRUN: - ENDIF ;CMDRUN -; -; LOOK FOR COMMAND IN DIRECTORY PTED TO BY HL; DRIVE IN A -; - IF NOT MINPATH - CPI CURIND ;CURRENT DRIVE SPECIFIED? - JRNZ MLA1 ;SKIP DEFAULT DRIVE SELECTION IF SO - LDA CURDR ;GET CURRENT DRIVE - INR A ;SET A=1 - ENDIF ;NOT MINPATH -; -MLA1: - STA TEMPDR ;SELECT DIFFERENT DRIVE IF NOT CURRENT - INX H ;PT TO USER NUMBER - MOV A,M ;GET USER NUMBER - INX H ;PT TO NEXT ENTRY IN PATH - PUSH H ;SAVE PTR -; - IF NOT MINPATH - ANI 7FH ;MASK OUT SYSTEM BIT - CPI CURIND ;CURRENT USER SPECIFIED? - JRNZ MLA2 ;DO NOT SELECT CURRENT USER IF SO - LDA CURUSR ;GET CURRENT USER NUMBER -MLA2: - ENDIF ;NOT MINPATH -; - STA TEMPUSR ;SET TEMPORARY USER NUMBER - CMA ;FLIP BITS SO SYSTEM BIT IS 0 IF SYS-ONLY - ANI 80H ;MASK FOR ONLY NOT OF SYSTEM BIT TO SHOW - JRNZ MLA3 ;DON'T SET FLAG IF ORIGINALLY SYSTEM BIT=0 - STA SYSTST ;TEST FLAG IS 0 FOR SYS-ONLY, 1 FOR BOTH -MLA3: - CALL SLOGIN ;LOG IN PATH-SPECIFIED USER/DISK -MLA3RT: - LXI D,FCBDN ;PT TO FCB - CALL SEAR1 ;LOOK FOR FILE - POP H ;GET PTR TO NEXT PATH ENTRY - JRZ MLA0 ;CONTINUE PATH SEARCH IF SEARCH FAILED - ;LOAD IF SEARCH SUCCEEDED -; -; FILE FOUND -- PERFORM SYSTEM TEST AND PROCEED IF APPROVED -; -MLA4: - PUSH H ;SAVE PTR - CALL GETSBIT ;CHECK SYSTEM BIT - POP H ;GET PTR - JRZ MLA0 ;CONTINUE IF NO MATCH - CALL OPENF ;OPEN FILE FOR INPUT -LOADADR EQU $+1 ;MEMORY LOAD ADDRESS (IN-LINE CODE MOD) - LXI H,TPA ;SET START ADDRESS OF MEMORY LOAD -MLA5: - MVI A,ENTRY/256-1 ;GET HIGH-ORDER ADR OF JUST BELOW CPR - CMP H ;ARE WE GOING TO OVERWRITE THE CPR? - JRC PRNLE ;ERROR IF SO - PUSH H ;SAVE ADDRESS OF NEXT SECTOR - XCHG ;... IN DE - CALL DMASET ;SET DMA ADDRESS FOR LOAD - LXI D,FCBDN ;READ NEXT SECTOR - CALL READ - POP H ;GET ADDRESS OF NEXT SECTOR - JRNZ MLA6 ;READ ERROR OR EOF? - LXI D,128 ;MOVE 128 BYTES PER SECTOR - DAD D ;PT TO NEXT SECTOR IN HL - JR MLA5 -; -MLA6: - DCR A ;LOAD COMPLETE - JRNZ PRNLE ;MEMORY FULL IF NZ -; -; RETURN TO CURRENT DIRECTORY -; -DLOGIN: -CURDR EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;PREP TO LOG IN CURRENT DRIVE - CALL LOGIN ;LOGIN CURRENT DRIVE -CURUSR EQU $+1 ;POINTER FOR IN-THE-CODE MODIFICATION - MVI A,0 ;PREP TO LOG IN CURRENT USER NUMBER - JMP SETUSR ;LOG IN NEW USER - -; -; LOAD ERROR -; -PRNLE: - CALL PRINTC - DB 'Ful','l'+80H - JMP RESTRT ;RESTART ZCPR - -;***** - -; -; DEFAULT PATH USED FOR PATH COMMAND-SEARCH -; - IF EXPATH EQ 0 ;USE THIS PATH? -; -PATH: - IPATH ;PATH DEFINED IN Z3HDR.LIB -; - ENDIF ;INTPATH -; - -;***** - -; -; INTERNAL MINIMUM PATH -; - IF MINPATH -MPATH: - DS EXPATHS+3 ;SIZE OF PATH, MAX - ; (+2 FOR DU:COM PREFIX, +1 FOR ENDING 0) - ENDIF ;MINPATH - -;***** - IF EXTSTK NE 0 ;EXTERNAL STACK - -STACK EQU EXTSTK+48 ;SET TOP-OF-STACK ADDRESS - - ELSE -; -; STACK AREA -; - DS 48 ;STACK AREA -STACK EQU $ ;TOP OF STACK -; - ENDIF ;INTSTACK -; - IF PWCHECK -PWLIN EQU STACK-48 ;PLACE LINE AT BOTTOM OF STACK - ENDIF ;PWCHECK -; -; The following will cause an error message to appear if -; the size of ZCPR3 is over 2K bytes. -; - IF ($ GT CPRLOC+800H) -ZCPR3ER EQU NOVALUE ;ZCPR3 IS LARGER THAN 2K BYTES - ENDIF - - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ZCPR3.HLP b/Source/Images/d_bp/u15/ZCPR3.HLP deleted file mode 100644 index 67d3bf49..00000000 --- a/Source/Images/d_bp/u15/ZCPR3.HLP +++ /dev/null @@ -1,106 +0,0 @@ -Overview of ZCPR3 Help Files and Other ZCPR3 Details -ALIAS Alias Scripts -CMDFILES SUB and ZEX Command File Processors -COMPARE Comparison Utilities -DIRS Directory Display Utilities -DU3 Disk Maniupulation Utility -HELPSYS Online Documentation System -IF Flow Commands -IO Redirectable Input/Output System -MENU MENU Shell -NDIRS Named Directory Manipulation Utilities -SH Named-Variable Shell -SYSRCP System Resident Command Package -TINIT Terminal Initialization -VFILER Screen-Oriented File Manipulation Utility -Z3RES ZCPR3 CPR-Resident Commands -Z3TCAP ZCPR3 TCAP and Utilities -Z3UTIL1 General-Purpose Utilities -Z3UTIL2 System-Oriented Utilities -:Overview of the ZCPR3 Help Files - - Alì  oæ  thå ZCPR³ utilitieó arå documenteä  onlinå  bù -meanó  oæ thå ZCPR³ Helð System®  Thió ió thå  Masteò  Helð -Filå  whicè  allowó  yoõ tï directlù accesó  alì  thå  otheò -ZCPR3-Specifiã Helð Fileó supplieä witè thå ZCPR³ System. - - - - << Zoetrope and Echelon >> - - - A Note on File References - - Filå  Referenceó  undeò ZCPR³ arå largelù oæ  thå  samå -forí  aó  undeò CP/Í excepô thaô á ¯ (slash© maù noô bå  thå -firsô  characteò  oæ  á  filå  name®  Filå  Referenceó  arå -processeä slightlù differentlù undeò ZCPR3¬ anä thå FCBó arå -slightlù differenô betweeî ZCPR³ anä CP/Í wheî thå  special¬ -disalloweä characteró arå includeä iî á filå reference. - - The following are these disallowed characters: - - < > , ; : = ? * [ ] - - This¬   oæ   course¬   applieó   tï  unambiguouó   filå -references® Ambiguouó filå referenceó maù contaiî ¿ oò *. - - Line Editing and Output Control - - The following are the line editing functions -- - - rubout Delete and echo the last character typed at the - console. - Ctrl-È   Deletå  thå  lasô  characteò  typed»   Backspacå  onå - character; CRT-oriented - Ctrl-U Delete the entire line typed at the console. - Ctrl-Ø Deletå thå entirå linå typeä aô thå console»  Backspacå - tï thå beginninç oæ thå currenô line; CRT-oriented. - Ctrl-R Retype current command line: types a "clean line" - following character deletion with rubouts. - Ctrl-E Physical end of line: carriage is returned, but - line is not sent until the carriage return key is - depressed. - Ctrl-M Terminates input (carriage return). - Ctrl-J Terminates current input (line feed); CRT-oriented - Ctrl-C CP/M system reboot (warm start). - Ctrl-Z End input from the console (used in PIP and ED). - - Other control functions affect console output -- - - Ctrl-P Copy all subsequent console output to the currently- - assigned list device (LST:). Output is sent to both - the list device and the console device until the next - Ctrl-P is typed. - Ctrl-S Stop the console output temporarily. Program execution - and output continue when the next character is typed - at the console. Typing Ctrl-C returns control to CP/M. - - Inpuô  lineó caî bå quitå long¬  thå sizå specifieä  aô -ZCPR³ installatioî time®  Theù arå noô acteä upoî untiì thå -carriagå returî keù ió typed. - - Alì  oæ theså linå editinç functionó arå  supporteä  bù -thå CP/Í BDOÓ and¬ consequently¬ useä bù ZCPR³ itself® Manù -ZCPR³  utilities¬  althï noô all¬  uså thå BDOÓ linå  editoò -also. - -::ALIAS -::CMDFILES -::COMPARE -::DIRS -::DU3 -::HELPSYS -::IF -::IO -::MENU -::NDIRS -::SH -::SYSRCP -::TINIT -::VFILER -::Z3RES -::Z3TCAP -::Z3UTIL1 -::Z3UTIL2 - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ZCPR3.INS b/Source/Images/d_bp/u15/ZCPR3.INS deleted file mode 100644 index 238ac659..00000000 --- a/Source/Images/d_bp/u15/ZCPR3.INS +++ /dev/null @@ -1,163 +0,0 @@ -; -; Installation File for ZCPR3 Distribution, Phase 1 -; -; Filename.Typ Size Recs CRC Version -; 1 ALIAS .COM 4K 30 82D4 1.1 -; 2 CD .COM 1K 7 DA48 3.0 -; 3 CMDRUN .COM 1K 2 21B5 N/A -; 4 COMMENT .COM 1K 5 3C4A 2.0 -; 5 CPSEL .COM 1K 8 CCAA 1.0 -; 6 CRC .COM 6K 41 A89C 2.0 -; 7 DEV .COM 2K 14 F755 1.0 -; 8 DEVICE .COM 3K 17 153E 1.0 -; 9 DIFF .COM 4K 25 45A7 2.0 -; 10 DIR .COM 2K 16 9B8A 1.0 -; 11 ECHO .COM 1K 4 F2D6 1.0 -; 12 ERASE .COM 3K 20 E71E 5.0 -; 13 ERROR1 .COM 2K 12 5EB7 1.0 -; 14 ERROR2 .COM 3K 18 2F03 1.0 -; 15 ERROR3 .COM 1K 5 8542 1.0 -; 16 ERROR4 .COM 1K 5 86D1 1.0 -; 17 ERRORX .COM 1K 3 F941 1.0 -; 18 FINDF .COM 2K 14 D2A6 2.0 -; 19 GOTO .COM 1K 6 6ADA 1.0 -; 20 HELP .COM 3K 24 928B 5.0 -; 21 HELPCK .COM 2K 16 F3B3 1.0 -; 22 HELPPR .COM 5K 35 12E7 1.0 -; 23 IF .COM 3K 18 418D 1.1 -; 24 IFSTAT .COM 1K 3 6586 1.0 -; 25 LDR .COM 3K 20 A14E 1.0 -; 26 MCOPY .COM 4K 32 8341 4.0 -; 27 MENU .COM 4K 27 8CED 3.2 -; 28 MENUCK .COM 3K 20 3CDC 1.0 -; 29 MKDIR .COM 6K 41 014B 3.0 -; 30 NOTE .COM 1K 1 CB9E 1.0 -; 31 PAGE .COM 5K 36 DF9F 2.0 -; 32 PATH .COM 2K 10 E421 3.0 -; 33 PRINT .COM 6K 42 0492 2.0 -; 34 PROTECT .COM 4K 28 A130 3.0 -; 35 PWD .COM 1K 8 2B9B 1.0 -; 36 QUIET .COM 1K 4 DF6B 1.0 -; 37 RECORD .COM 1K 8 C2B4 3.0 -; 38 REG .COM 1K 8 1CC4 1.0 -; 39 RENAME .COM 4K 27 A2F2 3.0 -; 40 SAK .COM 1K 7 7842 2.0 -; 41 SETFILE .COM 1K 4 00B2 1.0 -; 42 SH .COM 4K 28 A89E 1.0 -; 43 SHCTRL .COM 1K 7 E37A 1.0 -; 44 SHDEFINE.COM 3K 23 0DEA 1.0 -; 45 SHFILE .COM 1K 4 634F 1.0 -; 46 SHOW .COM 8K 62 808A 1.0 -; 47 SHVAR .COM 3K 23 4D89 1.0 -; 48 SUB .COM 3K 20 59E5 3.0 -; 49 TCCHECK .COM 2K 14 7235 1.0 -; 50 TCMAKE .COM 6K 47 B3A0 1.0 -; 51 TCSELECT.COM 3K 22 7C29 1.0 -; 52 UNERASE .COM 2K 13 5057 1.0 -; 53 WHEEL .COM 2K 11 0CD0 3.0 -; 54 XD .COM 4K 28 465B 1.2 -; 55 XDIR .COM 8K 62 7248 2.0 -; 56 Z3INS .COM 2K 16 DFB7 1.0 -; 57 Z3LOC .COM 1K 7 A908 1.0 -; 58 ZEX .COM 6K 48 5E36 3.0 -; -; Installation Begins -- -; -; 1. General-Purpose Utilities -; -comment.com -crc.com -diff.com -dir.com -echo.com -erase.com -findf.com -mcopy.com -page.com -print.com -protect.com -rename.com -unerase.com -xd.com -xdir.com -; -; 2. System-Specific Utilities -; -cmdrun.com -cpsel.com -dev.com -device.com -ldr.com -path.com -quiet.com -record.com -reg.com -sak.com -setfile.com -shctrl.com -wheel.com -z3loc.com -; -; 3. Script-Oriented Utilities -; -alias.com -menu.com -menuck.com -; -; 4. Error Handlers -; -error1.com -error2.com -error3.com -error4.com -errorx.com -show.com -; -; 5. Command File Utilities -; -goto.com -sub.com -zex.com -; -; 6. Named Directory Utilities -; -cd.com -mkdir.com -pwd.com -; -; 7. HELP System -; -help.com -helpck.com -helppr.com -; -; 8. SH -; -sh.com -shdefine.com -shfile.com -shvar.com -; -; 9. TCAP -; -tccheck.com -tcmake.com -tcselect.com -; -; 10. IF -; -if.com -ifstat.com -; -; 11. NOTE is not installable due to its size, but that's OK -; since it does not use any ZCPR3-specific features -; -;note.com -; -; 12. Z3INS -; -z3ins.com -; -; End of Installation -; - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ZCPR3.IQS b/Source/Images/d_bp/u15/ZCPR3.IQS deleted file mode 100644 index 2a103010..00000000 Binary files a/Source/Images/d_bp/u15/ZCPR3.IQS and /dev/null differ diff --git a/Source/Images/d_bp/u15/ZCPR3DIR.BQG b/Source/Images/d_bp/u15/ZCPR3DIR.BQG deleted file mode 100644 index a4f5aa07..00000000 Binary files a/Source/Images/d_bp/u15/ZCPR3DIR.BQG and /dev/null differ diff --git a/Source/Images/d_bp/u15/ZCPR3DIR.BUG b/Source/Images/d_bp/u15/ZCPR3DIR.BUG deleted file mode 100644 index b5499f0a..00000000 --- a/Source/Images/d_bp/u15/ZCPR3DIR.BUG +++ /dev/null @@ -1,99 +0,0 @@ -December 18, 1984 - -Resident command 'DIR' fix in ZCPR3 and SYSRCP.ASM - -Greetings all -- I have stumbled (truly!) upon a distasteful, though not -essentially serious bug in both ZCPR3.ASM and the SYSRCP.ASM segment. -Fortunately (more for me than for you) a fix is easy and works 100%. In my -immodesty I used my name as a label for the fix. I hope that some soul, -hopefully Richard Conn in the next update to ZCPR3 will correct the bug in his -imminently elegant way and get rid of my fix in the process. - -I am probably one of the few folks who likes the resident DIR command, but I -surely wanted to limit the use of the DIR flags to those who know which -characters I use to invoke the DIR only, DIR and SYS files both, and the SYS -files only. In the RELEASE version of ZCPR3 and SYSRCP.ASM, the (SYS and DIR) -flag is tested for absolutely, but the (SYS only) flag is inappropriately -tested for, and if not found, then the (SYS and DIR) flag is assumed to have -been used, and the whole directory, SYS and DIR, is displayed. Try it; if you -type 'DIR *.* $' or any other character in place of the '$', the entire -directory, including SYS files will be displayed. I merely made the SYS only -flag testing an absolute, and when it failed, then automatically reverted to -the DIR only mode. Section 5A from the SYSRCP.ASM file follows (the ZCPR3 -section 5A is almost the same, and the area for modification is identical, as -is the fix....) - -Bucky Carr, SYSOP, World Peace RCP/M, Denver, 303-320-4822, 300/1200, 24 hrs - -By the way, my highest compliments to Richard Conn (and the rest of the public -domain programming community) for their immeasurable contributions to society -via computing. - - -;Section 5A -;Command: DIR -;Function: To display a directory of the files on disk -;Forms: -; DIR Displays the DIR files -; DIR S Displays the SYS files -; DIR A Display both DIR and SYS files -;Notes: -; The flag SYSFLG defines the letter used to display both DIR and -; SYS files (A in the above Forms section) -; The flag SOFLG defines the letter used to display only the SYS -; files (S in the above Forms section) -; The flag WIDE determines if the file names are spaced further -; apart (WIDE=TRUE) for 80-col screens -; The flag FENCE defines the character used to separate the file -; names -; - IF DIRON -DIR: -; -; CHECK FOR WHEEL APPROVAL IF OPTION ENABLED -; - IF WDIR - CALL WHLTST - ENDIF ;WHEEL APPROVAL -; - CALL RETSAVE ;SAVE RET ADDRESS AND SET STACK - LXI H,FCB1+1 ;MAKE FCB WILD (ALL '?') IF NO FILENAME.TYP - MOV A,M ;GET FIRST CHAR OF FILENAME.TYP - CPI ' ' ;IF , ALL WILD - CZ FILLQ - LDA FCB2+1 ;GET FIRST CHAR OF 2ND FILE NAME - MVI B,80H ;PREPARE FOR DIR-ONLY SELECTION - CPI ' ' ;ANY FLAG? - JRZ DIRPR ;THERE IS NO FLAG, SO DIR ONLY - MVI B,1 ;SET FOR BOTH DIR AND SYS FILES - CPI SYSFLG ;SYSTEM AND DIR FLAG SPECIFIER? - JRZ DIRPR ;GOT SYSTEM SPECIFIER - CPI SOFLG ;SYS ONLY? -; -; ---> the fix begins here <--- -; - JRZ BUCKY ;it was the SYS only flag, exactly! - MVI B,80H ;NOT the SYS flag either, so default to DIR only - JR DIRPR ;and do the directory as requested. -; -; ---> commented out the next two lines of original code <--- -; -; JRNZ DIRPR -; DCR B ;B=0 FOR SYS FILES ONLY -; -; ---> added the 'SYS flag ok' routine here <--- -; -BUCKY: MVI B,0 ;as described below, if SYS only=true then reg B=0 - JR DIRPR ;now go on with the dirpr routine. -; -; ---> that ends the fix <--- - - ENDIF ;DIRON -; -; DIRECTORY PRINT ROUTINE; ON ENTRY, B REG IS SET AS FOLLOWS: -; 0 FOR ONLY SYSTEM FILES, 80H FOR ONLY DIR FILES, 1 FOR BOTH -; - IF DIRON OR ERAON OR LTON OR PROTON OR CPON OR RENON -DIRPR: - MOV A,B ;GET SYSTST FLAG - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ZEX.AQM b/Source/Images/d_bp/u15/ZEX.AQM deleted file mode 100644 index 799e0201..00000000 Binary files a/Source/Images/d_bp/u15/ZEX.AQM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ZEX.ASM b/Source/Images/d_bp/u15/ZEX.ASM deleted file mode 100644 index 9ce02a2e..00000000 --- a/Source/Images/d_bp/u15/ZEX.ASM +++ /dev/null @@ -1,2286 +0,0 @@ -; -; PROGRAM: ZEX -; AUTHOR: RICHARD CONN (DERIVED FROM EX, WHICH WAS WRITTEN BY SOMEONE ELSE) -; VERSION: 3.1 -; DATE: 24 Oct 84 -; PREVIOUS VERSIONS: 3.0 (8 Mar 84) -; -VERS EQU 31 -Z3ENV EQU 0F400H - -; -; ZEX 3.1 -- Richard Conn -; Does not require to be reassembled for a target system; Z3INS -; installation is sufficient -; ZEX 3.0 -- Derived from ZEX 1.3 for ZCPR3 by Richard Conn -; Extensions to ZEX 1.3 are: -; ZCPR3 Message Passing Employed -; ZCPR3 Structure -; Omitted Parameters Allowed -; Print Suppression During FALSE IFs (^&) -; -; ZEX 1.0 -- EX 1.2.1 implemented for ZCPR2 by Richard Conn -; DATE: 12 NOV 82 -; Extensions to EX are: -; Multiple command buffer is preserved, and any commands -; following the ZEX command are executed after -; the ZEX command file is completed (ZEX T;DIR -; will execute commands in T.SUB and then run DIR) -; ZCPR3 Search Path is following when looking for the -; file specified to ZEX -; Command File Type may be SUB or ZEX -; Added ^* form to simply ring the bell -; Added ^/ form to act like ^? but ring bell periodically -; Added ^" form to allow user input in the middle of a -; command file operation -; Major rewrite of EX to improve readability and to impose -; a structured organization on the code for maintenance -; purposes -; Major change in the abort system so that the multiple command -; line buffer of ZCPR3 will be properly cleared on -; abort; without this change, ZEX would crash the system -; in attempting to abort out of the ^/ and ^? forms; -; EX will probably always crash a ZCPR3 system with -; multiple commands enabled if an abort from ^? is -; attempted -; -; EX12.ASM - An enhanced version of EXEC and EX. -; -; START 05-09-82 -; -; DATE 08-11-82 *LAST MAJOR CHANGE -; -; HISTORY: -; -; ZEX 1.0 11-12-82 modify for use under ZCPR2; main change is to place -; rest of multiple command line at end of SUB file -; -; 1.2.1 09-16-82 fix for MBASIC execution under EX 1.2 . -; -; 1.2 08-11-82 added '^:' EX runtime re-execute logic function, -; '^?' EX runtime wait for carriage return, -; logic to prevent input/EX buffer overlap, -; logic to insure (Xsub Already Present), -; logic to prevent EX runtime recursion loop, -; and prompt character logic [Larry Steeger] -; -; 1.1 08-06-82 added ';;' EX comment's support, -; '^.' print suppression function, -; '^<...^>' immediate display support, -; '^#' EX message suppression function, -; '^$' default parameter support, -; and '^|' cr,lf generation function [Larry Steeger] -; -; 1.0 08-03-82 corrected $^ error and ^ error [Larry Steeger] -; -; ? 06-19-82 added missing TRUE and FALSE equates [Ron Fowler] -; -; ? 05-17-82 corrected last cold boot no active message -; - -; -; EX12.COM IS AN ENHANCEMENT OF EXEC.COM AND EX.COM -; -; OPTIONS: -; -; EX cr -; -; EX cr -; -; ^ WILL GIVE CONTROL CHARACTER -; -; | WILL BE CR -; -; ^| WILL BE CR,LF -; -; ^: WILL CAUSE ZEX TO RE-EXECUTE THE .SUB FILE FROM THE BEGINNING -; -; ^? WILL CAUSE ZEX TO WAIT FOR A CARRIAGE RETURN -; (^C WILL ABORT ZEX AT THIS POINT ALSO) -; -; ^/ WILL CAUSE ZEX TO RING THE BELL AND WAIT FOR A CARRIAGE RETURN -; (^C WILL ABORT ZEX AT THIS POINT ALSO) -; -; ^* WILL CAUSE ZEX TO RING THE BELL -; -; ^" WILL CAUSE ZEX TO STOP PROVIDING INPUT UNTIL THE ZCPR3 MESSAGE -; CONTROLLING ZEX IS CHANGED TO PERMIT CONTINUATION -; -; ^$ WILL CAUSE THE REST OF THE LINE TO BE TREATED AS A -; SET OF DEFAULT PARAMETERS SEPARATED BY BLANKS TO BE -; USED IF THE USER HAS NOT PROVIDED ONE ON ZEX'S COMMAND LINE. -; -; ^# WILL TOGGLE PRINT SUPPRESSION OF ZEX MESSAGES -; -; ^. WILL START PRINT SUPPRESSION OF ALL CHARACTERS -; FROM .SUB FILE UNTIL A SUBSEQUENT ^. IS ENCOUNTERED -; -; ^& WILL INSTRUCT ZEX TO SUPPRESS PRINT IF WITHIN A FALSE IF -; -; ;; WILL INDICATE THAT THE ;; AND ALL CHARACTERS FOLLOWING IT -; UNTIL A LF IS ENCOUNTERED ARE NOT INCLUDED IN ZEX'S -; TEXT BUFFER -; (I.E. A ZEX ONLY COMMENT) -; -; ^< WILL START IMMEDIATE DISPLAY OF CHARACTERS FROM -; THE .SUB FILE UNTIL ^> IS ENCOUNTERED -; (I.E. DISPLAY ONLY .SUB INPUT) -; -; $<1-9> WILL REPLACE PARAMETER<1-9> IN TEXT FROM THE COMMAND LINE -; -; $$ WILL GIVE $ -; -; $^ WILL GIVE ^ -; -; $| WILL GIVE | -; -; |,cr,lf,1ah will eat last from | to end of buffer -; -; ^C FROM CONSOLE WILL ABORT ZEX -; - -FALSE EQU 0 -TRUE EQU NOT FALSE - -; -; OFFSETS TO ZCPR3 ENVIRONMENT DESCRIPTOR ELEMENTS -; -EPOFF EQU 9 ;EXTERNAL PATH DATA -MCOFF EQU 24 ;COMMAND LINE DATA -Z3MOFF EQU 34 ;MESSAGE BUFFER - -; -; GENERAL EQUATES -; -BELL EQU 7 -CTRLZ EQU 1AH ;^Z -DELAY EQU 6000H ;DELAY CONSTANT FOR TIMER LOOP -BS EQU 'H'-'@' ;BACKSPACE -CR EQU 0DH -LF EQU 0AH - -; -; ZEX MONITOR COMMAND BYTES -; -PSUP EQU 80H ;^. PRINT SUPPRESS FLAG -IMON EQU 81H ;^< IMMEDIATE MODE START -IMOFF EQU 82H ;^> IMMEDIATE MODE STOP -MSUP EQU 83H ;^# ZEX MESSAGE SUPPRESS FLAG -CRWAIT EQU 84H ;^? ZEX RUNTIME WAIT FOR CR FLAG -REXEC EQU 85H ;^: ZEX RUNTIME RE-EXECUTE FLAG -CRBWAIT EQU 86H ;^/ ZEX RUNTIME RING BELL AND WAIT FOR CR FLAG -RNG EQU 87H ;^* ZEX RUNTIME RING BELL -UICH EQU 88H ;^" USER INPUT COMMAND CHAR SEQUENCE -IPS EQU 89H ;^& FALSE IF PRINT SUPPRESS -; -; CP/M CONSTANTS -; -WARM EQU 0 -BDISK EQU 4 -BDOS EQU 5 -DFCB EQU 5CH -BUFF EQU 80H -; -; NOTE: ZEX30.LIB IS CREATED BY THE ZEX30.ZEX GENERATION PROCESS -; - MACLIB ZEX30 -; -$-PRINT - IF ZEXBASE -$+PRINT -; -; START OF ZEX INITIATOR CODE SEGMENT -; - ORG 100H -; -; Environment Definition -; - if z3env ne 0 -; -; External ZCPR3 Environment Descriptor -; - jmp start - db 'Z3ENV' ;This is a ZCPR3 Utility - db 1 ;External Environment Descriptor -z3eadr: - dw z3env -start: - lhld z3eadr ;pt to ZCPR3 environment -; - else -; -; Internal ZCPR3 Environment Descriptor -; - MACLIB SYSENV.LIB -z3eadr: - jmp start - SYSENV -start: - lxi h,z3eadr ;pt to ZCPR3 environment - endif - -; -; Start of Program -- Initialize ZCPR3 Environment -; - call z3init ;initialize the ZCPR3 Env - JMP START0 -; -; INITIAL COMMAND LINE AREA -; - DB 0FFH ;SIZE OF COMMAND LINE -DBUFF EQU $ - DB 0FFH ;SIZE OF BUFFER - DS 100H ;SPACE FOR COMMAND LINE -; -; START OF ZEX -; -START0: - NOP ;REPLACED WITH RET TO PREVENT REENTRY - LDA DFCB+1 ;CHECK FOR HELP REQUEST - CPI '/' ;HELP? - JZ HELP - LXI H,0 - DAD SP - SHLD CCPSTK ;CCP STACK PTR - LXI SP,CCPSTK ;USER STACK AREA - MVI A,0C9H ; (8080 RET) - STA START ;PREVENT RE-ENTRANCE BY ZCPR - LXI H,BUFF ;COPY INPUT LINE INTO DBUFF - LXI D,DBUFF - MVI B,128 ;SIZE OF BUFFER - CALL MOVE - LXI D,SIGNON ;LOGO - CALL PRINT - CALL ZEXACTV ;CHECK FOR RECURSION - CALL ZRELOC ;RELOCATE ZEX MODULE - CALL ZPARMS ;EXTRACT PARAMETERS FROM COMMAND LINE - LDA DFCB+1 ;CHECK TO SEE IF SUB FILE PRESENT - CPI ' ' ;=NO - PUSH PSW ;SAVE FLAG - CNZ OPENSB ;OPEN AND LOAD ZEX FILE IF PRESENT OR ABORT - POP PSW ;GET FLAG - CZ INPUTSB ;INPUT COMMANDS FROM USER -; -; HL NOW POINTS TO BYTE AFTER LOADED TEXT -; - CALL ZMCL ;STORE REST OF MULTIPLE COMMAND LINE - CALL ZLINES ;COPY AND PROCESS COMMAND LINES -; -; SET UP FOR ZEX EXECUTION AND RUN; HL PTS TO BOTTOM OF DATA AREA -; - PUSH H ;SAVE PTR TO END OF DATA - LHLD RELSTRT ;GET PTR TO START OF ZEX - SHLD GOADR ;SET ADDRESS TO RUN TO - DCX H ;PT TO START OF DATA AREA - MVI B,09H ;MESSAGE OFFSET - CALL MSHLD ;STORE HL THERE (NEXT CHAR FOR ZEX) - MVI B,0BH ;MESSAGE OFFSET - CALL MSHLD ;STORE HL THERE (FIRST CHAR FOR ZEX) - MVI A,0FFH ;SET ZEX RUNNING FLAG - MVI B,08H ;MESSAGE OFFSET - CALL MSTA ;STORE A THERE (ZEX IS RUNNING) - POP H ;HL IS PTR TO END OF DATA - MOV M,A ;SET UP END OF DATA - DCX H - LDA BDOS+2 ;SET UP BDOS JUMP TO PROTECT DATA - MOV M,A - DCX H - LDA BDOS+1 - MOV M,A - DCX H - MVI M,JMP - SHLD BDOS+1 ;SET NEW BDOS ADDRESS - LXI H,0 ;ASSUME NO MULTIPLE COMMANDS - LDA MCAVAIL ;GET FLAG - ORA A ;0=NONE - JZ GOTOZEX ;NO MULTIPLE COMMANDS, SO BC=0 - LHLD MCADR ;GET ADDRESS OF MULTIPLE COMMAND BUFFER -; -; ZEX MONITOR ENTRY PARAMETERS -- -; HL ADDRESS OF MULTIPLE COMMAND BUFFER OR 0 IF NONE -; -GOTOZEX: - XCHG ;SAVE HL - LHLD Z3MSGA ;GET ADDRESS OF MESSAGES ... - XCHG ; ... IN DE - -GOADR EQU $+1 - JMP $ - -; -; INIT ZCPR3 ENVIRONMENT -; -Z3INIT: - PUSH H ;SAVE PTR TO ENVIRONMENT - PUSH H - LXI D,Z3MOFF ;OFFSET TO MESSAGE BUFFER - DAD D - MOV A,M ;GET LOW - INX H - MOV H,M ;GET HIGH - MOV L,A ;HL IS ADDRESS OF MESSAGES - SHLD Z3MSGA ;SAVE ADDRESS - POP H - LXI D,MCOFF ;OFFSET TO CL DATA - DAD D - MOV E,M ;GET CL ADDRESS - INX H - MOV D,M - INX H ;GET CL SIZE - MOV A,M - ORA D ;IF ALL THREE VALUES ARE 0, THEN NO COMMAND LINE - ORA E - STA MCAVAIL ;SET AVAILABLE FLAG - XCHG ;HL PTS TO CL - SHLD MCADR - POP H ;GET PTR TO ENVIRONMENT - LXI D,EPOFF ;OFFSET TO EXTERNAL PATH DATA - DAD D - MOV E,M ;GET EXTERNAL PATH ADDRESS - INX H - MOV D,M - MOV A,D ;CHECK FOR ANY - ORA E - STA EPAVAIL ;SET AVAILABLE FLAG - XCHG - SHLD EPADR ;SET ADDRESS - RET -; -; Z3INIT BUFFERS -; -INTPATH: ;INTERNAL PATH - DB 1,0 ;DISK A, USER 0 - DB 0,0 ;END OF PATH -Z3MSGA: ;ADDRESS OF MESSAGES - DW 0 -MCAVAIL: ;MULTIPLE COMMAND LINE DATA - DB 0 -MCADR: - DW 0 -EPAVAIL: ;EXTERNAL PATH DATA - DB 0 -EPADR: - DW 0 - -; -; PRINT HELP MESSAGE FOR ZEX -; -HELP: - LXI D,SIGNON ;PRINT BANNER - CALL PRINT - LXI H,HMSG ;PRINT MESSAGE - CALL HPRINT - MVI C,1 ;GET CHAR - CALL BDOS - CPI 'C'-'@' ;^C? - RZ - LXI D,CRLFS - CALL PRINT - LXI D,SIGNON - CALL PRINT - LXI H,HMSG1 -HPRINT: - MOV A,M ;GET CHAR - ORA A ;DONE? - RZ - INX H ;PT TO NEXT - PUSH H ;SAVE PTR - MOV E,A ;CHAR IN E - MVI C,2 ;CONSOLE OUTPUT - CALL BDOS - POP H ;GET PTR - JMP HPRINT - -HMSG: - DB CR,LF,'ZEX Syntax:' - DB CR,LF,' ZEX ' - DB CR,LF,'or' - DB CR,LF,' ZEX' - DB CR,LF - DB CR,LF,'The first form executes the indicated command file' - DB CR,LF,'( may be of type ZEX or SUB, and if a ZEX and' - DB CR,LF,'SUB both exist, the ZEX file is used), passing to it' - DB CR,LF,'the parameters, similar to the way SUBMIT is used.' - DB CR,LF - DB CR,LF,'The second form allows the user to enter commands.' - DB CR,LF,'ZEX presents the user with a prompt like "n:", where' - DB CR,LF,'n is a line number, and the user may type in a command' - DB CR,LF,'line. Input is terminated by simply striking the' - DB CR,LF,'RETURN key (empty input line).' - DB CR,LF - DB CR,LF,'ZEX can be aborted by ^C from console.' - DB CR,LF - DB CR,LF,' Strike Any Key to Continue, ^C to Abort - ',0 - -HMSG1: - DB CR,LF - DB CR,LF,'ZEX supports an enhanced command processing facility' - DB CR,LF,'which recognizes the following commands. These may be' - DB CR,LF,'embedded in the text of the command file or user' - DB CR,LF,'input and will be executed after processing begins.' - DB CR,LF - DB CR,LF,' Cmd Meaning Cmd Meaning' - DB CR,LF,' | insert ^| insert ' - DB CR,LF,' ^: rerun command file ^. suppress print of chars' - DB CR,LF,' ^# toggle ZEX msgs ^$ define default params' - DB CR,LF,' ^? wait for user ^/ ring and wait for ' - DB CR,LF,' ^* ring bell ^" allow user input' - DB CR,LF,' ^< display chars only ^> stop display' - DB CR,LF,' ;; ZEX comment $n 1<=n<=9 for param' - DB CR,LF,' $$ =$ $^ =^' - DB CR,LF,' $| =| ^c insert ctrl char c' - DB CR,LF,CR,LF,0 - - -; -; RELOCATE ZEX MODULE INTO HIGH MEMORY JUST BELOW ZCPR3 -; -ZRELOC: - LHLD RELOCL ;GET RELOC PROGRAM LENGTH - MOV B,H ;BC=HL=RELOC PROGRAM LENGTH - MOV C,L - PUSH B ;SAVE LENGTH FOR FUTURE USE - LHLD BDOS+1 ;GET BASE - LXI D,-806H ;GET BEFORE CCP - DAD D - MOV A,L ;SUBTRACT RELOC LENGTH - SUB C - MOV E,A - MOV A,H - SBB B - MOV D,A - PUSH D ;SAVE NEW TOP/START TO MOVE TO - LXI H,BEGREL ;START OF MOVE -OMOVE: - MOV A,B - ORA C - JZ MOVEND - DCX B - MOV A,M - STAX D - INX D - INX H - JMP OMOVE -; -MOVEND: - POP D ;GET START OF MOVED PROGRAM - POP B ;LENGTH OF MOVE PROGRAM - PUSH D ;SAVE PTR TO START OF PROGRAM - PUSH H ;START OF BIT MAP - MOV H,D ;MSB OFFSET - MOV L,E ;LSB OFFSET -OFFLUP: - MOV A,B ;TEST LENGTH - ORA C ;IF 0 - JZ GOTO ;JUMP TO RELOCATED PROGRAM - DCX B ;DECREMENT COUNT - LDA COUNT - INR A - STA COUNT - ANI 07H - JNZ OFFBIT ;NO - XTHL ;YES, GET BIT MAP - MOV A,M ;GET NEXT BYTE - INX H ;INCREMENT BIT MAP POINTER - XTHL ;SAVE FOR LATER - STA BITMAP ;KEEP BIT OFFSET -OFFBIT: - LDA BITMAP - RAL ;TEST FOR OFFSET - STA BITMAP ;SAVE NEW BYTE - JNC NOFSET ;NO - DCX D ;GET BACK TO LSB - LDAX D - ADD L - STAX D - INX D ;MSB - LDAX D ;YES - ADC H ;ADD IN OFFSET - STAX D ;PUT IN MOVED PLACE -NOFSET: - INX D ;INCREMENT MOVED POINTER - JMP OFFLUP ;CONTINUE WITH RELOCATE -; -GOTO: - POP D ;RESTORE STACK - POP H ;PT TO FIRST BYTE OF PROGRAM - SHLD RELSTRT ;SAVE PTR - DCX H ;RELOCATE PROGRAM-1 - SHLD OUTBUF ;SAVE PTR TO BYTE IN FRONT OF RELOCATED PROGRAM - RET -; -; GET PARAMETERS FROM COMMAND LINE -; TERMINATE EACH PARAMETER WITH A BINARY ZERO, AND SET POINTERS -; TO EACH PARAMETER -; -ZPARMS: - LXI D,DBUFF ;TERMINATE COMMAND LINE WITH CR - LDAX D ;GET CHAR COUNT - INX D ;PT TO FIRST CHAR - PUSH D - MOV L,A ;HL = NUMBER OF CHARS IN LINE - MVI H,0 - DAD D ;PT TO AFTER LAST CHAR - MVI M,CR ;STORE - LXI H,PRMDMY ;START AT DUMMY PARAMETER FOR .SUB FILE SPEC - PUSH H - LXI B,PRMPNL+2 - XRA A - CALL FILL ;CLEAR PTR AREA - POP H ;GET PTR TO POINTER FOR PARAMETER 0 - POP D ;GET PTR TO FIRST CHAR IN LINE - MVI A,(PRMPNL/2)+1 ;NUMBER OF PARAMETERS POSSIBLE, MAX - STA PRMMAX ;HIGHEST PARAMETER # + 1 for .SUB SPEC -; -; PARAMETER EXTRACTION ROUTINE; HL PTS TO FIRST PARAM PTR, DE PTS TO LINE -; -PARMS: - MVI B,0 ;CLEAR PARAMETER COUNTER - XCHG - SHLD ERRLNE ;SAVE IN CASE OF ERROR - XCHG -; -PARMSL: - LDAX D ;IGNORE LEADING SPACES - INX D - CPI CR - JZ ENDLNE - CPI ' ' - JZ PARMSL - DCX D ;BACK UP TO 1ST CHAR - MOV M,E ;SAVE ADDRESS IN TABLE - INX H - MOV M,D - INX H - INR B ;COUNT+1 - LDA PRMMAX - CMP B - JC PRMTOO ;TOO MANY ARGUMENTS -; -ENDPRM: - LDAX D ;GO TO END OF PARAMETER - INX D - CPI CR - JZ ENDLNE - CPI ' ' ;SKIP UNTIL - JNZ ENDPRM - XRA A ;A=0 TO TERMINATE PARAM - DCX D ;PT TO FOLLOWING PARAM - STAX D ;TERMINATE PARAMETER - INX D ;PT TO CHAR AFTER - JMP PARMSL ;IGNORE SPACES BETWEEN PARAMETERS -ENDLNE: - XRA A ;STORE ZERO AFTER LAST PARAMETER - DCX D ;PT TO CR - STAX D ;TERMINATE LAST PARAMETER - INX D ;PT TO AFTER LAST PARAM - MVI A,CR ;STORE ENDING CR - STAX D - RET -; -; INPUT COMMAND LINES FROM USER -; -INPUTSB: - LXI H,0 - SHLD LINES ;START LINE COUNTER - MVI A,0FFH ;SET BUFFER LENGTH - STA DBUFF-1 - LXI H,BEGREL ;SET UP OUTPUT BUFFER - SHLD INBUF -GETLIN: - CALL CRLF - LHLD LINES - INX H - SHLD LINES - CALL DECOUT ;PRINT LINE # - MVI E,':' ;GET PROMPT - CALL OUTCHR - MVI E,' ' - CALL OUTCHR - LXI D,DBUFF-1 - MVI C,10 ;READ CONSOLE BUFFER - CALL BDOS - LXI D,DBUFF - LDAX D ;GET LENGTH - MOV B,A - INX D - LHLD INBUF ;GET INPUT POINTER - ORA A ;SEE IF END - RZ ;DONE WITH INPUT - XCHG - CALL MOVE ;MOVE TO INPUT BUFFER - XCHG - MVI M,CR - INX H - MVI M,LF - INX H - SHLD INBUF - JMP GETLIN -; -; OPEN AND LOAD SUB FILE -; -OPENSB: - CALL PUTUD ;SAVE USER/DISK -; -; SET UP TO READ ZEX FILE -; - LXI D,DFCB+9 - LXI H,ZEXNAM ;MOVE 'SUB' TO DFCB FILE TYPE - MVI B,3 - CALL MOVE - XRA A ;ZERO CR FIELD - STA DFCB+32 - LXI D,BUFF ;SET DMA ADDRESS - MVI C,26 ;SET DMA - CALL BDOS - LXI D,DFCB - LXI H,INTPATH ;PT TO INTERNAL PATH - LDA EPAVAIL ;EXTERNAL PATHS AVAILABLE? - ORA A ;0=NO - JZ OSB1 ;USE INTERNAL PATH - LHLD EPADR ;PT TO EXTERNAL PATH -OSB1: - PUSH H ;SAVE PATH PTR - CALL FNDFILE ;LOOK FOR FILE ALONG PATH AND SAY IF IT IS FOUND - POP H ;GET PATH PTR - JNZ READSB -; -; ZEX FILE NOT FOUND -- SET UP TO READ SUB FILE -; - PUSH H ;SAVE PATH PTR - CALL GETUD ;RESTORE USER/DISK - LXI D,DFCB+9 ;SET TYPE TO SUB - LXI H,SUBNAM - MVI B,3 - CALL MOVE - XRA A ;ZERO CR FIELD - STA DFCB+32 - POP H ;PT TO PATH - LXI D,DFCB ;PT TO FCB - CALL FNDFILE ;LOOK FOR FILE - JNZ READSB -RSBERR: - CALL GETUD ;RESTORE USER/DISK - LXI H,NOSBF2 - LXI D,DFCB+1 - MVI B,8 ;NAME LENGTH - CALL MOVEFN ;MOVE FILE NAME - MVI B,3 ;TYPE LENGTH - MVI M,'.' - INX H - LXI D,DFCB+9;FILE TYPE POINTER - CALL MOVEFN ;MOVE FILE TYPE - MVI M,'$' ;END TERMINATER - JMP NOSUB -* -* FNDFILE -- LOOK FOR FILE ALONG ZCPR3 PATH -* INPUT PARAMETERS: HL = BASE ADDRESS OF PATH, DE = PTR TO FCB OF FILE -* OUTPUT PARAMETERS: A=0 AND ZERO FLAG SET IF NOT FOUND, NZ IF FOUND -* -FNDFILE: - SHLD PATH ;SAVE PATH BASE ADDRESS - MVI C,17 ;SEARCH FOR FIRST - CALL BENTRY ;LOOK FOR FILE - INR A ;SET FLAG - JNZ FF5 ;FOUND IT -- RETURN FOUND FLAG - XCHG ;HL=FCB PTR - SHLD FCBPTR ;SAVE IT - LHLD PATH ;PT TO PATH FOR FAILURE POSSIBILITY - MVI C,32 ;GET CURRENT USER - MVI E,0FFH - CALL BENTRY - STA TMPUSR ;SAVE IT FOR LATER -; -; MAIN SEARCH LOOP -; -FF1: - MOV A,M ;GET DRIVE - ANI 7FH ;MASK MSB - ORA A ;0=DONE=COMMAND NOT FOUND - JNZ FF2 ;NO ERROR ABORT? -; -; FILE NOT FOUND ERROR -; - XRA A ;ZERO FLAG MEANS NOT FOUND - RET -; -; LOOK FOR COMMAND IN DIRECTORY PTED TO BY HL; DRIVE IN A -; -FF2: - MOV E,A ;DISK IN E - CPI '$' ;CURRENT DISK? - JNZ FF3 ;SKIP DEFAULT DRIVE SELECTION IF SO - LDA BDISK ;GET DEFAULT USER/DISK - ANI 0FH ;MASK FOR DEFAULT DISK - INR A ;PREP FOR FOLLOWING DCR A - MOV E,A ;DISK NUMBER IN E -FF3: - DCR E ;ADJUST PATH 1 TO 0 FOR A, ETC - MVI C,14 ;SELECT DISK FCT - CALL BENTRY ;SELECT DRIVE - INX H ;PT TO USER NUMBER - MOV A,M ;GET USER NUMBER - ANI 7FH ;MASK OUT MSB - INX H ;PT TO NEXT ENTRY IN PATH - PUSH H ;SAVE PTR - MOV E,A ;SAVE IN E - CPI '$' ;MATCH? - JNZ FF4 ;DO NOT SELECT CURRENT USER IF SO - LDA TMPUSR ;GET ORIGINAL USER NUMBER - MOV E,A ;SELECT USER -FF4: - MVI C,32 - CALL BENTRY - LHLD FCBPTR ;GET PTR TO FCB - XCHG ;... IN DE - MVI C,17 ;SEARCH FOR FIRST - CALL BENTRY ;LOOK FOR FILE - POP H ;GET PTR TO NEXT PATH ENTRY - INR A ;SET FLAG - JZ FF1 ;CONTINUE PATH SEARCH IF SEARCH FAILED -; -; FILE FOUND -- PERFORM SYSTEM TEST AND PROCEED IF APPROVED -; -FF5: - MVI A,0FFH ;SET OK RETURN - ORA A - RET - -; -; BDOS ROUTINE -; -BENTRY: - PUSH H ;SAVE REGS - PUSH D - PUSH B - CALL BDOS - POP B ;GET REGS - POP D - POP H - RET - -* BUFFERS -FCBPTR: - DS 2 ;POINTER TO FCB FOR FILE SEARCH -TMPUSR: - DS 1 ;CURRENT USER NUMBER -PATH: - DS 2 ;BASE ADDRESS OF PATH -; -; PUTUD -- SAVE AWAY CURRENT USER/DISK -; GETUD -- RESTORE CURRENT USER/DISK -; -PUTUD: - MVI E,0FFH ;GET CURRENT USER - MVI C,32 ;BDOS - CALL BDOS - STA CUSER ;SAVE CURRENT USER AWAY - MVI C,25 ;GET CURRENT DISK - CALL BDOS - STA CDISK - RET -GETUD: - LDA CDISK ;GET CURRENT DISK - MOV E,A ;... IN E - MVI C,14 ;SELECT DISK - CALL BDOS - LDA CUSER ;GET CURRENT USER - MOV E,A ;... IN E - MVI C,32 ;SELECT USER - CALL BDOS - RET -CDISK: - DS 1 ;CURRENT DISK NUMBER -CUSER: - DS 1 ;CURRENT USER NUMBER -; -; OPEN AND READ SUB FILE -; -READSB: - MVI C,15 ;OPEN FILE - CALL BDOS ;BDOS - INR A ;ERROR? - JZ RSBERR -; -; READ IN AND STORE SUB FILE -; -READTX: - LHLD INBUF ;GET PTR TO NEXT BYTE - XCHG ;SET PTR IN DE - LXI H,80H ;GET SECTOR OFFSET - DAD D ;HL PTS TO FOLLOWING BLOCK TO BE READ, DE PTS TO - SHLD INBUF ; BLOCK TO READ; SAVE PTR TO FOLLOWING BLOCK - MVI C,26 ;SET DMA ADDRESS - CALL BDOS - LXI D,DFCB - MVI C,20 ;READ SEQUENTIAL - CALL BDOS - ORA A - JZ READTX ;READ COMPLETE .SUB FILE - CALL GETUD ;RESTORE CURRENT USER/DISK - LHLD INBUF ;MAKE SURE BUFFER'S TERMINATED - LXI D,-100H ;PT TO FIRST BYTE OF LAST BLOCK READ - DAD D - MVI B,80H ;LOOK AT AT MOST 80H BYTES -SKIP1A: - MOV A,M ;GET BYTE - CPI CTRLZ ;EOF? - JZ SKIP1B - INX H ;PT TO NEXT - DCR B ;COUNT DOWN - JNZ SKIP1A -; HL NOW POINTS TO AFTER LAST VALID CHAR IN FILE -SKIP1B: - SHLD INBUF ;SET PTR - RET ;DONE WITH NO ERROR - -; -; THIS PART OF THE CODE STORES THE REST OF THE COMMAND LINE AS PART OF THE -; COMMAND FILE FOR ZCPR3; ON ENTRY, HL PTS TO NEXT AVAILABLE BYTE -; -ZMCL: - XCHG ;BUFFER PTED TO BY DE - LHLD MCADR ;GET BASE ADDRESS OF MULTIPLE COMMAND LINE - MOV A,M ;GET LOW - INX H - MOV H,M ;GET HIGH - MOV L,A ;HL PTS TO NEXT CHAR IN MULTIPLE COMMAND LINE - XCHG ;DE PTS TO NEXT CHAR IN COMMAND LINE, HL PTS TO BUF END - LDA MCAVAIL ;MULTIPLE COMMANDS ENABLED? - ORA A ;0=NO - JZ ENDSTR ;TERMINATE FILE; HL PTS TO NEXT BYTE - LDAX D ;GET FIRST BYTE - MOV B,A ;SAVE FIRST BYTE IN B - XRA A ;A=0 - STAX D ;CLEAR COMMAND LINE - INX D ;PT TO NEXT BYTE - MOV A,B ;GET FIRST BYTE - CPI ';' ;SEPARATION CHAR? - JNZ CMCMD1 ;PROCESS IF NOT -; -; LOOP TO STORE REST OF MULTIPLE COMMAND LINE INTO LOADED FILE -; -CMCMD: - LDAX D ;GET BYTE FROM LINE -CMCMD1: - ORA A ;EOL IF ZERO - JZ CMEND ;READ IN FILE; HL PTS TO NEXT AVAILABLE BYTE - MOV M,A ;STORE BYTE - INX H ;PT TO NEXT - INX D - JMP CMCMD -CMEND: - MVI M,CR ;STORE - INX H - MVI M,LF - INX H ;PT TO NEXT AVAILABLE BYTE -; -; MARK END OF BUFFER AND CONTINUE -; -ENDSTR: - MVI M,1AH ;EOF CHARACTER - SHLD ENDBUF ;EOB ADDRESS - MOV A,L - SUI LOW BEGREL+1 ;SEE IF BUFFER'S EMPTY - MOV A,H - SBI HIGH BEGREL - JC BUFLOW - RET -; -; COPY AND PROCESS COMMAND LINES, PLACING FINAL COMMAND LINE FORM UNDER ZEX -; RETURN WITH HL PTING TO NEXT AVAILABLE BYTE IN MEMORY BUFFER UNDER ZEX -; -ZLINES: - XRA A - STA IMFLG1 - STA IMFLG2 - STA PRTFLG - STA OUTCNT - LXI H,1 - SHLD LINES ;SET LINE COUNT - LHLD OUTBUF ;PT TO BYTE JUST BELOW LOADED ZEX - SHLD OUTLNE - SHLD BUFSTR - LXI D,BEGREL ;PT TO FIRST BYTE OF COMMAND BUFFER -; -; MAIN COPY LOOP TO COPY BUFFER AT BEGREL TO JUST UNDER ZEX WITH PROCESSING -; -MOVSTR: - LDAX D ;GET NEXT COMMAND BYTE - INX D ;PT TO FOLLOWING - ANI 7FH ;MAKE SURE NO PARITY - CPI LF ;NEW LINE? - JNZ MOVST0 -; -; NEW LINE -- DON'T STORE AND INCREMENT LINE COUNT -; -MOVSTX: - CALL INCR ;INCREMENT LINE COUNT - JMP MOVSTR ;CONTINUE -; -; BEGIN CHARACTER PROCESSING -; A CONTAINS CHAR, DE PTS TO BYTE AFTER CHAR, HL PTS TO NEXT BUFFER POS -; -MOVST0: - CPI 1AH ;END OF INPUT? - RZ ;DONE IF SO - CPI '|' ;CARRIAGE RETURN? - JNZ MOVST1 ;NOPE -; -; PROCESS CARRIAGE RETURN FORM (|) -; - PUSH D ;SAVE OLD POINTER - INX D ;LOOK FOR EOF AFTER | (PT TO LF) - INX D ;PT TO POSSIBLE EOF - LDAX D ;GET PRESENT LOCATION+2 - POP D ;GET OLD POINTER - CPI 1AH ;END OF BUFFER - RZ ;END, SO NO FOLLOWING - MVI A,CR ;MAKE CHAR A - CALL INCR ;INCREMENT LINES FOR ERRORS - JMP MOVST4 ;STORE IN A -; -; CHECK FOR NON-CR FORMS -; AT THIS POINT, DE PTS TO NEXT CHAR IN LINE AND HL PTS TO NEXT -; BYTE IN BUFFER (MOVING DOWN) -; -MOVST1: - MOV C,A ;SAVE CHAR IN C - LDA IMFLG1 - CPI IMON ;IMMEDIATE MODE ON ? - MOV A,C ;GET CHAR BACK - JZ MOVST2 ;YES..SKIP ZEX COMMENT PROCESSING - CPI ';' ;FIRST ';'? - JZ EXCOMM ;PROCESS POSSIBLE ZEX COMMENT -MOVST2: - CPI '^' ;CONTROL CHAR? - JZ MOVST5 ;CONVERT CONTROL CHARACTERS - CPI '$' ;PARAMETER OR CONTROL CHAR? - CZ GTPARM ;SUBSTITUTE COMMAND PARAMETER OR CONTROL CHAR. -MOVST3: - STA LCHR ;SAVE LAST CHAR ENTERED - CPI CR ;=CR? - JNZ MOVST4 - MOV C,A ;SAVE CHAR TEMPORARILY - LDA OUTCNT ;GET CHAR OUTPUT FLAG - ORA A ;ANY CHAR? - MOV A,C - JZ MOVSTR ;NO..USE INPUT CR ONLY IF OTHER NON-CONTROL -; CHARACTERS IN CURRENT LINE -; PLACE CHAR IN BUFFER -; CHAR IN A, HL PTS TO BUFFER LOC -; -MOVST4: - CALL CHRSTR ;ADD TO BUFFER - CALL CNTINC ;INCREMENT COUNT - JMP MOVSTR -; -; PREFIX WAS AN UPARROW (^), SO PROCESS CONTROL CHARS -; -MOVST5: - CALL GETCMD ;VALIDATE CONTROL CHARACTERS - CPI ':' - JZ REXC ;RE-EXECUTE - CPI '?' - JZ GCRW ;CR WAIT - CPI '/' - JZ GCRBW ;RING BELL AND WAIT FOR - CPI '"' - JZ UISET ;USER INPUT - CPI '*' - JZ GRNG ;CONTINUALLY RING BELL WHILE WAITING FOR - CPI '|' - JZ GCRLF ;CR,LF GENERATION - CPI '$' - JZ PRMDEF ;DEFAULT PARAMETERS' LINE - CPI '.' - JZ PRTSUP ;PRINT SUPPRESS TOGGLE - CPI '#' - JZ MSGSUP ;MESSAGE SUPPRESS TOGGLE - CPI '<' - JZ IMPRTY ;IMMEDIATE MODE START - CPI '>' - JZ IMPRTN ;IMMEDIATE MODE STOP - CPI '&' - JZ IFPSUP ;PRINT SUPPRESS DURING FALSE IF - JMP MOVST3 ;OTHER CONTROL CODES -; -IFPSUP: - MVI A,IPS ;CONVERT '^&' TO IF PRINT SUPPRESS FLAG - JMP MOVST3 -; -REXC: - MVI A,REXEC ;CONVERT '^:' TO RE-EXECUTE FLAG - JMP MOVST3 -; -GCRW: - MVI A,CRWAIT ;CONVERT '^?' TO CRWAIT FLAG - JMP MOVST3 -; -GCRBW: - MVI A,CRBWAIT ;CONVERT '^/' TO CRBWAIT FLAG - JMP MOVST3 -; -; ALLOW USER INPUT FROM NOW ON, BUT FIRST SKIP OUT REST OF LINE -; -UISET: - LDAX D ;GET NEXT CHAR - ANI 7FH ;MASK IT - CPI LF ;DONE? - JZ UISET1 - CPI 1AH ;EOF? - JZ UISET1 - INX D ;PT TO NEXT CHAR - JMP UISET ;CONTINUE SKIPPING -UISET1: - MVI A,UICH ;CONTROL CHAR - JMP MOVST3 -; -GRNG: - MVI A,RNG ;CONVERT '^*' TO RNG FLAG - JMP MOVST3 -; -GCRLF: - MVI A,CR ;GENERATE CR & LF - CALL CHRSTR - MVI A,LF - CALL CHRSTR - STA LCHR - JMP MOVSTR -; -PRMDEF: - PUSH H - LXI H,PRMDFP - PUSH H - LXI B,PRMDFL - XRA A - CALL FILL ;CLEAR PTR TABLE - POP H - MVI A,PRMDFL/2 - STA PRMMAX ;HIGHEST PARAMETER # - CALL PARMS ;BUILD DEFAULT PARAMETERS PTRS - POP H - INX D ;SKIP CR - MVI A,LF - JMP MOVSTX ;CONTINUE AT EOL -; -; CHECK TO SEE IF PREVIOUS CHAR WAS ALSO A ; AND FLUSH AS ZEX COMMENT IF SO -; -EXCOMM: - PUSH H - LXI H,LCHR ;PT TO PREVIOUS CHAR - CMP M ; DOUBLE ;? - MOV M,A ;STORE CURRENT CHAR AS PREVIOUS CHAR - POP H - JNZ MOVST3 ;NO...CONTINUE - MOV C,A ;SAVE CHAR - LDA PRTFLG - CPI PSUP - MOV A,C - JZ MOVST3 ;PRINT SUPPRESS - LDA IMFLG1 - CPI IMON - MOV A,C - JZ MOVST3 ;IMMEDIATE MODE - INX H ;YES..IGNORE PREVIOUS ; - PUSH H - LXI H,LCHR - LDA OUTCNT - DCR A ;DROP 1 CHAR. - STA OUTCNT -EXCOML: - LDAX D ;IGNORE CHARACTERS UNTIL EOF OR LF - INX D - CPI 1AH ;EOF - JZ EXCOMX - CPI LF ;LINE FEED - JNZ EXCOML - MOV M,A - LDA OUTCNT - ORA A ;ANY CHAR. ON THIS LINE? - JZ EXCOM2 ;NO...SKIP CR -EXCOM1: - POP H ;YES..FORCE CR - MVI A,CR - CALL CHRSTR - MVI A,LF - JMP MOVSTX ;CONTINUE -; -EXCOM2: - POP H - MVI A,LF - JMP MOVSTX ;CONTINUE -; -EXCOMX: - POP H - RET ;RETURN TO MAIN FLOW, WITH HL PTING TO NEXT BYTE -; -MSGSUP: - MVI A,MSUP ;CONVERT '^#' TO MESSAGE SUPPRESS FLAG - JMP MOVST3 -; -PRTSUP: - MVI A,PSUP ;CONVERT '^.' TO PRINT SUPPRESS FLAG - PUSH H - LXI H,PRTFLG - CMP M ;ALREADY ON? - JNZ PRTSST ;NO...SET FLAG - XRA A ;YES..CLEAR FLAG -PRTSST: - MOV M,A ;SET/RESET FLAG - POP H - MVI A,PSUP - JMP MOVST3 -; -IMPRTY: - MVI A,IMON ;CONVERT '^<' TO IMMEDIATE MODE START - STA LCHR - PUSH H - LXI H,IMFLG1 - CMP M ;ALREADY ON? - POP H - JZ MOVSTR ;YES.. - STA IMFLG1 - STA IMFLG2 - JMP MOVST3 ;NO... -; -IMPRTN: - MVI A,IMOFF ;CONVERT '^>' TO IMMEDIATE MODE STOP - STA LCHR - PUSH H - LXI H,IMFLG2 - CMP M ;ALREADY OFF? - POP H - JZ MOVSTR ;YES.. - STA IMFLG2 - STA IMFLG1 - JMP MOVST3 ;NO... -; -; PLACE CHAR IN BUFFER; A=CHAR, HL PTS TO BUFFER LOC -; -CHRSTR: - PUSH PSW ;CHECK FOR INPUT/ZEX BUFFER OVERLAP - PUSH D - PUSH H - LHLD ENDBUF - XCHG - POP H - MOV A,L - CMP E - JNZ CHRSTX ;LSB<> - MOV A,H - CMP D - JZ OVERL ;MSB=, OVERLAP WILL OCCUR/ABORT ZEX -; -; ADD CHAR TO ZEX'S BUFFER -; -CHRSTX: - POP D ;ADD CHAR. TO ZEX'S BUFFER - POP PSW - MOV M,A ;STORE CHAR - DCX H ;PT TO NEXT LOCATION (MOVING DOWN) - RET -; -; CHECK TO SEE IF ZEX IS ALREADY ACTIVE, AND ABORT IF SO -; -ZEXACTV: - MVI B,08H ;MESSAGE OFFSET - CALL MLDA ;GET VALUE IN A - ORA A ;0 IF NO - RZ - LXI D,ZEXACT - CALL PRINT ;ZEX ALREADY PRESENT -; -; ABORT AND RETURN TO ZCPR3 -; -CCPRET: - LHLD CCPSTK ;RESTORE STACK - SPHL - RET ;RETURN TO CCP - -; -; ZCPR3 MESSAGE BUFFER ACCESS ROUTINES -; - -; -; GETZ3MSG RETURNS HL POINTING TO DESIRED MESSAGE (OFFSET IN B) -; -GETZ3MSG: - PUSH D ;SAVE DE - LHLD Z3MSGA ;GET ADDRESS OF MESSAGES - MOV E,B ;GET OFFSET - MVI D,0 - DAD D ;HL PTS TO MESSAGE OF INTEREST - POP D - RET - -MSHLD: - PUSH D ;SAVE DE - XCHG - CALL GETZ3MSG ;MAKE HL PT TO MESSAGE - MOV M,E ;STORE LOW - INX H - MOV M,D ;STORE HIGH - XCHG ;RESTORE HL - POP D ;RESTORE DE - RET - -MSTA: - PUSH H ;SAVE HL - CALL GETZ3MSG ;PT TO MESSAGE WITH HL - MOV M,A ;STORE MESSAGE - POP H - RET - -MLDA: - PUSH H ;SAVE HL - CALL GETZ3MSG ;PT TO MESSAGE WITH HL - MOV A,M ;GET MESSAGE - POP H - RET - -; -; END OF Z3MSG ACCESS ROUTINES -; - -; -; ERROR EXITS -; -GETERR: - LXI D,CMDER ;CONTROL CHARACTER INVALID - CALL PRINT - JMP LINE ;PRINT LINE # AND LINE AND EXIT -; -NUMERR: - LXI D,NONUM ;EXCESSIVE NUMBER - CALL PRINT - JMP LINE ;PRINT LINE # AND LINE AND EXIT -; -PRMERR: - LXI D,PMERR - CALL PRINT - JMP LINE ;PRINT LINE # AND LINE AND EXIT -; -PRMTOO: - LXI D,TOOARG;TOO MANY PARAMETER ARGUMENTS - CALL PRINT - LHLD ERRLNE - CALL EPRT ;PRINT PARAMETER LINE - JMP CCPRET -; -BUFLOW: - LXI D,BUFMTY;TEXT BUFFER EMPTY - CALL PRINT - JMP CCPRET -; -NOSUB: - LXI D,NOSBF1;.SUB FILE NOT FOUND - CALL PRINT - LXI D,NOTHER - CALL PRINT - JMP CCPRET -; -OVERL: - LXI D,OVERLP;INPUT/ZEX BUFFER OVERLAP - CALL PRINT - JMP LINE -; -; SUBROUTINES -; -; CONTROL CODES 0-1FH -; WITH SUPPORT FOR $ . # < > -; -GETCMD: - LDAX D ;GET NEXT CHARACTER - INX D ;INCREMENT POINTER - CPI '|' - RZ ;CR,LF GENERATION - CPI 'a'-1 ;LOWERCASE? - JC GETUPR ;NOPE - CPI 'z'+1 ;a-z? - JNC GETERR ;NOPE - sui 'a'-'A' ;GET TO UPPERCASE -GETUPR: - CPI '@' ;0-1FH CONTROL CODE? - JNC GETCC - CPI ':' - RZ ;RE-EXECUTE - CPI '?' - RZ ;CR WAIT - CPI '/' - RZ ;CR WAIT AND RING BELL - CPI '*' - RZ ;RING BELL - CPI '"' - RZ ;USER INPUT - CPI '$' - RZ ;DEFAULT PARAMETERS' LINE - CPI '.' - RZ ;PRINT SUPPRESS TOGGLE - CPI '#' - RZ ;MESSAGE SUPPRESS TOGGLE - CPI '<' - RZ ;IMMEDIATE MODE START - CPI '>' - RZ ;IMMEDIATE MODE STOP - CPI '&' - RZ ;FALSE IF PRINT SUPPRESS - JMP GETERR -GETCC: - SUI '@' ;GET CONTROL CODE - RNC - JMP GETERR -; -; EXTRACT PARAMETER ELEMENT WHOSE $N SPECIFICATION IS POINTED TO BY DE -; DE PTS TO CHAR AFTER THE $ -; BUFFER TO PLACE RESULTING PARAMETER IS PTED TO BY HL -; -GTPARM: - LDAX D ;GET CHAR AFTER THE $ - INX D ;PT TO NEXT CHAR - CPI '$' ;IF DOUBLE $, THEN STORE AS $ - RZ - CPI '^' ;UP ARROW - RZ - CPI '|' ;CARRIAGE RETURN - RZ - CPI '1' ;CHECK FOR VALID DIGIT (1-9) - JC PRMERR - CPI '9'+1 ;RANGE ERROR? - JNC PRMERR - SUI '1' ;GET ACTUAL # (ZERO RELATIVE) - ADD A ;DOUBLE FOR OFFSET - STA PRMNUM - PUSH D ;SAVE PTRS - PUSH H - LXI H,PRMPNT ;PT TO PARAMETER PTR TABLE - CPI PRMPNL-1 ;PARAMETER NUMBER WITHIN RANGE? - JNC NOPARM ;> HIGHEST # - MOV E,A - MVI D,0 - DAD D - MOV E,M ;GET PARAMETER POINTER - INX H - MOV D,M - POP H ;RESTORE PTR TO NEXT BYTE IN OUTPUT BUFFER BELOW ZEX - MOV A,E ;ANY PARAM? - ORA D - JZ NOPARM ;NO PARAMETER PRESENT, TRY DEFAULTS -; -; MOVE PARAMETER PTED TO BY DE INTO BUFFER BELOW ZEX, 1ST BYTE PTED TO BY HL -; -MOVPRM: - LDAX D ;GET PARAMETER CHAR - INX D ;PT TO NEXT - ORA A ;DONE? - JZ ENDPAR - CALL CHRSTR ;STORE CHARS - JMP MOVPRM -; -; PARAMETER PLACED IN MEMORY -- CONTINUE -; -ENDPAR: - POP D ;GET PTR TO NEXT CHAR IN LINE - POP PSW ;CLEAR STACK - JMP MOVSTR ;RESUME PROCESSING -; -; NO PARAMETER PTED TO -; -NOPARM: - PUSH H ;SAVE PTR TO NEXT BYTE IN BUFFER BELOW ZEX - LXI H,PRMDFP ;TRY DEFAULT PARAMETERS - LDA PRMNUM - CPI PRMDFL-1 - JNC NUMERR ;> HIGHEST # - MOV E,A - MVI D,0 - DAD D - MOV E,M ;GET PARAMETER POINTER - INX H - MOV D,M - POP H - MOV A,E - ORA D - JNZ MOVPRM ;MOVE PARAMETER INTO BUFFER - JMP ENDPAR ;RESUME WITH NO PARAMETER -; -MOVEFN: - LDAX D - CPI ' ' ;SEE IF SPACE - RZ - MOV M,A - INX D ;INCREMENT POINTERS - INX H - DCR B - JNZ MOVEFN - RET -; -; INCREMENT LINE COUNT, AND AFFECT ONLY HL (MUST NOT AFFECT A) -; -INCR: - PUSH H ;SAVE OUTPUT POINTER - LHLD LINES - INX H ;INCREMENT LINE COUNTER - SHLD LINES - LXI H,LCHR ;CLEAR LAST CHARACTER - MVI M,0 - LXI H,OUTCNT;CLEAR CHARACTER COUNT - MVI M,0 - MOV L,E ;DE=HL - MOV H,D - SHLD BEGLIN - POP H - SHLD OUTLNE ;SAVE NEW OUTPUT LINE - RET -; -CNTINC: - CPI ' ' ;CONTROL CHARACTER? - RC ;YES.. - CPI UICH ;USER INPUT CHAR? - JZ CNTIN1 - ANI 80H ;SPECIAL CONTROL? - RNZ ;YES.. - LDA PRTFLG - CPI PSUP ;PRINT SUPPRESS FLAG? - RZ ;YES.. - LDA IMFLG1 - CPI IMON ;IMMEDIATE MODE? - RZ ;YES.. -CNTIN1: - LDA OUTCNT - INR A - STA OUTCNT - RET -; -PRINT: - MVI C,9 ;PRINT STRING AT (DE) - JMP BDOS -; -EPRT: - MOV A,M ;PRINT PARAMETER LINE AT (HL) - CPI CR - RZ - CPI 0 - JNZ EPRT1 - MVI A,' ' -EPRT1: - INX H - PUSH H - MOV E,A - MVI C,2 - CALL BDOS - POP H - JMP EPRT -; -CRLF: - LXI D,CRLFS ;PRINT CR/LF - JMP PRINT -; -LINE: - LXI D,LINEM ;PRINT LINE # AND LINE IN ERROR AND EXIT - CALL PRINT - LHLD LINES - CALL DECOUT ;PRINT LINE # - CALL CRLF - LHLD BEGLIN - PUSH H ;SAVE BEGGING POINTER -FINDCR: - MOV A,M - INX H - CPI 1AH ;END OF BUFFER - JZ FOUND - CPI CR - JNZ FINDCR -FOUND: - MVI M,0 ;END OF STRING - POP H ;START OF STRING - CALL PRNTHL ;PRINT BAD LINE - JMP CCPRET ;THATS ALL FOLKS -; -PRNTHL: - MOV A,M ;PRINT LINE AT (HL) - INX H - ORA A - RZ - MOV E,A - PUSH H ;SAVE POINTER - CALL OUTCHR - POP H ;GET POINTER BACK - JMP PRNTHL -; -OUTCHR: - MVI C,2 ;PRINT CHARACTER IN E - JMP BDOS -; -DECOUT: - PUSH H ;PRINT DECIMAL LINE NUMBER - PUSH D - PUSH B - LXI B,-10 ;RADIX FOR CONVERSION - LXI D,-1 ;THIS BECOMES NO DIVIDED BY RADIX -DX: - DAD B ;SUBTRACT 10 - INX D - JC DX - LXI B,10 - DAD B ;ADD RADIX BACK IN ONCE - XCHG - MOV A,H - ORA L ;TEST FOR ZERO - CNZ DECOUT ;RECURSIVE CALL - MOV A,E - ADI '0' ;CONVERT FROM BCD TO HEX - MOV E,A ;TO E FOR OUTPUT - MVI C,2 - CALL BDOS - POP B ;RESTORE REGISTERS - POP D - POP H - RET -; -MOVE: - MOV A,M ;MOVE STRING AT (HL) TO (DE) FOR LENGTH IN B - INX H - STAX D - INX D - DCR B - JNZ MOVE - RET -; -FILL: - PUSH D ; FILL STORAGE AT (HL) WITH CHARACTER IN A - MOV E,A ; FOR LENGTH IN BC - MOV A,B - ORA C - MOV A,E - POP D - RZ - DCX B - MOV M,A - INX H - JMP FILL -; -; WORKING STORAGE AREA -; -SUBNAM: - DB 'SUB' -ZEXNAM: - DB 'ZEX' -LINEM: - DB ' Error Line # $' -ZEXACT: - DB CR,LF,' ZEX Already Present$' -BUFMTY: - DB CR,LF,'Text Buffer Empty$' -OVERLP: - DB CR,LF,'Input/ZEX Buffer Overlap$' -NONUM: - DB CR,LF,'Parameter Number out of range$' -NOPRM: - DB CR,LF,'No Parameter or Default Parameter$' -PMERR: - DB CR,LF,'Parameter$' -NOSBF1: - DB CR,LF,'File ' -NOSBF2: - DB 'filename.typ$' -NOTHER: - DB ' not there$' -CMDER: - DB CR,LF,'Control character$' -TOOARG: - DB CR,LF,'Too many arguments - $' -SIGNON: - DB 'ZEX, Version ' - DB VERS/10+'0','.',(VERS MOD 10)+'0','$' -CRLFS: - DB CR,LF,'$' -; - DS 80 ;STACK SPACE -CCPSTK: - DW 0 ;CCP STACK PTR -IMFLG1: - DB 0 ;=IMON ENCOUNTERED -IMFLG2: - DB 0 ;=IMOFF ENCOUNTERED -PRTFLG: - DB 0 ;=PSUP ON -LCHR: - DB 0 ;LAST CHARACTER READ -PRMMAX: - DB 0 ;HIGHEST PARAMETER # -PRMNUM: - DB 0 ;CURRENT $<1-9> NUMBER * 2 (ZERO RELATIVE) -ERRLNE: - DW 0 -BITMAP: - DB 0 ;PRESENT OFFSET BIT'S -COUNT: - DB 0FFH ;PRESENT OFFSET BIT COUNT -BEGLIN: - DW BEGREL ;BEGINNING OF OLD LINE POINTER -LINES: - DW 1 -INBUF: - DW BEGREL -ENDBUF: - DW 0 ;END OF INPUT BUFFER -OUTCNT: - DB 0 -OUTLNE: - DW 0 -RELSTRT: - DW 0 -OUTBUF: - DW 0 -BUFSTR: - DW 0 -RELOCL: - DW 0 ;LENGTH OF RELOC PROGRAM (FILLED IN BY SID) -PRMDFP: ;DEFAULT PARAMETER PTRS - REPT 9 - DW 0 - ENDM -PRMDFL EQU $-PRMDFP -PRMDMY: - DW 0 ;DUMMY PARAMETER FOR .SUB FILE SPEC. -PRMPNT: ;COMMAND LINE PARAMETER PTRS - REPT 9 - DW 0 - ENDM -PRMPNL EQU $-PRMPNT -PATCH: ;PATCH AREA - REPT 32 - DB 'p' - ENDM - REPT 30 - DW 0 - ENDM -; -; INSURE 8 BYTE BOUNDARY FOR REL.UTL(RELS.UTL) -; -?PLOC SET $ - IF (?PLOC MOD 8) GT 0 -?PLOC SET (?PLOC AND 0FFF8H)+8 ;GET NEXT 8 BYTE BOUNDARY - ORG ?PLOC - ENDIF -; -BEGREL: - DS 0 ;RELOC PROGRAM STARTS HERE (ALSO USED AS BUFFER) -; - ENDIF -; -; END OF ZEX INITIATOR CODE SEGMENT -; -$-PRINT - IF NOT ZEXBASE -$+PRINT -; -; START OF ZEX RELOCATED CODE SEGMENT -; HL PTS TO MULTIPLE COMMAND BUFFER -; OR HL=0 IF NO MULTIPLE COMMANDS -; - ORG ZEXREL -; -ZEX: - SHLD EXMBASE ;SAVE ADDRESS OF MCL BUFFER - XCHG ;HL=ADDRESS OF ZCPR3 MESSAGES - SHLD Z3MSGA ;SAVE ADDRESS - MVI B,09H ;MESSAGE OFFSET - CALL MLHLD ;GET ADDRESS OF NEXT CHAR - MOV A,M ;GET 1ST CHAR - CPI MSUP ;1ST CHAR=MESSAGE SUPPRESS? - JNZ ZEX1 ;NO... - DCX H ;YES..SKIP CHARACTER - MVI B,09H ;MESSAGE OFFSET - CALL MSHLD ;SET PTR TO NEXT CHAR - STA MSUPFL ;SET INITIAL FLAG -ZEX1: - LXI SP,MEMTOP - LHLD BDOS+1 ;GET WARM JUMP FOR STANDARD CCP - SHLD MEMTOP ;SET PTR TO TOP OF MEMORY - INX H - MOV E,M ;DE = ADDRESS OF ACTUAL BDOS - INX H - MOV D,M - XCHG ;HL PTS TO ACTUAL BDOS - MOV A,H ;SUBTRACT 8 FOR CCP ENTRY POINT - SUI 8 - MOV H,A - MVI L,3 ;SET UP FOR WARM CCP JUMP - SHLD CCPJMP - LHLD WARM+1 ;SAVE WARM BOOT ADDRESS - SHLD WARMPT - LXI D,BSWARM ;SAVE OLD BIOS JUMPS - MVI B,12 - CALL MOVE ;MOVE BIOS JUMPS - LHLD WARMPT - XCHG - LXI H,LOCJMP ;STORE NEW BIOS JUMPS - MVI B,12 - CALL MOVE ;MOVE NEW BIOS JUMPS TO BIOS AREA -; -; ZEX RUNTIME BIOS INTERCEPT ROUTINES -; -NWARM: - LXI SP,MEMTOP - MVI B,09H ;MESSAGE OFFSET - CALL MLHLD ;GET ADDRESS OF NEXT CHAR - MOV A,M - CPI 0FFH ;TEST IT - JZ WARMX ;WARM RETURN - LHLD WARMPT ;SET WARM BOOT ADDRESS - SHLD WARM+1 - LHLD MEMTOP ;SET BDOS ENTRY ADDRESS - SHLD BDOS+1 - LXI D,BUFF ;DMA ADDRESS - MVI C,26 ;SET DMA - CALL BDOS - LDA BDISK - MOV C,A - LHLD CCPJMP - PCHL ;GOTO CONSOLE PROCESSOR -; -; JMP TABLE TO OVERLAY BIOS WITH NEW ZEX-BASED JUMPS -; -LOCJMP: - JMP NWARM ;WARM - JMP BCONST ;CONST - JMP NCONIN ;CONIN - JMP NCONOT ;CONOT -; -; ZCPR3 MESSAGE BUFFER ACCESS ROUTINES -; - -; -; GETZ3MSG RETURNS HL POINTING TO DESIRED MESSAGE (OFFSET IN B) -; -Z3MSGA: - DW 0 ;MESSAGES ADDRESS -GETZ3MSG: - PUSH D ;SAVE DE - LHLD Z3MSGA ;GET ADDRESS OF MESSAGES - MOV E,B ;GET OFFSET - MVI D,0 - DAD D ;HL PTS TO MESSAGE OF INTEREST - POP D - RET - -MSHLD: - PUSH D ;SAVE DE - XCHG - CALL GETZ3MSG ;MAKE HL PT TO MESSAGE - MOV M,E ;STORE LOW - INX H - MOV M,D ;STORE HIGH - XCHG ;RESTORE HL - POP D ;RESTORE DE - RET - -MLHLD: - PUSH PSW ;SAVE A - CALL GETZ3MSG ;MAKE HL PT TO MESSAGE - MOV A,M ;GET LOW - INX H - MOV H,M ;GET HIGH - MOV L,A ;PUT LOW - POP PSW ;RESTORE A - RET - -MSTA: - PUSH H ;SAVE HL - CALL GETZ3MSG ;PT TO MESSAGE WITH HL - MOV M,A ;STORE MESSAGE - POP H - RET - -MLDA: - PUSH H ;SAVE HL - CALL GETZ3MSG ;PT TO MESSAGE WITH HL - MOV A,M ;GET MESSAGE - POP H - RET - -; -; END OF Z3MSG ACCESS ROUTINES -; - -; -; CONSOLE INPUT INTERCEPT ROUTINE -; -NCONIN: - MVI B,07H ;MESSAGE OFFSET - CALL GETZ3MSG ;PT TO ZEX MESSAGE BYTE - MOV A,M ;GET ZEX MESSAGE - CPI 2 ;SUSPEND INTERCEPT? - JZ BCONIN ;GET INPUT VIA BIOS IF USER INPUT ACTIVE - CPI 1 ;PROMPT JUST PRINTED? - JNZ NCONNP - MVI M,0 ;CLEAR ZEX MESSAGE - LXI H,STARTM ;PRINT MESSAGE - CALL PMSG -; LDA PMCHR ;PRINT PROMPT CHAR -; MOV C,A -; CALL BCONOT -NCONNP: - MVI B,08H ;MESSAGE OFFSET - CALL MLDA ;GET ZEX RUNNING MESSAGE - ORA A ;0=NO - JZ WARMX ;ABORT ZEX IF NOT - LXI H,0 - DAD SP ;SAVE RETURN STACK LEVEL - SHLD CONSTK - LXI SP,MEMTOP ;SET USER STACK -NCONNL: - CALL BCONST ;GET CONSOLE STATUS - ORA A - JZ GETBUF ;GET CHARACTER FROM BUFFER - CALL BCONIN ;GET CHARACTER - CPI 'C'-'@' ;SEE IF TERMINATE CHARACTER - JZ ZEXABRT - CPI 'S'-'@' ;13H - JNZ NCONEX - CALL BCONIN ;WAIT FOR NEXT CHARACTER - ANI 7FH - MVI B,09H ;MESSAGE OFFSET - CALL MLHLD ;PT TO NEXT CHAR - INX H - MOV M,A - MVI B,09H ;MESSAGE OFFSET - CALL MSHLD ;RESET PTR TO NEXT CHAR - MVI A,'S'-'@' ;13H -NCONEX: - LHLD CONSTK ;RESTORE CALLER'S STACK - SPHL - RET -; -; RETURN NEXT CHAR FROM INPUT BUFFER -; -GETBUF: - LDA IPSUPFL ;COMBINE PSUPFL AND IPSUPFL TO SET PRINT FLAG - ORA A ;0=NO SUPPRESS - JZ GBUF0 - MVI B,01H ;OFFSET TO IF FLAG - CALL GETZ3MSG ;PT TO IF FLAG - MOV A,M ;GET IF FLAG - ORA A ;NO IF? - JZ GBUF0 - INX H - ANA M ;SET IF STATE - JNZ GBUF0 ;CURRENT IF IS TRUE - MVI A,0FFH ;SUPPRESS PRINT - STA OUTFLG - JMP GBUF1 -GBUF0: - LDA PSUPFL ;SET PRINT SUPPRESS FLAG FOR NCONOT - STA OUTFLG -GBUF1: - CALL GETCHR ;GET NEXT CHARACTER - CPI UICH ;USER INPUT? - JZ UISTRT ;YES..SET USER INPUT PENDING FLAG - CPI REXEC ;RE-EXECUTE? - JZ REXECR ;YES..RESET BUFFER PTR - CPI CRWAIT ;CR WAIT? - JZ CRWRTN ;YES..WAIT FOR CR - CPI CRBWAIT ;CR WAIT WITH RING BELL? - JZ CRBWRTN ;YES..WAIT FOR CR AND RING BELL - CPI RNG ;RING BELL? - JZ RNGBELL ;YES..JUST RING THE BELL - CPI MSUP ;MESSAGE SUPPRESS FLAG? - JZ MSUPCK ;YES..TOGGLE FLAG - CPI PSUP ;PRINT SUPPRESS ? - JZ PSUPCK ;YES..TOGGLE FLAG - CPI IPS ;FALSE IF PRINT SUPPRESS? - JZ IPSUPCK - CPI IMON ;IMMEDIATE MODE START ? - JZ IMFLGS ;YES..SET FLAG - CPI IMOFF ;IMMEDIATE MODE STOP? - JZ IMFLGS ;YES..RESET FLAG - CPI CR ;CR? - JNZ GETEXT ;NO...EXIT -; -; CR, SO RESET PRINT SUPPRESSION BASED ONLY ON IPSUPFL -; - LDA IPSUPFL ;COMBINE PSUPFL AND IPSUPFL TO SET PRINT FLAG - ORA A ;0=NO SUPPRESS - JZ GBUF2 - MVI B,01H ;MESSAGE OFFSET TO IF FLAG - CALL GETZ3MSG ;PT TO IF FLAG - MOV A,M ;GET IF FLAG - ORA A ;NO IF? - JZ GBUF2 - INX H - ANA M ;SET IF STATE - JNZ GBUF2 ;CURRENT IF IS TRUE - MVI A,0FFH ;SUPPRESS PRINT - STA OUTFLG - MVI A,CR - JMP GETEXT -GBUF2: - XRA A - STA OUTFLG ;YES..RESET PRINT SUPPRESSION - MVI A,CR -GETEXT: - MOV C,A - LDA IMFLG - CPI IMON ;IMMEDIATE MODE ? - MOV A,C - JNZ NCONEX ;NO...RETURN TO CALLER WITH CHAR - CALL BCONOT ;YES..IMMEDIATE ECHO TO CONSOLE - JMP NCONNL ;...LOOP UNTIL IMOFF -; -; ^" COMMAND -; -UISTRT: - MVI A,2 ;SET MESSAGE TO SUSPEND INTERCEPT - MVI B,07H ;MESSAGE OFFSET - CALL MSTA ;SET MESSAGE - LHLD CONSTK ;RESTORE CALLER'S STACK - SPHL - JMP NCONIN ;GET CHAR FROM USER FOR NOW -; -; ^: COMMAND -; -REXECR: - MVI B,0BH ;MESSAGE OFFSET - CALL MLHLD ;PT TO FIRST CHAR IN BUFFER - MVI B,09H ;MESSAGE OFFSET - CALL MSHLD ;SET PTR TO NEXT CHAR - XRA A - STA IMFLG ;RESET ALL FLAGS - STA PSUPFL - STA IPSUPFL - STA MSUPFL - JMP NCONNL ;...LOOP UNTIL ^C -; -; ^? COMMAND -; -CRWRTN: - CALL BCONIN ;GET INPUT CHAR - CPI 'C'-'@' - JZ ZEXABRT ;=^C - CPI CR - JZ CRWRTX ;= - CPI ' ' - JZ CRWRTX ;= - MVI C,BELL - CALL BCONOT ;<>CR - JMP CRWRTN -; -; ^/ COMMAND -; -CRBWRTN: - LXI H,DELAY ;SET COUNTER -CRBWR1: - PUSH H ;SAVE COUNTER - CALL BCONST ;CHECK STATUS - POP H ;GET COUNTER - ORA A ;SET FLAGS - JNZ CRBWR2 - DCX H ;COUNT DOWN - MOV A,H ;DONE? - ORA L - JNZ CRBWR1 - MVI C,BELL ;RING BELL - CALL BCONOT - JMP CRBWRTN -CRBWR2: - CALL BCONIN ;GET CHAR - CPI 'C'-'@' ;ABORT? - JZ ZEXABRT - CPI CR ;CONT IF - JNZ CRBWRTN -; -; ^| COMMAND -; -CRWRTX: - MOV C,A ;ECHO CR/LF - CALL NCONOT - MVI C,LF - CALL NCONOT - JMP GETBUF -; -; ^* COMMAND -; -RNGBELL: - MVI C,BELL ;RING BELL - CALL NCONOT - JMP GETBUF -; -; ^. COMMAND -; -PSUPCK: - LXI H,PSUPFL - CMP M - JNZ PSUPST ;SET FLAGS IF NOT EQUAL - XRA A ;ELSE RESET FLAGS -PSUPST: - MOV M,A ;SET/RESET SAVED FLAG - JMP GETBUF ;AND GET NEXT CHARACTER (SETS EXEC FLAG) -; -; ^& COMMAND -; -IPSUPCK: - LXI H,IPSUPFL - CMP M - JNZ PSUPST ;SET FLAGS IF NOT EQUAL - XRA A ;ELSE RESET FLAGS - JMP PSUPST ;SET/RESET FLAG IN A -; -; ^# COMMAND -; -MSUPCK: - LXI H,MSUPFL - CMP M - JNZ MSUPST ;SET FLAGS IF NOT EQUAL - XRA A ;ELSE RESET FLAG -MSUPST: - MOV M,A ;SET/RESET FLAG - JMP GETBUF ;AND GET NEXT CHARACTER -; -; ^< AND ^> COMMANDS -; -IMFLGS: - STA IMFLG ;SET/RESET IMMEDIATE MODE FLAG - JMP GETBUF ;GET NEXT CHARACTER -; -; CONSOLE OUTPUT INTERCEPT ROUTINE -; -NCONOT: - LDA OUTFLG ;PRINT SUPPRESSION? - ORA A - RNZ ;YES...IGNORE ECHO - MOV A,C - STA PMCHR ;SET LAST CHAR OUTPUT - JMP BCONOT -; -; GET NEXT CHAR FROM BUFFER AND TERMINATE ZEX IF END OF BUFFER -; -GETCHR: - MVI B,09H ;MESSAGE OFFSET - CALL MLHLD ;PT TO NEXT CHAR - MOV A,M ;GET IT - DCX H ;PT TO FOLLOWING - MVI B,09H ;MESSAGE OFFSET - CALL MSHLD ;SET PTR TO NEXT CHAR - CPI 0FFH ;EOB? - RNZ ;NO...RETURN -; LHLD Z3MSG+09H ;PT TO EOB - INX H ;POINT TO EOB - MVI B,09H ;MESSAGE OFFSET - CALL MSHLD ;SET PTR TO NEXT CHAR (LAST CHAR) - CALL MOVBAK ;MOVE JUMPS BACK - CALL BDOSRST ;RESTORE BDOS ADDRESS - CALL PRDONEM - XRA A ;TURN OFF ZEX - MVI B,08H ;MESSAGE OFFSET - CALL MSTA ;TURN OFF ZEX - LHLD CONSTK ;GET OLD STACK - SPHL - MVI A,CR ;RETURN CARRIAGE RETURN - RET - -; -; PRINT DONE MESSAGE WITH FOLLOWING PROMPT CHAR -; -PRDONEM: - LXI H,DONEM ;PRINT MESSAGE - CALL PMSG - LDA PMCHR ;PRINT PROMPT CHAR - MOV C,A ;IN C FOR BIOS - JMP BCONOT - -; -; RESTORE BDOS JMP IF NECESSARY -; -BDOSRST: - LHLD MEMTOP ;SEE IF BDOS+1=MEMTOP - XCHG - LHLD BDOS+1 - MOV A,E - SUB L - MOV A,D - SBB H - RNZ ;DON'T REPLACE BDOS JUMP - INX D ;PT TO BDOS JUMP - LDAX D ;GET LOW ADDRESS - MOV L,A ;... IN L - INX D - LDAX D ;GET HIGH ADDRESS - MOV H,A ;... IN H - SHLD BDOS+1 ;RESET BDOS JUMP - RET -; -; ^C ABORT EXIT -; -ZEXABRT: - LXI SP,MEMTOP ;^C ABORTS ZEX - LXI H,ABORTD ;ABORT - CALL PMSG - JMP WARMX1 ;DON'T PRINT DONE MESSAGE -; -; ABORT ZEX AND RETURN TO ZCPR3 -; -WARMX: - CALL PRDONEM ;PRINT DONE MESSAGE -; -; ENTRY POINT TO ABORT ZEX WITHOUT MESSAGE -; -WARMX1: - XRA A ;SAY THAT ZEX IS NOT RUNNING - MVI B,08H ;MESSAGE OFFSET - CALL MSTA ;SET NOT RUNNING - CALL MOVBAK ;MOVE JUMPS BACK - CALL BDOSRST ;RESTORE BDOS JUMPS - LHLD EXMBASE ;MULTIPLE COMMAND LINES ENABLED? - MOV A,H ;ANY ON? - ORA L - JZ WARM ;NONE ON IF ADDRESS IS ZERO, SO JUST WARM BOOT -; -; THIS SECTION OF CODE CLEARS THE MULTIPLE COMMAND LINE BUFFER -; - MOV D,H ;DE PTS TO MULTIPLE COMMAND BUFFER ALSO - MOV E,L - PUSH H ;SAVE PTR - LXI H,4 ;PT TO FIRST CHAR OF LINE - DAD D - MVI M,0 ;SET FIRST CHAR OF LINE TO ZERO FOR EOL - XCHG ;DE PTS TO FIRST CHAR OF LINE - POP H ;GET PTR - MOV M,E ;STORE ADDRESS OF EMPTY COMMAND (EOL) - INX H - MOV M,D - JMP WARM -; -; SUBROUTINES -; -MOVBAK: - LHLD WARMPT ;MOVE OLD JUMP TABLE BACK TO BIOS - XCHG - LXI H,BSWARM - MVI B,12 - CALL MOVE - JMP F121 ;CALL 1.2.1 FIX FOR MBASIC 1.1.2 -; -MOVE: - MOV A,M ;MOVE STRING FROM (HL) TO (DE) FOR LENGTH IN B - INX H - STAX D - INX D - DCR B - JNZ MOVE - RET -; -PMSG: - PUSH H - LDA IPSUPFL ;COMBINE PSUPFL AND IPSUPFL TO SET PRINT FLAG - ORA A ;0=NO SUPPRESS - JZ PMSG0 - MVI B,01H ;MESSAGE OFFSET TO IF FLAG - CALL GETZ3MSG ;PT TO IF FLAG - MOV A,M ;GET IF FLAG - ORA A ;NO IF? - JZ PMSG0 - INX H - ANA M ;SET IF STATE - POP H ;IN CASE OF RETURN - RZ ;SKIP MESSAGE IF SUPPRESSED - PUSH H -PMSG0: - POP H - LDA MSUPFL ;PRINT MESSAGE AT (HL) - CPI MSUP ;MESSAGES SUPPRESSED? - RZ ;YES..EXIT -PMSGL: - MOV A,M ;GET NEXT CHAR - ORA A ;END OF MESSAGE? - RZ ;YES..EXIT - INX H ;PT TO NEXT CHAR - PUSH H ;SAVE PTR - MOV C,A ;OUTPUT CHAR - CALL BCONOT - POP H ;RESTORE PTR - JMP PMSGL -; -; REPLACE ZEX ROUTINE JUMPS WITH BIOS JUMPS -; -F121: - LXI H,BSWARM ; INSURE ONLY BIOS 1.1.2 - LXI D,NWARM ; CALLS FROM NOW ON 1.1.2 - MVI B,3 ; FOR PROGRAMS 1.1.2 - CALL MOVE ; THAT MAY HAVE 1.1.2 - LXI H,BCONIN ; COPIED OUR 1.1.2 - LXI D,NCONIN ; ADDRESSES AS 1.1.2 - MVI B,3 ; IF THEY WERE 1.1.2 - CALL MOVE ; IN THE BIOS. 1.1.2 - LXI H,BCONOT ; (MBASIC DOES THIS) 1.1.2 - LXI D,NCONOT ; 1.1.2 - MVI B,3 ; 1.1.2 - JMP MOVE ; 1.1.2 -; -; WORKING STORAGE AREA -; -ABORTD: - DB CR,LF,'[ZEX Aborted]',CR,LF,0 -STARTM: - DB ' ZEX: ',0 -DONEM: - DB 'Done',0 - -; - REPT 12 ;12 ELT STACK - DW 0 - ENDM -MEMTOP: - DW 0 -EXMBASE: - DW 0 -CCPJMP: - DW 0 -WARMPT: - DW 0 -; -; ORIGINAL BIOS JMP TABLE -; -BSWARM: - JMP $ -BCONST: - JMP $ -BCONIN: - JMP $ -BCONOT: - JMP $ -; -PMCHR: - DB 0 -PSUPFL: - DB 0 -IPSUPFL: - DB 0 -OUTFLG: - DB 0 -NUICH: - DB 0 -IMFLG: - DB 0 -MSUPFL: - DB 0 -CONSTK: - DW 0 -; -?PLEN SET $ - IF (?PLEN MOD 8) GT 0 -?PLEN SET (?PLEN AND 0FFF8H)+8;GET NEXT BOUNDARY - ENDIF -; -DRVERL EQU ?PLEN -; -DRVL8 EQU DRVERL/8 ;LENGTH OF RELOCATION BIT MAP - ORG DRVERL -; - ENDIF -; -; END OF ZEX RELOCATED CODE SEGMENT -; - END - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ZEX.COM b/Source/Images/d_bp/u15/ZEX.COM deleted file mode 100644 index c1df478e..00000000 Binary files a/Source/Images/d_bp/u15/ZEX.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ZEX.ZEX b/Source/Images/d_bp/u15/ZEX.ZEX deleted file mode 100644 index 83370e7e..00000000 --- a/Source/Images/d_bp/u15/ZEX.ZEX +++ /dev/null @@ -1,181 +0,0 @@ -; -; Command File to Assemble ZEX by Richard Conn -; -; The following files are assumed: -; ED.COM, MAC.COM, ZSID.COM -; The following resident commands are assumed: -; ERA, REN, IF, FI -; - -; -; 1. Test for Needed Files -; -if exist zex.asm -if exist a:rels.utl - -; -; 2. Erase Any Files from Previous Executions -; -ERA ZEX*.BAK -ERA ZEX*.HEX -ERA ZEX*.SYM - -; -; 3. Create ZEX30.LIB for Assembly of -; ORG 0 Relocated Code Segment -; -ED ZEX30.LIB -#A -#K -I -ZEXBASE EQU FALSE ;SUPPRESS ZEX INITIATOR CODE -ZEXREL EQU 0 ;SET RELOCATED CODE SEGMENT TO ORG 0 -^Z -E - -; -; 4. Assemble only ORG 0 Relocated Code Segment -; -MAC ZEX $$PZ - -; -; 5. Rename Files from Step 4 -; -REN ZEX300.HEX=ZEX.HEX -REN ZEX300.SYM=ZEX.SYM - -; -; 6. New ZEX30.LIB for Assembly of -; ORG 100H Relocated Code Segment -; -ED ZEX30.LIB -#A -#K -I -ZEXBASE EQU FALSE ;SUPPRESS ZEX INITIATOR CODE -ZEXREL EQU 0100H ;SET RELOCATED CODE SEGMENT TO ORG 100H -^Z -E - -; -; 7. Assemble only ORG 100H Relocated Code Segment -; -MAC ZEX $$PZ SZ - -; -; 8. Rename File from Step 7 -; -REN ZEX301.HEX=ZEX.HEX - -; -; 9. New ZEX30.LIB for Assembly of -; ZEX Initiator Code Only -; -ED ZEX30.LIB -#A -#K -I -ZEXBASE EQU TRUE ;ENABLE ZEX INITIATOR CODE -ZEXREL EQU 0 ;RESET RELOCATED CODE SEGMENT TO ORG 0 -^Z -E - -; -; 10. Assemble ZEX Initiator Code Only -; -MAC ZEX $$PZ - -; -; 11. Use ZSID and RELS.UTL to Create ZEX.COM -; -; [note: If only REL.UTL is available, comment out the lines -; starting with IZEX.COM below and change the line -; SID RELS.UTL to SID REL.UTL and a SAVE 10 ZEX.COM -; must be added at the end of this file.] -; -; ZEX.HEX contains ZEX Initiator Code -; ZEX.SYM contains symbols for SID for ZEX Initiator Code -; -; ZEX300.HEX contains ZEX ORG 0 Relocated Code Segment -; ZEX300.SYM contains symbols for SID for ZEX ORG 0 Rel Code -; -; ZEX301.HEX contains ZEX ORG 100H Rel Code Segment -; -; BEGREL is the symbol for the start of the Rel Code -; Segment in ZEX.COM -; -; DRVERL is the symbol for the length of the Rel Code -; Segment -; -; DRVL8 is the symbol for the length of the storage -; needed for the relo table bit map to be created -; by RELS.UTL -; -; RELOCL is the symbol for the DW in ZEX.COM that will -; contain the length of the Relocated Code Segment -; -; -; 11A. SID is invoked and the .SYM files for the ORG 0 Rel Code -; Segment and the Initiator Code Segment are loaded. -; -; 11B. The DW at symbol RELOCL is updated with the value of -; DRVERL from the ORG 0 Rel Code Segment. -; -; 11C. Memory for the two copies of the Relocated Code Segment -; (ORG 0 and ORG 100H) and the rel table bit map is zeroed. -; -; 11D. The ORG 0 Relocated Code Segment is loaded starting at -; location BEGREL. -; -; 11E. The ORG 100H Relocated Code Segment is loaded after the -; segment loaded in step C plus the length of the rel -; table bit map. -; -; 11F. RELS.UTL routine SETADRS sets the starting addresses of -; the two Relocated Code Segments for creation of the rel -; table bit map. -; -; 11G. RELS.UTL routine SETLEN sets the length of the Relocated -; Code Segment and builds the relocation table bit map. -; -; 11H* RELS.UTL routine SAVE saves the EX Initiator Code Segment, -; the ORG 0 Relocated Code Segment, and the rel table -; bit map created by RELS.UTL. -; -; * [note: not used if only REL.UTL is available] -; -; 11I. CP/M is returned to by G0. -; -; 11J** SAVE 10 ZEX.COM saves the ZEX Initiator Code Segment, -; the ORG 0 Relocated Code Segment, and the rel table -; bit map created by REL.UTL. -; -; ** [note: used ONLY if REL.UTL is used] -; -ZSID A:RELS.UTL -IZEX.HEX ZEX300.SYM -R -I* ZEX.SYM -R -SW.RELOCL -.DRVERL -. -F.BEGREL .BEGREL+.DRVERL+.DRVL8+.DRVERL 0 -IZEX300.HEX -R.BEGREL -IZEX301.HEX -R.BEGREL+.DRVERL+.DRVL8-100 -C.SETADRS .BEGREL .BEGREL+.DRVERL+.DRVL8 -C.SETLEN .DRVERL .BEGREL+.DRVERL -IZEX.COM -C.SAVE 100 .BEGREL+.DRVERL+.DRVL8 -G0 -; -; 12. Clean Up Files on Disk and Terminate IFs -; -ERA ZEX*.BAK -ERA ZEX*.HEX -ERA ZEX*.SYM -ERA ZEX30.LIB -fi;fi - \ No newline at end of file diff --git a/Source/Images/d_bp/u15/ZEX2.COM b/Source/Images/d_bp/u15/ZEX2.COM deleted file mode 100644 index 456ae7ed..00000000 Binary files a/Source/Images/d_bp/u15/ZEX2.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ZEX31A.COM b/Source/Images/d_bp/u15/ZEX31A.COM deleted file mode 100644 index 83452996..00000000 Binary files a/Source/Images/d_bp/u15/ZEX31A.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ZGOLF.COM b/Source/Images/d_bp/u15/ZGOLF.COM deleted file mode 100644 index b948fd5b..00000000 Binary files a/Source/Images/d_bp/u15/ZGOLF.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ZMLIB.COM b/Source/Images/d_bp/u15/ZMLIB.COM deleted file mode 100644 index efaf59dd..00000000 Binary files a/Source/Images/d_bp/u15/ZMLIB.COM and /dev/null differ diff --git a/Source/Images/d_bp/u15/ZSYSTEM.INS b/Source/Images/d_bp/u15/ZSYSTEM.INS deleted file mode 100644 index f7b5b164..00000000 --- a/Source/Images/d_bp/u15/ZSYSTEM.INS +++ /dev/null @@ -1,115 +0,0 @@ -; -; Complete listing of Z-System Utilities as of July 20, 1986. -; Includes "pending" (unofficial) submissions where applicable. -; In this list filenames contain the latest version number. In some -; cases, filenames have been truncated to allow use of the version -; number, e.g., "COMMEN10" refers to COMMENT v1.0, etc. Use this -; list as a checklist to see if you possess the current versions of -; these tools. -; -D. McCord, sysop, Z-Node Central -; -; (This list may be used by Z3INS to actually install files.) -; -AC39.COM -ALIAS11.COM -ARUNZ09.COM -BALIAS13.COM -CD31.COM -CLEAN11P.COM -CMD10.COM -COMMEN20.COM -COMP28.COM -CPSEL10.COM -; CPY10.COM (not a Z3 tool, included with Z-Com and Z3-Dot-Com) -CRC20.COM -; DEBUGRCP.AQM (assemble to make DEBUG.RCP, MU3-like RCP) -DEV10.COM -DEVICE10.COM -DFA12.COM -DIFF21.COM -DIR14.COM -DOSERR10.COM -DOSVER10.COM -DPROG12.COM -DU312.COM -DUMP12.COM -ECHO10.COM -ERASE50.COM -ERROR110.COM -ERROR210.COM -ERROR310.COM -ERROR410.COM -ERRORX10.COM -FINDF24.COM -GETVAR10.COM -GOTO12.COM -HELP53.COM -HELPCK10.COM -HELPPR10.COM -HSH15.COM -IF14.COM -IFSTAT10.COM -LDR15.COM -LDSK20.COM -LGET10.COM -LHELP10.COM -LLF10.COM -LX11.COM -MCOPY43.COM -MENU40.COM -MENUCK13.COM -MKDIR32.COM -; MLOAD24.COM (not a Z3 tool, distributed by Echelon w/permission) -MOVE20.COM -MU311.COM -; NOTE10.COM (a Z3 tool, but requires no installation) -; NULU151.COM (not a Z3 tool, distributed by Echelon w/permission) -PAGE20.COM -PATH31.COM -PMOVE12.COM -PRINT20.COM -PROTEC30.COM -PRTDFL10.COM -PRTSET10.COM -PUBLIC10.COM -PWD10.COM -QUIET11.COM -RECORD30.COM -REG10.COM -RENAME30.COM -RESOLV10.COM -SAK21.COM -SETFIL10.COM -SFA25.COM -SH10.COM -SHCTRL10.COM -SHDEFI10.COM -SHFILE10.COM -SHOW10.COM -SHSET10.COM -SHVAR10.COM -SUB31.COM -; SYSFCP14.LBR (assemble to make SYS.FCP) -; SYSRCP14.LBR (assemble to make SYS.RCP) -TALIAS15.COM -TCCHEC10.COM -TCMAKE10.COM -TCSELE11.COM -UNERAS12.COM -VALIAS11.COM -VCED16.COM -VERROR16.COM -VFILER40.COM -VID01.COM -VIEW11.COM -VMENU16.COM -VMENUC13.COM -VTYPE20.COM -W20.COM -WHEEL31.COM -XD12.COM -XDIR20.COM -Z3INS13.COM -Z3LOC11.COM -; Z3TCAP20.TCP (TCAP database, not a program) -ZEX31A.COM diff --git a/Source/Images/d_bp/u0/BPCNFG.COM b/Source/Images/d_bp/u15/bpcnfg.com similarity index 100% rename from Source/Images/d_bp/u0/BPCNFG.COM rename to Source/Images/d_bp/u15/bpcnfg.com diff --git a/Source/Images/d_bp/u0/BPDBUG.COM b/Source/Images/d_bp/u15/bpdbug.com similarity index 100% rename from Source/Images/d_bp/u0/BPDBUG.COM rename to Source/Images/d_bp/u15/bpdbug.com diff --git a/Source/Images/d_bp/u0/BPFORMAT.COM b/Source/Images/d_bp/u15/bpformat.com similarity index 100% rename from Source/Images/d_bp/u0/BPFORMAT.COM rename to Source/Images/d_bp/u15/bpformat.com diff --git a/Source/Images/d_bp/u0/BPSWAP.COM b/Source/Images/d_bp/u15/bpswap.com similarity index 100% rename from Source/Images/d_bp/u0/BPSWAP.COM rename to Source/Images/d_bp/u15/bpswap.com diff --git a/Source/Images/d_bp/u0/BPSYSGEN.COM b/Source/Images/d_bp/u15/bpsysgen.com similarity index 100% rename from Source/Images/d_bp/u0/BPSYSGEN.COM rename to Source/Images/d_bp/u15/bpsysgen.com diff --git a/Source/Images/d_bp/u0/CONFZ4.COM b/Source/Images/d_bp/u15/confz4.com similarity index 100% rename from Source/Images/d_bp/u0/CONFZ4.COM rename to Source/Images/d_bp/u15/confz4.com diff --git a/Source/Images/d_bp/u15/copy.com b/Source/Images/d_bp/u15/copy.com new file mode 100644 index 00000000..606c81a5 Binary files /dev/null and b/Source/Images/d_bp/u15/copy.com differ diff --git a/Source/Images/d_bp/u15/ease.com b/Source/Images/d_bp/u15/ease.com new file mode 100644 index 00000000..4ec11761 Binary files /dev/null and b/Source/Images/d_bp/u15/ease.com differ diff --git a/Source/Images/d_bp/u0/EMULATE.COM b/Source/Images/d_bp/u15/emulate.com similarity index 100% rename from Source/Images/d_bp/u0/EMULATE.COM rename to Source/Images/d_bp/u15/emulate.com diff --git a/Source/Images/d_bp/u0/FA.COM b/Source/Images/d_bp/u15/fa.com similarity index 100% rename from Source/Images/d_bp/u0/FA.COM rename to Source/Images/d_bp/u15/fa.com diff --git a/Source/Images/d_bp/u15/fileattr.com b/Source/Images/d_bp/u15/fileattr.com new file mode 100644 index 00000000..4527d090 Binary files /dev/null and b/Source/Images/d_bp/u15/fileattr.com differ diff --git a/Source/Images/d_bp/u0/HASHINI.COM b/Source/Images/d_bp/u15/hashini.com similarity index 100% rename from Source/Images/d_bp/u0/HASHINI.COM rename to Source/Images/d_bp/u15/hashini.com diff --git a/Source/Images/d_bp/u0/HDIAG.COM b/Source/Images/d_bp/u15/hdiag.com similarity index 100% rename from Source/Images/d_bp/u0/HDIAG.COM rename to Source/Images/d_bp/u15/hdiag.com diff --git a/Source/Images/d_bp/u0/HELP.COM b/Source/Images/d_bp/u15/help.com similarity index 100% rename from Source/Images/d_bp/u0/HELP.COM rename to Source/Images/d_bp/u15/help.com diff --git a/Source/Images/d_bp/u15/helplsh.com b/Source/Images/d_bp/u15/helplsh.com new file mode 100644 index 00000000..faa0ee0a Binary files /dev/null and b/Source/Images/d_bp/u15/helplsh.com differ diff --git a/Source/Images/d_bp/u15/if.com b/Source/Images/d_bp/u15/if.com new file mode 100644 index 00000000..df949312 Binary files /dev/null and b/Source/Images/d_bp/u15/if.com differ diff --git a/Source/Images/d_bp/u0/INIRAMD.COM b/Source/Images/d_bp/u15/iniramd.com similarity index 100% rename from Source/Images/d_bp/u0/INIRAMD.COM rename to Source/Images/d_bp/u15/iniramd.com diff --git a/Source/Images/d_bp/u0/INITDIR.COM b/Source/Images/d_bp/u15/initdir.com similarity index 100% rename from Source/Images/d_bp/u0/INITDIR.COM rename to Source/Images/d_bp/u15/initdir.com diff --git a/Source/Images/d_bp/u0/INSTAL12.COM b/Source/Images/d_bp/u15/instal12.com similarity index 100% rename from Source/Images/d_bp/u0/INSTAL12.COM rename to Source/Images/d_bp/u15/instal12.com diff --git a/Source/Images/d_bp/u0/IOPINIT.COM b/Source/Images/d_bp/u15/iopinit.com similarity index 100% rename from Source/Images/d_bp/u0/IOPINIT.COM rename to Source/Images/d_bp/u15/iopinit.com diff --git a/Source/Images/d_bp/u0/JETLDR.COM b/Source/Images/d_bp/u15/jetldr.com similarity index 100% rename from Source/Images/d_bp/u0/JETLDR.COM rename to Source/Images/d_bp/u15/jetldr.com diff --git a/Source/Images/d_bp/u0/LDR.COM b/Source/Images/d_bp/u15/ldr.com similarity index 100% rename from Source/Images/d_bp/u0/LDR.COM rename to Source/Images/d_bp/u15/ldr.com diff --git a/Source/Images/d_bp/u15/ldsys.com b/Source/Images/d_bp/u15/ldsys.com new file mode 100644 index 00000000..806330f7 Binary files /dev/null and b/Source/Images/d_bp/u15/ldsys.com differ diff --git a/Source/Images/d_bp/u0/LDP2D.COM b/Source/Images/d_bp/u15/ldtime7.com similarity index 53% rename from Source/Images/d_bp/u0/LDP2D.COM rename to Source/Images/d_bp/u15/ldtime7.com index a89e03d8..e79603de 100644 Binary files a/Source/Images/d_bp/u0/LDP2D.COM and b/Source/Images/d_bp/u15/ldtime7.com differ diff --git a/Source/Images/d_bp/u15/ldtime9.com b/Source/Images/d_bp/u15/ldtime9.com new file mode 100644 index 00000000..656f04df Binary files /dev/null and b/Source/Images/d_bp/u15/ldtime9.com differ diff --git a/Source/Images/d_bp/u0/LDDS.COM b/Source/Images/d_bp/u15/ldtimec.com similarity index 57% rename from Source/Images/d_bp/u0/LDDS.COM rename to Source/Images/d_bp/u15/ldtimec.com index 357f1360..fec7f9a2 100644 Binary files a/Source/Images/d_bp/u0/LDDS.COM and b/Source/Images/d_bp/u15/ldtimec.com differ diff --git a/Source/Images/d_bp/u0/LDNZT.COM b/Source/Images/d_bp/u15/ldtimee.com similarity index 57% rename from Source/Images/d_bp/u0/LDNZT.COM rename to Source/Images/d_bp/u15/ldtimee.com index 87cf0b47..95a6e5f7 100644 Binary files a/Source/Images/d_bp/u0/LDNZT.COM and b/Source/Images/d_bp/u15/ldtimee.com differ diff --git a/Source/Images/d_bp/u15/lsh.com b/Source/Images/d_bp/u15/lsh.com new file mode 100644 index 00000000..aa2c70a3 Binary files /dev/null and b/Source/Images/d_bp/u15/lsh.com differ diff --git a/Source/Images/d_bp/u15/lshf.com b/Source/Images/d_bp/u15/lshf.com new file mode 100644 index 00000000..85af88a1 Binary files /dev/null and b/Source/Images/d_bp/u15/lshf.com differ diff --git a/Source/Images/d_bp/u0/park.com b/Source/Images/d_bp/u15/park.com similarity index 100% rename from Source/Images/d_bp/u0/park.com rename to Source/Images/d_bp/u15/park.com diff --git a/Source/Images/d_bp/u0/PATH.COM b/Source/Images/d_bp/u15/path.com similarity index 100% rename from Source/Images/d_bp/u0/PATH.COM rename to Source/Images/d_bp/u15/path.com diff --git a/Source/Images/d_bp/u0/PUTDS.COM b/Source/Images/d_bp/u15/putds.com similarity index 100% rename from Source/Images/d_bp/u0/PUTDS.COM rename to Source/Images/d_bp/u15/putds.com diff --git a/Source/Images/d_bp/u15/rcopy.com b/Source/Images/d_bp/u15/rcopy.com new file mode 100644 index 00000000..0a7ec09d Binary files /dev/null and b/Source/Images/d_bp/u15/rcopy.com differ diff --git a/Source/Images/d_bp/u0/SETCLOK.COM b/Source/Images/d_bp/u15/setclok.com similarity index 100% rename from Source/Images/d_bp/u0/SETCLOK.COM rename to Source/Images/d_bp/u15/setclok.com diff --git a/Source/Images/d_bp/u0/SHOWHD.COM b/Source/Images/d_bp/u15/showhd.com similarity index 100% rename from Source/Images/d_bp/u0/SHOWHD.COM rename to Source/Images/d_bp/u15/showhd.com diff --git a/Source/Images/d_bp/u0/SIZERAM.COM b/Source/Images/d_bp/u15/sizeram.com similarity index 100% rename from Source/Images/d_bp/u0/SIZERAM.COM rename to Source/Images/d_bp/u15/sizeram.com diff --git a/Source/Images/d_bp/u0/SLOWDOWN.COM b/Source/Images/d_bp/u15/slowdown.com similarity index 100% rename from Source/Images/d_bp/u0/SLOWDOWN.COM rename to Source/Images/d_bp/u15/slowdown.com diff --git a/Source/Images/d_bp/u0/SPEEDUP.COM b/Source/Images/d_bp/u15/speedup.com similarity index 100% rename from Source/Images/d_bp/u0/SPEEDUP.COM rename to Source/Images/d_bp/u15/speedup.com diff --git a/Source/Images/d_bp/u0/spinup.com b/Source/Images/d_bp/u15/spinup.com similarity index 100% rename from Source/Images/d_bp/u0/spinup.com rename to Source/Images/d_bp/u15/spinup.com diff --git a/Source/Images/d_bp/u0/TDD.COM b/Source/Images/d_bp/u15/tdd.com similarity index 100% rename from Source/Images/d_bp/u0/TDD.COM rename to Source/Images/d_bp/u15/tdd.com diff --git a/Source/Images/d_bp/u0/TURBO.COM b/Source/Images/d_bp/u15/turbo.com similarity index 100% rename from Source/Images/d_bp/u0/TURBO.COM rename to Source/Images/d_bp/u15/turbo.com diff --git a/Source/Images/d_bp/u0/VALIAS.COM b/Source/Images/d_bp/u15/valias.com similarity index 100% rename from Source/Images/d_bp/u0/VALIAS.COM rename to Source/Images/d_bp/u15/valias.com diff --git a/Source/Images/d_bp/u15/xzrl.com b/Source/Images/d_bp/u15/xzrl.com deleted file mode 100644 index 2d1e4e2b..00000000 Binary files a/Source/Images/d_bp/u15/xzrl.com and /dev/null differ diff --git a/Source/Images/d_bp/u15/xzrl.doc b/Source/Images/d_bp/u15/xzrl.doc deleted file mode 100644 index ae370d02..00000000 --- a/Source/Images/d_bp/u15/xzrl.doc +++ /dev/null @@ -1,51 +0,0 @@ - - >>> XZRL.DOC <<< - -Overview --------- - -XZRL (eXamine ZRL files) is a REL file reading utility for use with ZCPR. - - -Installation ------------- - -ZCPR 3.0 users must install this utility first with their favorite -installation method, whereas no installation is required for operation -in ZCPR 3.3 and 3.4 environments. - - -Syntax ------- - -The help screen for XZRL is fairly self-explanatory and is invoked -by the command : - - XZRL // - -The help screen has the following format : - -============================================================================== - XZRL 1.0 Copyright 1989 by S.Fascher - - Function : eXamine ZRL (or any REL files) generated by M80 or SLR - - Syntax : - - XZRL / - shows this help message - XZRL [du:]fname1[.ext] - examines file fname1 - XZRL [du:]fname1.LBR - shows fname1 library directory only - XZRL [du:]fname1[.LBR] fname2[.ext] - examines library member fname2 - - Note : If [.ext] is not specified, the current default file extensions - REL and ZRL will be automatically searched for. -============================================================================== - -The default extensions can be changed if desired ( see xzrl.pat ) , with -the new extensions automatically appearing in the help menu. - - - enjoy !!! - - - \ No newline at end of file diff --git a/Source/Images/d_bp/u0/ZCNFG.COM b/Source/Images/d_bp/u15/zcnfg.com similarity index 100% rename from Source/Images/d_bp/u0/ZCNFG.COM rename to Source/Images/d_bp/u15/zcnfg.com diff --git a/Source/Images/d_bp/u15/zex.com b/Source/Images/d_bp/u15/zex.com new file mode 100644 index 00000000..cd46405d Binary files /dev/null and b/Source/Images/d_bp/u15/zex.com differ diff --git a/Source/Images/d_bp/u15/zpath.com b/Source/Images/d_bp/u15/zpath.com new file mode 100644 index 00000000..5c0aa503 Binary files /dev/null and b/Source/Images/d_bp/u15/zpath.com differ diff --git a/Source/Images/d_bp/u0/ZSCFG2.COM b/Source/Images/d_bp/u15/zscfg2.com similarity index 100% rename from Source/Images/d_bp/u0/ZSCFG2.COM rename to Source/Images/d_bp/u15/zscfg2.com diff --git a/Source/Images/d_bp/u0/ZSCONFIG.COM b/Source/Images/d_bp/u15/zsconfig.com similarity index 100% rename from Source/Images/d_bp/u0/ZSCONFIG.COM rename to Source/Images/d_bp/u15/zsconfig.com diff --git a/Source/Images/d_bp/u15/zshow.com b/Source/Images/d_bp/u15/zshow.com new file mode 100644 index 00000000..0bd0b1de Binary files /dev/null and b/Source/Images/d_bp/u15/zshow.com differ