a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Resources:
 cia.resource
  AbleICR
  AddICRVector
  RemICRVector
  SetICR
Include
GuruMeditation
Docs » Autodocs » cia.resource » SetICR

NAME

	SetICR -- Cause, clear, and sample ICR interrupts.

SYNOPSIS

	oldMask = SetICR( Resource, mask )
D0 A6 D0
WORD SetICR( struct Library *, WORD );

FUNCTION

	This function provides a means of reseting, causing, and
sampling 8520 CIA interrupt control registers.

INPUTS

	mask            A bit mask indicating which interrupts to be
effected. If bit 7 is clear the mask
indicates interrupts to be reset. If bit
7 is set, the mask indicates interrupts to
be caused. Bit positions are identical to
those in 8520 ICR.

RESULT

	oldMask         The previous interrupt register status before
making the requested changes. To sample
current status without making changes,
call the function with a null parameter.
EXAMPLES
Get the interrupt mask:
mask = SetICR(0)
Clear serial port interrupt:
SetICR(0x08)

NOTES

	The CIA resources are special in that there is more than one
of them in the system. Because of this, the C language stubs
in amiga.lib for the CIA resources require an extra parameter
to specify which CIA resource to use. The synopsis for the
amiga.lib stubs is as follows:
oldMask = SetICR( Resource, mask )
D0 A6 D0
WORD SetICR( struct Library *, WORD );
***WARNING***
Never read the contents of the CIA interrupt control registers
directly. Reading the contents of one of the CIA interrupt
control registers clears the register. This can result in
interrupts being missed by critical operating system code, and
other applications.
EXCEPTIONS
Setting an interrupt bit for an enabled interrupt will cause
an immediate interrupt.

SEE ALSO

cia.resource/AbleICR()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Horizon

SPB
SNT
AFL
HZ

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se