home *** CD-ROM | disk | FTP | other *** search
/ Light / Light_Vol.1_May_1992_Datasphere_Publications_Disk_1_of_2_Side_B.d64 / cgsd.demo (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  2KB  |  57 lines

  1. 0 rem *********************************
  2. 1 rem *    a basic demo program       *
  3. 2 rem *           bones               *
  4. 3 rem *********************************
  5. 4 :
  6. 5 :
  7. 10 print"[147]please wait....loading data and         machine code files";l+1
  8. 20 :
  9. 30 :
  10. 40 :
  11. 50 rem *** these are the lines of code         *** you would use to load the
  12. 60 rem *** m/c proggy and the screen           *** files (ramdisk), from disk..
  13. 70 :
  14. 75 :
  15. 80 l=l+1
  16. 90 ifl=1then load "cgsd.mc",8,1
  17. 100 ifl=2then load "ramdisk.chr",8,1
  18. 110 ifl=3then load "ramdisk.col",8,1
  19. 114 :
  20. 115 :
  21. 120 rem *** this line lowers the top of         *** basic leaving 29345 bytes
  22. 125 rem *** of memory for basic proggy
  23. 130 :
  24. 140 poke 55,00:poke56,128:print"[147]29345 bytes for basic proggy"
  25. 145 forx=1to3000:next
  26. 150 :
  27. 155 :
  28. 160 rem *** these are quite simple lines        *** of code to demonstrate how
  29. 170 rem *** you might use the m/c proggy        *** and screenfiles within your
  30. 180 rem *** own basic programs.
  31. 190 :
  32. 200 bo=53280:ba=53281
  33. 210 x=1:b=15:a=0:gosub360:gosub440
  34. 220 x=2:b=8:a=0:gosub360:gosub440
  35. 230 x=3:b=6:a=10:gosub360:gosub440
  36. 240 x=4:b=6:a=15:gosub360:gosub440
  37. 250 forc=1to20
  38. 260 b=12:a=12:forx=5to7:gosub360:n=x:x=6:gosub450:x=n:nextx,c
  39. 270 x=8:b=8:a=9:gosub360:gosub440:gosub440
  40. 280 goto210
  41. 290 :
  42. 300 :
  43. 310 :
  44. 320 rem *** this subroutine pokes in the        *** border/background colours.
  45. 330 rem *** it also pokes the screenfile        *** value (x) into register 781
  46. 340 rem *** then calls the m/c routine          *** to print it to the screen
  47. 350 :
  48. 360 pokebo,b:pokeba,a:poke781,x:sys53111:return
  49. 370 :
  50. 380 :
  51. 400 rem *** two delay loops, one for the        *** file display and the other
  52. 410 rem *** slows down the animation            *** sequence.
  53. 420 :
  54. 430 :
  55. 440 forde=1to4000:next:return:              rem *** file display ***
  56. 450 forde=1to10:next:return:                rem **** animation delay ***
  57.