home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d421
/
ezasm
/
colorchg.asm
< prev
next >
Wrap
Assembly Source File
|
1990-12-29
|
1KB
|
100 lines
* change color0 every 7th VBlank
* ( takes about 2 mins. to see all the colors )
* hit left mouse button to quit
* no display planes needed!
INTREQR equ $01e
INTREQ equ $09c
INTENAR equ $01c
INTENA equ $09a
DMACONR equ $002
DMACON equ $096
BPLCON0 equ $100
BPLCON1 equ $102
BPLCON2 equ $104
BPL1MOD equ $108
BPL2MOD equ $10a
DDFSTRT equ $092
DDFSTOP equ $094
DIWSTRT equ $08e
DIWSTOP equ $090
BPL1PTH equ $0e0
BPL2PTH equ $0e4
* CSEG (Manx)
SECTION CODE
DispMem equ -4
Count equ -8
IntSave equ -12
DmaSave equ -14
Color equ -16
link a5,#-18
lea 14675968,a6
move.w INTENAR(a6),IntSave(a5)
move.w DMACONR(a6),DmaSave(a5)
move.w #$7fff,INTENA(a6)
move.w #$7fff,DMACON(a6)
move.w #$8020,INTENA(a6) ;SET VERTB
clr.l Count(a5)
move.w #$777,Color(a5) ;start half way thru
VBloop move.w INTREQR(a6),d1
btst.l #5,d1
beq .laaa
move.w #$0020,INTREQ(a6) ;CLEAR VERTB
addq.l #1,Count(a5)
cmpi.l #6,Count(a5)
bcs .laab
addq.w #2,Color(a5)
andi.w #$0fff,Color(a5)
clr.l Count(a5)
.laab
move.w Color(a5),$dff180
.laaa
btst.b #6,$bfe001
bne VBloop
* restore DMACON & INTENA
Quit lea 14675968,a6
move.w #$7fff,INTENA(a6)
move.w #$7fff,DMACON(a6)
move.w IntSave(a5),d0
bset.l #15,d0
move.w d0,INTENA(a6)
move.w DmaSave(a5),d0
bset.l #15,d0
move.w d0,DMACON(a6)
unlk a5
moveq #0,d0
rts
END