
Preliminary
MC80F0104/0204
Mar. 2005 Ver 0.2
21
8.2 Program Memory
A 16-bit program counter is capable of addressing up to
64K bytes, but this device has 4K bytes program memory
space only physically implemented. Accessing 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 lo-
cation in Program Memory. Program Memory area con-
tains 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 0FFFC
H
. The interrupt service locations spaces 2-byte
interval: 0FFFA
H
and 0FFFB
H
for External Interrupt 1,
0FFFC
H
and 0FFFD
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
Interrupt
Vector Area
FEFF
H
FF00
H
FFC0
H
FFDF
H
FFE0
H
FFFF
H
PCAL
L area
F000
H
TCALL area
M
C
80
F0104
/02
04,
4
K
F
LASH
LDA
#5
TCALL 0FH
;
1BYTE INSTRUCTION
:
;
INSTEAD OF 3 BYTES
:
;
NORMAL CALL
;
;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
0FFE0
H
E2
Address
Vector Area Memory
E4
E6
E8
EA
EC
EE
F0
F2
F4
F6
F8
FA
FC
FE
Basic Interval Timer
Watchdog Timer Interrupt
A/D Converter
-
External Interrupt 3
Serial Input/Output (SIO)
External Interrupt 1
External Interrupt 0
RESET
External Interrupt 2
Timer/Counter 3 Interrupt
Timer/Counter 0 Interrupt
UART Rx interrupt
UART Tx interrupt
Timer/Counter 1 Interrupt
Timer/Counter 2 Interrupt
Summary of Contents for MC80F0104
Page 108: ...MC80F0104 0204 Preliminary 104 Mar 2005 Ver 0 2 25 Emulator EVA Board Setting...
Page 115: ...APPENDIX...
Page 116: ......
Page 124: ...viii Mar 2005 Ver 0 2 MC80F0104 0204 Preliminary...