EasyManua.ls Logo

Atari ST series - Page 157

Atari ST series
420 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Line A Routines
turns a zero in register DO, Seed Fill keeps going, but if it
returns a nonzero value, Seed Fill aborts. Since Seed Fill will
JSR through the SEED ABORT vector at the end of each scan
line, you must place a pointer to subroutine in this vector, or
Seed Fill will bomb after the first line. At a minimum, this
subroutine should clear register DO and execute an RTS inî™…
struction.
Program 7-3 demonstrates all four of the line A filled
shape functions.
Program 7-3. FILLDRAW.S
* FILLDRAW.S — Demonstrates the use of the line A *
* filled shape functions. *
* *
************************************************************
*** variable table offsets
CUR_WORK = -464
CONTRL = $04
INTIN = $08
PTSIN = $0C
COLBITO = $18
COLBIT1 = $1A
C0LBIT2 = $1C
COLBIT3 = $1E
LNMASK = $22
WMODE = $24
XI = $26
Y1 = $28
X2 = $2A
V5 s
PATPTR = $2E
PATMSK = $32
MFILL = $34
CLIP = $36
XMINCL = $38
YMINCL = $3A
XMAXCL = $3C
YMAXCL = $3E
SEEDABORT = $76
*** Function Equates
Init = $a000
Aline = $a003
Hline = $a004
RectFill = $a005
PolyFill = $a006
SeedFill = $a00f
*** program starts here
.text
dc.w Init
*
move.1 a0,a5
*
*
move.w #0,COLBITO(a5)
*
move.w
#1,COLBIT1(a5)
*
move.w
#0,COLBIT2(a5)
*
move.w #0,COLBIT3(a5)
*
move.w
#0,WMODE(a5)
*
move.1
#love,PATPTR(a5)
*
move.w #15,PATMSK(a5)
*
move.w
#0,MFILL(a5)
*
move.w #l,CLIP(a5)
*
move.w #0,XMINCL(a5)
*
get base address of variable table
save base address...
because PolyFill destroys AO
color bits set to register
0010
or color 2 (green)
replace mode
set fill pattern
and length of fill pattern
multiplane fill off
clipping on
set clip rectangle..
149

Related product manuals