home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 4 #2
/
Commodore_Disk_User_Vol.4_2_1990_-.d64
/
prob1b
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
101 lines
1000 *=$c000
1010 sei
1020 jsr init
1030 lda #$7f
1040 sta $dc0d
1050 lda $dc0d
1060 lda #$1b
1070 sta $d011
1080 lda #$32
1090 sta $d012
1100 lda #<irq
1110 sta $0314
1120 lda #>irq
1130 sta $0315
1140 lda #$01
1150 sta $d019
1160 sta $d01a
1170 cli
1180 loop jmp loop
1190 ;
1200 irq ldx #$0c
1210 l1 dex
1220 bne l1
1230 l2 ldy deltab,x
1240 lda coltab,x
1250 l3 dey
1260 bne l3
1270 sta $d020
1280 sta $d021
1290 inx
1300 cpx #$c7
1310 bne l2
1320 jsr colours
1330 ldx ctr
1340 ldy sinus,x
1350 ldx #$00
1360 l4 lda barcol,x
1370 sta coltab,y
1380 inx
1390 iny
1400 cpx #$09
1410 bne l4
1420 inc ctr
1430 lda #$01
1440 sta $d019
1450 jmp $ea31
1460 ctr byt $00
1470 init jsr $e544
1480 lda #$00
1490 sta $d015
1500 ldx #$00
1510 l5 ldy #$00
1520 l6 lda dtab,y
1530 sta deltab,x
1540 inx
1550 iny
1560 cpy #$08
1570 bne l6
1580 cpx #$c7
1590 bcc l5
1600 colours ldx #$00
1610 l7 lda storedcols,x
1620 sta coltab,x
1630 inx
1640 cpx #$c7
1650 bne l7
1660 rts
1670 *=$c100
1680 deltab ;
1690 *=$c200
1700 sinus byt $5f,$61,$63,$65,$68,$6a,$6c,$6f,$71,$73,$76,$78,$7a,$7c,$7f,$81
1710 byt $83,$85,$87,$89,$8b,$8d,$8f,$91,$93,$95,$97,$99,$9b,$9d,$9e,$a0
1720 byt $a2,$a3,$a5,$a6,$a8,$a9,$ab,$ac,$ad,$af,$b0,$b1,$b2,$b3,$b4,$b5
1730 byt $b6,$b7,$b8,$b9,$b9,$ba,$bb,$bb,$bc,$bc,$bc,$bd,$bd,$bd,$bd,$bd
1740 byt $bd,$bd,$bd,$bd,$bd,$bd,$bc,$bc,$bc,$bb,$bb,$ba,$b9,$b9,$b8,$b7
1750 byt $b6,$b5,$b4,$b3,$b2,$b1,$b0,$af,$ad,$ac,$ab,$a9,$a8,$a6,$a5,$a3
1760 byt $a2,$a0,$9e,$9d,$9b,$99,$97,$95,$93,$91,$8f,$8d,$8b,$89,$87,$85
1770 byt $83,$81,$7f,$7c,$7a,$78,$76,$73,$71,$6f,$6c,$6a,$68,$65,$63,$61
1780 byt $5f,$5c,$5a,$58,$55,$53,$51,$4e,$4c,$4a,$47,$45,$43,$41,$3e,$3c
1790 byt $3a,$38,$36,$34,$32,$30,$2e,$2c,$2a,$28,$26,$24,$22,$20,$1f,$1d
1800 byt $1b,$1a,$18,$17,$15,$14,$12,$11,$10,$0e,$0d,$0c,$0b,$0a,$09,$08
1810 byt $07,$06,$05,$04,$04,$03,$02,$02,$01,$01,$01,$00,$00,$00,$00,$00
1820 byt $00,$00,$00,$00,$00,$00,$01,$01,$01,$02,$02,$03,$04,$04,$05,$06
1830 byt $07,$08,$09,$0a,$0b,$0c,$0d,$0e,$10,$11,$12,$14,$15,$17,$18,$1a
1840 byt $1b,$1d,$1f,$20,$22,$24,$26,$28,$2a,$2c,$2e,$30,$32,$34,$36,$38
1850 byt $3a,$3c,$3e,$41,$43,$45,$47,$4a,$4c,$4e,$51,$53,$55,$58,$5a,$5c
1860 *=$c300
1870 coltab ;
1880 *=$c400
1890 storedcols ;
1900 byt 0,9,2,10,2,9,0,6,6,14,14,3,3,1,1,15,12,11,0,11,12,15,1,7,7,8,8,2,2
1910 byt 0,11,0,0,11,12,15,1,1,13,5,9,0,3,3,0,9,5,5,13,13,13,1,15,12,15,12,15
1920 byt 1,13,13,13,5,5,9,0,5,13,5,0,1,1,3,14,6,3,6,3,6,14,3,1,1,15,7,15,7,15,7
1930 byt 15,7,15,2,0,9,5,0,6,14,3,0,11,12,15,1,15,12,11,0,3,14,6,0,5,9,0,2,0,0
1940 byt 9,8,9,8,7,1,7,8,9,8,9,0,11,11,12,12,15,15,1,0,6,14,3,1,3,14,6,0,1,15
1950 byt 15,12,12,11,11,0,9,2,9,2,10,10,2,9,2,9,5,0,13,13,0,7,7,15,7,15,7,7
1960 byt 0,13,13,0,5,0,6,3,6,3,7,6,3,7,1,7,3,6,7,3,6,3,0
1970 *=$c500
1980 barcol byt 0,1,1,5,13,5,1,1,0
1990 dtab byt 8,8,8,8,8,8,8,1