MC81F4204
48 April 24, 2012 Ver.1.41
9.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 FFFFH will cause a wrap-around to
0000H.
Figure 9-6 shows a map of Program Memory. After
reset, the CPU begins execution from reset vector
which is stored in address FFFEH and FFFFH. As
shown in
Figure 9-6, each area is assigned a fixed
location in Program Memory.
Program memory area contains the user program Page
Call (PCALL) area contains subroutine program to
reduce program byte length by using 2 bytes PCALL
instead 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: 0FFC0H for
TCALL15, 0FFC2H for TCALL14, etc., as shown in
Figure 9-7.
The interrupt causes the CPU to jump to specific location where it commences the execution of the
service routine. The interrupt service locations spaces 2-byte interval. The External interrupt 1, for
Example, is assigned to location 0FFFC
H.
Any area from 0FF00
H to 0FFFFH, if it is not going to be used, its service location is available as
general purpose Program Memory.
Figure 9-6 Program Memory Map