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 >
Commodore BASIC  |  2022-10-26  |  3KB  |  79 lines

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