home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Text_Autodocs / cia.doc < prev    next >
Encoding:
Text File  |  1992-09-12  |  3.9 KB  |  147 lines

  1. TABLE OF CONTENTS
  2.  
  3. cia.resource/AbleICR
  4. cia.resource/AddICRVector
  5. cia.resource/RemICRVector
  6. cia.resource/SetICR
  7.  
  8.  
  9. cia.resource/AbleICR                                       cia.resource/AbleICR
  10.  
  11.    NAME
  12.        AbleICR -- enable/disable ICR interrupts
  13.  
  14.    SYNOPSIS
  15.        oldMask = AbleICR(mask),  Resource
  16.        D0                D0      A6
  17.  
  18.    FUNCTION
  19.        This function provides a means of enabling and disabling
  20.        6526 CIA interrupt control registers.
  21.        In addition it returns the previous enable mask.
  22.  
  23.    INPUTS
  24.        mask - a bit mask indicating which interrupts to be
  25.            modified.  If bit 7 is clear the mask indicates
  26.            interrupts to be disabled.  If bit 7 is set, the
  27.            mask indicates interrupts to be enabled.
  28.            Bit positions are identical to those in 6526 ICR.
  29.  
  30.    RESULTS
  31.        oldMask - the previous enable mask before the requested
  32.            changes.  To get the current mask without making
  33.            changes, call the function with a null parameter.
  34.  
  35.    EXAMPLES
  36.        Get the current mask:
  37.            mask = AbleICR(0)
  38.        Enable both timer interrupts:
  39.            AbleICR(0x83)
  40.        Disable serial port interrupt:
  41.            AbleICR(0x08)
  42.  
  43.    EXCEPTIONS
  44.        Enabling the mask for a pending interrupt will cause
  45.        an immediate processor interrupt (that is if everything
  46.        else is enabled).  You may want to clear the pending
  47.        interrupts with SetICRx prior to enabling them.
  48.  
  49.    SEE ALSO
  50.        SetICR
  51.  
  52.  
  53. cia.resource/AddICRVector                             cia.resource/AddICRVector
  54.  
  55.    NAME
  56.     AddICRVector -- attach an interrupt handler to a CIA bit
  57.  
  58.    SYNOPSYS
  59.     interrupt = AddICRVector(iCRBit, interrupt), resource
  60.     D0                     D0      A1          A6
  61.  
  62.    FUNCTION
  63.     Assign interrupt processing code to a particular interrupt
  64.     bit of the CIA ICR.  If the interrupt bit has already been
  65.     assigned, this function will fail, and return a pointer
  66.     to the owner interrupt.  If it succeeds, a null is returned.
  67.  
  68.     This function will also enable the CIA interrupt for the given
  69.     ICR bit.
  70.  
  71.    INPUTS
  72.     iCRBit - bit number to set (0..4)
  73.     interrupt - pointer to interrupt structure
  74.  
  75.    RESULT
  76.     interrupt - zero if successful, otherwise returns a pointer
  77.         to the current owner interrupt structure.
  78.  
  79.    SEE ALSO
  80.     RemICRVector
  81.  
  82.  
  83. cia.resource/RemICRVector                             cia.resource/RemICRVector
  84.  
  85.    NAME
  86.     RemICRVector -- detach an interrupt handler from a CIA bit
  87.  
  88.    SYNOPSYS
  89.     RemICRVector(iCRBit, interrupt), resource
  90.                  D0      A1          A6
  91.  
  92.    FUNCTION
  93.     Disconnect interrupt processing code for a particular interrupt
  94.     bit of the CIA ICR.
  95.  
  96.     This function will also disable the CIA interrupt for the given
  97.     ICR bit.
  98.  
  99.    INPUTS
  100.     iCRBit - bit number to set (0..4)
  101.     interrupt - pointer to interrupt structure
  102.  
  103.    RESULT
  104.  
  105.    SEE ALSO
  106.     AddICRVector
  107.  
  108.  
  109. cia.resource/SetICR                                         cia.resource/SetICR
  110.  
  111.    NAME
  112.        SetICR -- cause, clear, and sample ICR interrupts
  113.  
  114.    SYNOPSIS
  115.        oldMask = SetICR(mask), Resource
  116.        D0               D0     A6
  117.  
  118.    FUNCTION
  119.        This function provides a means of reseting, causing, and
  120.        sampling 6526 CIA interrupt control registers.
  121.  
  122.    INPUTS
  123.        mask - a bit mask indicating which interrupts to be
  124.            effected.  If bit 7 is clear the mask indicates
  125.            interrupts to be reset.  If bit 7 is set, the
  126.            mask indicates interrupts to be caused.
  127.            Bit positions are identical to those in 6526 ICR.
  128.  
  129.    RESULTS
  130.        oldMask - the previous interrupt register status before
  131.            making the requested changes.  To sample current
  132.            status without making changes,  call the function
  133.            with a null parameter.
  134.  
  135.    EXAMPLES
  136.        Get the interrupt mask:
  137.            mask = SetICR(0)
  138.        Clear serial port interrupt:
  139.            SetICR(0x08)
  140.  
  141.    EXCEPTIONS
  142.        Setting an interrupt bit for an enabled interrupt will cause
  143.     an immediate interrupt.
  144.  
  145.    SEE ALSO
  146.        AbleICR
  147.