561
CHAPTER 24 ADDRESS MATCH DETECTION FUNCTION
24.5 Program Example of Address Match Detection Function
This section gives a program example for the address match detection function.
■ Program Example for Address Match Detection Function
●
Processing specifications
If the address of the instruction to be executed by the program matches the address set in the detection
address setting register (PADR0), the INT9 instruction is executed.
●
Coding example
PACSR EQU 00009EH ; Address detection control register
PADRL EQU 001FF0H ; Detection address setting register 0 (Low)
PADRM EQU 001FF1H ; Detection address setting register 0 (Middle)
PADRH EQU 001FF2H ; Detection address setting register 0 (High)
;
;-----Main program---------------------------------------------------------------
CODE CSEG
START:
; Stack pointer (SP), etc.,
; already reset
MOV PADRL,#00H ; Set address detection register 0 (Low)
MOV PADRM,#00H ; Set address detection register 0 (Middle)
MOV PADRH,#00H ; Set address detection register 0 (High)
;
MOV I:PACSR,#00000010B ; Enable address match
:
processing by user
:
LOOP:
:
processing by user
:
BAR LOOP
;-----Interrupt program----------------------------------------------------------
WARI:
:
processing by user
: