HOME                                        

SIO/2  UART  Interrupts 6

  Info

  <= Interrupts 5                                                                                                                        Interrupts 7 =>

On the previous pages we setup:

 - environment constants      

 - Interrupt Vector Table config

 - UART Write registers

 

Now we'll add the assembly code for the interrupt service routines (ISRs).

 

The first 6 ISRs starting with E0IntChB_TxBufMT are just placeholders until we complete them.

 

The 7th ISR is labeled ECIntCha_RxCh. It's the same one we used in the polling section. It functions by:

 - save register A and flags

 - read in character from channel A data register

 - save a copy in RxChBuf

 - output the character to the SIO to send on its TxDA line

 - reset the TX interrupt pending

 - re-enable interrupts that were disabled automatically when this interrupt was serviced

 - return from interrupt

 

Further down is another ISR that handles the Special Receive Conditions interrupt for Framing Error, Rx Buffer Overrun, etc.

SIO/2  interrupts mode: interrupt service routines

  <= Interrupts 5                                                                                                                        Interrupts 7 => 

 

TOP

Tags: Z80 MBC, 1MB memory

HOME