NEC 78K0 Series User Manual page 95

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

Advertisement

CHAPTER 4 MEMORY BANK SELECT FUNCTION (
4.3.3 Subroutine call between memory banks
Subroutines cannot be directly called between memory banks.
To call a subroutine between memory banks, branch once to the common area (0000H to 7FFFH), specify the
memory bank at the calling destination by using the BANK register there, execute the CALL instruction, and branch to
the call destination by that instruction.
At this time, save the current value of the BANK register to RAM. Restore the value of the BANK register before
executing the RET instruction.
Bank
area
Common
area
Bank
area
CALL
inst-
ruction
Common
area
RET instruction
Memory bank m
CALL instruction
BR instruction
Memory bank m
instruction
Change BANK and save
memory bank number at
calling source.
Preliminary User's Manual U17260EJ3V1UD
µ
PD78F0536, 78F0537, AND 78F0537D ONLY)
Memory bank n
Memory bank n
CALL
RET instruction
95

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents