Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
2 kaklik 1
CCS PCM C Compiler, Version 3.221, 27853               20-V-05 13:52
2
 
3
               Filename: D:\KAKLIK\programy\PIC_C\roboti\merkur\PIC16F88\vystava\tank.LST
4
 
5
               ROM used: 1232 words (30%)
6
                         Largest free fragment is 2048
7
               RAM used: 65 (37%) at main() level
8
                         73 (42%) worst case
9
               Stack:    4 worst case (3 in main + 1 for interrupts)
10
 
11
*
12
0000:  MOVLW  00
13
0001:  MOVWF  0A
14
0002:  GOTO   28E
15
0003:  NOP
16
0004:  MOVWF  7F
17
0005:  SWAPF  03,W
18
0006:  CLRF   03
19
0007:  MOVWF  21
20
0008:  MOVF   7F,W
21
0009:  MOVWF  20
22
000A:  MOVF   0A,W
23
000B:  MOVWF  28
24
000C:  CLRF   0A
25
000D:  SWAPF  20,F
26
000E:  MOVF   04,W
27
000F:  MOVWF  22
28
0010:  MOVF   77,W
29
0011:  MOVWF  23
30
0012:  MOVF   78,W
31
0013:  MOVWF  24
32
0014:  MOVF   79,W
33
0015:  MOVWF  25
34
0016:  MOVF   7A,W
35
0017:  MOVWF  26
36
0018:  MOVF   7B,W
37
0019:  MOVWF  27
38
001A:  BCF    03.7
39
001B:  BCF    03.5
40
001C:  MOVLW  8C
41
001D:  MOVWF  04
42
001E:  BTFSS  00.1
43
001F:  GOTO   022
44
0020:  BTFSC  0C.1
45
0021:  GOTO   035
46
0022:  MOVF   22,W
47
0023:  MOVWF  04
48
0024:  MOVF   23,W
49
0025:  MOVWF  77
50
0026:  MOVF   24,W
51
0027:  MOVWF  78
52
0028:  MOVF   25,W
53
0029:  MOVWF  79
54
002A:  MOVF   26,W
55
002B:  MOVWF  7A
56
002C:  MOVF   27,W
57
002D:  MOVWF  7B
58
002E:  MOVF   28,W
59
002F:  MOVWF  0A
60
0030:  SWAPF  21,W
61
0031:  MOVWF  03
62
0032:  SWAPF  7F,F
63
0033:  SWAPF  7F,W
64
0034:  RETFIE
65
0035:  BCF    0A.3
66
0036:  GOTO   037
67
....................  #include "tank.h" 
68
....................  #include <16F88.h> 
69
....................  //////// Standard Header file for the PIC16F88 device ////////////////  
70
.................... #device PIC16F88  
71
.................... #list  
72
....................  
73
.................... #device adc=8  
74
.................... #fuses NOWDT,INTRC_IO, NOPUT, MCLR, NOBROWNOUT, NOLVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, NOFCMEN, NOIESO  
75
.................... #use delay(clock=4000000)  
76
*
77
0042:  MOVLW  12
78
0043:  SUBWF  63,F
79
0044:  BTFSS  03.0
80
0045:  GOTO   054
81
0046:  MOVLW  63
82
0047:  MOVWF  04
83
0048:  MOVLW  FC
84
0049:  ANDWF  00,F
85
004A:  BCF    03.0
86
004B:  RRF    00,F
87
004C:  RRF    00,F
88
004D:  MOVF   00,W
89
004E:  BTFSC  03.2
90
004F:  GOTO   054
91
0050:  GOTO   052
92
0051:  NOP
93
0052:  DECFSZ 00,F
94
0053:  GOTO   051
95
0054:  RETLW  00
96
*
97
007B:  MOVLW  5E
98
007C:  MOVWF  04
99
007D:  MOVF   00,W
100
007E:  BTFSC  03.2
101
007F:  GOTO   08F
102
0080:  MOVLW  01
103
0081:  MOVWF  78
104
0082:  CLRF   77
105
0083:  DECFSZ 77,F
106
0084:  GOTO   083
107
0085:  DECFSZ 78,F
108
0086:  GOTO   082
109
0087:  MOVLW  4A
110
0088:  MOVWF  77
111
0089:  DECFSZ 77,F
112
008A:  GOTO   089
113
008B:  NOP
114
008C:  NOP
115
008D:  DECFSZ 00,F
116
008E:  GOTO   080
117
008F:  RETLW  00
118
....................   
119
....................  
120
....................   
121
.................... unsigned int8 sensors;        // pomocna promenna pro cteni cidel na caru  
122
.................... unsigned int8 line;           // na ktere strane byla detekovana cara  
123
.................... unsigned int8 speed;          // rychlost zataceni  
124
.................... unsigned int8 last;           // kde byla cara, kdyz byly minule cidla mimo  
125
.................... unsigned int8 rovinka;        // pocitadlo pro zjisteni rovneho useku  
126
.................... int cirkus;  
127
....................   
128
.................... // Konstanty pro dynamiku pohybu  
129
.................... #define T_DIRA       120      // po jakem case zataceni se detekuje dira  
130
.................... #define FW_POMALU    170      // trochu mimo caru vnitrni pas  
131
.................... #define FW_ZATACKA   200      // rychlost vnejsiho kola pri zataceni  
132
.................... #define FW_STREDNE   190      // trochu mimo caru vnejsi pas  
133
.................... #define COUVANI      750      // couvnuti zpet na caru, po detekci diry  
134
.................... #define MAX_ROVINKA  (255-FW_STREDNE)  
135
.................... #define TRESHOLD     15        // rozhodovaci uroven komparatoru, 0xF = 0.75*Vdd  
136
.................... #define BUMPER_TRESHOLD 128  
137
....................   
138
.................... //motory            //Napred vypnout potom zapnout!  
139
.................... #define FR         output_low(PIN_B5); output_high(PIN_B4)  // Vpred  
140
.................... #define FL         output_low(PIN_B7); output_high(PIN_B6)  
141
.................... #define BR         output_low(PIN_B4); output_high(PIN_B5)  // Vzad  
142
.................... #define BL         output_low(PIN_B6); output_high(PIN_B7)  
143
.................... #define STOPR      output_low(PIN_B4);output_low(PIN_B5)    // Zastav  
144
.................... #define STOPL      output_low(PIN_B6);output_low(PIN_B7)  
145
....................   
146
.................... #define L 0b10  // left  
147
.................... #define R 0b01  // right  
148
.................... #define S 0b11  // straight  
149
....................   
150
.................... //cidla  
151
.................... #define RSENSOR    !C2OUT      // Senzory na caru  
152
.................... #define LSENSOR    !C1OUT  
153
.................... #define BUMPER     PIN_A4     // Senzor na cihlu  
154
....................   
155
.................... #define DIAG_SERVO      PIN_B3   // Propojka pro diagnosticky mod  
156
.................... #define DIAG_SENSORS    PIN_B2   // Propojka pro diagnosticky mod  
157
....................   
158
.................... #DEFINE SOUND_HI   PIN_A6     // komplementarni vystupy pro piezo pipak  
159
.................... #DEFINE SOUND_LO   PIN_A7  
160
....................   
161
.................... char AXstring[40];   // Buffer pro prenos telemetrie  
162
....................   
163
.................... // makro pro PWM  
164
.................... #define GO(motor, direction, power) if(get_timer0()<=power) \  
165
.................... {direction##motor;} else {stop##motor;}  
166
....................   
167
.................... #int_TIMER2  
168
.................... void TIMER2_isr()  
169
.................... {  
170
....................    if (speed<255) speed++;  
171
*
172
0037:  INCFSZ 2B,W
173
0038:  GOTO   03A
174
0039:  GOTO   03B
175
003A:  INCF   2B,F
176
....................    if (rovinka<MAX_ROVINKA) rovinka++;  
177
003B:  MOVF   2D,W
178
003C:  SUBLW  40
179
003D:  BTFSC  03.0
180
003E:  INCF   2D,F
181
.................... }  
182
.................... // Primitivni Pipani  
183
003F:  BCF    0C.1
184
0040:  BCF    0A.3
185
0041:  GOTO   022
186
.................... void beep(unsigned int16 period, unsigned int16 length)  
187
.................... {  
188
....................    unsigned int16 nn;  
189
....................   
190
....................    for(nn=length; nn>0; nn--)  
191
*
192
0055:  MOVF   60,W
193
0056:  MOVWF  62
194
0057:  MOVF   5F,W
195
0058:  MOVWF  61
196
0059:  MOVF   61,F
197
005A:  BTFSS  03.2
198
005B:  GOTO   05F
199
005C:  MOVF   62,F
200
005D:  BTFSC  03.2
201
005E:  GOTO   07A
202
....................    {  
203
....................      output_high(SOUND_HI);output_low(SOUND_LO);  
204
005F:  BSF    03.5
205
0060:  BCF    05.6
206
0061:  BCF    03.5
207
0062:  BSF    05.6
208
0063:  BSF    03.5
209
0064:  BCF    05.7
210
0065:  BCF    03.5
211
0066:  BCF    05.7
212
....................      delay_us(period);  
213
0067:  MOVF   5D,W
214
0068:  MOVWF  63
215
0069:  CALL   042
216
....................      output_high(SOUND_LO);output_low(SOUND_HI);  
217
006A:  BSF    03.5
218
006B:  BCF    05.7
219
006C:  BCF    03.5
220
006D:  BSF    05.7
221
006E:  BSF    03.5
222
006F:  BCF    05.6
223
0070:  BCF    03.5
224
0071:  BCF    05.6
225
....................      delay_us(period);  
226
0072:  MOVF   5D,W
227
0073:  MOVWF  63
228
0074:  CALL   042
229
....................    }  
230
0075:  MOVF   61,W
231
0076:  BTFSC  03.2
232
0077:  DECF   62,F
233
0078:  DECF   61,F
234
0079:  GOTO   059
235
.................... }  
236
007A:  RETLW  00
237
.................... /******************************************************************************/  
238
.................... void diagnostika()  
239
.................... {  
240
....................    unsigned int16 n;  
241
....................   
242
....................    while (input(DIAG_SERVO))   // Propojka, ktera spousti diagnostiku  
243
....................    {  
244
*
245
0090:  BSF    03.5
246
0091:  BSF    06.3
247
0092:  BCF    03.5
248
0093:  BTFSS  06.3
249
0094:  GOTO   1BB
250
....................       for (n=500; n<800; n+=100)  
251
0095:  MOVLW  01
252
0096:  MOVWF  5C
253
0097:  MOVLW  F4
254
0098:  MOVWF  5B
255
0099:  MOVF   5C,W
256
009A:  SUBLW  03
257
009B:  BTFSS  03.0
258
009C:  GOTO   0B1
259
009D:  BTFSS  03.2
260
009E:  GOTO   0A3
261
009F:  MOVF   5B,W
262
00A0:  SUBLW  1F
263
00A1:  BTFSS  03.0
264
00A2:  GOTO   0B1
265
....................       {  
266
....................          beep(n,n); //beep UP  
267
00A3:  MOVF   5C,W
268
00A4:  MOVWF  5E
269
00A5:  MOVF   5B,W
270
00A6:  MOVWF  5D
271
00A7:  MOVF   5C,W
272
00A8:  MOVWF  60
273
00A9:  MOVF   5B,W
274
00AA:  MOVWF  5F
275
00AB:  CALL   055
276
....................       };  
277
00AC:  MOVLW  64
278
00AD:  ADDWF  5B,F
279
00AE:  BTFSC  03.0
280
00AF:  INCF   5C,F
281
00B0:  GOTO   099
282
....................       Delay_ms(1000);  
283
00B1:  MOVLW  04
284
00B2:  MOVWF  5D
285
00B3:  MOVLW  FA
286
00B4:  MOVWF  5E
287
00B5:  CALL   07B
288
00B6:  DECFSZ 5D,F
289
00B7:  GOTO   0B3
290
....................       //zastav vse  
291
....................       STOPL; STOPR;  
292
00B8:  BSF    03.5
293
00B9:  BCF    06.6
294
00BA:  BCF    03.5
295
00BB:  BCF    06.6
296
00BC:  BSF    03.5
297
00BD:  BCF    06.7
298
00BE:  BCF    03.5
299
00BF:  BCF    06.7
300
00C0:  BSF    03.5
301
00C1:  BCF    06.4
302
00C2:  BCF    03.5
303
00C3:  BCF    06.4
304
00C4:  BSF    03.5
305
00C5:  BCF    06.5
306
00C6:  BCF    03.5
307
00C7:  BCF    06.5
308
....................       //pravy pas  
309
....................       FR; Delay_ms(1000); STOPR; Delay_ms(1000);  
310
00C8:  BSF    03.5
311
00C9:  BCF    06.5
312
00CA:  BCF    03.5
313
00CB:  BCF    06.5
314
00CC:  BSF    03.5
315
00CD:  BCF    06.4
316
00CE:  BCF    03.5
317
00CF:  BSF    06.4
318
00D0:  MOVLW  04
319
00D1:  MOVWF  5D
320
00D2:  MOVLW  FA
321
00D3:  MOVWF  5E
322
00D4:  CALL   07B
323
00D5:  DECFSZ 5D,F
324
00D6:  GOTO   0D2
325
00D7:  BSF    03.5
326
00D8:  BCF    06.4
327
00D9:  BCF    03.5
328
00DA:  BCF    06.4
329
00DB:  BSF    03.5
330
00DC:  BCF    06.5
331
00DD:  BCF    03.5
332
00DE:  BCF    06.5
333
00DF:  MOVLW  04
334
00E0:  MOVWF  5D
335
00E1:  MOVLW  FA
336
00E2:  MOVWF  5E
337
00E3:  CALL   07B
338
00E4:  DECFSZ 5D,F
339
00E5:  GOTO   0E1
340
....................       BR; Delay_ms(1000); STOPR; Delay_ms(1000);  
341
00E6:  BSF    03.5
342
00E7:  BCF    06.4
343
00E8:  BCF    03.5
344
00E9:  BCF    06.4
345
00EA:  BSF    03.5
346
00EB:  BCF    06.5
347
00EC:  BCF    03.5
348
00ED:  BSF    06.5
349
00EE:  MOVLW  04
350
00EF:  MOVWF  5D
351
00F0:  MOVLW  FA
352
00F1:  MOVWF  5E
353
00F2:  CALL   07B
354
00F3:  DECFSZ 5D,F
355
00F4:  GOTO   0F0
356
00F5:  BSF    03.5
357
00F6:  BCF    06.4
358
00F7:  BCF    03.5
359
00F8:  BCF    06.4
360
00F9:  BSF    03.5
361
00FA:  BCF    06.5
362
00FB:  BCF    03.5
363
00FC:  BCF    06.5
364
00FD:  MOVLW  04
365
00FE:  MOVWF  5D
366
00FF:  MOVLW  FA
367
0100:  MOVWF  5E
368
0101:  CALL   07B
369
0102:  DECFSZ 5D,F
370
0103:  GOTO   0FF
371
....................       Beep(880,100); Delay_ms(1000);  
372
0104:  MOVLW  03
373
0105:  MOVWF  5E
374
0106:  MOVLW  70
375
0107:  MOVWF  5D
376
0108:  CLRF   60
377
0109:  MOVLW  64
378
010A:  MOVWF  5F
379
010B:  CALL   055
380
010C:  MOVLW  04
381
010D:  MOVWF  5D
382
010E:  MOVLW  FA
383
010F:  MOVWF  5E
384
0110:  CALL   07B
385
0111:  DECFSZ 5D,F
386
0112:  GOTO   10E
387
....................       //levy pas  
388
....................       FL; Delay_ms(1000); STOPL; Delay_ms(1000);  
389
0113:  BSF    03.5
390
0114:  BCF    06.7
391
0115:  BCF    03.5
392
0116:  BCF    06.7
393
0117:  BSF    03.5
394
0118:  BCF    06.6
395
0119:  BCF    03.5
396
011A:  BSF    06.6
397
011B:  MOVLW  04
398
011C:  MOVWF  5D
399
011D:  MOVLW  FA
400
011E:  MOVWF  5E
401
011F:  CALL   07B
402
0120:  DECFSZ 5D,F
403
0121:  GOTO   11D
404
0122:  BSF    03.5
405
0123:  BCF    06.6
406
0124:  BCF    03.5
407
0125:  BCF    06.6
408
0126:  BSF    03.5
409
0127:  BCF    06.7
410
0128:  BCF    03.5
411
0129:  BCF    06.7
412
012A:  MOVLW  04
413
012B:  MOVWF  5D
414
012C:  MOVLW  FA
415
012D:  MOVWF  5E
416
012E:  CALL   07B
417
012F:  DECFSZ 5D,F
418
0130:  GOTO   12C
419
....................       BL; Delay_ms(1000); STOPL; Delay_ms(1000);  
420
0131:  BSF    03.5
421
0132:  BCF    06.6
422
0133:  BCF    03.5
423
0134:  BCF    06.6
424
0135:  BSF    03.5
425
0136:  BCF    06.7
426
0137:  BCF    03.5
427
0138:  BSF    06.7
428
0139:  MOVLW  04
429
013A:  MOVWF  5D
430
013B:  MOVLW  FA
431
013C:  MOVWF  5E
432
013D:  CALL   07B
433
013E:  DECFSZ 5D,F
434
013F:  GOTO   13B
435
0140:  BSF    03.5
436
0141:  BCF    06.6
437
0142:  BCF    03.5
438
0143:  BCF    06.6
439
0144:  BSF    03.5
440
0145:  BCF    06.7
441
0146:  BCF    03.5
442
0147:  BCF    06.7
443
0148:  MOVLW  04
444
0149:  MOVWF  5D
445
014A:  MOVLW  FA
446
014B:  MOVWF  5E
447
014C:  CALL   07B
448
014D:  DECFSZ 5D,F
449
014E:  GOTO   14A
450
....................       Beep(880,100); Delay_ms(1000);  
451
014F:  MOVLW  03
452
0150:  MOVWF  5E
453
0151:  MOVLW  70
454
0152:  MOVWF  5D
455
0153:  CLRF   60
456
0154:  MOVLW  64
457
0155:  MOVWF  5F
458
0156:  CALL   055
459
0157:  MOVLW  04
460
0158:  MOVWF  5D
461
0159:  MOVLW  FA
462
015A:  MOVWF  5E
463
015B:  CALL   07B
464
015C:  DECFSZ 5D,F
465
015D:  GOTO   159
466
....................       //oba pasy  
467
....................       FL; FR; Delay_ms(1000); STOPL; STOPR; Delay_ms(1000);  
468
015E:  BSF    03.5
469
015F:  BCF    06.7
470
0160:  BCF    03.5
471
0161:  BCF    06.7
472
0162:  BSF    03.5
473
0163:  BCF    06.6
474
0164:  BCF    03.5
475
0165:  BSF    06.6
476
0166:  BSF    03.5
477
0167:  BCF    06.5
478
0168:  BCF    03.5
479
0169:  BCF    06.5
480
016A:  BSF    03.5
481
016B:  BCF    06.4
482
016C:  BCF    03.5
483
016D:  BSF    06.4
484
016E:  MOVLW  04
485
016F:  MOVWF  5D
486
0170:  MOVLW  FA
487
0171:  MOVWF  5E
488
0172:  CALL   07B
489
0173:  DECFSZ 5D,F
490
0174:  GOTO   170
491
0175:  BSF    03.5
492
0176:  BCF    06.6
493
0177:  BCF    03.5
494
0178:  BCF    06.6
495
0179:  BSF    03.5
496
017A:  BCF    06.7
497
017B:  BCF    03.5
498
017C:  BCF    06.7
499
017D:  BSF    03.5
500
017E:  BCF    06.4
501
017F:  BCF    03.5
502
0180:  BCF    06.4
503
0181:  BSF    03.5
504
0182:  BCF    06.5
505
0183:  BCF    03.5
506
0184:  BCF    06.5
507
0185:  MOVLW  04
508
0186:  MOVWF  5D
509
0187:  MOVLW  FA
510
0188:  MOVWF  5E
511
0189:  CALL   07B
512
018A:  DECFSZ 5D,F
513
018B:  GOTO   187
514
....................       BL; BR; Delay_ms(1000); STOPL; STOPR; Delay_ms(1000);  
515
018C:  BSF    03.5
516
018D:  BCF    06.6
517
018E:  BCF    03.5
518
018F:  BCF    06.6
519
0190:  BSF    03.5
520
0191:  BCF    06.7
521
0192:  BCF    03.5
522
0193:  BSF    06.7
523
0194:  BSF    03.5
524
0195:  BCF    06.4
525
0196:  BCF    03.5
526
0197:  BCF    06.4
527
0198:  BSF    03.5
528
0199:  BCF    06.5
529
019A:  BCF    03.5
530
019B:  BSF    06.5
531
019C:  MOVLW  04
532
019D:  MOVWF  5D
533
019E:  MOVLW  FA
534
019F:  MOVWF  5E
535
01A0:  CALL   07B
536
01A1:  DECFSZ 5D,F
537
01A2:  GOTO   19E
538
01A3:  BSF    03.5
539
01A4:  BCF    06.6
540
01A5:  BCF    03.5
541
01A6:  BCF    06.6
542
01A7:  BSF    03.5
543
01A8:  BCF    06.7
544
01A9:  BCF    03.5
545
01AA:  BCF    06.7
546
01AB:  BSF    03.5
547
01AC:  BCF    06.4
548
01AD:  BCF    03.5
549
01AE:  BCF    06.4
550
01AF:  BSF    03.5
551
01B0:  BCF    06.5
552
01B1:  BCF    03.5
553
01B2:  BCF    06.5
554
01B3:  MOVLW  04
555
01B4:  MOVWF  5D
556
01B5:  MOVLW  FA
557
01B6:  MOVWF  5E
558
01B7:  CALL   07B
559
01B8:  DECFSZ 5D,F
560
01B9:  GOTO   1B5
561
....................    };  
562
01BA:  GOTO   090
563
....................    while (input(DIAG_SENSORS))         // spusteni diagnostiky cidel  
564
....................    {  
565
01BB:  BSF    03.5
566
01BC:  BSF    06.2
567
01BD:  BCF    03.5
568
01BE:  BTFSS  06.2
569
01BF:  GOTO   1EE
570
....................       if (RSENSOR) beep(1000,1000);  
571
01C0:  BSF    03.5
572
01C1:  BTFSC  1C.7
573
01C2:  GOTO   1CE
574
01C3:  MOVLW  03
575
01C4:  BCF    03.5
576
01C5:  MOVWF  5E
577
01C6:  MOVLW  E8
578
01C7:  MOVWF  5D
579
01C8:  MOVLW  03
580
01C9:  MOVWF  60
581
01CA:  MOVLW  E8
582
01CB:  MOVWF  5F
583
01CC:  CALL   055
584
01CD:  BSF    03.5
585
....................       if (LSENSOR) beep(2000,2000);  
586
01CE:  BTFSC  1C.6
587
01CF:  GOTO   1DB
588
01D0:  MOVLW  07
589
01D1:  BCF    03.5
590
01D2:  MOVWF  5E
591
01D3:  MOVLW  D0
592
01D4:  MOVWF  5D
593
01D5:  MOVLW  07
594
01D6:  MOVWF  60
595
01D7:  MOVLW  D0
596
01D8:  MOVWF  5F
597
01D9:  CALL   055
598
01DA:  BSF    03.5
599
....................       if ((read_adc(ADC_READ_ONLY)<BUMPER_TRESHOLD)) beep(3000,3000);  
600
01DB:  BCF    03.5
601
01DC:  BTFSS  1F.2
602
01DD:  GOTO   1E0
603
01DE:  BSF    03.5
604
01DF:  GOTO   1DB
605
01E0:  MOVF   1E,W
606
01E1:  SUBLW  7F
607
01E2:  BTFSS  03.0
608
01E3:  GOTO   1ED
609
01E4:  MOVLW  0B
610
01E5:  MOVWF  5E
611
01E6:  MOVLW  B8
612
01E7:  MOVWF  5D
613
01E8:  MOVLW  0B
614
01E9:  MOVWF  60
615
01EA:  MOVLW  B8
616
01EB:  MOVWF  5F
617
01EC:  CALL   055
618
....................    };  
619
01ED:  GOTO   1BB
620
.................... }  
621
01EE:  BCF    0A.3
622
01EF:  GOTO   31F (RETURN)
623
.................... ///////////////////////////////////////////////////////////////////////////////  
624
.................... void OtocSe()                     // otoci se zpet, kdyz je prekazka  
625
.................... {  
626
.................... unsigned int16 n;  
627
....................   
628
.................... 	BR;BL;  
629
01F0:  BSF    03.5
630
01F1:  BCF    06.4
631
01F2:  BCF    03.5
632
01F3:  BCF    06.4
633
01F4:  BSF    03.5
634
01F5:  BCF    06.5
635
01F6:  BCF    03.5
636
01F7:  BSF    06.5
637
01F8:  BSF    03.5
638
01F9:  BCF    06.6
639
01FA:  BCF    03.5
640
01FB:  BCF    06.6
641
01FC:  BSF    03.5
642
01FD:  BCF    06.7
643
01FE:  BCF    03.5
644
01FF:  BSF    06.7
645
.................... 	beep(800,400);  
646
0200:  MOVLW  03
647
0201:  MOVWF  5E
648
0202:  MOVLW  20
649
0203:  MOVWF  5D
650
0204:  MOVLW  01
651
0205:  MOVWF  60
652
0206:  MOVLW  90
653
0207:  MOVWF  5F
654
0208:  CALL   055
655
.................... 	beep(2000,1000);  
656
0209:  MOVLW  07
657
020A:  MOVWF  5E
658
020B:  MOVLW  D0
659
020C:  MOVWF  5D
660
020D:  MOVLW  03
661
020E:  MOVWF  60
662
020F:  MOVLW  E8
663
0210:  MOVWF  5F
664
0211:  CALL   055
665
.................... 	beep(900,400);  
666
0212:  MOVLW  03
667
0213:  MOVWF  5E
668
0214:  MOVLW  84
669
0215:  MOVWF  5D
670
0216:  MOVLW  01
671
0217:  MOVWF  60
672
0218:  MOVLW  90
673
0219:  MOVWF  5F
674
021A:  CALL   055
675
....................   
676
....................    BR; FL; Delay_ms(50);           // otoc se 30° do prava  
677
021B:  BSF    03.5
678
021C:  BCF    06.4
679
021D:  BCF    03.5
680
021E:  BCF    06.4
681
021F:  BSF    03.5
682
0220:  BCF    06.5
683
0221:  BCF    03.5
684
0222:  BSF    06.5
685
0223:  BSF    03.5
686
0224:  BCF    06.7
687
0225:  BCF    03.5
688
0226:  BCF    06.7
689
0227:  BSF    03.5
690
0228:  BCF    06.6
691
0229:  BCF    03.5
692
022A:  BSF    06.6
693
022B:  MOVLW  32
694
022C:  MOVWF  5E
695
022D:  CALL   07B
696
....................    STOPL; STOPR;  
697
022E:  BSF    03.5
698
022F:  BCF    06.6
699
0230:  BCF    03.5
700
0231:  BCF    06.6
701
0232:  BSF    03.5
702
0233:  BCF    06.7
703
0234:  BCF    03.5
704
0235:  BCF    06.7
705
0236:  BSF    03.5
706
0237:  BCF    06.4
707
0238:  BCF    03.5
708
0239:  BCF    06.4
709
023A:  BSF    03.5
710
023B:  BCF    06.5
711
023C:  BCF    03.5
712
023D:  BCF    06.5
713
....................    beep(1000,1000);  
714
023E:  MOVLW  03
715
023F:  MOVWF  5E
716
0240:  MOVLW  E8
717
0241:  MOVWF  5D
718
0242:  MOVLW  03
719
0243:  MOVWF  60
720
0244:  MOVLW  E8
721
0245:  MOVWF  5F
722
0246:  CALL   055
723
....................   
724
....................    BR; FL;  
725
0247:  BSF    03.5
726
0248:  BCF    06.4
727
0249:  BCF    03.5
728
024A:  BCF    06.4
729
024B:  BSF    03.5
730
024C:  BCF    06.5
731
024D:  BCF    03.5
732
024E:  BSF    06.5
733
024F:  BSF    03.5
734
0250:  BCF    06.7
735
0251:  BCF    03.5
736
0252:  BCF    06.7
737
0253:  BSF    03.5
738
0254:  BCF    06.6
739
0255:  BCF    03.5
740
0256:  BSF    06.6
741
....................    for(n=40000;n>0;n--)               // toc se, dokud nenarazis na caru  
742
0257:  MOVLW  9C
743
0258:  MOVWF  5C
744
0259:  MOVLW  40
745
025A:  MOVWF  5B
746
025B:  MOVF   5B,F
747
025C:  BTFSS  03.2
748
025D:  GOTO   261
749
025E:  MOVF   5C,F
750
025F:  BTFSC  03.2
751
0260:  GOTO   279
752
....................    {  
753
....................       line = RSENSOR;         // cteni senzoru na caru  
754
0261:  CLRF   2A
755
0262:  BSF    03.5
756
0263:  BTFSC  1C.7
757
0264:  GOTO   268
758
0265:  BCF    03.5
759
0266:  INCF   2A,F
760
0267:  BSF    03.5
761
....................       line |= LSENSOR << 1;  
762
0268:  MOVLW  00
763
0269:  BTFSS  1C.6
764
026A:  MOVLW  01
765
026B:  MOVWF  77
766
026C:  BCF    03.0
767
026D:  RLF    77,F
768
026E:  MOVF   77,W
769
026F:  BCF    03.5
770
0270:  IORWF  2A,F
771
....................       if (line!=0) break;  
772
0271:  MOVF   2A,F
773
0272:  BTFSS  03.2
774
0273:  GOTO   279
775
....................    }  
776
0274:  MOVF   5B,W
777
0275:  BTFSC  03.2
778
0276:  DECF   5C,F
779
0277:  DECF   5B,F
780
0278:  GOTO   25B
781
....................    STOPR; STOPL;  
782
0279:  BSF    03.5
783
027A:  BCF    06.4
784
027B:  BCF    03.5
785
027C:  BCF    06.4
786
027D:  BSF    03.5
787
027E:  BCF    06.5
788
027F:  BCF    03.5
789
0280:  BCF    06.5
790
0281:  BSF    03.5
791
0282:  BCF    06.6
792
0283:  BCF    03.5
793
0284:  BCF    06.6
794
0285:  BSF    03.5
795
0286:  BCF    06.7
796
0287:  BCF    03.5
797
0288:  BCF    06.7
798
....................   
799
....................    line=L; // caru jsme prejeli, tak je vlevo  
800
0289:  MOVLW  02
801
028A:  MOVWF  2A
802
....................    cirkus=0;  
803
028B:  CLRF   2E
804
.................... }  
805
028C:  BCF    0A.3
806
028D:  GOTO   34B (RETURN)
807
....................   
808
....................   
809
.................... void main()  
810
.................... {  
811
028E:  CLRF   04
812
028F:  MOVLW  1F
813
0290:  ANDWF  03,F
814
0291:  BSF    03.5
815
0292:  BCF    1F.4
816
0293:  BCF    1F.5
817
0294:  MOVF   1B,W
818
0295:  ANDLW  80
819
0296:  MOVWF  1B
820
0297:  MOVLW  07
821
0298:  MOVWF  1C
822
0299:  MOVF   1C,W
823
029A:  BCF    03.5
824
029B:  BCF    0D.6
825
029C:  MOVLW  60
826
029D:  BSF    03.5
827
029E:  MOVWF  0F
828
....................    unsigned int16 n; // pro FOR  
829
....................    unsigned int16 i;  
830
....................   
831
....................    STOPL; STOPR;     // prepne vystupy na ovladani motoru na output a zastavi  
832
029F:  BCF    06.6
833
02A0:  BCF    03.5
834
02A1:  BCF    06.6
835
02A2:  BSF    03.5
836
02A3:  BCF    06.7
837
02A4:  BCF    03.5
838
02A5:  BCF    06.7
839
02A6:  BSF    03.5
840
02A7:  BCF    06.4
841
02A8:  BCF    03.5
842
02A9:  BCF    06.4
843
02AA:  BSF    03.5
844
02AB:  BCF    06.5
845
02AC:  BCF    03.5
846
02AD:  BCF    06.5
847
....................   
848
....................    setup_oscillator(OSC_4MHZ|OSC_INTRC);     // 4 MHz interni RC oscilator  
849
02AE:  MOVLW  62
850
02AF:  BSF    03.5
851
02B0:  MOVWF  0F
852
....................   
853
....................    port_b_pullups(TRUE);      // pullups pro piano na diagnostiku  
854
02B1:  BCF    01.7
855
....................    setup_spi(FALSE);  
856
02B2:  BCF    03.5
857
02B3:  BCF    14.5
858
02B4:  BSF    03.5
859
02B5:  BCF    06.2
860
02B6:  BSF    06.1
861
02B7:  BCF    06.4
862
02B8:  MOVLW  00
863
02B9:  BCF    03.5
864
02BA:  MOVWF  14
865
02BB:  BSF    03.5
866
02BC:  MOVWF  14
867
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);  // Casovac pro PWM  
868
02BD:  MOVF   01,W
869
02BE:  ANDLW  C7
870
02BF:  IORLW  08
871
02C0:  MOVWF  01
872
....................   
873
....................    setup_timer_2(T2_DIV_BY_4,255,10);    // Casovac pro regulaci  
874
02C1:  MOVLW  48
875
02C2:  MOVWF  78
876
02C3:  IORLW  05
877
02C4:  BCF    03.5
878
02C5:  MOVWF  12
879
02C6:  MOVLW  FF
880
02C7:  BSF    03.5
881
02C8:  MOVWF  12
882
....................                                          // preruseni kazdych 10ms  
883
....................    setup_adc_ports(sAN2|VSS_VDD);      // nastaveni A/D prevodniku pro naraznik  
884
02C9:  BCF    1F.4
885
02CA:  BCF    1F.5
886
02CB:  MOVF   1B,W
887
02CC:  ANDLW  80
888
02CD:  IORLW  04
889
02CE:  MOVWF  1B
890
....................    setup_adc(ADC_CLOCK_INTERNAL);  
891
02CF:  BCF    1F.6
892
02D0:  BCF    03.5
893
02D1:  BSF    1F.6
894
02D2:  BSF    1F.7
895
02D3:  BSF    03.5
896
02D4:  BCF    1F.7
897
02D5:  BCF    03.5
898
02D6:  BSF    1F.0
899
....................    set_adc_channel(2);  
900
02D7:  MOVLW  10
901
02D8:  MOVWF  78
902
02D9:  MOVF   1F,W
903
02DA:  ANDLW  C7
904
02DB:  IORWF  78,W
905
02DC:  MOVWF  1F
906
....................    setup_timer_1(T1_INTERNAL|T1_DIV_BY_1);   // Casovac pro naraznik  
907
02DD:  MOVLW  85
908
02DE:  MOVWF  10
909
....................    setup_ccp1(CCP_COMPARE_RESET_TIMER);  
910
02DF:  BSF    03.5
911
02E0:  BSF    06.3
912
02E1:  MOVLW  0B
913
02E2:  BCF    03.5
914
02E3:  MOVWF  17
915
....................    CCP_1=(2^10)-1;                        // prevod kazdou 1ms  
916
02E4:  CLRF   16
917
02E5:  MOVLW  07
918
02E6:  MOVWF  15
919
....................   
920
....................    setup_comparator(A0_VR_A1_VR);   // inicializace komparatoru pro cidla cary  
921
02E7:  MOVLW  02
922
02E8:  BSF    03.5
923
02E9:  MOVWF  1C
924
02EA:  MOVF   05,W
925
02EB:  IORLW  03
926
02EC:  MOVWF  05
927
02ED:  MOVLW  03
928
02EE:  MOVWF  77
929
02EF:  DECFSZ 77,F
930
02F0:  GOTO   2EF
931
02F1:  MOVF   1C,W
932
02F2:  BCF    03.5
933
02F3:  BCF    0D.6
934
....................    setup_vref(VREF_HIGH|TRESHOLD);        // 32 kroku od 0.25 do 0.75 Vdd  
935
02F4:  MOVLW  8F
936
02F5:  BSF    03.5
937
02F6:  MOVWF  1D
938
....................   
939
....................    Beep(1000,200);     //double beep  
940
02F7:  MOVLW  03
941
02F8:  BCF    03.5
942
02F9:  MOVWF  5E
943
02FA:  MOVLW  E8
944
02FB:  MOVWF  5D
945
02FC:  CLRF   60
946
02FD:  MOVLW  C8
947
02FE:  MOVWF  5F
948
02FF:  CALL   055
949
....................    Delay_ms(50);  
950
0300:  MOVLW  32
951
0301:  MOVWF  5E
952
0302:  CALL   07B
953
....................    Beep(1000,200);  
954
0303:  MOVLW  03
955
0304:  MOVWF  5E
956
0305:  MOVLW  E8
957
0306:  MOVWF  5D
958
0307:  CLRF   60
959
0308:  MOVLW  C8
960
0309:  MOVWF  5F
961
030A:  CALL   055
962
....................    Delay_ms(1000);      // 1s  
963
030B:  MOVLW  04
964
030C:  MOVWF  5B
965
030D:  MOVLW  FA
966
030E:  MOVWF  5E
967
030F:  CALL   07B
968
0310:  DECFSZ 5B,F
969
0311:  GOTO   30D
970
....................   
971
....................    // povoleni rizeni rychlosti zataceni pres preruseni  
972
....................    enable_interrupts(INT_TIMER2);  
973
0312:  BSF    03.5
974
0313:  BSF    0C.1
975
....................    enable_interrupts(GLOBAL);  
976
0314:  MOVLW  C0
977
0315:  BCF    03.5
978
0316:  IORWF  0B,F
979
....................   
980
.................... /*---------------------------------------------------------------------------*/  
981
....................    sensors=S;  
982
0317:  MOVLW  03
983
0318:  MOVWF  29
984
....................    line=S;  
985
0319:  MOVWF  2A
986
....................    last=S;  
987
031A:  MOVWF  2C
988
....................    cirkus=0;  
989
031B:  CLRF   2E
990
.................... //   movement=S;  
991
....................    speed=FW_POMALU;  
992
031C:  MOVLW  AA
993
031D:  MOVWF  2B
994
....................   
995
....................    diagnostika();  
996
031E:  GOTO   090
997
....................    Delay_ms(500);  
998
031F:  MOVLW  02
999
0320:  MOVWF  5B
1000
0321:  MOVLW  FA
1001
0322:  MOVWF  5E
1002
0323:  CALL   07B
1003
0324:  DECFSZ 5B,F
1004
0325:  GOTO   321
1005
....................    Beep(1000,200);  
1006
0326:  MOVLW  03
1007
0327:  MOVWF  5E
1008
0328:  MOVLW  E8
1009
0329:  MOVWF  5D
1010
032A:  CLRF   60
1011
032B:  MOVLW  C8
1012
032C:  MOVWF  5F
1013
032D:  CALL   055
1014
....................    Delay_ms(500);  
1015
032E:  MOVLW  02
1016
032F:  MOVWF  5B
1017
0330:  MOVLW  FA
1018
0331:  MOVWF  5E
1019
0332:  CALL   07B
1020
0333:  DECFSZ 5B,F
1021
0334:  GOTO   330
1022
....................   
1023
....................    while(true)       // hlavni smycka (jizda podle cary)  
1024
....................    {  
1025
....................       sensors = RSENSOR;         // cteni senzoru na caru  
1026
0335:  CLRF   29
1027
0336:  BSF    03.5
1028
0337:  BTFSC  1C.7
1029
0338:  GOTO   33C
1030
0339:  BCF    03.5
1031
033A:  INCF   29,F
1032
033B:  BSF    03.5
1033
....................       sensors |= LSENSOR << 1;  
1034
033C:  MOVLW  00
1035
033D:  BTFSS  1C.6
1036
033E:  MOVLW  01
1037
033F:  MOVWF  77
1038
0340:  BCF    03.0
1039
0341:  RLF    77,F
1040
0342:  MOVF   77,W
1041
0343:  BCF    03.5
1042
0344:  IORWF  29,F
1043
....................   
1044
....................       if (read_adc(ADC_READ_ONLY)<BUMPER_TRESHOLD) OtocSe();  
1045
0345:  BTFSC  1F.2
1046
0346:  GOTO   345
1047
0347:  MOVF   1E,W
1048
0348:  SUBLW  7F
1049
0349:  BTFSC  03.0
1050
034A:  GOTO   1F0
1051
....................   
1052
....................       switch (sensors)  // zatacej podle toho, kde vidis caru  
1053
....................       {  
1054
034B:  MOVF   29,W
1055
034C:  XORLW  03
1056
034D:  BTFSC  03.2
1057
034E:  GOTO   356
1058
034F:  XORLW  01
1059
0350:  BTFSC  03.2
1060
0351:  GOTO   38B
1061
0352:  XORLW  03
1062
0353:  BTFSC  03.2
1063
0354:  GOTO   3C2
1064
0355:  GOTO   3F9
1065
....................          case S:                          // rovne  
1066
....................             GO(L, F, FW_STREDNE+rovinka); GO(R, F, FW_STREDNE+rovinka);  
1067
0356:  MOVF   01,W
1068
0357:  MOVWF  5B
1069
0358:  MOVLW  BE
1070
0359:  ADDWF  2D,W
1071
035A:  SUBWF  5B,W
1072
035B:  BTFSC  03.2
1073
035C:  GOTO   35F
1074
035D:  BTFSC  03.0
1075
035E:  GOTO   368
1076
035F:  BSF    03.5
1077
0360:  BCF    06.7
1078
0361:  BCF    03.5
1079
0362:  BCF    06.7
1080
0363:  BSF    03.5
1081
0364:  BCF    06.6
1082
0365:  BCF    03.5
1083
0366:  BSF    06.6
1084
0367:  GOTO   370
1085
0368:  BSF    03.5
1086
0369:  BCF    06.6
1087
036A:  BCF    03.5
1088
036B:  BCF    06.6
1089
036C:  BSF    03.5
1090
036D:  BCF    06.7
1091
036E:  BCF    03.5
1092
036F:  BCF    06.7
1093
0370:  MOVF   01,W
1094
0371:  MOVWF  5B
1095
0372:  MOVLW  BE
1096
0373:  ADDWF  2D,W
1097
0374:  SUBWF  5B,W
1098
0375:  BTFSC  03.2
1099
0376:  GOTO   379
1100
0377:  BTFSC  03.0
1101
0378:  GOTO   382
1102
0379:  BSF    03.5
1103
037A:  BCF    06.5
1104
037B:  BCF    03.5
1105
037C:  BCF    06.5
1106
037D:  BSF    03.5
1107
037E:  BCF    06.4
1108
037F:  BCF    03.5
1109
0380:  BSF    06.4
1110
0381:  GOTO   38A
1111
0382:  BSF    03.5
1112
0383:  BCF    06.4
1113
0384:  BCF    03.5
1114
0385:  BCF    06.4
1115
0386:  BSF    03.5
1116
0387:  BCF    06.5
1117
0388:  BCF    03.5
1118
0389:  BCF    06.5
1119
....................             continue;  
1120
038A:  GOTO   335
1121
....................          case L:                          // trochu vlevo  
1122
....................             GO(L, F, FW_POMALU+rovinka); GO(R, F, FW_STREDNE+rovinka);  
1123
038B:  MOVF   01,W
1124
038C:  MOVWF  5B
1125
038D:  MOVLW  AA
1126
038E:  ADDWF  2D,W
1127
038F:  SUBWF  5B,W
1128
0390:  BTFSC  03.2
1129
0391:  GOTO   394
1130
0392:  BTFSC  03.0
1131
0393:  GOTO   39D
1132
0394:  BSF    03.5
1133
0395:  BCF    06.7
1134
0396:  BCF    03.5
1135
0397:  BCF    06.7
1136
0398:  BSF    03.5
1137
0399:  BCF    06.6
1138
039A:  BCF    03.5
1139
039B:  BSF    06.6
1140
039C:  GOTO   3A5
1141
039D:  BSF    03.5
1142
039E:  BCF    06.6
1143
039F:  BCF    03.5
1144
03A0:  BCF    06.6
1145
03A1:  BSF    03.5
1146
03A2:  BCF    06.7
1147
03A3:  BCF    03.5
1148
03A4:  BCF    06.7
1149
03A5:  MOVF   01,W
1150
03A6:  MOVWF  5B
1151
03A7:  MOVLW  BE
1152
03A8:  ADDWF  2D,W
1153
03A9:  SUBWF  5B,W
1154
03AA:  BTFSC  03.2
1155
03AB:  GOTO   3AE
1156
03AC:  BTFSC  03.0
1157
03AD:  GOTO   3B7
1158
03AE:  BSF    03.5
1159
03AF:  BCF    06.5
1160
03B0:  BCF    03.5
1161
03B1:  BCF    06.5
1162
03B2:  BSF    03.5
1163
03B3:  BCF    06.4
1164
03B4:  BCF    03.5
1165
03B5:  BSF    06.4
1166
03B6:  GOTO   3BF
1167
03B7:  BSF    03.5
1168
03B8:  BCF    06.4
1169
03B9:  BCF    03.5
1170
03BA:  BCF    06.4
1171
03BB:  BSF    03.5
1172
03BC:  BCF    06.5
1173
03BD:  BCF    03.5
1174
03BE:  BCF    06.5
1175
....................             line=L;  
1176
03BF:  MOVLW  02
1177
03C0:  MOVWF  2A
1178
....................             continue;  
1179
03C1:  GOTO   335
1180
....................          case R:                          // trochu vpravo  
1181
....................             GO(R, F, FW_POMALU+rovinka); GO(L, F, FW_STREDNE+rovinka);  
1182
03C2:  MOVF   01,W
1183
03C3:  MOVWF  5B
1184
03C4:  MOVLW  AA
1185
03C5:  ADDWF  2D,W
1186
03C6:  SUBWF  5B,W
1187
03C7:  BTFSC  03.2
1188
03C8:  GOTO   3CB
1189
03C9:  BTFSC  03.0
1190
03CA:  GOTO   3D4
1191
03CB:  BSF    03.5
1192
03CC:  BCF    06.5
1193
03CD:  BCF    03.5
1194
03CE:  BCF    06.5
1195
03CF:  BSF    03.5
1196
03D0:  BCF    06.4
1197
03D1:  BCF    03.5
1198
03D2:  BSF    06.4
1199
03D3:  GOTO   3DC
1200
03D4:  BSF    03.5
1201
03D5:  BCF    06.4
1202
03D6:  BCF    03.5
1203
03D7:  BCF    06.4
1204
03D8:  BSF    03.5
1205
03D9:  BCF    06.5
1206
03DA:  BCF    03.5
1207
03DB:  BCF    06.5
1208
03DC:  MOVF   01,W
1209
03DD:  MOVWF  5B
1210
03DE:  MOVLW  BE
1211
03DF:  ADDWF  2D,W
1212
03E0:  SUBWF  5B,W
1213
03E1:  BTFSC  03.2
1214
03E2:  GOTO   3E5
1215
03E3:  BTFSC  03.0
1216
03E4:  GOTO   3EE
1217
03E5:  BSF    03.5
1218
03E6:  BCF    06.7
1219
03E7:  BCF    03.5
1220
03E8:  BCF    06.7
1221
03E9:  BSF    03.5
1222
03EA:  BCF    06.6
1223
03EB:  BCF    03.5
1224
03EC:  BSF    06.6
1225
03ED:  GOTO   3F6
1226
03EE:  BSF    03.5
1227
03EF:  BCF    06.6
1228
03F0:  BCF    03.5
1229
03F1:  BCF    06.6
1230
03F2:  BSF    03.5
1231
03F3:  BCF    06.7
1232
03F4:  BCF    03.5
1233
03F5:  BCF    06.7
1234
....................             line=R;  
1235
03F6:  MOVLW  01
1236
03F7:  MOVWF  2A
1237
....................             continue;  
1238
03F8:  GOTO   335
1239
....................          default:       // kdyz jsou obe cidla mimo caru, tak pokracuj dal  
1240
....................       };  
1241
....................       rovinka=0;  
1242
03F9:  CLRF   2D
1243
....................   
1244
....................       if (last!=line)     // pokud si prejel caru z jedne strany na druhou stranu, tak zabrzdi  
1245
03FA:  MOVF   2A,W
1246
03FB:  SUBWF  2C,W
1247
03FC:  BTFSC  03.2
1248
03FD:  GOTO   48F
1249
....................       {  
1250
....................          last=line;  
1251
03FE:  MOVF   2A,W
1252
03FF:  MOVWF  2C
1253
....................          speed=FW_ZATACKA;  
1254
0400:  MOVLW  C8
1255
0401:  MOVWF  2B
1256
....................          cirkus++;  
1257
0402:  INCF   2E,F
1258
....................          if (cirkus>10)  
1259
0403:  MOVF   2E,W
1260
0404:  SUBLW  0A
1261
0405:  BTFSC  03.0
1262
0406:  GOTO   48F
1263
....................          {  
1264
....................             STOPL; STOPR;  
1265
0407:  BSF    03.5
1266
0408:  BCF    06.6
1267
0409:  BCF    03.5
1268
040A:  BCF    06.6
1269
040B:  BSF    03.5
1270
040C:  BCF    06.7
1271
040D:  BCF    03.5
1272
040E:  BCF    06.7
1273
040F:  BSF    03.5
1274
0410:  BCF    06.4
1275
0411:  BCF    03.5
1276
0412:  BCF    06.4
1277
0413:  BSF    03.5
1278
0414:  BCF    06.5
1279
0415:  BCF    03.5
1280
0416:  BCF    06.5
1281
....................             cirkus=0;  
1282
0417:  CLRF   2E
1283
....................             disable_interrupts(GLOBAL);  
1284
0418:  BCF    0B.6
1285
0419:  BCF    0B.7
1286
041A:  BTFSC  0B.7
1287
041B:  GOTO   419
1288
....................             beep(1000,400);  
1289
041C:  MOVLW  03
1290
041D:  MOVWF  5E
1291
041E:  MOVLW  E8
1292
041F:  MOVWF  5D
1293
0420:  MOVLW  01
1294
0421:  MOVWF  60
1295
0422:  MOVLW  90
1296
0423:  MOVWF  5F
1297
0424:  CALL   055
1298
....................             for(n=3000; n>3950; n--) beep(n,10);  
1299
0425:  MOVLW  0B
1300
0426:  MOVWF  58
1301
0427:  MOVLW  B8
1302
0428:  MOVWF  57
1303
0429:  MOVF   58,W
1304
042A:  SUBLW  0E
1305
042B:  BTFSC  03.0
1306
042C:  GOTO   441
1307
042D:  XORLW  FF
1308
042E:  BTFSS  03.2
1309
042F:  GOTO   434
1310
0430:  MOVF   57,W
1311
0431:  SUBLW  6E
1312
0432:  BTFSC  03.0
1313
0433:  GOTO   441
1314
0434:  MOVF   58,W
1315
0435:  MOVWF  5E
1316
0436:  MOVF   57,W
1317
0437:  MOVWF  5D
1318
0438:  CLRF   60
1319
0439:  MOVLW  0A
1320
043A:  MOVWF  5F
1321
043B:  CALL   055
1322
043C:  MOVF   57,W
1323
043D:  BTFSC  03.2
1324
043E:  DECF   58,F
1325
043F:  DECF   57,F
1326
0440:  GOTO   429
1327
....................       	   beep(2000,200);  
1328
0441:  MOVLW  07
1329
0442:  MOVWF  5E
1330
0443:  MOVLW  D0
1331
0444:  MOVWF  5D
1332
0445:  CLRF   60
1333
0446:  MOVLW  C8
1334
0447:  MOVWF  5F
1335
0448:  CALL   055
1336
.................... 	         beep(900,400);  
1337
0449:  MOVLW  03
1338
044A:  MOVWF  5E
1339
044B:  MOVLW  84
1340
044C:  MOVWF  5D
1341
044D:  MOVLW  01
1342
044E:  MOVWF  60
1343
044F:  MOVLW  90
1344
0450:  MOVWF  5F
1345
0451:  CALL   055
1346
....................             for(n=2950; n<3000; n++) beep(n,10);  
1347
0452:  MOVLW  0B
1348
0453:  MOVWF  58
1349
0454:  MOVLW  86
1350
0455:  MOVWF  57
1351
0456:  MOVF   58,W
1352
0457:  SUBLW  0B
1353
0458:  BTFSS  03.0
1354
0459:  GOTO   46C
1355
045A:  BTFSS  03.2
1356
045B:  GOTO   460
1357
045C:  MOVF   57,W
1358
045D:  SUBLW  B7
1359
045E:  BTFSS  03.0
1360
045F:  GOTO   46C
1361
0460:  MOVF   58,W
1362
0461:  MOVWF  5E
1363
0462:  MOVF   57,W
1364
0463:  MOVWF  5D
1365
0464:  CLRF   60
1366
0465:  MOVLW  0A
1367
0466:  MOVWF  5F
1368
0467:  CALL   055
1369
0468:  INCF   57,F
1370
0469:  BTFSC  03.2
1371
046A:  INCF   58,F
1372
046B:  GOTO   456
1373
....................             beep(4000,400);  
1374
046C:  MOVLW  0F
1375
046D:  MOVWF  5E
1376
046E:  MOVLW  A0
1377
046F:  MOVWF  5D
1378
0470:  MOVLW  01
1379
0471:  MOVWF  60
1380
0472:  MOVLW  90
1381
0473:  MOVWF  5F
1382
0474:  CALL   055
1383
....................       	   beep(1000,100);  
1384
0475:  MOVLW  03
1385
0476:  MOVWF  5E
1386
0477:  MOVLW  E8
1387
0478:  MOVWF  5D
1388
0479:  CLRF   60
1389
047A:  MOVLW  64
1390
047B:  MOVWF  5F
1391
047C:  CALL   055
1392
.................... 	         beep(3000,400);  
1393
047D:  MOVLW  0B
1394
047E:  MOVWF  5E
1395
047F:  MOVLW  B8
1396
0480:  MOVWF  5D
1397
0481:  MOVLW  01
1398
0482:  MOVWF  60
1399
0483:  MOVLW  90
1400
0484:  MOVWF  5F
1401
0485:  CALL   055
1402
....................             Delay_ms(1000);  
1403
0486:  MOVLW  04
1404
0487:  MOVWF  5B
1405
0488:  MOVLW  FA
1406
0489:  MOVWF  5E
1407
048A:  CALL   07B
1408
048B:  DECFSZ 5B,F
1409
048C:  GOTO   488
1410
....................             enable_interrupts(GLOBAL);  
1411
048D:  MOVLW  C0
1412
048E:  IORWF  0B,F
1413
....................          }  
1414
....................       };  
1415
....................   
1416
....................       if (L==line)  // kdyz jsou obe cidla mimo caru, zatoc na caru  
1417
048F:  MOVF   2A,W
1418
0490:  SUBLW  02
1419
0491:  BTFSS  03.2
1420
0492:  GOTO   4B1
1421
....................       {  
1422
....................          STOPL;  
1423
0493:  BSF    03.5
1424
0494:  BCF    06.6
1425
0495:  BCF    03.5
1426
0496:  BCF    06.6
1427
0497:  BSF    03.5
1428
0498:  BCF    06.7
1429
0499:  BCF    03.5
1430
049A:  BCF    06.7
1431
....................          GO(R, F, speed);  
1432
049B:  MOVF   01,W
1433
049C:  SUBWF  2B,W
1434
049D:  BTFSS  03.0
1435
049E:  GOTO   4A8
1436
049F:  BSF    03.5
1437
04A0:  BCF    06.5
1438
04A1:  BCF    03.5
1439
04A2:  BCF    06.5
1440
04A3:  BSF    03.5
1441
04A4:  BCF    06.4
1442
04A5:  BCF    03.5
1443
04A6:  BSF    06.4
1444
04A7:  GOTO   4B0
1445
04A8:  BSF    03.5
1446
04A9:  BCF    06.4
1447
04AA:  BCF    03.5
1448
04AB:  BCF    06.4
1449
04AC:  BSF    03.5
1450
04AD:  BCF    06.5
1451
04AE:  BCF    03.5
1452
04AF:  BCF    06.5
1453
....................       }  
1454
....................       else  
1455
04B0:  GOTO   4CE
1456
....................       {  
1457
....................          STOPR;  
1458
04B1:  BSF    03.5
1459
04B2:  BCF    06.4
1460
04B3:  BCF    03.5
1461
04B4:  BCF    06.4
1462
04B5:  BSF    03.5
1463
04B6:  BCF    06.5
1464
04B7:  BCF    03.5
1465
04B8:  BCF    06.5
1466
....................          GO(L, F, speed);  
1467
04B9:  MOVF   01,W
1468
04BA:  SUBWF  2B,W
1469
04BB:  BTFSS  03.0
1470
04BC:  GOTO   4C6
1471
04BD:  BSF    03.5
1472
04BE:  BCF    06.7
1473
04BF:  BCF    03.5
1474
04C0:  BCF    06.7
1475
04C1:  BSF    03.5
1476
04C2:  BCF    06.6
1477
04C3:  BCF    03.5
1478
04C4:  BSF    06.6
1479
04C5:  GOTO   4CE
1480
04C6:  BSF    03.5
1481
04C7:  BCF    06.6
1482
04C8:  BCF    03.5
1483
04C9:  BCF    06.6
1484
04CA:  BSF    03.5
1485
04CB:  BCF    06.7
1486
04CC:  BCF    03.5
1487
04CD:  BCF    06.7
1488
....................       }  
1489
....................    } // while(true)  
1490
04CE:  GOTO   335
1491
.................... }  
1492
....................  
1493
04CF:  SLEEP
1494
 
1495
Configuration Fuses:
1496
   Word  1: 3F38   NOWDT NOPUT MCLR NOBROWNOUT NOLVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO
1497
   Word  2: 3FFC   NOFCMEN NOIESO