EasyManua.ls Logo

Atari ST series - Page 64

Atari ST series
420 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER 3
able any MFP interrupt with one of the following XBIOS calls:
int intnum;
Jdisint(intnum);
int intnum;
J enabint(intnum);
where intnum is the number of the interrupt (0-15), to enable
or disable. Jdisint() is used to disable the interrupt, and Jen-
abint() is used to enable it.
The MFP includes four timers. Associated with each of
these timers is
A control register
A data register
A counter
An interrupt vector
A hardware output line
In addition, Timers A and B are connected to a hardware
input line. All four timers may operate in what is known as
delay mode. In this mode, the counter is decremented at
each clock pulse until it reaches 0. At that point, an interrupt
occurs, the hardware output line is pulsed, and the counter
is loaded with the contents of the data register. Then the
countdown process starts again.
Timers A and B can also operate in event count mode.
In this mode, the counter is decremented not by the clock,
but by pulses on the timer input line which come from an
external hardware device. Timers A and B can also operate in
pulse length mode. In this mode, the counter is decremented
by clock pulses, but it can be turned on and off by pulses
from the hardware input line.
TOS itself uses three of the four timers. Timer B is used
for the Horizontal Blank counter. Timer C is used for the 200
Hz system clock that updates the GEM AES timer as well as
executing the commands in the Dosound() queue. Timer D
supplies the timing signal for the MFP's USART, which con
trols the communications speed (Baud rate) for the serial
port. Thus, only Timer A is left free for use by applications.
The XBIOS provides a function that lets you set the timer
registers and interrupt vector. This function is called Xbti-
mer(), and is called like this:
int timemum, control, data;
long vector;
Xbtimer(timemum, control, data, vector);

Related product manuals