R01UH0092EJ0110 Rev.1.10
Page 218 of 807
Jul 31, 2012
M16C/64C Group
14. Interrupts
14.11 Address Match Interrupt
An address match interrupt is generated immediately before executing the instruction at the address
indicated by the RMADi register (i = 0 to 3). Set the start address of any instruction in the RMADi register.
Use bits AIER0 and AIER1 in the AIER register, and bits AIER20 and AIER21 in the AIER2 register to
enable or disable the interrupt. Note that the address match interrupt is unaffected by the I flag and IPL.
When an address match interrupt request is acknowledged, the value of the PC that is saved to the stack
area (refer to 14.7.5 “Saving Registers”) varies depending on the instruction at the address indicated by
the RMADi register. (The value of the PC that is saved to the stack area is not the correct return address.)
Therefore, use one of the following methods to return from the address match interrupt:
•
Rewrite the values of the stack and then use the REIT instruction to return.
•
Restore the stack to its previous state by using the POP or similar instructions before the interrupt
request was accepted and then use a jump instruction to return.
Refer to 14.7.5 “Saving Registers” for PC values saved to the stack area.
Table 14.11
Value of PC Saved on Stack Area When Address Match Interrupt Request Accepted
Instruction at the Address Indicated by the RMADi Register
Value of the PC That Is
Saved to the Stack Area
•
16-bit operation code instructions
•
Instruction shown below among 8-bit operation code instructions
ADD.B:S #IMM8,
dest SUB.B:S #IMM8, dest
AND.B:S
#IMM8, dest
OR.B:S
#IMM8, dest
MOV.B:S
#IMM8, dest
STZ
#IMM8, dest
STNZ
#IMM8, dest
STZX
#IMM81, #IMM82,dest
CMP.B:S
#IMM8, dest
PUSHM
src
POPM dest
JMPS #IMM8 JSRS #IMM8
MOV.B:S
#IMM, dest (however, dest = A0 or A1)
The address
indicated by the
RMADi re2
Instructions not listed above
The address
indicated by the
RMADi re1
Table 14.12
Relationship between Address Match Interrupt Sources and Associated Registers
Address Match Interrupt Sources Address Match Interrupt Enable Bit
Address Match Interrupt Register
Address match interrupt 0
AIER0
RMAD0
Address match interrupt 1
AIER1
RMAD1
Address match interrupt 2
AIER20
RMAD2
Address match interrupt 3
AIER21
RMAD3
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...