home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 8 / 008.d81 / ad.menu (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  1KB  |  53 lines

  1. 0 rem8/3/84
  2. 5 :
  3. 10 remad.menu
  4. 20 dima$(80,1)
  5. 30 x=1020
  6. 100 restore:forc=1to80:reada$(c,0),a$(c,1):ifa$(c,0)="end"thenl=c-1:goto120
  7. 110 nextc
  8. 120 a$(l+1,0)="":a$(l+1,1)=""
  9. 125 t1=peek(x):ift1=peek(x+1)thenift1<=lthenift1>=0then150
  10. 130 rem
  11. 140 pokex,0:pokex+1,0:run
  12. 150 poke53281,5:poke53280,2:print"[144][147]";
  13. 151 pc=int(l/10)+1:pn=int(t1/10)+1
  14. 160 print"[147]   [204][207][193][196][211][212][193][210] [193][196] [205][197][206][213] - page "str$(pn)" of "str$(pc)".   [146]"
  15. 170 fory=1to9:print:iflen(a$(y+(pn-1)*9,0))thenprinty" = "a$(y+(pn-1)*9,0)
  16. 180 next
  17. 190 gosub7000
  18. 195 gosub6000
  19. 200 goto160
  20. 5000 print"(";str$(pn+abs(t1=9ort1=18ort1=27));"/";
  21. 5005 t2=t1+1
  22. 5007 ift1<9then5020
  23. 5010 t2=t2-9:ift2>9then5010
  24. 5020 printstr$(t2);")    ";
  25. 5030 return
  26. 6000 poke198,0:wait198,1:getr$
  27. 6002 ifval(r$)>0andlen(a$(val(r$)+(pn-1)*9,0))=0then6000
  28. 6005 ifval(r$)>0thenr=val(r$)+(pn-1)*9:goto8000
  29. 6010 ifr$=""orr$="[157]"thenpn=pn-1:ifpn<1thenpn=1:goto6090
  30. 6020 ifr$="[145]"orr$=""thenpn=pn+1:ifpn>pcthenpn=pc:goto6090
  31. 6030 ifr$="x"orr$="[216]"then9000
  32. 6040 ifr$="n"orr$="[206]"thenr=t1+1:goto8000
  33. 6070 ifr$="[145]"orr$=""orr$="[157]"orr$=""then6090
  34. 6080 ifr$<>"n"andr$<>"[206]"andr$<>"x"andr$<>"[216]"then6000
  35. 6090 return
  36. 7000 print"1-9 selects ad. _crsr^ select next page"
  37. 7010 print"[208]ress [206] to read the next ad ";:gosub5000:print"[146] [208]ress [216] to exit.";
  38. 7020 print"                       [146]";
  39. 7023 poke56295,2:poke2023,160
  40. 7024 d$=""
  41. 7025 forc=1to25:print"";spc(39);mid$(d$,c);" [146][144]";:next
  42. 7030 return
  43. 8000 print"[147]load"chr$(34)a$(r,1)chr$(34)",8":print"run":poke198,0
  44. 8005 pokex,r:pokex+1,r+abs(r>=l)
  45. 8010 poke631,13:poke632,13:poke198,2:end
  46. 9000 print"[147]load"chr$(34)"hello"chr$(34)",8":print"run":poke198,0
  47. 9010 poke631,13:poke632,13:poke198,2:end
  48. 19000 remdata is thus:
  49. 19010 rem"[205]enu item","[208]rogram name"
  50. 20000 data"[215]arp +","ad.warp+"
  51. 20002 data"[211]ign [208]ainter","ad.sign painter"
  52. 20160 data"end","end"
  53.