Atari ST series Technical Reference Manual page 177

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

£ 3 $5E
*
SKEWMASK
*
s $60
WEIGHT
*
= $62
ROFF
*
= $64
LOFF
*
$66
=
SCALE
$68
*
=
CHUP
- $
6
*
TEXTFG
A
6
*
s $
C
SCRTCHP
*
= $70
SCRPT2
*
TEXTBG
= $72
*** Font Header offsets
= 36
first_ade
= 54
left offset
o 56
righ€_offset
S 3 58
thick_width
S 62
lite_mask
O 64
skew~mask
= 72
off_table
= 76
data_table
s s 80
form_width
form_height
= 82
Equates
000
Init
= $a
Textblt
= $a008
*** Program starts here
.text
Init
dc.w
.1
m o v e
aO, a5
*** Initialize text blit data
move.w
#0,WMODE(a5)
move.w
#0,CLIP(a5)
move.w
#l,TEXTFG(a5)
move.w
# 0,T E X T B G (a 5)
move.w
#48,DESTX(a5)
move.w
#80,DESTY(a5)
move.w
#0,SCALE(a5)
move.w
#4,STYLE(a5)
move.w
#0,MONO(a5)
move.l
#buffer,SCRTCHP(a5)
move.w
#6,SCRPT2(a5)
*** Initialize font table info
move.l
4(al),a4
move.l
data_table(a4),FBASE(a5)
move.w
form_width(a4),FWIDTH(a5) * get font width total
move.w
form_height(a4),DELY(a5)
move.w
left offset(a4) ,LOFF(a5)
move.w
right_offset(a4),ROFF(a5) * width added to right by effects
move.w
skew mask(a4),SKEWMASK(a5) * get skewing mask
move.w
thiclc_width(a4),WEIGHT(a5) * width added by bold effect
move.w
lite_mask(a4),LITEMASK(a5) * get lightening mask
*** Print the string
1
lea.
string,a
1
m o v e .
off table(a4),a3
clr.l
do
,t_one:
6
m o v e .b
(a
)+,d
beq
exit
sub.w
first ade(a4),d0
0
lsl .w
#l,d
move.w
0(a3,d0),SOURCEX(a5)
m o v e .w
2 (a3,d0),dO
SOURCEX(a5),d0
sub.w
Line A Routines
Mask used to italicize (usually $5555)
Width by which to thicken text for boldface
Offset above baseline for italicizing
Offset below baseline for italicizing
Scaling flag (0=no scaling)
Character rotation (0=no rotation)
Text foreground color
Ptr to 1st of 2 contiguous special effects buffers
Offset to beginning of second buffer
Text background color
*
ASCII value of first displayable character
*
Number of pixels added to left by effects
*
Number of pixels added to right by effects
*
Number of pixels added to width by bold effect
*
Mask used for lightening effect
*
Mask used for italicizing
*
pointer to text data offset table
*
pointer to font data table
*
total width of font
*
total height of font
get base address of variable table
save base address...
because Textblt destroys aO
use VDI mode 0 (replace)
Clipping off
Foreground color = red
Background color = white
Print starts at 48 horizontal
1
and 80 vertical
No font scaling used
* use skew (italics) special effect
* not monospaced,
* ptr to effects scratch bufferl
* offset to scratch buffer
* get font header base address
*
6
get string address
*
and address of x offset table
*
initialize do
*
0
get character from string
*
if at end, exit
*
get offset of this letter in font
*
multiply by
*
get x location of this character
*
x location of next character.,
*
minus x location of this character
'cuz skewed
* get font data table address
* get font height total
* width added to left by effects
2
for word offset
2
169

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents