Atari ST series Technical Reference Manual page 163

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

for the foreground color with a transparent background color
(transparent mode), set OP__TAB to $7744. Note that FG__
COL and BG__COL may be changed by the BitBlt call.
The BitBlt function also allows the use of fill patterns,
which are ANDed with the source prior to the logic opera­
tion. Patterns are snapped to an imaginary grid that starts at
the upper left corner of the destination image block. They are
16 bits wide and repeat every 16 pixels, horizontally. Their
height must be an even power of 2, (1 line, 2 lines, 4 lines,
16 lines, and so on), and they repeat at a frequency equal to
their height. The variable P__ADDR points to the beginning
of the pattern image data block. If it is set to 0, no pattern is
used. P__NXLN is the distance between consecutive words
in the pattern (in bytes) and should be a power of 2. P__
NXPL is the distance (in bytes) between pattern bit planes. If
a single-plane pattern is used for a multiplane destination, it
should be set to 0, so the same pattern will be used for all bit
planes. Finally, P__MASK is used to specify the length of the
pattern. It is used in conjunction with the value in P_
NXLN, which must be an even power of 2. P__
MASK = (pattern length in words - 1) < < n, where P__
NXLN = Tn. Since P__NXLN will be 2 if the pattern data is
consecutive, n will equal 1, and P__MASK will just be the
pattern length in words - 1.
Program 7-4 shows how to blit a simple image on to the
screen:
Program 7-4. BITBLTS.S
************************************************************
*
*
BITBLT.S —
Demonstrates the use of the line A
*
BitBlt ($A007) function.
*
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*** Function Equates
Init
= $a000
BitBlit
= $a007
*** Program starts here
• text
*** find screen address
raove.w
#2,-(sp)
trap
#14
addq
#2,sp
d o ,
move.l
screen
Line A Routines
* use XBIOS call #2
* to get screen address
* clean stack
* put screen address in blit block
*
*
*
*
*
155

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents