home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 3 #1 / Commodore_Disk_User_Vol.3_1_1989_-.d64 / rasters2 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  86 lines

  1. 1000 ! fld colour bars....
  2. 1010 !
  3. 1020 !
  4. 1030 *=49152
  5. 1040 !
  6. 1050 jsr setirq ! set irq's
  7. 1060 rts        ! and return !
  8. 1070 !
  9. 1080 setirq !
  10. 1090 sei
  11. 1100 lda #$7f
  12. 1110 sta $dc0d
  13. 1120 lda $dc0d
  14. 1130 lda #$1b
  15. 1140 sta $d011
  16. 1150 lda #$32   ! <- set this number
  17. 1160 sta $d012  !    to the first line
  18. 1170 lda #<irq  !    you want your
  19. 1180 sta $314   !    colours to start.
  20. 1190 lda #>irq
  21. 1200 sta $315
  22. 1210 lda #1
  23. 1220 sta $d019
  24. 1230 sta $d01a
  25. 1240 lda $d016
  26. 1250 and #$f0
  27. 1260 sta $d016
  28. 1270 cli
  29. 1280 rts
  30. 1290 !
  31. 1300 max=$88       ! max.coloured lines
  32. 1310 coltab=$c600 !<colour table address
  33. 1320 !
  34. 1330 irq !
  35. 1340 ldx #$d   !<get in exactly the
  36. 1350 d1 dex    ! right place to start!
  37. 1360 bne d1
  38. 1370 !
  39. 1380 ldx #0
  40. 1390 i1 lda $d012    !<get raster line
  41. 1400 ldy coltab,x    !<get colour
  42. 1410 i2 cmp $d012    !<are we still on
  43. 1420 beq i2          ! same ras line?
  44. 1430 sty $d020       !<store colour in
  45. 1440 sty $d021       ! screen & border
  46. 1450 and #$07        !<do the fld
  47. 1460 ora #$10        ! trick !
  48. 1470 sta $d011       !<and store it.
  49. 1480 inx             !
  50. 1490 cpx #max        !<finished?
  51. 1500 bne i1          !
  52. 1510 !
  53. 1520 lda #1          !<reset irq
  54. 1530 sta $d019
  55. 1540 jmp $ea31       !<and return...
  56. 1550 !
  57. 1560 !
  58. 1570 !  fld single pixel colour-bars
  59. 1580 !  ----------------------------
  60. 1590 !
  61. 1600 ! -to use this program,you have to
  62. 1610 ! first assemble it,start it with
  63. 1620 ! sys 49152,and then either poke
  64. 1630 ! from basic,or use a monitor to
  65. 1640 ! put the colour values into the
  66. 1650 ! table from $c600-$c600+max.
  67. 1660 ! eg. 0 for black,1 for white etc
  68. 1670 !
  69. 1680 ! -(c) andy partridge and cdu!
  70. 1690 !
  71. 1700 *=$c600 ! example colours...
  72. 1710 !
  73. 1720 byt 6,0,6,2,0,6,2,4,0,6,2,4,$a,0
  74. 1730 byt 6,2,4,$a,7,0,6,2,4,$a,7,1
  75. 1740 byt 7,$a,4,2,6,0,7,$a,4,2,6,0
  76. 1750 byt $a,4,2,6,0,4,2,6,0,2,6,0,6,0
  77. 1760 !
  78. 1770 byt 0,9,5,5,5,13,0,5,13,13,13,1,0
  79. 1780 byt 13,1,1,1,13,0,1,13,13,13,5,0
  80. 1790 byt 13,5,5,5,9,0,0
  81. 1800 !
  82. 1810 byt 9,0,9,2,0,9,2,8,0,9,2,8,$a,0
  83. 1820 byt 9,2,8,$a,7,0,9,2,8,$a,7,1
  84. 1830 byt 7,$a,8,2,9,0,7,$a,8,2,9,0
  85. 1840 byt $a,8,2,9,0,8,2,9,0,2,9,0,9,0
  86.