home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1989 August
/
1989-08.d64
/
screensplitter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
158 lines
100 rem copyright 1989 compute! publications, inc. all rights reserved.
110 gosub1560:goto1270
120 sys52736:clr:poke53082,1:poke53083,51
130 input"[155][147]# of screen areas (2-100)";pa
140 ifpa<2orpa>100then130
150 dimpa(pa):pa(pa)=51
160 print"[147]"tab(15)"[155]value:"
170 printtab(12)" crsr [146] move area":printtab(12)" return [146] confirm"
180 printtab(12)" e [146] exit to menu"
190 fora=1102to1982step80:pokea,224:next
200 print"":fora=2to22step2:printa"":next:print" 24"
210 forc=pa-1to1step-1
220 print"[155]"tab(12)"define area #"pa-c
230 y=pa(c+1)
240 gosub370
250 pa(c)=y:next
260 pa(pa)=0
270 forc=1topa-1:pa(c)=pa(c)+1:next
280 sys52736
290 print"[147][155]number of areas:"pa""
300 forc=1topa-1:print"[155] area #"c"[157]:"pa(pa+1-c)"to"pa(pa+1-(c+1))-1:next
310 print"[155] area #"pa"[157]:"pa(1)"up to the end."
320 input"[155] are you sure (y/n/e) y[157][157][157]";a$
330 ifa$="y"then500
340 ifa$="n"then120
350 ifa$="e"then1270
360 goto290
370 sys52992
380 ify=254andc<pathen120
390 ifc<pa-1thenpoke53082,y:poke53083,y+1:y=y+1
400 geta$
410 ifa$=""theny=y+1:poke53083,peek(53083)+1
420 ifa$="[145]"theny=y-1:poke53083,peek(53083)-1
430 ifa$=chr$(13)thenreturn
440 ifa$="e"then1270
450 ify=1theny=2:poke53083,2
460 ify=255theny=254:poke53083,254
470 ifc<pa-1thenify=pa(c+1)theny=y+1:poke53083,peek(53083)+1
480 print""tab(21)y"[157] "
490 goto400
500 input"[147] how many addresses are you poking";re:ifre<1 or re>255then500
510 input" are you sure (y/n/e) y[157][157][157]";a$
520 ifa$="e"then1270
530 ifa$="n"then500
540 ifa$<>"y"thenprint"[145][145][145]":goto510
550 dimre(re,pa)
560 print:forc=1tore
570 print"[147] address #"c;:inputre(c,0)
580 ifre(c,0)<0orre(c,0)>65535then570
590 print:forb=1topa
600 print" value of"re(c,0)"for area #"b;:input re(c,b)
610 if re(c,b)<0 or re(c,b)>255 thenprint"[145][145]":goto600
620 next
630 input" are you sure (y/n/e) y[157][157][157]";a$
640 ifa$="n"then570
650 ifa$="e"then1270
660 ifa$<>"y"thenprint"[145][145][145]":goto630
670 next
680 print"[147] are you using another irq":input" routine (y/n/e) n[157][157][157]";a$
690 ifa$="n"then740
700 ifa$="e"then1270
710 ifa$<>"y"then680
720 input" address of the jump";rs
730 if rs<0 or rs>65535 thenprint"[145][145][145][145]":goto720
740 print"[147] wait a moment, please..."
750 poke 49182,pa
760 poke 49223,pa-1
770 di=49231
780 forc=1 to re
790 poke di,141:di=di+1
800 poke di,re(c,0)-int(re(c,0)/256)*256:di=di+1
810 poke di,int(re(c,0)/256)
820 di=di+4:next
830 poke di,141:di=di+1
840 poke di,018:di=di+1
850 poke di,208:di=di+1
860 poke di,138:di=di+1
870 poke di,240:di=di+1
880 poke di,006:di=di+1
890 poke di,104:di=di+1
900 poke di,168:di=di+1
910 poke di,104:di=di+1
920 poke di,170:di=di+1
930 poke di,104:di=di+1
940 poke di,064:di=di+1
950 poke di,076:di=di+1
960 if rs=0 then poke di,49:poke di+1,234:di=di+2:goto990
970 poke di,rs-int(rs/256)*256:di=di+1
980 poke di,int(rs/256):di=di+1
990 dd=di:di=49228
1000 for c=1 to re
1010 poke di,189:di=di+1
1020 b=dd+c*pa
1030 poke di,b-int(b/256)*256:di=di+1
1040 poke di,int(b/256)
1050 di=di+4:nextc
1060 poke di,189:di=di+1
1070 poke di,dd-int(dd/256)*256:di=di+1
1080 poke di,int(dd/256)
1090 poke 49191,dd-int(dd/256)*256
1100 poke 49192,int(dd/256)
1110 forc=1topa
1120 poke dd+c-1,abs(pa(c)-1)
1130 next c
1140 dd=dd+pa
1150 forc=1 to re
1160 forb=pa-1 to 1 step-1
1170 poke dd,re(c,b):dd=dd+1
1180 next
1190 poke dd,re(c,pa):dd=dd+1
1200 next
1210 poke49168,dd-int(dd/256)*256:poke49169,int(dd/256)
1220 print" ready [146]"
1230 print"[155] the routine starts in: 49170"
1240 print" [155]and ends in:"dd
1250 print" press any key to continue"
1260 poke198,0:wait 198,1
1270 clr:sys52736
1280 print"[147][155] screen splitter [146]"
1290 printtab(8)"f1[155]. create interrupt"
1300 printtab(8)"f3[155]. turn on"
1310 printtab(8)"f4[155]. turn off"
1320 printtab(8)"f5[155]. save interrupt"
1330 printtab(8)"f7[155]. end"
1340 printtab(10)"select your option"
1350 geta$:ifa$=""then1350
1360 ifa$="[133]"then120
1370 ifa$="[134]"thensys49170
1380 ifa$="[138]"thensys52736:goto1270
1390 ifa$="[135]"then1420
1400 ifa$="[136]"then1520
1410 goto1350
1420 sys52736
1430 input"[147][155] name ";n$:if n$="" then1270
1440 n$=left$(n$,16)
1450 print" saving..."
1460 fort=1tolen(n$):poke49151+t,asc(mid$(n$,t,1)):next
1470 poke780,len(n$):poke781,0:poke782,192:sys65469
1480 poke780,1:poke781,8:poke782,255:sys65466
1490 poke251,16:poke252,192
1500 poke780,251:poke781,peek(49168):poke782,peek(49169):sys65496
1510 goto1270
1520 input"[155] are you sure (y/n) y[157][157][157]";a$
1530 ifa$="y"thenend
1540 ifa$="n"then1270
1550 print"[145][145][145]":goto1520
1560 fora=52992to53085:readn:pokea,n:pokea-3822,n:next
1570 fora=52736to52756:readn:pokea,n:next
1580 poke49197,56:poke49202,192:poke49229,104:poke49230,192
1590 poke49235,102:poke49236,192:return
1600 data 120,169,127,141,13,220,169,1,141,26,208,169,2,133,2,169,27,141
1610 data 17,208,173,97,192,141,18,208,169,38,141,20,3,169,207,141,21,3
1620 data 88,96,173,25,208,141,25,208,41,1,240,25,198,2,16,4,169,1,133
1630 data 2,166,2,189,92,207,141,33,208,189,90,207,141,18,208,138,240,6
1640 data 104,168,104,170,104,64,76,49,234,0,0,1,2,0,1,234,0,1,2,0,1
1650 data 120,169,49,141,20,3,169,234,141,21,3,32,129,255,88,169,0,141,33,208,96
0