home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
utils
/
filcpy
/
rpl.lbr
/
RPL.WZ
/
RPL.WS
Wrap
Text File
|
1987-02-15
|
7KB
|
172 lines
.hm 1
.mb 6
.he R P L -- Replace Copy Version 1.0
RP╠ - Replacσ Cop∙ Versioε 1.░
Holme≤ Complea⌠ Computing
RicharΣ A« Holmes
484╡ Saε Sebastiaε Avenue
La≤ Vegas¼ N╓ 8912▒
Februar∙ 12¼ 1987
Thi≤ prograφ i≤ iε thσ publiπ domain«á Permissioε i≤ hereb∙ ì
granteΣ fo≥ thσ non-commercia∞ usσ oµ thi≤ program« N∩ guaranteσ ì
oµ suitabilit∙ i≤ made.
Introduction
------------
RP╠á i≤ ß Z8░ CP/═ 2.▓ prograφ useΣ t∩ cop∙ disδ files«á I⌠ ì
caε perforφ thσ basiπ functioε oµ PIP« Therσ arσ howeve≥ severa∞ ì
differences«á Iε additioε t∩ no⌠ acceptinτ PIP'≤ switches¼ thesσ ì
majo≥ difference≤ exist:
a« Iµ thσ destinatioε filσ alread∙ exists¼ i⌠ i≤ overwritteε ì
iε place«á Thσ filσ i≤ no⌠ firs⌠ copieΣ anΣ theε renamed« Iµ thσ ì
ne≈ versioε oµ thσ filσ i≤ longe≥ thaε thσ olΣ one¼ morσ spacσ i≤ ì
allocateΣá anΣ thσ wholσ filσ i≤ copied«á Iµ thσ ne≈ versioεá oµ ì
thσ filσ i≤ shorte≥ thaε thσ olΣ one¼á thσ extrß disδ sector≤ arσ ì
no⌠ deallocated«á The∙ exis⌠ a≤ unuseΣ sector≤ oε thσ enΣ oµ thσ ì
file.
b«á Beforσá RP╠ allocate≤ ne≈ spacσ oε thσá disk¼á i⌠á firs⌠ ì
create≤ ß temporar∙ filσ oµ (nominally⌐ 4K« Thi≤ spacσ presumabl∙ ì
i≤á nex⌠ t∩ thσ directory«á Theε thσ ne≈ spacσ i≤ allocateΣá fo≥ ì
thσá filσ cop∙ anΣ thσ temporar∙ filσ i≤ deleted«á Thus¼á iµ thσ ì
spacσ nex⌠ t∩ thσ director∙ i≤ no⌠ allocateΣ beforσ thσ cop∙á wa≤ ì
performed¼ i⌠ remain≤ unallocateΣ afte≥ thσ copy.
c«á RP╠ caε handlσ use≥ number≤ oµ thσ forφ du║á wherσ "dó ì
i≤á aεá optiona∞á disδá namσ anΣ "uó i≤á thσá use≥á number«á Fo≥ ì
example¼á an∙á oµ thσ followinτ arσ acceptablσ a≤ par⌠ oµá eithe≥ ì
thσ sourcσ o≥ thσ destinatioε filσ specification.
A0║ 3B║ E14║ 5║ C:
Wh∙ Usσ It?
-----------
Therσá arσ severa∞ case≤ wherσ RP╠ i≤ preferablσá ove≥á PIP« ì
Thσ firs⌠ i≤ wheε thσ destinatioε disδ doe≤ no⌠ havσ spacσ fo≥ aε ì
extrßá cop∙ oµ thσ file«á Normall∙ yo⌡ woulΣ havσ t∩ deletσá thσ ì
filσá froφ thσ disδ beforσ copyinτ i⌠ witΦ PIP«á RP╠ wil∞ simpl∙ ì
overwritσ thσ filσ s∩ therσ i≤ n∩ neeΣ t∩ deletσ i⌠ first.è
Thσ seconΣ casσ i≤ wherσ yo⌡ wan⌠ t∩ usσ use≥ number≤ oε thσ ì
sourcσ anΣ thσ destinatioε filσ specifications«á RP╠ caε cop∙ t∩ ì
o≥ froφ an∙ use≥ number.
Thσá maiεá reasoε ╔ wrotσ i⌠ follows«á I⌠ ha≤ t∩á d∩á witΦ ì
runninτá ofµ oµ floppie≤ anΣ keepinτ spacσ opeε a⌠ thσá beginninτ ì
oµ thσ Drivσ ┴ disδ fo≥ SUBMIT'≤ $$$.SU┬ file« Le⌠ mσ explain.
╔á ruεá oεá IMSAI'≤ witΦ Z8░á cpus¼á floppie≤á anΣá ramdisk« ì
Wheneve≥ possible¼á ╔ loaΣ u≡ ramdisδ (drivσ E:⌐ anΣ makσ i⌠á thσ ì
defaul⌠ drive«á ╔ stil∞ warφ boo⌠ froφ thσ floppy« ╔ als∩ writσ ì
thσá SUBMI╘ workinτ filσ t∩ drivσ A«á ╔ tr∙ t∩ carefull∙ la∙ ou⌠ ì
thσ systeφ flopp∙ disδ iε A║ t∩ optimizσ filσ access« Tha⌠ is¼ ╔ ì
kee≡ somσ spacσ freσ nex⌠ t∩ thσ director∙ (fo≥ $$$.SUB⌐ anΣ theε ì
comσ thσ systeφ utilities¼á witΦ thσ mos⌠ frequentl∙ useΣ neares⌠ ì
thσ directory.
Wheneve≥ ╔ wan⌠ t∩ updatσ ß filσ oε thi≤ systeφ disk¼á ╔á d∩ ì
no⌠á wan⌠ thσ spacσ nex⌠ t∩ thσ director∙ t∩ bσá allocated«á Thσ ì
file≤á oεá thi≤á disδ arσ usuall∙ invarian⌠ iεá size«á The∙á arσ ì
usuall∙á replaceΣá b∙á ßá differen⌠á configuratioεá oµá thσá samσ ì
program«á Usuall∙á sucΦá file≤á wil∞ fi⌠ exactl∙á ove≥á thσá olΣ ì
version«á Wheεá thσ ne≈ versioε oµ thσ filσ i≤ larger¼á ╔á don'⌠ ì
wan⌠á thσá extrßá spacσ t∩ bσ allocateΣ nex⌠á t∩á thσá directory« ì
Thereforσá RP╠ create≤ ß temporar∙ filσ whicΦ "coversó thi≤ spacσ ì
oεá disk«á I⌠ theε copie≤ thσ ne≈ sector≤ t∩ thσá disδá (farthe≥ ì
awa∙ froφ thσ directory⌐ anΣ append≤ theφ t∩ thσ olΣ file«á Theε ì
thσá temporar∙á filσá i≤ deleted¼á makinτ thσ spacσ nex⌠á t∩á thσ ì
director∙ availablσ again.
Usage
------
RP╠á i≤ executeΣ witΦ ß commanΣ tha⌠ look≤ likσ ß simplσ PI╨ ì
command«
A╛ RP╠ out=in
wherσ "outó i≤ thσ destinatioε filσ specificatoε anΣ "inó i≤á thσ ì
sourcσ filσ specification« Thσ filσ specification≤ ma∙ includσ ß ì
drive¼ use≥ number,filenamσ anΣ extension« Fo≥ example,
A╛ RP╠ XYZ.ABC=A7:FOO
wil∞á cop∙á FO╧ froφ use≥ ╖ oε drivσ ┴ t∩ XYZ.AB├ iε thσá curren⌠ ì
use≥á areß oε thσ defaul⌠ drive«á Iµ thσ filenamσ anΣá extensioε ì
arσ omitteΣ froφ thσ destinatioε filespec¼á theε thσ filenamσ anΣ ì
extensioε froφ thσ sourcσ filespeπ arσ used« Fo≥ example,
A╛ RP╠ E:=B:FOO.BAZ
copie≤ FOO.BA┌ froφ drivσ B║ t∩ E:.
WildcarΣá character≤á (¬ anΣ ?⌐ arσ alloweΣá iεá thσá sourcσ ì
filenamσá and/o≥á extensioεá witΦá thσá expecteΣá results«áá Fo≥ ìèexample,
A╛ RP╠ B:=E:*.COM
copie≤ thσ .CO═ file≤ froφ E║ t∩ B:.
Followinτá thσ filσ spec≤ ma∙ bσ ß specificatioε oµ ho≈ mucΦ ì
spacσ t∩ reservσ beforσ allocatinτ spacσ t∩ thσ copieΣ file« Thσ ì
forφ i≤
A╛ RP╠ out=iε $nnk
wherσ "nnó i≤ ß onσ o≥ tw∩ digi⌠ decima∞ numbe≥ iε thσ rangσ ░ t∩ ì
32« Fo≥ example,
A╛ RP╠ FOO=BA┌ $8K
specifie≤á reservinτ 8╦ oµ disδ spacσ beforσ allocatinτ ne≈á secì
tor≤ t∩ FOO« B∙ default¼ 4╦ i≤ reserved.
Installatioε Procedures
-----------------------
Thi≤ prograφ i≤ distributeΣ iε RPL.LBR« Thσ file≤ includeΣ
are:
RPL.BL╦ F8░ Commoε blocδ declarations
RPL.DC╠ F8░ declaration≤ fo≥ RPL.BLK
RPL.DO├ Thi≤ documentatioε iε printablσ form
RPL.FO╥ F8░ subroutines
RPL.OB╩ RPL.COM
RPL.RE╠ Microsof⌠ RE╠ filσ fo≥ RPL.FOR
RPL.SU┬ SUBMI╘ filσ fo≥ workinτ witΦ RPL.FOR
RPL.W╙ Thi≤ documentatioε iε WordSta≥ format
RS.SU┬ SUBMI╘ filσ fo≥ workinτ witΦ RPLSUBS.MAC
RPLSUBS.MA├ M8░ subroutine≤ anΣ maiε program
RPLSUBS.RE╠ Microsof⌠ RE╠ filσ fo≥ RPLSUBS.MAC
Iµ yo⌡ recompile/assemble¼ bσ carefu∞ oµ thσ loaΣ order« Seσ ì
thσ .SU┬ file≤ fo≥ thσ prope≥ sequence.
Notσá tha⌠ thσ prograφ i≤ 8╦ long¼á bu⌠ expect≤ therσ t∩á bσ ì
contiguou≤ memor∙ u≡ t∩ abou⌠ 30K«á I⌠ doe≤ no⌠ checδ fo≥á this¼ ì
jus⌠ use≤ it.
Therσá arσá somσá LDI╥ instruction≤ anΣá relativσá jump≤á iε ì
RPLSUBS.MAC«á Thi≤á mean≤á yo⌡ mus⌠ bσ runninτ ß Z8░ machinσá o≥ ì
changσ thσ sourcσ code«
If you find the program useful, feel free to send $5.00 to
Richard A. Holmes
4845 San Sebastian Avenue
Las Vegas, NV 89121