Program Example Of Address Match Detection Function - Fujitsu F2MC-16LX Hardware Manual

Mb90470 series 16-bit microcontroller
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

24.5 Program Example of Address Match Detection Function

This section gives a program example for the address match detection function.
I 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
PADRL EQU 001FF0H
PADRM EQU 001FF1H
PADRH EQU 001FF2H
;
;-----Main program---------------------------------------------------------------
CODE CSEG
START:
MOV PADRL,#00H
MOV PADRM,#00H
MOV PADRH,#00H
;
MOV I:PACSR,#00000010B ; Enable address match
:
processing by user
:
LOOP:
:
processing by user
:
BAR LOOP
;-----Interrupt program----------------------------------------------------------
WARI:
:
processing by user
:
BETI
CODE ENDS
;-----Vector setting-------------------------------------------------------------
VECT CSEG ABS=0FFH
ORG 00FFDCH
DSL WARI
ORG 00FFDCH
DSL START
DB 00H
VECT ENDS
END START
CHAPTER 24 ADDRESS MATCH DETECTION FUNCTION
; Address detection control register
; Detection address setting register 0 (Low)
; Detection address setting register 0 (Middle)
; Detection address setting register 0 (High)
; Stack pointer (SP), etc.,
; already reset
; Set address detection register 0 (Low)
; Set address detection register 0 (Middle)
; Set address detection register 0 (High)
; Return from interrupt processing
; Set reset vector
; Set to single-chip mode
463

Advertisement

Table of Contents
loading

Table of Contents