CCS PCM C Compiler, Version 3.245, 27853               12-V-08 00:50

               Filename: D:\MLAB_E\projekty\Ovladani_mobilnim_telefonem\SW\final\main.lst

               ROM used: 2699 words (33%)
                         Largest free fragment is 2048
               RAM used: 52 (30%) at main() level
                         139 (79%) worst case
               Stack:    2 locations

*
0000:  MOVLW  08
0001:  MOVWF  0A
0002:  GOTO   000
0003:  NOP
.................... #include ".\main.h" 
.................... #include <16F876A.h> 
.................... //////// Standard Header file for the PIC16F876A device //////////////// 
.................... #device PIC16F876A 
.................... #list 
....................  
.................... #device adc=8 
....................  
.................... #FUSES WDT                      //Watch Dog Timer 
.................... #FUSES HS//XT                       //Crystal osc <= 4mhz 
.................... #FUSES NOPUT                    //No Power Up Timer 
.................... #FUSES NOPROTECT                //Code not protected from reading 
.................... #FUSES NODEBUG                  //No Debug mode for ICD 
.................... #FUSES NOBROWNOUT               //No brownout reset 
.................... #FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O 
.................... #FUSES NOCPD                    //No EE protection 
.................... #FUSES NOWRT                    //Program memory not write protected 
....................  
.................... #use delay(clock=18432000,RESTART_WDT) 
*
01C8:  MOVLW  52
01C9:  MOVWF  04
01CA:  MOVF   00,W
01CB:  BTFSC  03.2
01CC:  GOTO   1DD
01CD:  MOVLW  05
01CE:  MOVWF  78
01CF:  MOVLW  BF
01D0:  MOVWF  77
01D1:  CLRWDT
01D2:  DECFSZ 77,F
01D3:  GOTO   1D1
01D4:  DECFSZ 78,F
01D5:  GOTO   1CF
01D6:  MOVLW  F9
01D7:  MOVWF  77
01D8:  DECFSZ 77,F
01D9:  GOTO   1D8
01DA:  CLRWDT
01DB:  DECFSZ 00,F
01DC:  GOTO   1CD
01DD:  RETLW  00
.................... #use rs232(STREAM=MOBIL,baud=19200,force_sw,parity=N,xmit=PIN_C6,rcv=PIN_B5,bits=8) 
01DE:  BCF    20.6
01DF:  MOVF   20,W
01E0:  BSF    03.5
01E1:  MOVWF  07
01E2:  BCF    03.5
01E3:  BCF    07.6
01E4:  MOVLW  08
01E5:  MOVWF  78
01E6:  NOP
01E7:  NOP
01E8:  NOP
01E9:  BSF    78.7
01EA:  GOTO   1FA
01EB:  BCF    78.7
01EC:  RRF    53,F
01ED:  BTFSC  03.0
01EE:  BSF    07.6
01EF:  BTFSS  03.0
01F0:  BCF    07.6
01F1:  BSF    78.6
01F2:  GOTO   1FA
01F3:  BCF    78.6
01F4:  DECFSZ 78,F
01F5:  GOTO   1EC
01F6:  NOP
01F7:  NOP
01F8:  NOP
01F9:  BSF    07.6
01FA:  MOVLW  49
01FB:  MOVWF  04
01FC:  DECFSZ 04,F
01FD:  GOTO   1FC
01FE:  NOP
01FF:  NOP
0200:  NOP
0201:  BTFSC  78.7
0202:  GOTO   1EB
0203:  BTFSC  78.6
0204:  GOTO   1F3
0205:  RETLW  00
0206:  MOVLW  08
0207:  MOVWF  77
0208:  BSF    03.5
0209:  BSF    06.5
020A:  BCF    03.5
020B:  BTFSS  06.5
020C:  GOTO   20F
020D:  BSF    03.5
020E:  GOTO   20A
020F:  CLRF   57
0210:  BSF    77.7
0211:  GOTO   220
0212:  BCF    77.7
0213:  GOTO   220
0214:  BCF    03.0
0215:  BTFSC  06.5
0216:  BSF    03.0
0217:  RRF    57,F
0218:  BSF    77.6
0219:  GOTO   220
021A:  BCF    77.6
021B:  DECFSZ 77,F
021C:  GOTO   214
021D:  MOVF   57,W
021E:  MOVWF  78
021F:  GOTO   22D
0220:  MOVLW  49
0221:  BTFSC  77.7
0222:  MOVLW  14
0223:  MOVWF  78
0224:  DECFSZ 78,F
0225:  GOTO   224
0226:  NOP
0227:  NOP
0228:  BTFSC  77.7
0229:  GOTO   212
022A:  BTFSC  77.6
022B:  GOTO   21A
022C:  GOTO   214
022D:  RETLW  00
*
0814:  MOVLW  FF
0815:  BCF    03.5
0816:  MOVWF  20
.................... #use rs232(STREAM=VRTULE,baud=600,parity=N,xmit=PIN_B2,rcv=PIN_B4,bits=8) 
*
0348:  BSF    03.5
0349:  BCF    06.2
034A:  BCF    03.5
034B:  BCF    06.2
034C:  MOVLW  08
034D:  MOVWF  78
034E:  NOP
034F:  NOP
0350:  NOP
0351:  BSF    78.7
0352:  GOTO   362
0353:  BCF    78.7
0354:  RRF    52,F
0355:  BTFSC  03.0
0356:  BSF    06.2
0357:  BTFSS  03.0
0358:  BCF    06.2
0359:  BSF    78.6
035A:  GOTO   362
035B:  BCF    78.6
035C:  DECFSZ 78,F
035D:  GOTO   354
035E:  NOP
035F:  NOP
0360:  NOP
0361:  BSF    06.2
0362:  MOVLW  09
0363:  MOVWF  77
0364:  CLRF   04
0365:  DECFSZ 04,F
0366:  GOTO   365
0367:  DECFSZ 77,F
0368:  GOTO   364
0369:  MOVLW  F0
036A:  MOVWF  04
036B:  DECFSZ 04,F
036C:  GOTO   36B
036D:  NOP
036E:  NOP
036F:  BTFSC  78.7
0370:  GOTO   353
0371:  BTFSC  78.6
0372:  GOTO   35B
0373:  RETLW  00
....................  
....................  
....................  
.................... #include <stdio.h> 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services           //// 
.................... //// This source code may only be used by licensed users of the CCS C  //// 
.................... //// compiler.  This source code may only be distributed to other      //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction //// 
.................... //// or distribution is permitted without written permission.          //// 
.................... //// Derivative programs created using this software in object code    //// 
.................... //// form are not restricted in any way.                               //// 
.................... /////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef _STDIO 
.................... #define _STDIO 
.................... #include <string.h> 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services            //// 
.................... //// This source code may only be used by licensed users of the CCS C   //// 
.................... //// compiler.  This source code may only be distributed to other       //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction  //// 
.................... //// or distribution is permitted without written permission.           //// 
.................... //// Derivative programs created using this software in object code     //// 
.................... //// form are not restricted in any way.                                //// 
.................... //////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef _STRING 
.................... #define _STRING 
.................... #include <stddef.h> 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services           //// 
.................... //// This source code may only be used by licensed users of the CCS C  //// 
.................... //// compiler.  This source code may only be distributed to other      //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction //// 
.................... //// or distribution is permitted without written permission.          //// 
.................... //// Derivative programs created using this software in object code    //// 
.................... //// form are not restricted in any way.                               //// 
.................... /////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef _STDDEF 
....................  
.................... #define _STDDEF 
....................  
.................... #if sizeof(int *)==1 
.................... #define ptrdiff_t int 
.................... #else 
.................... #define ptrdiff_t long 
.................... #endif 
....................  
.................... #define size_t int 
.................... #define wchar_t char 
.................... #define NULL 0 
....................  
.................... #define offsetof(s,f) (offsetofbit(s,f)/8) 
....................  
.................... #endif 
....................  
.................... #include <ctype.h> 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services            //// 
.................... //// This source code may only be used by licensed users of the CCS C   //// 
.................... //// compiler.  This source code may only be distributed to other       //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction  //// 
.................... //// or distribution is permitted without written permission.           //// 
.................... //// Derivative programs created using this software in object code     //// 
.................... //// form are not restricted in any way.                                //// 
.................... //////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef _CTYPE 
.................... #define _CTYPE 
....................  
.................... #define islower(x)  isamong(x,"abcdefghijklmnopqrstuvwxyz") 
.................... #define isupper(x)  isamong(x,"ABCDEFGHIJKLMNOPQRSTUVWXYZ") 
.................... #define isalnum(x)  isamong(x,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") 
.................... #define isalpha(x)  isamong(x,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") 
.................... #define isdigit(x)  isamong(x,"0123456789") 
.................... #define isspace(x)  (x==' ') 
.................... #define isxdigit(x) isamong(x,"0123456789ABCDEFabcdef") 
.................... #define iscntrl(x)  (x<' ') 
.................... #define isprint(x)  (x>=' ') 
.................... #define isgraph(x)  (x>' ') 
.................... #define ispunct(x)  ((x>' ')&&!isalnum(x)) 
....................  
.................... #endif 
....................  
....................  
....................  
....................  
....................  
.................... ////////////////////////////////////////////// 
.................... //// Uncomment the following define to    //// 
.................... //// allow some functions to use a        //// 
.................... //// quicker algorithm, but use more ROM  //// 
.................... ////                                      //// 
.................... //// #define FASTER_BUT_MORE_ROM          //// 
.................... ////////////////////////////////////////////// 
....................  
....................  
....................  
.................... /*Copying functions*/ 
.................... /* standard template: 
....................    void *memmove(void *s1, void *s2, size_t n). 
....................    Copies max of n characters safely (not following ending '\0') 
....................    from s2 in s1; if s2 has less than n characters, appends 0 */ 
....................  
.................... char *memmove(void *s1,char *s2,size_t n) 
.................... { 
....................    char *sc1; 
....................    char *sc2; 
....................    sc1=s1; 
....................    sc2=s2; 
....................    if(sc2<sc1 && sc1 <sc2 +n) 
....................       for(sc1+=n,sc2+=n;0<n;--n) 
....................          *--sc1=*--sc2; 
....................    else 
....................       for(;0<n;--n) 
....................          *sc1++=*sc2++; 
....................   return s1; 
....................   } 
....................  
.................... /* compiler ignored the name 'strcpy()'; perhaps, it's reserved? 
....................    Standard template: char *strcpy(char *s1, const char *s2) 
....................    copies the string s2 including the null character to s1*/ 
....................  
.................... char *strcopy(char *s1, char *s2) 
.................... { 
....................   char *s; 
....................  
....................   for (s = s1; *s2 != 0; s++, s2++) { 
....................      *s = *s2; 
....................   } 
....................   *s = *s2; 
....................   return(s1); 
.................... } 
....................  
.................... /* standard template: 
....................    char *strncpy(char *s1, const char *s2, size_t n). 
....................    Copies max of n characters (not following ending '\0') 
....................    from s2 in s1; if s2 has less than n characters, appends 0 */ 
....................  
.................... char *strncpy(char *s1, char *s2, size_t n) 
.................... { 
....................   char *s; 
....................  
....................   for (s = s1; n > 0 && *s2 != '\0'; n--) 
....................      *s++ = *s2++; 
....................   for (; n > 0; n--) 
....................      *s++ = '\0'; 
....................  
....................   return(s1); 
.................... } 
.................... /***********************************************************/ 
....................  
.................... /*concatenation functions*/ 
.................... /* standard template: char *strcat(char *s1, const char *s2) 
.................... appends s2 to s1*/ 
....................  
.................... char *strcat(char *s1, char *s2) 
.................... { 
....................    char *s; 
....................  
....................    for (s = s1; *s != '\0'; ++s); 
....................    while(*s2 != '\0') 
....................    { 
....................       *s = *s2; 
....................       ++s; 
....................       ++s2; 
....................    } 
....................  
....................    *s = '\0'; 
....................    return(s1); 
.................... } 
.................... /* standard template: char *strncat(char *s1, char *s2,size_t n) 
.................... appends not more than n characters from s2 to s1*/ 
....................  
.................... char *strncat(char *s1, char *s2, size_t n) 
.................... { 
....................    char *s; 
....................  
....................    for (s = s1; *s != '\0'; ++s); 
....................    while(*s2 != '\0' && 0<n) 
....................    { 
....................       *s = *s2; 
....................       ++s; 
....................       ++s2; 
....................       --n; 
....................    } 
....................  
....................    *s = '\0'; 
....................    return(s1); 
.................... } 
....................  
.................... /***********************************************************/ 
....................  
....................  
.................... /*comparison functions*/ 
.................... /* standard template: signed int memcmp(void *s1, void *s2). 
....................    Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */ 
....................  
.................... signed int memcmp(void * s1,char *s2,size_t n) 
.................... { 
.................... char *su1, *su2; 
.................... for(su1=s1, su2=s2; 0<n; ++su1, ++su2, --n) 
.................... { 
....................    if(*su1!=*su2) 
....................       return ((*su1<*su2)?-1:+1); 
.................... } 
.................... return 0; 
.................... } 
....................  
.................... /* standard template: int strcmp(const char *s1, const char *s2). 
....................    Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */ 
....................  
.................... signed int strcmp(char *s1, char *s2) 
.................... { 
....................    for (; *s1 == *s2; s1++, s2++) 
....................       if (*s1 == '\0') 
....................          return(0); 
....................    return((*s1 < *s2) ? -1: 1); 
.................... } 
.................... /* standard template: int strcoll(const char *s1, const char *s2). 
....................    Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */ 
....................  
.................... signed int strcoll(char *s1, char *s2) 
.................... { 
....................    for (; *s1 == *s2; s1++, s2++) 
....................       if (*s1 == '\0') 
....................          return(0); 
....................    return((*s1 < *s2) ? -1: 1); 
.................... } 
....................  
.................... /* standard template: 
....................    int strncmp(const char *s1, const char *s2, size_t n). 
....................    Compares max of n characters (not following 0) from s1 to s2; 
....................    returns same as strcmp */ 
....................  
.................... signed int strncmp(char *s1, char *s2, size_t n) 
.................... { 
....................    for (; n > 0; s1++, s2++, n--) 
....................       if (*s1 != *s2) 
....................          return((*s1 <*s2) ? -1: 1); 
....................       else if (*s1 == '\0') 
....................          return(0); 
....................    return(0); 
.................... } 
.................... /* standard template: 
....................    int strxfrm(const char *s1, const char *s2, size_t n). 
....................    transforms maximum of n characters from s2 and places them into s1*/ 
.................... size_t strxfrm(char *s1, char *s2, size_t n) 
.................... { 
....................   char *s; 
....................   int n1; 
....................   n1=n; 
....................   for (s = s1; n > 0 && *s2 != '\0'; n--) 
....................      *s++ = *s2++; 
....................   for (; n > 0; n--) 
....................      *s++ = '\0'; 
....................  
....................   return(n1); 
.................... } 
....................  
....................  
....................  
....................  
....................  
.................... /***********************************************************/ 
.................... /*Search functions*/ 
.................... /* standard template: void *memchr(const char *s, int c). 
....................    Finds first occurrence of c in n characters of s */ 
....................  
.................... char *memchr(void *s,int c,size_t n) 
.................... { 
....................    char uc; 
....................    char *su; 
....................    uc=c; 
*
03A0:  BSF    03.5
03A1:  MOVF   47,W
03A2:  MOVWF  49
....................    for(su=s;0<n;++su,--n) 
03A3:  MOVF   46,W
03A4:  MOVWF  4A
03A5:  MOVF   48,W
03A6:  SUBLW  00
03A7:  BTFSC  03.0
03A8:  GOTO   3B5
....................       if(*su==uc) 
03A9:  MOVF   4A,W
03AA:  MOVWF  04
03AB:  MOVF   49,W
03AC:  SUBWF  00,W
03AD:  BTFSS  03.2
03AE:  GOTO   3B2
....................       return su; 
03AF:  MOVF   4A,W
03B0:  MOVWF  78
03B1:  GOTO   3B7
03B2:  INCF   4A,F
03B3:  DECF   48,F
03B4:  GOTO   3A5
....................    return NULL; 
03B5:  MOVLW  00
03B6:  MOVWF  78
.................... } 
03B7:  BCF    03.5
03B8:  RETLW  00
....................  
.................... /* standard template: char *strchr(const char *s, int c). 
....................    Finds first occurrence of c in s */ 
....................  
.................... char *strchr(char *s, int c) 
.................... { 
....................    for (; *s != c; s++) 
....................       if (*s == '\0') 
....................          return(0); 
....................    return(s); 
.................... } 
.................... /* standard template: 
....................    size_t strcspn(const char *s1, const char *s2). 
....................    Computes length of max initial segment of s1 that 
....................    consists entirely of characters NOT from s2*/ 
....................  
.................... int *strcspn(char *s1, char *s2) 
.................... { 
....................    char *sc1, *sc2; 
....................  
....................    for (sc1 = s1; *sc1 != 0; sc1++) 
....................       for (sc2 = s2; *sc2 != 0; sc2++) 
....................          if (*sc1 == *sc2) 
....................             return(sc1 - s1); 
....................    return(sc1 - s1); 
.................... } 
.................... /* standard template: 
....................    char *strpbrk(const char *s1, const char *s2). 
....................    Locates first occurence of any character from s2 in s1; 
....................    returns s1 if s2 is empty string */ 
....................  
.................... char *strpbrk(char *s1, char *s2) 
.................... { 
....................    char *sc1, *sc2; 
....................  
....................    for (sc1 = s1; *sc1 != 0; sc1++) 
....................       for (sc2 = s2; *sc2 != 0; sc2++) 
....................          if (*sc1 == *sc2) 
....................             return(sc1); 
....................    return(0); 
.................... } 
....................  
....................  
.................... /* standard template: char *strrchr(const char *s, int c). 
....................    Finds last occurrence of c in s */ 
....................  
.................... char *strrchr(char *s, int c) 
.................... { 
....................    char *p; 
....................  
....................    for (p = 0; ; s++) 
....................    { 
....................       if (*s == c) 
....................          p = s; 
....................       if (*s == '\0') 
....................          return(p); 
....................    } 
.................... } 
.................... /* computes length of max initial segment of s1 consisting 
....................    entirely of characters from s2 */ 
....................  
.................... int *strspn(char *s1, char *s2) 
.................... { 
....................    char *sc1, *sc2; 
....................  
....................    for (sc1 = s1; *sc1 != 0; sc1++) 
....................       for (sc2 = s2; ; sc2++) 
....................     if (*sc2 == '\0') 
....................        return(sc1 - s1); 
....................          else if (*sc1 == *sc2) 
....................             break; 
....................    return(sc1 - s1); 
.................... } 
.................... /* standard template: 
....................    char *strstr(const char *s1, const char *s2); 
....................    Locates first occurence of character sequence s2 in s1; 
....................    returns 0 if s2 is empty string 
....................  
....................    Uncomment #define FASTER_BUT_MORE_ROM at the top of the 
....................    file to use the faster algorithm */ 
.................... char *strstr(char *s1, char *s2) 
.................... { 
....................    char *s, *t; 
....................  
....................    #ifdef FASTER_BUT_MORE_ROM 
....................    if (*s2 == '\0') 
....................          return(s1); 
....................    #endif 
....................  
....................    while (*s1) 
....................    { 
....................       for(s = s1, t = s2; *t && *s == *t; ++s, ++t); 
....................  
....................            if (*t == '\0') 
....................                    return s1; 
....................       ++s1; 
....................       #ifdef FASTER_BUT_MORE_ROM 
....................          while(*s1 != '\0' && *s1 != *s2) 
....................             ++s1; 
....................       #endif 
....................    } 
....................    return 0; 
.................... } 
....................  
.................... /* standard template: char *strtok(char *s1, const char *s2). 
....................  
....................    Finds next token in s1 delimited by a character from separator 
....................    string s2 (which can be different from call to call).  First call 
....................    starts at beginning of s1 searching for first character NOT 
....................    contained in s2; returns 0 if none is found. 
....................    If one is found, it is the start of first token (return value). 
....................    Function then searches from there for a character contained in s2. 
....................    If none is found, current token extends to end of s1, and subsequent 
....................    searches for a token will return 0.  If one is found, it is 
....................    overwritten by '\0', which terminates current token.  Function saves 
....................    pointer to following character from which next search will start. 
....................    Each subsequent call, with 0 as first argument, starts searching 
....................    from saved pointer */ 
....................  
.................... char *strtok(char *s1, char *s2) 
.................... { 
....................    char *beg, *end; 
....................    static char *save; 
*
0817:  CLRF   21
....................  
....................    beg = (s1)? s1: save; 
....................    beg += strspn(beg, s2); 
....................    if (*beg == '\0') 
....................    { 
....................       *save = ' '; 
....................       return(0); 
....................    } 
....................    end = strpbrk(beg, s2); 
....................    if (*end != '\0') 
....................    { 
....................       *end = '\0'; 
....................       end++; 
....................    } 
....................    save = end; 
....................    return(beg); 
.................... } 
....................  
.................... /*****************************************************************/ 
.................... /*Miscellaneous functions*/ 
.................... /* standard template 
.................... maps error number in errnum to an error message string 
.................... Returns: Pointer to string 
.................... */ 
.................... #ifdef _ERRNO 
.................... char * strerror(int errnum) 
.................... { 
.................... char s[15]; 
.................... switch( errnum) 
.................... { 
.................... case 0: 
....................    strcpy(s,"no errors"); 
....................    return s; 
.................... case EDOM : 
....................    strcpy(s,"domain error"); 
....................    return s; 
.................... case ERANGE: 
....................    strcpy(s,"range error"); 
....................    return s; 
.................... } 
.................... } 
.................... #ENDIF 
.................... /* standard template: size_t strlen(const char *s). 
....................    Computes length of s1 (preceding terminating 0) */ 
....................  
.................... int *strlen(char *s) 
.................... { 
....................    char *sc; 
....................  
....................    for (sc = s; *sc != 0; sc++); 
....................    return(sc - s); 
.................... } 
....................  
.................... /* standard template: size_t stricmp(const char *s1, const char *s2). 
....................    Compares s1 to s2 ignoring case (upper vs. lower) */ 
....................  
.................... signed int stricmp(char *s1, char *s2) 
.................... { 
....................  for(; *s1==*s2||(isalpha(*s1)&&isalpha(*s2)&&(*s1==*s2+32||*s2==*s1+32)); 
....................     s1++, s2++) 
....................     if (*s1 == '\0') 
....................        return(0); 
....................  return((*s1 < *s2) ? -1: 1); 
.................... } 
....................  
....................  
.................... /* standard template: char *strlwr(char *s). 
....................    Replaces uppercase letters by lowercase; 
....................    returns pointer to new string s */ 
....................  
.................... char *strlwr(char *s) 
.................... { 
....................    char *p; 
....................  
....................    for (p = s; *p != '\0'; p++) 
....................       if (*p >= 'A' && *p <='Z') 
....................          *p += 'a' - 'A'; 
....................    return(s); 
.................... } 
....................  
....................  
.................... /************************************************************/ 
....................  
....................  
.................... #endif 
....................  
.................... #ifndef getc 
.................... #define getc getch 
.................... #define getchar getch 
.................... #define puts(s) {printf(s); putchar(13); putchar(10);} 
.................... #define putc putchar 
.................... #endif 
.................... /* maps error number to an error message. Writes a sequence of characters to 
.................... stderr stream thus: if s is not null then string pointed to by s follwed by 
.................... a colon (:) and a space and the appropriate error message returned by strerror 
.................... function with argument errno 
....................  
.................... Returns: no value 
.................... */ 
....................  
.................... #ifdef _ERRNO 
.................... void perror(char *s) 
.................... { 
....................   if(s) 
....................   fprintf(STDERR,"%s: ",s); 
....................   fprintf(STDERR,"%s\r\n",strerror(errno)); 
.................... } 
.................... #endif 
.................... #endif 
....................  
.................... #include <string.h> 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services            //// 
.................... //// This source code may only be used by licensed users of the CCS C   //// 
.................... //// compiler.  This source code may only be distributed to other       //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction  //// 
.................... //// or distribution is permitted without written permission.           //// 
.................... //// Derivative programs created using this software in object code     //// 
.................... //// form are not restricted in any way.                                //// 
.................... //////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef _STRING 
.................... #define _STRING 
.................... #include <stddef.h> 
.................... #include <ctype.h> 
....................  
....................  
....................  
.................... ////////////////////////////////////////////// 
.................... //// Uncomment the following define to    //// 
.................... //// allow some functions to use a        //// 
.................... //// quicker algorithm, but use more ROM  //// 
.................... ////                                      //// 
.................... //// #define FASTER_BUT_MORE_ROM          //// 
.................... ////////////////////////////////////////////// 
....................  
....................  
....................  
.................... /*Copying functions*/ 
.................... /* standard template: 
....................    void *memmove(void *s1, void *s2, size_t n). 
....................    Copies max of n characters safely (not following ending '\0') 
....................    from s2 in s1; if s2 has less than n characters, appends 0 */ 
....................  
.................... char *memmove(void *s1,char *s2,size_t n) 
.................... { 
....................    char *sc1; 
....................    char *sc2; 
....................    sc1=s1; 
....................    sc2=s2; 
....................    if(sc2<sc1 && sc1 <sc2 +n) 
....................       for(sc1+=n,sc2+=n;0<n;--n) 
....................          *--sc1=*--sc2; 
....................    else 
....................       for(;0<n;--n) 
....................          *sc1++=*sc2++; 
....................   return s1; 
....................   } 
....................  
.................... /* compiler ignored the name 'strcpy()'; perhaps, it's reserved? 
....................    Standard template: char *strcpy(char *s1, const char *s2) 
....................    copies the string s2 including the null character to s1*/ 
....................  
.................... char *strcopy(char *s1, char *s2) 
.................... { 
....................   char *s; 
....................  
....................   for (s = s1; *s2 != 0; s++, s2++) { 
....................      *s = *s2; 
....................   } 
....................   *s = *s2; 
....................   return(s1); 
.................... } 
....................  
.................... /* standard template: 
....................    char *strncpy(char *s1, const char *s2, size_t n). 
....................    Copies max of n characters (not following ending '\0') 
....................    from s2 in s1; if s2 has less than n characters, appends 0 */ 
....................  
.................... char *strncpy(char *s1, char *s2, size_t n) 
.................... { 
....................   char *s; 
....................  
....................   for (s = s1; n > 0 && *s2 != '\0'; n--) 
....................      *s++ = *s2++; 
....................   for (; n > 0; n--) 
....................      *s++ = '\0'; 
....................  
....................   return(s1); 
.................... } 
.................... /***********************************************************/ 
....................  
.................... /*concatenation functions*/ 
.................... /* standard template: char *strcat(char *s1, const char *s2) 
.................... appends s2 to s1*/ 
....................  
.................... char *strcat(char *s1, char *s2) 
.................... { 
....................    char *s; 
....................  
....................    for (s = s1; *s != '\0'; ++s); 
....................    while(*s2 != '\0') 
....................    { 
....................       *s = *s2; 
....................       ++s; 
....................       ++s2; 
....................    } 
....................  
....................    *s = '\0'; 
....................    return(s1); 
.................... } 
.................... /* standard template: char *strncat(char *s1, char *s2,size_t n) 
.................... appends not more than n characters from s2 to s1*/ 
....................  
.................... char *strncat(char *s1, char *s2, size_t n) 
.................... { 
....................    char *s; 
....................  
....................    for (s = s1; *s != '\0'; ++s); 
....................    while(*s2 != '\0' && 0<n) 
....................    { 
....................       *s = *s2; 
....................       ++s; 
....................       ++s2; 
....................       --n; 
....................    } 
....................  
....................    *s = '\0'; 
....................    return(s1); 
.................... } 
....................  
.................... /***********************************************************/ 
....................  
....................  
.................... /*comparison functions*/ 
.................... /* standard template: signed int memcmp(void *s1, void *s2). 
....................    Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */ 
....................  
.................... signed int memcmp(void * s1,char *s2,size_t n) 
.................... { 
.................... char *su1, *su2; 
.................... for(su1=s1, su2=s2; 0<n; ++su1, ++su2, --n) 
.................... { 
....................    if(*su1!=*su2) 
....................       return ((*su1<*su2)?-1:+1); 
.................... } 
.................... return 0; 
.................... } 
....................  
.................... /* standard template: int strcmp(const char *s1, const char *s2). 
....................    Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */ 
....................  
.................... signed int strcmp(char *s1, char *s2) 
.................... { 
....................    for (; *s1 == *s2; s1++, s2++) 
....................       if (*s1 == '\0') 
....................          return(0); 
....................    return((*s1 < *s2) ? -1: 1); 
.................... } 
.................... /* standard template: int strcoll(const char *s1, const char *s2). 
....................    Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */ 
....................  
.................... signed int strcoll(char *s1, char *s2) 
.................... { 
....................    for (; *s1 == *s2; s1++, s2++) 
....................       if (*s1 == '\0') 
....................          return(0); 
....................    return((*s1 < *s2) ? -1: 1); 
.................... } 
....................  
.................... /* standard template: 
....................    int strncmp(const char *s1, const char *s2, size_t n). 
....................    Compares max of n characters (not following 0) from s1 to s2; 
....................    returns same as strcmp */ 
....................  
.................... signed int strncmp(char *s1, char *s2, size_t n) 
.................... { 
....................    for (; n > 0; s1++, s2++, n--) 
....................       if (*s1 != *s2) 
....................          return((*s1 <*s2) ? -1: 1); 
....................       else if (*s1 == '\0') 
....................          return(0); 
....................    return(0); 
.................... } 
.................... /* standard template: 
....................    int strxfrm(const char *s1, const char *s2, size_t n). 
....................    transforms maximum of n characters from s2 and places them into s1*/ 
.................... size_t strxfrm(char *s1, char *s2, size_t n) 
.................... { 
....................   char *s; 
....................   int n1; 
....................   n1=n; 
....................   for (s = s1; n > 0 && *s2 != '\0'; n--) 
....................      *s++ = *s2++; 
....................   for (; n > 0; n--) 
....................      *s++ = '\0'; 
....................  
....................   return(n1); 
.................... } 
....................  
....................  
....................  
....................  
....................  
.................... /***********************************************************/ 
.................... /*Search functions*/ 
.................... /* standard template: void *memchr(const char *s, int c). 
....................    Finds first occurrence of c in n characters of s */ 
....................  
.................... char *memchr(void *s,int c,size_t n) 
.................... { 
....................    char uc; 
....................    char *su; 
....................    uc=c; 
....................    for(su=s;0<n;++su,--n) 
....................       if(*su==uc) 
....................       return su; 
....................    return NULL; 
.................... } 
....................  
.................... /* standard template: char *strchr(const char *s, int c). 
....................    Finds first occurrence of c in s */ 
....................  
.................... char *strchr(char *s, int c) 
.................... { 
....................    for (; *s != c; s++) 
....................       if (*s == '\0') 
....................          return(0); 
....................    return(s); 
.................... } 
.................... /* standard template: 
....................    size_t strcspn(const char *s1, const char *s2). 
....................    Computes length of max initial segment of s1 that 
....................    consists entirely of characters NOT from s2*/ 
....................  
.................... int *strcspn(char *s1, char *s2) 
.................... { 
....................    char *sc1, *sc2; 
....................  
....................    for (sc1 = s1; *sc1 != 0; sc1++) 
....................       for (sc2 = s2; *sc2 != 0; sc2++) 
....................          if (*sc1 == *sc2) 
....................             return(sc1 - s1); 
....................    return(sc1 - s1); 
.................... } 
.................... /* standard template: 
....................    char *strpbrk(const char *s1, const char *s2). 
....................    Locates first occurence of any character from s2 in s1; 
....................    returns s1 if s2 is empty string */ 
....................  
.................... char *strpbrk(char *s1, char *s2) 
.................... { 
....................    char *sc1, *sc2; 
....................  
....................    for (sc1 = s1; *sc1 != 0; sc1++) 
....................       for (sc2 = s2; *sc2 != 0; sc2++) 
....................          if (*sc1 == *sc2) 
....................             return(sc1); 
....................    return(0); 
.................... } 
....................  
....................  
.................... /* standard template: char *strrchr(const char *s, int c). 
....................    Finds last occurrence of c in s */ 
....................  
.................... char *strrchr(char *s, int c) 
.................... { 
....................    char *p; 
....................  
....................    for (p = 0; ; s++) 
....................    { 
....................       if (*s == c) 
....................          p = s; 
....................       if (*s == '\0') 
....................          return(p); 
....................    } 
.................... } 
.................... /* computes length of max initial segment of s1 consisting 
....................    entirely of characters from s2 */ 
....................  
.................... int *strspn(char *s1, char *s2) 
.................... { 
....................    char *sc1, *sc2; 
....................  
....................    for (sc1 = s1; *sc1 != 0; sc1++) 
....................       for (sc2 = s2; ; sc2++) 
....................     if (*sc2 == '\0') 
....................        return(sc1 - s1); 
....................          else if (*sc1 == *sc2) 
....................             break; 
....................    return(sc1 - s1); 
.................... } 
.................... /* standard template: 
....................    char *strstr(const char *s1, const char *s2); 
....................    Locates first occurence of character sequence s2 in s1; 
....................    returns 0 if s2 is empty string 
....................  
....................    Uncomment #define FASTER_BUT_MORE_ROM at the top of the 
....................    file to use the faster algorithm */ 
.................... char *strstr(char *s1, char *s2) 
.................... { 
....................    char *s, *t; 
....................  
....................    #ifdef FASTER_BUT_MORE_ROM 
....................    if (*s2 == '\0') 
....................          return(s1); 
....................    #endif 
....................  
....................    while (*s1) 
....................    { 
....................       for(s = s1, t = s2; *t && *s == *t; ++s, ++t); 
....................  
....................            if (*t == '\0') 
....................                    return s1; 
....................       ++s1; 
....................       #ifdef FASTER_BUT_MORE_ROM 
....................          while(*s1 != '\0' && *s1 != *s2) 
....................             ++s1; 
....................       #endif 
....................    } 
....................    return 0; 
.................... } 
....................  
.................... /* standard template: char *strtok(char *s1, const char *s2). 
....................  
....................    Finds next token in s1 delimited by a character from separator 
....................    string s2 (which can be different from call to call).  First call 
....................    starts at beginning of s1 searching for first character NOT 
....................    contained in s2; returns 0 if none is found. 
....................    If one is found, it is the start of first token (return value). 
....................    Function then searches from there for a character contained in s2. 
....................    If none is found, current token extends to end of s1, and subsequent 
....................    searches for a token will return 0.  If one is found, it is 
....................    overwritten by '\0', which terminates current token.  Function saves 
....................    pointer to following character from which next search will start. 
....................    Each subsequent call, with 0 as first argument, starts searching 
....................    from saved pointer */ 
....................  
.................... char *strtok(char *s1, char *s2) 
.................... { 
....................    char *beg, *end; 
....................    static char *save; 
....................  
....................    beg = (s1)? s1: save; 
....................    beg += strspn(beg, s2); 
....................    if (*beg == '\0') 
....................    { 
....................       *save = ' '; 
....................       return(0); 
....................    } 
....................    end = strpbrk(beg, s2); 
....................    if (*end != '\0') 
....................    { 
....................       *end = '\0'; 
....................       end++; 
....................    } 
....................    save = end; 
....................    return(beg); 
.................... } 
....................  
.................... /*****************************************************************/ 
.................... /*Miscellaneous functions*/ 
.................... /* standard template 
.................... maps error number in errnum to an error message string 
.................... Returns: Pointer to string 
.................... */ 
.................... #ifdef _ERRNO 
.................... char * strerror(int errnum) 
.................... { 
.................... char s[15]; 
.................... switch( errnum) 
.................... { 
.................... case 0: 
....................    strcpy(s,"no errors"); 
....................    return s; 
.................... case EDOM : 
....................    strcpy(s,"domain error"); 
....................    return s; 
.................... case ERANGE: 
....................    strcpy(s,"range error"); 
....................    return s; 
.................... } 
.................... } 
.................... #ENDIF 
.................... /* standard template: size_t strlen(const char *s). 
....................    Computes length of s1 (preceding terminating 0) */ 
....................  
.................... int *strlen(char *s) 
.................... { 
....................    char *sc; 
....................  
....................    for (sc = s; *sc != 0; sc++); 
....................    return(sc - s); 
.................... } 
....................  
.................... /* standard template: size_t stricmp(const char *s1, const char *s2). 
....................    Compares s1 to s2 ignoring case (upper vs. lower) */ 
....................  
.................... signed int stricmp(char *s1, char *s2) 
.................... { 
....................  for(; *s1==*s2||(isalpha(*s1)&&isalpha(*s2)&&(*s1==*s2+32||*s2==*s1+32)); 
....................     s1++, s2++) 
....................     if (*s1 == '\0') 
....................        return(0); 
....................  return((*s1 < *s2) ? -1: 1); 
.................... } 
....................  
....................  
.................... /* standard template: char *strlwr(char *s). 
....................    Replaces uppercase letters by lowercase; 
....................    returns pointer to new string s */ 
....................  
.................... char *strlwr(char *s) 
.................... { 
....................    char *p; 
....................  
....................    for (p = s; *p != '\0'; p++) 
....................       if (*p >= 'A' && *p <='Z') 
....................          *p += 'a' - 'A'; 
....................    return(s); 
.................... } 
....................  
....................  
.................... /************************************************************/ 
....................  
....................  
.................... #endif 
....................  
.................... #include <stdlib.h> 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services           //// 
.................... //// This source code may only be used by licensed users of the CCS C  //// 
.................... //// compiler.  This source code may only be distributed to other      //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction //// 
.................... //// or distribution is permitted without written permission.          //// 
.................... //// Derivative programs created using this software in object code    //// 
.................... //// form are not restricted in any way.                               //// 
.................... /////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef _STDLIB 
.................... #define _STDLIB 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Definitions and types 
.................... //--------------------------------------------------------------------------- 
....................  
.................... #ifndef RAND_MAX 
.................... #define RAND_MAX  32767    // The value of which is the maximum value 
....................                            // ... returned by the rand function 
.................... #endif 
....................  
.................... typedef struct { 
....................    signed int quot; 
....................    signed int rem; 
.................... } div_t; 
....................  
.................... typedef struct { 
....................    signed long quot; 
....................    signed long rem; 
.................... } ldiv_t; 
....................  
.................... #include <stddef.h> 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services           //// 
.................... //// This source code may only be used by licensed users of the CCS C  //// 
.................... //// compiler.  This source code may only be distributed to other      //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction //// 
.................... //// or distribution is permitted without written permission.          //// 
.................... //// Derivative programs created using this software in object code    //// 
.................... //// form are not restricted in any way.                               //// 
.................... /////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef _STDDEF 
....................  
.................... #define _STDDEF 
....................  
.................... #if sizeof(int *)==1 
.................... #define ptrdiff_t int 
.................... #else 
.................... #define ptrdiff_t long 
.................... #endif 
....................  
.................... #define size_t int 
.................... #define wchar_t char 
.................... #define NULL 0 
....................  
.................... #define offsetof(s,f) (offsetofbit(s,f)/8) 
....................  
.................... #endif 
....................  
....................  
.................... //--------------------------------------------------------------------------- 
.................... // String conversion functions 
.................... //--------------------------------------------------------------------------- 
....................  
.................... /* Standard template: float atof(char * s) 
....................  * converts the initial portion of the string s to a float. 
....................  * returns the converted value if any, 0 otherwise 
....................  */ 
.................... float atof(char * s); 
....................  
.................... /* Standard template: float atoe(char * s) 
....................  * converts the initial portion of the string s to a float. 
....................  * returns the converted value if any, 0 otherwise 
....................  * also handles E format numbers 
....................  */ 
.................... float atoe(char * s); 
....................  
.................... /* Standard template: signed int  atoi(char * s) 
....................  * converts the initial portion of the string s to a signed int 
....................  * returns the converted value if any, 0 otherwise 
....................  */ 
.................... signed int atoi(char *s); 
....................  
.................... /* Syntax: signed int32  atoi32(char * s) 
....................    converts the initial portion of the string s to a signed int32 
....................    returns the converted value if any, 0 otherwise*/ 
.................... signed int32 atoi32(char *s); 
....................  
.................... /* Syntax: char *  itoa(signed int32 num, int8 base, char * s) 
....................    converts the signed int32 to a string and 
....................    returns the converted value if any, 0 otherwise*/ 
.................... char * itoa(signed int32 num, int8 base, char * s); 
....................  
.................... /* Standard template: signed long  atol(char * s) 
....................  * converts the initial portion of the string s to a signed long 
....................  * returns the converted value if any, 0 otherwise 
....................  */ 
.................... signed long atol(char *s); 
....................  
.................... /* Standard template: float strtol(char * s,char *endptr) 
....................  * converts the initial portion of the string s to a float 
....................  * returns the converted value if any, 0 otherwise 
....................  * the final string is returned in the endptr, if endptr is not null 
....................  */ 
.................... float strtod(char *s,char *endptr); 
....................  
.................... /* Standard template: long strtoul(char * s,char *endptr,signed int base) 
....................  * converts the initial portion of the string s, represented as an 
....................  * integral value of radix base  to a signed long. 
....................  * Returns the converted value if any, 0 otherwise 
....................  * the final string is returned in the endptr, if endptr is not null 
....................  */ 
.................... signed long strtol(char *s,char *endptr,signed int base); 
....................  
.................... /* Standard template: long strtoul(char * s,char *endptr,signed int base) 
....................  * converts the initial portion of the string s, represented as an 
....................  * integral value of radix base to a unsigned long. 
....................  * returns the converted value if any, 0 otherwise 
....................  * the final string is returned in the endptr, if endptr is not null 
....................  */ 
.................... long strtoul(char *s,char *endptr,signed int base); 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Pseudo-random sequence generation functions 
.................... //--------------------------------------------------------------------------- 
....................  
.................... /* The rand function computes a sequence of pseudo-random integers in 
....................  * the range 0 to RAND_MAX 
....................  * 
....................  * Parameters: 
....................  *       (none) 
....................  * 
....................  * Returns: 
....................  *       The pseudo-random integer 
....................  */ 
.................... long rand(void); 
....................  
.................... /* The srand function uses the argument as a seed for a new sequence of 
....................  * pseudo-random numbers to be returned by subsequent calls to rand. 
....................  * 
....................  * Parameters: 
....................  *       [in] seed: The seed value to start from. You might need to pass 
....................  * 
....................  * Returns: 
....................  *       (none) 
....................  * 
....................  * Remarks 
....................  *          The srand function sets the starting point for generating 
....................  *       a series of pseudorandom integers. To reinitialize the 
....................  *       generator, use 1 as the seed argument. Any other value for 
....................  *       seed sets the generator to a random starting point. rand 
....................  *       retrieves the pseudorandom numbers that are generated. 
....................  *       Calling rand before any call to srand generates the same 
....................  *       sequence as calling srand with seed passed as 1. 
....................  *          Usually, you need to pass a time here from outer source 
....................  *       so that the numbers will be different every time you run. 
....................  */ 
.................... void srand(unsigned int32 seed); 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Memory management functions 
.................... //--------------------------------------------------------------------------- 
....................  
.................... // Comming soon 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Communication with the environment 
.................... //--------------------------------------------------------------------------- 
....................  
.................... /* The function returns 0 always 
....................  */ 
.................... signed int system(char *string); 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Searching and sorting utilities 
.................... //--------------------------------------------------------------------------- 
....................  
.................... /* Performs a binary search of a sorted array.. 
....................  * 
....................  * Parameters: 
....................  *       [in] key: Object to search for 
....................  *       [in] base: Pointer to base of search data 
....................  *       [in] num: Number of elements 
....................  *       [in] width: Width of elements 
....................  *       [in] compare: Function that compares two elements 
....................  * 
....................  * Returns: 
....................  *       bsearch returns a pointer to an occurrence of key in the array pointed 
....................  *       to by base. If key is not found, the function returns NULL. If the 
....................  *       array is not in order or contains duplicate records with identical keys, 
....................  *       the result is unpredictable. 
....................  */ 
.................... //void *bsearch(const void *key, const void *base, size_t num, size_t width, 
.................... //              int (*compare)(const void *, const void *)); 
....................  
.................... /* Performs the shell-metzner sort (not the quick sort algorithm). The contents 
....................  * of the array are sorted into ascending order according to a comparison 
....................  * function pointed to by compar. 
....................  * 
....................  * Parameters: 
....................  *       [in] base: Pointer to base of search data 
....................  *       [in] num: Number of elements 
....................  *       [in] width: Width of elements 
....................  *       [in] compare: Function that compares two elements 
....................  * 
....................  * Returns: 
....................  *       (none) 
....................  */ 
.................... //void *qsort(const void *base, size_t num, size_t width, 
.................... //              int (*compare)(const void *, const void *)); 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Integer arithmetic functions 
.................... //--------------------------------------------------------------------------- 
....................  
.................... #define labs abs 
....................  
.................... div_t div(signed int numer,signed int denom); 
.................... ldiv_t ldiv(signed long numer,signed long denom); 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Multibyte character functions 
.................... //--------------------------------------------------------------------------- 
....................  
.................... // Not supported 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Multibyte string functions 
.................... //--------------------------------------------------------------------------- 
....................  
.................... // Not supported 
....................  
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Internal implementation 
.................... //--------------------------------------------------------------------------- 
....................  
.................... #include <stddef.h> 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services           //// 
.................... //// This source code may only be used by licensed users of the CCS C  //// 
.................... //// compiler.  This source code may only be distributed to other      //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction //// 
.................... //// or distribution is permitted without written permission.          //// 
.................... //// Derivative programs created using this software in object code    //// 
.................... //// form are not restricted in any way.                               //// 
.................... /////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef _STDDEF 
....................  
.................... #define _STDDEF 
....................  
.................... #if sizeof(int *)==1 
.................... #define ptrdiff_t int 
.................... #else 
.................... #define ptrdiff_t long 
.................... #endif 
....................  
.................... #define size_t int 
.................... #define wchar_t char 
.................... #define NULL 0 
....................  
.................... #define offsetof(s,f) (offsetofbit(s,f)/8) 
....................  
.................... #endif 
....................  
.................... #include <string.h> 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2003 Custom Computer Services            //// 
.................... //// This source code may only be used by licensed users of the CCS C   //// 
.................... //// compiler.  This source code may only be distributed to other       //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction  //// 
.................... //// or distribution is permitted without written permission.           //// 
.................... //// Derivative programs created using this software in object code     //// 
.................... //// form are not restricted in any way.                                //// 
.................... //////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef _STRING 
.................... #define _STRING 
.................... #include <stddef.h> 
.................... #include <ctype.h> 
....................  
....................  
....................  
.................... ////////////////////////////////////////////// 
.................... //// Uncomment the following define to    //// 
.................... //// allow some functions to use a        //// 
.................... //// quicker algorithm, but use more ROM  //// 
.................... ////                                      //// 
.................... //// #define FASTER_BUT_MORE_ROM          //// 
.................... ////////////////////////////////////////////// 
....................  
....................  
....................  
.................... /*Copying functions*/ 
.................... /* standard template: 
....................    void *memmove(void *s1, void *s2, size_t n). 
....................    Copies max of n characters safely (not following ending '\0') 
....................    from s2 in s1; if s2 has less than n characters, appends 0 */ 
....................  
.................... char *memmove(void *s1,char *s2,size_t n) 
.................... { 
....................    char *sc1; 
....................    char *sc2; 
....................    sc1=s1; 
....................    sc2=s2; 
....................    if(sc2<sc1 && sc1 <sc2 +n) 
....................       for(sc1+=n,sc2+=n;0<n;--n) 
....................          *--sc1=*--sc2; 
....................    else 
....................       for(;0<n;--n) 
....................          *sc1++=*sc2++; 
....................   return s1; 
....................   } 
....................  
.................... /* compiler ignored the name 'strcpy()'; perhaps, it's reserved? 
....................    Standard template: char *strcpy(char *s1, const char *s2) 
....................    copies the string s2 including the null character to s1*/ 
....................  
.................... char *strcopy(char *s1, char *s2) 
.................... { 
....................   char *s; 
....................  
....................   for (s = s1; *s2 != 0; s++, s2++) { 
....................      *s = *s2; 
....................   } 
....................   *s = *s2; 
....................   return(s1); 
.................... } 
....................  
.................... /* standard template: 
....................    char *strncpy(char *s1, const char *s2, size_t n). 
....................    Copies max of n characters (not following ending '\0') 
....................    from s2 in s1; if s2 has less than n characters, appends 0 */ 
....................  
.................... char *strncpy(char *s1, char *s2, size_t n) 
.................... { 
....................   char *s; 
....................  
....................   for (s = s1; n > 0 && *s2 != '\0'; n--) 
....................      *s++ = *s2++; 
....................   for (; n > 0; n--) 
....................      *s++ = '\0'; 
....................  
....................   return(s1); 
.................... } 
.................... /***********************************************************/ 
....................  
.................... /*concatenation functions*/ 
.................... /* standard template: char *strcat(char *s1, const char *s2) 
.................... appends s2 to s1*/ 
....................  
.................... char *strcat(char *s1, char *s2) 
.................... { 
....................    char *s; 
....................  
....................    for (s = s1; *s != '\0'; ++s); 
....................    while(*s2 != '\0') 
....................    { 
....................       *s = *s2; 
....................       ++s; 
....................       ++s2; 
....................    } 
....................  
....................    *s = '\0'; 
....................    return(s1); 
.................... } 
.................... /* standard template: char *strncat(char *s1, char *s2,size_t n) 
.................... appends not more than n characters from s2 to s1*/ 
....................  
.................... char *strncat(char *s1, char *s2, size_t n) 
.................... { 
....................    char *s; 
....................  
....................    for (s = s1; *s != '\0'; ++s); 
....................    while(*s2 != '\0' && 0<n) 
....................    { 
....................       *s = *s2; 
....................       ++s; 
....................       ++s2; 
....................       --n; 
....................    } 
....................  
....................    *s = '\0'; 
....................    return(s1); 
.................... } 
....................  
.................... /***********************************************************/ 
....................  
....................  
.................... /*comparison functions*/ 
.................... /* standard template: signed int memcmp(void *s1, void *s2). 
....................    Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */ 
....................  
.................... signed int memcmp(void * s1,char *s2,size_t n) 
.................... { 
.................... char *su1, *su2; 
.................... for(su1=s1, su2=s2; 0<n; ++su1, ++su2, --n) 
.................... { 
....................    if(*su1!=*su2) 
....................       return ((*su1<*su2)?-1:+1); 
.................... } 
.................... return 0; 
.................... } 
....................  
.................... /* standard template: int strcmp(const char *s1, const char *s2). 
....................    Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */ 
....................  
.................... signed int strcmp(char *s1, char *s2) 
.................... { 
....................    for (; *s1 == *s2; s1++, s2++) 
....................       if (*s1 == '\0') 
....................          return(0); 
....................    return((*s1 < *s2) ? -1: 1); 
.................... } 
.................... /* standard template: int strcoll(const char *s1, const char *s2). 
....................    Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */ 
....................  
.................... signed int strcoll(char *s1, char *s2) 
.................... { 
....................    for (; *s1 == *s2; s1++, s2++) 
....................       if (*s1 == '\0') 
....................          return(0); 
....................    return((*s1 < *s2) ? -1: 1); 
.................... } 
....................  
.................... /* standard template: 
....................    int strncmp(const char *s1, const char *s2, size_t n). 
....................    Compares max of n characters (not following 0) from s1 to s2; 
....................    returns same as strcmp */ 
....................  
.................... signed int strncmp(char *s1, char *s2, size_t n) 
.................... { 
....................    for (; n > 0; s1++, s2++, n--) 
....................       if (*s1 != *s2) 
....................          return((*s1 <*s2) ? -1: 1); 
....................       else if (*s1 == '\0') 
....................          return(0); 
....................    return(0); 
.................... } 
.................... /* standard template: 
....................    int strxfrm(const char *s1, const char *s2, size_t n). 
....................    transforms maximum of n characters from s2 and places them into s1*/ 
.................... size_t strxfrm(char *s1, char *s2, size_t n) 
.................... { 
....................   char *s; 
....................   int n1; 
....................   n1=n; 
....................   for (s = s1; n > 0 && *s2 != '\0'; n--) 
....................      *s++ = *s2++; 
....................   for (; n > 0; n--) 
....................      *s++ = '\0'; 
....................  
....................   return(n1); 
.................... } 
....................  
....................  
....................  
....................  
....................  
.................... /***********************************************************/ 
.................... /*Search functions*/ 
.................... /* standard template: void *memchr(const char *s, int c). 
....................    Finds first occurrence of c in n characters of s */ 
....................  
.................... char *memchr(void *s,int c,size_t n) 
.................... { 
....................    char uc; 
....................    char *su; 
....................    uc=c; 
....................    for(su=s;0<n;++su,--n) 
....................       if(*su==uc) 
....................       return su; 
....................    return NULL; 
.................... } 
....................  
.................... /* standard template: char *strchr(const char *s, int c). 
....................    Finds first occurrence of c in s */ 
....................  
.................... char *strchr(char *s, int c) 
.................... { 
....................    for (; *s != c; s++) 
....................       if (*s == '\0') 
....................          return(0); 
....................    return(s); 
.................... } 
.................... /* standard template: 
....................    size_t strcspn(const char *s1, const char *s2). 
....................    Computes length of max initial segment of s1 that 
....................    consists entirely of characters NOT from s2*/ 
....................  
.................... int *strcspn(char *s1, char *s2) 
.................... { 
....................    char *sc1, *sc2; 
....................  
....................    for (sc1 = s1; *sc1 != 0; sc1++) 
....................       for (sc2 = s2; *sc2 != 0; sc2++) 
....................          if (*sc1 == *sc2) 
....................             return(sc1 - s1); 
....................    return(sc1 - s1); 
.................... } 
.................... /* standard template: 
....................    char *strpbrk(const char *s1, const char *s2). 
....................    Locates first occurence of any character from s2 in s1; 
....................    returns s1 if s2 is empty string */ 
....................  
.................... char *strpbrk(char *s1, char *s2) 
.................... { 
....................    char *sc1, *sc2; 
....................  
....................    for (sc1 = s1; *sc1 != 0; sc1++) 
....................       for (sc2 = s2; *sc2 != 0; sc2++) 
....................          if (*sc1 == *sc2) 
....................             return(sc1); 
....................    return(0); 
.................... } 
....................  
....................  
.................... /* standard template: char *strrchr(const char *s, int c). 
....................    Finds last occurrence of c in s */ 
....................  
.................... char *strrchr(char *s, int c) 
.................... { 
....................    char *p; 
....................  
....................    for (p = 0; ; s++) 
....................    { 
....................       if (*s == c) 
....................          p = s; 
....................       if (*s == '\0') 
....................          return(p); 
....................    } 
.................... } 
.................... /* computes length of max initial segment of s1 consisting 
....................    entirely of characters from s2 */ 
....................  
.................... int *strspn(char *s1, char *s2) 
.................... { 
....................    char *sc1, *sc2; 
....................  
....................    for (sc1 = s1; *sc1 != 0; sc1++) 
....................       for (sc2 = s2; ; sc2++) 
....................     if (*sc2 == '\0') 
....................        return(sc1 - s1); 
....................          else if (*sc1 == *sc2) 
....................             break; 
....................    return(sc1 - s1); 
.................... } 
.................... /* standard template: 
....................    char *strstr(const char *s1, const char *s2); 
....................    Locates first occurence of character sequence s2 in s1; 
....................    returns 0 if s2 is empty string 
....................  
....................    Uncomment #define FASTER_BUT_MORE_ROM at the top of the 
....................    file to use the faster algorithm */ 
.................... char *strstr(char *s1, char *s2) 
.................... { 
....................    char *s, *t; 
....................  
....................    #ifdef FASTER_BUT_MORE_ROM 
....................    if (*s2 == '\0') 
....................          return(s1); 
....................    #endif 
....................  
....................    while (*s1) 
....................    { 
....................       for(s = s1, t = s2; *t && *s == *t; ++s, ++t); 
....................  
....................            if (*t == '\0') 
....................                    return s1; 
....................       ++s1; 
....................       #ifdef FASTER_BUT_MORE_ROM 
....................          while(*s1 != '\0' && *s1 != *s2) 
....................             ++s1; 
....................       #endif 
....................    } 
....................    return 0; 
.................... } 
....................  
.................... /* standard template: char *strtok(char *s1, const char *s2). 
....................  
....................    Finds next token in s1 delimited by a character from separator 
....................    string s2 (which can be different from call to call).  First call 
....................    starts at beginning of s1 searching for first character NOT 
....................    contained in s2; returns 0 if none is found. 
....................    If one is found, it is the start of first token (return value). 
....................    Function then searches from there for a character contained in s2. 
....................    If none is found, current token extends to end of s1, and subsequent 
....................    searches for a token will return 0.  If one is found, it is 
....................    overwritten by '\0', which terminates current token.  Function saves 
....................    pointer to following character from which next search will start. 
....................    Each subsequent call, with 0 as first argument, starts searching 
....................    from saved pointer */ 
....................  
.................... char *strtok(char *s1, char *s2) 
.................... { 
....................    char *beg, *end; 
....................    static char *save; 
....................  
....................    beg = (s1)? s1: save; 
....................    beg += strspn(beg, s2); 
....................    if (*beg == '\0') 
....................    { 
....................       *save = ' '; 
....................       return(0); 
....................    } 
....................    end = strpbrk(beg, s2); 
....................    if (*end != '\0') 
....................    { 
....................       *end = '\0'; 
....................       end++; 
....................    } 
....................    save = end; 
....................    return(beg); 
.................... } 
....................  
.................... /*****************************************************************/ 
.................... /*Miscellaneous functions*/ 
.................... /* standard template 
.................... maps error number in errnum to an error message string 
.................... Returns: Pointer to string 
.................... */ 
.................... #ifdef _ERRNO 
.................... char * strerror(int errnum) 
.................... { 
.................... char s[15]; 
.................... switch( errnum) 
.................... { 
.................... case 0: 
....................    strcpy(s,"no errors"); 
....................    return s; 
.................... case EDOM : 
....................    strcpy(s,"domain error"); 
....................    return s; 
.................... case ERANGE: 
....................    strcpy(s,"range error"); 
....................    return s; 
.................... } 
.................... } 
.................... #ENDIF 
.................... /* standard template: size_t strlen(const char *s). 
....................    Computes length of s1 (preceding terminating 0) */ 
....................  
.................... int *strlen(char *s) 
.................... { 
....................    char *sc; 
....................  
....................    for (sc = s; *sc != 0; sc++); 
....................    return(sc - s); 
.................... } 
....................  
.................... /* standard template: size_t stricmp(const char *s1, const char *s2). 
....................    Compares s1 to s2 ignoring case (upper vs. lower) */ 
....................  
.................... signed int stricmp(char *s1, char *s2) 
.................... { 
....................  for(; *s1==*s2||(isalpha(*s1)&&isalpha(*s2)&&(*s1==*s2+32||*s2==*s1+32)); 
....................     s1++, s2++) 
....................     if (*s1 == '\0') 
....................        return(0); 
....................  return((*s1 < *s2) ? -1: 1); 
.................... } 
....................  
....................  
.................... /* standard template: char *strlwr(char *s). 
....................    Replaces uppercase letters by lowercase; 
....................    returns pointer to new string s */ 
....................  
.................... char *strlwr(char *s) 
.................... { 
....................    char *p; 
....................  
....................    for (p = s; *p != '\0'; p++) 
....................       if (*p >= 'A' && *p <='Z') 
....................          *p += 'a' - 'A'; 
....................    return(s); 
.................... } 
....................  
....................  
.................... /************************************************************/ 
....................  
....................  
.................... #endif 
....................  
....................  
.................... div_t div(signed int numer,signed int denom) 
.................... { 
....................    div_t val; 
....................    val.quot = numer / denom; 
....................    val.rem = numer - (denom * val.quot); 
....................    return (val); 
.................... } 
....................  
.................... ldiv_t ldiv(signed long numer,signed long denom) 
.................... { 
....................    ldiv_t val; 
....................    val.quot = numer / denom; 
....................    val.rem = numer - (denom * val.quot); 
....................    return (val); 
.................... } 
....................  
.................... float atof(char * s) 
.................... { 
....................    float pow10 = 1.0; 
....................    float result = 0.0; 
....................    int sign = 0; 
....................    char c; 
....................    int ptr = 0; 
....................  
....................    c = s[ptr++]; 
....................  
....................    if ((c>='0' && c<='9') || c=='+' || c=='-' || c=='.') { 
....................       if(c == '-') { 
....................          sign = 1; 
....................          c = s[ptr++]; 
....................       } 
....................       if(c == '+') 
....................          c = s[ptr++]; 
....................  
....................       while((c >= '0' && c <= '9')) { 
....................          result = 10*result + c - '0'; 
....................          c = s[ptr++]; 
....................       } 
....................  
....................       if (c == '.') { 
....................          c = s[ptr++]; 
....................          while((c >= '0' && c <= '9')) { 
....................              pow10 = pow10*10; 
....................              result += (c - '0')/pow10; 
....................              c = s[ptr++]; 
....................          } 
....................       } 
....................  
....................    } 
....................  
....................    if (sign == 1) 
....................       result = -1*result; 
....................    return(result); 
.................... } 
....................  
.................... float atoe(char * s) 
.................... { 
....................    float pow10 = 1.0; 
....................    float result = 0.0; 
....................    int sign = 0; 
....................    int expsign = 0; 
....................    char c; 
....................    int ptr = 0; 
....................    int i; 
....................    float exp = 1.0; 
....................    int expcnt = 0; 
....................  
....................    c = s[ptr++]; 
....................  
....................    if ((c>='0' && c<='9') || c=='+' || c=='-' || c=='.' || c=='E' || c=='e') { 
....................       if(c == '-') { 
....................          sign = 1; 
....................          c = s[ptr++]; 
....................       } 
....................       if(c == '+') 
....................          c = s[ptr++]; 
....................  
....................       while((c >= '0' && c <= '9')) { 
....................          result = 10*result + c - '0'; 
....................          c = s[ptr++]; 
....................       } 
....................  
....................       if (c == '.') { 
....................          c = s[ptr++]; 
....................          while((c >= '0' && c <= '9')) { 
....................              pow10 = pow10*10; 
....................              result += (c - '0')/pow10; 
....................              c = s[ptr++]; 
....................          } 
....................       } 
....................  
....................       // Handling the exponent 
....................       if (c=='e' || c=='E') { 
....................          c = s[ptr++]; 
....................  
....................          if(c == '-') { 
....................             expsign = 1; 
....................             c = s[ptr++]; 
....................          } 
....................          if(c == '+') 
....................             c = s[ptr++]; 
....................  
....................          while((c >= '0' && c <= '9')) { 
....................             expcnt = 10*expcnt + c - '0'; 
....................             c = s[ptr++]; 
....................          } 
....................  
....................          for(i=0;i<expcnt;i++) 
....................             exp*=10; 
....................  
....................          if(expsign==1) 
....................             result/=exp; 
....................          else 
....................             result*=exp; 
....................       } 
....................    } 
....................  
....................    if (sign == 1) 
....................       result = -1*result; 
....................    return(result); 
.................... } 
....................  
.................... signed int atoi(char *s) 
.................... { 
....................    signed int result; 
....................    int sign, base, index; 
....................    char c; 
....................  
....................    index = 0; 
....................    sign = 0; 
....................    base = 10; 
....................    result = 0; 
....................  
....................    if (!s) 
....................       return 0; 
....................    // Omit all preceeding alpha characters 
....................    c = s[index++]; 
....................  
....................    // increase index if either positive or negative sign is detected 
....................    if (c == '-') 
....................    { 
....................       sign = 1;         // Set the sign to negative 
....................       c = s[index++]; 
....................    } 
....................    else if (c == '+') 
....................    { 
....................       c = s[index++]; 
....................    } 
....................  
....................    if (c >= '0' && c <= '9') 
....................    { 
....................  
....................       // Check for hexa number 
....................       if (c == '0' && (s[index] == 'x' || s[index] == 'X')) 
....................       { 
....................          base = 16; 
....................          index++; 
....................          c = s[index++]; 
....................       } 
....................  
....................       // The number is a decimal number 
....................       if (base == 10) 
....................       { 
....................          while (c >= '0' && c <= '9') 
....................          { 
....................             result = 10*result + (c - '0'); 
....................             c = s[index++]; 
....................          } 
....................       } 
....................       else if (base == 16)    // The number is a hexa number 
....................       { 
....................          c = toupper(c); 
....................          while ( (c >= '0' && c <= '9') || (c >= 'A' && c<='F')) 
....................          { 
....................             if (c >= '0' && c <= '9') 
....................                result = (result << 4) + (c - '0'); 
....................             else 
....................                result = (result << 4) + (c - 'A' + 10); 
....................  
....................             c = s[index++]; 
....................             c = toupper(c); 
....................          } 
....................       } 
....................    } 
....................  
....................    if (sign == 1 && base == 10) 
....................        result = -result; 
....................  
....................    return(result); 
.................... } 
....................  
.................... signed long atol(char *s) 
.................... { 
....................    signed long result; 
....................    int sign, base, index; 
....................    char c; 
....................  
....................    index = 0; 
....................    sign = 0; 
....................    base = 10; 
....................    result = 0; 
....................  
....................    if (!s) 
....................       return 0; 
....................    c = s[index++]; 
....................  
....................    // increase index if either positive or negative sign is detected 
....................    if (c == '-') 
....................    { 
....................       sign = 1;         // Set the sign to negative 
....................       c = s[index++]; 
....................    } 
....................    else if (c == '+') 
....................    { 
....................       c = s[index++]; 
....................    } 
....................  
....................    if (c >= '0' && c <= '9') 
....................    { 
....................       if (c == '0' && (s[index] == 'x' || s[index] == 'X')) 
....................       { 
....................          base = 16; 
....................          index++; 
....................          c = s[index++]; 
....................       } 
....................  
....................       // The number is a decimal number 
....................       if (base == 10) 
....................       { 
....................          while (c >= '0' && c <= '9') 
....................          { 
....................             result = 10*result + (c - '0'); 
....................             c = s[index++]; 
....................          } 
....................       } 
....................       else if (base == 16)    // The number is a hexa number 
....................       { 
....................          c = toupper(c); 
....................          while ( (c >= '0' && c <= '9') || (c >= 'A' && c <='F')) 
....................          { 
....................             if (c >= '0' && c <= '9') 
....................                result = (result << 4) + (c - '0'); 
....................             else 
....................                result = (result << 4) + (c - 'A' + 10); 
....................  
....................             c = s[index++];c = toupper(c); 
....................          } 
....................       } 
....................    } 
....................  
....................    if (base == 10 && sign == 1) 
....................       result = -result; 
....................  
....................    return(result); 
.................... } 
....................  
.................... /* A fast routine to multiply by 10 
....................  */ 
.................... signed int32 mult_with10(int32 num) 
.................... { 
....................    return ( (num << 1) + (num << 3) ); 
.................... } 
....................  
.................... signed int32 atoi32(char *s) 
.................... { 
....................    signed int32 result; 
....................    int sign, base, index; 
....................    char c; 
....................  
....................    index = 0; 
....................    sign = 0; 
....................    base = 10; 
....................    result = 0; 
....................  
....................    if (!s) 
....................       return 0; 
....................    c = s[index++]; 
....................  
....................    // increase index if either positive or negative sign is detected 
....................    if (c == '-') 
....................    { 
....................       sign = 1;         // Set the sign to negative 
....................       c = s[index++]; 
....................    } 
....................    else if (c == '+') 
....................    { 
....................       c = s[index++]; 
....................    } 
....................  
....................    if (c >= '0' && c <= '9') 
....................    { 
....................       if (c == '0' && (s[index] == 'x' || s[index] == 'X')) 
....................       { 
....................          base = 16; 
....................          index++; 
....................          c = s[index++]; 
....................       } 
....................  
....................       // The number is a decimal number 
....................       if (base == 10) 
....................       { 
....................          while (c >= '0' && c <= '9') { 
....................             result = (result << 1) + (result << 3);  // result *= 10; 
....................             result += (c - '0'); 
....................             c = s[index++]; 
....................          } 
....................       } 
....................       else if (base == 16)    // The number is a hexa number 
....................       { 
....................          c = toupper(c); 
....................          while ((c >= '0' && c <= '9') || (c >= 'A' && c <='F')) 
....................          { 
....................             if (c >= '0' && c <= '9') 
....................                result = (result << 4) + (c - '0'); 
....................             else 
....................                result = (result << 4) + (c - 'A' + 10); 
....................  
....................             c = s[index++];c = toupper(c); 
....................          } 
....................       } 
....................    } 
....................  
....................    if (base == 10 && sign == 1) 
....................       result = -result; 
....................  
....................    return(result); 
.................... } 
....................  
.................... char * itoa(signed int32 num, int8 base, char *s) 
.................... { 
....................      int32 temp=1; 
....................      int8 i,sign=0,cnt=0; 
....................      char c; 
....................  
....................      if(num<0) { 
....................          sign=1;        // Check for negative number 
....................          num*=-1; 
....................      } 
....................  
....................      while(temp>0) { 
....................          temp=(num/base); 
....................          s[cnt]=(num%base)+'0';    // Conversion 
....................  
....................          if(s[cnt]>0x39) 
....................             s[cnt]+=0x7; 
....................  
....................          cnt++; 
....................          num=temp; 
....................      } 
....................  
....................      if(sign==1) { 
....................          s[cnt]=0x2D;      // Negative sign 
....................          cnt++; 
....................      } 
....................  
....................      for(i = 0;i<(int8)(cnt/2);i++) { 
....................  
....................          c=s[i]; 
....................          s[i]=s[cnt-i-1];        // Reverse the number 
....................          s[cnt-i-1]=c; 
....................      } 
....................      s[cnt]='\0';     // End the string 
....................      return s; 
.................... } 
....................  
.................... float strtod(char *s,char *endptr) { 
....................    float pow10 = 1.0; 
....................    float result = 0.0; 
....................    int sign = 0, point = 0; 
....................    char c; 
....................    int ptr = 0; 
....................  
....................    if (!s) 
....................       return 0; 
....................    c=s[ptr++]; 
....................  
....................  
....................    while((c>='0' && c<='9') || c=='+' || c=='-' || c=='.') { 
....................       if(c == '-') { 
....................          sign = 1; 
....................          c = s[ptr++]; 
....................       } 
....................  
....................       while((c >= '0' && c <= '9') && point == 0) { 
....................          result = 10*result + c - '0'; 
....................          c = s[ptr++]; 
....................       } 
....................  
....................       if (c == '.') { 
....................          point = 1; 
....................          c = s[ptr++]; 
....................       } 
....................  
....................       while((c >= '0' && c <= '9') && point == 1) { 
....................          pow10 = pow10*10; 
....................          result += (c - '0')/pow10; 
....................          c = s[ptr++]; 
....................       } 
....................  
....................       if (c == '+') { 
....................          c = s[ptr++]; 
....................       } 
....................    } 
....................  
....................    if (sign == 1) 
....................       result = -1*result; 
....................    if(endptr) 
....................    { 
....................       if (ptr) { 
....................          ptr--; 
....................          *((char *)endptr)=s+ptr; 
....................       } 
....................       else 
....................          *((char *)endptr)=s; 
....................    } 
....................  
....................    return(result); 
.................... } 
....................  
.................... long strtoul(char *s,char *endptr,signed int base) 
.................... { 
....................    char *sc,*s1,*sd; 
....................    unsigned long x=0; 
*
03D2:  CLRF   57
03D3:  CLRF   58
....................    char sign; 
....................    char digits[]="0123456789abcdefghijklmnopqstuvwxyz"; 
03D4:  MOVLW  30
03D5:  BSF    03.5
03D6:  MOVWF  20
03D7:  MOVLW  31
03D8:  MOVWF  21
03D9:  MOVLW  32
03DA:  MOVWF  22
03DB:  MOVLW  33
03DC:  MOVWF  23
03DD:  MOVLW  34
03DE:  MOVWF  24
03DF:  MOVLW  35
03E0:  MOVWF  25
03E1:  MOVLW  36
03E2:  MOVWF  26
03E3:  MOVLW  37
03E4:  MOVWF  27
03E5:  MOVLW  38
03E6:  MOVWF  28
03E7:  MOVLW  39
03E8:  MOVWF  29
03E9:  MOVLW  61
03EA:  MOVWF  2A
03EB:  MOVLW  62
03EC:  MOVWF  2B
03ED:  MOVLW  63
03EE:  MOVWF  2C
03EF:  MOVLW  64
03F0:  MOVWF  2D
03F1:  MOVLW  65
03F2:  MOVWF  2E
03F3:  MOVLW  66
03F4:  MOVWF  2F
03F5:  MOVLW  67
03F6:  MOVWF  30
03F7:  MOVLW  68
03F8:  MOVWF  31
03F9:  MOVLW  69
03FA:  MOVWF  32
03FB:  MOVLW  6A
03FC:  MOVWF  33
03FD:  MOVLW  6B
03FE:  MOVWF  34
03FF:  MOVLW  6C
0400:  MOVWF  35
0401:  MOVLW  6D
0402:  MOVWF  36
0403:  MOVLW  6E
0404:  MOVWF  37
0405:  MOVLW  6F
0406:  MOVWF  38
0407:  MOVLW  70
0408:  MOVWF  39
0409:  MOVLW  71
040A:  MOVWF  3A
040B:  MOVLW  73
040C:  MOVWF  3B
040D:  MOVLW  74
040E:  MOVWF  3C
040F:  MOVLW  75
0410:  MOVWF  3D
0411:  MOVLW  76
0412:  MOVWF  3E
0413:  MOVLW  77
0414:  MOVWF  3F
0415:  MOVLW  78
0416:  MOVWF  40
0417:  MOVLW  79
0418:  MOVWF  41
0419:  MOVLW  7A
041A:  MOVWF  42
041B:  CLRF   43
....................    for(sc=s;isspace(*sc);++sc); 
041C:  BCF    03.5
041D:  MOVF   51,W
041E:  MOVWF  54
041F:  MOVF   54,W
0420:  MOVWF  04
0421:  MOVF   00,W
0422:  SUBLW  20
0423:  BTFSS  03.2
0424:  GOTO   427
0425:  INCF   54,F
0426:  GOTO   41F
....................    sign=*sc=='-'||*sc=='+'?*sc++:'+'; 
0427:  MOVF   54,W
0428:  MOVWF  04
0429:  MOVF   00,W
042A:  SUBLW  2D
042B:  BTFSC  03.2
042C:  GOTO   433
042D:  MOVF   54,W
042E:  MOVWF  04
042F:  MOVF   00,W
0430:  SUBLW  2B
0431:  BTFSS  03.2
0432:  GOTO   438
0433:  MOVF   54,W
0434:  INCF   54,F
0435:  MOVWF  04
0436:  MOVF   00,W
0437:  GOTO   439
0438:  MOVLW  2B
0439:  MOVWF  59
....................    if(sign=='-') 
043A:  MOVF   59,W
043B:  SUBLW  2D
043C:  BTFSS  03.2
043D:  GOTO   449
....................    { 
....................       if (endptr) 
043E:  MOVF   52,F
043F:  BTFSC  03.2
0440:  GOTO   445
....................       { 
....................         *((char *)endptr)=s; 
0441:  MOVF   52,W
0442:  MOVWF  04
0443:  MOVF   51,W
0444:  MOVWF  00
....................       } 
....................       return 0; 
0445:  MOVLW  00
0446:  MOVWF  78
0447:  MOVWF  79
0448:  GOTO   555
....................    } 
....................  
....................    if (base <0 || base ==1|| base >36) // invalid base 
0449:  BTFSC  53.7
044A:  GOTO   454
044B:  DECFSZ 53,W
044C:  GOTO   44E
044D:  GOTO   454
044E:  BTFSC  53.7
044F:  GOTO   460
0450:  MOVF   53,W
0451:  SUBLW  24
0452:  BTFSC  03.0
0453:  GOTO   460
....................    { 
....................       if (endptr) 
0454:  MOVF   52,F
0455:  BTFSC  03.2
0456:  GOTO   45B
....................       { 
....................         *((char *)endptr)=s; 
0457:  MOVF   52,W
0458:  MOVWF  04
0459:  MOVF   51,W
045A:  MOVWF  00
....................       } 
....................       return 0; 
045B:  MOVLW  00
045C:  MOVWF  78
045D:  MOVWF  79
045E:  GOTO   555
....................    } 
....................    else if (base) 
045F:  GOTO   4C6
0460:  MOVF   53,F
0461:  BTFSC  03.2
0462:  GOTO   49D
....................    { 
....................       if(base==16 && *sc =='0'&&(sc[1]=='x' || sc[1]=='X')) 
0463:  MOVF   53,W
0464:  SUBLW  10
0465:  BTFSS  03.2
0466:  GOTO   47D
0467:  MOVF   54,W
0468:  MOVWF  04
0469:  MOVF   00,W
046A:  SUBLW  30
046B:  BTFSS  03.2
046C:  GOTO   47D
046D:  MOVLW  01
046E:  ADDWF  54,W
046F:  MOVWF  04
0470:  MOVF   00,W
0471:  SUBLW  78
0472:  BTFSC  03.2
0473:  GOTO   47B
0474:  MOVLW  01
0475:  ADDWF  54,W
0476:  MOVWF  04
0477:  MOVF   00,W
0478:  SUBLW  58
0479:  BTFSS  03.2
047A:  GOTO   47D
....................          sc+=2; 
047B:  MOVLW  02
047C:  ADDWF  54,F
....................       if(base==8 && *sc =='0') 
047D:  MOVF   53,W
047E:  SUBLW  08
047F:  BTFSS  03.2
0480:  GOTO   489
0481:  MOVF   54,W
0482:  MOVWF  04
0483:  MOVF   00,W
0484:  SUBLW  30
0485:  BTFSS  03.2
0486:  GOTO   489
....................          sc+=1; 
0487:  MOVLW  01
0488:  ADDWF  54,F
....................       if(base==2 && *sc =='0'&&sc[1]=='b') 
0489:  MOVF   53,W
048A:  SUBLW  02
048B:  BTFSS  03.2
048C:  GOTO   49C
048D:  MOVF   54,W
048E:  MOVWF  04
048F:  MOVF   00,W
0490:  SUBLW  30
0491:  BTFSS  03.2
0492:  GOTO   49C
0493:  MOVLW  01
0494:  ADDWF  54,W
0495:  MOVWF  04
0496:  MOVF   00,W
0497:  SUBLW  62
0498:  BTFSS  03.2
0499:  GOTO   49C
....................          sc+=2; 
049A:  MOVLW  02
049B:  ADDWF  54,F
....................  
....................    } 
....................    else if(*sc!='0') // base is 0, find base 
049C:  GOTO   4C6
049D:  MOVF   54,W
049E:  MOVWF  04
049F:  MOVF   00,W
04A0:  SUBLW  30
04A1:  BTFSC  03.2
04A2:  GOTO   4A6
....................       base=10; 
04A3:  MOVLW  0A
04A4:  MOVWF  53
....................    else if (sc[1]=='x' || sc[1]=='X') 
04A5:  GOTO   4C6
04A6:  MOVLW  01
04A7:  ADDWF  54,W
04A8:  MOVWF  04
04A9:  MOVF   00,W
04AA:  SUBLW  78
04AB:  BTFSC  03.2
04AC:  GOTO   4B4
04AD:  MOVLW  01
04AE:  ADDWF  54,W
04AF:  MOVWF  04
04B0:  MOVF   00,W
04B1:  SUBLW  58
04B2:  BTFSS  03.2
04B3:  GOTO   4B9
....................       base =16,sc+=2; 
04B4:  MOVLW  10
04B5:  MOVWF  53
04B6:  MOVLW  02
04B7:  ADDWF  54,F
....................    else if(sc[1]=='b') 
04B8:  GOTO   4C6
04B9:  MOVLW  01
04BA:  ADDWF  54,W
04BB:  MOVWF  04
04BC:  MOVF   00,W
04BD:  SUBLW  62
04BE:  BTFSS  03.2
04BF:  GOTO   4C4
....................       base=2,sc+=2; 
04C0:  MOVLW  02
04C1:  MOVWF  53
04C2:  ADDWF  54,F
....................    else 
04C3:  GOTO   4C6
....................       base=8; 
04C4:  MOVLW  08
04C5:  MOVWF  53
....................    for (s1=sc;*sc=='0';++sc);// skip leading zeroes 
04C6:  MOVF   54,W
04C7:  MOVWF  55
04C8:  MOVF   54,W
04C9:  MOVWF  04
04CA:  MOVF   00,W
04CB:  SUBLW  30
04CC:  BTFSS  03.2
04CD:  GOTO   4D0
04CE:  INCF   54,F
04CF:  GOTO   4C8
....................    sd=memchr(digits,tolower(*sc),base); 
04D0:  MOVF   54,W
04D1:  MOVWF  04
04D2:  MOVF   00,W
04D3:  MOVWF  5A
04D4:  SUBLW  40
04D5:  BTFSC  03.0
04D6:  GOTO   4DE
04D7:  MOVF   5A,W
04D8:  SUBLW  5A
04D9:  BTFSS  03.0
04DA:  GOTO   4DE
04DB:  MOVF   5A,W
04DC:  IORLW  20
04DD:  GOTO   4DF
04DE:  MOVF   5A,W
04DF:  MOVWF  5B
04E0:  MOVLW  A0
04E1:  BSF    03.5
04E2:  MOVWF  46
04E3:  BCF    03.5
04E4:  MOVF   5A,W
04E5:  BSF    03.5
04E6:  MOVWF  47
04E7:  BCF    03.5
04E8:  MOVF   53,W
04E9:  BSF    03.5
04EA:  MOVWF  48
04EB:  BCF    03.5
04EC:  CALL   3A0
04ED:  MOVF   78,W
04EE:  MOVWF  56
....................    for(; sd!=0; ) 
04EF:  MOVF   56,F
04F0:  BTFSC  03.2
04F1:  GOTO   53B
....................    { 
....................       x=x*base+(int16)(sd-digits); 
04F2:  CLRF   7A
04F3:  MOVF   53,W
04F4:  MOVWF  77
04F5:  BTFSC  53.7
04F6:  DECF   7A,F
04F7:  MOVWF  5A
04F8:  MOVF   7A,W
04F9:  MOVWF  5B
04FA:  MOVF   58,W
04FB:  BSF    03.5
04FC:  MOVWF  47
04FD:  BCF    03.5
04FE:  MOVF   57,W
04FF:  BSF    03.5
0500:  MOVWF  46
0501:  BCF    03.5
0502:  MOVF   7A,W
0503:  BSF    03.5
0504:  MOVWF  49
0505:  BCF    03.5
0506:  MOVF   5A,W
0507:  BSF    03.5
0508:  MOVWF  48
0509:  BCF    03.5
050A:  GOTO   3B9
050B:  MOVF   78,W
050C:  MOVWF  5B
050D:  MOVLW  A0
050E:  SUBWF  56,W
050F:  CLRF   7A
0510:  ADDWF  78,W
0511:  MOVWF  78
0512:  BTFSC  03.0
0513:  INCF   7A,F
0514:  MOVF   79,W
0515:  ADDWF  7A,F
0516:  MOVF   78,W
0517:  MOVWF  57
0518:  MOVF   7A,W
0519:  MOVWF  58
....................       ++sc; 
051A:  INCF   54,F
....................       sd=memchr(digits,tolower(*sc),base); 
051B:  MOVF   54,W
051C:  MOVWF  04
051D:  MOVF   00,W
051E:  MOVWF  5A
051F:  SUBLW  40
0520:  BTFSC  03.0
0521:  GOTO   529
0522:  MOVF   5A,W
0523:  SUBLW  5A
0524:  BTFSS  03.0
0525:  GOTO   529
0526:  MOVF   5A,W
0527:  IORLW  20
0528:  GOTO   52A
0529:  MOVF   5A,W
052A:  MOVWF  5B
052B:  MOVLW  A0
052C:  BSF    03.5
052D:  MOVWF  46
052E:  BCF    03.5
052F:  MOVF   5A,W
0530:  BSF    03.5
0531:  MOVWF  47
0532:  BCF    03.5
0533:  MOVF   53,W
0534:  BSF    03.5
0535:  MOVWF  48
0536:  BCF    03.5
0537:  CALL   3A0
0538:  MOVF   78,W
0539:  MOVWF  56
....................    } 
053A:  GOTO   4EF
....................    if(s1==sc) 
053B:  MOVF   54,W
053C:  SUBWF  55,W
053D:  BTFSS  03.2
053E:  GOTO   54A
....................    { 
....................       if (endptr) 
053F:  MOVF   52,F
0540:  BTFSC  03.2
0541:  GOTO   546
....................       { 
....................         *((char *)endptr)=s; 
0542:  MOVF   52,W
0543:  MOVWF  04
0544:  MOVF   51,W
0545:  MOVWF  00
....................       } 
....................    return 0; 
0546:  MOVLW  00
0547:  MOVWF  78
0548:  MOVWF  79
0549:  GOTO   555
....................    } 
....................    if (endptr) 
054A:  MOVF   52,F
054B:  BTFSC  03.2
054C:  GOTO   551
....................         *((char *)endptr)=sc; 
054D:  MOVF   52,W
054E:  MOVWF  04
054F:  MOVF   54,W
0550:  MOVWF  00
....................    return x; 
0551:  MOVF   57,W
0552:  MOVWF  78
0553:  MOVF   58,W
0554:  MOVWF  79
.................... } 
0555:  BSF    0A.3
0556:  BCF    0A.4
0557:  GOTO   503 (RETURN)
....................  
....................  
.................... signed long strtol(char *s,char *endptr,signed int base) 
.................... { 
....................    char *sc,*s1,*sd; 
....................    signed long x=0; 
....................    char sign; 
....................    char digits[]="0123456789abcdefghijklmnopqstuvwxyz"; 
....................    for(sc=s;isspace(*sc);++sc); 
....................    sign=*sc=='-'||*sc=='+'?*sc++:'+'; 
....................    if (base <0 || base ==1|| base >36) // invalid base 
....................    { 
....................       if (endptr) 
....................       { 
....................         *((char *)endptr)=s; 
....................       } 
....................       return 0; 
....................    } 
....................    else if (base) 
....................    { 
....................       if(base==16 && *sc =='0'&&(sc[1]=='x' || sc[1]=='X')) 
....................          sc+=2; 
....................       if(base==8 && *sc =='0') 
....................          sc+=1; 
....................       if(base==2 && *sc =='0'&&sc[1]=='b') 
....................          sc+=2; 
....................  
....................    } 
....................    else if(*sc!='0') // base is 0, find base 
....................       base=10; 
....................    else if (sc[1]=='x' || sc[1]=='X') 
....................       base =16,sc+=2; 
....................    else if(sc[1]=='b') 
....................       base=2,sc+=2; 
....................    else 
....................       base=8; 
....................    for (s1=sc;*sc=='0';++sc);// skip leading zeroes 
....................  
....................    sd=memchr(digits,tolower(*sc),base); 
....................    for(;sd!=0;) 
....................    { 
....................       x=x*base+(int16)(sd-digits); 
....................       ++sc; 
....................       sd=memchr(digits,tolower(*sc),base); 
....................    } 
....................    if(s1==sc) 
....................    { 
....................       if (endptr) 
....................       { 
....................         *((char *)endptr)=s; 
....................       } 
....................    return 0; 
....................    } 
....................    if(sign=='-') 
....................       x  =-x; 
....................    if (endptr) 
....................         *((char *)endptr)=sc; 
....................    return x; 
.................... } 
....................  
.................... signed int system(char *string) 
.................... { 
....................    return 0; 
.................... } 
....................  
.................... int mblen(char *s,size_t n) 
.................... { 
....................    return strlen(s); 
.................... } 
....................  
.................... int mbtowc(wchar_t *pwc,char *s,size_t n) 
.................... { 
....................    *pwc=*s; 
....................    return 1; 
.................... } 
....................  
.................... int wctomb(char *s,wchar_t wchar) 
.................... { 
....................    *s=wchar; 
....................    return 1; 
.................... } 
....................  
.................... size_t mbstowcs(wchar_t *pwcs,char *s,size_t n) 
.................... { 
....................    strncpy(pwcs,s,n); 
....................    return strlen(pwcs); 
.................... } 
....................  
.................... size_t wcstombs(char *s,wchar_t *pwcs,size_t n) 
.................... { 
....................    strncpy(s,pwcs,n); 
....................    return strlen(s); 
.................... } 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // The random number implementation 
.................... //--------------------------------------------------------------------------- 
....................  
.................... unsigned int32 _Randseed = 1; 
*
0818:  MOVLW  01
0819:  MOVWF  22
081A:  CLRF   23
081B:  CLRF   24
081C:  CLRF   25
....................  
.................... long rand(void) 
.................... { 
....................    _Randseed = _Randseed * 1103515245 + 12345; 
....................    return ((unsigned long)(_Randseed >> 16) % RAND_MAX); 
.................... } 
....................  
.................... void srand(unsigned int32 seed) 
.................... { 
....................    _Randseed = seed; 
.................... } 
....................  
.................... //--------------------------------------------------------------------------- 
.................... // Searching and sorting utilities implementation 
.................... //--------------------------------------------------------------------------- 
....................  
.................... typedef signed int (*_Cmpfun)(char * p1,char * p2); 
....................  
.................... void qsort(char * qdata, int qitems, int qsize, _Cmpfun cmp) { 
....................    int m,j,i,l; 
....................    short done; 
....................    BYTE t[16]; 
....................  
....................    m = qitems/2; 
....................    while( m > 0 ) { 
....................      for(j=0; j<(qitems-m); ++j) { 
....................         i = j; 
....................         do 
....................         { 
....................            done=TRUE; 
....................            l = i+m; 
....................            if( (*cmp)(qdata+i*qsize, qdata+l*qsize) > 0 ) { 
....................               memcpy(t, qdata+i*qsize, qsize); 
....................               memcpy(qdata+i*qsize, qdata+l*qsize, qsize); 
....................               memcpy(qdata+l*qsize, t, qsize); 
....................               if(m <= i) 
....................                 i -= m; 
....................                 done = FALSE; 
....................            } 
....................         } while(!done); 
....................      } 
....................      m = m/2; 
....................    } 
.................... } 
....................  
....................  
.................... char *bsearch(char *key, char *base, size_t num, size_t width,_Cmpfun cmp) 
.................... { 
....................    char *p, *q; 
....................    size_t n; 
....................    size_t pivot; 
....................    signed int val; 
....................  
....................    p = base; 
....................    n = num; 
....................  
....................    while (n > 0) 
....................    { 
....................       pivot = n >> 1; 
....................       q = p + width * pivot; 
....................  
....................       val = (*cmp)(key, q); 
....................  
....................       if (val < 0) 
....................          n = pivot; 
....................       else if (val == 0) 
....................          return ((char *)q); 
....................       else { 
....................          p = q + width; 
....................          n -= pivot + 1; 
....................       } 
....................    } 
....................  
....................    return NULL;      // There's no match 
.................... } 
....................  
....................  
.................... #endif 
....................  
....................  
.................... #define DELKA  40 
.................... #define VYKON  100 
....................  
.................... char odp[DELKA]; 
....................  
.................... int1 check_new_sms() 
.................... { 
....................    fprintf(MOBIL,"AT+CMGL=0\r");           //vycti prijate SMS (0=nove;1=vsechny) 
*
022E:  CLRF   51
022F:  MOVF   51,W
0230:  CALL   004
0231:  IORLW  00
0232:  BTFSC  03.2
0233:  GOTO   238
0234:  INCF   51,F
0235:  MOVWF  53
0236:  CALL   1DE
0237:  GOTO   22F
....................    while(fgetc(MOBIL)!=0x0A);       // predkoc prvni radek odpovedi 
0238:  CALL   206
0239:  MOVF   78,W
023A:  SUBLW  0A
023B:  BTFSS  03.2
023C:  GOTO   238
....................    odp[0]=fgetc(MOBIL);             // Nacti prvni dva znaky druheho radku odpovedi 
023D:  CALL   206
023E:  MOVF   78,W
023F:  MOVWF  26
....................    odp[1]=fgetc(MOBIL); 
0240:  CALL   206
0241:  MOVF   78,W
0242:  MOVWF  27
....................    while(fgetc(MOBIL)!=0x0A);       // Preskoc zbytek radku 
0243:  CALL   206
0244:  MOVF   78,W
0245:  SUBLW  0A
0246:  BTFSS  03.2
0247:  GOTO   243
....................  
....................    if(odp[0] == 'O' && odp[1] == 'K') return 1; 
0248:  MOVF   26,W
0249:  SUBLW  4F
024A:  BTFSS  03.2
024B:  GOTO   254
024C:  MOVF   27,W
024D:  SUBLW  4B
024E:  BTFSS  03.2
024F:  GOTO   254
0250:  MOVLW  01
0251:  MOVWF  78
0252:  GOTO   257
....................    else return 0; 
0253:  GOTO   257
0254:  MOVLW  00
0255:  MOVWF  78
0256:  GOTO   257
.................... } 
0257:  BSF    0A.3
0258:  BCF    0A.4
0259:  GOTO   0A1 (RETURN)
....................  
.................... read_sms() 
.................... { 
.................... int pom,pom2,pom3,odkl,odkl2,maskovadlo; 
....................       for(pom=0;pom<54;pom++)                //preskoc nedulezite informace 
025A:  CLRF   51
025B:  MOVF   51,W
025C:  SUBLW  35
025D:  BTFSS  03.0
025E:  GOTO   262
....................       { 
....................          fgetc(MOBIL); 
025F:  CALL   206
....................       } 
0260:  INCF   51,F
0261:  GOTO   25B
....................  
....................       //gets(odp);                       //uloz zakodovany text SMS 
....................  
....................       odp[0]=fgetc(MOBIL); 
0262:  CALL   206
0263:  MOVF   78,W
0264:  MOVWF  26
....................       odp[1]=fgetc(MOBIL); 
0265:  CALL   206
0266:  MOVF   78,W
0267:  MOVWF  27
....................       odp[2]=fgetc(MOBIL); 
0268:  CALL   206
0269:  MOVF   78,W
026A:  MOVWF  28
....................       odp[3]=fgetc(MOBIL); 
026B:  CALL   206
026C:  MOVF   78,W
026D:  MOVWF  29
....................       odp[4]=fgetc(MOBIL); 
026E:  CALL   206
026F:  MOVF   78,W
0270:  MOVWF  2A
....................       odp[5]=fgetc(MOBIL); 
0271:  CALL   206
0272:  MOVF   78,W
0273:  MOVWF  2B
....................       odp[6]=fgetc(MOBIL); 
0274:  CALL   206
0275:  MOVF   78,W
0276:  MOVWF  2C
....................       odp[7]=fgetc(MOBIL); 
0277:  CALL   206
0278:  MOVF   78,W
0279:  MOVWF  2D
....................  
....................       /*lcd_gotoxy(1,1); 
....................       printf(lcd_putc,"\f%s\n",odp);*/ 
....................  
....................       if(odp[0]==0) odp[1]='0';        // Prevod z ASCII do BIN 
027A:  MOVF   26,F
027B:  BTFSS  03.2
027C:  GOTO   27F
027D:  MOVLW  30
027E:  MOVWF  27
....................       odp[0]=odp[0] - '0'; 
027F:  MOVLW  30
0280:  SUBWF  26,F
....................       odp[1]=odp[1] - '0'; 
0281:  SUBWF  27,F
....................       if(odp[0]>9) odp[0]=odp[0]-7; 
0282:  MOVF   26,W
0283:  SUBLW  09
0284:  BTFSC  03.0
0285:  GOTO   288
0286:  MOVLW  07
0287:  SUBWF  26,F
....................       if(odp[1]>9) odp[1]=odp[1]-7; 
0288:  MOVF   27,W
0289:  SUBLW  09
028A:  BTFSC  03.0
028B:  GOTO   28E
028C:  MOVLW  07
028D:  SUBWF  27,F
....................       odp[0]=odp[0] << 4; 
028E:  SWAPF  26,F
028F:  MOVLW  F0
0290:  ANDWF  26,F
....................       odp[0] |= odp[1]; 
0291:  MOVF   27,W
0292:  IORWF  26,F
....................  
....................       if(odp[2]==0) odp[3]='0'; 
0293:  MOVF   28,F
0294:  BTFSS  03.2
0295:  GOTO   298
0296:  MOVLW  30
0297:  MOVWF  29
....................       odp[2]=odp[2] - '0'; 
0298:  MOVLW  30
0299:  SUBWF  28,F
....................       odp[3]=odp[3] - '0'; 
029A:  SUBWF  29,F
....................       if(odp[2]>9) odp[2]=odp[2]-7; 
029B:  MOVF   28,W
029C:  SUBLW  09
029D:  BTFSC  03.0
029E:  GOTO   2A1
029F:  MOVLW  07
02A0:  SUBWF  28,F
....................       if(odp[3]>9) odp[3]=odp[3]-7; 
02A1:  MOVF   29,W
02A2:  SUBLW  09
02A3:  BTFSC  03.0
02A4:  GOTO   2A7
02A5:  MOVLW  07
02A6:  SUBWF  29,F
....................       odp[2]=odp[2] << 4; 
02A7:  SWAPF  28,F
02A8:  MOVLW  F0
02A9:  ANDWF  28,F
....................       odp[2] |= odp[3]; 
02AA:  MOVF   29,W
02AB:  IORWF  28,F
....................  
....................       if(odp[4]==0) odp[5]='0'; 
02AC:  MOVF   2A,F
02AD:  BTFSS  03.2
02AE:  GOTO   2B1
02AF:  MOVLW  30
02B0:  MOVWF  2B
....................       odp[4]=odp[4] - '0'; 
02B1:  MOVLW  30
02B2:  SUBWF  2A,F
....................       odp[5]=odp[5] - '0'; 
02B3:  SUBWF  2B,F
....................       if(odp[4]>9) odp[4]=odp[4]-7; 
02B4:  MOVF   2A,W
02B5:  SUBLW  09
02B6:  BTFSC  03.0
02B7:  GOTO   2BA
02B8:  MOVLW  07
02B9:  SUBWF  2A,F
....................       if(odp[5]>9) odp[5]=odp[5]-7; 
02BA:  MOVF   2B,W
02BB:  SUBLW  09
02BC:  BTFSC  03.0
02BD:  GOTO   2C0
02BE:  MOVLW  07
02BF:  SUBWF  2B,F
....................       odp[4]=odp[4] << 4; 
02C0:  SWAPF  2A,F
02C1:  MOVLW  F0
02C2:  ANDWF  2A,F
....................       odp[4] |= odp[5]; 
02C3:  MOVF   2B,W
02C4:  IORWF  2A,F
....................  
....................       if(odp[6]==0) odp[7]='0'; 
02C5:  MOVF   2C,F
02C6:  BTFSS  03.2
02C7:  GOTO   2CA
02C8:  MOVLW  30
02C9:  MOVWF  2D
....................       odp[6]=odp[6] - '0'; 
02CA:  MOVLW  30
02CB:  SUBWF  2C,F
....................       odp[7]=odp[7] - '0'; 
02CC:  SUBWF  2D,F
....................       if(odp[6]>9) odp[6]=odp[6]-7; 
02CD:  MOVF   2C,W
02CE:  SUBLW  09
02CF:  BTFSC  03.0
02D0:  GOTO   2D3
02D1:  MOVLW  07
02D2:  SUBWF  2C,F
....................       if(odp[7]>9) odp[7]=odp[7]-7; 
02D3:  MOVF   2D,W
02D4:  SUBLW  09
02D5:  BTFSC  03.0
02D6:  GOTO   2D9
02D7:  MOVLW  07
02D8:  SUBWF  2D,F
....................       odp[6]=odp[6] << 4; 
02D9:  SWAPF  2C,F
02DA:  MOVLW  F0
02DB:  ANDWF  2C,F
....................       odp[6] |= odp[7]; 
02DC:  MOVF   2D,W
02DD:  IORWF  2C,F
....................  
....................       odp[1]=odp[2]; 
02DE:  MOVF   28,W
02DF:  MOVWF  27
....................       odp[2]=odp[4]; 
02E0:  MOVF   2A,W
02E1:  MOVWF  28
....................       odp[3]=odp[6]; 
02E2:  MOVF   2C,W
02E3:  MOVWF  29
....................       odp[4]=odp[5]=odp[6]=0; 
02E4:  CLRF   2C
02E5:  MOVF   2C,W
02E6:  MOVWF  2B
02E7:  MOVWF  2A
....................  
....................       /*lcd_gotoxy(1,2); 
....................       printf(lcd_putc,"%u %u %u %u",odp[0],odp[1],odp[2]odp[3]);   */ 
....................  
....................       pom3=0; 
02E8:  CLRF   53
....................       for (pom = 0; pom < 4;pom++) 
02E9:  CLRF   51
02EA:  MOVF   51,W
02EB:  SUBLW  03
02EC:  BTFSS  03.0
02ED:  GOTO   341
....................          { 
....................          maskovadlo =  maskovadlo >> 1;                 //rotace promene urcene pro maskovani 
02EE:  BCF    03.0
02EF:  RRF    56,F
....................          maskovadlo =  maskovadlo | 0x80; 
02F0:  BSF    56.7
....................          odkl = odp[pom] & maskovadlo;                  //odlozeni "prenosu" do odkl pomoci maskovadla 
02F1:  MOVLW  26
02F2:  ADDWF  51,W
02F3:  MOVWF  04
02F4:  MOVF   00,W
02F5:  ANDWF  56,W
02F6:  MOVWF  54
....................          odp[pom] = odp[pom] << pom3;                     //rotace znaku 
02F7:  MOVLW  26
02F8:  ADDWF  51,W
02F9:  MOVWF  57
02FA:  MOVLW  26
02FB:  ADDWF  51,W
02FC:  MOVWF  04
02FD:  MOVF   00,W
02FE:  MOVWF  77
02FF:  MOVF   53,W
0300:  MOVWF  78
0301:  BTFSC  03.2
0302:  GOTO   307
0303:  BCF    03.0
0304:  RLF    77,F
0305:  DECFSZ 78,F
0306:  GOTO   303
0307:  MOVF   57,W
0308:  MOVWF  04
0309:  MOVF   77,W
030A:  MOVWF  00
....................          for (pom2 = 0; pom2 < (8-pom3);pom2++)            //rotace odkl2 
030B:  CLRF   52
030C:  MOVF   53,W
030D:  SUBLW  08
030E:  SUBWF  52,W
030F:  BTFSC  03.0
0310:  GOTO   316
....................             { 
....................             odkl2 = odkl2 >> 1; 
0311:  BCF    03.0
0312:  RRF    55,F
....................             odkl2 = odkl2 & 127; 
0313:  BCF    55.7
....................             } 
0314:  INCF   52,F
0315:  GOTO   30C
....................          odp[pom] = odp[pom] | odkl2;                     //pridani odkl2 ke znaku 
0316:  MOVLW  26
0317:  ADDWF  51,W
0318:  MOVWF  57
0319:  MOVLW  26
031A:  ADDWF  51,W
031B:  MOVWF  04
031C:  MOVF   00,W
031D:  IORWF  55,W
031E:  MOVWF  59
031F:  MOVF   57,W
0320:  MOVWF  04
0321:  MOVF   59,W
0322:  MOVWF  00
....................          odp[pom] = odp[pom] & 127;                      //smazani nejvysiho bitu 
0323:  MOVLW  26
0324:  ADDWF  51,W
0325:  MOVWF  57
0326:  MOVLW  26
0327:  ADDWF  51,W
0328:  MOVWF  04
0329:  MOVF   00,W
032A:  ANDLW  7F
032B:  MOVWF  59
032C:  MOVF   57,W
032D:  MOVWF  04
032E:  MOVF   59,W
032F:  MOVWF  00
....................          odkl2 = odkl;                              //ulozeni odlk na dalsi pruchod 
0330:  MOVF   54,W
0331:  MOVWF  55
....................          pom3++;                                    //inkrementace citace rotace 
0332:  INCF   53,F
....................          if (pom3 == 8)                              //kazdy 8my znak 
0333:  MOVF   53,W
0334:  SUBLW  08
0335:  BTFSS  03.2
0336:  GOTO   33F
....................             { 
....................             pom3 = 0;                                 //smaz citac 
0337:  CLRF   53
....................             odp[pom+1] = odkl2;                        //uloz 8my znak vznikly z "prenosu" 
0338:  MOVLW  01
0339:  ADDWF  51,W
033A:  ADDLW  26
033B:  MOVWF  04
033C:  MOVF   55,W
033D:  MOVWF  00
....................             maskovadlo = 0;                           //smaz maskovadlo 
033E:  CLRF   56
....................             } 
....................          } 
033F:  INCF   51,F
0340:  GOTO   2EA
....................          odp[pom]='\0'; 
0341:  MOVLW  26
0342:  ADDWF  51,W
0343:  MOVWF  04
0344:  CLRF   00
.................... } 
0345:  BSF    0A.3
0346:  BCF    0A.4
0347:  GOTO   0B1 (RETURN)
....................  
.................... void read_time() 
.................... { 
.................... unsigned int8 n; 
....................  
....................  
....................    fprintf(MOBIL,"AT+CCLK?\r"); 
*
037F:  CLRF   52
0380:  MOVF   52,W
0381:  CALL   013
0382:  IORLW  00
0383:  BTFSC  03.2
0384:  GOTO   389
0385:  INCF   52,F
0386:  MOVWF  53
0387:  CALL   1DE
0388:  GOTO   380
....................    while(fgetc(MOBIL)!='"'); 
0389:  CALL   206
038A:  MOVF   78,W
038B:  SUBLW  22
038C:  BTFSS  03.2
038D:  GOTO   389
....................    for(n=0;n<12;n++)                //preskoc nedulezite informace 
038E:  CLRF   51
038F:  MOVF   51,W
0390:  SUBLW  0B
0391:  BTFSS  03.0
0392:  GOTO   396
....................    { 
....................          fgetc(MOBIL); 
0393:  CALL   206
....................    } 
0394:  INCF   51,F
0395:  GOTO   38F
....................    odp[0]=fgetc(MOBIL); 
0396:  CALL   206
0397:  MOVF   78,W
0398:  MOVWF  26
....................    odp[1]=fgetc(MOBIL); 
0399:  CALL   206
039A:  MOVF   78,W
039B:  MOVWF  27
....................    odp[2]=0; 
039C:  CLRF   28
.................... } 
039D:  BSF    0A.3
039E:  BCF    0A.4
039F:  GOTO   4FA (RETURN)
....................  
.................... void del_sms() 
.................... { 
....................    fprintf(MOBIL,"AT+CMGD=1\r");          //smaz prijatou SMSku 
*
0374:  CLRF   51
0375:  MOVF   51,W
0376:  CALL   021
0377:  IORLW  00
0378:  BTFSC  03.2
0379:  GOTO   37E
037A:  INCF   51,F
037B:  MOVWF  53
037C:  CALL   1DE
037D:  GOTO   375
.................... } 
037E:  RETLW  00
....................  
.................... void main() 
.................... { 
*
0800:  CLRF   04
0801:  MOVLW  1F
0802:  ANDWF  03,F
0803:  BCF    20.6
0804:  MOVF   20,W
0805:  BSF    03.5
0806:  MOVWF  07
0807:  BCF    03.5
0808:  BSF    07.6
0809:  BSF    03.5
080A:  BCF    06.2
080B:  BCF    03.5
080C:  BSF    06.2
080D:  BSF    03.5
080E:  BSF    1F.0
080F:  BSF    1F.1
0810:  BSF    1F.2
0811:  BCF    1F.3
0812:  MOVLW  07
0813:  MOVWF  1C
....................    setup_adc_ports(NO_ANALOGS); 
*
081D:  BSF    03.5
081E:  BSF    1F.0
081F:  BSF    1F.1
0820:  BSF    1F.2
0821:  BCF    1F.3
....................    setup_adc(ADC_OFF); 
0822:  BCF    03.5
0823:  BCF    1F.0
....................    setup_spi(SPI_SS_DISABLED); 
0824:  BCF    14.5
0825:  BCF    20.5
0826:  MOVF   20,W
0827:  BSF    03.5
0828:  MOVWF  07
0829:  BCF    03.5
082A:  BSF    20.4
082B:  MOVF   20,W
082C:  BSF    03.5
082D:  MOVWF  07
082E:  BCF    03.5
082F:  BCF    20.3
0830:  MOVF   20,W
0831:  BSF    03.5
0832:  MOVWF  07
0833:  MOVLW  01
0834:  BCF    03.5
0835:  MOVWF  14
0836:  MOVLW  00
0837:  BSF    03.5
0838:  MOVWF  14
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); 
0839:  MOVF   01,W
083A:  ANDLW  C7
083B:  IORLW  08
083C:  MOVWF  01
....................    setup_timer_1(T1_DISABLED); 
083D:  BCF    03.5
083E:  CLRF   10
....................    setup_timer_2(T2_DIV_BY_4,255,1); 
083F:  MOVLW  00
0840:  MOVWF  78
0841:  IORLW  05
0842:  MOVWF  12
0843:  MOVLW  FF
0844:  BSF    03.5
0845:  MOVWF  12
....................    setup_ccp1(CCP_PWM); 
0846:  BCF    03.5
0847:  BCF    20.2
0848:  MOVF   20,W
0849:  BSF    03.5
084A:  MOVWF  07
084B:  BCF    03.5
084C:  BCF    07.2
084D:  MOVLW  0C
084E:  MOVWF  17
....................    setup_ccp2(CCP_PWM); 
084F:  BCF    20.1
0850:  MOVF   20,W
0851:  BSF    03.5
0852:  MOVWF  07
0853:  BCF    03.5
0854:  BCF    07.1
0855:  MOVLW  0C
0856:  MOVWF  1D
....................    setup_comparator(NC_NC_NC_NC); 
0857:  MOVLW  07
0858:  BSF    03.5
0859:  MOVWF  1C
085A:  MOVF   05,W
085B:  CLRWDT
085C:  MOVLW  0E
085D:  MOVWF  77
085E:  DECFSZ 77,F
085F:  GOTO   05E
0860:  NOP
0861:  NOP
0862:  MOVF   1C,W
0863:  BCF    03.5
0864:  BCF    0D.6
....................    setup_vref(FALSE); 
0865:  BSF    03.5
0866:  CLRF   1D
....................    setup_wdt(WDT_2304MS); 
0867:  MOVLW  0F
0868:  MOVWF  77
0869:  MOVLW  07
086A:  BCF    03.5
086B:  CLRF   01
086C:  MOVLW  81
086D:  MOVWF  04
086E:  MOVF   00,W
086F:  ANDLW  F0
0870:  IORLW  07
0871:  MOVWF  00
0872:  CLRWDT
0873:  MOVF   00,W
0874:  ANDLW  F7
0875:  BTFSC  77.3
0876:  ANDLW  F0
0877:  IORWF  77,W
0878:  MOVWF  00
....................  
....................    set_pwm1_duty(0); 
0879:  CLRF   15
....................    set_pwm2_duty(0); 
087A:  CLRF   1B
....................  
....................    while(TRUE) 
....................    { 
.................... unsigned int8 n; 
.................... char *ptr; 
.................... int time; 
....................  
....................     output_low(PIN_A4) ; 
087B:  BSF    03.5
087C:  BCF    05.4
087D:  BCF    03.5
087E:  BCF    05.4
....................     delay_ms(150); 
087F:  MOVLW  96
0880:  MOVWF  52
0881:  BCF    0A.3
0882:  CALL   1C8
0883:  BSF    0A.3
....................     output_high(PIN_A4); 
0884:  BSF    03.5
0885:  BCF    05.4
0886:  BCF    03.5
0887:  BSF    05.4
....................     delay_ms(150); 
0888:  MOVLW  96
0889:  MOVWF  52
088A:  BCF    0A.3
088B:  CALL   1C8
088C:  BSF    0A.3
....................     output_low(PIN_A4) ; 
088D:  BSF    03.5
088E:  BCF    05.4
088F:  BCF    03.5
0890:  BCF    05.4
....................     delay_ms(150); 
0891:  MOVLW  96
0892:  MOVWF  52
0893:  BCF    0A.3
0894:  CALL   1C8
0895:  BSF    0A.3
....................     output_high(PIN_A4); 
0896:  BSF    03.5
0897:  BCF    05.4
0898:  BCF    03.5
0899:  BSF    05.4
....................     delay_ms(150); 
089A:  MOVLW  96
089B:  MOVWF  52
089C:  BCF    0A.3
089D:  CALL   1C8
089E:  BSF    0A.3
....................  
....................  
....................    if(check_new_sms())   // Je odpoved "OK"? 
089F:  BCF    0A.3
08A0:  GOTO   22E
08A1:  BSF    0A.3
08A2:  MOVF   78,F
08A3:  BTFSC  03.2
08A4:  GOTO   0AF
....................    { 
.................... //      printf(lcd_putc,"736 655 250"); 
....................       delay_ms(1000); 
08A5:  MOVLW  04
08A6:  MOVWF  51
08A7:  MOVLW  FA
08A8:  MOVWF  52
08A9:  BCF    0A.3
08AA:  CALL   1C8
08AB:  BSF    0A.3
08AC:  DECFSZ 51,F
08AD:  GOTO   0A7
....................    } 
....................    else 
08AE:  GOTO   4F8
....................    { 
....................     read_sms(); 
08AF:  BCF    0A.3
08B0:  GOTO   25A
08B1:  BSF    0A.3
....................  
....................       if (toupper(odp[0]) == 'A') 
08B2:  MOVF   26,W
08B3:  SUBLW  60
08B4:  BTFSC  03.0
08B5:  GOTO   0BD
08B6:  MOVF   26,W
08B7:  SUBLW  7A
08B8:  BTFSS  03.0
08B9:  GOTO   0BD
08BA:  MOVF   26,W
08BB:  ANDLW  DF
08BC:  GOTO   0BE
08BD:  MOVF   26,W
08BE:  SUBLW  41
08BF:  BTFSS  03.2
08C0:  GOTO   101
....................       { 
....................          set_pwm1_duty(VYKON); 
08C1:  MOVLW  64
08C2:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
08C3:  MOVWF  1B
....................          Delay_ms(10000); 
08C4:  MOVLW  28
08C5:  MOVWF  51
08C6:  MOVLW  FA
08C7:  MOVWF  52
08C8:  BCF    0A.3
08C9:  CALL   1C8
08CA:  BSF    0A.3
08CB:  DECFSZ 51,F
08CC:  GOTO   0C6
....................          fprintf(VRTULE,"JACK[BARmk"); // "JACK BAR :)" 
08CD:  CLRF   51
08CE:  MOVF   51,W
08CF:  BCF    0A.3
08D0:  CALL   030
08D1:  BSF    0A.3
08D2:  IORLW  00
08D3:  BTFSC  03.2
08D4:  GOTO   0DB
08D5:  INCF   51,F
08D6:  MOVWF  52
08D7:  BCF    0A.3
08D8:  CALL   348
08D9:  BSF    0A.3
08DA:  GOTO   0CE
....................          Delay_ms(2000); 
08DB:  MOVLW  08
08DC:  MOVWF  51
08DD:  MOVLW  FA
08DE:  MOVWF  52
08DF:  BCF    0A.3
08E0:  CALL   1C8
08E1:  BSF    0A.3
08E2:  DECFSZ 51,F
08E3:  GOTO   0DD
....................          fprintf(VRTULE,"JACK[BARmk"); // "JACK BAR :)" 
08E4:  CLRF   51
08E5:  MOVF   51,W
08E6:  BCF    0A.3
08E7:  CALL   030
08E8:  BSF    0A.3
08E9:  IORLW  00
08EA:  BTFSC  03.2
08EB:  GOTO   0F2
08EC:  INCF   51,F
08ED:  MOVWF  52
08EE:  BCF    0A.3
08EF:  CALL   348
08F0:  BSF    0A.3
08F1:  GOTO   0E5
....................          Delay_ms(5000); 
08F2:  MOVLW  14
08F3:  MOVWF  51
08F4:  MOVLW  FA
08F5:  MOVWF  52
08F6:  BCF    0A.3
08F7:  CALL   1C8
08F8:  BSF    0A.3
08F9:  DECFSZ 51,F
08FA:  GOTO   0F4
....................          set_pwm1_duty(0); 
08FB:  CLRF   15
....................          set_pwm2_duty(0); 
08FC:  CLRF   1B
....................          del_sms(); 
08FD:  BCF    0A.3
08FE:  CALL   374
08FF:  BSF    0A.3
....................          break; 
0900:  GOTO   532
....................       } 
....................  
....................       if (toupper(odp[0]) == 'B') 
0901:  MOVF   26,W
0902:  SUBLW  60
0903:  BTFSC  03.0
0904:  GOTO   10C
0905:  MOVF   26,W
0906:  SUBLW  7A
0907:  BTFSS  03.0
0908:  GOTO   10C
0909:  MOVF   26,W
090A:  ANDLW  DF
090B:  GOTO   10D
090C:  MOVF   26,W
090D:  SUBLW  42
090E:  BTFSS  03.2
090F:  GOTO   160
....................       { 
....................          set_pwm1_duty(VYKON); 
0910:  MOVLW  64
0911:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
0912:  MOVWF  1B
....................          Delay_ms(10000); 
0913:  MOVLW  28
0914:  MOVWF  51
0915:  MOVLW  FA
0916:  MOVWF  52
0917:  BCF    0A.3
0918:  CALL   1C8
0919:  BSF    0A.3
091A:  DECFSZ 51,F
091B:  GOTO   115
....................          for(n=0;n<=1;n++) 
091C:  CLRF   4E
091D:  MOVF   4E,W
091E:  SUBLW  01
091F:  BTFSS  03.0
0920:  GOTO   151
....................          { 
....................             fprintf(VRTULE,"[ERROR[d[["); // " ERROR 3  " 
0921:  CLRF   51
0922:  MOVF   51,W
0923:  BCF    0A.3
0924:  CALL   03F
0925:  BSF    0A.3
0926:  IORLW  00
0927:  BTFSC  03.2
0928:  GOTO   12F
0929:  INCF   51,F
092A:  MOVWF  52
092B:  BCF    0A.3
092C:  CALL   348
092D:  BSF    0A.3
092E:  GOTO   122
....................             Delay_ms(2000); 
092F:  MOVLW  08
0930:  MOVWF  51
0931:  MOVLW  FA
0932:  MOVWF  52
0933:  BCF    0A.3
0934:  CALL   1C8
0935:  BSF    0A.3
0936:  DECFSZ 51,F
0937:  GOTO   131
....................             fprintf(VRTULE,"[OVERFLOW["); // " OVERFLOW " 
0938:  CLRF   51
0939:  MOVF   51,W
093A:  BCF    0A.3
093B:  CALL   04E
093C:  BSF    0A.3
093D:  IORLW  00
093E:  BTFSC  03.2
093F:  GOTO   146
0940:  INCF   51,F
0941:  MOVWF  52
0942:  BCF    0A.3
0943:  CALL   348
0944:  BSF    0A.3
0945:  GOTO   139
....................             Delay_ms(2000); 
0946:  MOVLW  08
0947:  MOVWF  51
0948:  MOVLW  FA
0949:  MOVWF  52
094A:  BCF    0A.3
094B:  CALL   1C8
094C:  BSF    0A.3
094D:  DECFSZ 51,F
094E:  GOTO   148
....................          } 
094F:  INCF   4E,F
0950:  GOTO   11D
....................          Delay_ms(5000); 
0951:  MOVLW  14
0952:  MOVWF  51
0953:  MOVLW  FA
0954:  MOVWF  52
0955:  BCF    0A.3
0956:  CALL   1C8
0957:  BSF    0A.3
0958:  DECFSZ 51,F
0959:  GOTO   153
....................          set_pwm1_duty(0); 
095A:  CLRF   15
....................          set_pwm2_duty(0); 
095B:  CLRF   1B
....................          del_sms(); 
095C:  BCF    0A.3
095D:  CALL   374
095E:  BSF    0A.3
....................          break; 
095F:  GOTO   532
....................       } 
....................  
....................       if (toupper(odp[0]) == 'C') 
0960:  MOVF   26,W
0961:  SUBLW  60
0962:  BTFSC  03.0
0963:  GOTO   16B
0964:  MOVF   26,W
0965:  SUBLW  7A
0966:  BTFSS  03.0
0967:  GOTO   16B
0968:  MOVF   26,W
0969:  ANDLW  DF
096A:  GOTO   16C
096B:  MOVF   26,W
096C:  SUBLW  43
096D:  BTFSS  03.2
096E:  GOTO   1D6
....................       { 
....................          set_pwm1_duty(VYKON); 
096F:  MOVLW  64
0970:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
0971:  MOVWF  1B
....................          Delay_ms(10000); 
0972:  MOVLW  28
0973:  MOVWF  51
0974:  MOVLW  FA
0975:  MOVWF  52
0976:  BCF    0A.3
0977:  CALL   1C8
0978:  BSF    0A.3
0979:  DECFSZ 51,F
097A:  GOTO   174
....................          for(n=0;n<=1;n++) 
097B:  CLRF   4E
097C:  MOVF   4E,W
097D:  SUBLW  01
097E:  BTFSS  03.0
097F:  GOTO   1C7
....................          { 
....................             fprintf(VRTULE,"[ERROR[e[["); // " ERROR 4  " 
0980:  CLRF   51
0981:  MOVF   51,W
0982:  BCF    0A.3
0983:  CALL   05D
0984:  BSF    0A.3
0985:  IORLW  00
0986:  BTFSC  03.2
0987:  GOTO   18E
0988:  INCF   51,F
0989:  MOVWF  52
098A:  BCF    0A.3
098B:  CALL   348
098C:  BSF    0A.3
098D:  GOTO   181
....................             Delay_ms(2000); 
098E:  MOVLW  08
098F:  MOVWF  51
0990:  MOVLW  FA
0991:  MOVWF  52
0992:  BCF    0A.3
0993:  CALL   1C8
0994:  BSF    0A.3
0995:  DECFSZ 51,F
0996:  GOTO   190
....................             fprintf(VRTULE,"[OPAKUJTE["); // " OPAKUJTE " 
0997:  CLRF   51
0998:  MOVF   51,W
0999:  BCF    0A.3
099A:  CALL   06C
099B:  BSF    0A.3
099C:  IORLW  00
099D:  BTFSC  03.2
099E:  GOTO   1A5
099F:  INCF   51,F
09A0:  MOVWF  52
09A1:  BCF    0A.3
09A2:  CALL   348
09A3:  BSF    0A.3
09A4:  GOTO   198
....................             Delay_ms(2000); 
09A5:  MOVLW  08
09A6:  MOVWF  51
09A7:  MOVLW  FA
09A8:  MOVWF  52
09A9:  BCF    0A.3
09AA:  CALL   1C8
09AB:  BSF    0A.3
09AC:  DECFSZ 51,F
09AD:  GOTO   1A7
....................             fprintf(VRTULE,"[[VOLBU[[["); // " VOLBU " 
09AE:  CLRF   51
09AF:  MOVF   51,W
09B0:  BCF    0A.3
09B1:  CALL   07B
09B2:  BSF    0A.3
09B3:  IORLW  00
09B4:  BTFSC  03.2
09B5:  GOTO   1BC
09B6:  INCF   51,F
09B7:  MOVWF  52
09B8:  BCF    0A.3
09B9:  CALL   348
09BA:  BSF    0A.3
09BB:  GOTO   1AF
....................             Delay_ms(2000); 
09BC:  MOVLW  08
09BD:  MOVWF  51
09BE:  MOVLW  FA
09BF:  MOVWF  52
09C0:  BCF    0A.3
09C1:  CALL   1C8
09C2:  BSF    0A.3
09C3:  DECFSZ 51,F
09C4:  GOTO   1BE
....................          } 
09C5:  INCF   4E,F
09C6:  GOTO   17C
....................          Delay_ms(3000); 
09C7:  MOVLW  0C
09C8:  MOVWF  51
09C9:  MOVLW  FA
09CA:  MOVWF  52
09CB:  BCF    0A.3
09CC:  CALL   1C8
09CD:  BSF    0A.3
09CE:  DECFSZ 51,F
09CF:  GOTO   1C9
....................          set_pwm1_duty(0); 
09D0:  CLRF   15
....................          set_pwm2_duty(0); 
09D1:  CLRF   1B
....................          del_sms(); 
09D2:  BCF    0A.3
09D3:  CALL   374
09D4:  BSF    0A.3
....................          break; 
09D5:  GOTO   532
....................       } 
....................  
....................       if (toupper(odp[0]) == 'D') 
09D6:  MOVF   26,W
09D7:  SUBLW  60
09D8:  BTFSC  03.0
09D9:  GOTO   1E1
09DA:  MOVF   26,W
09DB:  SUBLW  7A
09DC:  BTFSS  03.0
09DD:  GOTO   1E1
09DE:  MOVF   26,W
09DF:  ANDLW  DF
09E0:  GOTO   1E2
09E1:  MOVF   26,W
09E2:  SUBLW  44
09E3:  BTFSS  03.2
09E4:  GOTO   225
....................       { 
....................          set_pwm1_duty(VYKON); 
09E5:  MOVLW  64
09E6:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
09E7:  MOVWF  1B
....................          Delay_ms(10000); 
09E8:  MOVLW  28
09E9:  MOVWF  51
09EA:  MOVLW  FA
09EB:  MOVWF  52
09EC:  BCF    0A.3
09ED:  CALL   1C8
09EE:  BSF    0A.3
09EF:  DECFSZ 51,F
09F0:  GOTO   1EA
....................          fprintf(VRTULE,"[[PEACE[[["); // " PEACE " 
09F1:  CLRF   51
09F2:  MOVF   51,W
09F3:  BCF    0A.3
09F4:  CALL   08A
09F5:  BSF    0A.3
09F6:  IORLW  00
09F7:  BTFSC  03.2
09F8:  GOTO   1FF
09F9:  INCF   51,F
09FA:  MOVWF  52
09FB:  BCF    0A.3
09FC:  CALL   348
09FD:  BSF    0A.3
09FE:  GOTO   1F2
....................          Delay_ms(2000); 
09FF:  MOVLW  08
0A00:  MOVWF  51
0A01:  MOVLW  FA
0A02:  MOVWF  52
0A03:  BCF    0A.3
0A04:  CALL   1C8
0A05:  BSF    0A.3
0A06:  DECFSZ 51,F
0A07:  GOTO   201
....................          fprintf(VRTULE,"[[PEACE[[["); 
0A08:  CLRF   51
0A09:  MOVF   51,W
0A0A:  BCF    0A.3
0A0B:  CALL   08A
0A0C:  BSF    0A.3
0A0D:  IORLW  00
0A0E:  BTFSC  03.2
0A0F:  GOTO   216
0A10:  INCF   51,F
0A11:  MOVWF  52
0A12:  BCF    0A.3
0A13:  CALL   348
0A14:  BSF    0A.3
0A15:  GOTO   209
....................          Delay_ms(3000); 
0A16:  MOVLW  0C
0A17:  MOVWF  51
0A18:  MOVLW  FA
0A19:  MOVWF  52
0A1A:  BCF    0A.3
0A1B:  CALL   1C8
0A1C:  BSF    0A.3
0A1D:  DECFSZ 51,F
0A1E:  GOTO   218
....................          set_pwm1_duty(0); 
0A1F:  CLRF   15
....................          set_pwm2_duty(0); 
0A20:  CLRF   1B
....................          del_sms(); 
0A21:  BCF    0A.3
0A22:  CALL   374
0A23:  BSF    0A.3
....................          break; 
0A24:  GOTO   532
....................       } 
....................  
....................       if (toupper(odp[0]) == 'E') 
0A25:  MOVF   26,W
0A26:  SUBLW  60
0A27:  BTFSC  03.0
0A28:  GOTO   230
0A29:  MOVF   26,W
0A2A:  SUBLW  7A
0A2B:  BTFSS  03.0
0A2C:  GOTO   230
0A2D:  MOVF   26,W
0A2E:  ANDLW  DF
0A2F:  GOTO   231
0A30:  MOVF   26,W
0A31:  SUBLW  45
0A32:  BTFSS  03.2
0A33:  GOTO   284
....................       { 
....................          set_pwm1_duty(VYKON); 
0A34:  MOVLW  64
0A35:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
0A36:  MOVWF  1B
....................          Delay_ms(10000); 
0A37:  MOVLW  28
0A38:  MOVWF  51
0A39:  MOVLW  FA
0A3A:  MOVWF  52
0A3B:  BCF    0A.3
0A3C:  CALL   1C8
0A3D:  BSF    0A.3
0A3E:  DECFSZ 51,F
0A3F:  GOTO   239
....................          for(n=0;n<=1;n++) 
0A40:  CLRF   4E
0A41:  MOVF   4E,W
0A42:  SUBLW  01
0A43:  BTFSS  03.0
0A44:  GOTO   275
....................          { 
....................             fprintf(VRTULE,"[[[MORE[[["); // " MORE  " 
0A45:  CLRF   51
0A46:  MOVF   51,W
0A47:  BCF    0A.3
0A48:  CALL   099
0A49:  BSF    0A.3
0A4A:  IORLW  00
0A4B:  BTFSC  03.2
0A4C:  GOTO   253
0A4D:  INCF   51,F
0A4E:  MOVWF  52
0A4F:  BCF    0A.3
0A50:  CALL   348
0A51:  BSF    0A.3
0A52:  GOTO   246
....................             Delay_ms(2000); 
0A53:  MOVLW  08
0A54:  MOVWF  51
0A55:  MOVLW  FA
0A56:  MOVWF  52
0A57:  BCF    0A.3
0A58:  CALL   1C8
0A59:  BSF    0A.3
0A5A:  DECFSZ 51,F
0A5B:  GOTO   255
....................             fprintf(VRTULE,"[[ZE[JO[[["); // " ZE JO " 
0A5C:  CLRF   51
0A5D:  MOVF   51,W
0A5E:  BCF    0A.3
0A5F:  CALL   0A8
0A60:  BSF    0A.3
0A61:  IORLW  00
0A62:  BTFSC  03.2
0A63:  GOTO   26A
0A64:  INCF   51,F
0A65:  MOVWF  52
0A66:  BCF    0A.3
0A67:  CALL   348
0A68:  BSF    0A.3
0A69:  GOTO   25D
....................             Delay_ms(2000); 
0A6A:  MOVLW  08
0A6B:  MOVWF  51
0A6C:  MOVLW  FA
0A6D:  MOVWF  52
0A6E:  BCF    0A.3
0A6F:  CALL   1C8
0A70:  BSF    0A.3
0A71:  DECFSZ 51,F
0A72:  GOTO   26C
....................          } 
0A73:  INCF   4E,F
0A74:  GOTO   241
....................          Delay_ms(5000); 
0A75:  MOVLW  14
0A76:  MOVWF  51
0A77:  MOVLW  FA
0A78:  MOVWF  52
0A79:  BCF    0A.3
0A7A:  CALL   1C8
0A7B:  BSF    0A.3
0A7C:  DECFSZ 51,F
0A7D:  GOTO   277
....................          set_pwm1_duty(0); 
0A7E:  CLRF   15
....................          set_pwm2_duty(0); 
0A7F:  CLRF   1B
....................          del_sms(); 
0A80:  BCF    0A.3
0A81:  CALL   374
0A82:  BSF    0A.3
....................          break; 
0A83:  GOTO   532
....................       } 
....................  
....................       if (toupper(odp[0]) == 'F') 
0A84:  MOVF   26,W
0A85:  SUBLW  60
0A86:  BTFSC  03.0
0A87:  GOTO   28F
0A88:  MOVF   26,W
0A89:  SUBLW  7A
0A8A:  BTFSS  03.0
0A8B:  GOTO   28F
0A8C:  MOVF   26,W
0A8D:  ANDLW  DF
0A8E:  GOTO   290
0A8F:  MOVF   26,W
0A90:  SUBLW  46
0A91:  BTFSS  03.2
0A92:  GOTO   2E3
....................       { 
....................          set_pwm1_duty(VYKON); 
0A93:  MOVLW  64
0A94:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
0A95:  MOVWF  1B
....................          Delay_ms(10000); 
0A96:  MOVLW  28
0A97:  MOVWF  51
0A98:  MOVLW  FA
0A99:  MOVWF  52
0A9A:  BCF    0A.3
0A9B:  CALL   1C8
0A9C:  BSF    0A.3
0A9D:  DECFSZ 51,F
0A9E:  GOTO   298
....................          for(n=0;n<=1;n++) 
0A9F:  CLRF   4E
0AA0:  MOVF   4E,W
0AA1:  SUBLW  01
0AA2:  BTFSS  03.0
0AA3:  GOTO   2D4
....................          { 
....................             fprintf(VRTULE,"[ROZBITY[["); // " ROZBITY  " 
0AA4:  CLRF   51
0AA5:  MOVF   51,W
0AA6:  BCF    0A.3
0AA7:  CALL   0B7
0AA8:  BSF    0A.3
0AA9:  IORLW  00
0AAA:  BTFSC  03.2
0AAB:  GOTO   2B2
0AAC:  INCF   51,F
0AAD:  MOVWF  52
0AAE:  BCF    0A.3
0AAF:  CALL   348
0AB0:  BSF    0A.3
0AB1:  GOTO   2A5
....................             Delay_ms(2000); 
0AB2:  MOVLW  08
0AB3:  MOVWF  51
0AB4:  MOVLW  FA
0AB5:  MOVWF  52
0AB6:  BCF    0A.3
0AB7:  CALL   1C8
0AB8:  BSF    0A.3
0AB9:  DECFSZ 51,F
0ABA:  GOTO   2B4
....................             fprintf(VRTULE,"[[BUDIK[[["); // " BUDIK " 
0ABB:  CLRF   51
0ABC:  MOVF   51,W
0ABD:  BCF    0A.3
0ABE:  CALL   0C6
0ABF:  BSF    0A.3
0AC0:  IORLW  00
0AC1:  BTFSC  03.2
0AC2:  GOTO   2C9
0AC3:  INCF   51,F
0AC4:  MOVWF  52
0AC5:  BCF    0A.3
0AC6:  CALL   348
0AC7:  BSF    0A.3
0AC8:  GOTO   2BC
....................             Delay_ms(2000); 
0AC9:  MOVLW  08
0ACA:  MOVWF  51
0ACB:  MOVLW  FA
0ACC:  MOVWF  52
0ACD:  BCF    0A.3
0ACE:  CALL   1C8
0ACF:  BSF    0A.3
0AD0:  DECFSZ 51,F
0AD1:  GOTO   2CB
....................          } 
0AD2:  INCF   4E,F
0AD3:  GOTO   2A0
....................          Delay_ms(5000); 
0AD4:  MOVLW  14
0AD5:  MOVWF  51
0AD6:  MOVLW  FA
0AD7:  MOVWF  52
0AD8:  BCF    0A.3
0AD9:  CALL   1C8
0ADA:  BSF    0A.3
0ADB:  DECFSZ 51,F
0ADC:  GOTO   2D6
....................          set_pwm1_duty(0); 
0ADD:  CLRF   15
....................          set_pwm2_duty(0); 
0ADE:  CLRF   1B
....................          del_sms(); 
0ADF:  BCF    0A.3
0AE0:  CALL   374
0AE1:  BSF    0A.3
....................          break; 
0AE2:  GOTO   532
....................       } 
....................  
....................       if (toupper(odp[0]) == 'G') 
0AE3:  MOVF   26,W
0AE4:  SUBLW  60
0AE5:  BTFSC  03.0
0AE6:  GOTO   2EE
0AE7:  MOVF   26,W
0AE8:  SUBLW  7A
0AE9:  BTFSS  03.0
0AEA:  GOTO   2EE
0AEB:  MOVF   26,W
0AEC:  ANDLW  DF
0AED:  GOTO   2EF
0AEE:  MOVF   26,W
0AEF:  SUBLW  47
0AF0:  BTFSS  03.2
0AF1:  GOTO   342
....................       { 
....................          set_pwm1_duty(VYKON); 
0AF2:  MOVLW  64
0AF3:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
0AF4:  MOVWF  1B
....................          Delay_ms(10000); 
0AF5:  MOVLW  28
0AF6:  MOVWF  51
0AF7:  MOVLW  FA
0AF8:  MOVWF  52
0AF9:  BCF    0A.3
0AFA:  CALL   1C8
0AFB:  BSF    0A.3
0AFC:  DECFSZ 51,F
0AFD:  GOTO   2F7
....................          for(n=0;n<=1;n++) 
0AFE:  CLRF   4E
0AFF:  MOVF   4E,W
0B00:  SUBLW  01
0B01:  BTFSS  03.0
0B02:  GOTO   333
....................          { 
....................             fprintf(VRTULE,"[ZAPOJIT[["); // " ZAPOJIT  " 
0B03:  CLRF   51
0B04:  MOVF   51,W
0B05:  BCF    0A.3
0B06:  CALL   0D5
0B07:  BSF    0A.3
0B08:  IORLW  00
0B09:  BTFSC  03.2
0B0A:  GOTO   311
0B0B:  INCF   51,F
0B0C:  MOVWF  52
0B0D:  BCF    0A.3
0B0E:  CALL   348
0B0F:  BSF    0A.3
0B10:  GOTO   304
....................             Delay_ms(2000); 
0B11:  MOVLW  08
0B12:  MOVWF  51
0B13:  MOVLW  FA
0B14:  MOVWF  52
0B15:  BCF    0A.3
0B16:  CALL   1C8
0B17:  BSF    0A.3
0B18:  DECFSZ 51,F
0B19:  GOTO   313
....................             fprintf(VRTULE,"[ZASUVKU[["); // " ZASUVKU " 
0B1A:  CLRF   51
0B1B:  MOVF   51,W
0B1C:  BCF    0A.3
0B1D:  CALL   0E4
0B1E:  BSF    0A.3
0B1F:  IORLW  00
0B20:  BTFSC  03.2
0B21:  GOTO   328
0B22:  INCF   51,F
0B23:  MOVWF  52
0B24:  BCF    0A.3
0B25:  CALL   348
0B26:  BSF    0A.3
0B27:  GOTO   31B
....................             Delay_ms(2000); 
0B28:  MOVLW  08
0B29:  MOVWF  51
0B2A:  MOVLW  FA
0B2B:  MOVWF  52
0B2C:  BCF    0A.3
0B2D:  CALL   1C8
0B2E:  BSF    0A.3
0B2F:  DECFSZ 51,F
0B30:  GOTO   32A
....................          } 
0B31:  INCF   4E,F
0B32:  GOTO   2FF
....................          Delay_ms(5000); 
0B33:  MOVLW  14
0B34:  MOVWF  51
0B35:  MOVLW  FA
0B36:  MOVWF  52
0B37:  BCF    0A.3
0B38:  CALL   1C8
0B39:  BSF    0A.3
0B3A:  DECFSZ 51,F
0B3B:  GOTO   335
....................          set_pwm1_duty(0); 
0B3C:  CLRF   15
....................          set_pwm2_duty(0); 
0B3D:  CLRF   1B
....................          del_sms(); 
0B3E:  BCF    0A.3
0B3F:  CALL   374
0B40:  BSF    0A.3
....................          break; 
0B41:  GOTO   532
....................       } 
....................  
....................       if (toupper(odp[0]) == 'H') 
0B42:  MOVF   26,W
0B43:  SUBLW  60
0B44:  BTFSC  03.0
0B45:  GOTO   34D
0B46:  MOVF   26,W
0B47:  SUBLW  7A
0B48:  BTFSS  03.0
0B49:  GOTO   34D
0B4A:  MOVF   26,W
0B4B:  ANDLW  DF
0B4C:  GOTO   34E
0B4D:  MOVF   26,W
0B4E:  SUBLW  48
0B4F:  BTFSS  03.2
0B50:  GOTO   3FD
....................       { 
....................          set_pwm1_duty(VYKON); 
0B51:  MOVLW  64
0B52:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
0B53:  MOVWF  1B
....................          Delay_ms(10000); 
0B54:  MOVLW  28
0B55:  MOVWF  51
0B56:  MOVLW  FA
0B57:  MOVWF  52
0B58:  BCF    0A.3
0B59:  CALL   1C8
0B5A:  BSF    0A.3
0B5B:  DECFSZ 51,F
0B5C:  GOTO   356
....................          for(n=0;n<=1;n++) 
0B5D:  CLRF   4E
0B5E:  MOVF   4E,W
0B5F:  SUBLW  01
0B60:  BTFSS  03.0
0B61:  GOTO   3EE
....................          { 
....................             fprintf(VRTULE,"[[MARTIN[["); // " MARTIN  " 
0B62:  CLRF   51
0B63:  MOVF   51,W
0B64:  BCF    0A.3
0B65:  CALL   0F3
0B66:  BSF    0A.3
0B67:  IORLW  00
0B68:  BTFSC  03.2
0B69:  GOTO   370
0B6A:  INCF   51,F
0B6B:  MOVWF  52
0B6C:  BCF    0A.3
0B6D:  CALL   348
0B6E:  BSF    0A.3
0B6F:  GOTO   363
....................             Delay_ms(2000); 
0B70:  MOVLW  08
0B71:  MOVWF  51
0B72:  MOVLW  FA
0B73:  MOVWF  52
0B74:  BCF    0A.3
0B75:  CALL   1C8
0B76:  BSF    0A.3
0B77:  DECFSZ 51,F
0B78:  GOTO   372
....................             fprintf(VRTULE,"[[SVEJDA[["); // " SVEJDA  " 
0B79:  CLRF   51
0B7A:  MOVF   51,W
0B7B:  BCF    0A.3
0B7C:  CALL   105
0B7D:  BSF    0A.3
0B7E:  IORLW  00
0B7F:  BTFSC  03.2
0B80:  GOTO   387
0B81:  INCF   51,F
0B82:  MOVWF  52
0B83:  BCF    0A.3
0B84:  CALL   348
0B85:  BSF    0A.3
0B86:  GOTO   37A
....................             Delay_ms(2000); 
0B87:  MOVLW  08
0B88:  MOVWF  51
0B89:  MOVLW  FA
0B8A:  MOVWF  52
0B8B:  BCF    0A.3
0B8C:  CALL   1C8
0B8D:  BSF    0A.3
0B8E:  DECFSZ 51,F
0B8F:  GOTO   389
....................             fprintf(VRTULE,"[[TOMAS[[["); // " TOMAS " 
0B90:  CLRF   51
0B91:  MOVF   51,W
0B92:  BCF    0A.3
0B93:  CALL   114
0B94:  BSF    0A.3
0B95:  IORLW  00
0B96:  BTFSC  03.2
0B97:  GOTO   39E
0B98:  INCF   51,F
0B99:  MOVWF  52
0B9A:  BCF    0A.3
0B9B:  CALL   348
0B9C:  BSF    0A.3
0B9D:  GOTO   391
....................             Delay_ms(2000); 
0B9E:  MOVLW  08
0B9F:  MOVWF  51
0BA0:  MOVLW  FA
0BA1:  MOVWF  52
0BA2:  BCF    0A.3
0BA3:  CALL   1C8
0BA4:  BSF    0A.3
0BA5:  DECFSZ 51,F
0BA6:  GOTO   3A0
....................             fprintf(VRTULE,"[[[KAPL[[["); // "KAPL" 
0BA7:  CLRF   51
0BA8:  MOVF   51,W
0BA9:  BCF    0A.3
0BAA:  CALL   123
0BAB:  BSF    0A.3
0BAC:  IORLW  00
0BAD:  BTFSC  03.2
0BAE:  GOTO   3B5
0BAF:  INCF   51,F
0BB0:  MOVWF  52
0BB1:  BCF    0A.3
0BB2:  CALL   348
0BB3:  BSF    0A.3
0BB4:  GOTO   3A8
....................             Delay_ms(2000); 
0BB5:  MOVLW  08
0BB6:  MOVWF  51
0BB7:  MOVLW  FA
0BB8:  MOVWF  52
0BB9:  BCF    0A.3
0BBA:  CALL   1C8
0BBB:  BSF    0A.3
0BBC:  DECFSZ 51,F
0BBD:  GOTO   3B7
....................             fprintf(VRTULE,"[[JAKUB[[["); // " JAKUB " 
0BBE:  CLRF   51
0BBF:  MOVF   51,W
0BC0:  BCF    0A.3
0BC1:  CALL   132
0BC2:  BSF    0A.3
0BC3:  IORLW  00
0BC4:  BTFSC  03.2
0BC5:  GOTO   3CC
0BC6:  INCF   51,F
0BC7:  MOVWF  52
0BC8:  BCF    0A.3
0BC9:  CALL   348
0BCA:  BSF    0A.3
0BCB:  GOTO   3BF
....................             Delay_ms(2000); 
0BCC:  MOVLW  08
0BCD:  MOVWF  51
0BCE:  MOVLW  FA
0BCF:  MOVWF  52
0BD0:  BCF    0A.3
0BD1:  CALL   1C8
0BD2:  BSF    0A.3
0BD3:  DECFSZ 51,F
0BD4:  GOTO   3CE
....................             fprintf(VRTULE,"[[KAKONA[["); // "KAKONA" 
0BD5:  CLRF   51
0BD6:  MOVF   51,W
0BD7:  BCF    0A.3
0BD8:  CALL   141
0BD9:  BSF    0A.3
0BDA:  IORLW  00
0BDB:  BTFSC  03.2
0BDC:  GOTO   3E3
0BDD:  INCF   51,F
0BDE:  MOVWF  52
0BDF:  BCF    0A.3
0BE0:  CALL   348
0BE1:  BSF    0A.3
0BE2:  GOTO   3D6
....................             Delay_ms(2000); 
0BE3:  MOVLW  08
0BE4:  MOVWF  51
0BE5:  MOVLW  FA
0BE6:  MOVWF  52
0BE7:  BCF    0A.3
0BE8:  CALL   1C8
0BE9:  BSF    0A.3
0BEA:  DECFSZ 51,F
0BEB:  GOTO   3E5
....................          } 
0BEC:  INCF   4E,F
0BED:  GOTO   35E
....................          Delay_ms(3000); 
0BEE:  MOVLW  0C
0BEF:  MOVWF  51
0BF0:  MOVLW  FA
0BF1:  MOVWF  52
0BF2:  BCF    0A.3
0BF3:  CALL   1C8
0BF4:  BSF    0A.3
0BF5:  DECFSZ 51,F
0BF6:  GOTO   3F0
....................          set_pwm1_duty(0); 
0BF7:  CLRF   15
....................          set_pwm2_duty(0); 
0BF8:  CLRF   1B
....................          del_sms(); 
0BF9:  BCF    0A.3
0BFA:  CALL   374
0BFB:  BSF    0A.3
....................          break; 
0BFC:  GOTO   532
....................       } 
....................  
....................       if (toupper(odp[0]) == 'I') 
0BFD:  MOVF   26,W
0BFE:  SUBLW  60
0BFF:  BTFSC  03.0
0C00:  GOTO   408
0C01:  MOVF   26,W
0C02:  SUBLW  7A
0C03:  BTFSS  03.0
0C04:  GOTO   408
0C05:  MOVF   26,W
0C06:  ANDLW  DF
0C07:  GOTO   409
0C08:  MOVF   26,W
0C09:  SUBLW  49
0C0A:  BTFSS  03.2
0C0B:  GOTO   4A2
....................       { 
....................          set_pwm1_duty(VYKON); 
0C0C:  MOVLW  64
0C0D:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
0C0E:  MOVWF  1B
....................          Delay_ms(10000); 
0C0F:  MOVLW  28
0C10:  MOVWF  51
0C11:  MOVLW  FA
0C12:  MOVWF  52
0C13:  BCF    0A.3
0C14:  CALL   1C8
0C15:  BSF    0A.3
0C16:  DECFSZ 51,F
0C17:  GOTO   411
....................          for(n=0;n<=1;n++) 
0C18:  CLRF   4E
0C19:  MOVF   4E,W
0C1A:  SUBLW  01
0C1B:  BTFSS  03.0
0C1C:  GOTO   492
....................          { 
....................             fprintf(VRTULE,"ODPOVED[NA"); // "ODPOVED NA" 
0C1D:  CLRF   51
0C1E:  MOVF   51,W
0C1F:  BCF    0A.3
0C20:  CALL   150
0C21:  BSF    0A.3
0C22:  IORLW  00
0C23:  BTFSC  03.2
0C24:  GOTO   42B
0C25:  INCF   51,F
0C26:  MOVWF  52
0C27:  BCF    0A.3
0C28:  CALL   348
0C29:  BSF    0A.3
0C2A:  GOTO   41E
....................             Delay_ms(2000); 
0C2B:  MOVLW  08
0C2C:  MOVWF  51
0C2D:  MOVLW  FA
0C2E:  MOVWF  52
0C2F:  BCF    0A.3
0C30:  CALL   1C8
0C31:  BSF    0A.3
0C32:  DECFSZ 51,F
0C33:  GOTO   42D
....................             fprintf(VRTULE,"[[VASI[[[["); // " VASI  " 
0C34:  CLRF   51
0C35:  MOVF   51,W
0C36:  BCF    0A.3
0C37:  CALL   15F
0C38:  BSF    0A.3
0C39:  IORLW  00
0C3A:  BTFSC  03.2
0C3B:  GOTO   442
0C3C:  INCF   51,F
0C3D:  MOVWF  52
0C3E:  BCF    0A.3
0C3F:  CALL   348
0C40:  BSF    0A.3
0C41:  GOTO   435
....................             Delay_ms(2000); 
0C42:  MOVLW  08
0C43:  MOVWF  51
0C44:  MOVLW  FA
0C45:  MOVWF  52
0C46:  BCF    0A.3
0C47:  CALL   1C8
0C48:  BSF    0A.3
0C49:  DECFSZ 51,F
0C4A:  GOTO   444
....................             fprintf(VRTULE,"[[OTAZKU[["); // " OTAZKU " 
0C4B:  CLRF   51
0C4C:  MOVF   51,W
0C4D:  BCF    0A.3
0C4E:  CALL   16E
0C4F:  BSF    0A.3
0C50:  IORLW  00
0C51:  BTFSC  03.2
0C52:  GOTO   459
0C53:  INCF   51,F
0C54:  MOVWF  52
0C55:  BCF    0A.3
0C56:  CALL   348
0C57:  BSF    0A.3
0C58:  GOTO   44C
....................             Delay_ms(2000); 
0C59:  MOVLW  08
0C5A:  MOVWF  51
0C5B:  MOVLW  FA
0C5C:  MOVWF  52
0C5D:  BCF    0A.3
0C5E:  CALL   1C8
0C5F:  BSF    0A.3
0C60:  DECFSZ 51,F
0C61:  GOTO   45B
....................             fprintf(VRTULE,"[[[[JE[[[["); // "JE" 
0C62:  CLRF   51
0C63:  MOVF   51,W
0C64:  BCF    0A.3
0C65:  CALL   17D
0C66:  BSF    0A.3
0C67:  IORLW  00
0C68:  BTFSC  03.2
0C69:  GOTO   470
0C6A:  INCF   51,F
0C6B:  MOVWF  52
0C6C:  BCF    0A.3
0C6D:  CALL   348
0C6E:  BSF    0A.3
0C6F:  GOTO   463
....................             Delay_ms(2000); 
0C70:  MOVLW  08
0C71:  MOVWF  51
0C72:  MOVLW  FA
0C73:  MOVWF  52
0C74:  BCF    0A.3
0C75:  CALL   1C8
0C76:  BSF    0A.3
0C77:  DECFSZ 51,F
0C78:  GOTO   472
....................             fprintf(VRTULE,"[[[[ec[[[["); // " 42 " 
0C79:  CLRF   51
0C7A:  MOVF   51,W
0C7B:  BCF    0A.3
0C7C:  CALL   18C
0C7D:  BSF    0A.3
0C7E:  IORLW  00
0C7F:  BTFSC  03.2
0C80:  GOTO   487
0C81:  INCF   51,F
0C82:  MOVWF  52
0C83:  BCF    0A.3
0C84:  CALL   348
0C85:  BSF    0A.3
0C86:  GOTO   47A
....................             Delay_ms(2000); 
0C87:  MOVLW  08
0C88:  MOVWF  51
0C89:  MOVLW  FA
0C8A:  MOVWF  52
0C8B:  BCF    0A.3
0C8C:  CALL   1C8
0C8D:  BSF    0A.3
0C8E:  DECFSZ 51,F
0C8F:  GOTO   489
....................          } 
0C90:  INCF   4E,F
0C91:  GOTO   419
....................          Delay_ms(3000); 
0C92:  MOVLW  0C
0C93:  MOVWF  51
0C94:  MOVLW  FA
0C95:  MOVWF  52
0C96:  BCF    0A.3
0C97:  CALL   1C8
0C98:  BSF    0A.3
0C99:  DECFSZ 51,F
0C9A:  GOTO   494
....................          set_pwm1_duty(0); 
0C9B:  CLRF   15
....................          set_pwm2_duty(0); 
0C9C:  CLRF   1B
....................          del_sms(); 
0C9D:  BCF    0A.3
0C9E:  CALL   374
0C9F:  BSF    0A.3
....................          break; 
0CA0:  GOTO   532
....................       } 
....................       else 
0CA1:  GOTO   4F8
....................       { 
....................          set_pwm1_duty(VYKON); 
0CA2:  MOVLW  64
0CA3:  MOVWF  15
....................          set_pwm2_duty(VYKON); 
0CA4:  MOVWF  1B
....................          Delay_ms(10000); 
0CA5:  MOVLW  28
0CA6:  MOVWF  51
0CA7:  MOVLW  FA
0CA8:  MOVWF  52
0CA9:  BCF    0A.3
0CAA:  CALL   1C8
0CAB:  BSF    0A.3
0CAC:  DECFSZ 51,F
0CAD:  GOTO   4A7
....................          fprintf(VRTULE,"[[NEUMIS[["); // "NEUMIS" 
0CAE:  CLRF   51
0CAF:  MOVF   51,W
0CB0:  BCF    0A.3
0CB1:  CALL   19B
0CB2:  BSF    0A.3
0CB3:  IORLW  00
0CB4:  BTFSC  03.2
0CB5:  GOTO   4BC
0CB6:  INCF   51,F
0CB7:  MOVWF  52
0CB8:  BCF    0A.3
0CB9:  CALL   348
0CBA:  BSF    0A.3
0CBB:  GOTO   4AF
....................          Delay_ms(2000); 
0CBC:  MOVLW  08
0CBD:  MOVWF  51
0CBE:  MOVLW  FA
0CBF:  MOVWF  52
0CC0:  BCF    0A.3
0CC1:  CALL   1C8
0CC2:  BSF    0A.3
0CC3:  DECFSZ 51,F
0CC4:  GOTO   4BE
....................          fprintf(VRTULE,"[[[PSAT[[["); // " PSAT  " 
0CC5:  CLRF   51
0CC6:  MOVF   51,W
0CC7:  BCF    0A.3
0CC8:  CALL   1AA
0CC9:  BSF    0A.3
0CCA:  IORLW  00
0CCB:  BTFSC  03.2
0CCC:  GOTO   4D3
0CCD:  INCF   51,F
0CCE:  MOVWF  52
0CCF:  BCF    0A.3
0CD0:  CALL   348
0CD1:  BSF    0A.3
0CD2:  GOTO   4C6
....................          Delay_ms(2000); 
0CD3:  MOVLW  08
0CD4:  MOVWF  51
0CD5:  MOVLW  FA
0CD6:  MOVWF  52
0CD7:  BCF    0A.3
0CD8:  CALL   1C8
0CD9:  BSF    0A.3
0CDA:  DECFSZ 51,F
0CDB:  GOTO   4D5
....................          fprintf(VRTULE,"[[TRUBKO[["); // " TRUBKO " 
0CDC:  CLRF   51
0CDD:  MOVF   51,W
0CDE:  BCF    0A.3
0CDF:  CALL   1B9
0CE0:  BSF    0A.3
0CE1:  IORLW  00
0CE2:  BTFSC  03.2
0CE3:  GOTO   4EA
0CE4:  INCF   51,F
0CE5:  MOVWF  52
0CE6:  BCF    0A.3
0CE7:  CALL   348
0CE8:  BSF    0A.3
0CE9:  GOTO   4DD
....................          Delay_ms(3000); 
0CEA:  MOVLW  0C
0CEB:  MOVWF  51
0CEC:  MOVLW  FA
0CED:  MOVWF  52
0CEE:  BCF    0A.3
0CEF:  CALL   1C8
0CF0:  BSF    0A.3
0CF1:  DECFSZ 51,F
0CF2:  GOTO   4EC
....................          set_pwm1_duty(0); 
0CF3:  CLRF   15
....................          set_pwm2_duty(0); 
0CF4:  CLRF   1B
....................          del_sms(); 
0CF5:  BCF    0A.3
0CF6:  CALL   374
0CF7:  BSF    0A.3
....................       } 
....................    } 
....................       read_time(); 
0CF8:  BCF    0A.3
0CF9:  GOTO   37F
0CFA:  BSF    0A.3
....................       time=strtoul(odp,&ptr,10); 
0CFB:  MOVLW  26
0CFC:  MOVWF  51
0CFD:  MOVLW  4F
0CFE:  MOVWF  52
0CFF:  MOVLW  0A
0D00:  MOVWF  53
0D01:  BCF    0A.3
0D02:  GOTO   3D2
0D03:  BSF    0A.3
0D04:  MOVF   78,W
0D05:  MOVWF  50
....................       if((time >= 30 && time <= 32) || (time >= 0 && time <= 2) || (time >= 45 && time <= 47) || (time >= 15 && time <= 17)) 
0D06:  MOVF   50,W
0D07:  SUBLW  1D
0D08:  BTFSC  03.0
0D09:  GOTO   50E
0D0A:  MOVF   50,W
0D0B:  SUBLW  20
0D0C:  BTFSC  03.0
0D0D:  GOTO   522
0D0E:  MOVF   50,W
0D0F:  SUBLW  02
0D10:  BTFSC  03.0
0D11:  GOTO   522
0D12:  MOVF   50,W
0D13:  SUBLW  2C
0D14:  BTFSC  03.0
0D15:  GOTO   51A
0D16:  MOVF   50,W
0D17:  SUBLW  2F
0D18:  BTFSC  03.0
0D19:  GOTO   522
0D1A:  MOVF   50,W
0D1B:  SUBLW  0E
0D1C:  BTFSC  03.0
0D1D:  GOTO   526
0D1E:  MOVF   50,W
0D1F:  SUBLW  11
0D20:  BTFSS  03.0
0D21:  GOTO   526
....................       { 
....................         set_pwm1_duty(VYKON); 
0D22:  MOVLW  64
0D23:  MOVWF  15
....................         set_pwm2_duty(VYKON); 
0D24:  MOVWF  1B
....................       } 
....................       else 
0D25:  GOTO   528
....................       { 
....................          set_pwm1_duty(0); 
0D26:  CLRF   15
....................          set_pwm2_duty(0); 
0D27:  CLRF   1B
....................       } 
....................  
....................       delay_ms(1000); 
0D28:  MOVLW  04
0D29:  MOVWF  51
0D2A:  MOVLW  FA
0D2B:  MOVWF  52
0D2C:  BCF    0A.3
0D2D:  CALL   1C8
0D2E:  BSF    0A.3
0D2F:  DECFSZ 51,F
0D30:  GOTO   52A
....................  } 
0D31:  GOTO   07B
.................... } 
0D32:  SLEEP

Configuration Fuses:
   Word  1: 3F3E   HS WDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD NOWRT