Software interrupt generation – Zilog Z8F0130 User Manual
Page 47
eZ8
™
CPU Core
User Manual
UM012820-0810
Interrupts
43
JR
Z, NEXT
; If no interrupt
request, go
; to NEXT CALL
SERVICE
. If
; interrupt
request, go to the
; interrupt
service routine.
NEXT:
; Other program
code here.
SERVICE:
; Process
interrupt request
; service routine
code here.
AND IRQ1, #1101111b
; Clear the
interrupt request
; in bit 5 of IRQ1
RET
; Return to
address following
; the CALL
Refer to the Z8 Encore! Product Specification specific to your device for
information on the Interrupt Request Registers.
Software Interrupt Generation
The eZ8 CPU generates Software Interrupts by writing to the Interrupt
Request Registers in the Register File. The Interrupt Controller and
eZ8 CPU handle these software interrupts in the same manner as
hardware-generated interrupt requests. To generate a Software Interrupt,
write a 1 to the preferred interrupt request bit in the selected Interrupt
Request Register. As an example, the following instruction:
OR IRQ1, #0010000b