home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1989 August / 1989-08.d64 / screensplitter (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  158 lines

  1. 100 rem copyright 1989 compute! publications, inc.  all rights reserved.
  2. 110 gosub1560:goto1270
  3. 120 sys52736:clr:poke53082,1:poke53083,51
  4. 130 input"[155][147]# of screen areas (2-100)";pa
  5. 140 ifpa<2orpa>100then130
  6. 150 dimpa(pa):pa(pa)=51
  7. 160 print"[147]"tab(15)"[155]value:"
  8. 170 printtab(12)" crsr [146] move area":printtab(12)" return [146] confirm"
  9. 180 printtab(12)" e [146] exit to menu"
  10. 190 fora=1102to1982step80:pokea,224:next
  11. 200 print"":fora=2to22step2:printa"":next:print" 24"
  12. 210 forc=pa-1to1step-1
  13. 220 print"[155]"tab(12)"define area #"pa-c
  14. 230 y=pa(c+1)
  15. 240 gosub370
  16. 250 pa(c)=y:next
  17. 260 pa(pa)=0
  18. 270 forc=1topa-1:pa(c)=pa(c)+1:next
  19. 280 sys52736
  20. 290 print"[147][155]number of areas:"pa""
  21. 300 forc=1topa-1:print"[155]   area #"c"[157]:"pa(pa+1-c)"to"pa(pa+1-(c+1))-1:next
  22. 310 print"[155]   area #"pa"[157]:"pa(1)"up to the end."
  23. 320 input"[155]  are you sure (y/n/e)  y[157][157][157]";a$
  24. 330 ifa$="y"then500
  25. 340 ifa$="n"then120
  26. 350 ifa$="e"then1270
  27. 360 goto290
  28. 370 sys52992
  29. 380 ify=254andc<pathen120
  30. 390 ifc<pa-1thenpoke53082,y:poke53083,y+1:y=y+1
  31. 400 geta$
  32. 410 ifa$=""theny=y+1:poke53083,peek(53083)+1
  33. 420 ifa$="[145]"theny=y-1:poke53083,peek(53083)-1
  34. 430 ifa$=chr$(13)thenreturn
  35. 440 ifa$="e"then1270
  36. 450 ify=1theny=2:poke53083,2
  37. 460 ify=255theny=254:poke53083,254
  38. 470 ifc<pa-1thenify=pa(c+1)theny=y+1:poke53083,peek(53083)+1
  39. 480 print""tab(21)y"[157] "
  40. 490 goto400
  41. 500 input"[147] how many addresses are you poking";re:ifre<1 or re>255then500
  42. 510 input" are you sure (y/n/e)  y[157][157][157]";a$
  43. 520 ifa$="e"then1270
  44. 530 ifa$="n"then500
  45. 540 ifa$<>"y"thenprint"[145][145][145]":goto510
  46. 550 dimre(re,pa)
  47. 560 print:forc=1tore
  48. 570 print"[147] address #"c;:inputre(c,0)
  49. 580 ifre(c,0)<0orre(c,0)>65535then570
  50. 590 print:forb=1topa
  51. 600 print"  value of"re(c,0)"for area #"b;:input re(c,b)
  52. 610 if re(c,b)<0 or re(c,b)>255 thenprint"[145][145]":goto600
  53. 620 next
  54. 630 input" are you sure (y/n/e)  y[157][157][157]";a$
  55. 640 ifa$="n"then570
  56. 650 ifa$="e"then1270
  57. 660 ifa$<>"y"thenprint"[145][145][145]":goto630
  58. 670 next
  59. 680 print"[147] are you using another irq":input" routine (y/n/e)  n[157][157][157]";a$
  60. 690 ifa$="n"then740
  61. 700 ifa$="e"then1270
  62. 710 ifa$<>"y"then680
  63. 720 input" address of the jump";rs
  64. 730 if rs<0 or rs>65535 thenprint"[145][145][145][145]":goto720
  65. 740 print"[147] wait a moment, please..."
  66. 750 poke 49182,pa
  67. 760 poke 49223,pa-1
  68. 770 di=49231
  69. 780 forc=1 to re
  70. 790 poke di,141:di=di+1
  71. 800 poke di,re(c,0)-int(re(c,0)/256)*256:di=di+1
  72. 810 poke di,int(re(c,0)/256)
  73. 820 di=di+4:next
  74. 830 poke di,141:di=di+1
  75. 840 poke di,018:di=di+1
  76. 850 poke di,208:di=di+1
  77. 860 poke di,138:di=di+1
  78. 870 poke di,240:di=di+1
  79. 880 poke di,006:di=di+1
  80. 890 poke di,104:di=di+1
  81. 900 poke di,168:di=di+1
  82. 910 poke di,104:di=di+1
  83. 920 poke di,170:di=di+1
  84. 930 poke di,104:di=di+1
  85. 940 poke di,064:di=di+1
  86. 950 poke di,076:di=di+1
  87. 960 if rs=0 then poke di,49:poke di+1,234:di=di+2:goto990
  88. 970 poke di,rs-int(rs/256)*256:di=di+1
  89. 980 poke di,int(rs/256):di=di+1
  90. 990 dd=di:di=49228
  91. 1000 for c=1 to re
  92. 1010 poke di,189:di=di+1
  93. 1020 b=dd+c*pa
  94. 1030 poke di,b-int(b/256)*256:di=di+1
  95. 1040 poke di,int(b/256)
  96. 1050 di=di+4:nextc
  97. 1060 poke di,189:di=di+1
  98. 1070 poke di,dd-int(dd/256)*256:di=di+1
  99. 1080 poke di,int(dd/256)
  100. 1090 poke 49191,dd-int(dd/256)*256
  101. 1100 poke 49192,int(dd/256)
  102. 1110 forc=1topa
  103. 1120 poke dd+c-1,abs(pa(c)-1)
  104. 1130 next c
  105. 1140 dd=dd+pa
  106. 1150 forc=1 to re
  107. 1160 forb=pa-1 to 1 step-1
  108. 1170 poke dd,re(c,b):dd=dd+1
  109. 1180 next
  110. 1190 poke dd,re(c,pa):dd=dd+1
  111. 1200 next
  112. 1210 poke49168,dd-int(dd/256)*256:poke49169,int(dd/256)
  113. 1220 print"  ready [146]"
  114. 1230 print"[155] the routine starts in: 49170"
  115. 1240 print" [155]and ends in:"dd
  116. 1250 print" press any key to continue"
  117. 1260 poke198,0:wait 198,1
  118. 1270 clr:sys52736
  119. 1280 print"[147][155] screen splitter [146]"
  120. 1290 printtab(8)"f1[155]. create interrupt"
  121. 1300 printtab(8)"f3[155]. turn on"
  122. 1310 printtab(8)"f4[155]. turn off"
  123. 1320 printtab(8)"f5[155]. save interrupt"
  124. 1330 printtab(8)"f7[155]. end"
  125. 1340 printtab(10)"select your option"
  126. 1350 geta$:ifa$=""then1350
  127. 1360 ifa$="[133]"then120
  128. 1370 ifa$="[134]"thensys49170
  129. 1380 ifa$="[138]"thensys52736:goto1270
  130. 1390 ifa$="[135]"then1420
  131. 1400 ifa$="[136]"then1520
  132. 1410 goto1350
  133. 1420 sys52736
  134. 1430 input"[147][155] name ";n$:if n$="" then1270
  135. 1440 n$=left$(n$,16)
  136. 1450 print" saving..."
  137. 1460 fort=1tolen(n$):poke49151+t,asc(mid$(n$,t,1)):next
  138. 1470 poke780,len(n$):poke781,0:poke782,192:sys65469
  139. 1480 poke780,1:poke781,8:poke782,255:sys65466
  140. 1490 poke251,16:poke252,192
  141. 1500 poke780,251:poke781,peek(49168):poke782,peek(49169):sys65496
  142. 1510 goto1270
  143. 1520 input"[155] are you sure (y/n)  y[157][157][157]";a$
  144. 1530 ifa$="y"thenend
  145. 1540 ifa$="n"then1270
  146. 1550 print"[145][145][145]":goto1520
  147. 1560 fora=52992to53085:readn:pokea,n:pokea-3822,n:next
  148. 1570 fora=52736to52756:readn:pokea,n:next
  149. 1580 poke49197,56:poke49202,192:poke49229,104:poke49230,192
  150. 1590 poke49235,102:poke49236,192:return
  151. 1600 data 120,169,127,141,13,220,169,1,141,26,208,169,2,133,2,169,27,141
  152. 1610 data 17,208,173,97,192,141,18,208,169,38,141,20,3,169,207,141,21,3
  153. 1620 data 88,96,173,25,208,141,25,208,41,1,240,25,198,2,16,4,169,1,133
  154. 1630 data 2,166,2,189,92,207,141,33,208,189,90,207,141,18,208,138,240,6
  155. 1640 data 104,168,104,170,104,64,76,49,234,0,0,1,2,0,1,234,0,1,2,0,1
  156. 1650 data 120,169,49,141,20,3,169,234,141,21,3,32,129,255,88,169,0,141,33,208,96
  157.