home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 15 / 015.d81 / contest (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  92 lines

  1. 0 rem contest text reader
  2. 1 ifpeek(51201)<>12orpeek(51202)<>200thenload"routines v4",8,1
  3. 2 d$=chr$(96):forx=1to6:d$=d$+d$:next
  4. 3 open15,8,15
  5. 4 poke650,255
  6. 5 da$=" --------------------------------------"
  7. 6 li=52016:su=51206:sd=51209:cl=51203
  8. 7 forc=217to242:pokel,peek(l)or128:next
  9. 8 print"[147][154]";:poke53281,0:poke53282,9
  10. 9 poke1020,4:poke1021,21:poke1022,1:poke1023,38
  11. 10 fi$="contest text"
  12. 20 dm=500:dimin$(dm)
  13. 30 gosub5000:remopening blurb
  14. 40 gosub6000:remload file
  15. 45 print"[147]";:goto50
  16. 46 print"[176]";left$(d$,38);"[174]";
  17. 47 fori=1to18:print"[221]                                      [221]";:next
  18. 48 print"[173]";left$(d$,38);"[189]";:print"";:forl=217to242:pokel,128orpeek(l):next
  19. 49 return
  20. 50 gosub7000:gosub46:print"";:
  21. 800 print:forc1=0to16:print""in$(c1):next:print""in$(c1);:lp=0
  22. 810 poke646,1:syscl:print"";
  23. 850 getk$:print"[158]";:ifk$=""then850
  24. 860 ifk$="[145]"ork$=""ork$="[134]"ork$="[138]"thengosub11000:goto850
  25. 865 ifk$="[137]"ork$="[133]"thenforcc=1to18:gosub11000:next:goto850
  26. 870 ifk$=""ork$="[157]"ork$="[139]"ork$="[135]"thengosub10000:goto850
  27. 875 ifk$="[136]"ork$="[140]"thenforcc=1to18:gosub10000:next:goto850
  28. 877 ifk$="p"thengosub2000:print"[147]":goto50
  29. 878 ifk$="x"ork$="[216]"then63000
  30. 879 ifk$="\"ork$="[169]"thengosub12000:         goto850
  31. 880 print"[158]";:gosub7000:print"[146][154]";:gosub7000:goto850
  32. 1000 :
  33. 2000 rem hard(NULL)
  34. 2010 print""da$:printda$:print"[212]urn on your printer and press[160]<return>"
  35. 2011 getk$:ifk$=""then2011
  36. 2012 ifk$<>chr$(13)then2090
  37. 2015 print"  [208]ress any key to stop printing.      "
  38. 2020 print"";
  39. 2030 open4,4,7:print#4,chr$(17);
  40. 2040 lp=0
  41. 2050 ifll-lp<120then2060
  42. 2052 fori=lptolp+59:rs=60:gosub3000:next
  43. 2054 getc$:ifc$<>""thenprint#4:close4:       goto2090
  44. 2056 print#4,"";:lp=lp+120:goto2050
  45. 2060 rs%=(ll-lp+2)/2:rs=rs%:fori=lptolp+rs-1:gosub3000:next
  46. 2070 print#4,"";:getc$:close4
  47. 2090 return
  48. 3000 rem  print lines
  49. 3010 print#4,in$(i);spc(40-len(in$(i)));in$(i+rs)
  50. 3020 return
  51. 5000 print""da$:print"         --[204]oading some text--"
  52. 5010 print" ----------[208]lease be patient.----------"
  53. 5045 print:print:print"[208]ress 'x' to exit now without reading"
  54. 5050 print:print"this article."
  55. 5060 return
  56. 6000 open8,8,8,fi$
  57. 6030 ll=0:poke781,8:sys65478
  58. 6040 sysli,b$:in$(ll)=mid$(b$,1)
  59. 6044 ifpeek(198)<>0thenifpeek(631)=88then6100
  60. 6045 ifst=0thenll=ll+1:goto6040
  61. 6100 sys65484:close8:close15
  62. 6105 lc=ll:nl=ll
  63. 6110 return
  64. 6150 sys65484:close8:close15
  65. 7000 print" -----[208]ress f1-f7 keys to move text----"
  66. 7005 print" -------[208]ress 'p' to print text.-------"
  67. 7010 print" ----------[208]ress 'x' to exit-----------"
  68. 7015 printda$
  69. 7020 return
  70. 10000 poke646,1:syscl:print"";:              iflp>=lc-15then10015
  71. 10002 print"";:        lp=lp+1:syssu
  72. 10005 ifleft$(in$(lp+17),4)="\oad"then        print"":goto10020
  73. 10010 printin$(lp+17):goto10020
  74. 10015 poke53280,rnd(1)*15
  75. 10020 return
  76. 10030 :
  77. 11000 poke646,1:syscl:print"";:              iflp<=1then11015
  78. 11002 print"";:lp=lp-1:syssd
  79. 11005 ifleft$(in$(lp),4)="\oad"then           print"":goto10020
  80. 11010 printin$(lp):goto11020
  81. 11015 poke53280,rnd(1)*15
  82. 11020 return
  83. 12000 rem   can you run it now?
  84. 12010 forx=lptolp+15:ifleft$(in$(x),4)=       "\oad"then13000
  85. 12020 next:return
  86. 13000 rem    yes, you can run it now!
  87. 13010 print"[147]l"mid$(in$(x),2):             print"run"
  88. 13020 goto63020
  89. 63000 poke650,128
  90. 63010 print"[147]load"chr$(34)"hello"          chr$(34)",8":print"run"
  91. 63020 poke631,13:poke632,13:poke198,2:        end
  92.