dsPICDEM™ 1.1 Plus Development Board User’s Guide
DS70099D-page 26
©
2006 Microchip Technology Inc.
2.7.1
Display the Code
1.
From the View menu, select Program Memory.
2.
On the Program Memory window, select the Symbolic tab, as shown in
Figure 2-16.
FIGURE 2-16:
PROGRAM MEMORY WINDOW
3.
Press <F5> to halt the processor and press <F6> to reset. The program memory
now shows a green arrow pointing to the line of code at address 0, the reset
location.
The instruction at this location is
goto __reset
. This code is added by the
linker to make the program branch to the start of the code in the
Tut6014A.s
file. The code uses the
__reset
label at the start of the executable code and
declares the label as global to have visibility outside the source file
(see Example 2-1).
EXAMPLE 2-1:
CODE START-UP
The linker also provides values for the
__SP_init
and
__SPLIM_init
constants to initialize the stack pointer (W15), since the linker determines what
RAM is available for the stack.
.global __reset
.text
__reset:
mov
#__SP_init, W15
mov
#__SPLIM_init, W0
mov
W0, SPLIM