CCS PCM C Compiler, Version 3.245, 27853               11-V-08 14:54

               Filename: D:\MLAB_E\projekty\rotacni_display\SW\infra\infra.lst

               ROM used: 637 words (8%)
                         Largest free fragment is 2048
               RAM used: 28 (16%) at main() level
                         38 (22%) worst case
               Stack:    3 worst case (2 in main + 1 for interrupts)

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   1D7
0003:  NOP
0004:  MOVWF  7F
0005:  SWAPF  03,W
0006:  CLRF   03
0007:  MOVWF  21
0008:  MOVF   0A,W
0009:  MOVWF  20
000A:  CLRF   0A
000B:  MOVF   04,W
000C:  MOVWF  22
000D:  MOVF   77,W
000E:  MOVWF  23
000F:  MOVF   78,W
0010:  MOVWF  24
0011:  MOVF   79,W
0012:  MOVWF  25
0013:  MOVF   7A,W
0014:  MOVWF  26
0015:  MOVF   7B,W
0016:  MOVWF  27
0017:  BCF    03.7
0018:  BCF    03.5
0019:  MOVLW  8C
001A:  MOVWF  04
001B:  BTFSS  00.5
001C:  GOTO   01F
001D:  BTFSC  0C.5
001E:  GOTO   032
001F:  MOVF   22,W
0020:  MOVWF  04
0021:  MOVF   23,W
0022:  MOVWF  77
0023:  MOVF   24,W
0024:  MOVWF  78
0025:  MOVF   25,W
0026:  MOVWF  79
0027:  MOVF   26,W
0028:  MOVWF  7A
0029:  MOVF   27,W
002A:  MOVWF  7B
002B:  MOVF   20,W
002C:  MOVWF  0A
002D:  SWAPF  21,W
002E:  MOVWF  03
002F:  SWAPF  7F,F
0030:  SWAPF  7F,W
0031:  RETFIE
0032:  BCF    0A.3
0033:  BCF    0A.4
0034:  GOTO   13B
.................... #include ".\infra.h" 
.................... #include <16F877A.h> 
.................... //////// Standard Header file for the PIC16F877A device //////////////// 
.................... #device PIC16F877A 
.................... #list 
....................  
.................... #device adc=8 
....................  
.................... #FUSES WDT                      //Watch Dog Timer 
.................... #FUSES 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=4000000,RESTART_WDT) 
*
0153:  MOVLW  3A
0154:  MOVWF  04
0155:  MOVF   00,W
0156:  BTFSC  03.2
0157:  GOTO   169
0158:  MOVLW  01
0159:  MOVWF  78
015A:  MOVLW  BF
015B:  MOVWF  77
015C:  CLRWDT
015D:  DECFSZ 77,F
015E:  GOTO   15C
015F:  DECFSZ 78,F
0160:  GOTO   15A
0161:  MOVLW  4A
0162:  MOVWF  77
0163:  DECFSZ 77,F
0164:  GOTO   163
0165:  NOP
0166:  CLRWDT
0167:  DECFSZ 00,F
0168:  GOTO   158
0169:  BCF    0A.3
016A:  BCF    0A.4
016B:  GOTO   1A4 (RETURN)
.................... #use rs232(baud=600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8) 
....................  
....................  
....................  
....................  
.................... #define MAX_SLOVO 10   // Maximalni pocet znaku ve slovu 
....................  
.................... int8 napis[MAX_SLOVO+1]; 
.................... int8 otacky; 
....................  
.................... const int8 logo[MAX_SLOVO+1]={'[','[',92,'[','E','e','A','[',92,'[',0};   // [blesk] E4A [blesk] 
.................... const int8 rok[MAX_SLOVO+1]={'[','c','a','a','e',']','c','a','a','i',0}; // 2004-2008 
....................  
.................... #int_RDA 
.................... void  RDA_isr(void) 
.................... { 
....................    int n; 
....................    output_B(0x55); 
*
013B:  BSF    03.5
013C:  CLRF   06
013D:  MOVLW  55
013E:  BCF    03.5
013F:  MOVWF  06
....................    for(n=0;n<MAX_SLOVO;n++) 
0140:  CLRF   3F
0141:  MOVF   3F,W
0142:  SUBLW  09
0143:  BTFSS  03.0
0144:  GOTO   14E
....................    { 
....................      napis[n]=getc(); 
0145:  MOVLW  28
0146:  ADDWF  3F,W
0147:  MOVWF  04
0148:  BTFSS  0C.5
0149:  GOTO   148
014A:  MOVF   1A,W
014B:  MOVWF  00
....................    } 
014C:  INCF   3F,F
014D:  GOTO   141
....................    otacky=0; 
014E:  CLRF   33
.................... } 
....................  
014F:  BCF    0C.5
0150:  BCF    0A.3
0151:  BCF    0A.4
0152:  GOTO   01F
.................... void LED_print() 
.................... { 
.................... unsigned int slovo,pismeno,sloupec,j; 
....................  
....................    const int8 pis[45*5]={0b00000001,0b11110110,0b11110110,0b11110110,0b00000001, // A 
....................                         0b00000000,0b01110110,0b01110110,0b01110110,0b10001001,  // B 
....................                         0b10000001,0b01111110,0b01111110,0b01111110,0b10111101,  // C 
....................                         0b00000000,0b01111110,0b01111110,0b01111110,0b10000001,  // D 
....................                         0b00000000,0b01110110,0b01110110,0b01111110,0b01111110,  // E 
....................                         0b00000000,0b11110110,0b11110110,0b11111110,0b11111110,  // F 
....................                         0b10000001,0b01111110,0b01110110,0b01110110,0b10000101,  // G 
....................                         0b00000000,0b11110111,0b11110111,0b11110111,0b00000000,  // H 
....................                         0b01111110,0b01111110,0b00000000,0b01111110,0b01111110,  // I 
....................                         0b10111110,0b01111110,0b01111110,0b01111110,0b10000000,  // J 
....................                         0b00000000,0b11110111,0b11110111,0b11101011,0b00011100,  // K 
....................                         0b00000000,0b01111111,0b01111111,0b01111111,0b01111111,  // L 
....................                         0b00000000,0b11111110,0b11110000,0b11111110,0b00000000,  // M 
....................                         0b00000000,0b11101111,0b11011111,0b10111111,0b00000000,  // N 
....................                         0b10000001,0b01111110,0b01111110,0b01111110,0b10000001,  // O 
....................                         0b00000000,0b11110110,0b11110110,0b11110110,0b11111001,  // P 
....................                         0b10000001,0b01111110,0b01111110,0b01111110,0b00000001,  // Q 
....................                         0b00000000,0b11110110,0b11110110,0b11110110,0b00001001,  // R 
....................                         0b10111001,0b01110110,0b01110110,0b01110110,0b10001101,  // S 
....................                         0b11111110,0b11111110,0b00000000,0b11111110,0b11111110,  // T 
....................                         0b10000000,0b01111111,0b01111111,0b01111111,0b10000000,  // U 
....................                         0b11000000,0b10111111,0b01111111,0b10111111,0b11000000,  // V 
....................                         0b10000000,0b01111111,0b10000000,0b01111111,0b10000000,  // W 
....................                         0b00011100,0b11101011,0b11110111,0b11101011,0b00011100,  // X 
....................                         0b11111000,0b11110111,0b00000111,0b11110111,0b11111000,  // Y 
....................                         0b00011110,0b01101110,0b01110110,0b01111010,0b01111100,  // Z 
....................                         0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,  // mezera [  91 
....................                         0b00010111,0b00110011,0b01010101,0b11100110,0b11110111,  // blesk  \  92 
....................                         0b11110111,0b11110111,0b11110111,0b11110111,0b11110111,  // -      ]  93 
....................                         0b11111111,0b11111111,0b01111111,0b11111111,0b11111111,  // .      ^  94 
....................                         0b11111100,0b11110000,0b01000000,0b11110000,0b11111100,  // !      _  95 
....................                         0b11111101,0b11111110,0b01001110,0b11110110,0b11111001,  // ?      `  96 
....................                         0b00000000,0b01111110,0b01111110,0b01111110,0b00000000,  // 0      a 
....................                         0b01111011,0b01111101,0b00000000,0b01111111,0b01111111,  // 1      b 
....................                         0b00111101,0b01011110,0b01101110,0b01110110,0b01111001,  // 2      c 
....................                         0b10111101,0b01111110,0b01110110,0b01110110,0b10001001,  // 3      d 
....................                         0b11110000,0b11110111,0b11110111,0b00000001,0b11110111,  // 4      e 
....................                         0b10111000,0b01110110,0b01110110,0b01110110,0b10001110,  // 5      f 
....................                         0b10000001,0b01110110,0b01110110,0b01110110,0b10001101,  // 6      g 
....................                         0b11111110,0b11111110,0b00001110,0b11110110,0b11111000,  // 7      h 
....................                         0b10001001,0b01110110,0b01110110,0b01110110,0b10001001,  // 8      i 
....................                         0b10111001,0b01110110,0b01110110,0b01110110,0b10000001,  // 9      j 
....................                         0b11111111,0b01111110,0b10111101,0b11000011,0b11111111,  // )      k 
....................                         0b11111111,0b11000011,0b10111101,0b01111110,0b11111111,  // (      l 
....................                         0b11111111,0b11111111,0b11111111,0b11011011,0b11111111,  // :      m 
....................                         }; 
....................  
....................    while(read_adc()<9);       // Cekani na magnet 
*
0193:  BSF    1F.2
0194:  BTFSC  1F.2
0195:  GOTO   194
0196:  MOVF   1E,W
0197:  SUBLW  08
0198:  BTFSC  03.0
0199:  GOTO   193
....................    while(read_adc()>50);       // Cekani na opusteni magnetu 
019A:  BSF    1F.2
019B:  BTFSC  1F.2
019C:  GOTO   19B
019D:  MOVF   1E,W
019E:  SUBLW  32
019F:  BTFSS  03.0
01A0:  GOTO   19A
....................    delay_ms(7);      //cekani, na dostatecni odstup od magnetu, pred zacatkem psani textu 
01A1:  MOVLW  07
01A2:  MOVWF  3A
01A3:  GOTO   153
....................  
....................    for(pismeno=0;pismeno<MAX_SLOVO;pismeno++) 
01A4:  CLRF   37
01A5:  MOVF   37,W
01A6:  SUBLW  09
01A7:  BTFSS  03.0
01A8:  GOTO   1D4
....................    { 
....................       for(sloupec=0;sloupec<5;sloupec++) 
01A9:  CLRF   38
01AA:  MOVF   38,W
01AB:  SUBLW  04
01AC:  BTFSS  03.0
01AD:  GOTO   1C8
....................       { 
....................          output_B(pis[(napis[pismeno]-0x41)*5+sloupec]); 
01AE:  MOVLW  28
01AF:  ADDWF  37,W
01B0:  MOVWF  04
01B1:  MOVLW  41
01B2:  SUBWF  00,W
01B3:  MOVWF  3C
01B4:  MOVWF  3D
01B5:  MOVLW  05
01B6:  MOVWF  3E
01B7:  GOTO   16C
01B8:  MOVF   38,W
01B9:  ADDWF  78,W
01BA:  CALL   053
01BB:  MOVWF  3A
01BC:  BSF    03.5
01BD:  CLRF   06
01BE:  BCF    03.5
01BF:  MOVF   3A,W
01C0:  MOVWF  06
....................          delay_us(500); 
01C1:  CLRWDT
01C2:  MOVLW  A6
01C3:  MOVWF  77
01C4:  DECFSZ 77,F
01C5:  GOTO   1C4
....................       } 
01C6:  INCF   38,F
01C7:  GOTO   1AA
....................       output_B(0xFF); 
01C8:  BSF    03.5
01C9:  CLRF   06
01CA:  MOVLW  FF
01CB:  BCF    03.5
01CC:  MOVWF  06
....................       delay_us(500); 
01CD:  CLRWDT
01CE:  MOVLW  A6
01CF:  MOVWF  77
01D0:  DECFSZ 77,F
01D1:  GOTO   1D0
....................    } 
01D2:  INCF   37,F
01D3:  GOTO   1A5
.................... } 
01D4:  BCF    0A.3
01D5:  BCF    0A.4
01D6:  GOTO   257 (RETURN)
....................  
.................... void main() 
.................... { 
01D7:  CLRF   04
01D8:  MOVLW  1F
01D9:  ANDWF  03,F
01DA:  MOVLW  67
01DB:  BSF    03.5
01DC:  MOVWF  19
01DD:  MOVLW  22
01DE:  MOVWF  18
01DF:  MOVLW  90
01E0:  BCF    03.5
01E1:  MOVWF  18
01E2:  BSF    03.5
01E3:  BSF    1F.0
01E4:  BSF    1F.1
01E5:  BSF    1F.2
01E6:  BCF    1F.3
01E7:  MOVLW  07
01E8:  MOVWF  1C
....................  
....................  
....................    setup_adc_ports(AN0); 
*
01EC:  BSF    03.5
01ED:  BCF    1F.0
01EE:  BSF    1F.1
01EF:  BSF    1F.2
01F0:  BSF    1F.3
....................    setup_adc(ADC_CLOCK_INTERNAL); 
01F1:  BCF    1F.6
01F2:  BCF    03.5
01F3:  BSF    1F.6
01F4:  BSF    1F.7
01F5:  BSF    03.5
01F6:  BCF    1F.7
01F7:  BCF    03.5
01F8:  BSF    1F.0
....................    setup_psp(PSP_DISABLED); 
01F9:  BSF    03.5
01FA:  BCF    09.4
....................    setup_spi(SPI_SS_DISABLED); 
*
01E9:  MOVLW  FF
01EA:  BCF    03.5
01EB:  MOVWF  34
*
01FB:  BCF    03.5
01FC:  BCF    14.5
01FD:  BCF    34.5
01FE:  MOVF   34,W
01FF:  BSF    03.5
0200:  MOVWF  07
0201:  BCF    03.5
0202:  BSF    34.4
0203:  MOVF   34,W
0204:  BSF    03.5
0205:  MOVWF  07
0206:  BCF    03.5
0207:  BCF    34.3
0208:  MOVF   34,W
0209:  BSF    03.5
020A:  MOVWF  07
020B:  MOVLW  01
020C:  BCF    03.5
020D:  MOVWF  14
020E:  MOVLW  00
020F:  BSF    03.5
0210:  MOVWF  14
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); 
0211:  MOVF   01,W
0212:  ANDLW  C7
0213:  IORLW  08
0214:  MOVWF  01
....................    setup_wdt(WDT_2304MS); 
0215:  MOVLW  0F
0216:  MOVWF  77
0217:  MOVLW  07
0218:  BCF    03.5
0219:  CLRF   01
021A:  MOVLW  81
021B:  MOVWF  04
021C:  MOVF   00,W
021D:  ANDLW  F0
021E:  IORLW  07
021F:  MOVWF  00
0220:  CLRWDT
0221:  MOVF   00,W
0222:  ANDLW  F7
0223:  BTFSC  77.3
0224:  ANDLW  F0
0225:  IORWF  77,W
0226:  MOVWF  00
....................    setup_timer_1(T1_DISABLED); 
0227:  CLRF   10
....................    setup_timer_2(T2_DISABLED,0,1); 
0228:  MOVLW  00
0229:  MOVWF  78
022A:  MOVWF  12
022B:  MOVLW  00
022C:  BSF    03.5
022D:  MOVWF  12
....................    setup_comparator(NC_NC_NC_NC); 
022E:  MOVLW  07
022F:  MOVWF  1C
0230:  MOVF   05,W
0231:  CLRWDT
0232:  MOVLW  02
0233:  MOVWF  77
0234:  DECFSZ 77,F
0235:  GOTO   234
0236:  NOP
0237:  NOP
0238:  MOVF   1C,W
0239:  BCF    03.5
023A:  BCF    0D.6
....................    setup_vref(FALSE); 
023B:  BSF    03.5
023C:  CLRF   1D
....................  
....................    enable_interrupts(INT_RDA); 
023D:  BSF    0C.5
....................    enable_interrupts(GLOBAL); 
023E:  MOVLW  C0
023F:  BCF    03.5
0240:  IORWF  0B,F
....................  
....................    set_adc_channel(0);     // Prevodnik pro Hall 
0241:  MOVLW  00
0242:  MOVWF  78
0243:  MOVF   1F,W
0244:  ANDLW  C7
0245:  IORWF  78,W
0246:  MOVWF  1F
....................    output_B(0xFF);         // Zhasneme 
0247:  BSF    03.5
0248:  CLRF   06
0249:  MOVLW  FF
024A:  BCF    03.5
024B:  MOVWF  06
....................  
....................    otacky=0; 
024C:  CLRF   33
....................    napis[0]=0; 
024D:  CLRF   28
....................  
....................    while(TRUE) 
....................    { 
....................    int1 vyber; 
....................     
....................       otacky++; 
024E:  INCF   33,F
....................     
....................       if (napis[0]!=0 && otacky <= 30) 
024F:  MOVF   28,F
0250:  BTFSC  03.2
0251:  GOTO   258
0252:  MOVF   33,W
0253:  SUBLW  1E
0254:  BTFSS  03.0
0255:  GOTO   258
....................       { 
....................          LED_print(); 
0256:  GOTO   193
....................       } 
....................       else 
0257:  GOTO   27B
....................       { 
....................          if (vyber == 0) strcpy(napis,logo); 
0258:  BTFSC  35.0
0259:  GOTO   26A
025A:  CLRF   36
025B:  CLRF   37
025C:  MOVLW  28
025D:  MOVWF  04
025E:  MOVF   36,W
025F:  ADDWF  04,F
0260:  MOVF   37,W
0261:  CALL   035
0262:  MOVWF  00
0263:  IORLW  00
0264:  BTFSC  03.2
0265:  GOTO   269
0266:  INCF   37,F
0267:  INCF   36,F
0268:  GOTO   25C
....................          else strcpy(napis,rok); 
0269:  GOTO   279
026A:  CLRF   36
026B:  CLRF   37
026C:  MOVLW  28
026D:  MOVWF  04
026E:  MOVF   36,W
026F:  ADDWF  04,F
0270:  MOVF   37,W
0271:  CALL   044
0272:  MOVWF  00
0273:  IORLW  00
0274:  BTFSC  03.2
0275:  GOTO   279
0276:  INCF   37,F
0277:  INCF   36,F
0278:  GOTO   26C
....................          vyber++; 
0279:  MOVLW  01
027A:  XORWF  35,F
....................       } 
....................    } 
027B:  GOTO   24E
.................... } 
027C:  SLEEP

Configuration Fuses:
   Word  1: 3F3D   XT WDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD NOWRT