di2489l1.txt ;************************************************************************************************** ; Listing 1 - STANDARD INTERRUPT-HANDLING SOFTWARE ; ; "Software avoids interrupt overhead," EDN, March 2, 2000, pg 116 ; http://www.ednmag.com/ednmag/reg/2000/030200/designideas.htm#05di2 ;*********************************************************************************************** static interrupt (0x1F) void UartIrq ( void ) /* EX7 = vector 0x1f, address 0x7c */ { switch ( (uiPortBase + IIR) & 6 ) /* read interrupt identification register */ { case 0: /* do something to handle the ID 0 */ break; case 2: /* do something to handle the ID 2 */ break; case 4: /* do something to handle the ID 4 */ break; case 6: /* do something to handle the ID 6 */ break; } }