Subversion Repositories svnkaklik

Rev

Go to most recent revision | Blame | Last modification | View Log | Download

CCS PCM C Compiler, Version 3.245, 27853               15-IV-06 16:28

               Filename: D:\KAKLIK\programy\PIC_C\roboti\istrobot\3Orbis\main.lst

               ROM used: 598 words (15%)
                         Largest free fragment is 2048
               RAM used: 31 (18%) at main() level
                         40 (23%) worst case
               Stack:    4 worst case (2 in main + 2 for interrupts)

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   182
0003:  NOP
.................... #include ".\main.h" 
.................... #include <16F88.h> 
.................... //////// Standard Header file for the PIC16F88 device //////////////// 
.................... #device PIC16F88 
.................... #list 
....................  
.................... #device adc=8 
....................  
.................... #FUSES NOWDT                       //No Watch Dog Timer 
.................... #FUSES INTRC_IO 
.................... #FUSES NOPUT                       //No Power Up Timer 
.................... #FUSES MCLR                        //Master Clear pin enabled 
.................... #FUSES NOBROWNOUT             //Reset when brownout detected 
.................... #FUSES NOLVP                  //Low Voltage Programming on B3(PIC16) or B5(PIC18) 
.................... #FUSES NOCPD                       //No EE protection 
.................... #FUSES NOWRT                       //Program memory not write protected 
.................... #FUSES NODEBUG                     //No Debug mode for ICD 
.................... #FUSES NOPROTECT                   //Code not protected from reading 
.................... #FUSES NOFCMEN                //Fail-safe clock monitor enabled 
.................... #FUSES NOIESO                      //Internal External Switch Over mode enabled 
....................  
.................... #use delay(clock=8000000,RESTART_WDT) 
000C:  MOVLW  3D
000D:  MOVWF  04
000E:  MOVF   00,W
000F:  BTFSC  03.2
0010:  GOTO   023
0011:  MOVLW  02
0012:  MOVWF  78
0013:  MOVLW  BF
0014:  MOVWF  77
0015:  CLRWDT
0016:  DECFSZ 77,F
0017:  GOTO   015
0018:  DECFSZ 78,F
0019:  GOTO   013
001A:  MOVLW  96
001B:  MOVWF  77
001C:  DECFSZ 77,F
001D:  GOTO   01C
001E:  NOP
001F:  NOP
0020:  CLRWDT
0021:  DECFSZ 00,F
0022:  GOTO   011
0023:  RETLW  00
0024:  MOVLW  08
0025:  SUBWF  42,F
0026:  BTFSS  03.0
0027:  GOTO   033
0028:  MOVLW  42
0029:  MOVWF  04
002A:  BCF    03.0
002B:  RRF    00,F
002C:  MOVF   00,W
002D:  BTFSC  03.2
002E:  GOTO   033
002F:  GOTO   031
0030:  CLRWDT
0031:  DECFSZ 00,F
0032:  GOTO   030
0033:  RETLW  00
....................  
....................  
....................  
.................... #use rtos (timer=2, minor_cycle=2ms) 
....................  
.................... #define  STRED       128      // sredni poloha zadniho kolecka 
.................... #define  BEAR1       12       // 3 stupne zataceni 
.................... #define  BEAR2       34 
.................... #define  BEAR3       70 
.................... #define  SPEEDMAX    120      // maximalni rychlost 
....................  
.................... #define  L           1 
.................... #define  S           2 
.................... #define  R           0 
....................  
.................... // servo 
.................... #define  SERVO PIN_A2 
....................  
.................... // IR 
.................... #define IRTX      PIN_B2 
....................  
.................... //motory 
.................... #define  FR         output_low(PIN_A7); output_high(PIN_A6)  // Vpred 
.................... #define  FL         output_low(PIN_A1); output_high(PIN_A0) 
.................... #define  BR         output_low(PIN_A6); output_high(PIN_A7)  // Vzad 
.................... #define  BL         output_low(PIN_A0); output_high(PIN_A1) 
.................... #define  STOPR      output_low(PIN_A6);output_low(PIN_A7) 
.................... #define  STOPL      output_low(PIN_A0);output_low(PIN_A1) 
....................  
.................... //HID 
.................... #define  LED1     PIN_B1      //oranzova 
.................... #define  LED2     PIN_B2      //zluta 
....................  
.................... #define  STROBE   PIN_B0 
.................... //#define  SW1      PIN_A2      // Motory On/off 
....................  
.................... unsigned int8 sensors;        // pomocna promenna pro cteni cidel na caru 
.................... unsigned int8 line;           // na ktere strane byla detekovana cara 
.................... //unsigned int8 dira;           // pocita dobu po kterou je ztracena cara 
.................... unsigned int8 uhel;           // urcuje aktualni uhel zataceni 
.................... //unsigned int8 speed;          // maximalni povolena rychlost 
.................... unsigned int8 rovinka;        // pocitadlo na zjisteni rovinky 
....................  
.................... signed int16  Lmotor;         // promene, ktere urcuji velikost vykonu na levem 
.................... signed int16  Rmotor;         // a pravem motoru 
....................  
.................... // makro pro PWM 
.................... #define GO(motor, direction, power) if(get_timer0()<=power) \ 
.................... {direction##motor;} else {stop##motor;} 
....................  
.................... //////////////////////////////////////////////////////////////////////////////// 
.................... //////////////////////////////////////////////////////////////////////////////// 
.................... /* 
.................... void diagnostika() 
.................... { 
....................    if(input(SW1))STOPR;STOPL;While(TRUE); 
.................... //   if(LSENSOR==true) output_high(LED2); else output_low(LED2); 
.................... //   if(RSENSOR==true) output_high(LED1); else output_low(LED1); 
.................... } 
.................... */ 
.................... //////////////////////////////////////////////////////////////////////////////// 
.................... #task (rate=18ms,max=2ms) 
.................... void zatoc()   // ridi servo ktere otaci kolem 
.................... { 
....................    unsigned int8 n; 
....................  
....................    output_high(SERVO); 
0034:  BSF    03.5
0035:  BCF    05.2
0036:  BCF    03.5
0037:  BSF    05.2
....................    delay_us(1100); 
0038:  CLRWDT
0039:  MOVLW  01
003A:  MOVWF  3D
003B:  CALL   00C
003C:  MOVLW  63
003D:  MOVWF  42
003E:  CALL   024
....................    for(n=uhel; n>0; n--); 
003F:  MOVF   23,W
0040:  MOVWF  3C
0041:  MOVF   3C,F
0042:  BTFSC  03.2
0043:  GOTO   046
0044:  DECF   3C,F
0045:  GOTO   041
....................    output_low(SERVO); 
0046:  BSF    03.5
0047:  BCF    05.2
0048:  BCF    03.5
0049:  BCF    05.2
.................... } 
004A:  MOVLW  34
004B:  MOVWF  2E
004C:  MOVLW  00
004D:  MOVWF  2F
004E:  BCF    0A.3
004F:  GOTO   234
0050:  RETLW  00
....................  
.................... //////////////////////////////////////////////////////////////////////////////// 
.................... void diag()   // ridi servo ktere otaci kolem 
.................... { 
....................    unsigned int8 n; 
....................  
....................    output_high(SERVO); 
*
016A:  BSF    03.5
016B:  BCF    05.2
016C:  BCF    03.5
016D:  BSF    05.2
....................    delay_us(1100); 
016E:  CLRWDT
016F:  MOVLW  01
0170:  MOVWF  3D
0171:  CALL   00C
0172:  MOVLW  63
0173:  MOVWF  42
0174:  CALL   024
....................    for(n=uhel; n>0; n--); 
0175:  MOVF   23,W
0176:  MOVWF  3A
0177:  MOVF   3A,F
0178:  BTFSC  03.2
0179:  GOTO   17C
017A:  DECF   3A,F
017B:  GOTO   177
....................    output_low(SERVO); 
017C:  BSF    03.5
017D:  BCF    05.2
017E:  BCF    03.5
017F:  BCF    05.2
.................... } 
0180:  BCF    0A.3
0181:  GOTO   1D4 (RETURN)
....................  
.................... //////////////////////////////////////////////////////////////////////////////// 
.................... short int IRcheck()                 // potvrdi detekci cihly 
.................... { 
....................    output_high(IRTX);               // vypne vysilac IR 
....................  
....................    output_low(STROBE); 
....................    sensors = spi_read(0);         // cteni senzoru 
....................    output_high(STROBE); 
....................  
....................    if(true==bit_test(sensors,7))    // otestuje, jestli je stale detekovan IR signal 
....................    { 
....................       output_low(IRTX);             // zapne vysilac IR 
....................  
....................       output_low(STROBE); 
....................       sensors = spi_read(0);         // cteni senzoru 
....................       output_high(STROBE); 
....................  
....................       if(false==bit_test(sensors,7))      // otestuje, jestli je detekovana cihla 
....................       { 
....................          output_high(IRTX);            // vypne vysilac IR 
....................  
....................          output_low(STROBE); 
....................          sensors = spi_read(0);         // cteni senzoru 
....................          output_high(STROBE); 
....................  
....................          if(bit_test(sensors,7)) return 1; // 
....................  
....................          else return 0; // vrat 0 kdyz je ruseni 
....................       } 
....................       else return 0; // vrat 0 kdyz to nebyla cihla 
....................    } 
....................    else return 0; // vrat 0 kdyz je detekovano ruseni 
.................... } 
.................... //////////////////////////////////////////////////////////////////////////////// 
.................... /* 
.................... #task (rate=4ms, max=20us) 
.................... void rychlost() 
.................... { 
....................    if(speed<255) speed++; 
.................... } 
.................... */ 
.................... //////////////////////////////////////////////////////////////////////////////// 
.................... #task (rate=2ms, max=1ms) 
.................... void rizeni() 
.................... { 
....................    unsigned int16 n; 
....................    unsigned int8 i; 
....................  
....................    GO(L,F,Lmotor);GO(R,F,Rmotor); // zapni motory 
*
0051:  MOVF   01,W
0052:  BTFSS  00.7
0053:  GOTO   057
0054:  BTFSS  26.7
0055:  GOTO   05F
0056:  GOTO   059
0057:  BTFSC  26.7
0058:  GOTO   068
0059:  MOVF   26,F
005A:  BTFSS  03.2
005B:  GOTO   05F
005C:  SUBWF  25,W
005D:  BTFSS  03.0
005E:  GOTO   068
005F:  BSF    03.5
0060:  BCF    05.1
0061:  BCF    03.5
0062:  BCF    05.1
0063:  BSF    03.5
0064:  BCF    05.0
0065:  BCF    03.5
0066:  BSF    05.0
0067:  GOTO   070
0068:  BSF    03.5
0069:  BCF    05.0
006A:  BCF    03.5
006B:  BCF    05.0
006C:  BSF    03.5
006D:  BCF    05.1
006E:  BCF    03.5
006F:  BCF    05.1
0070:  MOVF   01,W
0071:  BTFSS  00.7
0072:  GOTO   076
0073:  BTFSS  28.7
0074:  GOTO   07E
0075:  GOTO   078
0076:  BTFSC  28.7
0077:  GOTO   087
0078:  MOVF   28,F
0079:  BTFSS  03.2
007A:  GOTO   07E
007B:  SUBWF  27,W
007C:  BTFSS  03.0
007D:  GOTO   087
007E:  BSF    03.5
007F:  BCF    05.7
0080:  BCF    03.5
0081:  BCF    05.7
0082:  BSF    03.5
0083:  BCF    05.6
0084:  BCF    03.5
0085:  BSF    05.6
0086:  GOTO   08F
0087:  BSF    03.5
0088:  BCF    05.6
0089:  BCF    03.5
008A:  BCF    05.6
008B:  BSF    03.5
008C:  BCF    05.7
008D:  BCF    03.5
008E:  BCF    05.7
....................  
....................    delay_us(500); 
008F:  CLRWDT
0090:  MOVLW  02
0091:  MOVWF  41
0092:  MOVLW  F7
0093:  MOVWF  42
0094:  CALL   024
0095:  DECFSZ 41,F
0096:  GOTO   092
....................  
....................    output_low(STROBE); 
0097:  BSF    03.5
0098:  BCF    06.0
0099:  BCF    03.5
009A:  BCF    06.0
....................    sensors = spi_read(0);         // cteni senzoru 
009B:  MOVF   13,W
009C:  CLRF   13
009D:  BSF    03.5
009E:  BTFSC  14.0
009F:  GOTO   0A2
00A0:  BCF    03.5
00A1:  GOTO   09D
00A2:  BCF    03.5
00A3:  MOVF   13,W
00A4:  MOVWF  21
....................    sensors=~sensors; 
00A5:  COMF   21,F
....................    output_high(STROBE);  
00A6:  BSF    03.5
00A7:  BCF    06.0
00A8:  BCF    03.5
00A9:  BSF    06.0
....................     
....................    i=0;                    // havarijni kod    
00AA:  CLRF   40
....................    for (n=0; n<=6; n++) 
00AB:  CLRF   3F
00AC:  CLRF   3E
00AD:  MOVF   3F,F
00AE:  BTFSS  03.2
00AF:  GOTO   0C4
00B0:  MOVF   3E,W
00B1:  SUBLW  06
00B2:  BTFSS  03.0
00B3:  GOTO   0C4
....................    { 
....................       if(bit_test(sensors,n)) i++; 
00B4:  MOVF   21,W
00B5:  MOVWF  77
00B6:  MOVF   3E,W
00B7:  MOVWF  78
00B8:  BTFSC  03.2
00B9:  GOTO   0BE
00BA:  BCF    03.0
00BB:  RRF    77,F
00BC:  DECFSZ 78,F
00BD:  GOTO   0BA
00BE:  BTFSC  77.0
00BF:  INCF   40,F
....................    } 
00C0:  INCF   3E,F
00C1:  BTFSC  03.2
00C2:  INCF   3F,F
00C3:  GOTO   0AD
....................    if (i>3) rtos_terminate(); // zastavi, kdyz je cerno pod vice nez tremi cidly 
00C4:  MOVF   40,W
00C5:  SUBLW  03
00C6:  BTFSS  03.0
00C7:  GOTO   241
....................     
....................  
....................    if(bit_test(sensors,3)) //...|...// 
00C8:  BTFSS  21.3
00C9:  GOTO   0D8
....................    { 
....................       uhel=STRED; 
00CA:  MOVLW  80
00CB:  MOVWF  23
....................       Lmotor=SPEEDMAX; 
00CC:  CLRF   26
00CD:  MOVLW  78
00CE:  MOVWF  25
....................       Rmotor=SPEEDMAX; 
00CF:  CLRF   28
00D0:  MOVWF  27
....................       line=S; 
00D1:  MOVLW  02
00D2:  MOVWF  22
....................       if (rovinka<255) rovinka++; 
00D3:  INCFSZ 24,W
00D4:  GOTO   0D6
00D5:  GOTO   0D7
00D6:  INCF   24,F
....................       return; 
00D7:  GOTO   163
....................    } 
....................  
....................    if(bit_test(sensors,0)) //|......//     // z duvodu zkraceni doby reakce se cidla nevyhodnocuji poporade ale od krajnich k prostrednimu 
00D8:  BTFSS  21.0
00D9:  GOTO   0E4
....................    { 
....................       uhel=STRED-BEAR3; 
00DA:  MOVLW  3A
00DB:  MOVWF  23
....................       Lmotor=0; 
00DC:  CLRF   26
00DD:  CLRF   25
....................       Rmotor=SPEEDMAX; 
00DE:  CLRF   28
00DF:  MOVLW  78
00E0:  MOVWF  27
....................       line=L; 
00E1:  MOVLW  01
00E2:  MOVWF  22
....................       return; 
00E3:  GOTO   163
....................    } 
....................  
....................    if(bit_test(sensors,6)) //......|// 
00E4:  BTFSS  21.6
00E5:  GOTO   0EF
....................    { 
....................       uhel=STRED+BEAR3; 
00E6:  MOVLW  C6
00E7:  MOVWF  23
....................       Rmotor=0; 
00E8:  CLRF   28
00E9:  CLRF   27
....................       Lmotor=SPEEDMAX; 
00EA:  CLRF   26
00EB:  MOVLW  78
00EC:  MOVWF  25
....................       line=R; 
00ED:  CLRF   22
....................       return; 
00EE:  GOTO   163
....................  
....................    } 
....................  
....................    if(bit_test(sensors,1)) //.|.....// 
00EF:  BTFSS  21.1
00F0:  GOTO   0FC
....................    { 
....................       uhel=STRED-BEAR2; 
00F1:  MOVLW  5E
00F2:  MOVWF  23
....................       Lmotor=SPEEDMAX-50; 
00F3:  CLRF   26
00F4:  MOVLW  46
00F5:  MOVWF  25
....................       Rmotor=SPEEDMAX; 
00F6:  CLRF   28
00F7:  MOVLW  78
00F8:  MOVWF  27
....................       line=S; 
00F9:  MOVLW  02
00FA:  MOVWF  22
....................       return; 
00FB:  GOTO   163
....................    } 
....................  
....................    if(bit_test(sensors,5)) //.....|.// 
00FC:  BTFSS  21.5
00FD:  GOTO   109
....................    { 
....................       uhel=STRED+BEAR2; 
00FE:  MOVLW  A2
00FF:  MOVWF  23
....................       Rmotor=SPEEDMAX-50; 
0100:  CLRF   28
0101:  MOVLW  46
0102:  MOVWF  27
....................       Lmotor=SPEEDMAX; 
0103:  CLRF   26
0104:  MOVLW  78
0105:  MOVWF  25
....................       line=S; 
0106:  MOVLW  02
0107:  MOVWF  22
....................       return; 
0108:  GOTO   163
....................    } 
....................  
....................    if (bit_test(sensors,2)) //..|....// 
0109:  BTFSS  21.2
010A:  GOTO   119
....................    { 
....................       uhel=STRED-BEAR1; 
010B:  MOVLW  74
010C:  MOVWF  23
....................       Lmotor=SPEEDMAX; 
010D:  CLRF   26
010E:  MOVLW  78
010F:  MOVWF  25
....................       Rmotor=SPEEDMAX; 
0110:  CLRF   28
0111:  MOVWF  27
....................       line=S; 
0112:  MOVLW  02
0113:  MOVWF  22
....................       if (rovinka<255) rovinka++; 
0114:  INCFSZ 24,W
0115:  GOTO   117
0116:  GOTO   118
0117:  INCF   24,F
....................       return; 
0118:  GOTO   163
....................    } 
....................  
....................    if (bit_test(sensors,4)) //....|..// 
0119:  BTFSS  21.4
011A:  GOTO   129
....................    { 
....................       uhel=STRED+BEAR1; 
011B:  MOVLW  8C
011C:  MOVWF  23
....................       Rmotor=SPEEDMAX; 
011D:  CLRF   28
011E:  MOVLW  78
011F:  MOVWF  27
....................       Lmotor=SPEEDMAX; 
0120:  CLRF   26
0121:  MOVWF  25
....................       line=S; 
0122:  MOVLW  02
0123:  MOVWF  22
....................       if (rovinka<255) rovinka++; 
0124:  INCFSZ 24,W
0125:  GOTO   127
0126:  GOTO   128
0127:  INCF   24,F
....................       return; 
0128:  GOTO   163
....................    } 
....................  
....................    if ((L==line) || (R==line)) // Brzdeni pri vyjeti z trate 
0129:  DECFSZ 22,W
012A:  GOTO   12C
012B:  GOTO   12F
012C:  MOVF   22,F
012D:  BTFSS  03.2
012E:  GOTO   160
....................    { 
....................       if (rovinka>250) 
012F:  MOVF   24,W
0130:  SUBLW  FA
0131:  BTFSC  03.0
0132:  GOTO   15F
....................       { 
....................          BL; BR; 
0133:  BSF    03.5
0134:  BCF    05.0
0135:  BCF    03.5
0136:  BCF    05.0
0137:  BSF    03.5
0138:  BCF    05.1
0139:  BCF    03.5
013A:  BSF    05.1
013B:  BSF    03.5
013C:  BCF    05.6
013D:  BCF    03.5
013E:  BCF    05.6
013F:  BSF    03.5
0140:  BCF    05.7
0141:  BCF    03.5
0142:  BSF    05.7
....................          for(n=1; n<(60); n++) {rtos_yield(); delay_us(500);}; 
0143:  CLRF   3F
0144:  MOVLW  01
0145:  MOVWF  3E
0146:  MOVF   3F,F
0147:  BTFSS  03.2
0148:  GOTO   15F
0149:  MOVF   3E,W
014A:  SUBLW  3B
014B:  BTFSS  03.0
014C:  GOTO   15F
014D:  MOVLW  53
014E:  MOVWF  35
014F:  MOVLW  01
0150:  MOVWF  36
0151:  BCF    0A.3
0152:  GOTO   234
0153:  CLRWDT
0154:  MOVLW  02
0155:  MOVWF  41
0156:  MOVLW  F7
0157:  MOVWF  42
0158:  CALL   024
0159:  DECFSZ 41,F
015A:  GOTO   156
015B:  INCF   3E,F
015C:  BTFSC  03.2
015D:  INCF   3F,F
015E:  GOTO   146
....................       }; 
....................       rovinka=0; 
015F:  CLRF   24
....................    } 
....................     
....................    if(bit_test(sensors,7))       // zjisti jestli neni cihla 
0160:  BTFSS  21.7
0161:  GOTO   163
....................    { 
....................       rtos_terminate(); 
0162:  GOTO   241
....................    } 
.................... } 
0163:  MOVLW  51
0164:  MOVWF  35
0165:  MOVLW  00
0166:  MOVWF  36
0167:  BCF    0A.3
0168:  GOTO   234
0169:  RETLW  00
....................  
....................  
....................  
.................... //////////////////////////////////////////////////////////////////////////////// 
.................... void main() 
.................... { 
*
0182:  CLRF   04
0183:  MOVLW  1F
0184:  ANDWF  03,F
0185:  MOVLW  70
0186:  BSF    03.5
0187:  MOVWF  0F
0188:  BCF    1F.4
0189:  BCF    1F.5
018A:  MOVF   1B,W
018B:  ANDLW  80
018C:  MOVWF  1B
018D:  MOVLW  07
018E:  MOVWF  1C
....................    unsigned int16 i; 
....................    unsigned int8 last; 
....................  
....................    setup_adc_ports(NO_ANALOGS); 
018F:  BCF    1F.4
0190:  BCF    1F.5
0191:  MOVF   1B,W
0192:  ANDLW  80
0193:  MOVWF  1B
....................    setup_adc(ADC_CLOCK_INTERNAL); 
0194:  BCF    1F.6
0195:  BCF    03.5
0196:  BSF    1F.6
0197:  BSF    1F.7
0198:  BSF    03.5
0199:  BCF    1F.7
019A:  BCF    03.5
019B:  BSF    1F.0
....................     setup_spi(SPI_MASTER|SPI_H_TO_L|SPI_XMIT_L_TO_H|SPI_CLK_DIV_4); 
019C:  BCF    14.5
019D:  BSF    03.5
019E:  BCF    06.2
019F:  BSF    06.1
01A0:  BCF    06.4
01A1:  MOVLW  30
01A2:  BCF    03.5
01A3:  MOVWF  14
01A4:  MOVLW  00
01A5:  BSF    03.5
01A6:  MOVWF  14
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); 
01A7:  MOVF   01,W
01A8:  ANDLW  C7
01A9:  IORLW  08
01AA:  MOVWF  01
....................    setup_timer_1(T1_DISABLED); 
01AB:  BCF    03.5
01AC:  CLRF   10
....................    setup_oscillator(OSC_8MHZ|OSC_INTRC); 
01AD:  MOVLW  72
01AE:  BSF    03.5
01AF:  MOVWF  0F
....................  
....................    STOPR; STOPL;  // zastav motory 
01B0:  BCF    05.6
01B1:  BCF    03.5
01B2:  BCF    05.6
01B3:  BSF    03.5
01B4:  BCF    05.7
01B5:  BCF    03.5
01B6:  BCF    05.7
01B7:  BSF    03.5
01B8:  BCF    05.0
01B9:  BCF    03.5
01BA:  BCF    05.0
01BB:  BSF    03.5
01BC:  BCF    05.1
01BD:  BCF    03.5
01BE:  BCF    05.1
....................    Lmotor=0;Rmotor=0; 
01BF:  CLRF   26
01C0:  CLRF   25
01C1:  CLRF   28
01C2:  CLRF   27
....................  
....................    uhel=STRED;    // nastav zadni kolecko na stred 
01C3:  MOVLW  80
01C4:  MOVWF  23
....................    rovinka=0; 
01C5:  CLRF   24
....................  
....................    output_low(IRTX); // zapni IR vysilac 
01C6:  BSF    03.5
01C7:  BCF    06.2
01C8:  BCF    03.5
01C9:  BCF    06.2
....................  
....................    for(i=0;i<100;i++)   // pockej, nez se zadni kolecko vystredi 
01CA:  CLRF   38
01CB:  CLRF   37
01CC:  MOVF   38,F
01CD:  BTFSS  03.2
01CE:  GOTO   1DB
01CF:  MOVF   37,W
01D0:  SUBLW  63
01D1:  BTFSS  03.0
01D2:  GOTO   1DB
....................    { 
....................       diag(); 
01D3:  GOTO   16A
....................       delay_ms(16); 
01D4:  MOVLW  10
01D5:  MOVWF  3D
01D6:  CALL   00C
....................    } 
01D7:  INCF   37,F
01D8:  BTFSC  03.2
01D9:  INCF   38,F
01DA:  GOTO   1CC
.................... //      diagnostika(); 
....................  
....................    while(true) 
....................    { 
....................       rtos_run(); 
01DB:  CLRF   29
01DC:  CLRF   2B
01DD:  MOVLW  09
01DE:  MOVWF  2A
01DF:  CLRF   2D
01E0:  CLRF   2C
01E1:  MOVLW  34
01E2:  MOVWF  2E
01E3:  MOVLW  00
01E4:  MOVWF  2F
01E5:  CLRF   30
01E6:  CLRF   32
01E7:  MOVLW  01
01E8:  MOVWF  31
01E9:  CLRF   34
01EA:  CLRF   33
01EB:  MOVLW  51
01EC:  MOVWF  35
01ED:  MOVLW  00
01EE:  MOVWF  36
01EF:  CLRF   20
01F0:  MOVLW  00
01F1:  MOVWF  78
01F2:  IORLW  06
01F3:  MOVWF  12
01F4:  MOVLW  FA
01F5:  BSF    03.5
01F6:  MOVWF  12
01F7:  BCF    03.5
01F8:  BCF    0C.1
01F9:  MOVLW  00
01FA:  MOVWF  78
01FB:  IORLW  06
01FC:  MOVWF  12
01FD:  MOVLW  FA
01FE:  BSF    03.5
01FF:  MOVWF  12
0200:  BCF    03.5
0201:  BCF    0C.1
0202:  BCF    03.0
0203:  RLF    20,W
0204:  MOVWF  77
0205:  CALL   004
0206:  MOVWF  79
0207:  MOVLW  01
0208:  ADDWF  77,W
0209:  CALL   004
020A:  MOVWF  7A
020B:  MOVF   79,W
020C:  MOVWF  04
020D:  MOVF   00,W
020E:  MOVWF  79
020F:  INCF   04,F
0210:  MOVF   00,W
0211:  MOVWF  77
0212:  INCF   04,F
0213:  MOVF   00,W
0214:  MOVWF  78
0215:  INCF   04,F
0216:  INCF   00,F
0217:  MOVF   00,W
0218:  MOVWF  7A
0219:  BTFSS  03.2
021A:  GOTO   21E
021B:  INCF   04,F
021C:  INCF   00,F
021D:  DECF   04,F
021E:  INCF   04,F
021F:  MOVF   00,W
0220:  SUBWF  78,W
0221:  BTFSS  03.2
0222:  GOTO   236
0223:  MOVF   77,W
0224:  SUBWF  7A,W
0225:  BTFSS  03.2
0226:  GOTO   236
0227:  DECF   04,F
0228:  CLRF   00
0229:  INCF   04,F
022A:  CLRF   00
022B:  INCF   04,F
022C:  BTFSC  79.7
022D:  GOTO   236
022E:  INCF   04,F
022F:  MOVF   00,W
0230:  MOVWF  0A
0231:  DECF   04,F
0232:  MOVF   00,W
0233:  MOVWF  02
0234:  BCF    03.5
0235:  BCF    03.6
0236:  INCF   20,F
0237:  MOVLW  02
0238:  SUBWF  20,W
0239:  BTFSS  03.2
023A:  GOTO   202
023B:  CLRF   20
023C:  BTFSS  0C.1
023D:  GOTO   240
023E:  BSF    03.5
023F:  GOTO   200
0240:  GOTO   23C
0241:  MOVLW  FF
0242:  MOVWF  20
....................       STOPR; 
0243:  BSF    03.5
0244:  BCF    05.6
0245:  BCF    03.5
0246:  BCF    05.6
0247:  BSF    03.5
0248:  BCF    05.7
0249:  BCF    03.5
024A:  BCF    05.7
....................       STOPL; 
024B:  BSF    03.5
024C:  BCF    05.0
024D:  BCF    03.5
024E:  BCF    05.0
024F:  BSF    03.5
0250:  BCF    05.1
0251:  BCF    03.5
0252:  BCF    05.1
....................       while(true); 
0253:  GOTO   253
....................    } 
0254:  GOTO   1DB
.................... } 
0255:  SLEEP

Configuration Fuses:
   Word  1: 3F38   NOWDT NOPUT MCLR NOBROWNOUT NOLVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO
   Word  2: 3FFC   NOFCMEN NOIESO