Subversion Repositories svnkaklik

Rev

Rev 323 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 323 Rev 324
Line 4... Line 4...
4
;// License Type  : Pro License
4
;// License Type  : Pro License
5
;// Limitations   : PIC18 max code size:Unlimited, max RAM banks:Unlimited
5
;// Limitations   : PIC18 max code size:Unlimited, max RAM banks:Unlimited
6
;/////////////////////////////////////////////////////////////////////////////////
6
;/////////////////////////////////////////////////////////////////////////////////
7
 
7
 
8
	include "P18F252.inc"
8
	include "P18F252.inc"
9
__HEAPSTART                      EQU	0x00000007 ; Start address of heap 
9
__HEAPSTART                      EQU	0x0000000B ; Start address of heap 
10
__HEAPEND                        EQU	0x000005FF ; End address of heap 
10
__HEAPEND                        EQU	0x000005FF ; End address of heap 
11
gbl_status                       EQU	0x00000FD8 ; bytes:1
11
gbl_status                       EQU	0x00000FD8 ; bytes:1
12
gbl_prodl                        EQU	0x00000FF3 ; bytes:1
12
gbl_prodl                        EQU	0x00000FF3 ; bytes:1
13
gbl_prodh                        EQU	0x00000FF4 ; bytes:1
13
gbl_prodh                        EQU	0x00000FF4 ; bytes:1
14
gbl_porta                        EQU	0x00000F80 ; bytes:1
14
gbl_porta                        EQU	0x00000F80 ; bytes:1
Line 101... Line 101...
101
gbl_pclatu                       EQU	0x00000FFB ; bytes:1
101
gbl_pclatu                       EQU	0x00000FFB ; bytes:1
102
gbl_stkptr                       EQU	0x00000FFC ; bytes:1
102
gbl_stkptr                       EQU	0x00000FFC ; bytes:1
103
gbl_tosl                         EQU	0x00000FFD ; bytes:1
103
gbl_tosl                         EQU	0x00000FFD ; bytes:1
104
gbl_tosh                         EQU	0x00000FFE ; bytes:1
104
gbl_tosh                         EQU	0x00000FFE ; bytes:1
105
gbl_tosu                         EQU	0x00000FFF ; bytes:1
105
gbl_tosu                         EQU	0x00000FFF ; bytes:1
106
CompTempVarRet489                EQU	0x00000006 ; bytes:1
106
CompTempVarRet489                EQU	0x00000009 ; bytes:1
107
send_00000_arg_c                 EQU	0x00000006 ; bytes:1
107
send_00000_arg_c                 EQU	0x00000009 ; bytes:1
108
main_1_motors                    EQU	0x00000001 ; bytes:1
108
main_1_motors                    EQU	0x00000001 ; bytes:1
109
main_1_sensors                   EQU	0x00000002 ; bytes:1
109
main_1_sensors                   EQU	0x00000002 ; bytes:1
110
main_1_leds                      EQU	0x00000003 ; bytes:1
110
main_1_leds                      EQU	0x00000003 ; bytes:1
111
main_1_count                     EQU	0x00000004 ; bytes:1
111
main_1_count                     EQU	0x00000004 ; bytes:4
112
CompTempVar491                   EQU	0x00000005 ; bytes:1
112
CompTempVar491                   EQU	0x00000008 ; bytes:1
-
 
113
CompTempVar492                   EQU	0x00000009 ; bytes:1
-
 
114
CompTempVar496                   EQU	0x0000000A ; bytes:1
113
	ORG 0x00000200
115
	ORG 0x00000200
114
	GOTO	_startup
116
	GOTO	_startup
115
	ORG 0x00000204
117
	ORG 0x00000204
