7 .include
"p24Hxxxx.inc" ; Include processor-specific headers
9 .global _main ; Make _main visible outside
10 ;
this file so C startup code
13 .section psv psv ; Place following statements in PSV space
14 HELLO_MSG: .asciz
"asm_echo.s ready!\n" ; Define a null-terminated ASCII string
17 ;..............................................................................
18 ;Code Section in Program Memory
19 ;..............................................................................
21 .text ;Start of Code section
23 _main: ; _main called after C startup code runs
24 mov #HELLO_MSG,W0 ; Equivalent to
28 call _inChar ; W0 =
inChar();
29 inc W0, W0 ; W0 = W0 + 1;
33 .end ;End of program code in
this file