Program Example Of Address Match Detection Function - Fujitsu MB90480 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

21.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
program address detection register (PADR0), the INT9 instruction is executed.
❍ Coding example
PACSR
PADRL
PADRM
PADRH
;
;-----Main program---------------------------------------------------------------
CODE
START:
;
LOOP:
;-----Interrupt program----------------------------------------------------------
WARI:
CODE
;-----Vector setting-------------------------------------------------------------
VECT
VECT
CHAPTER 21 ADDRESS MATCH DETECTION FUNCTION
EQU
00009EH
EQU
000001H
EQU
000002H
EQU
000003H
CSEG
MOV
PADRL,#00H
MOV
PADRM,#00H
MOV
PADRH,#00H
MOV
I:PACSR,#00000010B ; Enable address match detection
:
processing by user
:
:
processing by user
:
BAR
LOOP
:
processing by user
:
RETI
ENDS
CSEG ABS=0FFH
ORG
00FFDCH
DSL
START
DB
00H
ENDS
END
START
; Program address detection control status register
; Program address detection register 0 (Low)
; Program address detection register 0 (Middle)
; Program address detection register 0 (High)
; Stack pointer (SP), etc.,
; already initialized
; Set Program address detection register 0 (Low)
; Set Program address detection register 0 (Middle)
; Set Program address detection register 0 (High)
; Return from interrupt processing
; Set reset vector
; Set to single-chip mode
471

Advertisement

Table of Contents
loading

Table of Contents