
Chapter 2
2.4.2 Program Memory
The EM60000 series have a 13-bit program counter that is capable of
addressing an 8K x 13 program memory space. The reset vector is at 0x000 and
the interrupt vectors are at 0x0002, 0x000A, and 0x000E. The remaining space
is for your program use.
The program ROM is divided into 8 program pages, each page being 1K words
in length. The jump/call instruction will result in a branch inside the current
page. If you need a long jump/call across pages, you must insert a page change
instruction before it. The page change instruction changes the Page Select bits
(PS2~PS0) in the Status Flag register. Hence, the jump/call instruction will go
to the location within the page specified by PS2~PS0.
Example:
Current page jump and cross page jump.
ORG 0x0000
; the following code resides in page 0
JMP Label1
; Label1 is located in page 0
……
PAGE 1
; Label2 is located in page 1
JUMP
Label2
Label1: MOV A,
@0
JMP STOP
; STOP is located in page 0
STOP: NOP
SLEP
……
ORG 0x0400
; the following codes reside in page 1
Label2: MOV A, @1
PAGE 0
; STOP is located in page 0
JMP
STOP
Note that the “PAGE N” instruction will set the Page Select bits to N (N must be
a 3-bit value ranging from 0 to 7). Therefore, the following jump/call
instruction will always go to the label as defined in page N until the Page Select
bits are changed.
EM60000 Series User’s Manual
Architecture
•
13
Содержание EM60000 series
Страница 8: ...Contents viii Contents EM60000 Series User s Manual ...
Страница 24: ...Chapter 2 16 Architecture EM60000 Series User s Manual ...
Страница 54: ...Chapter 4 46 Special Function Control EM60000Series User s Manual ...
Страница 80: ...Chapter 5 72 Instruction Set EM60000Series User s Manual ...