[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   NAME
        AbleICR -- Enable/disable ICR interrupts.

   SYNOPSIS
        oldMask = AbleICR( Resource, mask )
        D0                 A6        D0

        WORD AbleICR( struct library *, word );

   FUNCTION
        This function provides a means of enabling and disabling 8520
        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 8520 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
        seticr() prior to enabling them.

   NOTE
        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 = AbleICR( Resource, mask )
        D0                 A6        D0

        WORD AbleICR( struct library *, word );

   SEE ALSO
        cia.resource/seticr()