Atari ST series Technical Reference Manual page 66

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

supervisor mode. The XBIOS function that runs a subroutine
in supervisor mode is called Supexec(), and its syntax looks
like this:
long sub;
Supexec(sub);
where sub is the address of the subroutine to execute in su­
pervisor mode. An example of this function can be seen in
the XGIACCES.C program in Chapter 4, in which it is used
to change one of the low memory variables.
Another handy XBIOS function returns a 24-bit pseudor­
andom number. This function is called Random(), and its
syntax is
long mdnum;
rndnum = Random ()
where rndnum is a 24-bit pseudorandom number (bits 24-31
are 0). The algorithm used to generate the number is:
SEED = (SEED * 3141592621) + 1
The value returned is the new seed value, shifted eight
bits to the right. Since the initial seed value is taken from the
screen's vertical blank frame counter, the sequence should be
different each time the machine is turned on.
The lowest-level drawing routines are known as the line
A routines. These routines are discussed fully in Chapter 7.
In the first version of ST computers, these line A routines
used software blit routines to perform the bit block transfers
necessary to move images around on the screen. With the
Mega ST series, however, Atari introduced a hardware blitter
chip to speed up screen drawing. The line A routines in the
Mega machines use the blitter hardware rather than the soft­
ware blit routines. To maintain software compatibility across
the entire ST lines, programmers are urged to use the line A
routines for low-level drawing rather than writing directly to
the screen, so their programs can take advantage of the blit­
ter hardware if present. In some cases, however, a program
may need to know if the blitter chip is available, and even to
specify whether blit operations are to be performed by soft­
ware or hardware means. The XBIOS routine used to get and
set the blitter configuration has the macro name of Blit-
m ode(). Since many versions of the OSBIND.H file do not
have this macro defined, you may need to add the line:
#define Blitmode(a)
58
CHAPTER 3
xbios(64,a)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents