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 >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
86 lines
1000 ! fld colour bars....
1010 !
1020 !
1030 *=49152
1040 !
1050 jsr setirq ! set irq's
1060 rts ! and return !
1070 !
1080 setirq !
1090 sei
1100 lda #$7f
1110 sta $dc0d
1120 lda $dc0d
1130 lda #$1b
1140 sta $d011
1150 lda #$32 ! <- set this number
1160 sta $d012 ! to the first line
1170 lda #<irq ! you want your
1180 sta $314 ! colours to start.
1190 lda #>irq
1200 sta $315
1210 lda #1
1220 sta $d019
1230 sta $d01a
1240 lda $d016
1250 and #$f0
1260 sta $d016
1270 cli
1280 rts
1290 !
1300 max=$88 ! max.coloured lines
1310 coltab=$c600 !<colour table address
1320 !
1330 irq !
1340 ldx #$d !<get in exactly the
1350 d1 dex ! right place to start!
1360 bne d1
1370 !
1380 ldx #0
1390 i1 lda $d012 !<get raster line
1400 ldy coltab,x !<get colour
1410 i2 cmp $d012 !<are we still on
1420 beq i2 ! same ras line?
1430 sty $d020 !<store colour in
1440 sty $d021 ! screen & border
1450 and #$07 !<do the fld
1460 ora #$10 ! trick !
1470 sta $d011 !<and store it.
1480 inx !
1490 cpx #max !<finished?
1500 bne i1 !
1510 !
1520 lda #1 !<reset irq
1530 sta $d019
1540 jmp $ea31 !<and return...
1550 !
1560 !
1570 ! fld single pixel colour-bars
1580 ! ----------------------------
1590 !
1600 ! -to use this program,you have to
1610 ! first assemble it,start it with
1620 ! sys 49152,and then either poke
1630 ! from basic,or use a monitor to
1640 ! put the colour values into the
1650 ! table from $c600-$c600+max.
1660 ! eg. 0 for black,1 for white etc
1670 !
1680 ! -(c) andy partridge and cdu!
1690 !
1700 *=$c600 ! example colours...
1710 !
1720 byt 6,0,6,2,0,6,2,4,0,6,2,4,$a,0
1730 byt 6,2,4,$a,7,0,6,2,4,$a,7,1
1740 byt 7,$a,4,2,6,0,7,$a,4,2,6,0
1750 byt $a,4,2,6,0,4,2,6,0,2,6,0,6,0
1760 !
1770 byt 0,9,5,5,5,13,0,5,13,13,13,1,0
1780 byt 13,1,1,1,13,0,1,13,13,13,5,0
1790 byt 13,5,5,5,9,0,0
1800 !
1810 byt 9,0,9,2,0,9,2,8,0,9,2,8,$a,0
1820 byt 9,2,8,$a,7,0,9,2,8,$a,7,1
1830 byt 7,$a,8,2,9,0,7,$a,8,2,9,0
1840 byt $a,8,2,9,0,8,2,9,0,2,9,0,9,0