You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
D1A.s (1)<br />
.text<br />
;Start of Code section<br />
__reset:<br />
MOV #SP_init, W15 ;Initalize the Stack Pointer<br />
MOV #SPLIM_init, W0 ;Initialize the Stack Pointer Limit Register<br />
MOV<br />
W0, SPLIM<br />
NOP<br />
;Add NOP to follow SPLIM initialization<br />
CALL _wreg_init ;Call _wreg_init subroutine<br />
;Optionally use RCALL instead of CALL<br />
;<br />
;..............................................................................<br />
;Subroutine: Initialization of W registers to 0x0000<br />
;..............................................................................<br />
_wreg_init:<br />
CLR<br />
W0<br />
MOV<br />
W0, W14<br />
REPEAT #12<br />
MOV<br />
W0, [++W14]<br />
CLR<br />
W14<br />
RETURN<br />
ASM30 <br />
(crt0.o) <br />
LINK30 __reset<br />
_main<br />
From 2.2.3 of dsPIC30F Family Reference Manual<br />
© 2006 Microchip Technology Incorporated. All Rights Reserved. 1005 GS5 Slide 17