home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 3 #1
/
Commodore_Disk_User_Vol.3_1_1989_-.d64
/
rasters1
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
96 lines
1000 !
1010 *=49152
1020 !
1030 jsr init ! set up delay table
1040 jsr setirq ! set irq's
1050 rts ! and return !
1060 !
1070 setirq !
1080 sei
1090 lda #$7f
1100 sta $dc0d
1110 lda $dc0d
1120 lda #$1b
1130 sta $d011
1140 lda #$32 ! <- set this number
1150 sta $d012 ! to the first line
1160 lda #<irq ! you want your
1170 sta $314 ! colours to start.
1180 lda #>irq
1190 sta $315
1200 lda #1
1210 sta $d019
1220 sta $d01a
1230 cli
1240 rts
1250 !
1260 max=$88 ! max.coloured lines
1270 deltab=$c300 !<delay table address
1280 coltab=$c600 !<colour table address
1290 !
1300 irq !
1310 ldx #$d !<get in exactly the
1320 i1 dex ! right place to start!
1330 bne i1
1340 !
1350 i2 ldy deltab,x !<get delay
1360 lda coltab,x !<get colour
1370 i3 dey !<to the delay to
1380 bne i3 ! wait for line.
1390 sta $d020 !<and store colour
1400 sta $d021 ! in screen+border
1410 inx
1420 cpx #max !<finished?
1430 bne i2 ! if not,continue
1440 !
1450 lda #1 !<reset irq
1460 sta $d019
1470 jmp $ea31 !<and return...
1480 !
1490 init ! set up delay table.
1500 ldx #0
1510 in0 ldy #0
1520 in1 lda dtab,y
1530 sta deltab,x
1540 inx
1550 iny
1560 cpy #8
1570 bcc in1
1580 cpx #max
1590 bcc in0
1600 rts
1610 !
1620 dtab byt 8,8,8,8,8,8,8,1
1630 ! the dreaded 8th line ^ argh!
1640 !
1650 ! single pixel colour-bars
1660 ! ------------------------
1670 !
1680 ! -to use this program,you have to
1690 ! first assemble it,start it with
1700 ! sys 49152,and then either poke
1710 ! from basic,or use a monitor to
1720 ! put the colour values into the
1730 ! table from $c600-$c600+max.
1740 ! eg. 0 for black,1 for white etc
1750 ! -watch the two tables don't
1760 ! overwrite each other!!
1770 !
1780 ! -thanks to dave weaver!
1790 !
1800 *=$c600 ! example colours...
1810 !
1820 byt 6,0,6,2,0,6,2,4,0,6,2,4,$a,0
1830 byt 6,2,4,$a,7,0,6,2,4,$a,7,1
1840 byt 7,$a,4,2,6,0,7,$a,4,2,6,0
1850 byt $a,4,2,6,0,4,2,6,0,2,6,0,6,0
1860 !
1870 byt 0,6,14,14,14,3,0,14,3,3,3,1,0
1880 byt 3,1,1,1,3,0,1,3,3,3,14,0
1890 byt 3,14,14,14,6,0,0
1900 !
1910 byt 9,0,9,2,0,9,2,8,0,9,2,8,$a,0
1920 byt 9,2,8,$a,7,0,9,2,8,$a,7,1
1930 byt 7,$a,8,2,9,0,7,$a,8,2,9,0
1940 byt $a,8,2,9,0,8,2,9,0,2,9,0,9,0