home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- cia.resource/AbleICR
- cia.resource/AddICRVector
- cia.resource/RemICRVector
- cia.resource/SetICR
-
-
- cia.resource/AbleICR cia.resource/AbleICR
-
- NAME
- AbleICR -- enable/disable ICR interrupts
-
- SYNOPSIS
- oldMask = AbleICR(mask), Resource
- D0 D0 A6
-
- FUNCTION
- This function provides a means of enabling and disabling
- 6526 CIA interrupt control registers.
- In addition it returns the previous enable mask.
-
- INPUTS
- mask - a bit mask indicating which interrupts to be
- modified. If bit 7 is clear the mask indicates
- interrupts to be disabled. If bit 7 is set, the
- mask indicates interrupts to be enabled.
- Bit positions are identical to those in 6526 ICR.
-
- RESULTS
- oldMask - the previous enable mask before the requested
- changes. To get the current mask without making
- changes, call the function with a null parameter.
-
- EXAMPLES
- Get the current mask:
- mask = AbleICR(0)
- Enable both timer interrupts:
- AbleICR(0x83)
- Disable serial port interrupt:
- AbleICR(0x08)
-
- EXCEPTIONS
- Enabling the mask for a pending interrupt will cause
- an immediate processor interrupt (that is if everything
- else is enabled). You may want to clear the pending
- interrupts with SetICRx prior to enabling them.
-
- SEE ALSO
- SetICR
-
-
- cia.resource/AddICRVector cia.resource/AddICRVector
-
- NAME
- AddICRVector -- attach an interrupt handler to a CIA bit
-
- SYNOPSYS
- interrupt = AddICRVector(iCRBit, interrupt), resource
- D0 D0 A1 A6
-
- FUNCTION
- Assign interrupt processing code to a particular interrupt
- bit of the CIA ICR. If the interrupt bit has already been
- assigned, this function will fail, and return a pointer
- to the owner interrupt. If it succeeds, a null is returned.
-
- This function will also enable the CIA interrupt for the given
- ICR bit.
-
- INPUTS
- iCRBit - bit number to set (0..4)
- interrupt - pointer to interrupt structure
-
- RESULT
- interrupt - zero if successful, otherwise returns a pointer
- to the current owner interrupt structure.
-
- SEE ALSO
- RemICRVector
-
-
- cia.resource/RemICRVector cia.resource/RemICRVector
-
- NAME
- RemICRVector -- detach an interrupt handler from a CIA bit
-
- SYNOPSYS
- RemICRVector(iCRBit, interrupt), resource
- D0 A1 A6
-
- FUNCTION
- Disconnect interrupt processing code for a particular interrupt
- bit of the CIA ICR.
-
- This function will also disable the CIA interrupt for the given
- ICR bit.
-
- INPUTS
- iCRBit - bit number to set (0..4)
- interrupt - pointer to interrupt structure
-
- RESULT
-
- SEE ALSO
- AddICRVector
-
-
- cia.resource/SetICR cia.resource/SetICR
-
- NAME
- SetICR -- cause, clear, and sample ICR interrupts
-
- SYNOPSIS
- oldMask = SetICR(mask), Resource
- D0 D0 A6
-
- FUNCTION
- This function provides a means of reseting, causing, and
- sampling 6526 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 6526 ICR.
-
- RESULTS
- 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)
-
- EXCEPTIONS
- Setting an interrupt bit for an enabled interrupt will cause
- an immediate interrupt.
-
- SEE ALSO
- AbleICR
-