home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 13 / 013.d81 / peek-a-poke (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  134 lines

  1. 10 clr : print chr$(147)
  2. 20 print"hi! i am your user-friendly commodore 64"
  3. 22 print : gosub 950 : print
  4. 30 print"but first,"
  5. 32 print"let me do some additional programming."
  6. 40 print : print"sit back, relax, and wait..."
  7. 42 for t=1 to 10000 : next t
  8. 50 b=2000 : w=60 : goto 1000
  9. 60 b=2300 : w=64 : goto 1000
  10. 64 goto 2000
  11. 70 print chr$(147)
  12. 74 print"i am finished. now the"
  13. 76 gosub 950 : print
  14. 80 print"a n d    n o w :"
  15. 92 print" let's explore a few of the more"
  16. 94 print tab(8) "exotic peeks and pokes!"
  17. 98 print"for example:" : print
  18. 140 print"a commodore 64"
  19. 150 print"(p=34 would mean a vic-20)"
  20. 240 if p=21 then print"normal 'upper case/graphics' mode."
  21. 250 if p=21 then print"(if you want to switch: poke 53272, 23)"
  22. 260 if p=23 then print"so-called 'upper case/lower case' mode."
  23. 270 if p=23 then print"(if you want to switch: poke 53272, 21)"
  24. 332 print"the normal blinking rate of the cursor."
  25. 334 ::poke 56325,10 : print
  26. 340 print"have you noticed? i just speeded it up!" : print"(p is now 10)"
  27. 350 print"just for fun:"
  28. 352 print"press the 'cursor right' key"
  29. 354 print : u$=chr$(145)
  30. 370 ::poke 56325,58
  31. 382 print"(to change it yourself, poke 56325,n"
  32. 384 print"where n is any number between 1 and 255)"
  33. 416 print"with this line, i have just made all the standard keys -";
  34. 418 print"'repeating keys'"
  35. 450 print"go ahead and try"
  36. 452 print" - hold a key down!" : print
  37. 470 ::poke 650,0
  38. 510 print : print"with this line, i have just stopped"
  39. 520 print chr$(18) tab(11) "everything"
  40. 530 print"until the 'commodore' key is depressed!" : print
  41. 540 print"try! no other key will do..." : print
  42. 570 print "well done; let's go on."
  43. 610 print : print"this line turns the screen off:"
  44. 614 print"(don't touch anything. just wait) _ _"
  45. 680 print"this speeds up the running of a program."
  46. 684 print : print"p.s.: i turned the screen back on with:"
  47. 720 print"let me show you a new character:"
  48. 730 print"give a line number (between 10 and 13)"
  49. 732 input"li ="; li:ifli<10orli>13thenprint"[145]";:goto732
  50. 740 print"now a column number (between 0 and 39)"
  51. 742 input"co ="; co:ifco<0orco>39thenprint"[145]";:goto742
  52. 760 print"you probably did not know that i can"
  53. 762 print"provide a checkmark, and that you can"
  54. 764 print"place it anywhere on the screen!"
  55. 766 print"w a i t . . ."
  56. 782 ::print chr$(142) : print
  57. 784 print "(unfortunately, only in lower case.)"
  58. 820 print"just to show you that you can use tab"
  59. 830 print"values up to 255."
  60. 840 print tab(10) "end"
  61. 850 goto63000
  62. 900 print : for x=1 to 40:print "-" ; :next x
  63. 910 input"hit 'return' to continue _ _"; k$
  64. 920 print chr$(147) : print : return
  65. 950 print"current program length is:";
  66. 960 print 38909-(fre(1)-(fre(1)<0)*65536) "bytes" : return
  67. 1000 q$=chr$(34):print chr$(147) chr$(17) chr$(17)
  68. 1010 for l=b to b+200 step 100
  69. 1020 print l":q$=chr$(34):print chr$(147) chr$(17) chr$(17)"
  70. 1040 print l+40":next l"
  71. 1050 print l+80":print"q$"goto"l+100"      w a i t  !"
  72. 1051 rem ^ 1050 print l+80":print"q$"goto"l+100"[space6]w a i t[space2]!"
  73. 1060 print l+90":goto 1500
  74. 1070 [130] l
  75. 1080 [153]"goto"w"          w a i t  !"
  76. 1081 [143] ^ 1080 print"goto"w"[space10]w a i t[space2]!"
  77. 1090 [137] 1500
  78. 1500 ::[129] x[178]1 [164] 15:[151] 630[170]x,13:[130] x
  79. 1510 ::[151] 198,15:[153] [199](19):[128]
  80. 2010 [129] l[178]112 [164] 812 [169] 100
  81. 2020 [153] l":print"
  82. 2022 [139] l[177]600 [167] 2040
  83. 2030 [153] l[170]10":print"
  84. 2050 [153] 25":goto 92:rem program completed by computer"
  85. 2110 [129] l[178]90 [164] 790 [169] 100
  86. 2120 [153] l":gosub 900"
  87. 2210 [129] l[178]560 [164] 630 [169] 70
  88. 2212 [139] l[178]560 [167] 2230
  89. 2220 [153] l[171]10":for t=1 to 2000:next t"
  90. 2230 [153] l":get junk$:ifjunk$ <>" q$ q$ "then" l
  91. 2232 [139] l[178]72 [167] 2280
  92. 2234 [139] l[178]780 [167] 2260
  93. 2250 [129] l[178]660 [164] 780 [169] 120 : [137] 2220
  94. 2260 l[178] 72 :[137] 2230
  95. 2320 p$(1)[178]"peek(65532)":p$(2)[178]"peek(53272)":p$(3)[178]"peek(56325)"
  96. 2330 [129] l[178]100 [164] 300 [169] 100
  97. 2332 [153] l"::p=" p$(l[173]100)
  98. 2334 [153] l[170]10":print" l[170]10 q$ "p=" p$(l[173]100) " : print p"
  99. 2336 [153] l[170]30":print" q$ "line" l[170]10 "tells me you are using"
  100. 2350 [129] l[178] 120 [164] 220 [169] 100
  101. 2360 [153] l":print" q$ "that gives p =" q$ "p"
  102. 2362 [153] l[170]260":print:print:print" q$ "back to normal."
  103. 2370 [130] l
  104. 2410 [129] l[178]360 [164] 460 [169] 100
  105. 2420 [153] l":print chr$(18)" q$ "but then hit 'return'"
  106. 2430 [153] l[170]2":print tab(30) u$ u$ u$;:input k$"
  107. 2450 p1$[178]"poke 650, 128":p2$[178]"wait 653,2"
  108. 2452 [153] 400"::" p1$
  109. 2454 [153] 410":print" 410 q$ p1$
  110. 2456 [153] 500"::print" 500 q$ p2$
  111. 2458 [153] 550":" p2$
  112. 2460 p3$[178]"poke 53265, peek(53265)":p4$[178]"and 239":p5$[178]"or 16"
  113. 2462 [153] 600":print" 600 q$ p3$ p4$
  114. 2464 [153] 640"::" p3$ p4$
  115. 2466 [153] 670"::" p3$ p5$
  116. 2468 [153] 686":print" 670 q$ p3$ p5$
  117. 2510 [129] l[178]342 [164] 642 [169] 300
  118. 2520 [153] l":print:print"
  119. 2530 [139] l[178]672 [167] 2550
  120. 2542 [129] l[178]96 [164] 672 [169] 576 : [137] 2520
  121. 2550 p1$[178]"poke 214, li : print : poke 211, co"
  122. 2552 p2$[178]"chr$(186) chr$(14)"
  123. 2554 [153] 700":print" 700; : [153] q$ p1$
  124. 2556 [153] 702":print" 702 q$ "print"; : [153] p2$
  125. 2558 [153] 750"::" p1$
  126. 2560 [153] 752"::print" p2$
  127. 2570 p1$[178]"that's enough, folks."
  128. 2572 [153] 800":print" 800 q$ "print tab(250)" q$ "chr$(34)" q$ p1$
  129. 2574 [153] 810"::print tab(250)" q$ p1$
  130. 2600 [137] 70
  131. 63000 [129]dl[178]1[164]4000:[130]
  132. 63005 [153]"loadload"[199](34)"payload"[199](34)",8":[153]"run"
  133. 63010 [151]631,13:[151]632,13:[151]198,2:[128]
  134.