116
send_00000
118
send_00000
117
; { send ; function begin
119
; { send ; function begin
Line 174... Line 176...
174
	BRA	label268438598
176
	BRA	label268438598
175
	MOVLW 0xF0
177
	MOVLW 0xF0
176
	MOVWF main_1_leds
178
	MOVWF main_1_leds
177
	MOVLW 0x80
179
	MOVLW 0x80
178
	MOVWF main_1_count
180
	MOVWF main_1_count
-
 
181
	MOVLW 0x1A
-
 
182
	MOVWF main_1_count+D'1'
-
 
183
	MOVLW 0x06
-
 
184
	MOVWF main_1_count+D'2'
-
 
185
	CLRF main_1_count+D'3'
179
label268438603
186
label268438603
-
 
187
	MOVF main_1_count+D'3', W
-
 
188
	SUBLW 0x00
-
 
189
	BNZ	label268438604
-
 
190
	MOVF main_1_count+D'2', W
-
 
191
	SUBLW 0x00
-
 
192
	BNZ	label268438604
-
 
193
	MOVF main_1_count+D'1', W
-
 
194
	SUBLW 0x00
-
 
195
	BNZ	label268438604
180
	MOVF main_1_count, W
196
	MOVF main_1_count, W
181
	SUBLW 0x00
197
	SUBLW 0x00
-
 
198
label268438604
-
 
199
	BTFSC main_1_count+D'3',7
-
 
200
	BSF STATUS,C
182
	BC	label268438604
201
	BC	label268438608
-
 
202
	MOVLW 0x01
183
	DECF main_1_count, W
203
	SUBWF main_1_count, W
-
 
204
	MOVWF CompTempVar492
-
 
205
	MOVLW 0x00
-
 
206
	MOVWF CompTempVar496
-
 
207
	BTFSS STATUS,C
-
 
208
	INCFSZ CompTempVar496, W
-
 
209
	SUBWF main_1_count+D'1', F
-
 
210
	MOVLW 0x00
-
 
211
	MOVWF CompTempVar496
-
 
212
	BTFSS STATUS,C
-
 
213
	INCFSZ CompTempVar496, W
-
 
214
	SUBWF main_1_count+D'2', F
-
 
215
	MOVLW 0x00
-
 
216
	MOVWF CompTempVar496
-
 
217
	BTFSS STATUS,C
-
 
218
	INCFSZ CompTempVar496, W
-
 
219
	SUBWF main_1_count+D'3', F
-
 
220
	MOVF CompTempVar492, W
184
	MOVWF main_1_count
221
	MOVWF main_1_count
-
 
222
	MOVLW 0x00
-
 
223
	SUBWF main_1_count+D'3', W
-
 
224
	BNZ	label268438620
-
 
225
	MOVLW 0x04
-
 
226
	SUBWF main_1_count+D'2', W
-
 
227
	BNZ	label268438620
-
 
228
	MOVLW 0x93
-
 
229
	SUBWF main_1_count+D'1', W
-
 
230
	BNZ	label268438620
-
 
231
	MOVLW 0xE0
-
 
232
	SUBWF main_1_count, W
-
 
233
label268438620
-
 
234
	BNC	label4026532500
-
 
235
	BTFSS main_1_count+D'3',7
-
 
236
	BRA	label268438624
-
 
237
label4026532500
185
	MOVLW 0x01
238
	MOVLW 0x01
186
	IORWF main_1_leds, W
239
	IORWF main_1_leds, W
187
	MOVWF main_1_leds
240
	MOVWF main_1_leds
-
 
241
label268438624
-
 
242
	MOVLW 0x00
-
 
243
	SUBWF main_1_count+D'3', W
-
 
244
	BNZ	label268438626
-
 
245
	MOVLW 0x03
-
 
246
	SUBWF main_1_count+D'2', W
-
 
247
	BNZ	label268438626
-
 
248
	MOVLW 0x0D
-
 
249
	SUBWF main_1_count+D'1', W
-
 
250
	BNZ	label268438626
-
 
251
	MOVLW 0x40
-
 
252
	SUBWF main_1_count, W
-
 
253
label268438626
-
 
254
	BNC	label4026532501
-
 
255
	BTFSS main_1_count+D'3',7
-
 
256
	BRA	label268438630
-
 
257
label4026532501
188
	MOVLW 0x02
258
	MOVLW 0x02
189
	IORWF main_1_leds, W
259
	IORWF main_1_leds, W
190
	MOVWF main_1_leds
260
	MOVWF main_1_leds
-
 
261
label268438630
-
 
262
	MOVLW 0x00
-
 
263
	SUBWF main_1_count+D'3', W
-
 
264
	BNZ	label268438632
-
 
265
	MOVLW 0x01
-
 
266
	SUBWF main_1_count+D'2', W
-
 
267
	BNZ	label268438632
-
 
268
	MOVLW 0x86
-
 
269
	SUBWF main_1_count+D'1', W
-
 
270
	BNZ	label268438632
-
 
271
	MOVLW 0xA0
-
 
272
	SUBWF main_1_count, W
-
 
273
label268438632
-
 
274
	BNC	label4026532502
-
 
275
	BTFSS main_1_count+D'3',7
-
 
276
	BRA	label268438636
-
 
277
label4026532502
191
	MOVLW 0x04
278
	MOVLW 0x04
192
	IORWF main_1_leds, W
279
	IORWF main_1_leds, W
193
	MOVWF main_1_leds
280
	MOVWF main_1_leds
-
 
281
label268438636
194
	MOVF main_1_leds, W
282
	MOVF main_1_leds, W
195
	MOVWF gbl_lata
283
	MOVWF gbl_lata
196
	BRA	label268438603
284
	BRA	label268438603
197
label268438604
285
label268438608
198
	SETF main_1_leds
-
 
199
	SETF gbl_lata
286
	SETF gbl_lata
200
label268438619
287
label268438640
201
	SETF main_1_sensors
288
	SETF main_1_sensors
202
	CALL receive_00000
289
	CALL receive_00000
203
	MOVF CompTempVarRet489, W
290
	MOVF CompTempVarRet489, W
204
	MOVWF main_1_sensors
291
	MOVWF main_1_sensors
205
	CLRF CompTempVar491
292
	CLRF CompTempVar491
206
	BTFSS main_1_sensors,1
293
	BTFSS main_1_sensors,1
207
	BRA	label268438624
294
	BRA	label268438645
208
	BTFSS main_1_sensors,0
295
	BTFSS main_1_sensors,0
209
	BRA	label268438624
296
	BRA	label268438645
210
	INCF CompTempVar491, F
297
	INCF CompTempVar491, F
211
label268438624
298
label268438645
212
	MOVF CompTempVar491, F
299
	MOVF CompTempVar491, F
213
	BNZ	label268438625
300
	BNZ	label268438646
214
	MOVLW 0x77
301
	MOVLW 0x77
215
	MOVWF main_1_motors
302
	MOVWF main_1_motors
216
label268438625
303
label268438646
217
	BTFSC main_1_sensors,2
304
	BTFSC main_1_sensors,2
218
	BRA	label268438628
305
	BRA	label268438649
219
	MOVLW 0xF7
306
	MOVLW 0xF7
220
	MOVWF main_1_motors
307
	MOVWF main_1_motors
221
label268438628
308
label268438649
222
	BTFSC main_1_sensors,3
309
	BTFSC main_1_sensors,3
223
	BRA	label268438631
310
	BRA	label268438652
224
	MOVLW 0x7F
311
	MOVLW 0x7F
225
	MOVWF main_1_motors
312
	MOVWF main_1_motors
226
label268438631
313
label268438652
227
	MOVF main_1_sensors, W
314
	MOVF main_1_sensors, W
228
	MOVWF gbl_lata
315
	MOVWF gbl_lata
229
	MOVF main_1_motors, W
316
	MOVF main_1_motors, W
230
	MOVWF send_00000_arg_c
317
	MOVWF send_00000_arg_c
231
	CALL send_00000
318
	CALL send_00000
232
	BRA	label268438619
319
	BRA	label268438640
233
; } main function end
320
; } main function end
234
 
321
 
235
	ORG 0x000002C6
322
	ORG 0x0000035C
236
_startup
323
_startup
237
	GOTO	main
324
	GOTO	main
238
	ORG 0x00300000
325
	ORG 0x00300000
239
	DW 0xFEFF
326
	DW 0xFEFF
240
	DW 0xFEF6
327
	DW 0xFEF6