home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ZSYS
/
ZNODE-12
/
I
/
LX22.LBR
/
LX.HZT
/
LX.HST
Wrap
Text File
|
1991-02-28
|
9KB
|
175 lines
; PROGRAM: LX
; ORIGINAL AUTHOR: RICHARD CONN
; VERSION: 1.0
; DATE: 10 Aug 85
; --------- LX revision history -------------
;2.2 Febrary 20, 1991
; Fixed (I think/hope) the pesky cosmestic problem with the
; missing newline when LX is a genuine ECP (we let ARUNZ
; deliver the newline in forced-ECP mode). Even error
; messages get the newline fix (thanks Howard!). Saved a
; byte and a level of stack in the Type 3 header, a few
; other bytes elsewhere.
; 2/16/91 Bruce Morgen
;2.1 Moved a couple of lines of code so that CPYFLG is initialized
; properly in the type 4 version. Fixed an error in LOADCOM that
; could cause certain type 4 programs to be loaded one page too
; high. Cleaned up error handler invocation code. Removed a few
; redundant "and a" instructions, changed wording of a couple of
; comments, changed a "jp" to a "jr", etc.
; 08/13/90 Howard Goldstein
; 2.0 Release version. (Versions 2.0a - 2.0f were limited to Beta
; test distribution). Added T4LDR11 source and binary files,
; cleaned up source text.
; 08/10/90 Al Hawley
; 2.0f- Moved OPTION into the configuration block. Also moved the data
; statements defining default file extensions into the cfg. area.
; Rearranged the code at ENTRY to remove conditional assembly no
; longer needed with OPTION moved. Capitalize all code fields,
; leaving comment fields undisturbed. NO functional changes to LX,
; but a new associated .CFG file is required.
; 08/07/90 Al Hawley (aeh)
; 2.0e- Added local stack. Reasserted home dir before calling PFIND.
; Cleared error code at beginning of program. Fixed so that "/" option
; works correctly if LX is not first command in MCL. Removed some
; unnecessary code from ADJMCL. Added public symbol PRINT so that
; SYSLIB routines referencing it actually get EPRINT which is used
; throughout the rest of the program. Fixed LOADCOM routine so as
; not to attempt auto-install of type 2 programs. Repaired FSIZE
; routine which was coming up 128 bytes short on files with an odd
; number of records.
; 08/05/90 Howard Goldstein
; 2.0d- Reorganized data and code at the start of the program
; consistent with definition of a configuration data block
; area. Created a CFG file, so ZCNFG can be used to change
; options and filespecs for the command file library names.
; 07/22/90 Al Hawley (aeh)
; 2.0c- Revised code so load type must be decided at assembly time
; so type 4 code can be linked by any linker that can produce
; PRL. Prior code could only be linked with ZML. Note that
; the new scheme forbids the use of CODEND in type 4's (which
; should be done as $MEMRY is not treated properly). The new
; scheme also automatically alters the data size word used
; by the type 4 loader so DSEG truncation won't cause CCP
; overwrite.
; 11/05/89 Cameron W. Cotrill
; 2.0b- Implemented Howard Goldstein's corrected ECP code in CHEKWS.
; Cameron W. Cotrill
; 2.0a- Massive rewrite to allow LX to run as type 1,3,4 and extract
; and load type 1,3,4 files. A bunch of unneeded buffer space
; was removed, ADJMCL was re-written to work "in place". All
; address checking code and dynamic load buffering is new and
; improved. Original "look and feel" retained.
; Cameron W. Cotrill
; 1.9d- Buffer address for extracted file now set to TPA if LX is set
; to load as a type 3 or 4 using RUNHI. CPYCOD is not relocated
; in this case. Re-arranged some code and removed ix register
; usage as it was a classic case of how NOT to use an index
; register. Added prttyp call to help message.
; Cameron W. Cotrill
; 1.9a- Modified to use SARGV and Z33GMTOP routines. Other minor optimization
; 19 Aug 89. Harold F. Bower
; 1.9 - Corrected help screen, safety header added, restored Royce Shofner's
; wheel byte idea in a simpler way. An option byte at 102H controls
; LX19's wheel byte response. If it is patched to a zero (0FFH in
; distributed COM/CIM files), LX19 will test the wheel byte and use
; ROOT:USERCMD.LBR instead of ROOT:COMMAND.LBR if not wheel (wheel byte
; is reset, zeroed). Otherwise LX19 will work like LX18 did - very
; nicely. Both Default LBR names remain patchable to preference.
; April 1, 1988 Bruce Morgen
; 1.8 - Rewrote the ADJCML routine. IT NOW ADJUSTS THE COMMAND LINE PROPERLY
; WHEN A LIBRARY NAME WAS INCLUDED IN THE COMMAND.
; Howard Goldstein, November 29, 1987
; 1.7 - Added code to parse file names via resident CPR code if ZCPR33 is
; present. This makes LX completely Z33 compatible. Removed Bruce
; Morgen's in-line PUTER3 code since Z33LIB's version works properly now.
; Howard Goldstein, November 21, 1987
; 1.6 - Deleted vestigial buffer set-up code via DSEGed buffer definitions.
; LX now does a better simulation of the 3.3 CPR by passing the
; environment descriptor pointer in HL as well as poking ORG+9 in Z3
; tools. Added detection code for LX running under WordStar. A new
; alternate syntax has been introduced especially for chaining to LX
; from ARUNZ's "default alias" feature:
; :DEFAULT [dir or du:]LX / $0 $*
; Under that condition, or whenever LX is called with the intervening
; "/" parameter, LX will declare itself an ECP and, if there is an
; error, adjust the command line to eliminate its own verb. If running
; under Z33, LX follows the CPR's DUFIRST flag. All errors (except
; under WordStar) now abort to the error handler with the ECP bit set
; on return to the CPR.
; While we were at it, replaced the internal COUT routine with a simple
; JP to BOUT to accomodate BIOS's that (legitimately) do not bother to
; preserve the HL register through CONOUT calls. The BOUT approach
; ALWAYS (famous last words) works, and is shorter to "bout" (grin).
; The reason there is a hand-coded PUTER3 routine in LX is that Z33LIB's
; fails to preserve the incoming A register against GETMSG's return. In
; other words, it doesn't work.
; Bruce Morgen @23:55:56 June 4, 1987
; 1.5 - Adapted to coexist as an ECP with error handling under ZCPR 3.3 and
; BGii 1.13 or later. Also extended Michael's auto-install code to
; properly initialize the copy routine for Z33 type 2 COMfiles (origin
; other than 100H). Bumped versions past 1.3 & 1.4, which seem to be of
; interest mainly to Z-Node sysops (no offense, Royce, just a personal
; opinion - b/m).
; Note that there is a problem regarding SYSLIB's CODEND routine and
; the use of DSEG as recommended for the upcoming Z80 versions of the
; Conn *LIBs. The old approach (the $MEMRY buffer in CSEG) has been
; recommended to the LIBs revision team. All modifiable LX data buffers
; are now in DSEG, including the (now runtime-initialized) ARGV argument
; table. While I was at it, I got rid of the unecessary self-modifying
; code at COPY$CODE. Remember, we won't be able to get away with such
; kludges with the Z280, so we might as well start getting rid of our
; bad habits now.
; Note that LX now carries its own COUT routine to enable showing an
; error or a help screen under the WordStar "R" command without crashing
; anyone's system to a fare-thee-well.
; Bruce Morgen @15:03:03 April 24, 1987
; 1.2 - Auto-installs ZCPR3 utilities. There is no need to run Z3INS on
; utilities run by LX since, after loading and before executing, LX
; looks for "Z3ENV" at the beginning. If present, LX inserts the
; address of the environment descriptor. Both concept and code are
; based on Jay Sage's experimental CCP.
; 3 September 1986 - Michael Bate
; 1.1 - Extracted ARGV from syslib36 and included it here, modified so that
; '=' is also an argument delimiter if it occurs after a non-space
; (sknsp:).
; 27 Feb 86 jww
; 1.0 - Release version
; LX is like the old LRUN tools in that it looks at its arguments as a command
; line to be executed. LX locks onto a library file, searches for the command
; verb COM file in it, extracts the COM file into memory at 100H, and sets up
; the various buffers to look like the COM file was executed by the ZCPR3
; command processor.
; Unlike the other LRUN tools I've seen and heard of (with the possible
; exception of LRUNZ), LX truly acts as the ZCPR3 command processor, parsing
; the command line as ZCPR3 itself would. Named directory references are
; allowed, the External FCB is loaded if available, etc. Any ZCPR3 tool
; executed by LX sees the environment as it would if ZCPR3 itself executed the
; tool.
; For security, no directory references are allowed (they are ignored) for any
; arguments if the wheel byte is not set.