Download Print this page

Atari 400 Technical Reference Manual page 95

Home computer system
Hide thumbs Also See for 400:

Advertisement

POKEY Interrupt Mask
ANTIC (display-list and vertical-blank) and PIA (interrupt and
proceed lines) interrupts can be masked directly (see the
Hardware Manual). However, eight bits OT a single byte IRGEN
[D20EJ mask the POKEY interrupts ([BREAK] key, data key,
serial input ready, serial output ready, serial output done
and
timer~
1,2 and 4).
IRGEN is a write-only register. Thus,
we
must maintain a
current value oT that register in RAM in order to update
individual mask bits selectively, while not changing other bits.
The name OT the variable used is POKMSK [0010J, and it is used
as shown in the examples below:
EXAMPLE OF INTERRUPT ENABLE
SEI
TO AVOID CONFLICT WITH IRG
LDA
POKMSK
...
PROCESSOR WHICH ALTERS VAR.
ORA
#$xx
ENABLE BIT (S >.
STA
POKMSK
STA
IRGEN
TO HARDWARE REG TOO.
CLI
EXAMPLE OF INTERRUPT DISABLE
SEI
TO AVOID CONFLICT WITH IRG
LDA
POKMSK
...
PROCESSOR WHICH ALTERS VAR.
AND
#$FF-xx
DISABLE BIT(S)'
STA
POKMSK
STA
IRGEN
TO HARDWARE REGISTER TOO.
CLI
Figure 6-3
POKEY Interrupt Mask Example
Note that the OS IRG service routine uses and alters POKMSK, so
alterations to the variable must be done with interrupts
inhibited.
IT done at the interrupt level there is no problem, as
the I bit is already set; if done at
a
background level then the
SEI and CLI instructions should be used as, shown in the examples.
Setting Interrupt and Timer Vectors
Because vertical-blank interrupts are generally kept enabled so that
the Trame counter RTCLOK is maintained accurately, there is a
problem with setting the VBLANK vectors (VVBLKI and VVBLKD) or
the timer values (CDTMVI through CDTMV5) directly. A VB LANK
interrupt could occur when only one byte oT the two-byte value had
been updated, leading to undesired consequences. For this reason,
OPERATING SYSTEM C016555 -- Section 6
110

Hide quick links:

Advertisement

loading

This manual is also suitable for:

800