home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
fish
/
languages
/
ezasm_421
/
colorchg.s
< prev
next >
Wrap
Text File
|
1990-12-30
|
1KB
|
89 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
LONG DispMem Count
WORD IntSave DmaSave Color
a6 = $dff000
IntSave = INTENAR(a6)
DmaSave = DMACONR(a6)
INTENA(a6) = $7fff
DMACON(a6) = $7fff
INTENA(a6) = $8020 ;SET VERTB
Count = 0
Color = $777 ;start half way thru
VBloop d1 = INTREQR(a6) w
d1:5 = 1 {
INTREQ(a6) = $0020 w ;CLEAR VERTB
Count ++
Count >= 6 {
Color += 2
Color &= $0fff
Count = 0
}
($dff180) = Color
}
($bfe001):6 = 1 VBloop
* restore DMACON & INTENA
Quit a6 = $dff000
INTENA(a6) = $7fff
DMACON(a6) = $7fff
d0 = IntSave w
bset.l #15,d0
INTENA(a6) = d0 w
d0 = DmaSave w
bset.l #15,d0
DMACON(a6) = d0 w
END