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
/
MBUG
/
MBUG062.ARC
/
MENU.DOC
< prev
next >
Wrap
Text File
|
1979-12-31
|
6KB
|
116 lines
DISK-MENU
by Alan Sheehan B.E.
DISK-MENU¼á a≤ thσ namσ suggests¼ i≤ ß MicroWorlΣ Basiπ disδ ì
men⌡á program«á I⌠á automaticall∙ include≤ al∞á MicroWorlΣá Basiπ ì
program≤á (.MWB⌐á anΣá machinσ languagσ program≤á oµá ßá specifiπ ì
forma⌠á (.BE┼á files)«á Thσ intentioε i≤ t∩ makσ runninτá machinσ ì
languagσ files¼ anΣ .MW┬ files¼ eas∙ enougΦ fo≥ kid≤ to use.
Afte≥ typinτ iε thσ program¼ type:
>SAVE"MENU"
Before running the program for the first time, type:
>OPEN "O",6,"MENU.DAT" : CLOSE 6
Thi≤á create≤ aε empt∙ datß filσ fo≥ DISK-MEN╒ t∩ storσá thσ ì
star⌠ addresse≤ fo≥ thσ .BE┼ files«á Machinσ languagσ program≤ oµ ì
thσ .BE┼ filσ typσ requirσ tha⌠ thei≥ executσ addres≤ i≤ thσ samσ ì
a≤ thei≥ star⌠ address«á i.e« The∙ wil∞ RU╬ properl∙ froφ ß RU╬ ═ ì
FILENAME.BE┼á (addr⌐ command¼á wherσ (addr⌐ i≤ thσá start/executσ ì
address.
No≈á RU╬ thσ program«á Afte≥ ß shor⌠ pausσ thσ firs⌠ pagσ oµ ì
thσ men⌡ wil∞ bσ displayed«á U≡ t∩ 3│ program≤ arσ displayeΣá pe≥ ì
page«á Yo⌡á caε RU╬ an∙ oµ thesσ b∙ enterinτ it≤ men⌡ numbe≥á anΣ ì
pressinτ <RETURN>« Fou≥ othe≥ option≤ arσ als∩ available« Yo⌡ ma∙ ì
exi⌠á thσá prograφ t∩ BASI├ b∙ enterinτ B¼á o≥ t∩ thσá SYSTE═á b∙ ì
enterinτ S«á Iµ thσ men⌡ i≤ longe≥ thaε ▒ pagσ (>3│ programs⌐ thσ ì
Nex⌠ pagσ caε bσ displayeΣ b∙ enterinτ N¼á o≥ thσ previou≤ onσ b∙ ì
using P.
Thσáá prograφá work≤á b∙á usinτá ßá smal∞á machinσá languagσ ì
subroutinσá t∩á interfacσ witΦ CP/M«á Thi≤ i≤ pokeΣá int∩á memor∙ ì
startinτ a⌠ 4╕ decima∞ iε line≤ 70░ t∩ 720«á Linσ 73░ jus⌠á make≤ ì
surσá tha⌠ thσ correc⌠ addres≤ fo≥ thσ disδ DM┴ buffe≥ i≤ sen⌠ t∩ ì
CP/M«á Thi≤ buffe≥ i≤ useΣ t∩ holΣ thσ disδ director∙ onσá secto≥ ì
a⌠á ß time¼á wheε ß valiΣ prograφ filenamσ i≤ found«á Thσ presen⌠ ì
locatioεá oµá thσ buffe≥ coincide≤ witΦ thσ locatioεá oµá BASIC'≤ ì
cassettσ buffe≥ a⌠ 300╚ (76╕ decimal)« Thσ ambiguou≤ filenamσ fo≥ ì
eacΦá searcΦá i≤ constructeΣ iε line≤ 17░ anΣ 19░ anΣ pokeΣá int∩ ì
thσá Filσá Contro∞ Blocδ a⌠ locatioε 9▓ decima∞ b∙ line≤á 76░á t∩ ì
780«á Line≤ 79░ t∩ 88░ searcΦ thσ disδ director∙ fo≥á appropriatσ ì
file≤á anΣá build≤á u≡á thσ filσ name≤á characte≥á b∙á character¼ ì
omittinτá space≤á (thσá RU╬á ═ commanΣá doesn'⌠á likσá space≤á iε ì
filenames)« Iµ thσ resul⌠ oµ thσ US╥ cal∞ t∩ thσ machinσ languagσ ì
routinσá i≤ 25╡ i⌠ mean≤ n∩ (more⌐ file≤ werσ founΣ matchinτá thσ ì
searcΦá filename«á Als∩ iε linσ 84░ eacΦ characte≥ i≤ ANDeΣá witΦ ì
12╖ s∩ tha⌠ al∞ character≤ havσ thσ mos⌠ significan⌠ bi⌠ rese⌠ t∩ ì
0« Thi≤ i≤ necessar∙ becausσ CP/═ set≤ thσ MS┬ higΦ (t∩ 1⌐ oε thσ ì
firs⌠á characte≥ oµ thσ extensioε iµ thσ filσ i≤ REA─á ONLY¼á anΣ ì
BASI├ doesn'⌠ likσ t∩ adΣ character≤ witΦ asciΘ value≤ ╛ 12╖ int∩ ì
strings.
Line≤ 20░ t∩ 30░ displa∙ thσ men⌡ oµ filename≤ oε thσ screeε ì
iε threσ columns¼á onσ pagσ a⌠ ß time« Iµ thσ men⌡ i≤ longe≥ thaε ì
onσá page¼á thσ option≤ t∩ flicδ througΦ thσ page≤áareá displayeΣ ì
(linσá 290)«á Linσá 31░á determine≤á thσ numeriπá VALuσá oµá you≥ ìèselectioε a≤ botΦ numeriπ anΣ alphß inpu⌠ mus⌠ bσ acceptable«á Iµ ì
thσá inpu⌠ i≤ alphabetiπ o≥ negativσ (invalid⌐ thσ prograφá jump≤ ì
t∩á linσ 52░ fo≥ furthe≥ testinτ oµ thσ inpu⌠á string«á There¼á ß ì
SEARC╚á functioεá i≤ useΣ iε conjunctioε witΦá thσá O╬á ..«á GOT╧ ì
structurσá s∩ tha⌠ an∙ invaliΣ inpu⌠ cause≤ thσ prograφ t∩ simpl∙ ì
re-displa∙ thσ men⌡ b∙ jumpinτ t∩ linσ 230« (Iµ thσ inpu⌠ string¼ ì
S0$¼á i≤á no⌠ founΣ iε "BbSsNnPpó thσ resul⌠ oµ thσ SEARC╚ i≤á 0¼ ì
theε adΣ ▒ t∩ poin⌠ t∩ thσ linσ numbe≥ iε thσ lis⌠ t∩ jum≡ to...« ì
firs⌠ iε thσ lis⌠ i≤ 230!)« Linσ 60░ prepare≤ t∩ displa∙ thσ nex⌠ ì
pagσ oµ thσ menu¼ linσ 64░ prepare≤ t∩ displa∙ thσ previou≤ page¼ ì
bu⌠ onl∙ iµ the∙ exist.
Iµá onσ oµ thσ program≤ wa≤ selecteΣ (o≥ an∙ positivσ numbe≥ ì
entered⌐á thσ prograφ passe≤ througΦ linσ 320«á Here¼á thσá arra∙ ì
valuσá oµá thσ filenamσ i≤ calculateΣ anΣ an∙ invaliΣ value≤á arσ ì
deal⌠ with«á Linσ 33░ use≤ thσ SEARC╚ functioε agaiε t∩ finΣá thσ ì
perioΣá betweeεá thσ filenamσ anΣ thσ extensioε anΣ tes⌠á iµá thσ ì
prograφá i≤ ß MicroWorlΣ BASI├ prograφ (.MWB)«á Iµ i⌠ is¼á i⌠á i≤ ì
RUN«á Iµá thσ prograφ i≤ no⌠ ß .MWB¼á line≤ 36░ t∩ 41░ searcΦ thσ ì
datß file¼á MENU.DAT¼ fo≥ thσ program'≤ start/exeπ address« Iµ i⌠ ì
i≤ found¼á thσ prograφ jump≤ t∩ linσ 48░ t∩ RU╬ ═ thσ program« Iµ ì
thσ start/exeπ addres≤ i≤ no⌠ founΣ iε MENU.DAT¼ line≤ 44░ t∩ 47░ ì
promp⌠ thσ use≥ fo≥ thσ address¼á theε storσ i⌠ fo≥ usσ nex⌠ timσ ì
beforσ RUNninτ thσ program.
DISK-MEN╒áá i≤áá ideall∙á suiteΣá t∩á disk≤á oµá game≤áá anΣ ì
educationa∞ program≤ whicΦ kid≤ and/o≥ visitor≤ ma∙ use¼á becausσ ì
star⌠á addresse≤ fo≥ .BE┼ file≤ don'⌠ neeΣ t∩ bσ remembereΣá oncσ ì
DISK-MEN╒ know≤ them«á I⌠ als∩ make≤ lifσ easie≥ fo≥ thσ hardcorσ ì
compute≥ game≤ freak≤ amongs⌠ us¼á a≤ i⌠ i≤ easie≥ t∩ typσ ßá tw∩ ì
digi⌠á numbe≥á correctl∙ thaε ß completσá filename«á 128╦á systeφ ì
user≤á caε eveε makσ i⌠ aut∩ executσ (bu⌠ tha⌠ won'⌠ bσ discusseΣ ì
here).
Iµ yo⌡ havσ ß doublσ disδ drivσ system¼ yo⌡ ma∙ likσ t∩ makσ ì
thσá followinτ modification≤ t∩ allo≈ yo⌡ t∩ leavσ DISK-MEN╒á anΣ ì
MENU.DA╘á oε thσ disδ iε you≥ A║á drivσ anΣ stil∞ ge⌠ ßá men⌡á oµ ì
what's on your B: drive.
0010░ RE═ DISK-MEN╒ v3.01 b∙ Alaε Sheehaε B.E« 27/10/85.
0014░ CLS:CUR╙ 24,5:PRINT"DISK-MEN╒ v3.01"
0015░ CUR╙ 17,8:PRINT"b∙ Alaε Sheehaε B.E« 27/10/85."
(Inser⌠ thσ followinτ ▓ lines)
0015▒ CUR╙ 16,11:INPUT"Ente≥ Disδ Drivσ Namσ (A,B,C..):"D0$:RE═ ge⌠ disδ drivσ name
0015▓ I╞ D0$="ó ║ D0$="A"
0016░ V=(ASC(D0$⌐ AN─ 95)-64:I╞ V<▒ O╥ V>1╢ THE╬ PLA┘ 23║ GOT╧ 151
0040░ I╞ F1$(;3,LEN(F1$))=F2ñ THE╬ IN#0:OUT#0:CLOS┼ 6:GOT╧ 480:RE═ addres≤ found
0047░ OUT#6:PRIN╘ F1$(;3,LEN(F1$))","A:OUT#0:CLOS┼ 6
0080░ C=C+1:F0$(C)=D0$(;1,1)+":":RE═ includσ drivσ iε name