home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 January / Ahoy_Magazine_85-01_1985_Double_L.d64 / card_movers (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  95 lines

  1. 10 dim cb(3),cm(3),mv$(6)
  2. 20 gosub 400:gosub 300
  3. 107 rem
  4. 108 rem main loop
  5. 109 rem
  6. 110 am=am+1:if am>3 then am=0
  7. 117 rem
  8. 118 rem switch character sets
  9. 119 rem
  10. 120 poke 53272,cm(am):for k=0 to 59:next
  11. 127 rem
  12. 128 rem is shift, commodore, or ctrl pressed?
  13. 129 rem
  14. 130 if peek(653)>0 then 200
  15. 190 goto 110
  16. 197 rem
  17. 198 rem ending routine
  18. 199 rem
  19. 200 poke 808,237:poke 648,4:poke 53272,xx:poke 56578,peek(56578)or 3
  20. 210 poke 56576,(peek(56576)and 252)or 3:print "[154]":end
  21. 297 rem
  22. 298 rem set up screen randomly
  23. 299 rem
  24. 300 mv$(0)="[156]a":mv$(1)="b":mv$(2)="c":mv$(3)="[144]d":mv$(4)="[129]e":mv$(5)="[149]f"
  25. 310 mv$(6)="[144]gh"
  26. 340 for i=0 to 35:d=int(rnd(9)*24):r=2*int(rnd(9)*19):cc=int(rnd(9)*7)
  27. 350 print "";:for j=0 to d:print "";:next:print tab(r)mv$(cc)" ";:next:return
  28. 395 rem
  29. 396 rem video set-up routines
  30. 397 rem
  31. 398 rem set video pointers
  32. 399 rem
  33. 400 vm=1:sm=6:for i=0 to 3:cm(i)=i*2+8:next:xx=peek(53272)
  34. 407 rem
  35. 408 rem set starting addresses
  36. 409 rem
  37. 410 vb=16*1024*vm:sb=vb+1024*sm:for i=0 to 3:cb(i)=cm(i)*1024+vb:next
  38. 417 rem
  39. 418 rem poke character data into place
  40. 419 rem
  41. 420 for i=0 to 3:for j=cb(i)+8 to cb(i)+71:read a:poke j,a:next:next
  42. 427 rem
  43. 428 rem set up blank character
  44. 429 rem
  45. 430 for i=0 to 3:for j=cb(i)+32*8 to cb(i)+32*8+7:poke j,0:next:next
  46. 437 rem
  47. 438 rem poke new character set and screen memory locations
  48. 439 rem
  49. 440 sk=sm*16:poke 648,sb/256
  50. 445 for i=0 to 3:cm(i)=cm(i)+sk:next:poke 53272,cm(0)
  51. 447 rem
  52. 448 rem poke new video block location
  53. 449 rem
  54. 450 poke 56578,peek(56578)or 3:poke 56576,(peek(56576)and 252)or (3-vm)
  55. 457 rem
  56. 458 rem disable shift-commodore and run/stop-restore
  57. 459 rem
  58. 460 print chr$(8):poke 808,234
  59. 490 print "[147]":return
  60. 997 rem
  61. 998 rem character data
  62. 999 rem
  63. 1000 data 0,0,0,24,24,0,0,0
  64. 1010 data 124,254,146,238,254,124,0,0
  65. 1020 data 28,62,62,28,0,0,0,0
  66. 1030 data 56,64,128,128,128,128,192,192
  67. 1040 data 0,0,0,0,0,0,16,254
  68. 1050 data 0,64,64,255,255,2,2,0
  69. 1060 data 0,10,10,10,22,45,83,145
  70. 1070 data 0,80,80,80,104,172,202,137
  71. 1080 data 0,0,24,44,52,24,0,0
  72. 1090 data 124,254,146,238,254,84,124,0
  73. 1100 data 0,0,0,28,62,62,28,0
  74. 1110 data 0,0,0,128,128,128,67,63
  75. 1120 data 0,0,0,0,16,56,124,254
  76. 1130 data 2,7,14,158,121,112,224,64
  77. 1140 data 0,20,20,42,45,75,81,144
  78. 1150 data 0,40,40,84,180,210,138,9
  79. 1160 data 0,60,122,102,102,94,60,0
  80. 1170 data 124,254,146,238,254,84,40,124
  81. 1180 data 0,0,0,0,0,28,62,127
  82. 1190 data 3,3,1,1,1,1,2,28
  83. 1200 data 0,0,16,16,56,56,124,254
  84. 1210 data 24,30,24,24,24,24,120,24
  85. 1220 data 20,42,45,43,81,80,80,144
  86. 1230 data 40,84,180,212,138,10,10,9
  87. 1240 data 126,191,195,203,211,195,253,126
  88. 1250 data 124,254,146,238,254,84,124,0
  89. 1260 data 0,0,0,28,62,62,28,0
  90. 1270 data 252,194,1,01,1,0,0,0
  91. 1280 data 16,16,56,56,124,124,254,254
  92. 1290 data 72,240,112,56,28,14,15,18
  93. 1300 data 0,20,20,42,45,75,81,144
  94. 1310 data 0,40,40,84,180,210,138,9
  95.