Line 1... |
Line 1... |
1 |
CCS PCM C Compiler, Version 3.245, 27853 11-V-08 00:17 |
1 |
CCS PCM C Compiler, Version 3.245, 27853 11-V-08 15:47 |
2 |
|
2 |
|
3 |
Filename: D:\MLAB_E\projekty\Ovladani_mobilnim_telefonem\SW\final\main.lst |
3 |
Filename: D:\MLAB_E\projekty\Ovladani_mobilnim_telefonem\SW\final\main.lst |
4 |
|
4 |
|
5 |
ROM used: 275 words (3%) |
5 |
ROM used: 1315 words (16%) |
6 |
Largest free fragment is 2048 |
6 |
Largest free fragment is 2048 |
7 |
RAM used: 52 (30%) at main() level |
7 |
RAM used: 52 (30%) at main() level |
8 |
56 (32%) worst case |
8 |
139 (79%) worst case |
9 |
Stack: 1 locations |
9 |
Stack: 2 locations |
10 |
|
10 |
|
11 |
* |
11 |
* |
12 |
0000: MOVLW 00 |
12 |
0000: MOVLW 00 |
13 |
0001: MOVWF 0A |
13 |
0001: MOVWF 0A |
14 |
0002: GOTO 057 |
14 |
0002: GOTO 3D5 |
15 |
0003: NOP |
15 |
0003: NOP |
16 |
.................... #include ".\main.h" |
16 |
.................... #include ".\main.h" |
17 |
.................... #include <16F876A.h> |
17 |
.................... #include <16F876A.h> |
18 |
.................... //////// Standard Header file for the PIC16F876A device //////////////// |
18 |
.................... //////// Standard Header file for the PIC16F876A device //////////////// |
19 |
.................... #device PIC16F876A |
19 |
.................... #device PIC16F876A |
Line 30... |
Line 30... |
30 |
.................... #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O |
30 |
.................... #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O |
31 |
.................... #FUSES NOCPD //No EE protection |
31 |
.................... #FUSES NOCPD //No EE protection |
32 |
.................... #FUSES NOWRT //Program memory not write protected |
32 |
.................... #FUSES NOWRT //Program memory not write protected |
33 |
.................... |
33 |
.................... |
34 |
.................... #use delay(clock=18432000,RESTART_WDT) |
34 |
.................... #use delay(clock=18432000,RESTART_WDT) |
- |
|
35 |
* |
35 |
0013: MOVLW 52 |
36 |
004E: MOVLW 52 |
36 |
0014: MOVWF 04 |
37 |
004F: MOVWF 04 |
37 |
0015: MOVF 00,W |
38 |
0050: MOVF 00,W |
38 |
0016: BTFSC 03.2 |
39 |
0051: BTFSC 03.2 |
39 |
0017: GOTO 028 |
40 |
0052: GOTO 063 |
40 |
0018: MOVLW 05 |
41 |
0053: MOVLW 05 |
41 |
0019: MOVWF 78 |
42 |
0054: MOVWF 78 |
42 |
001A: MOVLW BF |
43 |
0055: MOVLW BF |
43 |
001B: MOVWF 77 |
44 |
0056: MOVWF 77 |
44 |
001C: CLRWDT |
45 |
0057: CLRWDT |
45 |
001D: DECFSZ 77,F |
46 |
0058: DECFSZ 77,F |
46 |
001E: GOTO 01C |
47 |
0059: GOTO 057 |
47 |
001F: DECFSZ 78,F |
48 |
005A: DECFSZ 78,F |
48 |
0020: GOTO 01A |
49 |
005B: GOTO 055 |
49 |
0021: MOVLW F9 |
50 |
005C: MOVLW F9 |
50 |
0022: MOVWF 77 |
51 |
005D: MOVWF 77 |
51 |
0023: DECFSZ 77,F |
52 |
005E: DECFSZ 77,F |
52 |
0024: GOTO 023 |
53 |
005F: GOTO 05E |
53 |
0025: CLRWDT |
54 |
0060: CLRWDT |
54 |
0026: DECFSZ 00,F |
55 |
0061: DECFSZ 00,F |
55 |
0027: GOTO 018 |
56 |
0062: GOTO 053 |
56 |
0028: RETLW 00 |
57 |
0063: RETLW 00 |
57 |
.................... #use rs232(STREAM=MOBIL,baud=19200,force_sw,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8) |
58 |
.................... #use rs232(STREAM=MOBIL,baud=19200,force_sw,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8) |
- |
|
59 |
0064: BCF 20.6 |
- |
|
60 |
0065: MOVF 20,W |
- |
|
61 |
0066: BSF 03.5 |
- |
|
62 |
0067: MOVWF 07 |
- |
|
63 |
0068: BCF 03.5 |
- |
|
64 |
0069: BCF 07.6 |
- |
|
65 |
006A: MOVLW 08 |
- |
|
66 |
006B: MOVWF 78 |
- |
|
67 |
006C: NOP |
- |
|
68 |
006D: NOP |
- |
|
69 |
006E: NOP |
- |
|
70 |
006F: BSF 78.7 |
- |
|
71 |
0070: GOTO 080 |
- |
|
72 |
0071: BCF 78.7 |
- |
|
73 |
0072: RRF 53,F |
- |
|
74 |
0073: BTFSC 03.0 |
- |
|
75 |
0074: BSF 07.6 |
- |
|
76 |
0075: BTFSS 03.0 |
- |
|
77 |
0076: BCF 07.6 |
- |
|
78 |
0077: BSF 78.6 |
- |
|
79 |
0078: GOTO 080 |
- |
|
80 |
0079: BCF 78.6 |
- |
|
81 |
007A: DECFSZ 78,F |
- |
|
82 |
007B: GOTO 072 |
- |
|
83 |
007C: NOP |
- |
|
84 |
007D: NOP |
- |
|
85 |
007E: NOP |
- |
|
86 |
007F: BSF 07.6 |
- |
|
87 |
0080: MOVLW 49 |
- |
|
88 |
0081: MOVWF 04 |
- |
|
89 |
0082: DECFSZ 04,F |
- |
|
90 |
0083: GOTO 082 |
- |
|
91 |
0084: NOP |
- |
|
92 |
0085: NOP |
- |
|
93 |
0086: NOP |
- |
|
94 |
0087: BTFSC 78.7 |
- |
|
95 |
0088: GOTO 071 |
- |
|
96 |
0089: BTFSC 78.6 |
- |
|
97 |
008A: GOTO 079 |
- |
|
98 |
008B: RETLW 00 |
- |
|
99 |
008C: MOVLW 08 |
- |
|
100 |
008D: MOVWF 77 |
- |
|
101 |
008E: BSF 20.7 |
- |
|
102 |
008F: MOVF 20,W |
- |
|
103 |
0090: BSF 03.5 |
- |
|
104 |
0091: MOVWF 07 |
- |
|
105 |
0092: BCF 03.5 |
- |
|
106 |
0093: BTFSS 07.7 |
- |
|
107 |
0094: GOTO 097 |
- |
|
108 |
0095: BSF 03.5 |
- |
|
109 |
0096: GOTO 092 |
- |
|
110 |
0097: CLRF 57 |
- |
|
111 |
0098: BSF 77.7 |
- |
|
112 |
0099: GOTO 0A8 |
- |
|
113 |
009A: BCF 77.7 |
- |
|
114 |
009B: GOTO 0A8 |
- |
|
115 |
009C: BCF 03.0 |
- |
|
116 |
009D: BTFSC 07.7 |
- |
|
117 |
009E: BSF 03.0 |
- |
|
118 |
009F: RRF 57,F |
- |
|
119 |
00A0: BSF 77.6 |
- |
|
120 |
00A1: GOTO 0A8 |
- |
|
121 |
00A2: BCF 77.6 |
- |
|
122 |
00A3: DECFSZ 77,F |
- |
|
123 |
00A4: GOTO 09C |
- |
|
124 |
00A5: MOVF 57,W |
- |
|
125 |
00A6: MOVWF 78 |
- |
|
126 |
00A7: GOTO 0B5 |
- |
|
127 |
00A8: MOVLW 49 |
- |
|
128 |
00A9: BTFSC 77.7 |
- |
|
129 |
00AA: MOVLW 14 |
- |
|
130 |
00AB: MOVWF 78 |
- |
|
131 |
00AC: DECFSZ 78,F |
- |
|
132 |
00AD: GOTO 0AC |
- |
|
133 |
00AE: NOP |
- |
|
134 |
00AF: NOP |
- |
|
135 |
00B0: BTFSC 77.7 |
- |
|
136 |
00B1: GOTO 09A |
- |
|
137 |
00B2: BTFSC 77.6 |
- |
|
138 |
00B3: GOTO 0A2 |
- |
|
139 |
00B4: GOTO 09C |
- |
|
140 |
00B5: RETLW 00 |
58 |
* |
141 |
* |
59 |
006B: MOVLW FF |
142 |
03E9: MOVLW FF |
60 |
006C: BCF 03.5 |
143 |
03EA: BCF 03.5 |
61 |
006D: MOVWF 20 |
144 |
03EB: MOVWF 20 |
62 |
.................... #use rs232(STREAM=VRTULE,baud=600,parity=N,xmit=PIN_B2,rcv=PIN_B4,bits=8) |
145 |
.................... #use rs232(STREAM=VRTULE,baud=600,parity=N,xmit=PIN_B2,rcv=PIN_B4,bits=8) |
63 |
* |
146 |
* |
64 |
0029: BSF 03.5 |
147 |
01D0: BSF 03.5 |
65 |
002A: BCF 06.2 |
148 |
01D1: BCF 06.2 |
66 |
002B: BCF 03.5 |
149 |
01D2: BCF 03.5 |
67 |
002C: BCF 06.2 |
150 |
01D3: BCF 06.2 |
68 |
002D: MOVLW 08 |
151 |
01D4: MOVLW 08 |
69 |
002E: MOVWF 78 |
152 |
01D5: MOVWF 78 |
70 |
002F: NOP |
153 |
01D6: NOP |
71 |
0030: NOP |
154 |
01D7: NOP |
72 |
0031: NOP |
155 |
01D8: NOP |
73 |
0032: BSF 78.7 |
156 |
01D9: BSF 78.7 |
74 |
0033: GOTO 043 |
157 |
01DA: GOTO 1EA |
75 |
0034: BCF 78.7 |
158 |
01DB: BCF 78.7 |
76 |
0035: RRF 52,F |
159 |
01DC: RRF 52,F |
77 |
0036: BTFSC 03.0 |
160 |
01DD: BTFSC 03.0 |
78 |
0037: BSF 06.2 |
161 |
01DE: BSF 06.2 |
79 |
0038: BTFSS 03.0 |
162 |
01DF: BTFSS 03.0 |
80 |
0039: BCF 06.2 |
163 |
01E0: BCF 06.2 |
81 |
003A: BSF 78.6 |
164 |
01E1: BSF 78.6 |
82 |
003B: GOTO 043 |
165 |
01E2: GOTO 1EA |
83 |
003C: BCF 78.6 |
166 |
01E3: BCF 78.6 |
84 |
003D: DECFSZ 78,F |
167 |
01E4: DECFSZ 78,F |
85 |
003E: GOTO 035 |
168 |
01E5: GOTO 1DC |
86 |
003F: NOP |
169 |
01E6: NOP |
87 |
0040: NOP |
170 |
01E7: NOP |
88 |
0041: NOP |
171 |
01E8: NOP |
89 |
0042: BSF 06.2 |
172 |
01E9: BSF 06.2 |
90 |
0043: MOVLW 09 |
173 |
01EA: MOVLW 09 |
91 |
0044: MOVWF 77 |
174 |
01EB: MOVWF 77 |
92 |
0045: CLRF 04 |
175 |
01EC: CLRF 04 |
93 |
0046: DECFSZ 04,F |
176 |
01ED: DECFSZ 04,F |
94 |
0047: GOTO 046 |
177 |
01EE: GOTO 1ED |
95 |
0048: DECFSZ 77,F |
178 |
01EF: DECFSZ 77,F |
96 |
0049: GOTO 045 |
179 |
01F0: GOTO 1EC |
97 |
004A: MOVLW F0 |
180 |
01F1: MOVLW F0 |
98 |
004B: MOVWF 04 |
181 |
01F2: MOVWF 04 |
99 |
004C: DECFSZ 04,F |
182 |
01F3: DECFSZ 04,F |
100 |
004D: GOTO 04C |
183 |
01F4: GOTO 1F3 |
101 |
004E: NOP |
184 |
01F5: NOP |
102 |
004F: NOP |
185 |
01F6: NOP |
103 |
0050: BTFSC 78.7 |
186 |
01F7: BTFSC 78.7 |
104 |
0051: GOTO 034 |
187 |
01F8: GOTO 1DB |
105 |
0052: BTFSC 78.6 |
188 |
01F9: BTFSC 78.6 |
106 |
0053: GOTO 03C |
189 |
01FA: GOTO 1E3 |
107 |
0054: BCF 0A.3 |
- |
|
108 |
0055: BCF 0A.4 |
190 |
01FB: RETLW 00 |
109 |
0056: GOTO 102 (RETURN) |
- |
|
110 |
.................... |
191 |
.................... |
111 |
.................... |
192 |
.................... |
112 |
.................... |
193 |
.................... |
113 |
.................... #define LCD_RS PIN_B1 // rizeni registru LCD displeje |
194 |
.................... #define LCD_RS PIN_B1 // rizeni registru LCD displeje |
114 |
.................... #define LCD_E PIN_B0 // enable LCD displeje |
195 |
.................... #define LCD_E PIN_B0 // enable LCD displeje |
Line 389... |
Line 470... |
389 |
.................... char *memchr(void *s,int c,size_t n) |
470 |
.................... char *memchr(void *s,int c,size_t n) |
390 |
.................... { |
471 |
.................... { |
391 |
.................... char uc; |
472 |
.................... char uc; |
392 |
.................... char *su; |
473 |
.................... char *su; |
393 |
.................... uc=c; |
474 |
.................... uc=c; |
- |
|
475 |
* |
- |
|
476 |
021D: BSF 03.5 |
- |
|
477 |
021E: MOVF 47,W |
- |
|
478 |
021F: MOVWF 49 |
394 |
.................... for(su=s;0<n;++su,--n) |
479 |
.................... for(su=s;0<n;++su,--n) |
- |
|
480 |
0220: MOVF 46,W |
- |
|
481 |
0221: MOVWF 4A |
- |
|
482 |
0222: MOVF 48,W |
- |
|
483 |
0223: SUBLW 00 |
- |
|
484 |
0224: BTFSC 03.0 |
- |
|
485 |
0225: GOTO 232 |
395 |
.................... if(*su==uc) |
486 |
.................... if(*su==uc) |
- |
|
487 |
0226: MOVF 4A,W |
- |
|
488 |
0227: MOVWF 04 |
- |
|
489 |
0228: MOVF 49,W |
- |
|
490 |
0229: SUBWF 00,W |
- |
|
491 |
022A: BTFSS 03.2 |
- |
|
492 |
022B: GOTO 22F |
396 |
.................... return su; |
493 |
.................... return su; |
- |
|
494 |
022C: MOVF 4A,W |
- |
|
495 |
022D: MOVWF 78 |
- |
|
496 |
022E: GOTO 234 |
- |
|
497 |
022F: INCF 4A,F |
- |
|
498 |
0230: DECF 48,F |
- |
|
499 |
0231: GOTO 222 |
397 |
.................... return NULL; |
500 |
.................... return NULL; |
- |
|
501 |
0232: MOVLW 00 |
- |
|
502 |
0233: MOVWF 78 |
398 |
.................... } |
503 |
.................... } |
- |
|
504 |
0234: BCF 03.5 |
- |
|
505 |
0235: RETLW 00 |
399 |
.................... |
506 |
.................... |
400 |
.................... /* standard template: char *strchr(const char *s, int c). |
507 |
.................... /* standard template: char *strchr(const char *s, int c). |
401 |
.................... Finds first occurrence of c in s */ |
508 |
.................... Finds first occurrence of c in s */ |
402 |
.................... |
509 |
.................... |
403 |
.................... char *strchr(char *s, int c) |
510 |
.................... char *strchr(char *s, int c) |
Line 518... |
Line 625... |
518 |
.................... char *strtok(char *s1, char *s2) |
625 |
.................... char *strtok(char *s1, char *s2) |
519 |
.................... { |
626 |
.................... { |
520 |
.................... char *beg, *end; |
627 |
.................... char *beg, *end; |
521 |
.................... static char *save; |
628 |
.................... static char *save; |
522 |
* |
629 |
* |
523 |
006E: CLRF 21 |
630 |
03EC: CLRF 21 |
524 |
.................... |
631 |
.................... |
525 |
.................... beg = (s1)? s1: save; |
632 |
.................... beg = (s1)? s1: save; |
526 |
.................... beg += strspn(beg, s2); |
633 |
.................... beg += strspn(beg, s2); |
527 |
.................... if (*beg == '\0') |
634 |
.................... if (*beg == '\0') |
528 |
.................... { |
635 |
.................... { |
Line 2158... |
Line 2265... |
2158 |
.................... |
2265 |
.................... |
2159 |
.................... long strtoul(char *s,char *endptr,signed int base) |
2266 |
.................... long strtoul(char *s,char *endptr,signed int base) |
2160 |
.................... { |
2267 |
.................... { |
2161 |
.................... char *sc,*s1,*sd; |
2268 |
.................... char *sc,*s1,*sd; |
2162 |
.................... unsigned long x=0; |
2269 |
.................... unsigned long x=0; |
- |
|
2270 |
* |
- |
|
2271 |
024F: CLRF 57 |
- |
|
2272 |
0250: CLRF 58 |
2163 |
.................... char sign; |
2273 |
.................... char sign; |
2164 |
.................... char digits[]="0123456789abcdefghijklmnopqstuvwxyz"; |
2274 |
.................... char digits[]="0123456789abcdefghijklmnopqstuvwxyz"; |
- |
|
2275 |
0251: MOVLW 30 |
- |
|
2276 |
0252: BSF 03.5 |
- |
|
2277 |
0253: MOVWF 20 |
- |
|
2278 |
0254: MOVLW 31 |
- |
|
2279 |
0255: MOVWF 21 |
- |
|
2280 |
0256: MOVLW 32 |
- |
|
2281 |
0257: MOVWF 22 |
- |
|
2282 |
0258: MOVLW 33 |
- |
|
2283 |
0259: MOVWF 23 |
- |
|
2284 |
025A: MOVLW 34 |
- |
|
2285 |
025B: MOVWF 24 |
- |
|
2286 |
025C: MOVLW 35 |
- |
|
2287 |
025D: MOVWF 25 |
- |
|
2288 |
025E: MOVLW 36 |
- |
|
2289 |
025F: MOVWF 26 |
- |
|
2290 |
0260: MOVLW 37 |
- |
|
2291 |
0261: MOVWF 27 |
- |
|
2292 |
0262: MOVLW 38 |
- |
|
2293 |
0263: MOVWF 28 |
- |
|
2294 |
0264: MOVLW 39 |
- |
|
2295 |
0265: MOVWF 29 |
- |
|
2296 |
0266: MOVLW 61 |
- |
|
2297 |
0267: MOVWF 2A |
- |
|
2298 |
0268: MOVLW 62 |
- |
|
2299 |
0269: MOVWF 2B |
- |
|
2300 |
026A: MOVLW 63 |
- |
|
2301 |
026B: MOVWF 2C |
- |
|
2302 |
026C: MOVLW 64 |
- |
|
2303 |
026D: MOVWF 2D |
- |
|
2304 |
026E: MOVLW 65 |
- |
|
2305 |
026F: MOVWF 2E |
- |
|
2306 |
0270: MOVLW 66 |
- |
|
2307 |
0271: MOVWF 2F |
- |
|
2308 |
0272: MOVLW 67 |
- |
|
2309 |
0273: MOVWF 30 |
- |
|
2310 |
0274: MOVLW 68 |
- |
|
2311 |
0275: MOVWF 31 |
- |
|
2312 |
0276: MOVLW 69 |
- |
|
2313 |
0277: MOVWF 32 |
- |
|
2314 |
0278: MOVLW 6A |
- |
|
2315 |
0279: MOVWF 33 |
- |
|
2316 |
027A: MOVLW 6B |
- |
|
2317 |
027B: MOVWF 34 |
- |
|
2318 |
027C: MOVLW 6C |
- |
|
2319 |
027D: MOVWF 35 |
- |
|
2320 |
027E: MOVLW 6D |
- |
|
2321 |
027F: MOVWF 36 |
- |
|
2322 |
0280: MOVLW 6E |
- |
|
2323 |
0281: MOVWF 37 |
- |
|
2324 |
0282: MOVLW 6F |
- |
|
2325 |
0283: MOVWF 38 |
- |
|
2326 |
0284: MOVLW 70 |
- |
|
2327 |
0285: MOVWF 39 |
- |
|
2328 |
0286: MOVLW 71 |
- |
|
2329 |
0287: MOVWF 3A |
- |
|
2330 |
0288: MOVLW 73 |
- |
|
2331 |
0289: MOVWF 3B |
- |
|
2332 |
028A: MOVLW 74 |
- |
|
2333 |
028B: MOVWF 3C |
- |
|
2334 |
028C: MOVLW 75 |
- |
|
2335 |
028D: MOVWF 3D |
- |
|
2336 |
028E: MOVLW 76 |
- |
|
2337 |
028F: MOVWF 3E |
- |
|
2338 |
0290: MOVLW 77 |
- |
|
2339 |
0291: MOVWF 3F |
- |
|
2340 |
0292: MOVLW 78 |
- |
|
2341 |
0293: MOVWF 40 |
- |
|
2342 |
0294: MOVLW 79 |
- |
|
2343 |
0295: MOVWF 41 |
- |
|
2344 |
0296: MOVLW 7A |
- |
|
2345 |
0297: MOVWF 42 |
- |
|
2346 |
0298: CLRF 43 |
2165 |
.................... for(sc=s;isspace(*sc);++sc); |
2347 |
.................... for(sc=s;isspace(*sc);++sc); |
- |
|
2348 |
0299: BCF 03.5 |
- |
|
2349 |
029A: MOVF 51,W |
- |
|
2350 |
029B: MOVWF 54 |
- |
|
2351 |
029C: MOVF 54,W |
- |
|
2352 |
029D: MOVWF 04 |
- |
|
2353 |
029E: MOVF 00,W |
- |
|
2354 |
029F: SUBLW 20 |
- |
|
2355 |
02A0: BTFSS 03.2 |
- |
|
2356 |
02A1: GOTO 2A4 |
- |
|
2357 |
02A2: INCF 54,F |
- |
|
2358 |
02A3: GOTO 29C |
2166 |
.................... sign=*sc=='-'||*sc=='+'?*sc++:'+'; |
2359 |
.................... sign=*sc=='-'||*sc=='+'?*sc++:'+'; |
- |
|
2360 |
02A4: MOVF 54,W |
- |
|
2361 |
02A5: MOVWF 04 |
- |
|
2362 |
02A6: MOVF 00,W |
- |
|
2363 |
02A7: SUBLW 2D |
- |
|
2364 |
02A8: BTFSC 03.2 |
- |
|
2365 |
02A9: GOTO 2B0 |
- |
|
2366 |
02AA: MOVF 54,W |
- |
|
2367 |
02AB: MOVWF 04 |
- |
|
2368 |
02AC: MOVF 00,W |
- |
|
2369 |
02AD: SUBLW 2B |
- |
|
2370 |
02AE: BTFSS 03.2 |
- |
|
2371 |
02AF: GOTO 2B5 |
- |
|
2372 |
02B0: MOVF 54,W |
- |
|
2373 |
02B1: INCF 54,F |
- |
|
2374 |
02B2: MOVWF 04 |
- |
|
2375 |
02B3: MOVF 00,W |
- |
|
2376 |
02B4: GOTO 2B6 |
- |
|
2377 |
02B5: MOVLW 2B |
- |
|
2378 |
02B6: MOVWF 59 |
2167 |
.................... if(sign=='-') |
2379 |
.................... if(sign=='-') |
- |
|
2380 |
02B7: MOVF 59,W |
- |
|
2381 |
02B8: SUBLW 2D |
- |
|
2382 |
02B9: BTFSS 03.2 |
- |
|
2383 |
02BA: GOTO 2C6 |
2168 |
.................... { |
2384 |
.................... { |
2169 |
.................... if (endptr) |
2385 |
.................... if (endptr) |
- |
|
2386 |
02BB: MOVF 52,F |
- |
|
2387 |
02BC: BTFSC 03.2 |
- |
|
2388 |
02BD: GOTO 2C2 |
2170 |
.................... { |
2389 |
.................... { |
2171 |
.................... *((char *)endptr)=s; |
2390 |
.................... *((char *)endptr)=s; |
- |
|
2391 |
02BE: MOVF 52,W |
- |
|
2392 |
02BF: MOVWF 04 |
- |
|
2393 |
02C0: MOVF 51,W |
- |
|
2394 |
02C1: MOVWF 00 |
2172 |
.................... } |
2395 |
.................... } |
2173 |
.................... return 0; |
2396 |
.................... return 0; |
- |
|
2397 |
02C2: MOVLW 00 |
- |
|
2398 |
02C3: MOVWF 78 |
- |
|
2399 |
02C4: MOVWF 79 |
- |
|
2400 |
02C5: GOTO 3D2 |
2174 |
.................... } |
2401 |
.................... } |
2175 |
.................... |
2402 |
.................... |
2176 |
.................... if (base <0 || base ==1|| base >36) // invalid base |
2403 |
.................... if (base <0 || base ==1|| base >36) // invalid base |
- |
|
2404 |
02C6: BTFSC 53.7 |
- |
|
2405 |
02C7: GOTO 2D1 |
- |
|
2406 |
02C8: DECFSZ 53,W |
- |
|
2407 |
02C9: GOTO 2CB |
- |
|
2408 |
02CA: GOTO 2D1 |
- |
|
2409 |
02CB: BTFSC 53.7 |
- |
|
2410 |
02CC: GOTO 2DD |
- |
|
2411 |
02CD: MOVF 53,W |
- |
|
2412 |
02CE: SUBLW 24 |
- |
|
2413 |
02CF: BTFSC 03.0 |
- |
|
2414 |
02D0: GOTO 2DD |
2177 |
.................... { |
2415 |
.................... { |
2178 |
.................... if (endptr) |
2416 |
.................... if (endptr) |
- |
|
2417 |
02D1: MOVF 52,F |
- |
|
2418 |
02D2: BTFSC 03.2 |
- |
|
2419 |
02D3: GOTO 2D8 |
2179 |
.................... { |
2420 |
.................... { |
2180 |
.................... *((char *)endptr)=s; |
2421 |
.................... *((char *)endptr)=s; |
- |
|
2422 |
02D4: MOVF 52,W |
- |
|
2423 |
02D5: MOVWF 04 |
- |
|
2424 |
02D6: MOVF 51,W |
- |
|
2425 |
02D7: MOVWF 00 |
2181 |
.................... } |
2426 |
.................... } |
2182 |
.................... return 0; |
2427 |
.................... return 0; |
- |
|
2428 |
02D8: MOVLW 00 |
- |
|
2429 |
02D9: MOVWF 78 |
- |
|
2430 |
02DA: MOVWF 79 |
- |
|
2431 |
02DB: GOTO 3D2 |
2183 |
.................... } |
2432 |
.................... } |
2184 |
.................... else if (base) |
2433 |
.................... else if (base) |
- |
|
2434 |
02DC: GOTO 343 |
- |
|
2435 |
02DD: MOVF 53,F |
- |
|
2436 |
02DE: BTFSC 03.2 |
- |
|
2437 |
02DF: GOTO 31A |
2185 |
.................... { |
2438 |
.................... { |
2186 |
.................... if(base==16 && *sc =='0'&&(sc[1]=='x' || sc[1]=='X')) |
2439 |
.................... if(base==16 && *sc =='0'&&(sc[1]=='x' || sc[1]=='X')) |
- |
|
2440 |
02E0: MOVF 53,W |
- |
|
2441 |
02E1: SUBLW 10 |
- |
|
2442 |
02E2: BTFSS 03.2 |
- |
|
2443 |
02E3: GOTO 2FA |
- |
|
2444 |
02E4: MOVF 54,W |
- |
|
2445 |
02E5: MOVWF 04 |
- |
|
2446 |
02E6: MOVF 00,W |
- |
|
2447 |
02E7: SUBLW 30 |
- |
|
2448 |
02E8: BTFSS 03.2 |
- |
|
2449 |
02E9: GOTO 2FA |
- |
|
2450 |
02EA: MOVLW 01 |
- |
|
2451 |
02EB: ADDWF 54,W |
- |
|
2452 |
02EC: MOVWF 04 |
- |
|
2453 |
02ED: MOVF 00,W |
- |
|
2454 |
02EE: SUBLW 78 |
- |
|
2455 |
02EF: BTFSC 03.2 |
- |
|
2456 |
02F0: GOTO 2F8 |
- |
|
2457 |
02F1: MOVLW 01 |
- |
|
2458 |
02F2: ADDWF 54,W |
- |
|
2459 |
02F3: MOVWF 04 |
- |
|
2460 |
02F4: MOVF 00,W |
- |
|
2461 |
02F5: SUBLW 58 |
- |
|
2462 |
02F6: BTFSS 03.2 |
- |
|
2463 |
02F7: GOTO 2FA |
2187 |
.................... sc+=2; |
2464 |
.................... sc+=2; |
- |
|
2465 |
02F8: MOVLW 02 |
- |
|
2466 |
02F9: ADDWF 54,F |
2188 |
.................... if(base==8 && *sc =='0') |
2467 |
.................... if(base==8 && *sc =='0') |
- |
|
2468 |
02FA: MOVF 53,W |
- |
|
2469 |
02FB: SUBLW 08 |
- |
|
2470 |
02FC: BTFSS 03.2 |
- |
|
2471 |
02FD: GOTO 306 |
- |
|
2472 |
02FE: MOVF 54,W |
- |
|
2473 |
02FF: MOVWF 04 |
- |
|
2474 |
0300: MOVF 00,W |
- |
|
2475 |
0301: SUBLW 30 |
- |
|
2476 |
0302: BTFSS 03.2 |
- |
|
2477 |
0303: GOTO 306 |
2189 |
.................... sc+=1; |
2478 |
.................... sc+=1; |
- |
|
2479 |
0304: MOVLW 01 |
- |
|
2480 |
0305: ADDWF 54,F |
2190 |
.................... if(base==2 && *sc =='0'&&sc[1]=='b') |
2481 |
.................... if(base==2 && *sc =='0'&&sc[1]=='b') |
- |
|
2482 |
0306: MOVF 53,W |
- |
|
2483 |
0307: SUBLW 02 |
- |
|
2484 |
0308: BTFSS 03.2 |
- |
|
2485 |
0309: GOTO 319 |
- |
|
2486 |
030A: MOVF 54,W |
- |
|
2487 |
030B: MOVWF 04 |
- |
|
2488 |
030C: MOVF 00,W |
- |
|
2489 |
030D: SUBLW 30 |
- |
|
2490 |
030E: BTFSS 03.2 |
- |
|
2491 |
030F: GOTO 319 |
- |
|
2492 |
0310: MOVLW 01 |
- |
|
2493 |
0311: ADDWF 54,W |
- |
|
2494 |
0312: MOVWF 04 |
- |
|
2495 |
0313: MOVF 00,W |
- |
|
2496 |
0314: SUBLW 62 |
- |
|
2497 |
0315: BTFSS 03.2 |
- |
|
2498 |
0316: GOTO 319 |
2191 |
.................... sc+=2; |
2499 |
.................... sc+=2; |
- |
|
2500 |
0317: MOVLW 02 |
- |
|
2501 |
0318: ADDWF 54,F |
2192 |
.................... |
2502 |
.................... |
2193 |
.................... } |
2503 |
.................... } |
2194 |
.................... else if(*sc!='0') // base is 0, find base |
2504 |
.................... else if(*sc!='0') // base is 0, find base |
- |
|
2505 |
0319: GOTO 343 |
- |
|
2506 |
031A: MOVF 54,W |
- |
|
2507 |
031B: MOVWF 04 |
- |
|
2508 |
031C: MOVF 00,W |
- |
|
2509 |
031D: SUBLW 30 |
- |
|
2510 |
031E: BTFSC 03.2 |
- |
|
2511 |
031F: GOTO 323 |
2195 |
.................... base=10; |
2512 |
.................... base=10; |
- |
|
2513 |
0320: MOVLW 0A |
- |
|
2514 |
0321: MOVWF 53 |
2196 |
.................... else if (sc[1]=='x' || sc[1]=='X') |
2515 |
.................... else if (sc[1]=='x' || sc[1]=='X') |
- |
|
2516 |
0322: GOTO 343 |
- |
|
2517 |
0323: MOVLW 01 |
- |
|
2518 |
0324: ADDWF 54,W |
- |
|
2519 |
0325: MOVWF 04 |
- |
|
2520 |
0326: MOVF 00,W |
- |
|
2521 |
0327: SUBLW 78 |
- |
|
2522 |
0328: BTFSC 03.2 |
- |
|
2523 |
0329: GOTO 331 |
- |
|
2524 |
032A: MOVLW 01 |
- |
|
2525 |
032B: ADDWF 54,W |
- |
|
2526 |
032C: MOVWF 04 |
- |
|
2527 |
032D: MOVF 00,W |
- |
|
2528 |
032E: SUBLW 58 |
- |
|
2529 |
032F: BTFSS 03.2 |
- |
|
2530 |
0330: GOTO 336 |
2197 |
.................... base =16,sc+=2; |
2531 |
.................... base =16,sc+=2; |
- |
|
2532 |
0331: MOVLW 10 |
- |
|
2533 |
0332: MOVWF 53 |
- |
|
2534 |
0333: MOVLW 02 |
- |
|
2535 |
0334: ADDWF 54,F |
2198 |
.................... else if(sc[1]=='b') |
2536 |
.................... else if(sc[1]=='b') |
- |
|
2537 |
0335: GOTO 343 |
- |
|
2538 |
0336: MOVLW 01 |
- |
|
2539 |
0337: ADDWF 54,W |
- |
|
2540 |
0338: MOVWF 04 |
- |
|
2541 |
0339: MOVF 00,W |
- |
|
2542 |
033A: SUBLW 62 |
- |
|
2543 |
033B: BTFSS 03.2 |
- |
|
2544 |
033C: GOTO 341 |
2199 |
.................... base=2,sc+=2; |
2545 |
.................... base=2,sc+=2; |
- |
|
2546 |
033D: MOVLW 02 |
- |
|
2547 |
033E: MOVWF 53 |
- |
|
2548 |
033F: ADDWF 54,F |
2200 |
.................... else |
2549 |
.................... else |
- |
|
2550 |
0340: GOTO 343 |
2201 |
.................... base=8; |
2551 |
.................... base=8; |
- |
|
2552 |
0341: MOVLW 08 |
- |
|
2553 |
0342: MOVWF 53 |
2202 |
.................... for (s1=sc;*sc=='0';++sc);// skip leading zeroes |
2554 |
.................... for (s1=sc;*sc=='0';++sc);// skip leading zeroes |
- |
|
2555 |
0343: MOVF 54,W |
- |
|
2556 |
0344: MOVWF 55 |
- |
|
2557 |
0345: MOVF 54,W |
- |
|
2558 |
0346: MOVWF 04 |
- |
|
2559 |
0347: MOVF 00,W |
- |
|
2560 |
0348: SUBLW 30 |
- |
|
2561 |
0349: BTFSS 03.2 |
- |
|
2562 |
034A: GOTO 34D |
- |
|
2563 |
034B: INCF 54,F |
- |
|
2564 |
034C: GOTO 345 |
2203 |
.................... sd=memchr(digits,tolower(*sc),base); |
2565 |
.................... sd=memchr(digits,tolower(*sc),base); |
- |
|
2566 |
034D: MOVF 54,W |
- |
|
2567 |
034E: MOVWF 04 |
- |
|
2568 |
034F: MOVF 00,W |
- |
|
2569 |
0350: MOVWF 5A |
- |
|
2570 |
0351: SUBLW 40 |
- |
|
2571 |
0352: BTFSC 03.0 |
- |
|
2572 |
0353: GOTO 35B |
- |
|
2573 |
0354: MOVF 5A,W |
- |
|
2574 |
0355: SUBLW 5A |
- |
|
2575 |
0356: BTFSS 03.0 |
- |
|
2576 |
0357: GOTO 35B |
- |
|
2577 |
0358: MOVF 5A,W |
- |
|
2578 |
0359: IORLW 20 |
- |
|
2579 |
035A: GOTO 35C |
- |
|
2580 |
035B: MOVF 5A,W |
- |
|
2581 |
035C: MOVWF 5B |
- |
|
2582 |
035D: MOVLW A0 |
- |
|
2583 |
035E: BSF 03.5 |
- |
|
2584 |
035F: MOVWF 46 |
- |
|
2585 |
0360: BCF 03.5 |
- |
|
2586 |
0361: MOVF 5A,W |
- |
|
2587 |
0362: BSF 03.5 |
- |
|
2588 |
0363: MOVWF 47 |
- |
|
2589 |
0364: BCF 03.5 |
- |
|
2590 |
0365: MOVF 53,W |
- |
|
2591 |
0366: BSF 03.5 |
- |
|
2592 |
0367: MOVWF 48 |
- |
|
2593 |
0368: BCF 03.5 |
- |
|
2594 |
0369: CALL 21D |
- |
|
2595 |
036A: MOVF 78,W |
- |
|
2596 |
036B: MOVWF 56 |
2204 |
.................... for(; sd!=0; ) |
2597 |
.................... for(; sd!=0; ) |
- |
|
2598 |
036C: MOVF 56,F |
- |
|
2599 |
036D: BTFSC 03.2 |
- |
|
2600 |
036E: GOTO 3B8 |
2205 |
.................... { |
2601 |
.................... { |
2206 |
.................... x=x*base+(int16)(sd-digits); |
2602 |
.................... x=x*base+(int16)(sd-digits); |
- |
|
2603 |
036F: CLRF 7A |
- |
|
2604 |
0370: MOVF 53,W |
- |
|
2605 |
0371: MOVWF 77 |
- |
|
2606 |
0372: BTFSC 53.7 |
- |
|
2607 |
0373: DECF 7A,F |
- |
|
2608 |
0374: MOVWF 5A |
- |
|
2609 |
0375: MOVF 7A,W |
- |
|
2610 |
0376: MOVWF 5B |
- |
|
2611 |
0377: MOVF 58,W |
- |
|
2612 |
0378: BSF 03.5 |
- |
|
2613 |
0379: MOVWF 47 |
- |
|
2614 |
037A: BCF 03.5 |
- |
|
2615 |
037B: MOVF 57,W |
- |
|
2616 |
037C: BSF 03.5 |
- |
|
2617 |
037D: MOVWF 46 |
- |
|
2618 |
037E: BCF 03.5 |
- |
|
2619 |
037F: MOVF 7A,W |
- |
|
2620 |
0380: BSF 03.5 |
- |
|
2621 |
0381: MOVWF 49 |
- |
|
2622 |
0382: BCF 03.5 |
- |
|
2623 |
0383: MOVF 5A,W |
- |
|
2624 |
0384: BSF 03.5 |
- |
|
2625 |
0385: MOVWF 48 |
- |
|
2626 |
0386: BCF 03.5 |
- |
|
2627 |
0387: GOTO 236 |
- |
|
2628 |
0388: MOVF 78,W |
- |
|
2629 |
0389: MOVWF 5B |
- |
|
2630 |
038A: MOVLW A0 |
- |
|
2631 |
038B: SUBWF 56,W |
- |
|
2632 |
038C: CLRF 7A |
- |
|
2633 |
038D: ADDWF 78,W |
- |
|
2634 |
038E: MOVWF 78 |
- |
|
2635 |
038F: BTFSC 03.0 |
- |
|
2636 |
0390: INCF 7A,F |
- |
|
2637 |
0391: MOVF 79,W |
- |
|
2638 |
0392: ADDWF 7A,F |
- |
|
2639 |
0393: MOVF 78,W |
- |
|
2640 |
0394: MOVWF 57 |
- |
|
2641 |
0395: MOVF 7A,W |
- |
|
2642 |
0396: MOVWF 58 |
2207 |
.................... ++sc; |
2643 |
.................... ++sc; |
- |
|
2644 |
0397: INCF 54,F |
2208 |
.................... sd=memchr(digits,tolower(*sc),base); |
2645 |
.................... sd=memchr(digits,tolower(*sc),base); |
- |
|
2646 |
0398: MOVF 54,W |
- |
|
2647 |
0399: MOVWF 04 |
- |
|
2648 |
039A: MOVF 00,W |
- |
|
2649 |
039B: MOVWF 5A |
- |
|
2650 |
039C: SUBLW 40 |
- |
|
2651 |
039D: BTFSC 03.0 |
- |
|
2652 |
039E: GOTO 3A6 |
- |
|
2653 |
039F: MOVF 5A,W |
- |
|
2654 |
03A0: SUBLW 5A |
- |
|
2655 |
03A1: BTFSS 03.0 |
- |
|
2656 |
03A2: GOTO 3A6 |
- |
|
2657 |
03A3: MOVF 5A,W |
- |
|
2658 |
03A4: IORLW 20 |
- |
|
2659 |
03A5: GOTO 3A7 |
- |
|
2660 |
03A6: MOVF 5A,W |
- |
|
2661 |
03A7: MOVWF 5B |
- |
|
2662 |
03A8: MOVLW A0 |
- |
|
2663 |
03A9: BSF 03.5 |
- |
|
2664 |
03AA: MOVWF 46 |
- |
|
2665 |
03AB: BCF 03.5 |
- |
|
2666 |
03AC: MOVF 5A,W |
- |
|
2667 |
03AD: BSF 03.5 |
- |
|
2668 |
03AE: MOVWF 47 |
- |
|
2669 |
03AF: BCF 03.5 |
- |
|
2670 |
03B0: MOVF 53,W |
- |
|
2671 |
03B1: BSF 03.5 |
- |
|
2672 |
03B2: MOVWF 48 |
- |
|
2673 |
03B3: BCF 03.5 |
- |
|
2674 |
03B4: CALL 21D |
- |
|
2675 |
03B5: MOVF 78,W |
- |
|
2676 |
03B6: MOVWF 56 |
2209 |
.................... } |
2677 |
.................... } |
- |
|
2678 |
03B7: GOTO 36C |
2210 |
.................... if(s1==sc) |
2679 |
.................... if(s1==sc) |
- |
|
2680 |
03B8: MOVF 54,W |
- |
|
2681 |
03B9: SUBWF 55,W |
- |
|
2682 |
03BA: BTFSS 03.2 |
- |
|
2683 |
03BB: GOTO 3C7 |
2211 |
.................... { |
2684 |
.................... { |
2212 |
.................... if (endptr) |
2685 |
.................... if (endptr) |
- |
|
2686 |
03BC: MOVF 52,F |
- |
|
2687 |
03BD: BTFSC 03.2 |
- |
|
2688 |
03BE: GOTO 3C3 |
2213 |
.................... { |
2689 |
.................... { |
2214 |
.................... *((char *)endptr)=s; |
2690 |
.................... *((char *)endptr)=s; |
- |
|
2691 |
03BF: MOVF 52,W |
- |
|
2692 |
03C0: MOVWF 04 |
- |
|
2693 |
03C1: MOVF 51,W |
- |
|
2694 |
03C2: MOVWF 00 |
2215 |
.................... } |
2695 |
.................... } |
2216 |
.................... return 0; |
2696 |
.................... return 0; |
- |
|
2697 |
03C3: MOVLW 00 |
- |
|
2698 |
03C4: MOVWF 78 |
- |
|
2699 |
03C5: MOVWF 79 |
- |
|
2700 |
03C6: GOTO 3D2 |
2217 |
.................... } |
2701 |
.................... } |
2218 |
.................... if (endptr) |
2702 |
.................... if (endptr) |
- |
|
2703 |
03C7: MOVF 52,F |
- |
|
2704 |
03C8: BTFSC 03.2 |
- |
|
2705 |
03C9: GOTO 3CE |
2219 |
.................... *((char *)endptr)=sc; |
2706 |
.................... *((char *)endptr)=sc; |
- |
|
2707 |
03CA: MOVF 52,W |
- |
|
2708 |
03CB: MOVWF 04 |
- |
|
2709 |
03CC: MOVF 54,W |
- |
|
2710 |
03CD: MOVWF 00 |
2220 |
.................... return x; |
2711 |
.................... return x; |
- |
|
2712 |
03CE: MOVF 57,W |
- |
|
2713 |
03CF: MOVWF 78 |
- |
|
2714 |
03D0: MOVF 58,W |
- |
|
2715 |
03D1: MOVWF 79 |
2221 |
.................... } |
2716 |
.................... } |
- |
|
2717 |
03D2: BCF 0A.3 |
- |
|
2718 |
03D3: BCF 0A.4 |
- |
|
2719 |
03D4: GOTO 4FF (RETURN) |
2222 |
.................... |
2720 |
.................... |
2223 |
.................... |
2721 |
.................... |
2224 |
.................... signed long strtol(char *s,char *endptr,signed int base) |
2722 |
.................... signed long strtol(char *s,char *endptr,signed int base) |
2225 |
.................... { |
2723 |
.................... { |
2226 |
.................... char *sc,*s1,*sd; |
2724 |
.................... char *sc,*s1,*sd; |
Line 2316... |
Line 2814... |
2316 |
.................... //--------------------------------------------------------------------------- |
2814 |
.................... //--------------------------------------------------------------------------- |
2317 |
.................... // The random number implementation |
2815 |
.................... // The random number implementation |
2318 |
.................... //--------------------------------------------------------------------------- |
2816 |
.................... //--------------------------------------------------------------------------- |
2319 |
.................... |
2817 |
.................... |
2320 |
.................... unsigned int32 _Randseed = 1; |
2818 |
.................... unsigned int32 _Randseed = 1; |
- |
|
2819 |
* |
2321 |
006F: MOVLW 01 |
2820 |
03ED: MOVLW 01 |
2322 |
0070: MOVWF 22 |
2821 |
03EE: MOVWF 22 |
2323 |
0071: CLRF 23 |
2822 |
03EF: CLRF 23 |
2324 |
0072: CLRF 24 |
2823 |
03F0: CLRF 24 |
2325 |
0073: CLRF 25 |
2824 |
03F1: CLRF 25 |
2326 |
.................... |
2825 |
.................... |
2327 |
.................... long rand(void) |
2826 |
.................... long rand(void) |
2328 |
.................... { |
2827 |
.................... { |
2329 |
.................... _Randseed = _Randseed * 1103515245 + 12345; |
2828 |
.................... _Randseed = _Randseed * 1103515245 + 12345; |
2330 |
.................... return ((unsigned long)(_Randseed >> 16) % RAND_MAX); |
2829 |
.................... return ((unsigned long)(_Randseed >> 16) % RAND_MAX); |
Line 2408... |
Line 2907... |
2408 |
.................... char odp[DELKA]; |
2907 |
.................... char odp[DELKA]; |
2409 |
.................... |
2908 |
.................... |
2410 |
.................... int1 check_new_sms() |
2909 |
.................... int1 check_new_sms() |
2411 |
.................... { |
2910 |
.................... { |
2412 |
.................... fprintf(MOBIL,"AT+CMGL=1\r"); //vycti prijate SMS (0=nove;1=vsechny) |
2911 |
.................... fprintf(MOBIL,"AT+CMGL=1\r"); //vycti prijate SMS (0=nove;1=vsechny) |
- |
|
2912 |
* |
- |
|
2913 |
00B6: CLRF 51 |
- |
|
2914 |
00B7: MOVF 51,W |
- |
|
2915 |
00B8: CALL 004 |
- |
|
2916 |
00B9: IORLW 00 |
- |
|
2917 |
00BA: BTFSC 03.2 |
- |
|
2918 |
00BB: GOTO 0C0 |
- |
|
2919 |
00BC: INCF 51,F |
- |
|
2920 |
00BD: MOVWF 53 |
- |
|
2921 |
00BE: CALL 064 |
- |
|
2922 |
00BF: GOTO 0B7 |
2413 |
.................... while(fgetc(MOBIL)!=0x0A); // predkoc prvni radek odpovedi |
2923 |
.................... while(fgetc(MOBIL)!=0x0A); // predkoc prvni radek odpovedi |
- |
|
2924 |
00C0: CALL 08C |
- |
|
2925 |
00C1: MOVF 78,W |
- |
|
2926 |
00C2: SUBLW 0A |
- |
|
2927 |
00C3: BTFSS 03.2 |
- |
|
2928 |
00C4: GOTO 0C0 |
2414 |
.................... odp[0]=fgetc(MOBIL); // Nacti prvni dva znaky druheho radku odpovedi |
2929 |
.................... odp[0]=fgetc(MOBIL); // Nacti prvni dva znaky druheho radku odpovedi |
- |
|
2930 |
00C5: CALL 08C |
- |
|
2931 |
00C6: MOVF 78,W |
- |
|
2932 |
00C7: MOVWF 26 |
2415 |
.................... odp[1]=fgetc(MOBIL); |
2933 |
.................... odp[1]=fgetc(MOBIL); |
- |
|
2934 |
00C8: CALL 08C |
- |
|
2935 |
00C9: MOVF 78,W |
- |
|
2936 |
00CA: MOVWF 27 |
2416 |
.................... while(fgetc(MOBIL)!=0x0A); // Preskoc zbytek radku |
2937 |
.................... while(fgetc(MOBIL)!=0x0A); // Preskoc zbytek radku |
- |
|
2938 |
00CB: CALL 08C |
- |
|
2939 |
00CC: MOVF 78,W |
- |
|
2940 |
00CD: SUBLW 0A |
- |
|
2941 |
00CE: BTFSS 03.2 |
- |
|
2942 |
00CF: GOTO 0CB |
2417 |
.................... |
2943 |
.................... |
2418 |
.................... if(odp[0] == 'O' && odp[1] == 'K') return 1; |
2944 |
.................... if(odp[0] == 'O' && odp[1] == 'K') return 1; |
- |
|
2945 |
00D0: MOVF 26,W |
- |
|
2946 |
00D1: SUBLW 4F |
- |
|
2947 |
00D2: BTFSS 03.2 |
- |
|
2948 |
00D3: GOTO 0DC |
- |
|
2949 |
00D4: MOVF 27,W |
- |
|
2950 |
00D5: SUBLW 4B |
- |
|
2951 |
00D6: BTFSS 03.2 |
- |
|
2952 |
00D7: GOTO 0DC |
- |
|
2953 |
00D8: MOVLW 01 |
- |
|
2954 |
00D9: MOVWF 78 |
- |
|
2955 |
00DA: GOTO 0DF |
2419 |
.................... else return 0; |
2956 |
.................... else return 0; |
- |
|
2957 |
00DB: GOTO 0DF |
- |
|
2958 |
00DC: MOVLW 00 |
- |
|
2959 |
00DD: MOVWF 78 |
- |
|
2960 |
00DE: GOTO 0DF |
2420 |
.................... } |
2961 |
.................... } |
- |
|
2962 |
00DF: BCF 0A.3 |
- |
|
2963 |
00E0: BCF 0A.4 |
- |
|
2964 |
00E1: GOTO 46E (RETURN) |
2421 |
.................... |
2965 |
.................... |
2422 |
.................... read_sms() |
2966 |
.................... read_sms() |
2423 |
.................... { |
2967 |
.................... { |
2424 |
.................... int pom,pom2,pom3,odkl,odkl2,maskovadlo; |
2968 |
.................... int pom,pom2,pom3,odkl,odkl2,maskovadlo; |
2425 |
.................... for(pom=0;pom<54;pom++) //preskoc nedulezite informace |
2969 |
.................... for(pom=0;pom<54;pom++) //preskoc nedulezite informace |
- |
|
2970 |
00E2: CLRF 51 |
- |
|
2971 |
00E3: MOVF 51,W |
- |
|
2972 |
00E4: SUBLW 35 |
- |
|
2973 |
00E5: BTFSS 03.0 |
- |
|
2974 |
00E6: GOTO 0EA |
2426 |
.................... { |
2975 |
.................... { |
2427 |
.................... fgetc(MOBIL); |
2976 |
.................... fgetc(MOBIL); |
- |
|
2977 |
00E7: CALL 08C |
2428 |
.................... } |
2978 |
.................... } |
- |
|
2979 |
00E8: INCF 51,F |
- |
|
2980 |
00E9: GOTO 0E3 |
2429 |
.................... |
2981 |
.................... |
2430 |
.................... //gets(odp); //uloz zakodovany text SMS |
2982 |
.................... //gets(odp); //uloz zakodovany text SMS |
2431 |
.................... |
2983 |
.................... |
2432 |
.................... odp[0]=fgetc(MOBIL); |
2984 |
.................... odp[0]=fgetc(MOBIL); |
- |
|
2985 |
00EA: CALL 08C |
- |
|
2986 |
00EB: MOVF 78,W |
- |
|
2987 |
00EC: MOVWF 26 |
2433 |
.................... odp[1]=fgetc(MOBIL); |
2988 |
.................... odp[1]=fgetc(MOBIL); |
- |
|
2989 |
00ED: CALL 08C |
- |
|
2990 |
00EE: MOVF 78,W |
- |
|
2991 |
00EF: MOVWF 27 |
2434 |
.................... odp[2]=fgetc(MOBIL); |
2992 |
.................... odp[2]=fgetc(MOBIL); |
- |
|
2993 |
00F0: CALL 08C |
- |
|
2994 |
00F1: MOVF 78,W |
- |
|
2995 |
00F2: MOVWF 28 |
2435 |
.................... odp[3]=fgetc(MOBIL); |
2996 |
.................... odp[3]=fgetc(MOBIL); |
- |
|
2997 |
00F3: CALL 08C |
- |
|
2998 |
00F4: MOVF 78,W |
- |
|
2999 |
00F5: MOVWF 29 |
2436 |
.................... odp[4]=fgetc(MOBIL); |
3000 |
.................... odp[4]=fgetc(MOBIL); |
- |
|
3001 |
00F6: CALL 08C |
- |
|
3002 |
00F7: MOVF 78,W |
- |
|
3003 |
00F8: MOVWF 2A |
2437 |
.................... odp[5]=fgetc(MOBIL); |
3004 |
.................... odp[5]=fgetc(MOBIL); |
- |
|
3005 |
00F9: CALL 08C |
- |
|
3006 |
00FA: MOVF 78,W |
- |
|
3007 |
00FB: MOVWF 2B |
2438 |
.................... odp[6]=fgetc(MOBIL); |
3008 |
.................... odp[6]=fgetc(MOBIL); |
- |
|
3009 |
00FC: CALL 08C |
- |
|
3010 |
00FD: MOVF 78,W |
- |
|
3011 |
00FE: MOVWF 2C |
2439 |
.................... odp[7]=fgetc(MOBIL); |
3012 |
.................... odp[7]=fgetc(MOBIL); |
- |
|
3013 |
00FF: CALL 08C |
- |
|
3014 |
0100: MOVF 78,W |
- |
|
3015 |
0101: MOVWF 2D |
2440 |
.................... |
3016 |
.................... |
2441 |
.................... /*lcd_gotoxy(1,1); |
3017 |
.................... /*lcd_gotoxy(1,1); |
2442 |
.................... printf(lcd_putc,"\f%s\n",odp);*/ |
3018 |
.................... printf(lcd_putc,"\f%s\n",odp);*/ |
2443 |
.................... |
3019 |
.................... |
2444 |
.................... if(odp[0]==0) odp[1]='0'; // Prevod z ASCII do BIN |
3020 |
.................... if(odp[0]==0) odp[1]='0'; // Prevod z ASCII do BIN |
- |
|
3021 |
0102: MOVF 26,F |
- |
|
3022 |
0103: BTFSS 03.2 |
- |
|
3023 |
0104: GOTO 107 |
- |
|
3024 |
0105: MOVLW 30 |
- |
|
3025 |
0106: MOVWF 27 |
2445 |
.................... odp[0]=odp[0] - '0'; |
3026 |
.................... odp[0]=odp[0] - '0'; |
- |
|
3027 |
0107: MOVLW 30 |
- |
|
3028 |
0108: SUBWF 26,F |
2446 |
.................... odp[1]=odp[1] - '0'; |
3029 |
.................... odp[1]=odp[1] - '0'; |
- |
|
3030 |
0109: SUBWF 27,F |
2447 |
.................... if(odp[0]>9) odp[0]=odp[0]-7; |
3031 |
.................... if(odp[0]>9) odp[0]=odp[0]-7; |
- |
|
3032 |
010A: MOVF 26,W |
- |
|
3033 |
010B: SUBLW 09 |
- |
|
3034 |
010C: BTFSC 03.0 |
- |
|
3035 |
010D: GOTO 110 |
- |
|
3036 |
010E: MOVLW 07 |
- |
|
3037 |
010F: SUBWF 26,F |
2448 |
.................... if(odp[1]>9) odp[1]=odp[1]-7; |
3038 |
.................... if(odp[1]>9) odp[1]=odp[1]-7; |
- |
|
3039 |
0110: MOVF 27,W |
- |
|
3040 |
0111: SUBLW 09 |
- |
|
3041 |
0112: BTFSC 03.0 |
- |
|
3042 |
0113: GOTO 116 |
- |
|
3043 |
0114: MOVLW 07 |
- |
|
3044 |
0115: SUBWF 27,F |
2449 |
.................... odp[0]=odp[0] << 4; |
3045 |
.................... odp[0]=odp[0] << 4; |
- |
|
3046 |
0116: SWAPF 26,F |
- |
|
3047 |
0117: MOVLW F0 |
- |
|
3048 |
0118: ANDWF 26,F |
2450 |
.................... odp[0] |= odp[1]; |
3049 |
.................... odp[0] |= odp[1]; |
- |
|
3050 |
0119: MOVF 27,W |
- |
|
3051 |
011A: IORWF 26,F |
2451 |
.................... |
3052 |
.................... |
2452 |
.................... if(odp[2]==0) odp[3]='0'; |
3053 |
.................... if(odp[2]==0) odp[3]='0'; |
- |
|
3054 |
011B: MOVF 28,F |
- |
|
3055 |
011C: BTFSS 03.2 |
- |
|
3056 |
011D: GOTO 120 |
- |
|
3057 |
011E: MOVLW 30 |
- |
|
3058 |
011F: MOVWF 29 |
2453 |
.................... odp[2]=odp[2] - '0'; |
3059 |
.................... odp[2]=odp[2] - '0'; |
- |
|
3060 |
0120: MOVLW 30 |
- |
|
3061 |
0121: SUBWF 28,F |
2454 |
.................... odp[3]=odp[3] - '0'; |
3062 |
.................... odp[3]=odp[3] - '0'; |
- |
|
3063 |
0122: SUBWF 29,F |
2455 |
.................... if(odp[2]>9) odp[2]=odp[2]-7; |
3064 |
.................... if(odp[2]>9) odp[2]=odp[2]-7; |
- |
|
3065 |
0123: MOVF 28,W |
- |
|
3066 |
0124: SUBLW 09 |
- |
|
3067 |
0125: BTFSC 03.0 |
- |
|
3068 |
0126: GOTO 129 |
- |
|
3069 |
0127: MOVLW 07 |
- |
|
3070 |
0128: SUBWF 28,F |
2456 |
.................... if(odp[3]>9) odp[3]=odp[3]-7; |
3071 |
.................... if(odp[3]>9) odp[3]=odp[3]-7; |
- |
|
3072 |
0129: MOVF 29,W |
- |
|
3073 |
012A: SUBLW 09 |
- |
|
3074 |
012B: BTFSC 03.0 |
- |
|
3075 |
012C: GOTO 12F |
- |
|
3076 |
012D: MOVLW 07 |
- |
|
3077 |
012E: SUBWF 29,F |
2457 |
.................... odp[2]=odp[2] << 4; |
3078 |
.................... odp[2]=odp[2] << 4; |
- |
|
3079 |
012F: SWAPF 28,F |
- |
|
3080 |
0130: MOVLW F0 |
- |
|
3081 |
0131: ANDWF 28,F |
2458 |
.................... odp[2] |= odp[3]; |
3082 |
.................... odp[2] |= odp[3]; |
- |
|
3083 |
0132: MOVF 29,W |
- |
|
3084 |
0133: IORWF 28,F |
2459 |
.................... |
3085 |
.................... |
2460 |
.................... if(odp[4]==0) odp[5]='0'; |
3086 |
.................... if(odp[4]==0) odp[5]='0'; |
- |
|
3087 |
0134: MOVF 2A,F |
- |
|
3088 |
0135: BTFSS 03.2 |
- |
|
3089 |
0136: GOTO 139 |
- |
|
3090 |
0137: MOVLW 30 |
- |
|
3091 |
0138: MOVWF 2B |
2461 |
.................... odp[4]=odp[4] - '0'; |
3092 |
.................... odp[4]=odp[4] - '0'; |
- |
|
3093 |
0139: MOVLW 30 |
- |
|
3094 |
013A: SUBWF 2A,F |
2462 |
.................... odp[5]=odp[5] - '0'; |
3095 |
.................... odp[5]=odp[5] - '0'; |
- |
|
3096 |
013B: SUBWF 2B,F |
2463 |
.................... if(odp[4]>9) odp[4]=odp[4]-7; |
3097 |
.................... if(odp[4]>9) odp[4]=odp[4]-7; |
- |
|
3098 |
013C: MOVF 2A,W |
- |
|
3099 |
013D: SUBLW 09 |
- |
|
3100 |
013E: BTFSC 03.0 |
- |
|
3101 |
013F: GOTO 142 |
- |
|
3102 |
0140: MOVLW 07 |
- |
|
3103 |
0141: SUBWF 2A,F |
2464 |
.................... if(odp[5]>9) odp[5]=odp[5]-7; |
3104 |
.................... if(odp[5]>9) odp[5]=odp[5]-7; |
- |
|
3105 |
0142: MOVF 2B,W |
- |
|
3106 |
0143: SUBLW 09 |
- |
|
3107 |
0144: BTFSC 03.0 |
- |
|
3108 |
0145: GOTO 148 |
- |
|
3109 |
0146: MOVLW 07 |
- |
|
3110 |
0147: SUBWF 2B,F |
2465 |
.................... odp[4]=odp[4] << 4; |
3111 |
.................... odp[4]=odp[4] << 4; |
- |
|
3112 |
0148: SWAPF 2A,F |
- |
|
3113 |
0149: MOVLW F0 |
- |
|
3114 |
014A: ANDWF 2A,F |
2466 |
.................... odp[4] |= odp[5]; |
3115 |
.................... odp[4] |= odp[5]; |
- |
|
3116 |
014B: MOVF 2B,W |
- |
|
3117 |
014C: IORWF 2A,F |
2467 |
.................... |
3118 |
.................... |
2468 |
.................... if(odp[6]==0) odp[7]='0'; |
3119 |
.................... if(odp[6]==0) odp[7]='0'; |
- |
|
3120 |
014D: MOVF 2C,F |
- |
|
3121 |
014E: BTFSS 03.2 |
- |
|
3122 |
014F: GOTO 152 |
- |
|
3123 |
0150: MOVLW 30 |
- |
|
3124 |
0151: MOVWF 2D |
2469 |
.................... odp[6]=odp[6] - '0'; |
3125 |
.................... odp[6]=odp[6] - '0'; |
- |
|
3126 |
0152: MOVLW 30 |
- |
|
3127 |
0153: SUBWF 2C,F |
2470 |
.................... odp[7]=odp[7] - '0'; |
3128 |
.................... odp[7]=odp[7] - '0'; |
- |
|
3129 |
0154: SUBWF 2D,F |
2471 |
.................... if(odp[6]>9) odp[6]=odp[6]-7; |
3130 |
.................... if(odp[6]>9) odp[6]=odp[6]-7; |
- |
|
3131 |
0155: MOVF 2C,W |
- |
|
3132 |
0156: SUBLW 09 |
- |
|
3133 |
0157: BTFSC 03.0 |
- |
|
3134 |
0158: GOTO 15B |
- |
|
3135 |
0159: MOVLW 07 |
- |
|
3136 |
015A: SUBWF 2C,F |
2472 |
.................... if(odp[7]>9) odp[7]=odp[7]-7; |
3137 |
.................... if(odp[7]>9) odp[7]=odp[7]-7; |
- |
|
3138 |
015B: MOVF 2D,W |
- |
|
3139 |
015C: SUBLW 09 |
- |
|
3140 |
015D: BTFSC 03.0 |
- |
|
3141 |
015E: GOTO 161 |
- |
|
3142 |
015F: MOVLW 07 |
- |
|
3143 |
0160: SUBWF 2D,F |
2473 |
.................... odp[6]=odp[6] << 4; |
3144 |
.................... odp[6]=odp[6] << 4; |
- |
|
3145 |
0161: SWAPF 2C,F |
- |
|
3146 |
0162: MOVLW F0 |
- |
|
3147 |
0163: ANDWF 2C,F |
2474 |
.................... odp[6] |= odp[7]; |
3148 |
.................... odp[6] |= odp[7]; |
- |
|
3149 |
0164: MOVF 2D,W |
- |
|
3150 |
0165: IORWF 2C,F |
2475 |
.................... |
3151 |
.................... |
2476 |
.................... odp[1]=odp[2]; |
3152 |
.................... odp[1]=odp[2]; |
- |
|
3153 |
0166: MOVF 28,W |
- |
|
3154 |
0167: MOVWF 27 |
2477 |
.................... odp[2]=odp[4]; |
3155 |
.................... odp[2]=odp[4]; |
- |
|
3156 |
0168: MOVF 2A,W |
- |
|
3157 |
0169: MOVWF 28 |
2478 |
.................... odp[3]=odp[6]; |
3158 |
.................... odp[3]=odp[6]; |
- |
|
3159 |
016A: MOVF 2C,W |
- |
|
3160 |
016B: MOVWF 29 |
2479 |
.................... odp[4]=odp[5]=odp[6]=0; |
3161 |
.................... odp[4]=odp[5]=odp[6]=0; |
- |
|
3162 |
016C: CLRF 2C |
- |
|
3163 |
016D: MOVF 2C,W |
- |
|
3164 |
016E: MOVWF 2B |
- |
|
3165 |
016F: MOVWF 2A |
2480 |
.................... |
3166 |
.................... |
2481 |
.................... /*lcd_gotoxy(1,2); |
3167 |
.................... /*lcd_gotoxy(1,2); |
2482 |
.................... printf(lcd_putc,"%u %u %u %u",odp[0],odp[1],odp[2]odp[3]); */ |
3168 |
.................... printf(lcd_putc,"%u %u %u %u",odp[0],odp[1],odp[2]odp[3]); */ |
2483 |
.................... |
3169 |
.................... |
2484 |
.................... pom3=0; |
3170 |
.................... pom3=0; |
- |
|
3171 |
0170: CLRF 53 |
2485 |
.................... for (pom = 0; pom < 4;pom++) |
3172 |
.................... for (pom = 0; pom < 4;pom++) |
- |
|
3173 |
0171: CLRF 51 |
- |
|
3174 |
0172: MOVF 51,W |
- |
|
3175 |
0173: SUBLW 03 |
- |
|
3176 |
0174: BTFSS 03.0 |
- |
|
3177 |
0175: GOTO 1C9 |
2486 |
.................... { |
3178 |
.................... { |
2487 |
.................... maskovadlo = maskovadlo >> 1; //rotace promene urcene pro maskovani |
3179 |
.................... maskovadlo = maskovadlo >> 1; //rotace promene urcene pro maskovani |
- |
|
3180 |
0176: BCF 03.0 |
- |
|
3181 |
0177: RRF 56,F |
2488 |
.................... maskovadlo = maskovadlo | 0x80; |
3182 |
.................... maskovadlo = maskovadlo | 0x80; |
- |
|
3183 |
0178: BSF 56.7 |
2489 |
.................... odkl = odp[pom] & maskovadlo; //odlozeni "prenosu" do odkl pomoci maskovadla |
3184 |
.................... odkl = odp[pom] & maskovadlo; //odlozeni "prenosu" do odkl pomoci maskovadla |
- |
|
3185 |
0179: MOVLW 26 |
- |
|
3186 |
017A: ADDWF 51,W |
- |
|
3187 |
017B: MOVWF 04 |
- |
|
3188 |
017C: MOVF 00,W |
- |
|
3189 |
017D: ANDWF 56,W |
- |
|
3190 |
017E: MOVWF 54 |
2490 |
.................... odp[pom] = odp[pom] << pom3; //rotace znaku |
3191 |
.................... odp[pom] = odp[pom] << pom3; //rotace znaku |
- |
|
3192 |
017F: MOVLW 26 |
- |
|
3193 |
0180: ADDWF 51,W |
- |
|
3194 |
0181: MOVWF 57 |
- |
|
3195 |
0182: MOVLW 26 |
- |
|
3196 |
0183: ADDWF 51,W |
- |
|
3197 |
0184: MOVWF 04 |
- |
|
3198 |
0185: MOVF 00,W |
- |
|
3199 |
0186: MOVWF 77 |
- |
|
3200 |
0187: MOVF 53,W |
- |
|
3201 |
0188: MOVWF 78 |
- |
|
3202 |
0189: BTFSC 03.2 |
- |
|
3203 |
018A: GOTO 18F |
- |
|
3204 |
018B: BCF 03.0 |
- |
|
3205 |
018C: RLF 77,F |
- |
|
3206 |
018D: DECFSZ 78,F |
- |
|
3207 |
018E: GOTO 18B |
- |
|
3208 |
018F: MOVF 57,W |
- |
|
3209 |
0190: MOVWF 04 |
- |
|
3210 |
0191: MOVF 77,W |
- |
|
3211 |
0192: MOVWF 00 |
2491 |
.................... for (pom2 = 0; pom2 < (8-pom3);pom2++) //rotace odkl2 |
3212 |
.................... for (pom2 = 0; pom2 < (8-pom3);pom2++) //rotace odkl2 |
- |
|
3213 |
0193: CLRF 52 |
- |
|
3214 |
0194: MOVF 53,W |
- |
|
3215 |
0195: SUBLW 08 |
- |
|
3216 |
0196: SUBWF 52,W |
- |
|
3217 |
0197: BTFSC 03.0 |
- |
|
3218 |
0198: GOTO 19E |
2492 |
.................... { |
3219 |
.................... { |
2493 |
.................... odkl2 = odkl2 >> 1; |
3220 |
.................... odkl2 = odkl2 >> 1; |
- |
|
3221 |
0199: BCF 03.0 |
- |
|
3222 |
019A: RRF 55,F |
2494 |
.................... odkl2 = odkl2 & 127; |
3223 |
.................... odkl2 = odkl2 & 127; |
- |
|
3224 |
019B: BCF 55.7 |
2495 |
.................... } |
3225 |
.................... } |
- |
|
3226 |
019C: INCF 52,F |
- |
|
3227 |
019D: GOTO 194 |
2496 |
.................... odp[pom] = odp[pom] | odkl2; //pridani odkl2 ke znaku |
3228 |
.................... odp[pom] = odp[pom] | odkl2; //pridani odkl2 ke znaku |
- |
|
3229 |
019E: MOVLW 26 |
- |
|
3230 |
019F: ADDWF 51,W |
- |
|
3231 |
01A0: MOVWF 57 |
- |
|
3232 |
01A1: MOVLW 26 |
- |
|
3233 |
01A2: ADDWF 51,W |
- |
|
3234 |
01A3: MOVWF 04 |
- |
|
3235 |
01A4: MOVF 00,W |
- |
|
3236 |
01A5: IORWF 55,W |
- |
|
3237 |
01A6: MOVWF 59 |
- |
|
3238 |
01A7: MOVF 57,W |
- |
|
3239 |
01A8: MOVWF 04 |
- |
|
3240 |
01A9: MOVF 59,W |
- |
|
3241 |
01AA: MOVWF 00 |
2497 |
.................... odp[pom] = odp[pom] & 127; //smazani nejvysiho bitu |
3242 |
.................... odp[pom] = odp[pom] & 127; //smazani nejvysiho bitu |
- |
|
3243 |
01AB: MOVLW 26 |
- |
|
3244 |
01AC: ADDWF 51,W |
- |
|
3245 |
01AD: MOVWF 57 |
- |
|
3246 |
01AE: MOVLW 26 |
- |
|
3247 |
01AF: ADDWF 51,W |
- |
|
3248 |
01B0: MOVWF 04 |
- |
|
3249 |
01B1: MOVF 00,W |
- |
|
3250 |
01B2: ANDLW 7F |
- |
|
3251 |
01B3: MOVWF 59 |
- |
|
3252 |
01B4: MOVF 57,W |
- |
|
3253 |
01B5: MOVWF 04 |
- |
|
3254 |
01B6: MOVF 59,W |
- |
|
3255 |
01B7: MOVWF 00 |
2498 |
.................... odkl2 = odkl; //ulozeni odlk na dalsi pruchod |
3256 |
.................... odkl2 = odkl; //ulozeni odlk na dalsi pruchod |
- |
|
3257 |
01B8: MOVF 54,W |
- |
|
3258 |
01B9: MOVWF 55 |
2499 |
.................... pom3++; //inkrementace citace rotace |
3259 |
.................... pom3++; //inkrementace citace rotace |
- |
|
3260 |
01BA: INCF 53,F |
2500 |
.................... if (pom3 == 8) //kazdy 8my znak |
3261 |
.................... if (pom3 == 8) //kazdy 8my znak |
- |
|
3262 |
01BB: MOVF 53,W |
- |
|
3263 |
01BC: SUBLW 08 |
- |
|
3264 |
01BD: BTFSS 03.2 |
- |
|
3265 |
01BE: GOTO 1C7 |
2501 |
.................... { |
3266 |
.................... { |
2502 |
.................... pom3 = 0; //smaz citac |
3267 |
.................... pom3 = 0; //smaz citac |
- |
|
3268 |
01BF: CLRF 53 |
2503 |
.................... odp[pom+1] = odkl2; //uloz 8my znak vznikly z "prenosu" |
3269 |
.................... odp[pom+1] = odkl2; //uloz 8my znak vznikly z "prenosu" |
- |
|
3270 |
01C0: MOVLW 01 |
- |
|
3271 |
01C1: ADDWF 51,W |
- |
|
3272 |
01C2: ADDLW 26 |
- |
|
3273 |
01C3: MOVWF 04 |
- |
|
3274 |
01C4: MOVF 55,W |
- |
|
3275 |
01C5: MOVWF 00 |
2504 |
.................... maskovadlo = 0; //smaz maskovadlo |
3276 |
.................... maskovadlo = 0; //smaz maskovadlo |
- |
|
3277 |
01C6: CLRF 56 |
2505 |
.................... } |
3278 |
.................... } |
2506 |
.................... } |
3279 |
.................... } |
- |
|
3280 |
01C7: INCF 51,F |
- |
|
3281 |
01C8: GOTO 172 |
2507 |
.................... odp[pom]='\0'; |
3282 |
.................... odp[pom]='\0'; |
- |
|
3283 |
01C9: MOVLW 26 |
- |
|
3284 |
01CA: ADDWF 51,W |
- |
|
3285 |
01CB: MOVWF 04 |
- |
|
3286 |
01CC: CLRF 00 |
2508 |
.................... } |
3287 |
.................... } |
- |
|
3288 |
01CD: BCF 0A.3 |
- |
|
3289 |
01CE: BCF 0A.4 |
- |
|
3290 |
01CF: GOTO 47A (RETURN) |
2509 |
.................... |
3291 |
.................... |
2510 |
.................... void read_time() |
3292 |
.................... void read_time() |
2511 |
.................... { |
3293 |
.................... { |
2512 |
.................... unsigned int8 n; |
3294 |
.................... unsigned int8 n; |
2513 |
.................... |
3295 |
.................... |
2514 |
.................... |
3296 |
.................... |
2515 |
.................... fprintf(MOBIL,"AT+CCLK?\r"); |
3297 |
.................... fprintf(MOBIL,"AT+CCLK?\r"); |
- |
|
3298 |
* |
- |
|
3299 |
01FC: CLRF 52 |
- |
|
3300 |
01FD: MOVF 52,W |
- |
|
3301 |
01FE: CALL 013 |
- |
|
3302 |
01FF: IORLW 00 |
- |
|
3303 |
0200: BTFSC 03.2 |
- |
|
3304 |
0201: GOTO 206 |
- |
|
3305 |
0202: INCF 52,F |
- |
|
3306 |
0203: MOVWF 53 |
- |
|
3307 |
0204: CALL 064 |
- |
|
3308 |
0205: GOTO 1FD |
2516 |
.................... while(fgetc(MOBIL)!='"'); |
3309 |
.................... while(fgetc(MOBIL)!='"'); |
- |
|
3310 |
0206: CALL 08C |
- |
|
3311 |
0207: MOVF 78,W |
- |
|
3312 |
0208: SUBLW 22 |
- |
|
3313 |
0209: BTFSS 03.2 |
- |
|
3314 |
020A: GOTO 206 |
2517 |
.................... for(n=0;n<12;n++) //preskoc nedulezite informace |
3315 |
.................... for(n=0;n<12;n++) //preskoc nedulezite informace |
- |
|
3316 |
020B: CLRF 51 |
- |
|
3317 |
020C: MOVF 51,W |
- |
|
3318 |
020D: SUBLW 0B |
- |
|
3319 |
020E: BTFSS 03.0 |
- |
|
3320 |
020F: GOTO 213 |
2518 |
.................... { |
3321 |
.................... { |
2519 |
.................... fgetc(MOBIL); |
3322 |
.................... fgetc(MOBIL); |
- |
|
3323 |
0210: CALL 08C |
2520 |
.................... } |
3324 |
.................... } |
- |
|
3325 |
0211: INCF 51,F |
- |
|
3326 |
0212: GOTO 20C |
2521 |
.................... odp[0]=fgetc(MOBIL); |
3327 |
.................... odp[0]=fgetc(MOBIL); |
- |
|
3328 |
0213: CALL 08C |
- |
|
3329 |
0214: MOVF 78,W |
- |
|
3330 |
0215: MOVWF 26 |
2522 |
.................... odp[1]=fgetc(MOBIL); |
3331 |
.................... odp[1]=fgetc(MOBIL); |
- |
|
3332 |
0216: CALL 08C |
- |
|
3333 |
0217: MOVF 78,W |
- |
|
3334 |
0218: MOVWF 27 |
2523 |
.................... odp[2]=0; |
3335 |
.................... odp[2]=0; |
- |
|
3336 |
0219: CLRF 28 |
2524 |
.................... } |
3337 |
.................... } |
- |
|
3338 |
021A: BCF 0A.3 |
- |
|
3339 |
021B: BCF 0A.4 |
- |
|
3340 |
021C: GOTO 4F8 (RETURN) |
2525 |
.................... |
3341 |
.................... |
2526 |
.................... void del_sms() |
3342 |
.................... void del_sms() |
2527 |
.................... { |
3343 |
.................... { |
2528 |
.................... fprintf(MOBIL,"AT+CMGD=1\r"); //smaz prijatou SMSku |
3344 |
.................... fprintf(MOBIL,"AT+CMGD=1\r"); //smaz prijatou SMSku |
2529 |
.................... } |
3345 |
.................... } |
2530 |
.................... |
3346 |
.................... |
2531 |
.................... void main() |
3347 |
.................... void main() |
2532 |
.................... { |
3348 |
.................... { |
2533 |
* |
3349 |
* |
2534 |
0057: CLRF 04 |
3350 |
03D5: CLRF 04 |
2535 |
0058: MOVLW 1F |
3351 |
03D6: MOVLW 1F |
2536 |
0059: ANDWF 03,F |
3352 |
03D7: ANDWF 03,F |
2537 |
005A: BCF 20.6 |
3353 |
03D8: BCF 20.6 |
2538 |
005B: MOVF 20,W |
3354 |
03D9: MOVF 20,W |
2539 |
005C: BSF 03.5 |
3355 |
03DA: BSF 03.5 |
2540 |
005D: MOVWF 07 |
3356 |
03DB: MOVWF 07 |
2541 |
005E: BCF 03.5 |
3357 |
03DC: BCF 03.5 |
2542 |
005F: BSF 07.6 |
3358 |
03DD: BSF 07.6 |
2543 |
0060: BSF 03.5 |
3359 |
03DE: BSF 03.5 |
2544 |
0061: BCF 06.2 |
3360 |
03DF: BCF 06.2 |
2545 |
0062: BCF 03.5 |
3361 |
03E0: BCF 03.5 |
2546 |
0063: BSF 06.2 |
3362 |
03E1: BSF 06.2 |
2547 |
0064: BSF 03.5 |
3363 |
03E2: BSF 03.5 |
2548 |
0065: BSF 1F.0 |
3364 |
03E3: BSF 1F.0 |
2549 |
0066: BSF 1F.1 |
3365 |
03E4: BSF 1F.1 |
2550 |
0067: BSF 1F.2 |
3366 |
03E5: BSF 1F.2 |
2551 |
0068: BCF 1F.3 |
3367 |
03E6: BCF 1F.3 |
2552 |
0069: MOVLW 07 |
3368 |
03E7: MOVLW 07 |
2553 |
006A: MOVWF 1C |
3369 |
03E8: MOVWF 1C |
2554 |
.................... setup_adc_ports(NO_ANALOGS); |
3370 |
.................... setup_adc_ports(NO_ANALOGS); |
2555 |
* |
3371 |
* |
2556 |
0074: BSF 03.5 |
3372 |
03F2: BSF 03.5 |
2557 |
0075: BSF 1F.0 |
3373 |
03F3: BSF 1F.0 |
2558 |
0076: BSF 1F.1 |
3374 |
03F4: BSF 1F.1 |
2559 |
0077: BSF 1F.2 |
3375 |
03F5: BSF 1F.2 |
2560 |
0078: BCF 1F.3 |
3376 |
03F6: BCF 1F.3 |
2561 |
.................... setup_adc(ADC_OFF); |
3377 |
.................... setup_adc(ADC_OFF); |
2562 |
0079: BCF 03.5 |
3378 |
03F7: BCF 03.5 |
2563 |
007A: BCF 1F.0 |
3379 |
03F8: BCF 1F.0 |
2564 |
.................... setup_spi(SPI_SS_DISABLED); |
3380 |
.................... setup_spi(SPI_SS_DISABLED); |
2565 |
007B: BCF 14.5 |
3381 |
03F9: BCF 14.5 |
2566 |
007C: BCF 20.5 |
3382 |
03FA: BCF 20.5 |
2567 |
007D: MOVF 20,W |
3383 |
03FB: MOVF 20,W |
2568 |
007E: BSF 03.5 |
3384 |
03FC: BSF 03.5 |
2569 |
007F: MOVWF 07 |
3385 |
03FD: MOVWF 07 |
2570 |
0080: BCF 03.5 |
3386 |
03FE: BCF 03.5 |
2571 |
0081: BSF 20.4 |
3387 |
03FF: BSF 20.4 |
2572 |
0082: MOVF 20,W |
3388 |
0400: MOVF 20,W |
2573 |
0083: BSF 03.5 |
3389 |
0401: BSF 03.5 |
2574 |
0084: MOVWF 07 |
3390 |
0402: MOVWF 07 |
2575 |
0085: BCF 03.5 |
3391 |
0403: BCF 03.5 |
2576 |
0086: BCF 20.3 |
3392 |
0404: BCF 20.3 |
2577 |
0087: MOVF 20,W |
3393 |
0405: MOVF 20,W |
2578 |
0088: BSF 03.5 |
3394 |
0406: BSF 03.5 |
2579 |
0089: MOVWF 07 |
3395 |
0407: MOVWF 07 |
2580 |
008A: MOVLW 01 |
3396 |
0408: MOVLW 01 |
2581 |
008B: BCF 03.5 |
3397 |
0409: BCF 03.5 |
2582 |
008C: MOVWF 14 |
3398 |
040A: MOVWF 14 |
2583 |
008D: MOVLW 00 |
3399 |
040B: MOVLW 00 |
2584 |
008E: BSF 03.5 |
3400 |
040C: BSF 03.5 |
2585 |
008F: MOVWF 14 |
3401 |
040D: MOVWF 14 |
2586 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
3402 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
2587 |
0090: MOVF 01,W |
3403 |
040E: MOVF 01,W |
2588 |
0091: ANDLW C7 |
3404 |
040F: ANDLW C7 |
2589 |
0092: IORLW 08 |
3405 |
0410: IORLW 08 |
2590 |
0093: MOVWF 01 |
3406 |
0411: MOVWF 01 |
2591 |
.................... setup_timer_1(T1_DISABLED); |
3407 |
.................... setup_timer_1(T1_DISABLED); |
2592 |
0094: BCF 03.5 |
3408 |
0412: BCF 03.5 |
2593 |
0095: CLRF 10 |
3409 |
0413: CLRF 10 |
2594 |
.................... setup_timer_2(T2_DIV_BY_4,255,1); |
3410 |
.................... setup_timer_2(T2_DIV_BY_4,255,1); |
2595 |
0096: MOVLW 00 |
3411 |
0414: MOVLW 00 |
2596 |
0097: MOVWF 78 |
3412 |
0415: MOVWF 78 |
2597 |
0098: IORLW 05 |
3413 |
0416: IORLW 05 |
2598 |
0099: MOVWF 12 |
3414 |
0417: MOVWF 12 |
2599 |
009A: MOVLW FF |
3415 |
0418: MOVLW FF |
2600 |
009B: BSF 03.5 |
3416 |
0419: BSF 03.5 |
2601 |
009C: MOVWF 12 |
3417 |
041A: MOVWF 12 |
2602 |
.................... setup_ccp1(CCP_PWM); |
3418 |
.................... setup_ccp1(CCP_PWM); |
2603 |
009D: BCF 03.5 |
3419 |
041B: BCF 03.5 |
2604 |
009E: BCF 20.2 |
3420 |
041C: BCF 20.2 |
2605 |
009F: MOVF 20,W |
3421 |
041D: MOVF 20,W |
2606 |
00A0: BSF 03.5 |
3422 |
041E: BSF 03.5 |
2607 |
00A1: MOVWF 07 |
3423 |
041F: MOVWF 07 |
2608 |
00A2: BCF 03.5 |
3424 |
0420: BCF 03.5 |
2609 |
00A3: BCF 07.2 |
3425 |
0421: BCF 07.2 |
2610 |
00A4: MOVLW 0C |
3426 |
0422: MOVLW 0C |
2611 |
00A5: MOVWF 17 |
3427 |
0423: MOVWF 17 |
2612 |
.................... setup_ccp2(CCP_PWM); |
3428 |
.................... setup_ccp2(CCP_PWM); |
2613 |
00A6: BCF 20.1 |
3429 |
0424: BCF 20.1 |
2614 |
00A7: MOVF 20,W |
3430 |
0425: MOVF 20,W |
2615 |
00A8: BSF 03.5 |
3431 |
0426: BSF 03.5 |
2616 |
00A9: MOVWF 07 |
3432 |
0427: MOVWF 07 |
2617 |
00AA: BCF 03.5 |
3433 |
0428: BCF 03.5 |
2618 |
00AB: BCF 07.1 |
3434 |
0429: BCF 07.1 |
2619 |
00AC: MOVLW 0C |
3435 |
042A: MOVLW 0C |
2620 |
00AD: MOVWF 1D |
3436 |
042B: MOVWF 1D |
2621 |
.................... setup_comparator(NC_NC_NC_NC); |
3437 |
.................... setup_comparator(NC_NC_NC_NC); |
2622 |
00AE: MOVLW 07 |
3438 |
042C: MOVLW 07 |
2623 |
00AF: BSF 03.5 |
3439 |
042D: BSF 03.5 |
2624 |
00B0: MOVWF 1C |
3440 |
042E: MOVWF 1C |
2625 |
00B1: MOVF 05,W |
3441 |
042F: MOVF 05,W |
2626 |
00B2: CLRWDT |
3442 |
0430: CLRWDT |
2627 |
00B3: MOVLW 0E |
3443 |
0431: MOVLW 0E |
2628 |
00B4: MOVWF 77 |
3444 |
0432: MOVWF 77 |
2629 |
00B5: DECFSZ 77,F |
3445 |
0433: DECFSZ 77,F |
2630 |
00B6: GOTO 0B5 |
3446 |
0434: GOTO 433 |
2631 |
00B7: NOP |
3447 |
0435: NOP |
2632 |
00B8: NOP |
3448 |
0436: NOP |
2633 |
00B9: MOVF 1C,W |
3449 |
0437: MOVF 1C,W |
2634 |
00BA: BCF 03.5 |
3450 |
0438: BCF 03.5 |
2635 |
00BB: BCF 0D.6 |
3451 |
0439: BCF 0D.6 |
2636 |
.................... setup_vref(FALSE); |
3452 |
.................... setup_vref(FALSE); |
2637 |
00BC: BSF 03.5 |
3453 |
043A: BSF 03.5 |
2638 |
00BD: CLRF 1D |
3454 |
043B: CLRF 1D |
2639 |
.................... setup_wdt(WDT_2304MS); |
3455 |
.................... setup_wdt(WDT_2304MS); |
2640 |
00BE: MOVLW 0F |
3456 |
043C: MOVLW 0F |
2641 |
00BF: MOVWF 77 |
3457 |
043D: MOVWF 77 |
2642 |
00C0: MOVLW 07 |
3458 |
043E: MOVLW 07 |
2643 |
00C1: BCF 03.5 |
3459 |
043F: BCF 03.5 |
2644 |
00C2: CLRF 01 |
3460 |
0440: CLRF 01 |
2645 |
00C3: MOVLW 81 |
3461 |
0441: MOVLW 81 |
2646 |
00C4: MOVWF 04 |
3462 |
0442: MOVWF 04 |
2647 |
00C5: MOVF 00,W |
3463 |
0443: MOVF 00,W |
2648 |
00C6: ANDLW F0 |
3464 |
0444: ANDLW F0 |
2649 |
00C7: IORLW 07 |
3465 |
0445: IORLW 07 |
2650 |
00C8: MOVWF 00 |
3466 |
0446: MOVWF 00 |
2651 |
00C9: CLRWDT |
3467 |
0447: CLRWDT |
2652 |
00CA: MOVF 00,W |
3468 |
0448: MOVF 00,W |
2653 |
00CB: ANDLW F7 |
3469 |
0449: ANDLW F7 |
2654 |
00CC: BTFSC 77.3 |
3470 |
044A: BTFSC 77.3 |
2655 |
00CD: ANDLW F0 |
3471 |
044B: ANDLW F0 |
2656 |
00CE: IORWF 77,W |
3472 |
044C: IORWF 77,W |
2657 |
00CF: MOVWF 00 |
3473 |
044D: MOVWF 00 |
2658 |
.................... |
3474 |
.................... |
2659 |
.................... set_pwm1_duty(0); |
3475 |
.................... set_pwm1_duty(0); |
2660 |
00D0: CLRF 15 |
3476 |
044E: CLRF 15 |
2661 |
.................... set_pwm2_duty(0); |
3477 |
.................... set_pwm2_duty(0); |
2662 |
00D1: CLRF 1B |
3478 |
044F: CLRF 1B |
2663 |
.................... |
3479 |
.................... |
2664 |
.................... while(TRUE) |
3480 |
.................... while(TRUE) |
2665 |
.................... { |
3481 |
.................... { |
2666 |
.................... int status; |
3482 |
.................... int status; |
2667 |
.................... char *ptr; |
3483 |
.................... char *ptr; |
2668 |
.................... int time; |
3484 |
.................... int time; |
2669 |
.................... |
3485 |
.................... |
2670 |
.................... restart_wdt(); |
3486 |
.................... restart_wdt(); |
2671 |
00D2: CLRWDT |
3487 |
0450: CLRWDT |
2672 |
.................... |
3488 |
.................... |
2673 |
.................... output_low(PIN_A4) ; |
3489 |
.................... output_low(PIN_A4) ; |
2674 |
00D3: BSF 03.5 |
3490 |
0451: BSF 03.5 |
2675 |
00D4: BCF 05.4 |
3491 |
0452: BCF 05.4 |
2676 |
00D5: BCF 03.5 |
3492 |
0453: BCF 03.5 |
2677 |
00D6: BCF 05.4 |
3493 |
0454: BCF 05.4 |
2678 |
.................... delay_ms(150); |
3494 |
.................... delay_ms(150); |
2679 |
00D7: MOVLW 96 |
3495 |
0455: MOVLW 96 |
2680 |
00D8: MOVWF 52 |
3496 |
0456: MOVWF 52 |
2681 |
00D9: CALL 013 |
3497 |
0457: CALL 04E |
2682 |
.................... output_high(PIN_A4); |
3498 |
.................... output_high(PIN_A4); |
2683 |
00DA: BSF 03.5 |
3499 |
0458: BSF 03.5 |
2684 |
00DB: BCF 05.4 |
3500 |
0459: BCF 05.4 |
2685 |
00DC: BCF 03.5 |
3501 |
045A: BCF 03.5 |
2686 |
00DD: BSF 05.4 |
3502 |
045B: BSF 05.4 |
2687 |
.................... delay_ms(150); |
3503 |
.................... delay_ms(150); |
2688 |
00DE: MOVLW 96 |
3504 |
045C: MOVLW 96 |
2689 |
00DF: MOVWF 52 |
3505 |
045D: MOVWF 52 |
2690 |
00E0: CALL 013 |
3506 |
045E: CALL 04E |
2691 |
.................... output_low(PIN_A4) ; |
3507 |
.................... output_low(PIN_A4) ; |
2692 |
00E1: BSF 03.5 |
3508 |
045F: BSF 03.5 |
2693 |
00E2: BCF 05.4 |
3509 |
0460: BCF 05.4 |
2694 |
00E3: BCF 03.5 |
3510 |
0461: BCF 03.5 |
2695 |
00E4: BCF 05.4 |
3511 |
0462: BCF 05.4 |
2696 |
.................... delay_ms(150); |
3512 |
.................... delay_ms(150); |
2697 |
00E5: MOVLW 96 |
3513 |
0463: MOVLW 96 |
2698 |
00E6: MOVWF 52 |
3514 |
0464: MOVWF 52 |
2699 |
00E7: CALL 013 |
3515 |
0465: CALL 04E |
2700 |
.................... output_high(PIN_A4); |
3516 |
.................... output_high(PIN_A4); |
2701 |
00E8: BSF 03.5 |
3517 |
0466: BSF 03.5 |
2702 |
00E9: BCF 05.4 |
3518 |
0467: BCF 05.4 |
2703 |
00EA: BCF 03.5 |
3519 |
0468: BCF 03.5 |
2704 |
00EB: BSF 05.4 |
3520 |
0469: BSF 05.4 |
2705 |
.................... delay_ms(150); |
3521 |
.................... delay_ms(150); |
2706 |
00EC: MOVLW 96 |
3522 |
046A: MOVLW 96 |
2707 |
00ED: MOVWF 52 |
- |
|
2708 |
00EE: CALL 013 |
- |
|
2709 |
.................... |
- |
|
2710 |
.................... |
- |
|
2711 |
.................... set_pwm1_duty(500); |
- |
|
2712 |
00EF: MOVLW 7D |
- |
|
2713 |
00F0: MOVWF 15 |
- |
|
2714 |
00F1: MOVF 17,W |
- |
|
2715 |
00F2: ANDLW CF |
- |
|
2716 |
00F3: MOVWF 17 |
- |
|
2717 |
.................... set_pwm2_duty(500); |
- |
|
2718 |
00F4: MOVLW 7D |
- |
|
2719 |
00F5: MOVWF 1B |
- |
|
2720 |
00F6: MOVF 1D,W |
- |
|
2721 |
00F7: ANDLW CF |
- |
|
2722 |
00F8: MOVWF 1D |
- |
|
2723 |
.................... |
- |
|
2724 |
.................... fprintf(VRTULE,"ABABABABAB"); |
- |
|
2725 |
00F9: CLRF 51 |
- |
|
2726 |
00FA: MOVF 51,W |
- |
|
2727 |
00FB: CALL 004 |
- |
|
2728 |
00FC: IORLW 00 |
- |
|
2729 |
00FD: BTFSC 03.2 |
- |
|
2730 |
00FE: GOTO 103 |
- |
|
2731 |
00FF: INCF 51,F |
- |
|
2732 |
0100: MOVWF 52 |
- |
|
2733 |
0101: GOTO 029 |
- |
|
2734 |
0102: GOTO 0FA |
- |
|
2735 |
.................... |
- |
|
2736 |
.................... Delay_ms(5000); |
- |
|
2737 |
0103: MOVLW 14 |
- |
|
2738 |
0104: MOVWF 51 |
- |
|
2739 |
0105: MOVLW FA |
- |
|
2740 |
0106: MOVWF 52 |
3523 |
046B: MOVWF 52 |
2741 |
0107: CALL 013 |
3524 |
046C: CALL 04E |
2742 |
0108: DECFSZ 51,F |
- |
|
2743 |
0109: GOTO 105 |
- |
|
2744 |
.................... |
3525 |
.................... |
2745 |
.................... |
3526 |
.................... |
2746 |
.................... /* if(check_new_sms()) // Je odpoved "OK"? |
3527 |
.................... if(check_new_sms()) // Je odpoved "OK"? |
- |
|
3528 |
046D: GOTO 0B6 |
- |
|
3529 |
046E: MOVF 78,F |
- |
|
3530 |
046F: BTFSC 03.2 |
- |
|
3531 |
0470: GOTO 479 |
2747 |
.................... { |
3532 |
.................... { |
2748 |
.................... // printf(lcd_putc,"736 655 250"); |
3533 |
.................... // printf(lcd_putc,"736 655 250"); |
2749 |
.................... delay_ms(1000); |
3534 |
.................... delay_ms(1000); |
- |
|
3535 |
0471: MOVLW 04 |
- |
|
3536 |
0472: MOVWF 51 |
- |
|
3537 |
0473: MOVLW FA |
- |
|
3538 |
0474: MOVWF 52 |
- |
|
3539 |
0475: CALL 04E |
- |
|
3540 |
0476: DECFSZ 51,F |
- |
|
3541 |
0477: GOTO 473 |
2750 |
.................... } |
3542 |
.................... } |
2751 |
.................... else |
3543 |
.................... else |
- |
|
3544 |
0478: GOTO 4F7 |
2752 |
.................... { |
3545 |
.................... { |
2753 |
.................... read_sms(); |
3546 |
.................... read_sms(); |
- |
|
3547 |
0479: GOTO 0E2 |
2754 |
.................... |
3548 |
.................... |
2755 |
.................... if (odp[0] == 'A' || odp[0] == 'a') |
3549 |
.................... /* if (odp[0] == 'A' || odp[0] == 'a') |
2756 |
.................... { |
3550 |
.................... { |
2757 |
.................... set_pwm1_duty(500); |
3551 |
.................... set_pwm1_duty(500); |
2758 |
.................... set_pwm2_duty(500); |
3552 |
.................... set_pwm2_duty(500); |
- |
|
3553 |
.................... Delay_ms(10000); |
- |
|
3554 |
.................... fprintf(VRTULE,"JACK[BARmk"); // "JACK BAR :)" |
- |
|
3555 |
.................... Delay_ms(2000); |
- |
|
3556 |
.................... fprintf(VRTULE,"JACK[BARmk"); // "JACK BAR :)" |
2759 |
.................... Delay_ms(5000); |
3557 |
.................... Delay_ms(5000); |
2760 |
.................... fprintf(VRTULE,"ABABABABAB"); |
- |
|
2761 |
.................... Delay_ms(20000); |
- |
|
2762 |
.................... set_pwm1_duty(0); |
3558 |
.................... set_pwm1_duty(0); |
2763 |
.................... set_pwm2_duty(0); |
3559 |
.................... set_pwm2_duty(0); |
2764 |
.................... } |
3560 |
.................... }*/ |
2765 |
.................... |
3561 |
.................... |
2766 |
.................... if (odp[0] == 118 && odp[1] == 121 && odp[2] == 112 && odp[3]== 49) |
3562 |
.................... /* if (odp[1] == 'h') |
2767 |
.................... { |
3563 |
.................... { |
- |
|
3564 |
.................... set_pwm1_duty(500); |
- |
|
3565 |
.................... set_pwm2_duty(500); |
- |
|
3566 |
.................... Delay_ms(10000); |
- |
|
3567 |
.................... fprintf(VRTULE,"[ERROR[d[["); // " ERROR 3 " |
- |
|
3568 |
.................... Delay_ms(2000); |
- |
|
3569 |
.................... fprintf(VRTULE,"[ERROR[d[["); // " ERROR 3 " |
- |
|
3570 |
.................... Delay_ms(2000); |
- |
|
3571 |
.................... fprintf(VRTULE,"[OVERFLOW["); // " OVERFLOW " |
- |
|
3572 |
.................... Delay_ms(2000); |
2768 |
.................... fprintf(VRTULE,""); |
3573 |
.................... fprintf(VRTULE,"[OVERFLOW["); |
- |
|
3574 |
.................... Delay_ms(5000); |
- |
|
3575 |
.................... set_pwm1_duty(0); |
- |
|
3576 |
.................... set_pwm2_duty(0); |
2769 |
.................... } |
3577 |
.................... }*/ |
2770 |
.................... |
3578 |
.................... |
2771 |
.................... if (odp[0] == 97 && odp[1] == 104 && odp[2] == 111 && odp[3]== 106) |
3579 |
.................... if (odp[2] == 'o') |
- |
|
3580 |
047A: MOVF 28,W |
- |
|
3581 |
047B: SUBLW 6F |
- |
|
3582 |
047C: BTFSS 03.2 |
- |
|
3583 |
047D: GOTO 4F7 |
2772 |
.................... { |
3584 |
.................... { |
- |
|
3585 |
.................... set_pwm1_duty(500); |
- |
|
3586 |
047E: MOVLW 7D |
- |
|
3587 |
047F: MOVWF 15 |
- |
|
3588 |
0480: MOVF 17,W |
- |
|
3589 |
0481: ANDLW CF |
- |
|
3590 |
0482: MOVWF 17 |
- |
|
3591 |
.................... set_pwm2_duty(500); |
- |
|
3592 |
0483: MOVLW 7D |
- |
|
3593 |
0484: MOVWF 1B |
- |
|
3594 |
0485: MOVF 1D,W |
- |
|
3595 |
0486: ANDLW CF |
- |
|
3596 |
0487: MOVWF 1D |
- |
|
3597 |
.................... Delay_ms(10000); |
- |
|
3598 |
0488: MOVLW 28 |
- |
|
3599 |
0489: MOVWF 51 |
- |
|
3600 |
048A: MOVLW FA |
- |
|
3601 |
048B: MOVWF 52 |
- |
|
3602 |
048C: CALL 04E |
- |
|
3603 |
048D: DECFSZ 51,F |
- |
|
3604 |
048E: GOTO 48A |
- |
|
3605 |
.................... fprintf(VRTULE,"[ERROR[e[["); // " ERROR 4 " |
- |
|
3606 |
048F: CLRF 51 |
- |
|
3607 |
0490: MOVF 51,W |
- |
|
3608 |
0491: CALL 021 |
- |
|
3609 |
0492: IORLW 00 |
- |
|
3610 |
0493: BTFSC 03.2 |
- |
|
3611 |
0494: GOTO 499 |
- |
|
3612 |
0495: INCF 51,F |
- |
|
3613 |
0496: MOVWF 52 |
- |
|
3614 |
0497: CALL 1D0 |
- |
|
3615 |
0498: GOTO 490 |
- |
|
3616 |
.................... Delay_ms(2000); |
- |
|
3617 |
0499: MOVLW 08 |
- |
|
3618 |
049A: MOVWF 51 |
- |
|
3619 |
049B: MOVLW FA |
- |
|
3620 |
049C: MOVWF 52 |
- |
|
3621 |
049D: CALL 04E |
- |
|
3622 |
049E: DECFSZ 51,F |
- |
|
3623 |
049F: GOTO 49B |
- |
|
3624 |
.................... fprintf(VRTULE,"[ERROR[e[["); // " ERROR 4 " |
- |
|
3625 |
04A0: CLRF 51 |
- |
|
3626 |
04A1: MOVF 51,W |
- |
|
3627 |
04A2: CALL 021 |
- |
|
3628 |
04A3: IORLW 00 |
- |
|
3629 |
04A4: BTFSC 03.2 |
- |
|
3630 |
04A5: GOTO 4AA |
- |
|
3631 |
04A6: INCF 51,F |
- |
|
3632 |
04A7: MOVWF 52 |
- |
|
3633 |
04A8: CALL 1D0 |
- |
|
3634 |
04A9: GOTO 4A1 |
- |
|
3635 |
.................... Delay_ms(2000); |
- |
|
3636 |
04AA: MOVLW 08 |
- |
|
3637 |
04AB: MOVWF 51 |
- |
|
3638 |
04AC: MOVLW FA |
- |
|
3639 |
04AD: MOVWF 52 |
- |
|
3640 |
04AE: CALL 04E |
- |
|
3641 |
04AF: DECFSZ 51,F |
- |
|
3642 |
04B0: GOTO 4AC |
- |
|
3643 |
.................... fprintf(VRTULE,"[OPAKUJTE["); // " OPAKUJTE " |
- |
|
3644 |
04B1: CLRF 51 |
- |
|
3645 |
04B2: MOVF 51,W |
- |
|
3646 |
04B3: CALL 030 |
- |
|
3647 |
04B4: IORLW 00 |
- |
|
3648 |
04B5: BTFSC 03.2 |
- |
|
3649 |
04B6: GOTO 4BB |
- |
|
3650 |
04B7: INCF 51,F |
- |
|
3651 |
04B8: MOVWF 52 |
- |
|
3652 |
04B9: CALL 1D0 |
- |
|
3653 |
04BA: GOTO 4B2 |
- |
|
3654 |
.................... Delay_ms(2000); |
- |
|
3655 |
04BB: MOVLW 08 |
- |
|
3656 |
04BC: MOVWF 51 |
- |
|
3657 |
04BD: MOVLW FA |
- |
|
3658 |
04BE: MOVWF 52 |
- |
|
3659 |
04BF: CALL 04E |
- |
|
3660 |
04C0: DECFSZ 51,F |
- |
|
3661 |
04C1: GOTO 4BD |
- |
|
3662 |
.................... fprintf(VRTULE,"[OPAKUJTE["); |
- |
|
3663 |
04C2: CLRF 51 |
- |
|
3664 |
04C3: MOVF 51,W |
- |
|
3665 |
04C4: CALL 030 |
- |
|
3666 |
04C5: IORLW 00 |
- |
|
3667 |
04C6: BTFSC 03.2 |
- |
|
3668 |
04C7: GOTO 4CC |
- |
|
3669 |
04C8: INCF 51,F |
- |
|
3670 |
04C9: MOVWF 52 |
- |
|
3671 |
04CA: CALL 1D0 |
- |
|
3672 |
04CB: GOTO 4C3 |
- |
|
3673 |
.................... Delay_ms(2000); |
- |
|
3674 |
04CC: MOVLW 08 |
- |
|
3675 |
04CD: MOVWF 51 |
- |
|
3676 |
04CE: MOVLW FA |
- |
|
3677 |
04CF: MOVWF 52 |
- |
|
3678 |
04D0: CALL 04E |
- |
|
3679 |
04D1: DECFSZ 51,F |
- |
|
3680 |
04D2: GOTO 4CE |
- |
|
3681 |
.................... fprintf(VRTULE,"[[VOLBU[[["); // " VOLBU " |
- |
|
3682 |
04D3: CLRF 51 |
- |
|
3683 |
04D4: MOVF 51,W |
- |
|
3684 |
04D5: CALL 03F |
- |
|
3685 |
04D6: IORLW 00 |
- |
|
3686 |
04D7: BTFSC 03.2 |
- |
|
3687 |
04D8: GOTO 4DD |
- |
|
3688 |
04D9: INCF 51,F |
- |
|
3689 |
04DA: MOVWF 52 |
- |
|
3690 |
04DB: CALL 1D0 |
- |
|
3691 |
04DC: GOTO 4D4 |
- |
|
3692 |
.................... Delay_ms(2000); |
- |
|
3693 |
04DD: MOVLW 08 |
- |
|
3694 |
04DE: MOVWF 51 |
- |
|
3695 |
04DF: MOVLW FA |
- |
|
3696 |
04E0: MOVWF 52 |
- |
|
3697 |
04E1: CALL 04E |
- |
|
3698 |
04E2: DECFSZ 51,F |
- |
|
3699 |
04E3: GOTO 4DF |
2773 |
.................... fprintf(VRTULE,""); |
3700 |
.................... fprintf(VRTULE,"[[VOLBU[[["); |
- |
|
3701 |
04E4: CLRF 51 |
- |
|
3702 |
04E5: MOVF 51,W |
- |
|
3703 |
04E6: CALL 03F |
- |
|
3704 |
04E7: IORLW 00 |
- |
|
3705 |
04E8: BTFSC 03.2 |
- |
|
3706 |
04E9: GOTO 4EE |
- |
|
3707 |
04EA: INCF 51,F |
- |
|
3708 |
04EB: MOVWF 52 |
- |
|
3709 |
04EC: CALL 1D0 |
- |
|
3710 |
04ED: GOTO 4E5 |
- |
|
3711 |
.................... Delay_ms(3000); |
- |
|
3712 |
04EE: MOVLW 0C |
- |
|
3713 |
04EF: MOVWF 51 |
- |
|
3714 |
04F0: MOVLW FA |
- |
|
3715 |
04F1: MOVWF 52 |
- |
|
3716 |
04F2: CALL 04E |
- |
|
3717 |
04F3: DECFSZ 51,F |
- |
|
3718 |
04F4: GOTO 4F0 |
- |
|
3719 |
.................... set_pwm1_duty(0); |
- |
|
3720 |
04F5: CLRF 15 |
- |
|
3721 |
.................... set_pwm2_duty(0); |
- |
|
3722 |
04F6: CLRF 1B |
2774 |
.................... } |
3723 |
.................... } |
2775 |
.................... } |
3724 |
.................... } |
2776 |
.................... /* read_time(); |
3725 |
.................... read_time(); |
- |
|
3726 |
04F7: GOTO 1FC |
2777 |
.................... time=strtoul(odp,&ptr,10); |
3727 |
.................... time=strtoul(odp,&ptr,10); |
- |
|
3728 |
04F8: MOVLW 26 |
- |
|
3729 |
04F9: MOVWF 51 |
- |
|
3730 |
04FA: MOVLW 4F |
- |
|
3731 |
04FB: MOVWF 52 |
- |
|
3732 |
04FC: MOVLW 0A |
- |
|
3733 |
04FD: MOVWF 53 |
- |
|
3734 |
04FE: GOTO 24F |
- |
|
3735 |
04FF: MOVF 78,W |
- |
|
3736 |
0500: MOVWF 50 |
2778 |
.................... if((time >= 30 && time <= 35) || (time >= 0 && time <= 5)) |
3737 |
.................... if((time >= 30 && time <= 35) || (time >= 0 && time <= 5)) |
- |
|
3738 |
0501: MOVF 50,W |
- |
|
3739 |
0502: SUBLW 1D |
- |
|
3740 |
0503: BTFSC 03.0 |
- |
|
3741 |
0504: GOTO 509 |
- |
|
3742 |
0505: MOVF 50,W |
- |
|
3743 |
0506: SUBLW 23 |
- |
|
3744 |
0507: BTFSC 03.0 |
- |
|
3745 |
0508: GOTO 50D |
- |
|
3746 |
0509: MOVF 50,W |
- |
|
3747 |
050A: SUBLW 05 |
- |
|
3748 |
050B: BTFSS 03.0 |
- |
|
3749 |
050C: GOTO 518 |
2779 |
.................... { |
3750 |
.................... { |
2780 |
.................... set_pwm1_duty(500); |
3751 |
.................... set_pwm1_duty(500); |
- |
|
3752 |
050D: MOVLW 7D |
- |
|
3753 |
050E: MOVWF 15 |
- |
|
3754 |
050F: MOVF 17,W |
- |
|
3755 |
0510: ANDLW CF |
- |
|
3756 |
0511: MOVWF 17 |
2781 |
.................... set_pwm2_duty(500); |
3757 |
.................... set_pwm2_duty(500); |
- |
|
3758 |
0512: MOVLW 7D |
- |
|
3759 |
0513: MOVWF 1B |
- |
|
3760 |
0514: MOVF 1D,W |
- |
|
3761 |
0515: ANDLW CF |
- |
|
3762 |
0516: MOVWF 1D |
2782 |
.................... } |
3763 |
.................... } |
2783 |
.................... else |
3764 |
.................... else |
- |
|
3765 |
0517: GOTO 51A |
2784 |
.................... { |
3766 |
.................... { |
2785 |
.................... set_pwm1_duty(0); |
3767 |
.................... set_pwm1_duty(0); |
- |
|
3768 |
0518: CLRF 15 |
2786 |
.................... set_pwm2_duty(0); |
3769 |
.................... set_pwm2_duty(0); |
- |
|
3770 |
0519: CLRF 1B |
2787 |
.................... }*/ |
3771 |
.................... } |
2788 |
.................... |
3772 |
.................... |
2789 |
.................... delay_ms(1000); |
3773 |
.................... delay_ms(1000); |
2790 |
010A: MOVLW 04 |
3774 |
051A: MOVLW 04 |
2791 |
010B: MOVWF 51 |
3775 |
051B: MOVWF 51 |
2792 |
010C: MOVLW FA |
3776 |
051C: MOVLW FA |
2793 |
010D: MOVWF 52 |
3777 |
051D: MOVWF 52 |
2794 |
010E: CALL 013 |
3778 |
051E: CALL 04E |
2795 |
010F: DECFSZ 51,F |
3779 |
051F: DECFSZ 51,F |
2796 |
0110: GOTO 10C |
3780 |
0520: GOTO 51C |
2797 |
.................... } |
3781 |
.................... } |
2798 |
0111: GOTO 0D2 |
3782 |
0521: GOTO 450 |
2799 |
.................... } |
3783 |
.................... } |
2800 |
0112: SLEEP |
3784 |
0522: SLEEP |
2801 |
|
3785 |
|
2802 |
Configuration Fuses: |
3786 |
Configuration Fuses: |
2803 |
Word 1: 3F3A HS NOWDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD NOWRT |
3787 |
Word 1: 3F3A HS NOWDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD NOWRT |