Atari ST series Technical Reference Manual page 157

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

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 —
*
*
************************************************************
*** 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
mo v e .1
a0,a5
m o v e .w
#0,COLBITO(a5)
move.w
#1,COLBIT1(a5)
move.w
#0,COLBIT2(a5)
move.w
#0,COLBIT3(a5)
move.w
#0,WMODE(a5)
m o v e .1
#love,PATPTR(a5)
move.w
#15,PATMSK(a5)
m o v e .w
#0,MFILL(a5)
m o v e .w
#l,CLIP(a5)
m o v e .w
#0,XMINCL(a5)
Line A Routines
Demonstrates the use of the line A
filled shape functions.
*
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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents