Atari ST series Technical Reference Manual page 150

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

since it changes whatever color is there. Secondly, the XOR
operation cancels itself the second time it's used. When a
color is complemented, it changes to its opposite color, but
when it's complemented again, it changes back to the origi­
nal.
To prevent this property from erasing a common end
point of two lines that are both drawn in XOR mode, there is
a variable called LSTLIN. This is a flag that lets you choose
whether the last pixel of the line will be drawn. If LSTLIN is
zero, the last pixel of the line will be drawn, but if it is non­
zero, it will not be drawn. If you are drawing a series of con­
nected lines in XOR mode, where the last point of one line
segment is used for the first point of the next line segment,
you'll want to place a 1 in LSTLIN.
Program 7-2 shows how to draw a series of dashed, con­
nected lines using function $A003. Try changing the line pat­
tern and the color planes (if you have a color monitor) to see
what the effect is.
Program 7-2. LINE.S
*
LINE.S —
Demonstrates the use of the line A
*
Arbitrary line ($A005) function.
*
dashed, connected lines.
*** Variable table offsets
COLBITO = $18
COLBIT1 = $1A
COLBIT2 = $1C
COLBIT3 = $1E
LSTLIN
= $20
LNMASK
= $22
WMODE
= $24
XI
= $26
Y1
= $28
X2
= $2A
Y2
= $2C
*** Function Equates
Init
= $a000
Aline
= $a003
*** Program starts here
.text
dc.w
Init
move.w
#1,COLBITO(aO)
move.w
#0,COLBITl(aO)
move.w
#0.COLBIT2(aO)
142
CHAPTER 7
Draws 6
* get base address of variable
* 1 is lsb
* 0 in all other bits
* = 0001
*
*
*
*
*
*
- -

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents