-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFirePIC_FireflyDebugger.lst
157 lines (156 loc) · 7.76 KB
/
FirePIC_FireflyDebugger.lst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
; LST file generated by mikroListExporter - v.2.0
; Date/Time: 23/06/2017 15:16:50
;----------------------------------------------
;Address Opcode ASM
0x0000 0x2810 GOTO 16
_interrupt:
;FirePIC_FireflyDebugger.c,19 :: void interrupt(){
;FirePIC_FireflyDebugger.c,22 :: MOVLB 0
0x0004 0x3180 MOVLP 0
0x0005 0x0020 MOVLB 0
;FirePIC_FireflyDebugger.c,23 :: BTFSC PIR1, RCIF // Ignore interrupt unless it was Rx.
0x0006 0x1A91 BTFSC PIR1, 5
;FirePIC_FireflyDebugger.c,24 :: GOTO SEND_DATA
0x0007 0x2809 GOTO SEND_DATA
;FirePIC_FireflyDebugger.c,25 :: RETFIE // Return from interrupt.
0x0008 0x0009 RETFIE 0
;FirePIC_FireflyDebugger.c,28 :: SEND_DATA:
SEND_DATA:
;FirePIC_FireflyDebugger.c,29 :: MOVLB 0
0x0009 0x0020 MOVLB 0
;FirePIC_FireflyDebugger.c,30 :: BCF PIR1, RCIF // First clear the interrupt flag.
0x000A 0x1291 BCF PIR1, 5
;FirePIC_FireflyDebugger.c,31 :: MOVLB 3
0x000B 0x0023 MOVLB 3
;FirePIC_FireflyDebugger.c,32 :: MOVF RCREG, 0 // Retrieve byte from Rx.
0x000C 0x0819 MOVF RCREG, 0
;FirePIC_FireflyDebugger.c,33 :: MOVWF TXREG // Send the byte to the Pi.
0x000D 0x009A MOVWF TXREG
;FirePIC_FireflyDebugger.c,34 :: RETFIE // Return from interrupt.
0x000E 0x0009 RETFIE 0
;FirePIC_FireflyDebugger.c,36 :: }
L_end_interrupt:
L__interrupt5:
0x000F 0x0009 RETFIE %s
; end of _interrupt
_main:
;FirePIC_FireflyDebugger.c,44 :: void main(){
;FirePIC_FireflyDebugger.c,47 :: MOVLB 1
0x0010 0x0021 MOVLB 1
;FirePIC_FireflyDebugger.c,48 :: MOVLW 0xFC // (0xFC = 1111 1100)
0x0011 0x30FC MOVLW 252
;FirePIC_FireflyDebugger.c,50 :: MOVWF TRISA // Set input{RA5, RA4, RA3}, output{RA0, RA1} (Tx pin needs to be set as input).
0x0012 0x008C MOVWF TRISA
;FirePIC_FireflyDebugger.c,51 :: MOVLB 0
0x0013 0x0020 MOVLB 0
;FirePIC_FireflyDebugger.c,52 :: CLRF PORTA // Clear the port.
0x0014 0x018C CLRF PORTA
;FirePIC_FireflyDebugger.c,55 :: MOVLB 1
0x0015 0x0021 MOVLB 1
;FirePIC_FireflyDebugger.c,56 :: MOVLW 0xF0 // Configure for 32MHz operation (0x7A for 16MHz)
0x0016 0x30F0 MOVLW 240
;FirePIC_FireflyDebugger.c,57 :: MOVWF OSCCON
0x0017 0x0099 MOVWF OSCCON
;FirePIC_FireflyDebugger.c,60 :: MOVLB 3 // Disable AtoD functionality on all pins.
0x0018 0x0023 MOVLB 3
;FirePIC_FireflyDebugger.c,61 :: CLRF ANSELA
0x0019 0x018C CLRF ANSELA
;FirePIC_FireflyDebugger.c,64 :: MOVLB 2 // Configure USART pinout
0x001A 0x0022 MOVLB 2
;FirePIC_FireflyDebugger.c,65 :: MOVLW 0x84 // RX = RA5
0x001B 0x3084 MOVLW 132
;FirePIC_FireflyDebugger.c,66 :: MOVWF APFCON // TX = RA4
0x001C 0x009D MOVWF APFCON
;FirePIC_FireflyDebugger.c,69 :: MOVLB 3 // 1Mbps: SPBRGH = 0 @ 16MHz, SPBRGL = 1 @ 16MHz
0x001D 0x0023 MOVLB 3
;FirePIC_FireflyDebugger.c,70 :: CLRF SPBRGH // 2Mbps: SPBRGH = 0 @ 16MHz, SPBRGL = 0 @ 16MHz
0x001E 0x019C CLRF SPBRGH
;FirePIC_FireflyDebugger.c,71 :: MOVLB 3
0x001F 0x0023 MOVLB 3
;FirePIC_FireflyDebugger.c,72 :: MOVLW 1
0x0020 0x3001 MOVLW 1
;FirePIC_FireflyDebugger.c,73 :: MOVWF SPBRGL
0x0021 0x009B MOVWF SPBRGL
;FirePIC_FireflyDebugger.c,75 :: MOVLB 3 // BRG16
0x0022 0x0023 MOVLB 3
;FirePIC_FireflyDebugger.c,76 :: MOVLW 0x04 // bit 3 = 1. (BRG16)
0x0023 0x3004 MOVLW 4
;FirePIC_FireflyDebugger.c,77 :: MOVWF BAUDCON
0x0024 0x009F MOVWF BAUDCON
;FirePIC_FireflyDebugger.c,80 :: MOVLB 3 // Enable Asynschronous USART Tx
0x0025 0x0023 MOVLB 3
;FirePIC_FireflyDebugger.c,81 :: MOVLW 0x24 // With 8 bit mode by Default...
0x0026 0x3024 MOVLW 36
;FirePIC_FireflyDebugger.c,82 :: MOVWF TXSTA // SYNC = 0 & BRGH = 1
0x0027 0x009E MOVWF TXSTA
;FirePIC_FireflyDebugger.c,84 :: MOVLB 3 // Enable Asynschronous USART Rx
0x0028 0x0023 MOVLB 3
;FirePIC_FireflyDebugger.c,85 :: MOVLW 0xD0 // With 9 bit mode, (RX9 = 0)
0x0029 0x30D0 MOVLW 208
;FirePIC_FireflyDebugger.c,86 :: MOVWF RCSTA
0x002A 0x009D MOVWF RCSTA
;FirePIC_FireflyDebugger.c,89 :: MOVLB 1
0x002B 0x0021 MOVLB 1
;FirePIC_FireflyDebugger.c,90 :: BSF PIE1, RCIE // USART Receive Interrupt Enable bit.
0x002C 0x1691 BSF PIE1, 5
;FirePIC_FireflyDebugger.c,91 :: CLRF INTCON // Reset any previous settings.
0x002D 0x018B CLRF INTCON
;FirePIC_FireflyDebugger.c,92 :: BSF INTCON, PEIE // Enable Periphieral Interrupts (For Rx Interrupts).
0x002E 0x170B BSF INTCON, 6
;FirePIC_FireflyDebugger.c,93 :: BSF INTCON, GIE // Enable Global Interrupts (For Rx Interrupts).
0x002F 0x178B BSF INTCON, 7
;FirePIC_FireflyDebugger.c,95 :: while(1){}
L_main2:
0x0030 0x2830 GOTO L_main2
;FirePIC_FireflyDebugger.c,96 :: }
L_end_main:
0x0031 0x2831 GOTO $+0
; end of _main
Symbol List:
//** Routines locations **
//ADDRESS SIZE PROCEDURE
//----------------------------------------------
0x0004 [12] _interrupt
0x0010 [34] _main
//** Variables locations **
//ADDRESS SIZE VARIABLE
//----------------------------------------------
0x0000 [1] INDF0
0x0001 [1] INDF1
0x0003 [1] STATUS
0x0004 [1] FSR0L
0x0005 [1] FSR0H
0x0006 [1] FSR1L
0x0007 [1] FSR1H
0x000A [1] PCLATH
0x000B [1] INTCON
0x000C [1] PORTA
0x0011 [1] PIR1
0x0070 [1] R0
0x0071 [1] R1
0x0072 [1] R2
0x0073 [1] R3
0x0074 [1] R4
0x0075 [1] R5
0x0076 [1] R6
0x0077 [1] R7
0x0078 [1] R8
0x0079 [1] R9
0x007A [1] R10
0x007B [1] R11
0x007C [1] R12
0x007D [1] R13
0x007E [1] R14
0x007F [1] R15
0x008C [1] TRISA
0x0091 [1] PIE1
0x0099 [1] OSCCON
0x011D [1] APFCON
0x018C [1] ANSELA
0x0199 [1] RCREG
0x019A [1] TXREG
0x019B [1] SPBRGL
0x019C [1] SPBRGH
0x019D [1] RCSTA
0x019E [1] TXSTA
0x019F [1] BAUDCON