mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 14:11:48 -06:00
BPBIOS Sync
- Updated BPBIOS based on contributions by Lars Nelson.
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Source/Images/d_bp/u0/bpbio.ndr
Normal file
BIN
Source/Images/d_bp/u0/bpbio.ndr
Normal file
Binary file not shown.
BIN
Source/Images/d_bp/u0/bpbioz33.ndr
Normal file
BIN
Source/Images/d_bp/u0/bpbioz33.ndr
Normal file
Binary file not shown.
Binary file not shown.
BIN
Source/Images/d_bp/u0/ease.hlp
Normal file
BIN
Source/Images/d_bp/u0/ease.hlp
Normal file
Binary file not shown.
BIN
Source/Images/d_bp/u0/fcp-4.zrl
Normal file
BIN
Source/Images/d_bp/u0/fcp-4.zrl
Normal file
Binary file not shown.
BIN
Source/Images/d_bp/u0/fcp-4t.zrl
Normal file
BIN
Source/Images/d_bp/u0/fcp-4t.zrl
Normal file
Binary file not shown.
1
Source/Images/d_bp/u0/lshf.var
Normal file
1
Source/Images/d_bp/u0/lshf.var
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
Binary file not shown.
9
Source/Images/d_bp/u0/ramfiles.txt
Normal file
9
Source/Images/d_bp/u0/ramfiles.txt
Normal file
@@ -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
|
||||
|
||||
BIN
Source/Images/d_bp/u0/rcp-16h.zrl
Normal file
BIN
Source/Images/d_bp/u0/rcp-16h.zrl
Normal file
Binary file not shown.
Binary file not shown.
35
Source/Images/d_bp/u0/suportww.tag
Normal file
35
Source/Images/d_bp/u0/suportww.tag
Normal file
@@ -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
|
||||
|
||||
85
Source/Images/d_bp/u0/support.txt
Normal file
85
Source/Images/d_bp/u0/support.txt
Normal file
@@ -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.
|
||||
BIN
Source/Images/d_bp/u0/zex.com
Normal file
BIN
Source/Images/d_bp/u0/zex.com
Normal file
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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æ <20>
|
||||
ZCPR3® Aî Aliaó ió á COÍ filå createä bù thå ALIAÓ prograí <20>
|
||||
whicè containó onå oò morå commandó (separateä bù <20>
|
||||
semicolons© tï bå placeä iî thå Commanä Linå Buffer® Wheî <20>
|
||||
thå Aliaó ió invoked¬ parameteró froí thå commanä linå arå <20>
|
||||
implanteä intï thå scripô containeä withiî thå Alias¬ anä <20>
|
||||
thå resultinç ne÷ commanä linå ió placeä intï thå Commanä <20>
|
||||
Linå Buffeò anä executed.
|
||||
|
||||
|
||||
Options:
|
||||
None
|
||||
|
||||
Comments:
|
||||
|
||||
ZCPR³ MUSÔ bå implementeä witè aî Externaì Commanä Linå <20>
|
||||
Buffer in order for ALIAS to work.
|
||||
|
||||
Thå scripô oæ thå internaì commanä linå supportó <20>
|
||||
parameteò passinç iî á manneò similaò tï ZEØ anä SUB® Thå <20>
|
||||
variableó $n¬ wherå ° <½ î <½ 9¬ maù bå placeä intï thå <20>
|
||||
script¬ anä thå correspondinç parameteró wilì bå substituteä <20>
|
||||
foò thå indicateä variables® Thå variablå $° ió thå namå oæ <20>
|
||||
thå Aliaó itself® Thå variablå $ª ió thå entirå taiì oæ thå <20>
|
||||
command line.
|
||||
|
||||
|
||||
Twï additionaì variables¬ $Ä anä $U¬ arå available® <20>
|
||||
$Ä expandó intï thå letteò oæ thå disë whicè waó loggeä iî <20>
|
||||
aô thå timå thå Aliaó waó expandeä (thå homå disk)¬ anä $Õ <20>
|
||||
expandó intï á numbeò (iî ASCIÉ chars© representinç thå useò <20>
|
||||
areá whicè waó loggeä iî aô thå timå thå Aliaó waó expandeä <20>
|
||||
(the home user).
|
||||
|
||||
Thå ZCPR³ Systeí filå nameó arå availablå tï thå Aliaó <20>
|
||||
aó thå variableó $Fî anä $Nn¬ wherå ± <½ î <½ 4® $F± referó <20>
|
||||
tï FILENAME.TYÐ oæ Systeí Filå 1¬ $N± referó tï FILENAMÅ oæ <20>
|
||||
Systeí Filå 2¬ etc® Notå thaô thå SETFILÅ commanä ió useä <20>
|
||||
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ä <20>
|
||||
witè thå remaindeò oæ thå contentó oæ thå commanä linå <20>
|
||||
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ó <20>
|
||||
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ç <20>
|
||||
redirectablå I/Ï aó implementeä undeò ZCPR3¬ anä hå haó twï <20>
|
||||
versionó oæ Worä Staò (trademark¬ Micropro© - onå foò eacè <20>
|
||||
printer® Hå caî creatå aî Aliaó containinç thå followinç <20>
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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è <20>
|
||||
optionaì parameteò substitution¬ whicè caî bå executeä bù <20>
|
||||
ZCPR3® Theså commandó arå exactlù thå samå kindó oæ <20>
|
||||
commandó aó yoõ woulä issuå aô thå console¬ anä anù commanä <20>
|
||||
whicè caî bå issueä froí thå consolå caî alsï bå issueä froí <20>
|
||||
withiî á Commanä Filå (witè jusô á couplå oæ restrictions).
|
||||
|
||||
Thå Commanä Filå Facilitieó oæ SUÂ anä ZEØ arå <20>
|
||||
availablå undeò ZCPR3® Similaò iî concepô tï thå SUBMIÔ <20>
|
||||
facilitù oæ CP/M¬ botè SUÂ anä ZEØ arå upward-compatablå tï <20>
|
||||
SUBMIÔ (anù SUÂ filå caî ruî undeò theí witè fe÷ <20>
|
||||
restrictions).
|
||||
|
||||
|
||||
Botè SUÂ anä ZEØ begiî processinç bù translatinç thå <20>
|
||||
commanä fileó theù arå giveî intï slightlù differenô forms® <20>
|
||||
Botè dï parameteò substitution¬ extractinç parameteró froí <20>
|
||||
thå commanä lineó anä placinç theí intï thå texô oæ thå <20>
|
||||
commanä streaí theù arå building® SUÂ buildó thå commanä <20>
|
||||
streaí tï bå executeä oî disë drivå Á undeò thå currenô useò <20>
|
||||
number¬ anä ZEØ buildó thå commanä streaí iî memory.
|
||||
|
||||
ZEØ ió generallù preferreä tï SUB® Undeò ZEX¬ thå <20>
|
||||
commanä streaí ió executeä mucè morå quicklù thaî undeò SUÂ <20>
|
||||
sincå ZEØ accesseó memorù foò thå nexô characteò whilå ZCPR³ <20>
|
||||
haó tï gï tï disk® ZEX¬ however¬ takeó uð memorù space¬ anä <20>
|
||||
thaô ió itó maiî drawback® Thå TPÁ (Transienô Prograí Area© <20>
|
||||
undeò ZEØ ió smalleò thaî whaô ió availablå tï commanä fileó <20>
|
||||
runninç undeò SUB® Thió ió thå basiã trade-ofæ betweeî thå <20>
|
||||
twï Commanä Filå Processors.
|
||||
|
||||
|
||||
Anotheò differencå betweeî SUÂ anä ZEØ ió thaô SUÂ <20>
|
||||
commanä streamó arå line-orienteä anä extracteä onlù bù <20>
|
||||
ZCPR3® Thaô is¬ SUÂ buildó á commanä filå nameä $$$.SUÂ <20>
|
||||
likå SUBMIÔ does¬ anä ZCPR³ extractó á linå froí thå $$$.SUÂ <20>
|
||||
filå eacè timå iô ió entered® Wheî ZCPR³ ió entereä bù <20>
|
||||
eitheò á Colä Boot¬ Warí Boot¬ oò simplå RETurî froí á <20>
|
||||
loadeä program¬ iô checkó thå Multiplå Commanä Linå Buffeò <20>
|
||||
foò á pendinç command® Iæ ZCPR³ findó á pendinç command¬ <20>
|
||||
thå commanä ió executed® Iæ not¬ ZCPR³ checkó thå Aº drivå <20>
|
||||
(currenô user© foò á $$$.SUÂ file® Iæ á $$$.SUÂ filå ió <20>
|
||||
found¬ ZCPR³ extractó thå nexô linå froí thå $$$.SUÂ file¬ <20>
|
||||
processeó it¬ anä beginó executioî oæ iô froí thå Multiplå <20>
|
||||
Commanä Linå Buffer® Finally¬ iæ thå $$$.SUÂ filå ió noô <20>
|
||||
found¬ ZCPR³ promptó thå useò foò input.
|
||||
|
||||
Thaô ió ho÷ commanä streaí processinç undeò SUÂ ió <20>
|
||||
performed® ZEX¬ however¬ actó aó á combinatioî oæ SUÂ anä <20>
|
||||
XSUB® Oncå commanä streaí processinç beginó undeò ZEX¬ thå <20>
|
||||
ZEØ monitor¬ locateä undeò ZCPR³ witè thå associateä commanä <20>
|
||||
stream¬ supplieó á characteò eacè timå thå BIOÓ Consolå <20>
|
||||
Inpuô Routinå ió called® ZEØ extractó thå nexô characteò <20>
|
||||
froí thå commanä stream¬ examineó iô tï seå iæ iô ió á ZEØ <20>
|
||||
commanä anä executeó iô iæ so¬ anä returnó iô tï thå callinç <20>
|
||||
prograí iæ iô ió noô á ZEØ command.
|
||||
|
||||
Iî á sense¬ ZCPR³ itselæ doeó noô realizå thaô ZEØ ió <20>
|
||||
running® Neitheò dï thå transienô programó iî general® ZEØ <20>
|
||||
simplù interceptó alì calló tï thå BIOÓ Consolå Inpuô (anä <20>
|
||||
Inpuô Status© routinå anä provideó aî inpuô characteò iî itó <20>
|
||||
place® Therå arå exceptionó tï thió case¬ buô theù wilì bå <20>
|
||||
discusseä later.
|
||||
|
||||
Botè SUÂ anä ZEØ fiô intï thå ZCPR³ Systeí nicely¬ anä <20>
|
||||
theù caî bå useä tï acô aó Extendeä Commanä Processoró iæ <20>
|
||||
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î <20>
|
||||
á ZEØ commanä file¬ whicè permitó branching® Iô acceptó <20>
|
||||
onlù onå argument¬ á label¬ whicè ió defineä withiî thå ZEØ <20>
|
||||
filå aó á speciaì commenô oæ thå form:
|
||||
|
||||
;=label
|
||||
|
||||
Anù texô whicè followó thå "label¢ phraså ió considereä tï <20>
|
||||
be comment and is not processed.
|
||||
|
||||
|
||||
Options:
|
||||
None
|
||||
|
||||
Comments:
|
||||
|
||||
GOTÏ wilì ONLÙ worë correctlù iæ executeä withiî á ZEØ <20>
|
||||
command file. GOTO will issue an error message otherwise.
|
||||
|
||||
Withouô thå ZCPR³ Flo÷ Controì facility¬ GOTÏ woulä bå <20>
|
||||
oæ littlå value® Witè IF¬ however¬ GOTÏ ió extremelù usefuì <20>
|
||||
in setting up loops and other flow-control constructs.
|
||||
|
||||
Selected Error Messages:
|
||||
|
||||
"ZEØ Noô Running¢ meanó thaô GOTÏ waó executeä froí <20>
|
||||
outside a ZEX command file.
|
||||
|
||||
"Labeì xxø Noô Founä -- Abortinç ZEX¢ meanó thaô thå <20>
|
||||
referenceä labeì waó noô founä withiî thå commanä file¬ sï <20>
|
||||
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è <20>
|
||||
ZCPR³ lookó foò eacè timå iô ió readù foò á commanä line® <20>
|
||||
Iæ ZCPR³ findó sucè á file¬ iô extractó thå nexô commanä <20>
|
||||
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ï <20>
|
||||
gracefullù aborô á $$$.SUÂ file® ^Ã aô thå consolå caî bå <20>
|
||||
useä tï aborô sucè processinç aó undeò CP/M¬ buô thå /Á forí <20>
|
||||
allowó thå luxurù oæ startinç á commanä streaí anä stoppinç <20>
|
||||
aô á criticaì poinô tï allo÷ thå useò tï takå hió time¬ <20>
|
||||
inspecô whaô haó happened¬ anä theî decidå whetheò tï <20>
|
||||
proceeä oò not.
|
||||
|
||||
Thå "SUÂ /I¢ forí eliminateó thå neeä foò thå useò tï <20>
|
||||
uså aî editoò tï creatå á .SUÂ file® Iæ thå useò haó á <20>
|
||||
commanä streaí hå wantó tï executå immediatelù anä doesn'ô <20>
|
||||
carå tï dï iô again¬ hå caî uså thió option® Iî response¬ <20>
|
||||
SUÂ allowó hií tï enteò hió commanä streaí (sorry¬ nï <20>
|
||||
parameteò passing© á linå aô á time® Wheî iô ió alì entereä <20>
|
||||
(useò enteró aî emptù line)¬ thå $$$.SUÂ filå ió builô anä <20>
|
||||
executed.
|
||||
|
||||
|
||||
Thå finaì form¬ "SUÂ filenamå params"¬ ió identicaì iî <20>
|
||||
forí tï thå SUBMIÔ commanä supplieä witè CP/M® Thå <20>
|
||||
"filename¢ specifieó thå namå oæ thå .SUÂ filå tï bå <20>
|
||||
executed¬ anä thå parameteró arå associateä witè thå <20>
|
||||
substitutioî variableó oæ $1¬ $2¬ etc® Uð tï 2° parameteró <20>
|
||||
maù bå specified® Thå sequencå "$$¢ placeó á "$¢ intï thå <20>
|
||||
commanä line¬ anä thå characteò sequencå "^c¢ placeó thå <20>
|
||||
indicateä controì characteò intï thå commanä linå (uparro÷ Ã <20>
|
||||
placeó Control-C).
|
||||
|
||||
Thå SUÂ commanä maù bå nesteä intï á $$$.SUÂ file® Iæ <20>
|
||||
á "SUÂ filenamå params¢ commanä ió encountereä iî á $$$.SUÂ <20>
|
||||
file¬ SUÂ runs¬ realizeó thaô thió haó happened¬ anä insertó <20>
|
||||
thå indicateä commanä file¬ witè parameteò substitution¬ <20>
|
||||
intï thå runninç commanä streaí aô thå appropriatå place® <20>
|
||||
Thió maù bå nesteä aó manù leveló deeð aó desired.
|
||||
|
||||
|
||||
Undeò ZCPR3¬ iæ SUÂ ió executeä witè thå Multiplå <20>
|
||||
Commanä Linå Facilitù invokeä anä morå commandó follo÷ thå <20>
|
||||
SUÂ command¬ theî thå resô oæ thå Multiplå Commanä Linå ió <20>
|
||||
inserteä aô thå enä oæ thå generateä $$$.SUÂ file.
|
||||
|
||||
Finally¬ SUÂ followó thå ZCPR³ patè wheî searchinç foò <20>
|
||||
thå indicateä commanä file® Iô ió fullù integrateä intï thå <20>
|
||||
ZCPR³ Systeí anä ió ablå tï emploù thå Externaì Patè anä <20>
|
||||
Multiplå Commanä Linå Buffeò featureó oæ ZCPR3.
|
||||
|
||||
|
||||
|
||||
Selected Error Messages:
|
||||
|
||||
"Param¢ erroò meanó thaô á parameteò waó referenceä anä <20>
|
||||
nonå waó giveî oî thå commanä line.
|
||||
|
||||
"Linå Toï Long¢ meanó thaô thå inpuô line¬ afteò beinç <20>
|
||||
expandeä witè thå inpuô parameters¬ waó morå thaî 12¶ <20>
|
||||
characters long.
|
||||
|
||||
Á morå completå lisô oæ erroò messageó ió giveî undeò <20>
|
||||
the indicated section of the main menu.
|
||||
|
||||
|
||||
Examples of Use:
|
||||
|
||||
SUB cmdfile p1 p2 p3
|
||||
-- thå filå 'cmdfile.SUB§ ió processed¬ <20>
|
||||
substituting 'p1' for $1, 'p2' for $2, and 'p3' for $3
|
||||
|
||||
SUB /AB
|
||||
-- durinç thå executioî oæ á commanä file¬ thió <20>
|
||||
commanä causeó thå belì tï rinç aô thå consolå anä thå useò <20>
|
||||
is given a chance to abort execution
|
||||
|
||||
:E
|
||||
|
||||
SUÂ provideó á numbeò oæ informativå diagnosticó tï thå <20>
|
||||
user® Iî particular¬ wheî processinç á Commanä File¬ wheî <20>
|
||||
aî erroò ió encountered¬ thå useò ió informeä oæ thå linå <20>
|
||||
numbeò thå erroò occuró at.
|
||||
|
||||
Thå followinç summarizeó thå erroò messageó presenteä <20>
|
||||
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ô <20>
|
||||
performó functionó likå SUÂ anä XSUÂ combined¬ anä itó inpuô <20>
|
||||
sourcå ió locateä iî memory¬ sï thaô itó executioî speeä ió <20>
|
||||
significantly greater.
|
||||
|
||||
|
||||
Options:
|
||||
|
||||
Aó indicateä above¬ therå arå nï optionó tï ZEX.
|
||||
|
||||
Comments:
|
||||
|
||||
Thå Interactivå Modå oæ ZEØ executeó likå thå <20>
|
||||
Interactivå Modå oæ SUB® Thå useò enteró commanä lineó <20>
|
||||
untiì hå ió satisfieä anä theî terminateó thå procesó bù <20>
|
||||
enterinç aî emptù linå (simplù hittinç RETURN)® ZEØ theî <20>
|
||||
executeó thå commandó iî thå sequencå entered® Nï parameteò <20>
|
||||
passinç ió permitteä iî thió modå oæ operation.
|
||||
|
||||
Thå "ZEØ filenamå params¢ forí ió likå thå <20>
|
||||
correspondinç SUÂ form® ZEØ wilì searcè alonç thå ZCPR³ <20>
|
||||
Externaì Patè foò á commanä filå oæ thå forí filename.ZEØ oò <20>
|
||||
filename.SUB® Iæ á directorù ió entereä whicè containó botè <20>
|
||||
sucè files¬ thå filå oæ typå ZEØ wilì bå executed.
|
||||
|
||||
|
||||
Oncå ZEØ haó beguî execution¬ iô placeó á ZEØ Monitoò <20>
|
||||
jusô undeò ZCPR³ anä buildó thå commanä streaí undeò thå <20>
|
||||
monitor® Oncå complete¬ thå addresó oæ thå BDOÓ ió adjusteä <20>
|
||||
sï thaô thå ZEØ monitoò anä itó commanä streaí wilì noô bå <20>
|
||||
overwritteî bù transienô programs¬ anä executioî begins® <20>
|
||||
Eacè timå thå BIOÓ Consolå Inpuô routinå ió called¬ ZEØ <20>
|
||||
supplieó thå inpuô character.
|
||||
|
||||
Aó witè SUB¬ á ^Ã froí thå consolå wilì aborô executioî <20>
|
||||
oæ á ZEØ commanä stream® Also¬ aó witè SUB¬ iæ á commanä <20>
|
||||
followó ZEØ iî á Multiplå Commanä Line¬ ZEØ appendó thió <20>
|
||||
commanä tï thå commanä stream.
|
||||
|
||||
|
||||
Unlikå SUB¬ ZEØ doeó noô permiô nestinç oæ commanä <20>
|
||||
files® ZEØ wilì simplù aborô iæ á ZEØ commanä ió <20>
|
||||
encountereä iî thå commanä streaí iô ió processing.
|
||||
|
||||
Unlikå SUB¬ ZEØ supportó manù morå embeddeä commands® <20>
|
||||
Combininç thå facilitieó oæ SUÂ anä XSUÂ iî thió case¬ thå <20>
|
||||
embeddeä commandó oæ ZEØ reflecô thå XSUB-likå capabilitieó <20>
|
||||
oæ ZEØ aó welì aó somå ne÷ ideas.
|
||||
|
||||
Theså extendeä controì commandó arå discusseä iî <20>
|
||||
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ô <20>
|
||||
found¬ 'mycmds.SUB§ ió performed» 'p1§ ió substituteä foò $± <20>
|
||||
and 'p2' for $2
|
||||
|
||||
:D
|
||||
|
||||
ZEX Directives - Control Commands
|
||||
|
||||
The following summarizes the ZEX Control Commands:
|
||||
|
||||
Cmd Meaning Cmd Meaning
|
||||
| insert <CR> ^| insert <CRLF>
|
||||
^º 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Ø <20>
|
||||
help.
|
||||
|
||||
Thå followinç commandó simplù inserô characteró intï <20>
|
||||
thå ZEØ commanä streaí anä wilì noô bå discusseä iî anù <20>
|
||||
greateò detail.
|
||||
|
||||
| inserts a <CR> ^| inserts a <CR> <LF> 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ô <20>
|
||||
doeó noô inserô á BELÌ characteò intï thå commanä filå likå <20>
|
||||
á ^Ç sequencå would® Iô simplù ringó thå belì anä continueó <20>
|
||||
processing.
|
||||
|
||||
Thå ;» commanä ió á ZEØ comment® Iô anä alì characteró <20>
|
||||
followinç iô uð tï anä includinç thå followinç <LF¾ arå noô <20>
|
||||
includeä iî thå ZEØ commanä stream® Theù arå simplù treateä <20>
|
||||
aó á commenô iî thå ZEØ Commanä Filå anä ignored® Unlikå á <20>
|
||||
conventionaì ZCPR³ comment¬ thå ZEØ commenô doeó noô takå uð <20>
|
||||
spacå iî thå commanä streaí anä doeó noô appeaò wheî thå <20>
|
||||
commanä streaí ió executed.
|
||||
|
||||
Thå ^¼ anä ^¾ commandó arå useä tï brackeô characteró <20>
|
||||
whicè arå simplù echoeä bù thå ZEØ monitoò anä noô passeä <20>
|
||||
bacë tï thå callinç program® Thió causeó thå characteró <20>
|
||||
betweeî theså commandó tï bå echoeä tï thå useò durinç <20>
|
||||
executioî buô noô processeä bù anù program® Thió featurå ió <20>
|
||||
verù gooä foò embeddinç commentó tï bå printeä aô executioî <20>
|
||||
timå intï thå commanä stream® Unlikå thå ZCPR³ commenô <20>
|
||||
form¬ whicè ió á linå beginninç witè á semicolon¬ commentó <20>
|
||||
encloseä bù ^¼ anä ^¾ maù appeaò anywhere¬ sucè aó withiî aî <20>
|
||||
editoò session.
|
||||
|
||||
Thå ^£ commanä toggleó suppressioî oæ informativå <20>
|
||||
messageó generateä bù ZEX.
|
||||
|
||||
Thå ^® commanä causeó consolå outpuô tï ceaså untiì thå <20>
|
||||
nexô ^® ió encountered® Characteò inpuô froí thå ZEØ <20>
|
||||
Monitoò continues¬ buô thå useò doeó noô seå whaô iô is.
|
||||
|
||||
|
||||
Thå ^º commanä causeó thå ZEØ monitoò tï restarô <20>
|
||||
executioî oæ thå loadeä commanä stream® Thå entirå commanä <20>
|
||||
stream¬ aó initiallù processeä bù ZEX¬ ió executeä agaiî <20>
|
||||
froí thå beginning.
|
||||
|
||||
$n¬ wherå 1<=n<=9¬ wilì causå thå indicateä specifieä <20>
|
||||
oò defaulô parameteò tï bå substituteä froí thå commanä <20>
|
||||
line.
|
||||
|
||||
Thå ^¤ commanä ió useä tï definå oò redefinå thå seô oæ <20>
|
||||
inpuô commanä parameters® Thå resô oæ thå linå followinç <20>
|
||||
thå ^¤ ió treateä aó á seô oæ parameteró separateä bù <20>
|
||||
blanks.
|
||||
|
||||
|
||||
Thå ^¿ anä ^¯ commandó replacå thå /Á anä /AÂ optionó <20>
|
||||
oæ SUB® ^¿ causeó ZEØ tï stoð processinç anä waiô foò thå <20>
|
||||
useò tï strikå eitheò thå spacå baò oò thå RETURÎ keù beforå <20>
|
||||
continuing® Thå useò caî takå hió timå anä examinå thå <20>
|
||||
display¬ and¬ iæ hå doeó noô wisè tï continue¬ á ^Ã wilì <20>
|
||||
aborô thå commanä stream® Thå ^¯ commanä ió likå ^?¬ buô iô <20>
|
||||
periodicallù ringó thå belì aô thå console¬ summoninç thå <20>
|
||||
useò iî aî alarí fashion.
|
||||
|
||||
Finally¬ thå ^¢ commanä causeó ZEØ tï stoð providinç <20>
|
||||
inpuô froí thå commanä streaí anä allo÷ thå useò tï inpuô <20>
|
||||
whateveò hå wisheó untiì á speciaì characteò ió output¬ aô <20>
|
||||
whicè timå ZEØ wilì resumå providinç input® Iî thió case¬ <20>
|
||||
ZEØ caî bå intimatelù linkeä witè ZCPR3¬ anä iô ió intendeä <20>
|
||||
thaô thå speciaì characteò thaô ZEØ ió waitinç foò ió <20>
|
||||
associateä witè thå ZCPR³ prompt® Iî mù case¬ É madå thå <20>
|
||||
ZCPR³ prompô tï bå á ">¢ characteò witè thå mosô significanô <20>
|
||||
biô set® Thió ió uniquå anä appearó onlù wheî thå prompô <20>
|
||||
comeó uð oî mù system.
|
||||
|
||||
Thå followinç exampleó illustratå applicationó <20>
|
||||
employinç them® Commentó appeaò ouô tï thå side¬ prefixeä <20>
|
||||
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ó <20>
|
||||
processeä bù SUÂ anä ZEX.
|
||||
|
||||
SUB Restrictions
|
||||
|
||||
1® Yoõ maù noô loç intï useò areaó otheò thaî thå onå <20>
|
||||
yoõ begaî processinç thå commanä filå in® Iæ yoõ do¬ ZCPR³ <20>
|
||||
looseó tracë oæ thå $$$.SUÂ filå anä executioî ió aborteä <20>
|
||||
untiì yoõ reenteò thå originaì useò area¬ aô whicè timå <20>
|
||||
executioî resumes.
|
||||
|
||||
2® Uð tï 2° parameteró arå permitteä oî thå SUÂ <20>
|
||||
commanä line.
|
||||
|
||||
3® Yoõ maù nesô SUÂ commanä fileó tï anù depth.
|
||||
|
||||
|
||||
|
||||
ZEX Restrictions
|
||||
|
||||
1® Yoõ maù movå intï anù directorù yoõ desirå whilå á <20>
|
||||
ZEØ commanä streaí ió beinç executed.
|
||||
|
||||
2® Uð tï ¹ parameteró arå permitteä oî thå ZEØ commanä <20>
|
||||
line.
|
||||
|
||||
3® Yoõ maù NOÔ nesô ZEØ commanä files.
|
||||
|
||||
|
||||
:2
|
||||
|
||||
Botè SUÂ anä ZEØ makå nicå Extendeä Commanä Processoró <20>
|
||||
undeò ZCPR3® Botè uså thå Externaì Patè anä Multiplå <20>
|
||||
Commanä Linå Buffeò Facilitieó oæ ZCPR3¬ anä ZEØ ió furtheò <20>
|
||||
prompteä foò inpuô bù thå ZCPR³ prompô iæ desired.
|
||||
|
||||
Tï refresè thå reader¬ anä Extendeä Commanä Processoò <20>
|
||||
ió á prograí invokeä bù ZCPR³ wheî iô failó tï finä thå <20>
|
||||
commanä alonç itó path® ZCPR3¬ upoî failinç tï finä thå COÍ <20>
|
||||
filå whicè correspondó tï thå commanä namå giveî tï it¬ caî <20>
|
||||
bå seô uð tï eitheò searcè thå patè oò gï directlù tï thå <20>
|
||||
rooô oæ thå patè anä looë foò aî Extendeä Commanä Processor® <20>
|
||||
Iæ found¬ ZCPR³ simulateó á commanä tï thaô Extendeä Commanä <20>
|
||||
Processor¬ substitutinç thå user'ó commanä linå aó thå <20>
|
||||
argumentó tï it.
|
||||
|
||||
To illustrate, consider the following example:
|
||||
|
||||
|
||||
MASM.ZEØ performó thå samå seô oæ commandó thaô M80.ZEØ <20>
|
||||
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å <20>
|
||||
Extendeä Commanä Processor¬ ZCPR³ lookó alonç thå patè foò <20>
|
||||
thå commanä MASM¬ failó tï finä it¬ anä theî simulateó thå <20>
|
||||
commanä "ZEØ MASÍ DEMO"® Thå abovå commanä filå ió theî <20>
|
||||
executeä witè DEMÏ aó itó passeä parameter.
|
||||
|
||||
|
||||
ZEX¬ oò anù otheò program¬ caî bå installeä aó aî <20>
|
||||
Extendeä Commanä Processoò bù renaminç iô tï CMDRUN.COM.
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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ï <20>
|
||||
simplù statå iæ thå twï fileó arå differenô (stoppinç <20>
|
||||
immediatelù afteò thå firsô differencå ió located© oò iô caî <20>
|
||||
lisô alì oæ thå differenceó betweeî twï fileó oî á byte-for-<2D>
|
||||
bytå basis.
|
||||
|
||||
|
||||
The form: DIFF dir:ufn o...
|
||||
|
||||
compareó thå filå iî thå indicateä directorù witè thå filå <20>
|
||||
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å <20>
|
||||
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î <20>
|
||||
ambiguouó filå namå (onå containinç wilä cards)® Botè filå <20>
|
||||
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ó <20>
|
||||
CRÃ valueó foò á lisô oæ files® Iô useó thå samå CRÃ <20>
|
||||
computatioî algorithí employeä bù Keitè Peterseî iî hió CRCË <20>
|
||||
program¬ anä thå valueó comå ouô thå same.
|
||||
|
||||
Thå CRÃ Checë Utilitù computeó thå CRÃ valueó oæ á <20>
|
||||
selecteä seô oæ fileó anä printó ouô thå filå names¬ theiò <20>
|
||||
sizeó (iî termó oæ Ë byteó anä numbeò oæ records)¬ anä theiò <20>
|
||||
CRÃ valueó iî hexadecimal® Á counô oæ thå numbeò oæ lineó <20>
|
||||
oæ codå (assuminç texô files© anä á commenô associateä witè <20>
|
||||
eacè filå caî bå optionallù included® Á lisô oæ ambiguouó <20>
|
||||
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ï <20>
|
||||
another® Thå CRÃ valueó oæ thå fileó caî bå computeä anä <20>
|
||||
listeä aô onå site¬ transferred¬ anä compareä aô thå otheò <20>
|
||||
site.
|
||||
|
||||
Thå Ì optioî addó thå utilitù oæ trackinç codå sizå iî <20>
|
||||
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
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
Binary file not shown.
@@ -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 ; <CR>
|
||||
LF EQU 10 ; <LF>
|
||||
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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user