home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 4 #10
/
Commodore_Disk_User_Vol.4_10_1991_-.d64
/
c64switch
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
79 lines
1000 :
1010 rem this pgm performs 2 functions
1020 rem (1) it is the basic loader for
1030 rem the screen switch ml pgm &
1040 rem (2) it initialises 680-727
1050 rem with values to be used in
1055 rem zero page locations 43-66
1060 rem for the screen switch ml
1065 rem pgm.
1067 :
1070 poke51,255:poke52,159:poke53,255:poke54,158:poke55,255:poke56,159
1075 gosub10000 :rem load ml pgm
1080 sa=peek(43)+peek(44)*256
1090 ea=peek(55)+peek(56)*256
1100 input"enter region 0 ending addr ==>";r0
1110 ifr0<sagoto2050
1120 ifr0>eaorr0=eagoto2100
1130 ad=r0:gosub9000
1140 poke51,lb:poke52,hb :rem setup r0
1150 poke53,lb:poke54,hb :rem memory
1160 poke55,lb:poke56,hb :rem limits.
1170 fori=0to23:poke680+i,peek(43+i):next
1180 :
1190 rem set region 1 pointers in 704-727
1200 :
1210 poker0+1,0 :rem for basic
1220 r1=r0+2 :rem rgn 1 addr
1230 ad=r1:gosub9000 :rem start of
1240 poke704,lb:poke705,hb:rem basic.
1250 ad=r1+2:gosub9000 :rem start of
1260 poke706,lb:poke707,hb:rem variabls
1270 ad=r1+9:gosub9000
1280 poke708,lb:poke709,hb:rem arrays
1290 poke710,lb:poke711,hb:rem start,end
1300 ad=ea:gosub9000
1310 poke712,lb:poke713,hb:rem strings
1320 poke714,lb:poke715,hb:rem utility
1330 poke716,lb:poke717,hb:rem mem limit
1340 fori=718to725:pokei,0:next
1350 ad=r1-1:gosub9000
1360 poke726,lb:poke727,hb:rem data stm
1370 :
1380 print"region 0 &[160]1 initialised"
1390 print"region activated = 0"
1400 sys40704:end
2000 :
2010 rem error messages
2020 :
2050 print"region 0 ending addr,";r0;"<[160]region 0 starting addr,";sa
2060 print"please reenter region 0 starting addr"
2070 goto1100
2080 :
2100 print"region 0 ending addr,";r0;"> memory limit,";ea
2110 goto2060
2120 :
9000 hb=int(ad/256):lb=ad-(hb*256):return
10000 :
10010 rem data statements for ml pgm
10020 :
10100 data 120,173,20,3,141,171,159,173,21,3,141,172,159,169,39,141,20,3,169
10110 data 159,141,21,3,162,0,160,48,189,168,2,157,173,159,232,136,208
10120 data 246,88,96,165,197,201,64,240,122,201,3,240,7,201,4,240,3,76
10130 data 167,159,174,170,159,240,2,162,24,160,0,141,223,159,185,43,0
10140 data 157,173,159,232,200,192,24,144,244,173,223,159,201,3,240,8
10150 data 162,0,142,170,159,76,102,159,162,1,142,170,159,162,24,160,0
10160 data 189,173,159,153,43,0,232,200,192,24,144,244,165,43,141,129
10170 data 2,165,44,141,130,2,165,55,141,131,2,165,56,141,132,2,173,170
10180 data 159,9,176,141,228,159,172,134,2,162,0,189,224,159,240,13,41
10190 data 191,157,35,4,152,157,35,216,232,76,149,159,108,171,159,0,49
10200 data 234,1,8,146,49,174,49,79,69,253,79,253,79,255,79,126,4,2,0
10210 data 55,33,4,0,0,8,1,80,50,99,50,99,50,99,255,159,255,159,0,160
10220 data 249,156,0,0,144,0,0,0,0,80,51,0,4,210,199,206,189,176,0,117
10230 data 117,0,0,117,117,0,0,117,117,0,0,117,117,128,0,117,117,0,0,117
10240 data 117,0,0,255,255
10250 fori= 40704to 40959
10260 readj:x=x+j:pokei,j:next
10270 ifx= 28726thenreturn
10280 print"data statements invalid":end