home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 8
/
008.d81
/
ad.menu
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
1KB
|
53 lines
0 rem8/3/84
5 :
10 remad.menu
20 dima$(80,1)
30 x=1020
100 restore:forc=1to80:reada$(c,0),a$(c,1):ifa$(c,0)="end"thenl=c-1:goto120
110 nextc
120 a$(l+1,0)="":a$(l+1,1)=""
125 t1=peek(x):ift1=peek(x+1)thenift1<=lthenift1>=0then150
130 rem
140 pokex,0:pokex+1,0:run
150 poke53281,5:poke53280,2:print"[144][147]";
151 pc=int(l/10)+1:pn=int(t1/10)+1
160 print"[147] [204][207][193][196][211][212][193][210] [193][196] [205][197][206][213] - page "str$(pn)" of "str$(pc)". [146]"
170 fory=1to9:print:iflen(a$(y+(pn-1)*9,0))thenprinty" = "a$(y+(pn-1)*9,0)
180 next
190 gosub7000
195 gosub6000
200 goto160
5000 print"(";str$(pn+abs(t1=9ort1=18ort1=27));"/";
5005 t2=t1+1
5007 ift1<9then5020
5010 t2=t2-9:ift2>9then5010
5020 printstr$(t2);") ";
5030 return
6000 poke198,0:wait198,1:getr$
6002 ifval(r$)>0andlen(a$(val(r$)+(pn-1)*9,0))=0then6000
6005 ifval(r$)>0thenr=val(r$)+(pn-1)*9:goto8000
6010 ifr$=""orr$="[157]"thenpn=pn-1:ifpn<1thenpn=1:goto6090
6020 ifr$="[145]"orr$=""thenpn=pn+1:ifpn>pcthenpn=pc:goto6090
6030 ifr$="x"orr$="[216]"then9000
6040 ifr$="n"orr$="[206]"thenr=t1+1:goto8000
6070 ifr$="[145]"orr$=""orr$="[157]"orr$=""then6090
6080 ifr$<>"n"andr$<>"[206]"andr$<>"x"andr$<>"[216]"then6000
6090 return
7000 print"1-9 selects ad. _crsr^ select next page"
7010 print"[208]ress [206] to read the next ad ";:gosub5000:print"[146] [208]ress [216] to exit.";
7020 print" [146]";
7023 poke56295,2:poke2023,160
7024 d$=""
7025 forc=1to25:print"";spc(39);mid$(d$,c);" [146][144]";:next
7030 return
8000 print"[147]load"chr$(34)a$(r,1)chr$(34)",8":print"run":poke198,0
8005 pokex,r:pokex+1,r+abs(r>=l)
8010 poke631,13:poke632,13:poke198,2:end
9000 print"[147]load"chr$(34)"hello"chr$(34)",8":print"run":poke198,0
9010 poke631,13:poke632,13:poke198,2:end
19000 remdata is thus:
19010 rem"[205]enu item","[208]rogram name"
20000 data"[215]arp +","ad.warp+"
20002 data"[211]ign [208]ainter","ad.sign painter"
20160 data"end","end"