home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
fish
/
languages
/
ezasm_421
/
scroll.s
< prev
next >
Wrap
Text File
|
1990-12-30
|
2KB
|
122 lines
* scroll example
* hit left mouse button to quit
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
CLEAR_CHIP equ $10002
* CSEG (Manx)
SECTION CODE
LONG DispMem Count
WORD IntSave DmaSave Color
DispMem = AllocMem( 16000 #CLEAR_CHIP )
beq Quit
a3 = $dff000
IntSave = INTENAR(a3) ;save DMA and interrupt states
DmaSave = DMACONR(a3)
* set up display regs
BPLCON0(a3) = $1200 ; (LORES) 1BPL COLOR
BPLCON1(a3) = 0 w
BPLCON2(a3) = 0 w
BPL1MOD(a3) = 0 w
BPL2MOD(a3) = 0 w
DIWSTRT(a3) = $2c81
DIWSTOP(a3) = $f4c1
DDFSTRT(a3) = $0038 w
DDFSTOP(a3) = $00d0 w
INTENA(a3) = $7fff
DMACON(a3) = $7fff
INTENA(a3) = $8020 ;SET VERTB
DMACON(a3) = $8300 ;SET DMAEN BPLEN
* Make bands for effect
d1 = 7
d2 = $ffffffff
a1 = DispMem
1$ d0 = 249
2$ (a1)+ = d2
dbf d0,2$
a1 += 1000 ;start of next band
dbf d1,1$
d2 = DispMem
d3 = d2
d3 += 7960
VBloop d1 = INTREQR(a3) w
d1:5 = 1 {
INTREQ(a3) = $0020 w
d2 > d3 {
d2 = DispMem
} else {
d2 += 50
}
BPL1PTH(a3) = d2
}
($bfe001):6 = 1 VBloop
Quit
DispMem != 0 {
FreeMem( DispMem 16000 )
}
* restore DMACON & INTENA
a3 = $dff000
INTENA(a3) = $7fff
DMACON(a3) = $7fff
d0 = IntSave w
bset.l #15,d0
INTENA(a3) = d0 w
d0 = DmaSave w
bset.l #15,d0
DMACON(a3) = d0 w
END