home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ZSYS
/
SIMTEL20
/
INSTALL
/
Z3INS4.SQ
/
Z3INS4.SI
Wrap
Text File
|
2000-06-30
|
29KB
|
979 lines
5. S T E P 7 : S Y S T E M S E G M E N T S
Thσá selectioε oµ thσ configuratioε option≤ fo≥ thσá variou≤ ì
System Segments of ZCPR3 is described here in some detail.
5.1. Resident Command Packages
Thσá followinτá i≤ ß reformatteΣ duplicatσ oµ thσ bod∙ oµá ß ì
SYSRCP.LI┬á file«á I⌠á i≤ provideΣ herσá t∩á presen⌠á additiona∞ ì
informatioεá oε ho≈ t∩ se⌠ thσ equates«á I⌠ ma∙ bσ usefu∞ t∩ thσ ì
installe≥á t∩ havσ thi≤ installatioε manua∞ opeε t∩á thesσá page≤ ì
whilσ hσ i≤ editinτ thi≤ file.
EacΦáá entr∙á fo≥á thσá residen⌠á command≤á mention≤áá thei≥ ì
transien⌠ prograφ counterparts«á Thesσ utilitie≤ usuall∙ providσ ì
capabilitie≤á whicΦ exceeΣ thosσ oµ thσ program≤ iε thσá Residen⌠ ì
CommanΣ Package¼ bu⌠ thσ tradeofµ i≤ tha⌠ eacΦ utilit∙ prograφ i≤ ì
ßá separatσ filσ oε disδ whicΦ usuall∙ occupie≤ morσá disδá spacσ ì
thaε aε entirσ RCP«á Iε essence¼ thσ RC╨ command≤ providσ quick¼ ì
convenien⌠ capabilitie≤ t∩ thσ user¼á anΣ thσ transien⌠ utilitie≤ ì
providσá mucΦá greate≥ flexibilit∙ anΣ utilit∙ t∩ thσá user«á Iε ì
mos⌠ reasonablσ ZCPR│ Systems¼ botΦ facilitie≤ arσ available.
SYSTEM SEGMENT: SYS1.RCP
SYSTEM: ZCPR3
WRITTEN BY: RICHARD CONN
PROGRAM HEADER: SYSRCP.LIB
AUTHOR: RICHARD CONN
Thi≤á prograφ heade≥ select≤ thσ command≤ t∩ bσ incorporateΣ ì
int∩ SYS.RCP« I⌠ als∩ allow≤ selectioε oµ somσ option≤ fo≥ thesσ ì
commands.
IDENTIFICATION
Thσ followinτ I─ i≤ ß singlσ character¼á displayeΣ a≤ ß par⌠ ì
oµ thσ RC╨ ID¼ whicΦ distinguishe≤ thi≤ RC╨ froφ other≤ madσ froφ ì
thσ samσ basσ filσ (SYSRCP.ASM).
RCPID EQU 'A'
WitΦ thσ potentia∞ oµ severa∞ RCP≤ beinτ generateΣ froφ thi≤ ì
onσá file¼á RCPI─ i≤ usefu∞ iε identifyinτ whicΦ RC╨ i≤ currentl∙ ì
loadeΣ t∩ thσ user«á Thσ ╚ command¼ buil⌠ int∩ ever∙ RCP¼ print≤ ì
ou⌠ thσ versioε numbe≥ oµ thσ RCP¼ includinτ thσ RCPI─ character¼ ì
as well as the names of the commands contained within the RCP.
.paè
5.1.1. CP Command
TRANSIENT COUNTERPART: MCOPY
Thσá followinτ equatσ determine≤ iµ thσ C╨ commanΣá i≤á madσ ì
available« Settinτ thi≤ equatσ t∩ TRU┼ enable≤ thσ C╨ command.
Thσá C╨á commanΣ copie≤ onσ filσ froφ onσ D╒ t∩á anothe≥á o≥ ì
int∩ thσ samσ D╒ unde≥ ß differen⌠ name« Thσ synta° is:
CP dir:ufn=dir:ufn
Examples:
CP f1.txt=f2.txt
CP a15:=f1.txt
CP a15:f2.txt=c5:f1.txt
CPON EQU TRUE
5.1.2. DIR Command
TRANSIENT COUNTERPART: DIR, XD, XDIR
Thσá followinτ equatσ determine≤ iµ thσ DI╥ commanΣ i≤á madσ ì
available« Settinτ thi≤ equatσ t∩ TRU┼ enable≤ thσ DI╥ command.
Thσáá DI╥á commanΣá display≤á thσá director∙á oµá file≤áá iε ì
alphabetica∞ orde≥ acros≤ thσ line≤ t∩ thσ user« Thσ synta° is:
DIR dir:afn
Examples:
DIR b7:
DIR root:*.com
DIRON EQU FALSE
Thσ DI╥ commanΣ allow≤ tw∩ options«á Onσ i≤ ß flaτ t∩á tel∞ ì
i⌠ t∩ looδ a⌠ botΦ Systeφ anΣ Non-Systeφ files¼á anΣ thσ othe≥ i≤ ì
ß flaτ t∩ tel∞ i⌠ t∩ looδ onl∙ a⌠ Systeφ files«á B∙ default¼ DI╥ ì
look≤ a⌠ Non-Systeφ files.
SYSFL╟ define≤ thσ characte≥ useΣ t∩ instruc⌠ DI╥ t∩ looδ a⌠ ì
botΦá Systeφ anΣ Non-Systeφ files«á Thσ recommendeΣ valuσ i≤ 'Aº ì
fo≥ All.
SOFL╟ define≤ thσ characte≥ useΣ t∩ instruc⌠ DI╥ t∩ looδá a⌠ ì
onl∙ Systeφ files« Thσ recommendeΣ valuσ i≤ 'Sº fo≥ System.
SYSFLG EQU 'A'
SOFLG EQU 'S'
.paè
Thσá followinτá equatσ determine≤ iµ thσ director∙á display≤ ì
arσ sorteΣ b∙ filenamσ anΣ filetypσ o≥ b∙ filetypσ anΣá filename« ì
Se⌠á SORTN╘á t∩ TRU┼ t∩ sor⌠ b∙ namσ anΣ type¼á FALS┼ t∩ sor⌠á b∙ ì
typσ anΣ name.
SORTNT EQU TRUE
Thσ followinτ equate≤ definσ somσ feature≤ oµ thσá director∙ ì
display«á Iµá WID┼á i≤ TRUE¼á thσ filσ name≤ arσ spaceΣá farthe≥ ì
abort╗á iµá WID┼ i≤ FALSE¼á the∙ arσ close≥ togethe≥ (fo≥á ßá 64-ì
columεá display)«á FENC┼ define≤ thσ characte≥ useΣ t∩á separatσ ì
thσ filσ namσ entrie≤ iε thσ display.
WIDE EQU TRUE
FENCE EQU '|'
5.1.3. ERA Command
TRANSIENT COUNTERPART: ERASE
Thσá followinτ equatσ determine≤ iµ thσ ER┴ commanΣ i≤á madσ ì
available« Settinτ thi≤ equatσ t∩ TRU┼ enable≤ thσ ER┴ command.
The ERA command erases files. The syntax is:
ERA dir:afn
or:
ERA dir:afn I -- Inspect
Examples:
ERA b7:*.bak
ERA text:*.tmp i
ERAON EQU TRUE
.paè
5.1.4. LIST and TYPE Commands
TRANSIENT COUNTERPART: PRINT and PAGE
Thσá followinτá equatσá determine≤á iµá thσá LIS╘á anΣá TYP┼ ì
command≤ arσ madσ available« Settinτ thi≤ equatσ t∩ TRU┼ enable≤ ì
thesσ commands.
Thσá LISTO╬á equatσá caε disablσ thσá LIS╘á commanΣá withou⌠ ì
affectinτ thσ TYP┼ command.
Thσá TYP┼ commanΣ display≤ ß grou≡ oµ file≤ oε thσ CR╘ whilσ ì
thσá LIS╘ commanΣ print≤ ß grou≡ oµ file≤ oεá thσá Printer«á Thσ ì
synta° is:
TYPE dir:afn -or- LIST dir:afn
Examples:
TYPE b7:*.asm
LIST text:*.txt
LTON EQU TRUE
LISTON EQU TRUE
TYP┼ caε bσ madσ t∩ pagσ o≥ no⌠ pagσ b∙ default«á Iµ PGDFL╘ ì
i≤á TRUE¼á TYP┼á page≤ b∙ defaul⌠ anΣ doe≤ no⌠ pagσ iµ thσá PGFL╟ ì
characte≥ (recommendeΣ t∩ bσ 'P'⌐ i≤ used«á Iµ PGDFL╘ i≤á FALSE¼ ì
TYP┼á page≤ onl∙ wheε thσ PGDFL╟ characte≥ i≤ seeε iε thσ commanΣ ì
line.
PGDFLT EQU TRUE
PGDFLG EQU 'P'
NLINE╙ define≤ thσ numbe≥ oµ line≤ oε thσ user'≤ CR╘ screen« ì
Thi≤ i≤ usuall∙ 24.
NLINES EQU 24
.paè
5.1.5. PEEK and POKE Commands
TRANSIENT COUNTERPART: None (Subset of DDT)
Thσá followinτá equate≤á determinσá iµá thσá PEE╦á anΣá POK┼ ì
command≤á arσá madσá available«á Settinτ thesσ equate≤á t∩á TRU┼ ì
enable≤ thesσ commands.
Thσá PEE╦á commanΣá allow≤ thσ use≥ t∩ examinσá ßá chunδá oµ ì
memory«á Iµ thσ use≥ simpl∙ type≤ "Pó witΦ n∩ address¼á thσ nex⌠ ì
25╢á byte≤á oµá memor∙á arσ displayed«á Iµá thσá use≥á type≤á "╨ ì
address"¼á 25╢ byte≤ oµ memor∙ startinτ a⌠ thσ indicateΣá addres≤ ì
arσ displayed« Iµ thσ use≥ type≤ "╨ addr▒ addr2"¼ memor∙ iε thi≤ ì
addres≤ rangσ i≤ displayed« Thσ syntax:
P
or:
P address
or:
P addr1 addr2
Thσá POK┼ commanΣ allow≤ thσ use≥ t∩ changσ thσá conten⌠á oµ ì
memory«á Thσ use≥ mus⌠ specif∙ aε addres≤ t∩ POKE¼ anΣ tw∩ basiπ ì
form≤ arσ allowed:
POKE address val1 val2 ... valn
and:
POKE address "character string
Thσá tw∩á form≤á ma∙á bσ intermixeΣ witΦá leadinτá value≤á anΣá ß ì
trailinτ characte≥ string:
POKE address val1 val2 ... valn "character string
Examples:
P
P f400
P f400 f425
POKE f400 0 1 2
POKE f400 "this is a test
POKE f400 1 2 3 "hello, world
PEEKON EQU TRUE
POKEON EQU TRUE
.paè
5.1.6. PROT Command
TRANSIENT COUNTERPART: PROTECT
Thσá followinτ equatσ determine≤ iµ thσ PRO╘ commanΣ i≤ madσ ì
available« Settinτ thi≤ equatσ t∩ TRU┼ enable≤ thσ PRO╘ command.
Thσá PRO╘ commanΣ set≤ thσ filσ protectioε attribute≤ fo≥á ß ì
grou≡á oµ files«á Thσ R/╧ anΣ Systeφ attribute≤ ma∙ bσ se⌠á witΦ ì
thσá ╥ anΣ ╙ options¼á resp¼á giveε iε an∙ orde≥ a≤ "RSó o≥ "SR"« ì
Omissioεá oµá onσá oµ thesσ option≤á toggle≤á thσá oppositσá (ie¼ ì
omissioε oµ ╥ make≤ thσ file≤ R/W)« Thσ syntax:
PROT dir:afn
or:
PROT dir:afn R
or:
PROT dir:afn S
or:
PROT dir:afn RS -or- PROT dir:afn SR
Examples:
PROT b7:*.com rs
PROT text:*.txt
PROTON EQU TRUE
5.1.7. REN Command
TRANSIENT COUNTERPART: RENAME
Thσá followinτ equatσ determine≤ iµ thσ RE╬ commanΣ i≤á madσ ì
available« Settinτ thi≤ equatσ t∩ TRU┼ enable≤ thσ RE╬ command.
Thσá RE╬á commanΣ change≤ thσ namσ oµ onσ filσá t∩á another« ì
Thσ syntax:
REN dir:ufn1=ufn2
Examples:
REN newfile.txt=oldfile.txt
REN root:sys.rcp=sys1.rcp
RENON EQU TRUE
.paè
5.1.8. REG Command
TRANSIENT COUNTERPART: REG
Thσá followinτ equatσ determine≤ iµ thσ RE╟ commanΣ i≤á madσ ì
available« Settinτ thi≤ equatσ t∩ TRU┼ enable≤ thσ RE╟ command.
The REG command forms are:
REG D or REG = display values of all registers
REG Mreg = subtract 1 from register (Minus)
REG Preg = add 1 to register (Plus)
REG Sreg value = set value of indicated register
┴ registe≥ i≤ ß ZCPR│ registe≥ buffer¼á indicateΣ b∙ ß digi⌠ ì
froφ ░ t∩ 9.
Examples:
REG S0 4 -- reg 0 = 4
REG S5 -- reg 5 = 0
REG P -- reg 0 = reg 0 + 1
REG P5 -- reg 5 = reg 5 + 1
REG M9 -- reg 9 = reg 9 - 1
REG D -- show values
REG -- show values
REGON EQU FALSE
5.1.9. WHL Command
TRANSIENT COUNTERPART: WHEEL
Thσá followinτ equatσ determine≤ iµ thσ WH╠ commanΣ i≤á madσ ì
available« Settinτ thi≤ equatσ t∩ TRU┼ enable≤ thσ WH╠ command.
Thσ WH╠ commanΣ i≤ useΣ t∩ turε ofµ thσ Whee∞ Bytσ (makσ thσ ì
use≥ non-priveleged⌐ o≥ t∩ turε oε thσ Whee∞ Bytσ (makσ thσá use≥ ì
priveleged)« Thσ synta° is:
WHL -- make user non-priveleged
or:
WHL password -- make user priveleged
Also¼á thi≤ equatσ enable≤ thσ WHL╤ command¼á whicΦ display≤ ì
thσ statσ oµ thσ Whee∞ Byte« Thσ synta° is:
WHLQ
Examples:
WHL
WHL mypass
WHLQ
WHLON EQU FALSE
è
Thσá followinτ equatσ define≤ thσ passworΣ t∩ bσ useΣ b∙ thσ ì
WH╠á command«á I⌠ mus⌠ alway≤ bσ ╕ byte≤ lonτá (trailinτá space≤ ì
allowed⌐ anΣ mus⌠ bσ upper-case.
WPASS MACRO
DB 'SYSTEM ' ;8 characters
ENDM
Thσ Whee∞ equatσ tablσ enable≤ thσ WHEE╠ facilit∙ oµá ZCPR3« ì
WitΦá thi≤á facility¼á ß WHEE╠ BYTE¼á whicΦ exist≤á somewherσá iε ì
memory¼á i≤á examineΣ beforσ ß se⌠ oµ installer-selecteΣ command≤ ì
arσá executed«á Iµá thi≤á bytσ i≤ no⌠á zero¼á theεá thσá commanΣ ì
proceeds«á Iµá i⌠ i≤ zero¼á theε thσ commanΣ i≤ no⌠á alloweΣá t∩ ì
proceeΣ anΣ i≤ exiteΣ witΦ aε erro≥ message.
Thσá followinτá se⌠ oµ equate≤ makσ eacΦá oµá thσá indicateΣ ì
command≤á selectablσá t∩ responΣ t∩ thσ Whee∞ Bytσ o≥á not«á Fo≥ ì
instance¼á iµ WERA=TRUE¼á theε i⌠ respond≤ t∩ thσ Whee∞ Byte╗á iµ ì
WERA=FALSE¼ i⌠ doe≤ not.
Thesσá option≤á wil∞á onl∙ bσ effectivσ iµ ß Whee∞á Bytσá i≤ ì
DefineΣ (Z3WH╠ N┼ 0)
WCP equ FALSE ;Make CP a Wheel-Oriented Command
WDIR equ FALSE ; " DIR " " " "
WERA equ FALSE ; " ERA " " " "
WLIST equ FALSE ; " LIST " " " "
WPEEK equ FALSE ; " PEEK " " " "
WPOKE equ FALSE ; " POKE " " " "
WPROT equ FALSE ; " PROT " " " "
WREG equ FALSE ; " REG " " " "
WREN equ FALSE ; " REN " " " "
WTYPE equ FALSE ; " TYPE " " " "
WHEEL set WCP OR WDIR OR WERA OR WLIST OR WPEEK OR WPOKE
WHEEL set WHEEL OR WPROT OR WREG OR WREN OR WTYPE
.paè
5.1.10. NOTE Command
TRANSIENT COUNTERPART: NOTE
NOT┼á i≤ simpl∙ ß NO╨ (d∩ nothing⌐ commanΣ whicΦ caε bσ useΣ ì
t∩ placσ comment≤ int∩ multiplσ commanΣ lines«á Fo≥ instance¼ iε ì
thσ followinτ line:
dir *.com;note this is a dir display;era *.bak
thσ DI╥ anΣ ER┴ command≤ perforφ normally¼á anΣ NOT┼ simpl∙á doe≤ ì
nothinτ ver∙ efficiently.
Settinτá thσá followinτá equatσá t∩ TRU┼á enable≤á thσá NOT┼ ì
Command.
NOTEON EQU TRUE
Thσá NOT┼á commanΣá i≤ ver∙ convenien⌠ iεá thσá creatioεá oµ ì
commenteΣáá display≤á anΣá commanΣá files«áá I⌠áá i≤áá generall∙ ì
recommendeΣá t∩á implemen⌠á thi≤ commanΣ a≤á ßá residen⌠á commanΣ ì
withiεá thσ ZCPR│ CommanΣ Processo≥ itselµ rathe≥ thaε withiεá aε ì
RC╨á sincσ thσ ZCPR│ CommanΣ Processor≤ tenΣ t∩ havσ morσ rooφ t∩ ì
sparσá thaε RCP≤ anΣ i⌠ i≤ frequentl∙ desirablσ t∩ savσá a≤á mucΦ ì
space within an RCP as possible.
5.1.11. ECHO Command
TRANSIENT COUNTERPART: ECHO
The following equate enables the ECHO command.
ECH╧á i≤ usefu∞ iε issuinτ botΦ message≤ (t∩ thσá user¼á sa∙ ì
withiεá ßá commanΣ filσ durinτ execution⌐ anΣá escapσá sequences« ì
ECH╧á caε senΣ it≤ outpu⌠ t∩ thσ consolσ (b∙ default⌐ o≥á t∩á thσ ì
printe≥ (iµ thσ firs⌠ non-blanδ characte≥ i≤ ß dolla≥ sign)«á I⌠ ì
use≤á BIO╙ calls¼á s∩ al∞ contro∞ character≤ arσ passeΣá exactly« ì
Hence¼á console-leve∞á programminτá oµá sucΦá device≤á (CRT≤á anΣ ì
Printers⌐ i≤ possible.
Thσá ECHOLS╘ equatσ determine≤ iµ ECH╧ i≤ alloweΣ t∩á direc⌠ ì
it≤ outpu⌠ t∩ thσ printer«á Iµ ECHOLS╘ i≤ TRUE¼á ECH╧ ma∙ direc⌠ ì
it≤ outpu⌠ t∩ thσ printe≥ viß thσ ñ prefi° characte≥ iε thσ text.
ECHOON EQU TRUE
ECHOLST EQU TRUE
Thσá ECH╧ transien⌠ i≤ no⌠ ver∙ large¼á anΣ i⌠ i≤ frequentl∙ ì
morσá convenien⌠ t∩ havσ ECH╧ implementeΣ iεá aεá RCP«á However¼ ì
sincσá spacσá withiε RCP≤ i≤ frequentl∙ a⌠ ß premium¼á i⌠ ma∙á bσ ì
necessar∙ t∩ emplo∙ thσ ECH╧ transient.
.paè
5.2. Flow Command Packages
Thσá followinτá i≤ ß reformatteΣ duplicatσ oµ thσ bod∙ oµá ß ì
SYSFCP.LI┬á file«á I⌠á i≤ provideΣ herσá t∩á presen⌠á additiona∞ ì
informatioεá oε ho≈ t∩ se⌠ thσ equates«á I⌠ ma∙ bσ usefu∞ t∩ thσ ì
installe≥á t∩ havσ thi≤ installatioε manua∞ opeε t∩á thesσá page≤ ì
whilσ hσ i≤ editinτ thi≤ file.
┴ ke∙ decisioε t∩ bσ madσ iε thσ creatioε oµ FCP≤ i≤ whethe≥ ì
t∩á implemen⌠á thσá I╞ commanΣ a≤ ß CO═ filσ o≥á withiεá thσá FC╨ ì
itself. The following tradeoff should be considered:
1⌐á A≤á ß CO═ file¼á thσ I╞ commanΣá offer≤á man∙á morσ ì
option≤á anΣá flexibilit∙ fo≥ conditioε processinτ thaεá aεá FCP-ì
resident IF.
2⌐á A≤á ßá CO═ file¼á thσ I╞ commanΣ add≤á overheaΣá b∙ ì
having to be located and loaded from disk and then executed.
Iεá thσá followinτ text¼á section≤ 5.2.▒ t∩ 5.2.1▒á describσ ì
option≤ fo≥ aε FCP-residen⌠ I╞ command«á IF.CO═ contain≤ al∞á oµ ì
thesσá option≤á anΣ more«á Refe≥ t∩ thσ associateΣ HL╨ filσá fo≥ ì
morσ detail.
SYSTEM SEGMENT: SYS1.FCP
SYSTEM: ZCPR3
CUSTOMIZED BY: RICHARD CONN
PROGRAM HEADER: SYSFCP.LIB
AUTHOR: RICHARD CONN
Thi≤á prograφ heade≥ define≤ thσ I╞ Condition≤ t∩ bσá placeΣ ì
int∩áá thσáá targe⌠áá SYS.FC╨á filσá (generateΣáá b∙áá assemblinτ ì
SYSFCP.ASM).
5.2.1. IF Negation
Thσ followinτ equatσ determine≤ iµ leadinτ negatioε i≤ t∩ bσ ì
allowed«á Iµ thi≤ equatσ i≤ TRUE¼á theε form≤ likσ thσ followinτ ì
arσ permitted:
IF ~EXIST filename.typ
meaninτ t∩ complemen⌠ thσ meaninτ oµ thσ tes⌠ (thσ abovσá return≤ ì
TRU┼ iµ filename.ty≡ doe≤ NO╘ exist).
IFONEG EQU TRUE
.paè
Assuminτ IFONE╟ t∩ bσ TRUE¼ thσ followinτ equatσ define≤ thσ ì
characte≥ t∩ bσ placeΣ iε fron⌠ oµ thσ I╞ optioε t∩ indicatσ tha⌠ ì
negatioεá i≤á t∩á bσá performed«á Iεá thσá abovσá example¼á thi≤ ì
characte≥ wa≤ tildσ (~).
NEGCHAR EQU '~'
5.2.2. IF: T (True) or F (False)
Settinτá thσá followinτ equatσ t∩ TRU┼ enable≤ thσ simplσá ╘ ì
anΣ ╞ option≤ t∩ IF« Thσ forma⌠ oµ thi≤ optioε is:
IF T or IF F
and it always returns TRUE or FALSE, resp.
IFOTRUE EQU FALSE
5.2.3. IF: EM (Empty)
Settinτá thσ followinτ equatσ t∩ TRU┼ enable≤ I╞ t∩ tes⌠á t∩ ì
seσá iµ thσ indicateΣ filσ i≤ empt∙ o≥ not«á Thσ forma⌠ oµá thi≤ ì
optioε is:
IF EM dir:filename.typ
anΣá i⌠ return≤ TRU┼ iµ thσ indicateΣ filσ doe≤ no⌠ exis⌠á o≥á i≤ ì
empty.
IFOEMPTY EQU FALSE
5.2.4. IF: ER (Error)
Settinτá thσ followinτ equatσ t∩ TRU┼ enable≤ I╞ t∩ tes⌠ thσ ì
erro≥ codσ bytσ (prograφ erro≥ codσ byte)« Iµ thi≤ bytσ i≤ ░ (n∩ ì
error)¼á i⌠ return≤ TRUE¼á elsσ i⌠ return≤ FALSE«á Thσ forma⌠ oµ ì
thi≤ optioε is:
IF ER
IFOERROR EQU TRUE
.paè
5.2.5. IF: EX (Exist)
Settinτ thσ followinτ equatσ t∩ TRU┼ enable≤ I╞ t∩ tes⌠á fo≥ ì
thσ existencσ oµ ß file« Thσ forma⌠ oµ thi≤ optioε is:
IF EX dir:filename.typ
and it returns TRUE if the indicated file exists.
IFOEXIST EQU TRUE
5.2.6. IF: IN (Input)
Settinτá thσ followinτ equatσ t∩ TRU┼ enable≤ use≥ inpu⌠á oµ ì
thσá characte≥á ╘á (o≥á an∙á othe≥á characte≥á fo≥á FALSE)«á ZE╪ ì
processinτá i≤á suspendeΣ fo≥ thi≤ single-characte≥á input«á Thσ ì
forma⌠ oµ thi≤ optioε is:
IF IN
and the IF FCP command responds with:
IF True?
t∩ whicΦ thσ use≥ type≤ T¼á Y¼ SPACE¼ o≥ C╥ t∩ se⌠ thσ I╞ t∩ TRU┼ ì
anΣ anythinτ elsσ t∩ se⌠ thσ I╞ t∩ FALSE.
IFOINPUT EQU TRUE
5.2.7. IF: NU (Null)
Settinτá thσ followinτ equatσ t∩ TRU┼ enable≤ I╞ t∩ tes⌠á t∩ ì
seσ iµ thσ seconΣ argumen⌠ whicΦ follow≤ i≤ NUL╠ (no⌠á specified⌐ ì
o≥á not«á Thi≤á tes⌠á i≤á particularl∙ usefu∞á iεá commanΣá filσ ì
processinτá t∩ seσ if¼á fo≥ example¼á argumen⌠ $▓ exist≤á anΣá t∩ ì
includσ i⌠ iµ i⌠ does« Thσ forma⌠ oµ thi≤ optioε is:
IF NU
or:
IF NU arg
Iµ thσ firs⌠ forma⌠ i≤ encountered¼á I╞ N╒ return≤ TRUE╗á I╞ ì
N╒ return≤ FALS┼ witΦ thσ seconΣ format.
IFONULL EQU TRUE
.paè
5.2.8. IF: n (Register Value)
Settinτá thσ followinτ equatσ t∩ TRU┼ enable≤ I╞ t∩ tes⌠á t∩ ì
seσá iµ thσ indicateΣ registe≥ contain≤ thσ indicateΣ value«á Iµ ì
thi≤á i≤ preceedeΣ b∙ thσ NEGCHA╥ anΣ IFONE╟ i≤ TRUE¼á theεá thi≤ ì
test≤á t∩á seσá iµ thσ indicateΣ registe≥ doe≤á no⌠á contaiεá thσ ì
indicateΣ value«á Register≤ arσ one-bytσ memor∙ buffers¼ anΣ arσ ì
identifieΣ b∙ thσ digit≤ ░ t∩ 9« Thσ forma⌠ oµ thi≤ optioε is:
IF n val
Example:
IF 0 -- if Reg 0 = 0
IF 0 5 -- if Reg 0 = 5
IF 5 2 -- if Reg 5 = 2
IF ~0 -- if Reg 0 <> 0
IF ~9 2 -- if Reg 9 <> 2
IFOREG EQU TRUE
Thσá RE╟ commanΣ (implementeΣ eithe≥ withiε aε RC╨ o≥á a≤á ß ì
CO═á file⌐ i≤ useΣ t∩ placσ value≤ int∩ thesσ registe≥ anΣ modif∙ ì
anΣ displa∙ thesσ values.
5.2.9. IF: WH (Wheel)
Settinτá thσ followinτ equatσ t∩ TRU┼ enable≤ I╞ t∩ tes⌠á t∩ ì
seσ iµ thσ Whee∞ Bytσ i≤ se⌠ o≥ not« Iµ so¼ I╞ WHEE╠ i≤ TRUE.
IFOWHEEL EQU FALSE
5.2.10. IF: TC (TCAP)
Settinτá thσ followinτ equatσ t∩ TRU┼ enable≤ I╞ t∩ tes⌠á t∩ ì
seσá iµá thσ ZCPR│ TCA╨ contain≤ ß termina∞á definitioεá o≥á not« ì
Thi≤á tes⌠á i≤á particularl∙á usefu∞ iεá commanΣá filσá o≥á alia≤ ì
processinτ t∩ seσ if¼á fo≥ example¼ ß Z3TCA╨ entr∙ i≤ defineΣ anΣ ì
t∩ invokσ screen-orienteΣ routine≤ iµ i⌠ is«á Thσ forma⌠ oµ thi≤ ì
optioε is:
IF TC
IFOTCAP EQU FALSE
.paè
5.2.11. IF: fcb1=fcb2
Settinτá thi≤ equatσ t∩ TRU┼ wil∞ enablσ I╞ t∩ evaluatσá thσ ì
equalit∙ condition¼á checkinτ t∩ seσ iµ thσ tw∩ FCB≤ contaiεá thσ ì
samσ values« Iµ so¼ thσ I╞ i≤ TRUE╗ iµ not¼ thσ I╞ i≤ FALSE.
Enablinτá thi≤ equatσ eliminate≤ thσ neeΣ fo≥ thσ NUL╠ test¼ ì
sincσ ß NUL╠ tes⌠ caε bσ performeΣ b∙ usinτ thσ syntax:
IF fcb1=
IFOEQ EQU TRUE
5.2.12. COMIF - Run IF.COM
Settinτ thi≤ equatσ t∩ TRU┼ wil∞ causσ aε I╞ executeΣ durinτ ì
aεá I╞ TRU┼ o≥ N╧ I╞ statσ t∩ looδ iε thσ ROO╘ director∙ (basσ oµ ì
patΦ startinτ iε curren⌠ directory⌐ fo≥ thσ filσ IF.COM¼á and¼ iµ ì
found¼á loaΣ IF.CO═ anΣ transfe≥ contro∞ t∩ it« Iµ IF.CO═ i≤ no⌠ ì
found¼á theεá I╞ ╞ i≤ raised«á Usinτ IF.CO═ provide≤á mucΦá morσ ì
powe≥á anΣ flexibilit∙ bu⌠ als∩ require≤ IF.CO═ t∩ bσ presen⌠ anΣ ì
take≤ u≡ disδ space.
COMIF EQU FALSE
5.2.13. NOISE - Have FCP Print IF Status Messages
Settinτ thi≤ equatσ t∩ TRU┼ wil∞ causσ an∙ changσ iε thσá I╞ ì
statu≤á t∩ bσ printeΣ t∩ thσ user«á Thi≤ i≤ usefu∞ fo≥ debugginτ ì
purposes¼á bu⌠á iε norma∞ runs¼á particularl∙ wherσá ALIASe≤á arσ ì
concerned¼á i⌠ i≤ usuall∙ desirablσ t∩ reducσ thσ "noiseó a≤ mucΦ ì
a≤ possiblσ anΣ havσ thi≤ equatσ se⌠ t∩ FALSE.
NOISE EQU FALSE
.paè
5.3. Input/Output Packages
Input/Outpu⌠ Package≤ arσ ver∙ machine-specific¼á but¼á likσ ì
al∞ packages¼ the∙ providσ ß machine-independen⌠ interfacσ t∩ thσ ì
ZCPR│ Systeφ iε thei≥ visiblσ sections« Thσ hiddeε par⌠ perform≤ ì
thσ actua∞ implementatioε oµ thσ routines« Likσ thσ structurσ oµ ì
thσ BIOS¼ thσ visiblσ sectioε oµ aε I/╧ Packagσ consist≤ oµ ß JM╨ ì
table.
Thσáá installe≥áá wh∩áá i≤áá interesteΣáá iεáá incorporatinτ ì
Input/Outpu⌠á Package≤á int∩á thσá systeφá hσá i≤á installinτá i≤ ì
referreΣá t∩ thσ sourcσ codσ filσ SYSIOP.ASM«á SYSIOP.AS═ caε bσ ì
useΣá a≤ ß templatσ througΦ whicΦ t∩ creatσ othe≥á I/╧á Packages« ì
I⌠áá i≤á filleΣá witΦá comment≤á outlininτá thσá function≤á beinτ ì
performed¼ anΣ ╔ fee∞ tha⌠ thi≤ shoulΣ bσ adequate.
5.4. Named Directory Files
Thσá followinτ i≤ ß reformatteΣ duplicatσ oµ thσ bod∙á oµá ß ì
SYSNDR.LI┬á file«á I⌠á i≤á provideΣ herσ t∩á presen⌠á additiona∞ ì
informatioε oε ho≈ t∩ se⌠ thσ equates«á I⌠ ma∙ bσ usefu∞ t∩á thσ ì
installe≥á t∩á havσ thi≤ installatioε manua∞ opeε t∩ thesσá page≤ ì
whilσ hσ i≤ editinτ thi≤ file.
DATA FILE: SYSNDR.LIB
AUTHOR: Richard Conn
VERSION: 1.0
DATE: 24 Feb 84
SYSNDR.LI┬á define≤ thσ structurσ oµ thσ memory-baseΣá nameΣ ì
directory« I⌠ als∩ define≤ ß fe≈ element≤ fo≥ i⌠ anΣ i≤ suitablσ ì
fo≥ enclosurσ iε aε ND╥ file.
The general structure is:
DB Disk,User ; A=1
DB 'NDIRNAME' ; 8 chars
DB 'PASSWORD' ; 8 chars
... ; other entries
DB 0 ; End of NDR
defdu macro ?disk,?user
db ?disk-'@' ; Convert Disk
db ?user ; User is OK
endm
FIG 5-1: Named Directory Structure
.paè
Thσ entirσ filσ i≤ implementeΣ a≤ onσ macr∩ (whicΦ follows)« ì
The SYSNDR.ASM file simply refers to this macro and expands it.
Thσ nameΣ directorie≤ showε belo≈ arσ recommendeΣ standards« ì
Iεá time¼á therσá wil∞ bσ utilitie≤ whicΦ basσ ßá par⌠á oµá thei≥ ì
operations on these names.
sysndr macro
Thσá BAS┼á director∙ i≤ ß workinτ scratcΦ areß oε thσá firs⌠ ì
disk.
defdu 'A',0
db 'BASE '
db ' '
Thσá ROO╘ director∙ i≤ thσ las⌠ director∙ referenceΣ iεá thσ ì
CommanΣá SearcΦ Path«á Thi≤ i≤ wherσ al∞ oµ thσá general-purposσ ì
COM files are located.
defdu 'A',15
db 'ROOT '
db ' '
Thσá HEL╨ director∙ i≤ wherσ thσ onlinσ documentatioεá file≤ ì
are stored.
defdu 'A',16
db 'HELP '
db ' '
Thσá BACKU╨á director∙á i≤ wherσ file≤á arσá copieΣá t∩á (b∙ ì
default) for backup purposes.
defdu 'C',0
db 'BACKUP '
db ' '
db 0 ;End of List
endm
.paè
5.5. TCAP Files
Thσá program≤á TCSELEC╘á anΣ TCMAK┼ arσ useΣ t∩á creatσá thσ ì
*.Z3╘ file≤ whicΦ arσ loadeΣ b∙ thσ LDR.CO═ utility«á Thσ loadeΣ ì
filσ establishe≤ thσ characteristic≤ oµ thσ user'≤ CR╘á terminal¼ ì
anΣá thi≤ informatioε i≤ useΣ b∙ screen-orienteΣ utilities¼á sucΦ ì
as SHOW, to perform their functions.
5.6. Environment Descriptor
Thσá followinτ i≤ ß reformatteΣ duplicatσ oµ thσ bod∙á oµá ß ì
SYSENV.LI┬á file«á I⌠á i≤á provideΣ herσ t∩á presen⌠á additiona∞ ì
informatioε oε ho≈ t∩ se⌠ thσ equates«á I⌠ ma∙ bσ usefu∞ t∩á thσ ì
installe≥á t∩á havσ thi≤ installatioε manua∞ opeε t∩ thesσá page≤ ì
whilσ hσ i≤ editinτ thi≤ file.
Thσá entirσá filσá i≤á onσá macr∩á whicΦá i≤á referenceΣá b∙ ì
SYSENV.ASM«á SYSEN╓ insert≤ ß JM╨ ░ instructioε iε fron⌠ oµ thi≤ ì
macro to complete the structure of the SYS.ENV file.
LIBRARY: SYSENV.LIB
AUTHOR: Richard Conn
Version: 1.0
Date: 18 May 84
Previous Versions: None
SYSENV is the definition for my ZCPR3 environment.
sysenv macro
;
; Environment Descriptor
; If inline, there is a leading JMP just before this
;
envorg1:
db 'Z3ENV' ; Environment ID
db 1 ; class 1 environment (external)
┴á Clas≤ ▒ environmen⌠ i≤ externa∞ t∩ thσ utilit∙ usinτá it« ì
Thi≤á typσá oµá Environmen⌠ Descripto≥ i≤á locateΣá a⌠á ßá buffe≥ ì
somewherσ iε memory¼á anΣ thσ ZCPR│ utilitie≤ simpl∙ contaiε ß 2-ì
bytσá pointe≥ whicΦ contain≤ it≤ address«á ┴ Clas≤ ▓ environmen⌠ ì
i≤á interna∞ t∩ thσ utilit∙ usinτ it«á Thi≤ typσ oµá Environmen⌠ ì
Descripto≥á i≤ locateΣ withiε thσ utilit∙ itself¼á takinτ u≡á 25╢ ì
bytes«á I⌠á i≤ recommendeΣ tha⌠ thσ ZCPR│ Systeφá bσá configureΣ ì
usinτ aε externa∞ Environmen⌠ Descriptor.
.paè
Thσá followinτá addresse≤á anΣá value≤á arσá extracteΣá froφ ì
Z3BASE.LIB.
dw expath ; external path address
db expaths ; number of 2-byte elements in path
dw rcp ; RCP address
db rcps ; number of 128-byte blocks in RCP
dw iop ; IOP address
db iops ; number of 128-byte blocks in IOP
dw fcp ; FCP address
db fcps ; number of 128-byte blocks in FCP
dw z3ndir ; NDR address
db z3ndirs ; number of 18-byte entries in NDR
dw z3cl ; ZCPR3 Command Line
db z3cls ; number of bytes in Command Line
dw z3env ; ZCPR3 Environment Descriptor
db z3envs ; number of 128-byte blocks
dw shstk ; Shell Stack address
db shstks ; number of shsize-byte entires
db shsize ; size of a Shell Stack entry
dw z3msg ; ZCPR3 Message buffer
dw extfcb ; ZCPR3 External FCB
dw extstk ; ZCPR3 External Stack
Thσ followinτ flaτ i≤ useΣ b∙ somσ ZCPR│ Systeφ utilitie≤ t∩ ì
determinσá ho≈á verbosσá the∙á arσá iεá providinτá message≤áá anΣ ì
informatioεá t∩ thσ user«á Thσ QUIET.CO═ utilit∙ caε bσ useΣá t∩ ì
change this flag dynamically.
db 0 ; quiet flag (1=quiet, 0=not quiet)
dw z3whl ; address of Wheel Byte
This data value is used by the timing routines.
db 4 ; Processor Speed in MHz
Thσá followinτ value≤ shoulΣ corresponΣ t∩ thosσ selecteΣ iε ì
the Z3HDR.LIB file.
db 'D'-'@' ; maximum disk
db 31 ; maximum user
.paè
Thσá followinτ valuσ i≤ useΣ t∩ instruc⌠ thσ utilitie≤ a≤ t∩ ì
whethe≥ the∙ shoulΣ accep⌠ thσ D╒ forφ o≥ not«á Iµ disableΣ (se⌠ ì
t∩á 0)¼á thσá onl∙ wa∙ t∩ referencσ ß director∙ i≤ witΦá thσá DI╥ ì
(named⌐á form¼á anΣ passworΣ protectioε i≤ directl∙á provideΣá b∙ ì
this.
db 1 ; 1=OK to accept DU, 0=not OK
Somσá ZCPR│á utilities¼áá sucΦá a≤á PRIN╘á anΣá PAGE¼áá dra≈ ì
informatioεáá froφáá thesσá buffer≤á t∩á determinσá severa∞áá ke∙ ì
attribute≤á oµá thσ device≤ the∙ arσá dealinτá with«á Thσá CPSE╠ ì
utilit∙á caεá bσ useΣ t∩ dynamicall∙ changσ thσ CR╘á anΣá Printe≥ ì
selections.
db 0 ; CRT selection (0=CRT 0, 1=CRT 1)
db 0 ; Printer selection (n=Printer n)
db 80 ; width of CRT 0
db 24 ; number of lines on CRT 0
db 22 ; number of lines of text on CRT 0
db 132 ; width of CRT 1
db 24 ; number of lines on CRT 1
db 22 ; number of lines of text on CRT 1
db 80 ; width of Printer 0
db 66 ; number of lines on Printer 0
db 58 ; number of lines of text on Printer 0
db 1 ; form feed flag (0=can't formfeed, 1=can)
db 102 ; width of Printer 1
db 66 ; number of lines on Printer 1
db 58 ; number of lines of text on Printer 1
db 1 ; form feed flag (0=can't formfeed, 1=can)
db 80 ; width of Printer 2
db 66 ; number of lines on Printer 2
db 58 ; number of lines of text on Printer 2
db 0 ; form feed flag (0=can't formfeed, 1=can)
db 102 ; width of Printer 3
db 66 ; number of lines on Printer 3
db 58 ; number of lines of text on Printer 3
db 0 ; form feed flag (0=can't formfeed, 1=can)
.paè
Thσá ZCPR│ shel∞ nameΣ S╚ caε dea∞ witΦ symbol≤á (variables⌐ ì
whicΦá arσ assigneΣ tex⌠ string≤ a≤ values«á Thi≤ buffe≥ define≤ ì
thσ namσ oµ thσ filσ whicΦ program≤ likσ S╚ refe≥ t∩ iε orde≥á t∩ ì
resolvσá variablσá references«á A≤ man∙ shel∞ variablσ file≤á a≤ ì
desired may be available in this fashion.
db 'SH ' ; shell variable filename
db 'VAR' ; shell variable filetype
Thesσá buffer≤ arσ availablσ t∩ storσ filσ name≤á anΣá othe≥ ì
datßá whicΦá arσá passeΣá froφ onσ utilit∙ t∩á anothe≥á whicΦá i≤ ì
executeΣ later« Iε general¼ entrie≤ │ anΣ ┤ arσ availablσ t∩ thσ ì
ZCPR│ utilit∙ programme≥ a≤ general-purposσ buffers«á Entrie≤á ▒ ì
and 2 are used by some ZCPR3 System utilities at this time.
db ' ' ; filename 1
db ' ' ; filetype 1
db ' ' ; filename 2
db ' ' ; filetype 2
db ' ' ; filename 3
db ' ' ; filetype 3
db ' ' ; filename 4
db ' ' ; filetype 4
ds 80H-($-envorg1+3) ; make exactly 80H bytes long
; (+3 compensates for leading JMP)
.paè
Thσ followinτ i≤ thσ TCA╨ entr∙ fo≥ thσ TV╔ 950« Iµ LDR.CO═ ì
load≤á ßá *.Z3╘á file¼á thi≤á buffe≥ wil∞á bσá overlaiΣá (iµá thσ ì
Environment Descriptor is External).
;
; Terminal Capabilities Data
;
envorg2:
DB 'TVI 950 ' ;Name of Terminal
DB 'K'-'@' ;Cursor UP
DB 'V'-'@' ;Cursor DOWN
DB 'L'-'@' ;Cursor RIGHT
DB 'H'-'@' ;Cursor LEFT
DB 00 ;CL Delay
DB 00 ;CM Delay
DB 00 ;CE Delay
DB 1bh,'*',0 ;CL String
DB 1bh,'=%+ %+ ',0 ;CM String
DB 1bh,'t',0 ;CE String
DB 1bh,')',0 ;SO String
DB 1bh,'(',0 ;SE String
DB 0 ;TI String
DB 0 ;TE String
ds 80H-($-envorg2) ; make exactly 80H bytes long
;
; End of Environment Descriptor
;
endm