home *** CD-ROM | disk | FTP | other *** search
- áááááááááááááááááááááááááááááááá PREBA╙ì
- áááááááááááááááááááááááááááááááá =====╜
-
- áááááááááááááááááááááá ┴ pre-processo≥ fo≥ BASIC«ì
- áááááááááááááááááááááá -------------------------¡
-
-
-
-
-
-
-
- Copyrigh⌠ (c⌐ 198╡ b∙ Greywolf«ì
- Las⌠ revisioε t∩ thi≤ document║ Jaε 2░ 1985«
-
- PREBA╙á take≤ ß fla⌠ ASCI╔ file¼á add≤ linσ number≤ t∩á it¼á and¼ ì
- optionally¼á resolve≤á reference≤ t∩ targe⌠ labels«á I⌠ caεá als∩ ì
- resolvσá thσá label≤á withou⌠ linσ numbers¼á o≥á stri≡á olΣá linσ ì
- number≤á ou⌠á oµ ß file«á PREBA╙ i≤ intendeΣ a≤ aε aiΣá t∩á BASI├ ì
- programmers«á WitΦá i⌠ the∙ caε ente≥ ß prograφ iε thei≥ favoritσ ì
- tex⌠á edito≥á o≥ worΣ processor¼á whilσ no⌠ worryinτá abou⌠á linσ ì
- numbers¼á o≥ thσ target≤ fo≥ thei≥ GOT╧ anΣ GOSU┬ statements«á I⌠ ì
- ha≤ ß numbe≥ oµ options¼ including:
-
- áááá addinτ linσ number≤ì
- áááá resolvinτ label≤ì
- strippinτá olΣá linσá number≤á
- selectioεá oµá thσá star⌠á numbe≥ ì
- selectioε oµ thσ ste≡ sizσ selectioε oµ thσ labe∞ marke≥
- additioε oµ comment≤ t∩ thσ enΣ oµ ß line¼á
- showinτ targe⌠ label≤á
- commanΣ linσ executioε (no⌠ ye⌠ availablσ iε MS/DO╙ version)
-
-
- PREBA╙á wa≤ writteε iε Microsof⌠ BASI├ (MBASIC⌐ anΣ wa≤á compileΣ ì
- witΦ BASCOM« Therσ arσ threσ files:
-
- áááá PREBAS.DO├ -¡ Thi≤ document«ì
- áááá PREBAS.CO═ -¡ Thσ compileΣ executablσ prograφ (linkeΣ t∩ ì
- áááááááááááááááááá OBSLIB.REL)«ì
- áááá PREBAS.BA╙ -¡ Thσ BASI├ sourcσ code«
-
- Note║á ╔á includσá thσ BASI├ sourcσ s∩ tha⌠ thσ default≤á caεá bσ ì
- changeΣá (seσ Appendi° ┴ -- Customization⌐ o≥ s∩ tha⌠ PREBA╙á caε ì
- bσ recompileΣ t∩ ruε unde≥ thσ BRU╬ run-timσ library« PREBA╙ doe≤ ì
- ruεá unde≥ thσ interpreter¼á bu⌠ run≤ ver∙ slowl∙ (especiall∙á iµ ì
- yo⌡áá arσá resolvinτá labels)«áá PREBA╙á translate≤á line-by-linσ ì
- (writinτ eacΦ linσ ou⌠ t∩ thσ ne≈ file)¼á rathe≥ thaε iεá RAM«á ╔ ì
- fel⌠á tha⌠á speeΣá wa≤ les≤ importan⌠ thaε ß limitatioεá oµá sizσ ì
- imposeΣ b∙ thσ sizσ oµ RAM«á However¼á PREBA╙ i≤ stil∞ limiteΣ b∙ ì
- disδ capacity¼á needinτ rooφ fo≥ ß filσ a⌠ leas⌠ thσ samσ sizσ a≤ ì
- thσ inpu⌠ file.
-
-
-
- èáááááááááááááááááááááááááááá RUNNIN╟ PREBA╙ì
- áááááááááááááááááááááááááááá =============╜
-
- Thσ simples⌠ wa∙ t∩ executσ PREBA╙ i≤ froφ thσ commanΣ linσ usinτ ì
- thσ standarΣ defaults║
- A>PREBA╙ B:TEXT
-
- Thi≤á woulΣ takσ aε ASCI╔ (non-document⌐ filσá calleΣá TEST¼á anΣ ì
- creatσ ß ne≈ filσ oε thσ B║á drivσ calleΣ TEST.BAS« Thi≤ ne≈ filσ ì
- woulΣ havσ linσ number≤ a⌠ thσ star⌠ oµ eacΦ line¼á startinτ witΦ ì
- 1░ anΣ incrementinτ b∙ 1░ eacΦ time« Aε "'ó wil∞ bσ inserteΣ int∩ ì
- an∙ linσ startinτ witΦ ß labe∞ (identifieΣ b∙ aε "@ó a≤ it≤ firs⌠ ì
- character.⌐á An∙ reference≤ t∩ tha⌠ labe∞ wil∞ bσ translateΣ int∩ ì
- reference≤ t∩ thσ actua∞ linσ number«á AppendeΣ t∩ thσ enΣ oµ an∙ ì
- linσá containinτ reference≤ t∩ targe⌠ label≤ wil∞ bσá óá '^ITO:"¼ ì
- theε thσ lis⌠ oµ origina∞ referencσ label≤ separateΣ b∙ commas.
-
- Fo≥ example¼ Sa∙ wσ haΣ ß filσ calleΣ TES╘ tha⌠ lookeΣ likσ this║
-
- '-----------------------------------------------------------¡ì
- ºáááááááááááááá @TES╘ -¡ ┴ tes⌠ fo≥ PREBA╙ì
- ºì
- '-----------------------------------------------------------¡ì
- @STAR╘ -¡ Thi≤ i≤ thσ star⌠ oµ thσ program«ì
- FO╥ ╩ ╜ ▒ T╧ 2░ì
- ááááááá GOSU┬ @ROUTIN┼ì
- NEX╘ ╩ì
- ºì
- INPU╘ "D╧ YO╒ WAN╘ T╧ EXIT"╗ Añì
- I╞ Añ ╜ "Yó THE╬ GOT╧ @EN─ ELS┼ GOT╧ @STAR╘ì
- ºì
- @EN─ì
- ºì
- EN─ì
- ºì
- ºì
- @ROUTINō
- PRIN╘ "INSID┼ ROUTINEóì
- RETUR╬
-
- Thσ command║ì
- A>PREBA╙ B:TES╘ ì
- woulΣ producσ ß filσ calleΣ TEST.BA╙ tha⌠ lookeΣ likσ this║
-
- 1░ '-----------------------------------------------------------¡ì
- 2░ ºááááááááááá @TES╘ -¡ ┴ tes⌠ fo≥ PREBA╙ì
- 3░ ºì
- 4░ '-----------------------------------------------------------¡ì
- 5░ '@STAR╘ -¡ Thi≤ i≤ thσ star⌠ oµ thσ program«ì
- 6░ FO╥ ╩ ╜ ▒ T╧ 2░ì
- 7░ááááá GOSU┬ 18░ ºáááá TO║ @ROUTIN┼ì
- 8░ NEX╘ ╩ì
- 9░ ºì
- 10░ INPU╘ "D╧ YO╒ WAN╘ T╧ EXIT"╗ Añì
- 11░ I╞ Añ ╜ "Yó THE╬ GOT╧ 13░ ELS┼ GOT╧ 5░ ºááá TO║ @END¼ @STAR╘ìè12░ ºì
- 13░ '@EN─ì
- 14░ º
- 15░ EN─ì
- 16░ ºì
- 17░ ºì
- 18░ '@ROUTIN┼ì
- 19░ PRIN╘ "INSID┼ ROUTINEóì
- 20░ RETUR╬
-
- ┴á morσá comple° examplσ caε bσ founΣ iε Appendi°á B«á Also¼á thσ ì
- sourcσ filσ (PREBAS.BAS)¼ froφ @PARSEC╠ oε down¼ wa≤ processeΣ b∙ ì
- PREBAS.
-
-
-
- LABELS║ì
- =====╜
-
- PREBA╙ recognize≤ label≤ if¼á (A)║á thei≥ firs⌠ characte≥ i≤á thσ ì
- marke≥ character¼á anΣ (B)║ the∙ arσ wholσ words« Fo≥ instancσ -- ì
- supposσá yo⌡ arσ ß Cromemc∩ Sbasiπ faε (a≤ ╔ am)¼á anΣ yo⌡á chosσ ì
- "*óá a≤ you≥ marke≥ character«á PREBA╙ wil∞ bσ ablσ t∩ tel∞á tha⌠ ì
- "*Getcharóá i≤ ß label¼á anΣ wil∞ no⌠ bσ confuseΣ b∙ "32▒ ¬á 42"¼ ì
- "4*8"¼á o≥ "18¬ 47/6"« I⌠ WIL╠ ge⌠ confuseΣ b∙ somethinτ like║ "▓ ì
- *853"¼á thinkinτá tha⌠ *85│ i≤ ß label«á However¼á al∞ tha⌠á wil∞ ì
- happeεá i≤ yo⌡ wil∞ ge⌠ thσ message║á *84│ A╘ LIN┼ 20░á -- TARGE╘ ì
- NO╘ FOUN─ durinτ pas≤ two¼á anΣ thσ "*843ó wil∞ remaiε untouched« ì
- Unless¼ oµ course¼ yo⌡ werσ foolisΦ enougΦ t∩ labe∞ ß targe⌠ linσ ì
- witΦ thσ label║ "*843"
-
-
- PREBA╙á recognizσ a≤ ß targe⌠ linσ an∙ linσ wherσ thσ firs⌠ word¼ ì
- (whethe≥ precedeΣ b∙ whitσ space¼á o≥ not)¼á i≤ ß labe∞ (ha≤á thσ ì
- marke≥á characte≥á a≤ it≤ firs⌠ char.)«á Iµ therσá arσá duplicatσ ì
- labels¼ thσ firs⌠ onσ wil∞ bσ useΣ a≤ thσ target.
-
-
-
- ááááááááááááááááááááá RUNNIN╟ PREBA╙ WIT╚ PROMPT╙ì
- ááááááááááááááááááááá ==========================╜
-
-
- Iµ yo⌡ arσ unfamilia≥ witΦ thσ commanΣ linσ synta° oµ PREBAS¼ yo⌡ ì
- caε havσ i⌠ promp⌠ yo⌡ fo≥ thσ informatioε yo⌡ need«á Yo⌡ d∩ thi≤ ì
- b∙áá jus⌠áá enterinτá it≤á namσá oεá thσáá commanΣáá line«áá e.g« ì
- A>PREBAS<RETURN╛á (Or¼á iµá runninτá thσá BASI├á sourcσá program¼ ì
- A>MBASI├ PREBAS)«á PREBA╙ wil∞ theε asδ ß serie≤ oµ questions« A⌠ ì
- an∙ time¼ yo⌡ caε abor⌠ thσ process¼ b∙ typinτ "Xó iε responsσ t∩ ì
- ß question¼á anΣ PREBA╙ wil∞ abor⌠ thσ presen⌠ translation¼á theε ì
- asδ yo⌡ iµ yo⌡ wan⌠ t∩ d∩ anothe≥ file« Iµ yo⌡ answe≥ "Nó t∩ thi≤ ì
- question¼á yo⌡ wil∞ exi⌠ froφ PREBAS¼ otherwisσ yo⌡ caε star⌠ al∞ ì
- over.
-
- Afte≥áá givinτá PREBA╙á thσá inpu⌠á filσá anΣá thσá outpu⌠á file¼ ìèrespondinτá witΦá aεá escapσá <ESC╛ t∩á ßá yes/n∩á questioεá wil∞ ì
- immediatel∙ star⌠ thσ translatioε usinτ thσ presen⌠ se⌠á options« ì
- Iµá thi≤ i≤ thσ firs⌠ translatioε yo⌡ arσ doinτ iε thi≤á session¼ ì
- theε thosσ option≤ wil∞ bσ thσ defaul⌠ options«á Otherwise¼á the∙ ì
- wil∞ bσ thσ one≤ yo⌡ chosσ oε you≥ las⌠ translation«
-
- Herσ arσ thσ question≤ PREBA╙ wil∞ ask║
-
- WHA╘ I╙ TH┼ NAM┼ O╞ TH┼ INFILE?║
-
- Herσáá yo⌡á givσá PREBA╙á thσá namσá oµá thσá tex⌠áá file¼áá e.g« ì
- B:TEST<RETURN>
-
- WHA╘ I╙ TH┼ NAM┼ O╞ TH┼ OUTFIL┼ (<CR╛ FO╥ B:TEST.BAS)?║
-
- Herσá yo⌡ givσ PREBA╙ thσ namσ oµ thσ filσ iε whicΦ yo⌡ wan⌠á thσ ì
- linσ number≤ t∩ appear« Yo⌡ caε jus⌠ hi⌠ <return╛ fo≥ thσ defaul⌠ ì
- oµá you≥ infilσ witΦ extensioε .BAS¼á saveΣ oε thσ samσ drivσá a≤ ì
- you≥á infile«á Iµá yo⌡ chosσ exactl∙ thσ samσá name¼á drive¼á anΣ ì
- extensioε a≤ thσ infile¼á (yo⌡ caε choosσ aε extensioε oµ nothinτ ì
- b∙á followinτá thσá filenamσ b∙ ß period)¼á thσá infilσá wil∞á bσ ì
- replaceΣ b∙ thσ outfile«á ╔ d∩ no⌠ recommenΣ thi≤ procedure«á (I⌠ ì
- doe≤á no⌠ savσ an∙ disδ space«á Thσ outpu⌠ i≤ writteε t∩á ßá filσ ì
- witΦá thσá samσá name¼á bu⌠ witΦ extensioε .TMP«á Thσá infilσá i≤ ì
- killed¼á theε thσ .TM╨ filσ i≤ renameΣ t∩ thσ namσ oµ thσ outfilσ ì
- -- which¼ iε thi≤ case¼ i≤ thσ samσ a≤ thσ infile« Yo⌡ stil∞ neeΣ ì
- a≤ mucΦ disδ spacσ a≤ yo⌡ woulΣ copyinτ t∩ anothe≥ filename.⌐á Iµ ì
- thσ infilσ anΣ thσ outfilσ differ¼á theε thσ infilσ i≤ preserved¼ ì
- anΣ an∙ error≤ (sucΦ a≤ "LABE╠ NO╘ FOUND"⌐ caε bσ easil∙ fixed.
-
- D╧ YO╒ WAN╘ T╧ AD─ LIN┼ NUMBERS┐
-
- Answe≥ "Yó o≥ <RET╛ iµ yo⌡ wan⌠ t∩ havσ linσ number≤ added«
-
- D╧ YO╒ WAN╘ T╧ RESOLV┼ LABELS┐
-
- Answe≥á "Yóá o≥á <RET╛ t∩ thi≤ iµ yo⌡ havσ label≤á iεá thσá file« ì
- Otherwise¼á answe≥ "N"¼ becausσ processinτ wil∞ bσ mucΦ faste≥ iµ ì
- PREBA╙ doe≤ no⌠ havσ t∩ resolvσ labels.
-
- Iµ yo⌡ answe≥ "Y"¼ yo⌡ wil∞ seσ thσ nex⌠ tw∩ question║
-
- WHA╘ I╙ TH┼ MARKE╥ CHARACTE╥ (<CR╛ FO╥ @)?║
-
- Iµá you≥á label≤ star⌠ witΦ ß differen⌠ marke≥ (sucΦ a≤á *LABEL)¼ ì
- theεá ente≥á tha⌠ characte≥ here«á Iµ yo⌡ ente≥á aεá alphabetica∞ ì
- character¼á yo⌡ wil∞ bσ tolΣ "INVALI─ MARKER"¼á theε yo⌡ wil∞á bσ ì
- askeΣ again.
-
-
- AD─ COMMENT╙ T╧ EN─ O╞ LINES┐ì
- (e.g« 'TO║ @LABEL1¼ @LABEL2...')║
-
- Iµá yo⌡ answe≥ "Yó o≥ <CR╛ t∩ this¼á al∞ reference≤ wil∞ bσ addeΣ ì
- a≤á comment≤ t∩ thσ enΣ oµ lines«á Fo≥ example║á
- èGOSU┬á @GETCHAR║ ì
- GOT╧ @NEX╘ Wil∞ resolvσ to║ 3░ GOSU┬ 400║ GOT╧ 5░ º TO║ @GETCHAR¼ ì
- @NEXT
-
-
- Iµ yo⌡ answereΣ n∩ t∩ linσ number≤ anΣ labels¼á ß bel∞ wil∞ ring¼ ì
- anΣ yo⌡ wil∞ bσ askeΣ thσ followinτ question:
-
- D╧ YO╒ WAN╘ T╧ STRI╨ LIN┼ NUMBER╙ FRO═ B:TES╘ì
- (TYP┼ ╬ T╧ CHANG┼ YOU╥ MIND¼ ╪ T╧ CHANG┼ FILENAMES)║
-
- Iµ yo⌡ arσ no⌠ addinτ linσ number≤ o≥ labels¼ PREBA╙ presume≤ thσ ì
- onl∙ reasoε yo⌡ woulΣ havσ fo≥ processinτ ß filσ i≤ tha⌠ yo⌡ wan⌠ ì
- t∩á stri≡ olΣ linσ numbers«á Answe≥ ye≤ to∩ thi≤á anΣá processinτ ì
- wil∞ begiε immediately« Yo⌡ shoulΣ seσ thσ message:
-
- HAV┼ FOUN─ LIN┼ NUMBER╙ I╬ B:TEST.BA╙ì
- STRIPPIN╟ AN─ WRITIN╟ T╧ B:TEST«
-
- However¼á shoulΣá therσá bσá n∩ linσ number≤ iεá thσá infile¼á n∩ ì
- outfilσ wil∞ bσ created¼ thσ bel∞ wil∞ ring¼ anΣ yo⌡ wil∞ seσ thσ ì
- message:
-
- COUL─ NO╘ FIN─ AN┘ LIN┼ NUMBER╙ I╬ B:TES╘
-
- Note║á Bσ carefu∞ witΦ stripping« An∙ absolutσ reference≤ t∩ linσ ì
- number≤á (o≥ previousl∙ PREBASeΣ labels⌐ wil∞ no≈ bσá meaningles≤ ì
- (havσ n∩ targets).
-
-
- Iµá yo⌡á answereΣ "Yó t∩ linσ numberinτ o≥ t∩á labe∞á resolution¼ ì
- (eveεá iµ yo⌡ answereΣ n∩ t∩ linσ numbering)¼á yo⌡ wil∞á seσá thσ ì
- nex⌠ tw∩ questions« (Label≤ wil∞ bσ resolveΣ a≤ iµ therσ wa≤ linσ ì
- numbering¼á s∩á therσá stil∞ i≤ ß neeΣ fo≥ ß star⌠ numbe≥á anΣá ß ì
- stepsize.)
-
- WHA╘ I╙ TH┼ STAR╘ NUMBE╥ (<CR╛ FO╥ 10)║
-
- Thi≤ i≤ thσ numbe≥ you≥ firs⌠ linσ wil∞ have«á Normally¼ yo⌡ wil∞ ì
- wan⌠á thi≤ t∩ bσ 10¼á bu⌠ fo≥ somσ application≤ yo⌡ migh⌠ wan⌠ t∩ ì
- se⌠ thi≤ numbe≥ mucΦ higher«á (If¼á fo≥ instance¼á yo⌡ intenΣá t∩ ì
- MERG┼ thσ presen⌠ modulσ int∩ anothe≥ BASI├ program.)
-
- WHA╘ I╙ TH┼ STE╨ SIZ┼ (<CR╛ FO╥ 10)║
-
- Thi≤á i≤á thσ incremen⌠ valuσ (thσ numbe≥ tha⌠ wil∞ bσá addeΣá t∩ ì
- eacΦá linσ numbe≥ t∩ makσ thσ nex⌠ linσá number)«á Normally¼á yo⌡ ì
- wil∞ wan⌠ thi≤ t∩ bσ 10.
-
-
- ááááááááááááááááá ===================================╜
-
- Oncσá yo⌡ havσ answereΣ al∞ thσ question≤ (o≥ hi⌠ <ESC>)¼á PREBA╙ ì
- wil∞á begiε thσ translation¼á keepinτ yo⌡ informeΣ oµ wha⌠ i⌠á i≤ ì
- doing.
- è
- Iµ yo⌡ arσ onl∙ addinτ linσ numbers¼á yo⌡ wil∞ seσ thσá followinτ ì
- display:
-
- WRITIN╟ TES╘ T╧ TEST.BA╙ WIT╚ LIN┼ NUMBER╙á 1░ ¼ 1░
-
- Thσá tw∩á number≤ oε thσ enΣ arσ thσ star⌠ number¼á anΣ thσá ste≡ ì
- size.
-
- Iµ yo⌡ arσ resolvinτ label≤ iε thσ file¼ yo⌡ wil∞ see║
-
- PAS╙ ONE║ RESOLVIN╟ LABEL╙ I╬ B:TES╘ MARKE─ B┘ └
-
- Then║
-
- PAS╙ TWO║ì
- WRITIN╟ B:TES╘ T╧ B:TEST.BA╙ WIT╚ LIN┼ NUMBER╙ 1░ ¼ 1░ì
- WIT╚ LABE╠ RESOLUTION« -¡ MARKE╥ ╜ └ì
- PLEAS┼ WAI╘
-
- Iµá you≥ filσ i≤ ß biτ one¼á thi≤ migh⌠ takσ ß weσ while¼á s∩á bσ ì
- patien⌠á (especiall∙á iµ you'rσ runninτ unde≥á thσá interpreter)« ì
- Note║á Iµá you≥ operatinτ systeφ ha≤ disδ caching¼á likσ CPM½á o≥ ì
- largσ memor∙ MS/DOS¼á yo⌡ migh⌠ no⌠ seσ mucΦ disδ activit∙ fo≥á ß ì
- while« Don'⌠ worry¼ PREBA╙ i≤ stil∞ running.
-
- EacΦá timσá PREBA╙á find≤ ß referencσ labe∞á withou⌠á ßá matchinτ ì
- targe⌠ label¼ yo⌡ wil∞ bσ tolΣ abou⌠ it¼ e.g.:
-
- @LABE╠ -¡ oε linσ 45░ -¡ no⌠ found«
-
- Iµá PREBA╙ find≤ an∙ linσ number≤ alread∙ iε thσ infile¼á i⌠ wil∞ ì
- hal⌠ processing¼ rinτ thσ bell¼ anΣ ask:
-
- WARNIN╟ -¡ numbereΣ line≤ alread∙ iε thσ file¼ì
- B:TES╘ startinτ a⌠ linσ numbe≥ 35░ì
- D∩ yo⌡ wisΦ t∩ proceeΣ (strip/overwritσ olΣ numbers⌐ ┐ì
- (Inpu⌠ 'Yº t∩ proceeΣ -¡ anythinτ elsσ wil∞ abort)║
-
- Iµ yo⌡ typσ "Yó here¼ thσ olΣ linσ number≤ wil∞ bσ overwritteε b∙ ì
- thσ ne≈ one≤ -- bu⌠ remember¼ thσ samσ cautioε tha⌠ wa≤ giveε fo≥ ì
- strippinτ olΣ linσ number≤ applie≤ here.
-
- Iµá yo⌡á typσ anythinτ elsσ thaεá "Y"¼á yo⌡á wil∞á see║á "PROCES╙ ì
- ABORTED"¼ anΣ yo⌡ wil∞ bσ askeΣ iµ yo⌡ wan⌠ t∩ d∩ anothe≥ file.
-
- Afte≥ PREBA╙ ha≤ finisheΣ processinτ you≥ file¼ yo⌡ wil∞ see║
-
- PROCESSE─ 3╕ LINES¼ NUMBERE─ FRO═ 1░ T╧ 38░
-
- D╧ YO╒ WAN╘ T╧ NUMBE╥ ANOTHE╥ FIL┼ (Y/N)┐
-
- Answe≥á "Yó t∩ thi≤ anΣ PREBA╙ wil∞ star⌠ askinτ question≤á abou⌠ ì
- thσá nex⌠á cop∙á (witΦá thσ option≤ yo⌡ chosσ iεá thσá las⌠á pas≤ ì
- througΦ a≤ thσ ne≈ defaul⌠ options)«á Answe≥ anythinτá else¼á anΣ ìèyo⌡ wil∞ bσ returneΣ t∩ you≥ operatinτ system.
-
-
-
-
-
-
- áááááááááááááááá EXECUTIN╟ PREBA╙ FRO═ TH┼ COMMAN─ LIN┼ì
- áááááááááááááááá =====================================╜
-
-
- PREBA╙á caε bσ executeΣ froφ thσ commanΣ line¼á witΦ ful∞ contro∞ ì
- oµá al∞á thσ options«á Thi≤ allow≤ fo≥ eas∙ inclusioεá oµá PREBA╙ ì
- command≤á iε submi⌠ (batch⌐ files«á However¼á thσ PREBA╙á commanΣ ì
- linσ optioε presume≤ yo⌡ kno≈ wha⌠ yo⌡ arσ doing«á Therσ i≤á les≤ ì
- erro≥ checkinτ thaε therσ i≤ iε thσ promp⌠ mode¼á anΣ i⌠ wil∞ no⌠ ì
- asδá yo⌡á iµ thi≤ i≤ REALL┘ wha⌠ yo⌡ intendeΣ t∩ d∩á wheεá you'rσ ì
- overwritinτá ß filσ o≥ linσ number≤ alread∙ exist«á Afte≥á PREBA╙ ì
- execute≤á froφá thσ commanΣ line¼á i⌠ return≤ yo⌡ t∩ thσá commanΣ ì
- leve∞ (yo⌡ d∩ no⌠ ge⌠ askeΣ iµ yo⌡ wan⌠ t∩ d∩ anothe≥ file).
-
- Note║ì
- A⌠á presen⌠á therσá i≤ n∩ commanΣ linσ optioεá fo≥á PREBA╙á unde≥ ì
- MS/DOS«á Thi≤á i≤ becausσ wheε yo⌡ loaΣ ß compileΣ BASI├á prograφ ì
- unde≥ MS/DOS¼á b∙ thσ timσ thσ prograφ get≤ control¼á thσ segmen⌠ ì
- register≤ havσ changed«á ╔ don'⌠ kno≈ ho≈ ß runninτ BASI├ prograφ ì
- woulΣá inquirσ a≤ t∩ wherσ thσ MS/DO╙ (anΣ commanΣ line⌐á segmen⌠ ì
- resides«á Iµ anyonσ ha≤ an∙ idea≤ abou⌠ ho≈ thi≤ i≤ done¼á ╔ surσ ì
- woulΣ appreciatσ hiφ droppinτ mσ ß linσ anΣ lettinτ mσ iε oεá thσ ì
- secret.
-
- Thσ synta° fo≥ thσ PREBA╙ commanΣ linσ modσ is║
-
- PREBA╙ INFILE[.EXT▌ [OUTFILE[.EXT]▌ [$[{+,-}L▌ [{+,-}N▌ [{+,-}C▌ì
- ááááááááááááááááááááááááááááááááááá [Mc▌ [Sxxx▌ [Pxxx]▌
-
- Where║
-
- [...▌áááá indicate≤ thσ paramete≥ i≤ optional«ì
- {...²áááá indicate≤ yo⌡ mus⌠ chosσ onσ oµ thσ option≤ enclosed«ì
- xx°áááááá i≤ ß number«ì
- πáááááááá i≤ ß character«
-
- INFIL┼ááá I≤ thσ sourcefilσ yo⌡ wan⌠ t∩ process« Thi≤ caε bσ
- precedeΣ b∙ ß drivσ designato≥ (e.g« B:TEST)¼ otherwisσ
- thσ loggeΣ iε (default⌐ drivσ i≤ assumed«
-
- OUTFIL┼áá I≤ thσ namσ oµ thσ destinatioε file« Iµ no⌠ specified¼
- i⌠ default≤ t∩ thσ namσ oµ thσ infile¼ thσ drivσ oµ thσ
- infile¼ anΣ aε extensioε oµ ".BASó (e.g« B:TEST.BAS)«
-
- EX╘áááááá Optiona∞ filenamσ extension« Iµ no⌠ specified¼ i⌠
- default≤ t∩ ".BASó fo≥ thσ OUTFILE¼ anΣ nothinτ
- ("«áá "⌐ fo≥ thσ infile«
-
- èñá (Optional.⌐á Tell≤á PREBA╙á tha⌠ an∙ numbe≥á oµácommanΣ
- á linσ option≤ follow« EacΦ optioε mus⌠ bσ separateΣ b∙ ß
- space.
-
- OPTIONS║
-
- +╠ááááááá (Default.⌐ Resolvσ Label≤ iε INFILE¼ anΣ translatσ int∩ ì
- ááááááááá absolutσ (linσ number⌐ target≤ iε OUTFILE«
-
- -╠ááááááá D∩ no⌠ resolvσ Label≤ iε INFILE«
-
- +╬ááááááá (Default.⌐ AdΣ linσ Number≤ t∩ OUTFIL┼
-
- -╬ááááááá D∩ no⌠ adΣ linσ Number≤ t∩ OUTFIL┼
-
- +├ááááááá (Default.⌐ AdΣ Comment≤ t∩ thσ enΣ oµ line≤ showinτ
- targe⌠ label≤ ¿ ºáááá TO║ @SUB1¼ @SUB2¼ @ERROR...)«
-
- -├ááááááá D∩ no⌠ adΣ Comment≤ t∩ thσ enΣ oµ lines«
-
- Sxx°ááááá Se⌠ Star⌠ number« Examplσ -¡ S10░ -¡ wil∞ star⌠ linσ
- numberinτ witΦ 100« Iµ no⌠ specified¼ thσ defaul⌠ oµ
- 1░ i≤ assumed«
-
- Pxx°ááááá Se⌠ ste╨ size« Examplσ -¡ P1╡ -¡ wil∞ numbe≥ line≤ iε ì
- ááááááááá increment≤ oµ 15¼ (10,25,40,55...)« Iµ no⌠ specified¼ ì
- ááááááááá thσ defaul⌠ oµ 1░ i≤ assumed«
-
- Mπááááááá Se⌠ marke≥ character« Examplσ -¡ M¬ -¡ wil∞ searcΦ fo≥
- label≤ witΦ "*ó fo≥ thei≥ firs⌠ character« Iµ no⌠
- specified¼ thσ defaul⌠ oµ "@ó i≤ assumed«
-
- EXAMPLES║
-
- A>PREBA╙ B:TES╘ì
- Write≤ B:TES╘ t∩ B:TEST.BA╙ witΦ al∞ thσ standarΣ defaults.
-
- A>PREBA╙ B:TES╘ $-╬ì
- Write≤á B:TES╘ t∩ B:TEST.BA╙ resolvinτ labels¼á bu⌠ doe≤ no⌠á adΣ ì
- linσ number≤ (othe≥ thaε thosσ oε line≤ witΦ targe⌠ labels)
-
- A>PREBA╙ B:TES╘ ñ -╬ M▐ -├ S▒ P▒ì
- Samσ a≤ above¼á bu⌠ doe≤ no⌠ adΣ comments¼á anΣ look≤ fo≥á label≤ ì
- markeΣ b∙ "^ó a≤ thei≥ leadinτ character« Becausσ oµ thσ "S▒ P1"¼ ì
- line≤á startinτá witΦá targe⌠ label≤ wil∞ bσá numbereΣá witΦá thσ ì
- actua∞á numbe≥á oµ line≤ froφ thσ to≡ oµ thσ filσá (no⌠á countinτ ì
- sol∩ linefeeds).
-
- A>PREBA╙ TEST.BA╙ B:STRIP.OUT$-╠ -╬ì
- Strip≤á linσá number≤á froφ TEST.BA╙ oε thσá defaul⌠á drive¼á anΣ ì
- write≤ thσ strippeΣ filσ t∩ STRIP.OU╘ oε thσ B║ drive.
-
- Thi≤ softwarσ fit≤ int∩ thσ categor∙ oµ what'≤ termeΣ "freeware"« ì
- (AlthougΦá ßá bette≥ descriptioε woulΣ bσá "almos⌠á freewareóá o≥ ì
- "somewha⌠ freeware")«á Wha⌠ tha⌠ mean≤ is¼á iµ yo⌡ likσ it¼á theε ìèpa∙ fo≥ it«
-
- Iµá yo⌡á havσá founΣá thi≤ softwarσ useful¼á anΣ iµá yo⌡á havσá ß ì
- consciencσ anΣ arσ no⌠ poo≥ -- theε thσ autho≥ woulΣ likσ yo⌡á t∩ ì
- sho≈á you≥ appreciatioε b∙ sendinτ hiφ somσ buck≤ fo≥ it«á Eveε ß ì
- smal∞ amount¼á eveε ß dollar¼á woulΣ bσ warml∙ received« Thinδ oµ ì
- wha⌠ i⌠ woulΣ havσ cos⌠ yo⌡ iε timσ t∩ writσ i⌠ fo≥ yourself«á Iµ ì
- yo⌡á senΣ $1░ dollar≤ o≥ over¼á yo⌡ wil∞ bσ placeΣ oε m∙á mailinτ ì
- lis⌠ t∩ ge⌠ thσ lates⌠ updatσ oµ thσ prograφ (a⌠ n∩ charge)¼á anΣ ì
- perhap≤á somσá othe≥ goodie≤ ╔ migh⌠ havσ lyinτá arounΣá a⌠á tha⌠ ì
- time.
-
- ááááááááááááááááááá G« Wolfσì
- ááááááááááááááááááá 8╕ 51s⌠ Avenue¼ NortΦì
- ááááááááááááááááááá Boi≤ dσ Filion≤ì
- ááááááááááááááááááá Quebec¼ Canada¼á J6┌ 2N╣
-
- Thi≤á i≤á ßá prograφ tha⌠ run≤ MUC╚ bette≥á wheεá compileΣá (eveε ì
- disregardinτá m∙á freσ usσ oµ comments¼á whitσ space¼á anΣá largσ ì
- variablσá names.⌐á Thσá versioε oε thσ P─ librar∙á i≤á linkeΣá t∩ ì
- OBSLIB.RE╠á s∩á i⌠ caε bσ useΣ b∙ anyone«á Iµ yo⌡ kee≡ ßá se⌠á oµ ì
- utilitie≤ oε ß disδ witΦ BRUN.REL¼ yo⌡ caε recompilσ t∩ linδ witΦ ì
- tha⌠ librar∙ (n∩ /╧ option)¼á anΣ you'l∞ savσ yourselµ abou⌠á 20╦ ì
- oµ disδ space«á Thσ tw∩ version≤ ruε thσ same¼ witΦ thσ exceptioε ì
- tha⌠ thσ BRU╬ versioε take≤ abou⌠ ▓ second≤ morσ t∩ load.
-
- OPTIOΠDEFAULTӍ
- ==============╜
-
- Al∞á thσ optioε default≤ arσ gathereΣ nea≥ thσ fron⌠ end¼á s∩ arσ ì
- eas∙ t∩ change« Herσ i≤ ß list:
-
- 17░ MSDO╙ ╜ FALS┼ ºááá Se⌠ truσ iµ yo⌡ intenΣ t∩ por⌠ t∩ ß MS/DO╙ ì
- áááááááááááááááááááááá machine¼ bu⌠ reaΣ belo≈ abou⌠ portinτ t∩ ì
- áááááááááááááááááááááá MS/DO╙ì
- 18░ OSEXE├ ╜ TRU┼ ºááá Truσ iµ we'rσ oε aε Osbornσ Exec«ì
- áááááááááááááááááááááá (O≥ aε Osbornσ 1)¼ o≥ othe≥ CP═ machinσì
- 20░ I╞ OSEXE├ ╜ TRU┼ THE╬ CLSñ ╜ CHR$(26⌐ºThσ clea≥ screeε string¼ ì
- ááááááááááááááááááááááááááááááááááááááááááfo≥ you≥ machinσ (CPM⌐ì
- 21░ MARKERñ ╜ "@ó ºáááááááááááááááááááádefaul⌠ labe∞ identifie≥ì
- 23░ DI═ LABTAB$(2,1000⌐ºThσ seconΣ number¼ iε parenthesis¼ i≤ thσ ì
- ááááááááááááááááááááááánumbe≥ oµ label≤ wσ caε handlσ a⌠ once« Bσ ì
- ááááááááááááááááááááááácarefu∞ oµ RA═ iµ yo⌡ bum≡ thi≤ up«ì
- 25░ STARTNU═ ╜ 10║ STEPSIZ┼ ╜ 1░' Defaul⌠ values«ì
- 26░ ADDVECT╙ ╜ TRU┼ ºááááSho≈ thσ replaceΣ label≤ a≤ comment≤ a⌠ ì
- áááááááááááááááááááááááááthσ enΣ oµ thσ line« Default«ì
- 28░ COMBU╞ ╜ &H8░ ºááááááCP═ commanΣ linσ buffe≥ì
- 30░ INFEXTñ ╜ ""║ OUTFEXTñ ╜ ".BASóºDefaul⌠ filσ extension≤ fo≥ ì
- ááááááááááááááááááááááááááááááááááááINFIL┼ anΣ OUTFIL┼ (remembe≥ ì
- ááááááááááááááááááááááááááááááááááááthσ leadinτ period)«ì
- 34░ DOLABEL╙ ╜ TRUE║ DOLINUM╙ ╜ TRU┼ºDefault≤ oµ whethe≥ wσ
- resolvσ label≤ anΣ whethe≥ wσ adΣ
- linσ numbers«
-
-
- èPortinτ t∩ MS/DOS║ì
- Se⌠ MSDO╙ t∩ TRU┼ iε linσ 170¼á anΣ OSEXE├ t∩ FALS┼ iε linσá 180« ì
- Yo⌡ wil∞ havσ t∩ changσ thσ @CLEARSCREE╬ routinσ t∩ "CLS║ RETURNó ì
- o≥á se⌠á thσ CLSñ iε linσ 20░ t∩ whateve≥ you≥ clea≥á screeεá anΣ ì
- homσá strinτá is«á Also¼á ╔ aφ ver∙ libera∞ iε extendinτá logica∞ ì
- line≤á int∩á ß numbe≥ oµ physica∞ lines¼á b∙ thσá usσá oµá singlσ ì
- linefeed≤ (n∩ CR)«á Then¼ whilσ ╔ aφ debugginτ anΣ saving¼ MBASI├ ì
- take≤á thosσá anΣá save≤ theφ ou⌠ a≤ linefeeΣá - carriagσá returε ì
- pair≤ (rathe≥ thaε thσ CR-L╞ pair≤ a⌠ thσ enΣ oµ regula≥á lines)« ì
- Iεá MS/DOS¼á neithe≥á thσ interprete≥ o≥ thσ compile≥á recognize≤ ì
- thesσá a≤á logica∞á linσá extender≤á (thσá intrigue≤á oµáá MS/DO╙ ì
- software¼ I'l∞ neve≥ understand.⌐ Yo⌡ wil∞ havσ t∩ finΣ thesσ anΣ ì
- takσá theφá ou⌠ witΦ you≥ editor¼á makinτ somσ ver∙á lonτá lines« ì
- (The∙á wil∞ sho≈ u≡ iε WordSta≥ a≤ ß "Jó theε ß "-ó oε thσá righ⌠ ì
- margin« SearcΦ anΣ replacσ fo≥ ^P^J^P<RET>« Bu⌠ perhap≤ bette≥ t∩ ì
- searcΦ fo≥ thσ ^P<RET>^I≤ first¼á replacinτ witΦ ^P<RET╛ <SPACE>« ì
- D∩ thi≤ unti∞ you'vσ go⌠ al∞ thσ tab≤ ou⌠ first¼á theε ge⌠ riΣ oµ ì
- thσ LF-CRs« Elsσ you'l∞ havσ ß hel∞ oµ ß joΓ gettinτ theφ out«
-
-
- ááááááááááááááááááááá APPENDI╪ ┬ -¡ Aε examplσ ruεì
- ááááááááááááááááááááá ===========================╜
-
- Herσ i≤ aε examplσ sourcσ program║
-
- º THI╙ I╙ ┴ TES╘ FO╥ PREBA╙ì
- ºì
- @STARԍ
- ┐ "W┼ AR┼ UNDE╥ @STARTóì
- O╬ ERRO╥ GOT╧ @ERRO╥ì
- GOT╧ @NEX╘ì
- STOЍ
- @Nex⌠ -¡ ┴ lowe≥ (mixed⌐ casσ target«ì
- ┐ "WE'R┼ A╘ @NEXTóì
- FO╥ ╔ ╜ ▒ T╧ 30░ì
- ááááááá ┐ "THES┼ TW╧ LINE╙ HAV┼ LINEFEEDS"║ì
- ááááááááááááááááá GOSU┬ @FINDX║ì
- ááááááááááááááááá GOSU┬ @FIND╪ì
- ááááááá I╞ Añ <╛ "ó THE╬ GOT╧ @LASTFO╥ì
- ááááááá @LastFO╥ -¡ ┴ tabbeΣ labe∞ witΦ mixeΣ case«ì
- NEX╘ ╔ì
- I╞ Añ <╛ "Xó AN─ Añ <╛ "xó THE╬ GOT╧ @STAR╘ ELS┼ GOT╧ @EN─ì
- ºì
- @ERROҍ
- ┐ "W┼ HA─ A╬ ERRORóì
- RESUM┼ @NEX╘ ºá I⌠ work≤ fo≥ RESUM┼ (oµ course⌐ì
- ºì
- @FIND؍
- ┐ "W┼ AR┼ I╬ @FINDXóì
- Añ ╜ INKEYñì
- RETUR΍
- ºì
- ºáááááá Note║ therσ i≤ n∩ conflic⌠ betweeε @EN─ anΣ EN─ì
- @EN─ì
- EN─
- è
- Thσ outpu⌠ (PREBASed⌐ prograφ i≤ showε oε thσ nex⌠ page.
-
- 1░ º THI╙ I╙ ┴ TES╘ FO╥ PREBA╙ì
- 2░ ºì
- 3░ '@STAR╘ì
- 4░ ┐ "W┼ AR┼ UNDE╥ @STARTóì
- 5░ O╬ ERRO╥ GOT╧ 17░ ºá TO║ @ERRO╥ì
- 6░ GOT╧ 8░ ºááá TO║ @NEX╘ì
- 7░ STO╨ì
- 8░ '@Nex⌠ -¡ ┴ lowe≥ (mixed⌐ casσ target«ì
- 9░ ┐ "WE'R┼ A╘ @NEXTóì
- 10░ FO╥ ╔ ╜ ▒ T╧ 30░ì
- 11░áááá ┐ "THES┼ TW╧ LINE╙ HAV┼ LINEFEEDS"║ì
- áááááááááááá GOSU┬ 210║ì
- áááááááááááá GOSU┬ 21░ ºááááááá TO║ @FINDX¼ @FIND╪ì
- 12░áááá I╞ Añ <╛ "ó THE╬ GOT╧ 13░ ºáááá TO║ @LASTFO╥ì
- 13░ ºáá @LastFO╥ -¡ ┴ tabbeΣ labe∞ witΦ mixeΣ case«ì
- 14░ NEX╘ ╔ì
- 15░á I╞ Añ <╛ "Xó AN─ Añ <╛ "xó THE╬ GOT╧ 3░ ELS┼ GOT╧ 27░ ºá TO║ ì
- @START¼ @EN─
- 16░ º
- 17░ '@ERRO╥
- 18░ ┐ "W┼ HA─ A╬ ERRORó
- 19░ RESUM┼ 8░á ºá I⌠á work≤ fo≥ RESUM┼ (oµ course⌐ º TO║á @NEX╘á
- 20░á ºá
- 21░ '@FIND╪
- 22░ ┐ "W┼ AR┼ I╬ @FINDXó
- 23░ Añ ╜ INKEYñ
- 24░ RETUR╬
- 25░ º ì
- 26░á º Note║á therσ i≤ n∩ conflic⌠ betweeε @EN─ anΣ EN─
- 27░ '@EN─ ì
- 28░ END
-
-
- Notσá ho≈á wσá handlσá mixeΣá casσá labels¼á tabbeΣá labels¼á anΣ ì
- linefeed≤ (oε linσ 110).
-
-
- áááááááááááááááááááááááááááááááááááá @EN─