Line A Routines
SKEWMASK
£3
$5E
*
WEIGHT
s
$60
*
ROFF
=
$62
*
LOFF
=
$64
*
SCALE
=
$66
*
CHUP
=
$68
*
TEXTFG
-
$6A
*
SCRTCHP
s
$6C
*
SCRPT2
=
$70
*
TEXTBG = $72
*
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
*** Font Header offsets
first_ade
left offset
righ€_offset
thick_width
lite_mask
skew~mask
off_table
data_table
form_width
form_height
Init
Textblt
=
36
*
=
54
*
o
56
*
S3
58
*
S
62
*
O
64
*
=
72
*
=
76
*
ss
80
*
=
82
*
Equates
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
= $a000
= $a008
*** Program starts here
.text
dc.w
move.1
Init
aO, a5
*** Initialize text blit data
move.w #0,WMODE(a5)
move.w #0,CLIP(a5)
move.w #l,TEXTFG(a5)
move.w # 0,TEXTBG(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
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, 'cuz skewed
* ptr to effects scratch bufferl
* offset to scratch buffer2
move.l 4(al),a4 * get font header base address
move.l data_table(a4),FBASE(a5) * get font data table address
move.w form_width(a4),FWIDTH(a5) * get font width total
move.w form_height(a4),DELY(a5) * get font height total
move.w left offset(a4),LOFF(a5) * width added to left by effects
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
lea. 1 string,a6
*
move. 1
off table(a4),a3
*
clr.l do
*
,t_one:
move.b (a6 )+,d0
*
beq
exit
*
sub.w first ade(a4),d0
*
lsl .w #l,d0
*
move.w 0(a3,d0),SOURCEX(a5)
*
move.w
2 (a3,d0),dO
*
sub.w
SOURCEX(a5),d0
*
get string address
and address of x offset table
initialize do
get character from string
if at end, exit
get offset of this letter in font
multiply by 2 for word offset
get x location of this character
x location of next character.,
minus x location of this character
169