home *** CD-ROM | disk | FTP | other *** search
-
- Alia≤ 1.5
- b∙ Joσ Wrigh⌠ ▒ Septembe≥ 1990
-
-
- ALIAS░ ái≤ thσ actua∞ alia≤ modulσ writteε t∩ disk« I⌠ áha≤ ábeeε ì
- enhanceΣ ásomewha⌠ át∩ áallo≈ al∞ fivσ ásysteφ áfilename≤ át∩ ábσ ì
- addressed¼ á$F░ beinτ thσ prototypσ SH.VA╥ shel∞ ávariablσ áfile« ì
- Thσ á'Tº áfiletypσ operato≥ wa≤ pu⌠ bacδ iε sucΦ átha⌠ á$T░ áwil∞ ì
- poin⌠ át∩ VAR« Thσ 'Tº variablσ wa≤ removeΣ iε versioε á1.▒ áfo≥ ì
- somσ reasoε tha⌠ ╔ don'⌠ understand« Iε an∙ case¼ ╔ havσ pu⌠ ái⌠ ì
- bacδ in.
-
- A≤ ábefore¼ áALIA╙ ha≤ onσ 'escapeº character¼ '$º ádollar« á Thσ ì
- character≤ followinτ '$º arσ interpreteΣ t∩ mean..
-
- $ε Wherσ ε varie≤ ░ througΦ 9«
- $░ return≤ thσ NAM┼ oµ thi≤ alia≤ (froφ EXTFCB)
- $▒ return≤ thσ firs⌠ tokeε oε thσ commanΣ line
- $╣ return≤ thσ nintΦ tokeε oε thσ commanΣ line
-
- An∙ á$ε whicΦ doe≤ no⌠ havσ ß correspondinτ tokeε return≤ ß áNUL╠ ì
- string¼ nothing.
-
- $¬ Thσ entirσ commanΣ linσ withou⌠ furthe≥ translatioε
- $─ Thσ curren⌠ drivσ letter
- $╒ Thσ curren⌠ use≥ number
-
- Fo≥ áF¼ á╬ anΣ T¼ n=░ i≤ thσ SH.VA╥ filenamσ anΣ n=1..┤ áarσ áthσ ì
- standarΣ Systeφ Filσ names.
-
- $Fε Systeφ Filσ ε Namσ anΣ Typσ a≤ NAME.TY╨ (ε i≤ 0..4)
- $Nε Systeφ Filσ ε Namσ a≤ simpl∙ NAM┼ (ε i≤ 0..4)
- $Tε Systeφ Filσ ε Typσ a≤ simpl∙ TY╨ (ε i≤ 0..4)
- $ñ Simpl∙ returε onσ '$º t∩ thσ commanΣ line
-
- ALIAS1╡ implemen⌠s ß ne≈ Pointe≥ paramete≥ whicΦ wil∞ expanΣ t∩ ß ì
- hexadecima∞ áaddress« Thσ Pointe≥ wil∞ allo≈ acces≤ át∩ ádynamiπ ì
- memor∙ value≤ withiε ß knowε datß structurσ (thσ basσ pagσ o≥ thσ ì
- environmen⌠ descriptor¼ ß jum≡ table¼ etc.)«
-
- Syntax║ $.ADDR[[[.OFF].OFF]+OFF]
-
- Thσ alia≤ paramete≥ i≤ formeΣ witΦ ß '$º followeΣ b∙ ß '.º ápoin⌠ ì
- followeΣ b∙ aε address« Oε expansion¼ i⌠ wil∞ returε thσ WorΣ a⌠ ì
- thσ áaddress« á Fo≥ áexample¼ á'$.6º wil∞ áreturε áthσ ávaluσ áiε ì
- location≤ á╢ áanΣ á╖ oµ thσ basσ ápage¼ áthσ á'protecteΣ ámemoryº ì
- address¼ somethinτ likσ C70╢ o≥ whateve≥ thσ BDO╙ entr∙ is«
-
- Wσ caε als∩ finΣ thσ Z│ Environment« Thσ alia≤ itselµ i≤ ß ZCPR│ ì
- Typσ á▒ filσ witΦ ß standarΣ Z│ header« Thσ addres≤ oµ Z3EN╓ ái≤ ì
- alway≤ áa⌠ 109Φ iε sucΦ ß file« Thσ forφ '$.109º wil∞ expanΣ át∩ ì
- thσ he° addres≤ oµ thσ Environmen⌠ (E78░ iε m∙ case).
-
- T∩ áfinΣ áaε áaddres≤ iε thσ áEnvironmen⌠ áDescriptor¼ áZ3C╠ áfo≥ ìèexample¼ ááwσ áappenΣ áit≤ áoffset« á '$.109.18º áwil∞ áge⌠ ááthσ ì
- environmen⌠ áaddres≤ a⌠ 109h¼ adΣ 18Φ t∩ i⌠ anΣ returε thσ ávaluσ ì
- containeΣ áthere¼ áthσ addres≤ oµ Z3C╠ (E90░ iε ám∙ ácase)« á Thσ ì
- valuσ áa⌠ Z3C╠ i≤ thσ NXTCH╥ pointer« Returε thi≤ witΦ onσ ámorσ ì
- leve∞ oµ indirectioε a≤ '$.109.18.0'«
-
- $.▒ (0001H⌐ BIOS+│ D50│ (m∙ system)
- $.╢ (0006H⌐ BDO╙ C706
-
- $.10╣ (0109H⌐ Z3EN╓ E780
- $.109.1╕ (Z3ENV+18⌐ Z3C╠ E900
- $.109.18.░ (Z3CL⌐ NXTCH╥ E9nn
-
- Let'≤ conside≥ thσ Z3MS╟ buffer.
-
- $.109.2▓ (Z3ENV+22⌐ Z3MS╟ E880
-
- Thσ Erro≥ Addres≤ a⌠ Z3MSG+┤ i≤ returneΣ with..
-
- $.109.22.┤ (Z3MSG+4)
-
- Thσ pointer≤ caε havσ a≤ man∙ level≤ oµ indirectioε a≤ ánecessar∙ ì
- bu⌠ ╔ usuall∙ gσ⌠ los⌠ afte≥ tw∩ o≥ three.
-
- Wσ caε als∩ adΣ aε offse⌠ t∩ ß pointer« Fo≥ example..
-
- $.109.22+╢ áwil∞ poin⌠ t∩ thσ Prograφ Erro≥ flaτ a⌠ Z3MSG+6« á O≥ ì
- poin⌠ át∩ Systeφ Filσ ▒ iε thσ environmen⌠ witΦ á'$.109+52'« á Wσ ì
- caε áusσ thσ '+º o≥ º-º operator≤ t∩ providσ aε offse⌠ áfroφ áthσ ì
- memor∙ ávariable« Fo≥ example¼ '$.1+3º wil∞ returε áBIOS+6¼ áthσ ì
- CONS╘ áentr∙ whilσ '$.▒-3º return≤ BIOS+0¼ thσ beginninτ áoµ áthσ ì
- bios« á Wσ caε als∩ usσ thi≤ a≤ thσ basi≤ oµ thσ nex⌠ elemen⌠ áiε ì
- thσ Pointe≥ parameter« Anothe≥ example..
-
- Thσ Ampr∩ bio≤ i≤ structureΣ sucΦ tha⌠ thσ Disδ Paramete≥ Header≤ ì
- oµ áal∞ sixteeε possiblσ drive≤ reside¼ startinτ witΦ áthσ áfirs⌠ ì
- flopp∙ drive¼ a⌠ BIOS+80H« Wσ caε extrac⌠ an∙ oµ thσ pointer≤ iε ì
- an∙ oµ thσ header≤ witΦ somσ simplσ math« Let'≤ ge⌠ thσ áaddres≤ ì
- oµ áthσ áSecto≥ Translatσ Tablσ fo≥ drivσ ┼ (4)« á XLAT┼ ái≤ áthσ ì
- firs⌠ pointe≥ iε an∙ DPH.
-
- Assuminτ NZCOM¼ i⌠ i≤ thσ CBIO╙ wσ arσ interesteΣ in« ╔ wil∞ ág∩ ì
- througΦ thi≤ ste≡ b∙ ste≡ anΣ simplif∙ thing≤ a⌠ thσ end..
-
- $.109.▒ (Z3ENV+1⌐ CBIOS+╢ EA06
- $.109.1-╢ CBIOS+6-╢ CBIO╙ EA00 ì
- $.109.1-6+8░ CBIOS+8░ CBIOS+8░ EA80
- $.109.1-6+80+4░ CBIOS+C0╚ CBIOS+C0╚ EAC0
- $.109.1-6+80+40.░ (CBIOS+C0H⌐ EXLAT┼ EC22
-
- Wσ simplif∙ thσ matΦ with..
-
- $.109.1+BA.░ á anΣ áwσ havσ it« ╔ aφ no⌠ surσ áho≈ áusefu∞ áthi≤ ì
- reall∙ i≤ bu⌠ i⌠ i≤ therσ iµ wσ eve≥ neeΣ it.
-
- èThσ alia≤ createΣ b∙ ALIAS1╡ i≤ seveε record≤ long« Thσ standarΣ ì
- alia≤ áwa≤ áeigh⌠ árecord≤ anΣ n∩ alia≤ áma∙ ábσ álonger« á Alia≤ ì
- editor≤ iε genera∞ wil∞ rejec⌠ ß filσ oµ ninσ o≥ morσ record≤ anΣ ì
- declarσ i⌠ 'No⌠ aε Alias'« Thi≤ eigh⌠-recorΣ lengtΦ i≤ arbitrar∙ ì
- bu⌠ historical«
-
- Thσ alia≤ wil∞ builΣ ß CC╨ commanΣ iε ß loca∞ buffe≥ accordinτ t∩ ì
- it≤ áargument≤ anΣ thσ tai∞ passeΣ t∩ i⌠ a≤ i⌠ wa≤ ácalled« á An∙ ì
- pendinτ command≤ iε thσ MC╠ wil∞ bσ appendeΣ t∩ thi≤ loca∞ buffe≥ ì
- anΣ átheε thσ entirσ buffe≥ copieΣ t∩ thσ beginninτ oµ áthσ áMCL« ì
- Thσ alia≤ theε 'returnsº t∩ thσ CC╨ (ZCPR3⌐ fo≥ execution.ì
-
- VALIA╙ áanΣ áSALIA╙ implementeΣ ß Modσ contro∞ iε áthσ áalia≤ áa≤ ì
- Norma∞ o≥ Recursive« Iε Recursivσ Modσ thσ alia≤ wil∞ clea≥ áthσ ì
- res⌠ áoµ thσ MC╠ anΣ cop∙ onl∙ it≤ expansioε t∩ thσ beginninτ áoµ ì
- thσ áMCL« BotΦ VALIA╙ anΣ SALIA╙ maintaiε thi≤ flaτ a⌠ á10CΦ áiε ì
- thσ áalia≤ a≤ 00Φ iµ Norma∞ anΣ 0FFΦ iµ recursive¼ anΣ ß 46Φ á'Fº ì
- characte≥ a⌠ 10Bh«
-
- Thσ commanΣ tai∞ oµ ß giveε alia≤ entr∙ ma∙ bσ n∩ longe≥ thaε 12╢ ì
- character≤ becausσ oµ thσ constraint≤ oµ thσ TBUF╞ size« Iµ áthσ ì
- expansioε oµ ß particula≥ alia≤ linσ i≤ longe≥ thaε 12╢ byte≤ áwσ ì
- flaτ aε Ovf∞ erro≥ anΣ d∩ NO╘ movσ thσ alia≤ int∩ thσ MCL.
-
- No≈ át∩ thσ subjec⌠ oµ recursivσ aliases« Recursioε occur≤ áwheε ì
- aε áalia≤ ácall≤ áitself« á Thi≤ migh⌠ ábσ áusefu∞ áiε áaε áEDIT¼ ì
- ASSEMBLE¼ LIN╦ sessioε wherσ aε erro≥ flaggeΣ b∙ thσ assemble≥ o≥ ì
- linke≥ áwoulΣ áautomaticall∙ pu⌠ yo⌡ bacδ iε you≥ edito≥ át∩ átr∙ ì
- agaiε áanΣ áthσ absencσ oµ error≤ woulΣ linδ anΣ áexit« á ╔ áwil∞ ì
- leavσ thσ usσ oµ 'recursionº t∩ thσ reade≥ anΣ concentratσ oε ho≈ ì
- t∩ writσ aliae≤ whicΦ arσ properl∙ recursive.
-
- A⌠ áfirs⌠ áblush¼ i⌠ woulΣ seeφ tha⌠ wσ coulΣ d∩ ásomethinτ álikσ ì
- this..
-
- FOO║ PROGRA═ Somσ prograφ whicΦ set≤ thσ Erro≥ flag
- I╞ E╥ No≈ checδ fo≥ Error
- FO╧ Re-ruε FO╧ oε error
- F╔ Closσ thσ IF
-
- AnΣ áwσ can¼ almost« Iµ therσ i≤ aε error¼ FO╧ i≤ árerun« á Thi≤ ì
- leave≤ aε unresolveΣ I╞ oε thσ Flo≈ stacδ anΣ append≤ thσ las⌠ F╔ ì
- t∩ thσ 'newº alia≤ iε thσ MCL« EacΦ iteratioε pushe≤ anothe≥ áI╞ ì
- ont∩ áthσ Flo≈ stacδ anΣ add≤ anothe≥ F╔ t∩ thσ MCL« á Everythinτ ì
- i≤ finσ unti∞ eithe≥ thσ Flo≈ stacδ overflow≤ (eigh⌠ IF'≤ max⌐ o≥ ì
- thσ áMC╠ fill≤ u≡ witΦ al∞ thσ FI's« No⌠ reall∙ coo∞ becausσ áwσ ì
- neve≥ kno≈ ho≈ man∙ time≤ wσ reruε FO╧ no≥ ho≈ mucΦ rooφ wσ áhavσ ì
- iε thσ MCL«
-
- Thσ ásolutioε ái≤ ásimplσ ábu⌠ árequire≤ áß álittlσ áexplanation« ì
- Rewritσ áthσ alia≤ s∩ tha⌠ it≤ 'recursionº neithe≥ overflow≤ áthσ ì
- Flo≈ stacδ no≥ thσ MCL« Consider..
-
- FOO║ F╔ Closσ I╞ ER
- PROGRAM
- è I╞ ER
- FO╧ Reruε thi≤ alias
-
- Thi≤ onσ ha≤ n∩ pendinτ F╔ t∩ overflo≈ thσ MC╠ anΣ wil∞ kee≡ áthσ ì
- Flo≈ ástacδ ástraigh⌠ whilσ i⌠ i≤ 'recurring'« Thσ firs⌠ áF╔ ái≤ ì
- balanceΣ b∙ callinτ i⌠ correctl∙ witΦ anothe≥ alias¼ likσ this..
-
- RUN║ I╞ ╘ Impres≤ Truσ oε thσ Flo≈ stack
- FO╧ Executσ FOO
- F╔ Closσ thσ IF
-
- WatcΦ ho≈ nicel∙ thi≤ expands..
-
- RUN║ I╞ ╘ Se⌠ Flo≈ True
- FOO║ F╔ Closσ I╞ ╘ froφ RU╬ o≥ I╞ E╥ froφ FOO
- PROGRA═ Clear≤ (anΣ maybσ sets⌐ Erro≥ flag
- I╞ ER
- FO╧ Ruε FO╧ agaiε iµ ER
- F╔ Froφ RUN¼ Closσ I╞ E╥ froφ FO╧ wheε n∩ Error
-
- Perfectl∙ ábalanced« Writteε thi≤ way¼ recursivσ aliase≤ d∩ áno⌠ ì
- corrup⌠ eithe≥ thσ Flo≈ stacδ o≥ thσ MCL« Yo⌡ caε ente≥ command≤ ì
- followinτ áRU╬ oε thσ commanΣ linσ anΣ the∙ wil∞ áremaiε ápendinτ ì
- unti∞ RU╬ i≤ finisheΣ anΣ theε bσ executeΣ automatically.
-
- Therσ ái≤ án∩ apparen⌠ neeΣ fo≥ ß 'Recursivσ áModeº áalia≤ áwhicΦ ì
- clear≤ ápendinτ command≤ froφ thσ MC╠ a≤ i⌠ runs« 'Norma∞ áModeº ì
- work≤ quitσ nicely¼ thanδ you«
-
- RoΓ FriefelΣ ha≤ appriseΣ mσ oµ aε articlσ iε TC╩ 2╕ b∙ Ja∙ áSagσ ì
- whicΦ present≤ thσ samσ argumen⌠ oε recursioε a≤ above« ╔ swear¼ ì
- ╔ ádidn'⌠ áreaΣ tha⌠ article« Maybσ 'grea⌠ ámindsº áthinδ áalikσ ì
- afte≥ all« Perhap≤ ╔ caε offe≥ 'nestingº oµ aliases..
-
- RUN:
- I╞ ╘ PusΦ Truσ ont∩ thσ Flo≈ stack
- MAI╬ Ruε MAIN
- F╔ Po≡ thσ Flo≈ stacδ anΣ resumσ MC╠ commands
-
- MAIN:
- F╔ Po≡ thσ Flo≈ stack
- PROG▒ D∩ something« Se⌠ E╥ iµ wσ neeΣ FOO.
- I╞ ER
- FO╧ Ruε FO╧ iµ an∙ error
- FI
- I╞ E╥ FO╧ return≤ E╥ t∩ forcσ onσ morσ PROG1
- è MAIN
-
- FOO:
- FI
- PROG▓ D∩ something« Clea≥ E╥ t∩ d∩ PROG▓ again.
- I╞ ~E╥ Checδ thσ E╥ flag
- FO╧ Reruε PROG2
-
- Iε áthi≤ scenario¼ PROG▒ wil∞ bσ ruε anΣ oε error¼ PROG▓ i≤ árun« ì
- Iµ áPROG▓ i≤ run¼ i⌠ wil∞ repea⌠ unti∞ i⌠ set≤ E╥ anΣ theε áPROG▒ ì
- wil∞ ábσ ruε again« Thi≤ keep≤ u≡ unti∞ PROG▒ doe≤ no⌠ áse⌠ áthσ ì
- erro≥ flag.
-
- ╔ áwil∞ áleavσ i⌠ t∩ thσ reade≥ discerε ß usσ fo≥ this¼ ábu⌠ áthσ ì
- forφ oµ thσ aliase≤ i≤ correc⌠ anΣ allow≤ yo⌡ t∩ appenΣ ácommand≤ ì
- t∩ RU╬ t∩ thσ exten⌠ oµ thσ MC╠ lengtΦ« I⌠ expand≤ likσ this..
-
- RUN:
- I╞ ╘ PusΦ Truσ ont∩ thσ Flo≈ stack
- MAIN:
- F╔ Po≡ thσ Flo≈ stack
- PROG▒ D∩ something« Se⌠ E╥ iµ wσ neeΣ FOO.
- I╞ E╥ Ruε FO╧ iµ an∙ error
- FOO:
- FI
- PROG▓ D∩ something« Clea≥ E╥ t∩ d∩ PROG▓ again.
- I╞ ~E╥ Checδ thσ E╥ flag
- FO╧ Reruε FO╧ iµ n∩ error
-
- FI
- I╞ E╥ FO╧ return≤ E╥ t∩ forcσ onσ morσ PROG1
- MAI╬ Ruε MAIN
-
- F╔ Po≡ thσ Flo≈ stacδ anΣ resumσ MC╠ commands
-
-