HMS8132E/HMS81032TL
Nov. 2001 Ver 2.00
19
8.2 Program Memory
A 16-bit program counter is capable of addressing up to
64K bytes, but this device has 4/8/16/24/32K bytes pro-
gram memory space only physically implemented. Ac-
cessing a location above FFFF
H
will cause a wrap-around
to 0000
H
.
Figure 8-5, shows a map of Program Memory. After reset,
the CPU begins execution from reset vector which is stored
in address FFFE
H
and FFFF
H
as shown in Figure 8-6.
As shown in Figure 8-5, each area is assigned a fixed loca-
tion in Program Memory. Program Memory area contains
the user program.
Figure 8-5 Program Memory Map
Page Call (PCALL) area contains subroutine program to
reduce program byte length by using 2 bytes PCALL in-
stead of 3 bytes CALL instruction. If it is frequently called,
it is more useful to save program byte length.
Table Call (TCALL) causes the CPU to jump to each
TCALL address, where it commences the execution of the
service routine. The Table Call service area spaces 2-byte
for every TCALL: 0FFC0
H
for TCALL15, 0FFC2
H
for
TCALL14, etc., as shown in Figure 8-7.
Example: Usage of TCALL
The interrupt causes the CPU to jump to specific location,
where it commences the execution of the service routine.
The External interrupt 0, for example, is assigned to loca-
tion 0FFFA
H
. The interrupt service locations spaces 2-byte
interval: 0FFF8
H
and 0FFF9
H
for External Interrupt 1,
0FFFA
H
and 0FFFB
H
for External Interrupt 0, etc.
Any area from 0FF00
H
to 0FFFF
H
, if it is not going to be
used, its service location is available as general purpose
Program Memory.
Figure 8-6 Interrupt Vector Area
TCALL
AREA
INTERRUPT
VECTOR AREA
FF00
H
FFC0
H
FFE0
H
FFFF
H
PCALL
AREA
A000
H
8000
H
F000
H
E000
H
C000
H
H
M
S
8
10
04E
4
KROM
H
M
S
8
100
8E
8K
R
O
M
H
M
S
8
1
016
E
16
KR
O
M
H
M
S
8
102
4E
2
4
KROM
H
M
S
810
32
E
3
2
KRO
M
LDA
#5
TCALL
0FH
;
1BYTE INSTR UCTIO N
:
;
INSTEAD O F 2 BYTES
:
;
NO R M AL C ALL
;
;TABLE CALL ROUTINE
;
FUNC_A:
LDA
LRG0
RET
;
FUNC_B:
LDA
LRG1
RET
;
;TABLE CALL ADD. AREA
;
ORG
0FFC0H
;
TCALL ADDRESS AREA
DW
FUNC_A
DW
FUNC_B
1
2
E0
E2
Address
Vector Area Memory
E4
E6
E8
EA
EC
EE
F0
F2
F4
F6
F8
FA
FC
FE
-
-
-
Basic Interval Timer Interrupt Vector Area
-
-
Timer2 Interrupt Vector Area
Timer0 Interrupt Vector Area
-
External Interrupt 2 Vector Area
Key Scan Interrupt Vector Area
RESET Vector Area
External Interrupt 1 Vector Area
Timer1 Interrupt Vector Area
Watch Dog Timer Interrupt Vector Area
"-" means reserved area.
NOTE:
-
0FFDE
H
S/W Interrupt Vector Area
Содержание HMS81004E
Страница 4: ...HMS81032E HMS81032TL NOV 2001 Ver 2 00...
Страница 84: ...HMS81032E HMS81032TL 80 Nov 2001 Ver 2 00...
Страница 85: ...APPENDIX...