Zilog Z86193 Bedienungsanleitung Seite 116

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 260
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 115
Z8
®
CPU
User Manual
UM001604-0108 Interrupts
109
EI ;Enable interrupt mechanism
DI ;Disable vectored interrupts.
To initiate polled processing, check the bits of interest in the IRQ using the Test Under
Mask (TM) instruction. If the bit is set, call or branch to the service routine. The service
routine services the request, resets its Request Bit in the IRQ, and branches or returns back
to the main program. An example of a polling routine is as follows:
In this example, if IRQ2 is being polled, MASKA is
00000100b and MASKB is
11111011b.
Reset Conditions
Upon reset, all bits in IPR are undefined.
In IMR, bit 7 is 0 and bits 0–6 are undefined. The IRQ register is reset and held in that
state until an enable interrupt (EI) instruction is executed.
TM IRQ, #MASKA ;Test for request
JR Z, NEXT ;If no request go to NEXT
CALL SERVICE ;If request is there, then
;service it
NEXT:
.
.
.
SERVICE: ;Process Request
.
.
.
AND IRQ, #MASKB ;Clear Request Bit
RET ;Return to next
Seitenansicht 115
1 2 ... 111 112 113 114 115 116 117 118 119 120 121 ... 259 260

Kommentare zu diesen Handbüchern

Keine Kommentare