summaryrefslogtreecommitdiffstats
path: root/test/pic30/test.s
blob: 98a8d5c8aa41d99281f7d6e89543a38b7778cc7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
         .title " Sample dsPIC Assembler Source Code"
         .sbttl " For illustration only."
         ; dsPIC registers
         .equ CORCONL, CORCON
         .equ PSV,2
         .section .const,psv
hello:
         .ascii "Hello world!\n\0"
         .text
         .global __reset
__reset:
         ; set PSVPAG to page that contains 'hello'
         mov     #psvpage(hello),w0
         mov     w0,PSVPAG
         ; enable Program Space Visibility
         bset.b CORCONL,#PSV
         ; make a pointer to 'hello'
         mov     #psvoffset(hello),w0
         .end