318 |
kaklik |
1 |
;/////////////////////////////////////////////////////////////////////////////////
|
|
|
2 |
;// Code Generator: BoostBasic Compiler - http://www.sourceboost.com
|
|
|
3 |
;// Version : 6.70
|
|
|
4 |
;// License Type : Pro License
|
|
|
5 |
;// Limitations : PIC18 max code size:Unlimited, max RAM banks:Unlimited
|
|
|
6 |
;/////////////////////////////////////////////////////////////////////////////////
|
|
|
7 |
|
|
|
8 |
ORG 0x00000200
|
|
|
9 |
0200 EF99F001 GOTO _startup
|
|
|
10 |
ORG 0x00000204
|
|
|
11 |
0204 send_00000
|
|
|
12 |
0204 ; { send ; function begin
|
|
|
13 |
0204 label268438561
|
|
|
14 |
0204 A89E BTFSS gbl_pir1,4
|
|
|
15 |
0206 D7FE BRA label268438561
|
|
|
16 |
0208 500A MOVF send_00000_arg_c, W
|
|
|
17 |
020A 6EAD MOVWF gbl_txreg
|
|
|
18 |
020C 0012 RETURN
|
|
|
19 |
020E ; } send function end
|
|
|
20 |
|
|
|
21 |
ORG 0x0000020E
|
|
|
22 |
020E receive_00000
|
|
|
23 |
020E ; { receive ; function begin
|
|
|
24 |
020E A2AB BTFSS gbl_rcsta,1
|
|
|
25 |
0210 D002 BRA label268438550
|
|
|
26 |
0212 98AB BCF gbl_rcsta,4
|
|
|
27 |
0214 88AB BSF gbl_rcsta,4
|
|
|
28 |
0216 label268438550
|
|
|
29 |
0216 AA9E BTFSS gbl_pir1,5
|
|
|
30 |
0218 D7FE BRA label268438550
|
|
|
31 |
021A 50AE MOVF gbl_rcreg, W
|
|
|
32 |
021C 6E0A MOVWF CompTempVarRet489
|
|
|
33 |
021E 0012 RETURN
|
|
|
34 |
0220 ; } receive function end
|
|
|
35 |
|
|
|
36 |
ORG 0x00000220
|
|
|
37 |
0220 main
|
|
|
38 |
0220 ; { main ; function begin
|
|
|
39 |
0220 6889 SETF gbl_lata
|
|
|
40 |
0222 6A8A CLRF gbl_latb
|
|
|
41 |
0224 688B SETF gbl_latc
|
|
|
42 |
0226 0EF0 MOVLW 0xF0
|
|
|
43 |
0228 6E92 MOVWF gbl_trisa
|
|
|
44 |
022A 0E3F MOVLW 0x3F
|
|
|
45 |
022C 6E93 MOVWF gbl_trisb
|
|
|
46 |
022E 0E9F MOVLW 0x9F
|
|
|
47 |
0230 6E94 MOVWF gbl_trisc
|
|
|
48 |
0232 0EC6 MOVLW 0xC6
|
|
|
49 |
0234 6EC1 MOVWF gbl_adcon1
|
|
|
50 |
0236 0EC0 MOVLW 0xC0
|
|
|
51 |
0238 6EC2 MOVWF gbl_adcon0
|
|
|
52 |
023A 0E40 MOVLW 0x40
|
|
|
53 |
023C 6EAF MOVWF gbl_spbrg
|
|
|
54 |
023E 0EFB MOVLW 0xFB
|
|
|
55 |
0240 14AC ANDWF gbl_txsta, W
|
|
|
56 |
0242 6EAC MOVWF gbl_txsta
|
|
|
57 |
0244 0E20 MOVLW 0x20
|
|
|
58 |
0246 10AC IORWF gbl_txsta, W
|
|
|
59 |
0248 6EAC MOVWF gbl_txsta
|
|
|
60 |
024A 0E10 MOVLW 0x10
|
|
|
61 |
024C 10AB IORWF gbl_rcsta, W
|
|
|
62 |
024E 6EAB MOVWF gbl_rcsta
|
|
|
63 |
0250 0E80 MOVLW 0x80
|
|
|
64 |
0252 10AB IORWF gbl_rcsta, W
|
|
|
65 |
0254 6EAB MOVWF gbl_rcsta
|
|
|
66 |
0256 6803 SETF main_1_leds
|
|
|
67 |
0258 0E0F MOVLW 0x0F
|
|
|
68 |
025A 6E04 MOVWF main_1_leds1
|
|
|
69 |
025C 6A01 CLRF main_1_motors
|
|
|
70 |
025E label268438595
|
|
|
71 |
025E 5081 MOVF gbl_portb, W
|
|
|
72 |
0260 6E05 MOVWF main_1_buttons
|
|
|
73 |
0262 B205 BTFSC main_1_buttons,1
|
|
|
74 |
0264 D022 BRA label268438598
|
|
|
75 |
0266 6A06 CLRF main_1_i
|
|
|
76 |
0268 6A07 CLRF main_1_i+D'1'
|
|
|
77 |
026A 6A08 CLRF main_1_i+D'2'
|
|
|
78 |
026C 6A09 CLRF main_1_i+D'3'
|
|
|
79 |
026E 0404 DECF main_1_leds1, W
|
|
|
80 |
0270 6E04 MOVWF main_1_leds1
|
|
|
81 |
0272 5004 MOVF main_1_leds1, W
|
|
|
82 |
0274 6E89 MOVWF gbl_lata
|
|
|
83 |
0276 label268438603
|
|
|
84 |
0276 5009 MOVF main_1_i+D'3', W
|
|
|
85 |
0278 0800 SUBLW 0x00
|
|
|
86 |
027A E108 BNZ label268438604
|
|
|
87 |
027C 5008 MOVF main_1_i+D'2', W
|
|
|
88 |
027E 0807 SUBLW 0x07
|
|
|
89 |
0280 E105 BNZ label268438604
|
|
|
90 |
0282 5007 MOVF main_1_i+D'1', W
|
|
|
91 |
0284 08A1 SUBLW 0xA1
|
|
|
92 |
0286 E102 BNZ label268438604
|
|
|
93 |
0288 5006 MOVF main_1_i, W
|
|
|
94 |
028A 0820 SUBLW 0x20
|
|
|
95 |
028C label268438604
|
|
|
96 |
028C E202 BC label4026532463
|
|
|
97 |
028E AE09 BTFSS main_1_i+D'3',7
|
|
|
98 |
0290 D008 BRA label268438608
|
|
|
99 |
0292 label4026532463
|
|
|
100 |
0292 2A06 INCF main_1_i, F
|
|
|
101 |
0294 B4D8 BTFSC STATUS,Z
|
|
|
102 |
0296 2A07 INCF main_1_i+D'1', F
|
|
|
103 |
0298 B4D8 BTFSC STATUS,Z
|
|
|
104 |
029A 2A08 INCF main_1_i+D'2', F
|
|
|
105 |
029C B4D8 BTFSC STATUS,Z
|
|
|
106 |
029E 2A09 INCF main_1_i+D'3', F
|
|
|
107 |
02A0 D7EA BRA label268438603
|
|
|
108 |
02A2 label268438608
|
|
|
109 |
02A2 0E11 MOVLW 0x11
|
|
|
110 |
02A4 2401 ADDWF main_1_motors, W
|
|
|
111 |
02A6 6E01 MOVWF main_1_motors
|
|
|
112 |
02A8 D023 BRA label268438619
|
|
|
113 |
02AA label268438598
|
|
|
114 |
02AA B805 BTFSC main_1_buttons,4
|
|
|
115 |
02AC D021 BRA label268438619
|
|
|
116 |
02AE 6A06 CLRF main_1_i
|
|
|
117 |
02B0 6A07 CLRF main_1_i+D'1'
|
|
|
118 |
02B2 6A08 CLRF main_1_i+D'2'
|
|
|
119 |
02B4 6A09 CLRF main_1_i+D'3'
|
|
|
120 |
02B6 2804 INCF main_1_leds1, W
|
|
|
121 |
02B8 6E04 MOVWF main_1_leds1
|
|
|
122 |
02BA 5004 MOVF main_1_leds1, W
|
|
|
123 |
02BC 6E89 MOVWF gbl_lata
|
|
|
124 |
02BE label268438624
|
|
|
125 |
02BE 5009 MOVF main_1_i+D'3', W
|
|
|
126 |
02C0 0800 SUBLW 0x00
|
|
|
127 |
02C2 E108 BNZ label268438625
|
|
|
128 |
02C4 5008 MOVF main_1_i+D'2', W
|
|
|
129 |
02C6 0807 SUBLW 0x07
|
|
|
130 |
02C8 E105 BNZ label268438625
|
|
|
131 |
02CA 5007 MOVF main_1_i+D'1', W
|
|
|
132 |
02CC 08A1 SUBLW 0xA1
|
|
|
133 |
02CE E102 BNZ label268438625
|
|
|
134 |
02D0 5006 MOVF main_1_i, W
|
|
|
135 |
02D2 0820 SUBLW 0x20
|
|
|
136 |
02D4 label268438625
|
|
|
137 |
02D4 E202 BC label4026532468
|
|
|
138 |
02D6 AE09 BTFSS main_1_i+D'3',7
|
|
|
139 |
02D8 D008 BRA label268438629
|
|
|
140 |
02DA label4026532468
|
|
|
141 |
02DA 2A06 INCF main_1_i, F
|
|
|
142 |
02DC B4D8 BTFSC STATUS,Z
|
|
|
143 |
02DE 2A07 INCF main_1_i+D'1', F
|
|
|
144 |
02E0 B4D8 BTFSC STATUS,Z
|
|
|
145 |
02E2 2A08 INCF main_1_i+D'2', F
|
|
|
146 |
02E4 B4D8 BTFSC STATUS,Z
|
|
|
147 |
02E6 2A09 INCF main_1_i+D'3', F
|
|
|
148 |
02E8 D7EA BRA label268438624
|
|
|
149 |
02EA label268438629
|
|
|
150 |
02EA 0E11 MOVLW 0x11
|
|
|
151 |
02EC 5C01 SUBWF main_1_motors, W
|
|
|
152 |
02EE 6E01 MOVWF main_1_motors
|
|
|
153 |
02F0 label268438619
|
|
|
154 |
02F0 6803 SETF main_1_leds
|
|
|
155 |
02F2 6802 SETF main_1_sensors
|
|
|
156 |
02F4 EC07F001 CALL receive_00000
|
|
|
157 |
02F8 500A MOVF CompTempVarRet489, W
|
|
|
158 |
02FA 6E02 MOVWF main_1_sensors
|
|
|
159 |
02FC B002 BTFSC main_1_sensors,0
|
|
|
160 |
02FE D003 BRA label268438643
|
|
|
161 |
0300 0EFD MOVLW 0xFD
|
|
|
162 |
0302 1403 ANDWF main_1_leds, W
|
|
|
163 |
0304 6E03 MOVWF main_1_leds
|
|
|
164 |
0306 label268438643
|
|
|
165 |
0306 B202 BTFSC main_1_sensors,1
|
|
|
166 |
0308 D003 BRA label268438646
|
|
|
167 |
030A 0EFB MOVLW 0xFB
|
|
|
168 |
030C 1403 ANDWF main_1_leds, W
|
|
|
169 |
030E 6E03 MOVWF main_1_leds
|
|
|
170 |
0310 label268438646
|
|
|
171 |
0310 B402 BTFSC main_1_sensors,2
|
|
|
172 |
0312 D003 BRA label268438649
|
|
|
173 |
0314 0EFE MOVLW 0xFE
|
|
|
174 |
0316 1403 ANDWF main_1_leds, W
|
|
|
175 |
0318 6E03 MOVWF main_1_leds
|
|
|
176 |
031A label268438649
|
|
|
177 |
031A B602 BTFSC main_1_sensors,3
|
|
|
178 |
031C D003 BRA label268438652
|
|
|
179 |
031E 0EF7 MOVLW 0xF7
|
|
|
180 |
0320 1403 ANDWF main_1_leds, W
|
|
|
181 |
0322 6E03 MOVWF main_1_leds
|
|
|
182 |
0324 label268438652
|
|
|
183 |
0324 5003 MOVF main_1_leds, W
|
|
|
184 |
0326 6E89 MOVWF gbl_lata
|
|
|
185 |
0328 5001 MOVF main_1_motors, W
|
|
|
186 |
032A 6E0A MOVWF send_00000_arg_c
|
|
|
187 |
032C EC02F001 CALL send_00000
|
|
|
188 |
0330 D796 BRA label268438595
|
|
|
189 |
0332 ; } main function end
|
|
|
190 |
|
|
|
191 |
ORG 0x00000332
|
|
|
192 |
0332 _startup
|
|
|
193 |
0332 EF10F001 GOTO main
|
|
|
194 |
ORG 0x00300000
|
|
|
195 |
300000 FEFF DW 0xFEFF
|
|
|
196 |
300002 FEF6 DW 0xFEF6
|
|
|
197 |
ORG 0x00300004
|
|
|
198 |
300004 FEFF DW 0xFEFF
|
|
|
199 |
300006 FFFB DW 0xFFFB
|
|
|
200 |
ORG 0x00300008
|
|
|
201 |
300008 3FF0 DW 0x3FF0
|
|
|
202 |
30000A 9FFF DW 0x9FFF
|
|
|
203 |
30000C BFFF DW 0xBFFF
|