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
/
CPM
/
ZCPR33
/
Z3-33
/
Z3INSTP.LBR
/
Z3INSTP.WZ
/
Z3INSTP.WS
Wrap
Text File
|
2000-06-30
|
13KB
|
287 lines
.mt 6
.pl 60
.po 8
.pn
Z3INStp
AUTO-INSTALLE╥ FO╥ TURBO-PASCA╠ PROGRAM╙ RUNNIN╟ O╬ ZCPR│ SYSTEMS
; Thi≤ filσ anΣ al∞ file≤ iε thσ LIBRAR┘ calleΣ ZTP-INS2.LB╥
; arσ copyrigh⌠ 198╡ b∙ Steveε M« Cohen¼ anΣ thereforσ remaiε ì
; hi≤ property« Yo⌡ ma∙ freel∙ distributσ it¼ bu⌠ yo⌡ ma∙ no⌠ ì
; sel∞ i⌠ o≥ bundlσ i⌠ a≤ par⌠ oµ an∙ packagσ fo≥ salσ ì
; withou⌠ thσ expres≤ writteε consen⌠ oµ thσ author.
Introduction
Las⌠ June¼ iε thσ firs⌠ blusΦ oµ m∙ enthusiasφ fo≥ ZCPR3¼ ╔ ì
releaseΣ ß packagσ calleΣ ZTP-INS.LBR« Tha⌠ packagσ containeΣ a
Turbo-Pasca∞ prograφ tha⌠ installeΣ Vide∩ contro∞ sequence≤ ì
directl∙ froφ ZCPR│ TCAP╙ (Termina∞ Capabilit∙ Segments⌐ int∩ ì
othe≥ program≤ compileΣ b∙ Turbo-Pascal« ZTP-IN╙ wa≤ no⌠ ß baΣ ì
program¼ bu⌠ it'≤ documentatioε wa≤ florid¼ anΣ i⌠ containeΣ ì
severa∞ feature≤ tha⌠ werσ practicall∙ useless« Wors⌠ oµ all¼ i⌠ ì
containeΣ thσ 1░ o≥ s∩ ╦ run-timσ packagσ tha⌠ al∞ Turbo-Pasca∞ ì
program≤ usσ makinτ fo≥ ß mucΦ bigge≥ prograφ thaε wa≤ necessar∙ ì
fo≥ sucΦ ß simplσ task.
Thi≤ package¼ containeΣ iε ZTP-INS2.LB╥ contain≤ aε ì
assembly-languagσ versioε oµ thσ olΣ program¼ calleΣ Z3INSTP.COM¼ ì
whicΦ delete≤ thσ feature≤ tha⌠ werσ no⌠ usefu∞ iε thσ earlie≥ ì
versioε anΣ add≤ ß fe≈ ne≈ ones:
1╛ thσ abilit∙ t∩ turε ofµ highlightinτ -- Somσ program≤ ma∙ be
writteε oε system≤ witΦ reduceΣ intensity« Wheε thesσ arσ ì
porteΣ t∩ system≤ tha⌠ havσ inversσ vide∩ insteaΣ oµ reduceΣ ì
intensit∙ thσ resultinτ screen≤ actuall∙ looδ worsσ thaε ì
the∙ woulΣ withou⌠ an∙ highlighting« ┴ simplσ commanΣ line
switcΦ allow≤ highlightinτ t∩ bσ turneΣ off.
2╛ thσ abilit∙ t∩ REVERS┼ higΦ anΣ lo≈ vide∩ -- a≤ above¼ in
somσ cases¼ simpl∙ reversinτ wha⌠ wa≤ highlighteΣ anΣ what
wa≤ norma∞ wil∞ improvσ thing≤ considerably« Thi≤ to∩ can
bσ selecteΣ oε thσ commanΣ line.
.cp 6
3╛ thσ optioε t∩ instal∞ thσ arro≈ key≤ directl∙ int∩ thσ ì
prograφ fo≥ an∙ prograφ writteε t∩ takσ advantagσ oµ thi≤ ì
capablility« Thi≤ schemσ wil∞ worδ fo≥ an∙ termina∞ that
ha≤ arro≈ key≤ whicΦ generatσ singlσ bytes« Thi≤ optioε is
als∩ selectablσ a⌠ thσ commanΣ line.
.cp7è.heZ3INStp - Auto-installs Turbo-Pascal programs on ZCPR3 systems
4╛ Z3INSTP.CO═ i≤ ß ZCPR│ utilit∙ anΣ accesse≤ thσ environmen⌠ ì
descripto≥ automatically¼ insteaΣ oµ needinτ i⌠ t∩ bσ ì
specifieΣ oε thσ commanΣ line« Likσ mos⌠ Z│ utilities
i⌠ come≤ witΦ it'≤ owε built-iε hel≡ screen« Z3INStp also
give≤ ful∞ contro∞ oµ use≥ area≤ witΦ Z3'≤ DU║ specification
bu⌠ no⌠ thσ DIR║ form.
Installinτ Z3INStp
Sincσ Z3INSTP.CO═ i≤ ß ZCPR│ utilit∙ i⌠ mus⌠ bσ installeΣ a≤ ì
al∞ ZCPR│ utilitie≤ are¼ fo≥ thσ user'≤ system« Thσ commanΣ linσ ì
fo≥ thi≤ i≤ thσ usual:
Z3IN╙ SYS.EN╓ Z3INSTP.COM
Z3INStp no≈ bσ read∙ t∩ usσ oε thσ user'≤ system.
Invokinτ Z3INStp
Z3INStp i≤ easil∙ invokeΣ froφ thσ commanΣ line« Fo≥ thσ ì
defaul⌠ modσ (withou⌠ options⌐ simpl∙ type:
Z3INST╨ filenamσ
wherσ filenamσ i≤ thσ namσ oµ ß .CO═ filσ optionall∙ prefixeΣ ì
witΦ ß DU║ (disk-user⌐ specification« E« G.
Z3INST╨ FATCAT
Z3INST╨ FATCAT.COM
Z3INST╨ B7:FATCAT.COM
.cp 6
Notσ tha⌠ thσ .CO═ extensioε i≤ optiona∞ oε thσ commanΣ line« Iµ ì
ß filσ oµ .CO═ typσ i≤ no⌠ found¼ aε erro≥ messagσ wil∞ result« ì
Iµ yo⌡ typσ fo≥ example
Z3INST╨ FATCAT.OBJ
thσ prograφ wil∞ looδ onl∙ fo≥ FATCAT.COM¼ abortinτ iµ i⌠ i≤ no⌠ ì
found¼ eveε iµ FATCAT.OB╩ i≤ present« Iε othe≥ words¼ Z3INStp ì
onl∙ install≤ .CO═ files.
Furthermore¼ Z3INStp check≤ t∩ seσ iµ thσ specifieΣ filσ wa≤ ì
compileΣ unde≥ Turbo-Pasca∞ (versioε 2.░ o≥ higher)¼ agaiε ì
abortinτ iµ i⌠ wa≤ not« Thi≤ prevent≤ agains⌠ damaginτ file≤ ì
whicΦ wil∞ no⌠ worδ witΦ thesσ installations.è
A≤ aε addeΣ measurσ oµ safety¼ Z3INStp firs⌠ rename≤ thσ filσ to
bσ installeΣ witΦ thσ namσ filename.OLD¼ theε create≤ ß ne≈ filσ ì
froφ scratcΦ upoε whicΦ thσ ne≈ installeΣ value≤ arσ placed« Iµ ì
fo≥ somσ reasoε Z3INStp fails¼ simpl∙ renamσ filename.OL─ bacδ to
filename.COM« Iµ filename.OL─ alread∙ exists¼ yo⌡ arσ querieΣ ì
beforσ thσ olΣ cop∙ i≤ deleted« Bette≥ safσ thaε sorry.
Options
Option≤ arσ selecteΣ oε thσ commanΣ linσ a≤ parameter≤ afte≥ the
filenamσ i≤ typed« Options¼ iµ any¼ arσ combineΣ int∩ ß single
"wordó a≤ thσ seconΣ commanΣ linσ parameter:
Z3INST╨ FATCA╘ A
Z3INST╨ FATCAT.CO═ AR
Z3INST╨ FATCA╘ HA
Therσ arσ onl∙ │ options:
optioε 'H'é - turn≤ ofµ highlightinτ iε thσ prograφ beinτ ì
installed¼ a≤ describeΣ above« Tha⌠ i≤ thσ prograφ wil∞ run
a≤ thougΦ i⌠ werσ runninτ oε ß termina∞ withou⌠ highlighting.
optioε 'R'é - reverse≤ wha⌠ i≤ highlighteΣ anΣ wha⌠ i≤ not¼ a≤ ì
describeΣ above« Iµ thi≤ optioε i≤ choseε togethe≥ witΦ the
'Hº option¼ theε i⌠ wil∞ bσ ignored«
optioε 'A'é - install≤ thσ arro≈ key≤ a≤ describeΣ above« Notσ ì
tha⌠ fo≥ thi≤ optioε t∩ worδ thσ prograφ documentatioε mus⌠ ì
specif∙ tha⌠ arro≈ key≤ caε bσ installeΣ thi≤ way.é A≤ oµ now¼ ì
thσ onl∙ prograφ tha⌠ caε bσ installeΣ iε thi≤ wa∙ i≤ FATCA╘ b∙ ì
thσ autho≥ oµ Z3INStp« Hopefully¼ othe≥ programmer≤ ma∙ decidσ ì
tha⌠ thi≤ i≤ ß usefu∞ ideß anΣ implemen⌠ i⌠ iε thei≥ programs« ì
Also¼ arro≈ key≤ mus⌠ bσ installeΣ iε thσ user'≤ TCA╨ -- anΣ fo≥ ì
thi≤ t∩ happen¼ thσ arro≈ key≤ mus⌠ generatσ onl∙ single-ì
characte≥ sequences« Mos⌠ arro≈ key≤ worδ thi≤ way¼ bu⌠ ß fe≈ d∩ ì
not« However¼ no⌠ t∩ worry« Eveε iµ thσ prograφ yo⌡ arσ ì
installinτ doe≤ no⌠ suppor⌠ thi≤ convention¼ i⌠ doe≤ n∩ harm« ì
Programmer≤ wishinτ t∩ writσ program≤ usinτ Z3INStp shoulΣ ì
consul⌠ thσ sectioε "Arro≈ Ke∙ Programmingó below.
Theor∙ oµ Z3INStp
Z3INStp work≤ becausσ botΦ ZCPR│ anΣ Turb∩ Pasca∞ codσ thei≥ ì
termina∞ datß iε readil∙ accessiblσ places« Simila≥ setup≤ coulΣ ìèbσ workeΣ u≡ fo≥ an∙ prograφ o≥ programminτ languagσ tha⌠ useΣ ß ì
simila≥ methoΣ oµ accessinτ termina∞ data«
A≤ neatl∙ a≤ Z3INStp work≤ i⌠ i≤ importan⌠ t∩ notσ wha⌠ i⌠ ì
CANNO╘ do« I⌠ canno⌠ makσ Turb∩ program≤ usσ thσ TCA╨ thσ samσ ì
effortles≤ wa∙ zcpr│ utilitie≤ do« Tha⌠ is¼ i⌠ caε onl∙ instal∞ ì
program≤ t∩ specifiπ TCAPs« I⌠ i≤ eas∙ t∩ reinstal∞ thesσ ì
program≤ fo≥ differen⌠ TCAP≤ bu⌠ yo⌡ mus⌠ reinstal∞ fo≥ eacΦ TCA╨ ì
used« Yo⌡ canno⌠ simpl∙ LD╥ ß ne≈ TCA╨ anΣ expec⌠ you≥ prograφ ì
t∩ worδ right.
Thσ reasoε fo≥ thi≤ i≤ simple« Turb∩ anΣ ZCPR│ usσ ì
completel∙ differen⌠ method≤ oµ formattinτ thei≥ termina∞ data« ì
Turb∩ use≤ thσ fixeΣ lengtΦ strinτ method¼ wherσ eacΦ termina∞ ì
functioε caε bσ founΣ a⌠ specific¼ exac⌠ location≤ iε memory« ì
Thesσ location≤ arσ thσ samσ fo≥ ever∙ Turb∩ prograφ (a⌠ leas⌠ ì
thosσ unde≥ version≤ 2.░ anΣ 3.0)¼ anΣ indeed¼ fo≥ TURBO.CO═ ì
itself« Further¼ the∙ follo≈ thσ Turbo-Pasca∞ Strinτ format¼ ì
whereiε thσ firs⌠ bytσ oµ thσ strinτ variablσ i≤ thσ actua∞ ì
lengtΦ oµ thσ string« ZCPR│ TCAP≤ usσ thσ "null-terminationó ì
methoΣ s∩ thσ beginninτ addres≤ oµ thσ TCA╨ i≤ readil∙ available¼ ì
other≤ arσ not« I⌠ woulΣ bσ possible¼ bu⌠ hardl∙ worthwhile¼ t∩ ì
writσ Turbo-Pasca∞ program≤ redefininτ thσ termina∞ procedure≤ ì
sucΦ tha⌠ the∙ accesseΣ thσ ZCPR│ locations.
Therefore¼ wσ caε bes⌠ seσ Z3INStp a≤ ß halfwa∙ housσ ì
betweeε tota∞ ZCPR3-utilit∙ vide∩ compatibility¼ anΣ non-
compatibility« I⌠ i≤ simpl∙ ß translatioε program« It≤ maiε usσ ì
a≤ ╔ seσ it¼ i≤ t∩ enablσ ZCPR│ user≤ t∩ instal∞ Turbo-program≤ ì
oε thei≥ terminal≤ withou⌠ thσ space-wastinτ anΣ clums∙ method≤ ì
oµ TINS╘ anΣ GINST¼ whicΦ amoun⌠ t∩ ß duplicatioε oµ effor⌠ afte≥ ì
yo⌡ havσ installeΣ you≥ TCAP« I⌠ als∩ i≤ ß nicσ demonstratioε oµ ì
thσ advantage≤ oµ ZCPR│ ove≥ CP/M«
Weaknesse≤ oµ Z3INStp anΣ Futurσ Directions
Z3INStp wil∞ no⌠ worδ oε terminal≤ witΦ "non-fixed-lengtΦ ì
ASCI╔ ó curso≥ addressinτ sequences« Thesσ arσ terminal≤ whicΦ ì
usσ thσ "%dó iε thei≥ curso≥ addressing« Fo≥ examplσ thσ H1╣ ì
Termina∞ ANS╔ mode¼ whosσ ZCPR│ curso≥ addressinτ sequencσ i≤ ì
1BH,'[%d;%dH',0« ╔ canno⌠ finΣ an∙ sucΦ termina∞ definition≤ ì
useΣ b∙ TURBO¼ s∩ haΣ n∩ poin⌠ oµ reference« ╔ aφ reasonabl∙ ì
surσ tha⌠ Z3INStp wil∞ worδ oε terminal≤ witΦ "fixed-lengtΦ ASCI╔ ì
addressingó bu⌠ havσ no⌠ trieΣ one¼ s∩ woulΣ appreciatσ an∙ buτ ì
report≤ oε thi≤ a⌠ thσ "homσ baseó listeΣ below« (Seσ chapter 22ì
oµ ZCPR│ - thσ Manualô iµ yo⌡ d∩ no⌠ understanΣ thi≤ paragraph.)è
.cp7
Z3INStp ha≤ ß couplσ oµ inheren⌠ weaknesse≤ duσ t∩ partia∞ ì
incompatibilitie≤ oµ ZCPR│ TCAP╙ witΦ Turbo-Pasca∞ termina∞ ì
definitions« Specifically,
TCAP╙ d∩ no⌠ havσ sequence≤ fo≥ Inser⌠ Linσ anΣ Deletσ Linσ ì
(thσ Turb∩ procedure≤ InsLinσ anΣ DelLine)« Luckily¼ thesσ arσ ì
probabl∙ les≤ useΣ thaε thσ othe≥ termina∞ functions« ╔ finΣ ì
tha⌠ ╔ seldoφ usσ theφ iε m∙ owε programming╗ thei≥ mos⌠ frequen⌠ ì
usσ seem≤ t∩ bσ iε thσ Turb∩ Edito≥ itself╗ here¼ Borland'≤ ì
programmer≤ havσ beeε smar⌠ enougΦ t∩ includσ workaround≤ fo≥ ì
terminal≤ no⌠ supportinτ thesσ functions¼ ß practicσ tha⌠ other≤ ì
migh⌠ wan⌠ t∩ emulate.
Nonetheless¼ i⌠ woulΣ bσ nicσ t∩ bσ ablσ t∩ acces≤ thesσ ì
functions« Lookinτ a⌠ thσ TCAP╙ tha⌠ currentl∙ exist¼ i⌠ woulΣ ì
seeφ t∩ bσ eas∙ t∩ adΣ thesσ function≤ a⌠ thσ enΣ oµ thσ TCA╨ a≤ ì
the∙ al∞ seeφ t∩ havσ amplσ spacσ iε thσ 12╕ bytσ standarΣ ì
allocation« ╔ wonde≥ wha⌠ d∩ thσ author≤ oµ ZCPR│ thinδ abou⌠ ì
extendinτ thσ TCAP╙ t∩ includσ thesσ functions┐
.cp7
Thσ othe≥ weaknes≤ iε thσ concep⌠ behinΣ Z3INStp ha≤ largel∙ ì
beeε largel∙ eliminateΣ witΦ thσ arrow-ke∙ installatioε procedurσ ì
describeΣ above« However¼ thi≤ create≤ somσ othe≥ mino≥ ì
difficultie≤ fo≥ programmers¼ whicΦ ╔ wil∞ no≈ attemp⌠ t∩ clea≥ ì
up.
Programmer'≤ Guidσ t∩ Arro≈ Ke∙ Installation
Iε designinτ thσ arrow-ke∙ interface¼ thσ followinτ schemσ ì
suggesteΣ itself« Thσ Turbo-Pasca∞ Termina∞ Namσ strinτ occupies
2▒ byte≤ iε memor∙ startinτ a⌠ 0153h« Thσ firs⌠ bytσ contain≤ ì
thσ actua∞ lengtΦ oµ thi≤ string¼ s∩ therσ i≤ ß maximuφ oµ 2░ ì
byte≤ availablσ fo≥ thσ termina∞ name« Quitσ b∙ accident¼ thσ ì
Turb∩ TCA╨ strinτ holdinτ thσ termina∞ namσ occupie≤ ß maximuφ oµ ì
1╢ bytes« Thereforσ wσ havσ fou≥ byte≤ availablσ oε thσ Turbo
Interfacσ pagσ (016┤ - 0167h⌐ tha⌠ wil∞ almos⌠ certainl∙ no⌠ ì
conflic⌠ witΦ anything« Thesσ fou≥ byte≤ arσ no⌠ useΣ iε an∙ wa∙ ì
oncσ thσ shorte≥ TCA╨ strinτ i≤ overlaiΣ ove≥ thσ origina∞ Turb∩ ì
string« Therefore¼ al∞ tha⌠ i≤ needeΣ iε you≥ prograφ t∩ allo≈ ì
thσ arro≈ ke∙ optioε 'Aº t∩ worδ i≤ thσ followinτ code:
VAR
UpArro≈ ║ Cha≥ absolutσ $0164;
DownArro≈ ║ Cha≥ absolutσ $0165;
RightArro≈ ║ Cha≥ absolutσ $0166;è LeftArro≈ ║ Cha≥ absolutσ $0167;
However¼ thi≤ create≤ anothe≥ probleφ iµ thσ prograφ wil∞ als∩ bσ ì
ruε oε non-Z│ systems« Fo≥ thosσ installation≤ somethinτ simila≥ ì
t∩ TINS╘ o≥ GINS╘ mus⌠ bσ used¼ anΣ iε tha⌠ casσ character≤ froφ ì
thσ 2░ characte≥ Turb∩ termina∞ namσ wil∞ fil∞ thesσ spaces¼ witΦ ì
thσ possibl∙ unfortunatσ consequencσ tha⌠ ß printablσ ASCI╔ ì
characte≥ wil∞ bσ interpreteΣ b∙ thσ prograφ a≤ aε arro≈ key«
Thi≤ caε bσ cureΣ b∙ placinτ thσ followinτ statemen⌠ a⌠ thσ ì
beginninτ oµ thσ program:
Fo≥ ╪ :╜ Addr(UpArrow⌐ t∩ Addr(LeftArrow⌐ do
Iµ Mem[X▌ iε [32..127▌ then
Mem[X▌ :╜ 0;
Iµ thσ prograφ ha≤ beeε installeΣ b∙ ß GINS╘ method¼ thesσ ì
location≤ wil∞ contaiε character≤ iε thσ 32..12╖ rangσ anΣ wil∞ ì
thu≤ bσ converteΣ t∩ zeroe≤ iε memory« Iµ therσ i≤ ß neeΣ iε ì
you≥ prograφ fo≥ thσ Termina∞ name¼ i⌠ caε bσ copieΣ ou⌠ oµ thi≤ ì
areß beforσ thσ abovσ statemen⌠ i≤ executed.
Othe≥ Possiblσ Problems
Turbo-Pasca∞ programmer≤ ough⌠ t∩ enΣ thei≥ program≤ witΦ ì
thσ CRTExi⌠ statement« Tha⌠ way¼ an∙ specia∞ vide∩ effect≤ caε ì
bσ turneΣ off¼ iµ thσ use≥ include≤ iε hi≤ termina∞ definitioε ß ì
CRTExi⌠ strinτ tha⌠ return≤ thσ vide∩ attribute≤ t∩ normal« ì
Unfortunately¼ man∙ d∩ not.
Iµ thσ use≥ encounter≤ thi≤ annoyance¼ hσ shoulΣ redefinσ ì
thσ TCA╨ t∩ includσ aε exi⌠ strinτ tha⌠ return≤ hi≤ vide∩ t∩ thσ ì
norma∞ statσ a≤ describeΣ above« Then¼ iµ thσ programme≥ ha≤ ì
writteε hi≤ prograφ a≤ describeΣ iε thσ las⌠ paragraph¼ a⌠ exi⌠ ì
froφ thσ program¼ thσ vide∩ wil∞ bσ normal« I⌠ shoulΣ bσ noteΣ ì
tha⌠ thσ TCAP╙ supplieΣ b∙ Echelon¼ Inc« d∩ no⌠ includσ thi≤ ì
informatioε iε thσ rese⌠ strinτ anΣ i⌠ mus⌠ bσ addeΣ witΦ TCMAKE.
.paèConclusion
Sourcσ codσ i≤ includeΣ iε thi≤ library« Fee∞ freσ t∩ ì
modif∙ it« Therσ i≤ certainl∙ rooφ fo≥ improvement« However¼ ì
thσ autho≥ woulΣ likσ t∩ seσ wha⌠ yo⌡ havσ done« Pleasσ leavσ ì
an∙ messages¼ modifications¼ buτ reports¼ etc« fo≥ mσ oε RicharΣ ì
Jacobson'≤ LilliPutσ ZNodσ iε Chicago« Thσ phonσ numbe≥ fo≥ thi≤ ì
excellen⌠ boarΣ i≤ 312-649-1730¼ anΣ yo⌡ ma∙ leavσ message≤ therσ ì
withou⌠ beinτ ß member« However¼ a≤ ╔ saiΣ iε thσ earlie≥ ì
version¼ hi≤ $4░ membershi≡ feσ i≤ ß bargain.
Steve Cohen
Nov. 30, 1985
Turbo-Pascal is a trademark of Borland International, Inc.