User guide

2: Software Development for the ICP
DC 900-1338I 41
2.4.4 Interrupt Priority Levels
The Motorola 68xxx supports seven levels of prioritized interrupts, with level 7 being
the highest priority. Any number of devices can be chained to interrupt at the same pri-
ority. Ta ble 2 2 shows the interrupt priorities for the various ICPs hardware devices.
When an interrupt occurs at a particular priority, the interrupt mask field in the 68xxxs
status register is set to the priority level of that interrupt, causing other interrupts at the
same or lower priorities to be ignored. When interrupt servicing is complete, the inter-
rupt mask level in the status register is returned to its previous value, at which time
pending interrupts at lower priorities can be serviced.
The interrupt priority level can be changed by directly modifying the mask field in the
status register, but this is possible only in supervisor state. OS/Impact includes a system
call that can be called from the task level to modify the interrupt priority level.
The MC68000 Family Reference Manual (Motorola) contains important information
that should be studied before implementing interrupt-level code.
SECTION 9
XREF _Cisr external reference to C isr
XDEF _isr_shell external definition for C code
* which stores this address
* in the exception vector table
_isr_shell
movem.l d0/d1/a0/a1,-(sp) save registers not saved by C
jsr _Cisr call C routine for interrupt
* processing
movem.l (sp)+,d0/d1/a0/a1 restore registers
s_iret return from isr (system call)
Figure 21: Assembly Language Shell