NEC 78K0 Series User Manual page 96

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0 Series:
Table of Contents

Advertisement

CHAPTER 4 MEMORY BANK SELECT FUNCTION (
• Software example
RAMD
DSEG
SADDR
R_BNKA:
DS
2
R_BNKN:
DS
1
R_BNKRN: DS
1
MOV
R_BNKN,#BANKNUM TEST
MOVW
R_BNKA,#TEST
CALL
!BNKCAL
:
:
BNKC
CSEG
AT
BNKCAL:
MOV
A,R_BNKN
XCH
A,BANK
MOV
R_BNKRN,A
CALL
!BNKCALS
XCH
A,R_BNKRN
MOV
BANK,A
RET
BNKCALS:
MOVW
AX,R_BNKA
BR
AX
BN3
CSEG
BANK3
TEST:
MOV ⋅⋅⋅
:
:
RET
END
Remark
In the software example above, the AX register is destructed. Multiplexed processing is not supported.
96
; Secures RAM for specifying an address at the calling destination.
; Secures RAM for specifying a memory bank number at the calling destination.
; Secures RAM for saving a memory bank number at the calling source.
; Store the memory bank number at the calling destination in RAM.
; Stores the address at the calling destination in RAM.
; Branches to an inter-memory bank calling processing routine.
7000H
; Inter-memory bank calling processing routine
; Acquires the memory bank number at the calling destination.
; Changes the bank and acquires the memory bank number at the calling source.
; Saves the memory bank number at the calling source to RAM.
; Calls a subroutine to branch to the calling destination.
;
; Specifies the memory bank number at the calling source.
; Returns to the calling source.
; Specifies the address at the calling destination.
; Branches to the calling destination.
;
Preliminary User's Manual U17260EJ3V1UD
µ
PD78F0536, 78F0537, AND 78F0537D ONLY)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents