home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
simtel
/
sigm
/
vols000
/
vol060
/
squeezer.doc
< prev
next >
Wrap
Text File
|
1985-02-09
|
23KB
|
513 lines
USAGE AND RECOMPILATION DOCUMENTATION FOR: 7/18/81
SQ.COM 1.3 File squeezer
USQ.COM 1.4 File unsqueezer
FLS.COM 1.1 Ambiguous file name expander
DISTRIBUTION RIGHTS:
╔áá allo≈á unrestricteΣá non-profi⌠á distributioεá oµáá thi≤ ì
softwarσá anΣá invitσá user≤ group≤á t∩á spreaΣá i⌠á around« ì
However¼á an∙ distributioε fo≥ profi⌠ require≤ m∙ permissioε ì
iεá advance«á Thi≤ applie≤ onl∙ t∩ thσ abovσ listeΣ program≤ ì
anΣ thei≥ prograφ sourcσ anΣ documentatioε files«á ╔ d∩ sel∞ ì
othe≥ software.
PURPOSE:
Thσ filσ squeezer¼á SQ¼ compresse≤ file≤ int∩ ß morσ compac⌠ ì
forφ.á This provides:
1. Faster transmission by modem.
2« Fewe≥ diskette≤ t∩ distributσ ß prograφá package« ì
(Include USQ.COM and instructions, both unsqueezed.)
3. Fewer diskettes for archival storage.
An∙ filσ caε bσ squeezed¼á bu⌠ prograφ sourcσ file≤ anΣ tex⌠ ì
file≤á benefi⌠ thσ most¼á typicall∙ shrinkinτ b∙ 35%«á File≤ ì
containinτ onl∙ ß limiteΣ characte≥ set¼á sucΦ a≤ dictionar∙ ì
files¼á ma∙ shrinδ a≤ mucΦ a≤ 48%«á SqueezeΣ file≤ looδ likσ ì
gibbersΦ anΣ mus⌠ bσ unsqueezeΣ beforσ the∙ caε bσ used.
Thσá unsqueezer¼á USQ¼á expand≤á squeezeΣ file≤á int∩á exac⌠ ì
duplicate≤á oµ thσ origina∞ o≥ provide≤ ß quick¼á unsqueezeΣ ì
displa∙á oµá thσá top≤á oµá (o≥á al∞á of⌐á squeezeΣáá files« ì
Unsqueezinτ require≤ onl∙ ß singlσ pass.
BotΦ S╤ anΣ US╤ accep⌠ batche≤ oµ worδ specifieΣ b∙ list≤ oµ ì
filσá name≤á (witΦá drive≤á iµá needed⌐á anΣáá miscellaneou≤ ì
options. They accept these parameters in any of three ways:
1. On the CP/M command line.
2. From the console keyboard.
3. From a file.
Thσá FL╙ prograφ caε bσ useΣ (oε thσ samσ commanΣ line!⌐á t∩ ì
expanΣ paramete≥ list≤ containinτ wild-carΣ (ambiguous⌐ filσ ì
name≤ int∩ list≤ witΦ thσ specifiπ filσ name≤ requireΣ b∙ S╤ ì
anΣ USQ.
Thi≤á combinatioε oµ program≤ allow≤ yo⌡ t∩ issuσá ßá singlσ ì
commanΣ whicΦ wil∞ producσ man∙ squeezeΣ o≥ unsqueezeΣ file≤ ì
froφ anΣ t∩ variou≤ diskettes« Fo≥ example¼ t∩ unsqueezσ al∞ ì
squeezeΣá AS═ file≤ oε drivσ ┬ anΣ senΣ thσ result≤ t∩ drivσ ì
├á anΣ als∩ unsqueezσ al∞ squeezeΣ TX╘ file≤ oε drivσ ┴á anΣ ì
senΣ thσ result≤ t∩ drivσ D:
A>fls c: b:*.aqm d: *.tqt |usq
For detailed instructions see USAGE.
Thi≤á DOE╙á ruε unde≥ plaiε olΣ vanillß CP/Míá Man∙á oµá thσ ì
smart≤á arσ burieΣ iε thσ CO═ file≤ iε thσ forφá oµá librar∙ ìèroutine≤á provideΣá witΦ thσ BD╙ ├ packagσá (availablσá froφ ì
Lifeboat).
Thσá abovσ examplσ simulate≤ ß "pipeó (indicateΣ b∙ thσ "|"⌐ ì
b∙ sendinτ thσ "consoleó outpu⌠ oµ thσ fls.coφ prograφ t∩á ß ì
temporar∙á filσá anΣá theε runninτ thσ sq.coφá prograφá witΦ ì
option≤á whicΦá causσá i⌠ t∩ reaΣ it≤á parameter≤á froφá it≤ ì
"consoleó input¼ whicΦ i≤ reall∙ redirecteΣ t∩ comσ froφ thσ ì
temporar∙ file.
THEORY:
Thσá datßá iε thσ filσ i≤ treateΣ a⌠ thσ bytσá leve∞á rathe≥ ì
theεá thσ worΣ level¼á anΣ caε contaiε absolutel∙á anything« ì
Thσ compressioε i≤ iε tw∩ stages║ firs⌠ repeateΣ bytσ value≤ ì
arσá compresseΣá anΣá theε ßá Huffmaεá codσá i≤á dynamicall∙ ì
generateΣá t∩ matcΦ thσ propertie≤ oµ eacΦ particula≥á file« ì
Thi≤ require≤ tw∩ passe≤ ove≥ thσ source data.
Thσá decodinτá tablσ i≤ includeΣ iε thσá squeezeΣá file¼á s∩ ì
squeezinτá shor⌠á file≤ caε actuall∙á lengtheεá them«á FixeΣ ì
decodinτá table≤á arσ no⌠ useΣ becausσ EnglisΦ anΣá variou≤ ì
compute≥á language≤ var∙ greatl∙ a≤ t∩ uppe≥ anΣ lowe≥á casσ ì
proportion≤á anΣá usσ oµ specia∞á characters«á MucΦá oµá thσ ì
saving≤á come≤á froφá no⌠á assigninτ code≤á t∩á unuseΣá bytσ ì
values.
Morσ detaileΣ comment≤ arσ includeΣ iε thσ sourcσ files.
USAGE TUTORIAL:
A≤ usual¼ yo⌡ havσ t∩ learε ho≈ t∩ tel∞ thσ program≤ wha⌠ t∩ ì
d∩á (i.e.¼á wha⌠ parameter≤ t∩ typσ afte≥ thσ prograφ name)« ì
Firs⌠ ╔ wil∞ introducσ thσ variou≤ possibilitie≤ b∙ example« ì
Then I will summarize the rules.
Iεá thσ simples⌠ casσ eithe≥ S╤ o≥ US╤ caε simpl∙á bσá giveε ì
onσ o≥ morσ filσ name≤ (witΦ o≥ withou⌠ drivσ names):
A>sq xyz.asm
A>sq thisfile.doc b:thatfile.doc
wil∞áá creatσá squeezeΣá file≤á xyz.aqm¼áá thisfile.dqcá anΣ ì
thatfile.dqc¼á al∞á oε thσ curren⌠ drive¼á A«á Thσá origina∞ ì
file≤ arσ no⌠ disturbed« Notσ tha⌠ thσ name≤ oµ thσ squeezeΣ ì
files are generated by rules - you don't specify them.
Likewise,
A>usq xyz.aqm
wil∞á creatσ filσ xyz.asφ oε thσ ┴á drive¼á overwritinτá thσ ì
original«á (Thσá origina∞ namσ i≤ recreateΣ froφ informatioε ì
storeΣ iε thσ squeezeΣ version.⌐ Thσ squeezeΣ versioε i≤ no⌠ ì
disturbed.
EacΦ filσ namσ i≤ processeΣ iε order¼á anΣ yo⌡ caε lis⌠á al∞ ì
thσ file≤ yo⌡ caε fi⌠ iε ß command«á Thσ filσ name≤ giveε t∩ ì
S╤ anΣ US╤ mus⌠ bσ specific« Yo⌡ wil∞ learε belo≈ ho≈ t∩ usσ ì
thσ FL╙ prograφ t∩ expanΣ pattern≤ likσ *.asφ (al∞ file≤á oµ ì
typσá asm⌐ int∩ ß lis⌠ oµ specifiπ name≤ anΣ feeΣ theφá int∩ ìèSQ or USQ.
Thσ abovσ example≤ le⌠ thσ destinatioε drivσ defaul⌠ t∩á thσ ì
curren⌠ loggeΣ drive¼ whicΦ wa≤ showε iε thσ promp⌠ t∩ bσ A« ì
Yo⌡ caε changσ thσ destinatioε drivσ a≤ ofteε a≤ yo⌡ likσ iε ì
the parameter list. For example,
A>sq x.asm b: y.asm z.asm c: d:s.asm
wil∞ creatσ x.aqφ oε thσ curren⌠ drive¼á A¼á y.aqφ anΣ z.aqφ ì
oε thσ ┬ drivσ anΣ s.aqφ oε thσ ├ drive« Notσ tha⌠ thσ firs⌠ ì
threσ original≤ arσ oε drivσ ┴ anΣ thσ las⌠ onσ i≤ oεá drivσ ì
D«á Remembe≥á tha⌠ eacΦ paramete≥ i≤ processeΣ iε order¼á s∩ ì
yo⌡ mus⌠ changσ thσ destinatioε drivσ beforσ yo⌡ specif∙ thσ ì
files to be created on that drive.
Eventuall∙ yo⌡ wil∞ havσ diskette≤ witΦ man∙ squeezeΣá file≤ ì
oεá theφ anΣ yo⌡ wil∞ wonde≥ wha⌠ i≤ iε whicΦ file«á Iµ the∙ ì
weren'⌠á squeezeΣ yo⌡ woulΣ usσ thσ TYP┼ commanΣ t∩ looδá a⌠ ì
thσá comment≤ a⌠ thσ beginninτ oµ thσá files«á Bu⌠á squeezeΣ ì
file≤á jus⌠á makσá ß mes≤ oε you≥ CR╘ screeε wheεá yo⌡á TYP┼ ì
them¼á s∩á ╔ havσ provideΣ thσ requireΣ featurσ a≤ ß previe≈ ì
optioε t∩ thσ US╤ program.
A>usq -10 x.bas b:y.asm
wil∞á no⌠ takσ thσ timσ t∩ creatσ unsqueezeΣ files«á InsteaΣ ì
i⌠á wil∞á unsqueezσá thσ firs⌠ 1░ line≤á oµá eacΦá filσá anΣ ì
displa∙á theφá oε you≥ console«á Thσ displa∙ froφ eacΦá filσ ì
consists of the file names, the data and a formfeed (FF).
Also,
A>usq - c:xyz.mac
wil∞á unsqueezσá anΣ displa∙ thσ firs⌠ 65,53╡ line≤á oµá an∙ ì
file≤ listed« That'≤ thσ bigges⌠ numbe≥ yo⌡ caε givσ it¼ anΣ ì
is intended to display the whole file.
Thi≤áá previe≈á optioεá als∩á ensure≤á tha⌠á thσáá datßáá i≤ ì
displayable«á Thσá parit∙ bi⌠ i≤ strippeΣ ofµ (somσ Wordsta≥ ì
file≤á usσá i⌠ fo≥ forma⌠ control⌐ anΣ an∙á unusua∞á contro∞ ì
character≤á arσá converteΣ t∩ periods«á You'l∞ seσá somσá oµ ì
thesσá a⌠á thσ enΣ oµ thσ file≤ a≤ thσ CP/═ enΣ oµá filσá i≤ ì
treateΣá a≤á datßá anΣá thσá remainde≥á oµá thσá secto≥áá i≤ ì
displayed.
Yo⌡ arσ no≈ familia≥ witΦ al∞ oµ thσ operationa∞á parameter≤ ì
oµ S╤ anΣ USQ«á Bu⌠ s∩ fa≥ yo⌡ havσ alway≤ typeΣ theφ oε thσ ì
commanΣ linσ whicΦ causeΣ thσ prograφ t∩ bσ run« Fo≥ reason≤ ì
whicΦá wil∞ becomσ apparen⌠ later¼á ╔ havσ als∩ provideΣá aε ì
interactivσá mode«áá Iµá therσá arσá n∩á parameter≤á (excep⌠ ì
directeΣá i/∩á parameters¼á describeΣ later⌐ oε thσá commanΣ ì
line¼á S╤á anΣ US╤ wil∞ promp⌠ witΦ aε asterisδá anΣá accep⌠ ì
parameter≤ froφ thσ consolσ keyboard« EacΦ paramete≥ mus⌠ bσ ì
followeΣá b∙á RETUR╬ anΣ wil∞ bσ processeΣá immediately«á Aε ì
empt∙á commanΣ (jus⌠ RETURN⌐ wil∞ causσ thσ prograφ t∩á exi⌠ ì
bacδá t∩á CP/M«á Tr∙ i⌠ - i⌠ wil∞ hel≡ yo⌡á understanΣá wha⌠ ì
follows.
No≈ let≤ ge⌠ int∩ directeΣ i/o¼ whicΦ wil∞ bσ ne≈ t∩ mos⌠ oµ ì
you¼á bu⌠ wil∞ savσ yo⌡ s∩ mucΦ worδ yo⌡ wil∞ wonde≥ ho≈ yo⌡ ìèeve≥ go⌠ alonτ withou⌠ it.
Perhap≤ yo⌡ frequentl∙ squeezσ o≥ unsqueezσ thσ samσ lis⌠ oµ ì
file≤á anΣ yo⌡ woulΣ likσ t∩ typσ thσ lis⌠ oncσ anΣ bσá donσ ì
witΦ it« Usσ aε edito≥ (o≥ FLS¼ describeΣ below⌐ t∩ creatσ ß ì
filσá witΦá onσá paramete≥ pe≥ line«á Fo≥á examplσá cal∞á i⌠ ì
commands.lst.
Then,
A>sq <commands.lst
wil∞á causσ thσ commanΣ lis⌠ filσ t∩ bσ reaΣ a≤ iµ yo⌡á werσ ì
typing it! You will see it on the console.
Tha⌠ wa≤ redirecteΣ consolσ input«á No≈ assumσ tha⌠ yo⌡ havσ ì
ß ver∙ lonτ lis⌠ oµ file≤ t∩ squeezσ o≥ unsqueezσ anΣá whilσ ì
yo⌡á arσá takinτ ß na≡ thσ progres≤ comment≤ anΣ maybσá somσ ì
erro≥á comment≤á scrol∞á ofµá thσá screen«á Redirectinτá thσ ì
consolσáá outpu⌠áá wil∞á le⌠á yo⌡á capturσáá theáá progres≤ ì
informatioεá iε ß filσ s∩ yo⌡ caε checδ i⌠ later«á Thσ erro≥ ì
comments will have the screen to themselves.
For example,
A>sq <commands.lst >out
wil∞ senΣ thσ progres≤ comment≤ t∩ thσ filσ "out"¼ whicΦ yo⌡ ì
caε TYP┼ later«á Thσ routinσ displa∙ oµ thσ prograφ namσ anΣ ì
version¼ etc.¼ wil∞ stil∞ g∩ t∩ thσ console.
┴ morσ practica∞ examplσ i≤ t∩ senΣ tha⌠ informatioε t∩á thσ ì
consolσ anΣ t∩ thσ file.
A>sq <commands.lst +out
will do that.
RedirecteΣá inpu⌠á anΣ outpu⌠ arσ independen⌠ - yo⌡á caεá d∩ ì
either, both or neither.
Therσ i≤ onσ morσ forφ oµ redirectioε calleΣ ß "pipe"« I⌠ i≤ ì
b∙ fa≥ thσ mos⌠ importan⌠ t∩ you«á Recal∞ tha⌠ ╔ promiseΣ t∩ ì
tel∞á yo⌡ ho≈ t∩ usσ ambiguou≤ filσ name≤ sucΦ a≤ *.asφ (al∞ ì
file≤á oµá typσ asφ oε thσ curren⌠ defaul⌠ drive⌐á o≥á *.?q┐ ì
(al∞ file≤ havinτ ß "qó a≤ thσ seconΣ lette≥ oµ thei≥ type)« ì
Tha⌠ las⌠ examplσ jus⌠ happen≤ t∩ meaε "al∞ squeezeΣ files"¼ ì
assuminτá yo⌡ don'⌠ havσ an∙ othe≥ file≤ witΦ sucΦá ßá sill∙ ì
name (I hope).
╔á havσá provideΣá ß prograφ calleΣ FL╙á whicΦá i≤á intendeΣ ì
primarily for use in pipes. Here is an example:
A>fls c: x.asm y*.asm >temp.$$$
wil∞á simpl∙á pas≤ thσ firs⌠ tw∩ parameter≤ througΦá t∩á thσ ì
consolσ output¼á whicΦ i≤ beinτ redirecteΣ t∩ ß filσá calleΣ ì
temp.$$$«á Bu⌠á thσ thirΣ paramete≥ wil∞ bσ replaceΣ b∙á al∞ ì
thσá file≤á oε thσ curren⌠ drivσ whicΦ arσ oµ typσá asφá anΣ ì
have names beginning with y.
FL╙á i≤á smar⌠á enougΦ t∩ kno≈ tha⌠ ß lette≥ followeΣá b∙á ß ì
coloε anΣ nothinτ elsσ i≤ ß destinatioε drivσ namσá intendeΣ ìèfo≥á S╤ o≥ USQ«á I⌠ wil∞ als∩ trea⌠ an∙ paramete≥á beginninτ ì
witΦá ßá - (minu≤ sign⌐ a≤ aε optioε t∩ bσá passeΣá through« ì
Anythinτá elsσá i≤ considereΣ ß filσ namσ o≥ patterε anΣá i≤ ì
checkeΣ agains⌠ thσ director∙ oµ thσ appropriatσ drive.
Therefore you could use:
A>fls b: c:*.aqm *.aqm -10 stuff.dqc >temp.$$$
A>usq <temp.$$$
A>era temp.$$$
t∩ unsqueezσ al∞ file≤ oµ typσ aqφ oε drive≤ ├ anΣ ┴ anΣ pu⌠ ì
thσ unsqueezeΣ file≤ oε drivσ B¼á anΣ theε previe≈ thσ firs⌠ ì
10 lines of file stuff.dqc.
Herσá i≤ wherσ thσ pipσ come≤ in«á Thσ abovσ threσá command≤ ì
can be abbreviated as:
A>fls b: c:*.aqm *.aqm -10 stuff.dqc |usq
Tha⌠á littlσá "|ó i≤ thσ pipσ optioε anΣ i⌠ cause≤á thσá FL╙ ì
outpu⌠ t∩ bσ redirecteΣ t∩ ß temporar∙ filσ anΣ wheε tha⌠ i≤ ì
donσá i⌠á actuall∙á run≤ US╤ fo≥ yo⌡ witΦ thσá prope≥á inpu⌠ ì
redirection and then erases the temporary file.
Iµá tha⌠á isn'⌠á enough¼á yo⌡á caε stil∞á usσá thσá ½á o≥á ╛ ì
redirectioεá optioεá a⌠ thσ enΣ oµ tha⌠ linσ t∩ capturσá thσ ì
console output from USQ.
A>fls b: c:*.aqm *.aqm -10 stuff.dqc |usq >out
Iµ yo⌡ plaε you≥ comment≤ carefull∙ yo⌡ caε producσ ß singlσ ì
filσ containinτ aε abstrac⌠ oµ aε entirσ librar∙ oµ squeezeΣ ì
files in one step!
A>fls -25 *.?q? |usq >abstract
Onσá fina∞ point«á Anywherσ yo⌡ specif∙ ß filσ namσ yo⌡á caε ì
specif∙ ß drivσ iε fron⌠ oµ it«á Tha⌠ applie≤ t∩ redirectioε ì
anΣ wel∞ a≤ file≤ t∩ bσ squeezeΣ anΣ unsqueezed«á Iµ ßá namσ ì
begin≤á witΦ ß - (minu≤ sign⌐ i⌠ wil∞ looδ likσ aε optioε t∩ ì
FL╙ unles≤ yo⌡ pu⌠ ß drivσ namσ iε fron⌠ oµ i⌠ (b:-sq.077).
USAGE SUMMARY:
Thσ previou≤ sectioε graduall∙ presenteΣ thσ variou≤ option≤ ì
b∙ example« Thi≤ sectioε give≤ ß condenseΣ anΣ morσ abstrac⌠ ì
descriptioεá anΣ i≤ intendeΣ fo≥ reference«á Iµ yo⌡ couldn'⌠ ì
seσá thσ fores⌠ fo≥ thσ trees¼á maybσ thi≤ wil∞ givσá yo⌡á ß ì
better view.
Thσ paramete≥ handlinτ oµ thesσ program≤ i≤ straightforward« ì
Parameter≤á fal∞ int∩ tw∩ classes║á directeΣ i/∩ option≤ anΣ ì
operationa∞ parameters « Notσ tha⌠ parameter≤ reaΣ froφ file≤ ì
o≥á froφ thσ consolσ arσ no⌠ forceΣ t∩ uppe≥ case¼á bu⌠á thσ ì
interna∞á filσá handlinτ routine≤ al∞ trea⌠á lowe≥á casσá a≤ ì
uppe≥ case.
Wheεá ßá filσ t∩ bσ writteε alread∙ exists¼á i⌠á i≤á quietl∙ ì
overwritten.
è
DirecteΣ I/O parameters║
Thσá firs⌠á actioεá takeε b∙ thesσ program≤á i≤á t∩á proces≤ ì
directeΣá i/∩ parameter≤ froφ thσ CP/═ commanΣá line«á Thesσ ì
parameter≤ arσ optiona∞ anΣ takσ thσ forms:
<file read console input from file
>file send most console output to file
+file send most console output to file and console
|pgm ... send most console output to a temporary file
then run PGM.COM and take console input
from the temporary file. "..." represent the
parameters for PGM. This is called "piping".
Onl∙á onσ inpu⌠ anΣ onσ outpu⌠ redirectioε caε appl∙ t∩ eacΦ ì
program« Afte≥ thσ prograφ ha≤ arrangeΣ fo≥ an∙ directeΣ i/∩ ì
parameter≤ t∩ bσ obeyeΣ the∙ arσ deleteΣ froφ thσá paramete≥ ì
lis⌠ seeε b∙ thσ res⌠ oµ thσ program.
Operationa∞ parameters║
Thσáá prograφá theεá check≤á iµá therσá arσá an∙áá remaininτ ì
parameter≤ froφ thσ CP/═ commanΣ line«á Iµ therσá are¼á the∙ ì
arσ obeyed« Iµ anΣ onl∙ iµ therσ arσ n∩ remaininτ parameter≤ ì
oεá thσá commanΣ line¼á thσ prograφ prompt≤ fo≥ theφ a⌠á thσ ì
console«á Iµá consolσ inpu⌠ ha≤ beeε directeΣ t∩ ß filσá onσ ì
paramete≥á i≤á reaΣ anΣ obeyeΣ froφ eacΦ linσ oµá thσá file« ì
Otherwise¼á thσá use≥á follow≤ eacΦ typeΣ paramete≥á witΦá ß ì
RETUR╬ anΣ aε empt∙ commanΣ exit≤ thσ program.
EacΦá operationa∞ paramete≥ i≤ obeyeΣ withou⌠ lookinτá aheaΣ ì
t∩á othe≥á parameters¼á s∩ option≤ shoulΣ precedσá thσá filσ ì
names to which they apply.
SQ operational parameters are a list of the following types:
drive: set the current destination drive
filename file to be squeezed
drive:filename " " " "
S╤ doe≤ no⌠ changσ thσ file≤ beinτ squeezed« New¼ squeezeΣ ì
file≤ arσ createΣ oε thσ destinatioε drivσ (default≤ t∩á thσ ì
curren⌠ drive⌐ witΦ name≤ deriveΣ froφ thσ origina∞ namσ bu⌠ ì
witΦá thσ seconΣ lette≥ oµ thσ filσ typσ (extention⌐ changeΣ ì
t∩ Q«á Wheε therσ i≤ n∩ type¼ QQ╤ i≤ used« Thσ origina∞ namσ ì
i≤ saveΣ iε thσ squeezeΣ file.
US╤á operationa∞á parameter≤á arσ ß lis⌠á oµá thσá followinτ ì
types:
drive: set the current destination drive
filename file to be squeezed
drive:filename " " " "
-count Preview (display on the console) the first
"countóá line≤á oµá eacΦáá file¼áá wherσ ì
"count" is a number from 1 to 65535.
èIµá thσá -coun⌠á optioε I╙ NO╘ iε effec⌠á theεá US╤á create≤ ì
unsqueezeΣá version≤ oµ thσ listeΣ file≤ oε thσá destinatioε ì
drive¼á whicΦá default≤ t∩ thσ curren⌠á loggeΣá drive«á EacΦ ì
unsqueezeΣá filσ i≤ CR├ checkeΣ agains⌠ thσ CR├ valuσ oµ thσ ì
origina∞ file¼ whicΦ i≤ par⌠ oµ thσ squeezeΣ file.
Thσá -coun⌠á optioε i≤ fo≥á previewinτá squeezeΣá files«á I⌠ ì
allow≤á yo⌡á t∩á skiφá througΦ ß grou≡á oµá squeezeΣá files¼ ì
peekinτá a⌠á thσ firs⌠ "countó line≤ iε each«á Thσá ╛á o≥á ½ ì
outpu⌠á redirectioεá optioε coulΣ bσ useΣá t∩á capturσá thi≤ ì
informatioεá iε ß file¼á alonτ witΦ thσ correspondinτá filσ ì
names¼ thu≤ forminτ aε abstrac⌠ oµ thσ file≤ oε ß disk.
Wheεá thσá -coun⌠ optioε i≤ useΣ thσ CR├ checδ i≤á cancelleΣ ì
anΣá thσá outpu⌠ i≤ forceΣ int∩ printablσ forφ b∙á strippinτ ì
thσá parit∙ bi⌠ anΣ changinτ mos⌠ unprintablσ character≤á t∩ ì
periods«á Thσ exception≤ arσ CR¼á LF¼ TA┬ anΣ FF« Thσ outpu⌠ ì
froφá eacΦ filσ i≤ terminateΣ b∙ aε FF«á PI╨ caε bσ useΣá t∩ ì
stri≡ FF≤ anΣ providσ formatteΣ printinτ iµ desired« "Countó ì
default≤ t∩ thσ maximuφ value¼á 65,535¼á iε casσ yo⌡ wan⌠ t∩ ì
looδ a⌠ ß wholσ file.
FL╙ operationa∞ parameters║á FL╙ i≤ ß "filter"¼á whicΦ mean≤ ì
i⌠á accept≤ inpu⌠ froφ thσ consolσ inpu⌠ o≥ commanΣ linσ anΣ ì
transform≤ thσ inpu⌠ accordinτ t∩ ß se⌠ oµ rule≤ t∩á producσ ì
consolσá output«á That'≤ finσ fo≥ gettinτ familia≥ witΦ FLS¼ ì
bu⌠ t∩ makσ i⌠ usefu∞ yo⌡ "pipeó it≤ outpu⌠ t∩ thσ inpu⌠á oµ ì
S╤ o≥ USQ.
An∙ FL╙ paramete≥ whicΦ i≤ oµ thσ form:
drive:
or -anything
i≤á copieΣá t∩ consolσ outpu⌠ unchanged«
An∙á othe≥á FL╙ operationa∞ paramete≥ i≤ treateΣ a≤á ßá filσ ì
namσ anΣ i≤ checkeΣ agains⌠ thσ director∙ oµ thσ appropriatσ ì
drive« Iµ i⌠ contain≤ ¬ o≥ ┐ i⌠ i≤ replaceΣ b∙ ß lis⌠ oµ al∞ ì
thσ file≤ whicΦ fi⌠ thσ pattern«á Iµ nothinτ i≤ founΣ iε thσ ì
director∙á aε erro≥ commen⌠ i≤ sen⌠ t∩ thσ console¼á eveε iµ ì
norma∞ consolσ outpu⌠ ha≤ beeε redirecteΣ t∩ ß file.
IMPORTANT║á wheεá usinτá ß pipσ froφ FL╙ o≥ an∙ othe≥á inpu⌠ ì
redirectioε t∩ ge⌠ thσ filσ list¼á etc.¼á oε whicΦ US╤ o≥ S╤ ì
arσá t∩ operatσ yo⌡ mus⌠ NO╘ pu⌠ an∙ parameter≤á othe≥á thaε ì
redirectioεá followinτá thσ prograφ name«á The∙ mus⌠ bσá al∞ ì
togethe≥ iε thσ inpu⌠ paramete≥ list« Example:
A>fls -10 b:*.cq |usq +saveout
i≤á thσá prope≥ wa∙ t∩ previe≈ thσ to≡ (firs⌠ 1░á lines⌐á oµ ì
eacΦá squeezeΣá .├ filσ oε thσ ┬ drive«á Thσ -1░á i≤á passeΣ ì
througΦá FL╙á t∩ USQ«á Thσ result≤ wil∞ bσ displayeΣ oεá thσ ì
consolσá anΣá saveΣ iε filσ "saveoutó oε thσá ┴á drive«á Thσ ì
saveou⌠á filσ let≤ yo⌡ confirφ thσ lis⌠ oµá processeΣá file≤ ì
eveεá iµá thσ displa∙ scroll≤ ofµ thσ screeεá whilσá runninτ ì
unattended.è
Iε summary¼ i/∩ redirectioε parameter≤ (thosσ prefixeΣ b∙ +¼ ì
<¼á >¼á o≥ |⌐ alway≤ follo≈ thσ commanΣ t∩ whicΦ the∙ apply¼ ì
bu⌠á operationa∞ parameter≤á (destinatioεá drive¼á -options⌐ ì
mus⌠ bσ witΦ thσ filσ namσ list.
EXAMPLES:
1« Unsqueezσ al∞ squeezeΣ file≤ oε thσ curren⌠ drivσ anΣ pu⌠ ì
thσ resultinτ unsqueezeΣ file≤ oε thσ samσ drive.
A>fls *.?q? |usq
2«á Looδá a⌠á thσ firs⌠ 1░ line≤ oµ ever∙ squeezeΣá filσá oε ì
drivσ B.
A>fls -10 b:*.?Q? |usq
notσá tha⌠ sincσ thσ filσ name≤ fo≥ US╤ camσ froφá FLS¼á thσ ì
coun⌠ optioε haΣ t∩ comσ froφ therσ too.
4«á Squeezσ al∞ .AS═ file≤ oε thσ ┬ anΣ ├ drive≤ anΣ pu⌠ thσ ì
squeezeΣ file≤ oε thσ ─ drive.
A>fls d: b:*.asm c:*.asm |sq
Notσ tha⌠ iµ d║á haΣ no⌠ beeε firs⌠ thσ squeezeΣ file≤ woulΣ ì
havσ gonσ t∩ thσ ┴ drive.
5«á Squeezσ filσ xyz.π oε thσ ┴ drivσ anΣ pu⌠ thσ result≤ oε ì
thσ ┴ drive.
A>sq xyz.c
6«á BuilΣá ßá paramete≥ lis⌠ oµ al∞ AS═ file≤ oε drivσ ├á iε ì
filσ XX.PA╥ anΣ vie≈ i⌠ oε thσ console.
A>fls c:*.asm +xx.par
7« Usσ thσ abovσ lis⌠ t∩ squeezσ thσ file≤ t∩ thσ ┴ drive.
A>sq <xx.par
8« A≤ above¼ bu⌠ result≤ t∩ thσ ┬ drive.
A>b:
B>a:sq <a:xx.par
9«á Squeezσá al∞ AS═ anΣ ├ file≤ oε thσ ┴ drivσ anΣ pu⌠á thσ ì
result≤ oε thσ ┬ drive« Capturσ thσ progres≤ comment≤ iε thσ ì
filσ "outó withou⌠ displayinτ them.
A>fls b: *.asm *.c |sq >out
10«á Previe≈á thσ firs⌠ 2┤ line≤ oµ eacΦ squeezeΣá AS═á filσ ì
THE╬ unsqueezσ theφ (unles≤ stoppeΣ viß cntl-C).
A>fls -24 *.aqm a: *.aqm |usq
Notσá tha⌠á specificatioεá oµ ßá destinatioεá drivσá cancel≤ ì
previewing.
RECOMPILATION:
Thesσ program≤ arσ writteε iε ├ anΣ thσ instruction≤ arσ fo≥ ì
thσ BD╙ ├ compiler« Thσ librarie≤ mus⌠ havσ beeε adapteΣ fo≥ ì
directed i/o as described in DIO2.C.
Thσá procedure≤ belo≈ indicatσ thσ variou≤ ├ languagσ sourcσ ìèfile≤á (filσá typσ .C⌐ requireΣ t∩á recompile«á Thosσá file≤ ì
contaiεá #includσ statement≤ whicΦ causσ heade≥ file≤á (filσ ì
typσá .H⌐ t∩ bσ reaΣ anΣ compiled«á Thσ BDSCIO.╚ heade≥ filσ ì
contain≤ informatioε abou⌠ you≥ system¼á includinτ ho≈á mucΦ ì
spacσá t∩ reservσ fo≥ filσ buffers«á Yo⌡ shoulΣ usσ you≥ owε ì
versioε oµ thi≤ file.
Thσ sourcσ file≤ DIO2.C¼ SQDIO.├ anΣ USQDIO.├ arσ identicalí ì
Iµ yo⌡ onl∙ ge⌠ one¼á jus⌠ usσ PI╨ t∩ creatσ thσ rest«á The∙ ì
arσ separate onl∙ t∩ providσ separate CR╠ files¼á whicΦá arσ ì
needeΣá becausσ oµ thσ differen⌠ externa∞ variablσá options« ì
Notσá tha⌠á the∙á d∩á no⌠á includσá al∞á thσá heade≥á files¼ ì
thereforσá thσá othe≥á sourcσá file≤ mus⌠á includσá thσá di∩ ì
relateΣ header≤ first.
DIO.├ i≤ supplieΣ witΦ BD╙ C«á Thσ abovσ threσ file≤á diffe≥ ì
froφá thσ officia∞ versioε onl∙ b∙ ß changσ t∩ thσá dioflusΦ ì
functioε t∩ ensurσ TEMPIN.$$ñ i≤ deleteΣ beforσ anothe≥ filσ ì
i≤ renameΣ t∩ tha⌠ name«á (CP/═ i≤ stupiΣ enougΦ t∩ makσ tw∩ ì
file≤ oµ thσ samσ name!).
Thσ procedurσ fo≥ buildinτ thσ SQ.CO═ anΣ USQ.CO═ file≤ froφ ì
thei≥á sourcσ file≤ follows«á Notσ tha⌠ ╔ havσá renameΣá thσ ì
firs⌠á phasσá oµ thσ BD╙ ├ compile≥ t∩ CC.COM«á Als∩ ╔á wil∞ ì
assumσá thσ BD╙ ├ packagσ i≤ oε drivσ ─ anΣ thσ S╤á anΣá US╤ ì
relateΣ file≤ arσ oε ┬ alonτ witΦ BDSCIO.╚ anΣ DIO.H.
EacΦá C├ commanΣ produce≤ ß CR╠ filσ witΦ specifiπ addresse≤ ì
fo≥á externa∞ variables«á Iµ yo⌡ recompilσ ß filσá witΦá thσ ì
samσá valuσ iε thσ -σ optioε yo⌡ don'⌠ havσ t∩ recompilσ thσ ì
othe≥á files¼á jus⌠á d∩ thσ desireΣ C├ anΣ theεá repea⌠á thσ ì
entirσ CLINK.
CLINK'≤ -≤ optioε print≤ statistics« To≡ oµ memor∙ mean≤ thσ ì
curren⌠ TPA« Stacδ spacσ i≤ what'≤ lef⌠ over« Thesσ program≤ ì
requirσá stacδá spacσ fo≥ loca∞á variables¼á includinτá somσ ì
health∙ i/∩ buffers«á Als∩ somσ function≤ arσ recursive«á Iµ ì
S╤ doesn'⌠ havσ severa∞ ╦ oµ stacδ spacσ i⌠ wil∞ probabl∙ g∩ ì
craz∙ anΣ d∩ almos⌠ anything.
For SQ (note not all use -o):
D>cc b:sq.c -o -e3200
D>cc b:sqdio.c -e3200
D>cc b:tr1.c -o -e3200
D>cc b:tr2.c -o -e3200
D>cc b:io.c -o -e3200
D>clink b:sq sqdio tr2 tr1 io -s
Thσ linke≥ wil∞ displa∙ somσ statistics« Checδ tha⌠ thσ las⌠ ì
codσá addres≤ i≤ les≤ thaε thσ star⌠ addres≤ oµ thσ externa∞ ì
variable≤ (320░ iε thi≤ example)«á Iµ not¼á repea⌠ thσ abovσ ì
witΦ ß highe≥ addres≤ iε thσ -σ options.
Fo≥ US╤ (note║ -e280░ ma∙ bσ enough« Notσ no⌠ al∞ use -o):
D>cc b:usq.c -o -e2900èD>cc b:usqdio.c -e2900
D>cc b:utr.c -o -e2900
D>clink b:usq usqdio utr -s
Check the addresses as described above.
For FLS:
D>cc b:fls.c
D>cc b:dio2.c
D>clink b:fls dio2
IN CASE OF TROUBLE:
╔á welcomσá suggestion≤á anΣá buτá reports¼áá bu⌠á yo⌡á mus⌠ ì
understanΣ tha⌠ somσ oµ thσ idea≤ ╔ ge⌠ woulΣ involvσ almos⌠ ì
a≤ mucΦ prograφ developmen⌠ a≤ thσ origina∞ package«á ╔ havσ ì
wha⌠ ╔ wan⌠ anΣ (╔ hope⌐ wha⌠ mos⌠ user≤ want¼á s∩ ╔ aφá no⌠ ì
motivateΣá t∩á spenΣá man∙ morσá month≤á creatinτá somethinτ ì
entirel∙á differen⌠á whicΦá jus⌠á happen≤á t∩á involvσá datß ì
compression« Thσ datß compressioε routine≤ arσ probabl∙ les≤ ì
thaεá halµ oµ thi≤ package¼á anΣ arσ designeΣ t∩ operatσá oε ì
largσ block≤ oµ data¼ sucΦ a≤ files.
Dick Greenlaw
251 Colony Ct.
Gahanna, Ohio 43230
614-475-0172 weekends and evenings