gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ;-------------------------------------------------------- 00002 ; File Created by SDCC : free open source ANSI-C Compiler 00003 ; Version 2.9.7 #5883 (Jul 21 2010) (CYGWIN) 00004 ; This file was generated Tue Nov 9 17:48:18 2010 00005 ;-------------------------------------------------------- 00006 ; PIC16 port for the Microchip 16-bit core micros 00007 ;-------------------------------------------------------- 00008 list p=18f2680 00009 00010 radix dec 00011 00012 ;-------------------------------------------------------- 00013 ; public variables in this module 00014 ;-------------------------------------------------------- 00015 global _rxchecker 00016 00017 ;-------------------------------------------------------- 00018 ; extern variables in this module 00019 ;-------------------------------------------------------- 00020 extern __gptrget2 00021 extern __gptrput2 00022 extern __gptrput1 00023 extern __gptrget1 00024 extern _next 00025 extern _addfirstbuff 00026 ;-------------------------------------------------------- 00027 ; Equates to used internal registers 00028 ;-------------------------------------------------------- 00000FD8 00029 STATUS equ 0xfd8 00000FE8 00030 WREG equ 0xfe8 00000FE9 00031 FSR0L equ 0xfe9 00000FE1 00032 FSR1L equ 0xfe1 00000FD9 00033 FSR2L equ 0xfd9 00000FE5 00034 POSTDEC1 equ 0xfe5 00000FE4 00035 PREINC1 equ 0xfe4 00000FDB 00036 PLUSW2 equ 0xfdb 00000FF3 00037 PRODL equ 0xff3 00000FF4 00038 PRODH equ 0xff4 00039 00040 00041 ; Internal registers 00042 .registers udata_ovr 0x0000 00043 r0x00 res 1 00044 r0x01 res 1 00045 r0x02 res 1 00046 r0x03 res 1 00047 r0x04 res 1 00048 r0x05 res 1 00049 r0x06 res 1 00050 r0x07 res 1 00051 r0x08 res 1 00052 r0x09 res 1 00053 r0x0a res 1 00054 r0x0b res 1 gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 2 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00055 r0x0c res 1 00056 r0x0d res 1 00057 r0x0e res 1 00058 r0x0f res 1 00059 r0x10 res 1 00060 r0x11 res 1 00061 r0x12 res 1 00062 r0x13 res 1 00063 r0x14 res 1 00064 r0x15 res 1 00065 r0x16 res 1 00066 00067 ;-------------------------------------------------------- 00068 ; global & static initialisations 00069 ;-------------------------------------------------------- 00070 ; I code from now on! 00071 ; ; Starting pCode block 00072 S_rxcheck__rxchecker code 0000 00073 _rxchecker: 00074 ; .line 8; rxcheck.c int rxchecker(struct receiver *rx,struct circbuff *rxbuff) 0000 CFD9 FFE5 00075 MOVFF FSR2L, POSTDEC1 0004 CFE1 FFD9 00076 MOVFF FSR1L, FSR2L 0008 C000 FFE5 00077 MOVFF r0x00, POSTDEC1 000C C000 FFE5 00078 MOVFF r0x01, POSTDEC1 0010 C000 FFE5 00079 MOVFF r0x02, POSTDEC1 0014 C000 FFE5 00080 MOVFF r0x03, POSTDEC1 0018 C000 FFE5 00081 MOVFF r0x04, POSTDEC1 001C C000 FFE5 00082 MOVFF r0x05, POSTDEC1 0020 C000 FFE5 00083 MOVFF r0x06, POSTDEC1 0024 C000 FFE5 00084 MOVFF r0x07, POSTDEC1 0028 C000 FFE5 00085 MOVFF r0x08, POSTDEC1 002C C000 FFE5 00086 MOVFF r0x09, POSTDEC1 0030 C000 FFE5 00087 MOVFF r0x0a, POSTDEC1 0034 C000 FFE5 00088 MOVFF r0x0b, POSTDEC1 0038 C000 FFE5 00089 MOVFF r0x0c, POSTDEC1 003C C000 FFE5 00090 MOVFF r0x0d, POSTDEC1 0040 C000 FFE5 00091 MOVFF r0x0e, POSTDEC1 0044 C000 FFE5 00092 MOVFF r0x0f, POSTDEC1 0048 C000 FFE5 00093 MOVFF r0x10, POSTDEC1 004C C000 FFE5 00094 MOVFF r0x11, POSTDEC1 0050 C000 FFE5 00095 MOVFF r0x12, POSTDEC1 0054 C000 FFE5 00096 MOVFF r0x13, POSTDEC1 0058 C000 FFE5 00097 MOVFF r0x14, POSTDEC1 005C C000 FFE5 00098 MOVFF r0x15, POSTDEC1 0060 C000 FFE5 00099 MOVFF r0x16, POSTDEC1 0064 0E02 00100 MOVLW 0x02 0066 CFDB F000 00101 MOVFF PLUSW2, r0x00 006A 0E03 00102 MOVLW 0x03 006C CFDB F000 00103 MOVFF PLUSW2, r0x01 0070 0E04 00104 MOVLW 0x04 0072 CFDB F000 00105 MOVFF PLUSW2, r0x02 0076 0E05 00106 MOVLW 0x05 0078 CFDB F000 00107 MOVFF PLUSW2, r0x03 007C 0E06 00108 MOVLW 0x06 gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 3 LOC OBJECT CODE LINE SOURCE TEXT VALUE 007E CFDB F000 00109 MOVFF PLUSW2, r0x04 0082 0E07 00110 MOVLW 0x07 0084 CFDB F000 00111 MOVFF PLUSW2, r0x05 00112 ; .line 15; rxcheck.c newbyte = next(rxbuff); 0088 5000 00113 MOVF r0x05, W 008A 6EE5 00114 MOVWF POSTDEC1 008C 5000 00115 MOVF r0x04, W 008E 6EE5 00116 MOVWF POSTDEC1 0090 5000 00117 MOVF r0x03, W 0092 6EE5 00118 MOVWF POSTDEC1 0094 EC00 F000 00119 CALL _next 0098 6E00 00120 MOVWF r0x06 009A 0E03 00121 MOVLW 0x03 009C 26E1 00122 ADDWF FSR1L, F 00123 ; .line 17; rxcheck.c if(rx->position == 0) 009E 5000 00124 MOVF r0x00, W 00A0 0F09 00125 ADDLW 0x09 00A2 6E00 00126 MOVWF r0x07 00A4 0E00 00127 MOVLW 0x00 00A6 2000 00128 ADDWFC r0x01, W 00A8 6E00 00129 MOVWF r0x08 00AA 0E00 00130 MOVLW 0x00 00AC 2000 00131 ADDWFC r0x02, W 00AE 6E00 00132 MOVWF r0x09 00B0 C000 FFE9 00133 MOVFF r0x07, FSR0L 00B4 C000 FFF3 00134 MOVFF r0x08, PRODL 00B8 5000 00135 MOVF r0x09, W 00BA EC00 F000 00136 CALL __gptrget2 00BE 6E00 00137 MOVWF r0x0a 00C0 CFF3 F000 00138 MOVFF PRODL, r0x0b 00C4 5000 00139 MOVF r0x0a, W 00C6 1000 00140 IORWF r0x0b, W 00C8 A4D8 00141 BTFSS STATUS, 2 00CA D000 00142 BRA _00108_DS_ 00143 ; .line 19; rxcheck.c if(newbyte!=0xaa) 00CC 5000 00144 MOVF r0x06, W 00CE 0AAA 00145 XORLW 0xaa 00D0 E000 00146 BZ _00106_DS_ 00147 ; .line 21; rxcheck.c rx->drop_errors = rx->drop_errors +1; 00D2 5000 00148 MOVF r0x00, W 00D4 0F05 00149 ADDLW 0x05 00D6 6E00 00150 MOVWF r0x0c 00D8 0E00 00151 MOVLW 0x00 00DA 2000 00152 ADDWFC r0x01, W 00DC 6E00 00153 MOVWF r0x0d 00DE 0E00 00154 MOVLW 0x00 00E0 2000 00155 ADDWFC r0x02, W 00E2 6E00 00156 MOVWF r0x0e 00E4 C000 FFE9 00157 MOVFF r0x0c, FSR0L 00E8 C000 FFF3 00158 MOVFF r0x0d, PRODL 00EC 5000 00159 MOVF r0x0e, W 00EE EC00 F000 00160 CALL __gptrget2 00F2 6E00 00161 MOVWF r0x0f 00F4 CFF3 F000 00162 MOVFF PRODL, r0x10 gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 4 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00F8 2A00 00163 INCF r0x0f, F 00FA B0D8 00164 BTFSC STATUS, 0 00FC 2A00 00165 INCF r0x10, F 00FE C000 FFE5 00166 MOVFF r0x0f, POSTDEC1 0102 C000 FFF4 00167 MOVFF r0x10, PRODH 0106 C000 FFE9 00168 MOVFF r0x0c, FSR0L 010A C000 FFF3 00169 MOVFF r0x0d, PRODL 010E 5000 00170 MOVF r0x0e, W 0110 EC00 F000 00171 CALL __gptrput2 00172 ; .line 22; rxcheck.c return 0; 0114 6AF3 00173 CLRF PRODL 0116 6AE8 00174 CLRF WREG 0118 D000 00175 BRA _00127_DS_ 011A 00176 _00106_DS_: 00177 ; .line 25; rxcheck.c rx->checksum = 0; 011A 0E00 00178 MOVLW 0x00 011C 6EE5 00179 MOVWF POSTDEC1 011E C000 FFE9 00180 MOVFF r0x00, FSR0L 0122 C000 FFF3 00181 MOVFF r0x01, PRODL 0126 5000 00182 MOVF r0x02, W 0128 EC00 F000 00183 CALL __gptrput1 00184 ; .line 26; rxcheck.c rx->length = 0; 012C 5000 00185 MOVF r0x00, W 012E 0F0B 00186 ADDLW 0x0b 0130 6E00 00187 MOVWF r0x0c 0132 0E00 00188 MOVLW 0x00 0134 2000 00189 ADDWFC r0x01, W 0136 6E00 00190 MOVWF r0x0d 0138 0E00 00191 MOVLW 0x00 013A 2000 00192 ADDWFC r0x02, W 013C 6E00 00193 MOVWF r0x0e 013E 0E00 00194 MOVLW 0x00 0140 6EE5 00195 MOVWF POSTDEC1 0142 0E00 00196 MOVLW 0x00 0144 6EF4 00197 MOVWF PRODH 0146 C000 FFE9 00198 MOVFF r0x0c, FSR0L 014A C000 FFF3 00199 MOVFF r0x0d, PRODL 014E 5000 00200 MOVF r0x0e, W 0150 EC00 F000 00201 CALL __gptrput2 0154 00202 _00108_DS_: 00203 ; .line 29; rxcheck.c rx->buff[rx->position]=newbyte; 0154 5000 00204 MOVF r0x00, W 0156 0F11 00205 ADDLW 0x11 0158 6E00 00206 MOVWF r0x0c 015A 0E00 00207 MOVLW 0x00 015C 2000 00208 ADDWFC r0x01, W 015E 6E00 00209 MOVWF r0x0d 0160 0E00 00210 MOVLW 0x00 0162 2000 00211 ADDWFC r0x02, W 0164 6E00 00212 MOVWF r0x0e 0166 5000 00213 MOVF r0x0a, W 0168 2400 00214 ADDWF r0x0c, W 016A 6E00 00215 MOVWF r0x0f 016C 5000 00216 MOVF r0x0b, W gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 5 LOC OBJECT CODE LINE SOURCE TEXT VALUE 016E 2000 00217 ADDWFC r0x0d, W 0170 6E00 00218 MOVWF r0x10 0172 6AE8 00219 CLRF WREG 0174 BE00 00220 BTFSC r0x0b, 7 0176 68E8 00221 SETF WREG 0178 2000 00222 ADDWFC r0x0e, W 017A 6E00 00223 MOVWF r0x11 017C C000 FFE5 00224 MOVFF r0x06, POSTDEC1 0180 C000 FFE9 00225 MOVFF r0x0f, FSR0L 0184 C000 FFF3 00226 MOVFF r0x10, PRODL 0188 5000 00227 MOVF r0x11, W 018A EC00 F000 00228 CALL __gptrput1 00229 ; .line 30; rxcheck.c rx->position=rx->position+1; 018E 2A00 00230 INCF r0x0a, F 0190 B0D8 00231 BTFSC STATUS, 0 0192 2A00 00232 INCF r0x0b, F 0194 C000 FFE5 00233 MOVFF r0x0a, POSTDEC1 0198 C000 FFF4 00234 MOVFF r0x0b, PRODH 019C C000 FFE9 00235 MOVFF r0x07, FSR0L 01A0 C000 FFF3 00236 MOVFF r0x08, PRODL 01A4 5000 00237 MOVF r0x09, W 01A6 EC00 F000 00238 CALL __gptrput2 00239 ; .line 31; rxcheck.c if(rx->position<7+rx->length) 01AA C000 FFE9 00240 MOVFF r0x07, FSR0L 01AE C000 FFF3 00241 MOVFF r0x08, PRODL 01B2 5000 00242 MOVF r0x09, W 01B4 EC00 F000 00243 CALL __gptrget2 01B8 6E00 00244 MOVWF r0x0f 01BA CFF3 F000 00245 MOVFF PRODL, r0x10 01BE 5000 00246 MOVF r0x00, W 01C0 0F0B 00247 ADDLW 0x0b 01C2 6E00 00248 MOVWF r0x11 01C4 0E00 00249 MOVLW 0x00 01C6 2000 00250 ADDWFC r0x01, W 01C8 6E00 00251 MOVWF r0x12 01CA 0E00 00252 MOVLW 0x00 01CC 2000 00253 ADDWFC r0x02, W 01CE 6E00 00254 MOVWF r0x13 01D0 C000 FFE9 00255 MOVFF r0x11, FSR0L 01D4 C000 FFF3 00256 MOVFF r0x12, PRODL 01D8 5000 00257 MOVF r0x13, W 01DA EC00 F000 00258 CALL __gptrget2 01DE 6E00 00259 MOVWF r0x14 01E0 CFF3 F000 00260 MOVFF PRODL, r0x15 01E4 0E07 00261 MOVLW 0x07 01E6 2600 00262 ADDWF r0x14, F 01E8 B0D8 00263 BTFSC STATUS, 0 01EA 2A00 00264 INCF r0x15, F 01EC 5000 00265 MOVF r0x0b, W 01EE 0F80 00266 ADDLW 0x80 01F0 6EF3 00267 MOVWF PRODL 01F2 5000 00268 MOVF r0x15, W 01F4 0F80 00269 ADDLW 0x80 01F6 5CF3 00270 SUBWF PRODL, W gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 6 LOC OBJECT CODE LINE SOURCE TEXT VALUE 01F8 E100 00271 BNZ _00142_DS_ 01FA 5000 00272 MOVF r0x14, W 01FC 5C00 00273 SUBWF r0x0a, W 01FE 00274 _00142_DS_: 01FE E200 00275 BC _00110_DS_ 00276 ; .line 33; rxcheck.c rx->checksum += newbyte; 0200 C000 FFE9 00277 MOVFF r0x00, FSR0L 0204 C000 FFF3 00278 MOVFF r0x01, PRODL 0208 5000 00279 MOVF r0x02, W 020A EC00 F000 00280 CALL __gptrget1 020E 6E00 00281 MOVWF r0x0a 0210 5000 00282 MOVF r0x06, W 0212 2600 00283 ADDWF r0x0a, F 0214 C000 FFE5 00284 MOVFF r0x0a, POSTDEC1 0218 C000 FFE9 00285 MOVFF r0x00, FSR0L 021C C000 FFF3 00286 MOVFF r0x01, PRODL 0220 5000 00287 MOVF r0x02, W 0222 EC00 F000 00288 CALL __gptrput1 0226 00289 _00110_DS_: 00290 ; .line 38; rxcheck.c if(rx->position<6) 0226 5000 00291 MOVF r0x10, W 0228 0F80 00292 ADDLW 0x80 022A 0F80 00293 ADDLW 0x80 022C E100 00294 BNZ _00143_DS_ 022E 0E06 00295 MOVLW 0x06 0230 5C00 00296 SUBWF r0x0f, W 0232 00297 _00143_DS_: 0232 E200 00298 BC _00112_DS_ 00299 ; .line 40; rxcheck.c return 1; 0234 6AF3 00300 CLRF PRODL 0236 0E01 00301 MOVLW 0x01 0238 D000 00302 BRA _00127_DS_ 023A 00303 _00112_DS_: 00304 ; .line 43; rxcheck.c if(rx->position==6) 023A 5000 00305 MOVF r0x0f, W 023C 0A06 00306 XORLW 0x06 023E E100 00307 BNZ _00144_DS_ 0240 5000 00308 MOVF r0x10, W 0242 E000 00309 BZ _00145_DS_ 0244 00310 _00144_DS_: 0244 D000 00311 BRA _00116_DS_ 0246 00312 _00145_DS_: 00313 ; .line 45; rxcheck.c rx->length = (int) newbyte; 0246 C000 F000 00314 MOVFF r0x06, r0x0a 024A 6A00 00315 CLRF r0x0b 024C C000 FFE5 00316 MOVFF r0x0a, POSTDEC1 0250 C000 FFF4 00317 MOVFF r0x0b, PRODH 0254 C000 FFE9 00318 MOVFF r0x11, FSR0L 0258 C000 FFF3 00319 MOVFF r0x12, PRODL 025C 5000 00320 MOVF r0x13, W 025E EC00 F000 00321 CALL __gptrput2 00322 ; .line 49; rxcheck.c if(rx->length > 8) 0262 5000 00323 MOVF r0x0b, W 0264 0F80 00324 ADDLW 0x80 gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 7 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0266 0F80 00325 ADDLW 0x80 0268 E100 00326 BNZ _00146_DS_ 026A 0E09 00327 MOVLW 0x09 026C 5C00 00328 SUBWF r0x0a, W 026E 00329 _00146_DS_: 026E E300 00330 BNC _00116_DS_ 00331 ; .line 51; rxcheck.c rx->sync_errors += 1; 0270 5000 00332 MOVF r0x00, W 0272 0F03 00333 ADDLW 0x03 0274 6E00 00334 MOVWF r0x0a 0276 0E00 00335 MOVLW 0x00 0278 2000 00336 ADDWFC r0x01, W 027A 6E00 00337 MOVWF r0x0b 027C 0E00 00338 MOVLW 0x00 027E 2000 00339 ADDWFC r0x02, W 0280 6E00 00340 MOVWF r0x14 0282 C000 FFE9 00341 MOVFF r0x0a, FSR0L 0286 C000 FFF3 00342 MOVFF r0x0b, PRODL 028A 5000 00343 MOVF r0x14, W 028C EC00 F000 00344 CALL __gptrget2 0290 6E00 00345 MOVWF r0x15 0292 CFF3 F000 00346 MOVFF PRODL, r0x16 0296 2A00 00347 INCF r0x15, F 0298 B0D8 00348 BTFSC STATUS, 0 029A 2A00 00349 INCF r0x16, F 029C C000 FFE5 00350 MOVFF r0x15, POSTDEC1 02A0 C000 FFF4 00351 MOVFF r0x16, PRODH 02A4 C000 FFE9 00352 MOVFF r0x0a, FSR0L 02A8 C000 FFF3 00353 MOVFF r0x0b, PRODL 02AC 5000 00354 MOVF r0x14, W 02AE EC00 F000 00355 CALL __gptrput2 00356 ; .line 52; rxcheck.c goto ERROR; 02B2 D000 00357 BRA _00122_DS_ 02B4 00358 _00116_DS_: 00359 ; .line 56; rxcheck.c if(rx->position<=(6+rx->length)) 02B4 C000 FFE9 00360 MOVFF r0x11, FSR0L 02B8 C000 FFF3 00361 MOVFF r0x12, PRODL 02BC 5000 00362 MOVF r0x13, W 02BE EC00 F000 00363 CALL __gptrget2 02C2 6E00 00364 MOVWF r0x11 02C4 CFF3 F000 00365 MOVFF PRODL, r0x12 02C8 0E06 00366 MOVLW 0x06 02CA 2600 00367 ADDWF r0x11, F 02CC B0D8 00368 BTFSC STATUS, 0 02CE 2A00 00369 INCF r0x12, F 02D0 5000 00370 MOVF r0x12, W 02D2 0F80 00371 ADDLW 0x80 02D4 6EF3 00372 MOVWF PRODL 02D6 5000 00373 MOVF r0x10, W 02D8 0F80 00374 ADDLW 0x80 02DA 5CF3 00375 SUBWF PRODL, W 02DC E100 00376 BNZ _00147_DS_ 02DE 5000 00377 MOVF r0x0f, W 02E0 5C00 00378 SUBWF r0x11, W gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 8 LOC OBJECT CODE LINE SOURCE TEXT VALUE 02E2 00379 _00147_DS_: 02E2 E300 00380 BNC _00118_DS_ 00381 ; .line 58; rxcheck.c return 1; 02E4 6AF3 00382 CLRF PRODL 02E6 0E01 00383 MOVLW 0x01 02E8 D000 00384 BRA _00127_DS_ 02EA 00385 _00118_DS_: 00386 ; .line 62; rxcheck.c if(rx->checksum == newbyte) 02EA C000 FFE9 00387 MOVFF r0x00, FSR0L 02EE C000 FFF3 00388 MOVFF r0x01, PRODL 02F2 5000 00389 MOVF r0x02, W 02F4 EC00 F000 00390 CALL __gptrget1 02F8 6E00 00391 MOVWF r0x0a 02FA 5000 00392 MOVF r0x0a, W 02FC 1800 00393 XORWF r0x06, W 02FE E100 00394 BNZ _00120_DS_ 00395 ; .line 65; rxcheck.c rx->completemsg += rx->position; 0300 5000 00396 MOVF r0x00, W 0302 0F01 00397 ADDLW 0x01 0304 6E00 00398 MOVWF r0x06 0306 0E00 00399 MOVLW 0x00 0308 2000 00400 ADDWFC r0x01, W 030A 6E00 00401 MOVWF r0x0a 030C 0E00 00402 MOVLW 0x00 030E 2000 00403 ADDWFC r0x02, W 0310 6E00 00404 MOVWF r0x0b 0312 C000 FFE9 00405 MOVFF r0x06, FSR0L 0316 C000 FFF3 00406 MOVFF r0x0a, PRODL 031A 5000 00407 MOVF r0x0b, W 031C EC00 F000 00408 CALL __gptrget2 0320 6E00 00409 MOVWF r0x11 0322 CFF3 F000 00410 MOVFF PRODL, r0x12 0326 5000 00411 MOVF r0x0f, W 0328 2600 00412 ADDWF r0x11, F 032A 5000 00413 MOVF r0x10, W 032C 2200 00414 ADDWFC r0x12, F 032E C000 FFE5 00415 MOVFF r0x11, POSTDEC1 0332 C000 FFF4 00416 MOVFF r0x12, PRODH 0336 C000 FFE9 00417 MOVFF r0x06, FSR0L 033A C000 FFF3 00418 MOVFF r0x0a, PRODL 033E 5000 00419 MOVF r0x0b, W 0340 EC00 F000 00420 CALL __gptrput2 00421 ; .line 66; rxcheck.c rx->position = 0; 0344 0E00 00422 MOVLW 0x00 0346 6EE5 00423 MOVWF POSTDEC1 0348 0E00 00424 MOVLW 0x00 034A 6EF4 00425 MOVWF PRODH 034C C000 FFE9 00426 MOVFF r0x07, FSR0L 0350 C000 FFF3 00427 MOVFF r0x08, PRODL 0354 5000 00428 MOVF r0x09, W 0356 EC00 F000 00429 CALL __gptrput2 00430 ; .line 74; rxcheck.c return 2; 035A 6AF3 00431 CLRF PRODL 035C 0E02 00432 MOVLW 0x02 gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 9 LOC OBJECT CODE LINE SOURCE TEXT VALUE 035E D000 00433 BRA _00127_DS_ 0360 00434 _00120_DS_: 00435 ; .line 78; rxcheck.c rx->checksum_errors += 1; 0360 0E07 00436 MOVLW 0x07 0362 2600 00437 ADDWF r0x00, F 0364 0E00 00438 MOVLW 0x00 0366 2200 00439 ADDWFC r0x01, F 0368 0E00 00440 MOVLW 0x00 036A 2200 00441 ADDWFC r0x02, F 036C C000 FFE9 00442 MOVFF r0x00, FSR0L 0370 C000 FFF3 00443 MOVFF r0x01, PRODL 0374 5000 00444 MOVF r0x02, W 0376 EC00 F000 00445 CALL __gptrget2 037A 6E00 00446 MOVWF r0x06 037C CFF3 F000 00447 MOVFF PRODL, r0x0a 0380 2A00 00448 INCF r0x06, F 0382 B0D8 00449 BTFSC STATUS, 0 0384 2A00 00450 INCF r0x0a, F 0386 C000 FFE5 00451 MOVFF r0x06, POSTDEC1 038A C000 FFF4 00452 MOVFF r0x0a, PRODH 038E C000 FFE9 00453 MOVFF r0x00, FSR0L 0392 C000 FFF3 00454 MOVFF r0x01, PRODL 0396 5000 00455 MOVF r0x02, W 0398 EC00 F000 00456 CALL __gptrput2 039C 00457 _00122_DS_: 00458 ; .line 83; rxcheck.c for(i=rx->position-1;i>0;i--) 039C 5000 00459 MOVF r0x0f, W 039E 0FFF 00460 ADDLW 0xff 03A0 6E00 00461 MOVWF r0x00 03A2 0EFF 00462 MOVLW 0xff 03A4 2000 00463 ADDWFC r0x10, W 03A6 6E00 00464 MOVWF r0x01 03A8 00465 _00123_DS_: 03A8 5000 00466 MOVF r0x01, W 03AA 0F80 00467 ADDLW 0x80 03AC 0F80 00468 ADDLW 0x80 03AE E100 00469 BNZ _00150_DS_ 03B0 0E01 00470 MOVLW 0x01 03B2 5C00 00471 SUBWF r0x00, W 03B4 00472 _00150_DS_: 03B4 E300 00473 BNC _00126_DS_ 00474 ; .line 85; rxcheck.c addfirstbuff(rxbuff,rx->buff[i]); 03B6 5000 00475 MOVF r0x00, W 03B8 2400 00476 ADDWF r0x0c, W 03BA 6E00 00477 MOVWF r0x02 03BC 5000 00478 MOVF r0x01, W 03BE 2000 00479 ADDWFC r0x0d, W 03C0 6E00 00480 MOVWF r0x06 03C2 6AE8 00481 CLRF WREG 03C4 BE00 00482 BTFSC r0x01, 7 03C6 68E8 00483 SETF WREG 03C8 2000 00484 ADDWFC r0x0e, W 03CA 6E00 00485 MOVWF r0x0a 03CC C000 FFE9 00486 MOVFF r0x02, FSR0L gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 10 LOC OBJECT CODE LINE SOURCE TEXT VALUE 03D0 C000 FFF3 00487 MOVFF r0x06, PRODL 03D4 5000 00488 MOVF r0x0a, W 03D6 EC00 F000 00489 CALL __gptrget1 03DA 6E00 00490 MOVWF r0x02 03DC 5000 00491 MOVF r0x02, W 03DE 6EE5 00492 MOVWF POSTDEC1 03E0 5000 00493 MOVF r0x05, W 03E2 6EE5 00494 MOVWF POSTDEC1 03E4 5000 00495 MOVF r0x04, W 03E6 6EE5 00496 MOVWF POSTDEC1 03E8 5000 00497 MOVF r0x03, W 03EA 6EE5 00498 MOVWF POSTDEC1 03EC EC00 F000 00499 CALL _addfirstbuff 03F0 0E04 00500 MOVLW 0x04 03F2 26E1 00501 ADDWF FSR1L, F 00502 ; .line 83; rxcheck.c for(i=rx->position-1;i>0;i--) 03F4 0EFF 00503 MOVLW 0xff 03F6 2600 00504 ADDWF r0x00, F 03F8 A0D8 00505 BTFSS STATUS, 0 03FA 0600 00506 DECF r0x01, F 03FC D000 00507 BRA _00123_DS_ 03FE 00508 _00126_DS_: 00509 ; .line 87; rxcheck.c rx->position = 0; 03FE 0E00 00510 MOVLW 0x00 0400 6EE5 00511 MOVWF POSTDEC1 0402 0E00 00512 MOVLW 0x00 0404 6EF4 00513 MOVWF PRODH 0406 C000 FFE9 00514 MOVFF r0x07, FSR0L 040A C000 FFF3 00515 MOVFF r0x08, PRODL 040E 5000 00516 MOVF r0x09, W 0410 EC00 F000 00517 CALL __gptrput2 00518 ; .line 88; rxcheck.c return 0; 0414 6AF3 00519 CLRF PRODL 0416 6AE8 00520 CLRF WREG 0418 00521 _00127_DS_: 0418 CFE4 F000 00522 MOVFF PREINC1, r0x16 041C CFE4 F000 00523 MOVFF PREINC1, r0x15 0420 CFE4 F000 00524 MOVFF PREINC1, r0x14 0424 CFE4 F000 00525 MOVFF PREINC1, r0x13 0428 CFE4 F000 00526 MOVFF PREINC1, r0x12 042C CFE4 F000 00527 MOVFF PREINC1, r0x11 0430 CFE4 F000 00528 MOVFF PREINC1, r0x10 0434 CFE4 F000 00529 MOVFF PREINC1, r0x0f 0438 CFE4 F000 00530 MOVFF PREINC1, r0x0e 043C CFE4 F000 00531 MOVFF PREINC1, r0x0d 0440 CFE4 F000 00532 MOVFF PREINC1, r0x0c 0444 CFE4 F000 00533 MOVFF PREINC1, r0x0b 0448 CFE4 F000 00534 MOVFF PREINC1, r0x0a 044C CFE4 F000 00535 MOVFF PREINC1, r0x09 0450 CFE4 F000 00536 MOVFF PREINC1, r0x08 0454 CFE4 F000 00537 MOVFF PREINC1, r0x07 0458 CFE4 F000 00538 MOVFF PREINC1, r0x06 045C CFE4 F000 00539 MOVFF PREINC1, r0x05 0460 CFE4 F000 00540 MOVFF PREINC1, r0x04 gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 11 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0464 CFE4 F000 00541 MOVFF PREINC1, r0x03 0468 CFE4 F000 00542 MOVFF PREINC1, r0x02 046C CFE4 F000 00543 MOVFF PREINC1, r0x01 0470 CFE4 F000 00544 MOVFF PREINC1, r0x00 0474 CFE4 FFD9 00545 MOVFF PREINC1, FSR2L 0478 0012 00546 RETURN 00547 00548 00549 00550 ; Statistics: 00551 ; code size: 1146 (0x047a) bytes ( 0.87%) 00552 ; 573 (0x023d) words 00553 ; udata size: 0 (0x0000) bytes ( 0.00%) 00554 ; access size: 23 (0x0017) bytes 00555 00556 gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 12 SYMBOL TABLE LABEL VALUE FSR0L 00000FE9 FSR1L 00000FE1 FSR2L 00000FD9 PLUSW2 00000FDB POSTDEC1 00000FE5 PREINC1 00000FE4 PRODH 00000FF4 PRODL 00000FF3 STATUS 00000FD8 WREG 00000FE8 _00106_DS_ 0000011A _00108_DS_ 00000154 _00110_DS_ 00000226 _00112_DS_ 0000023A _00116_DS_ 000002B4 _00118_DS_ 000002EA _00120_DS_ 00000360 _00122_DS_ 0000039C _00123_DS_ 000003A8 _00126_DS_ 000003FE _00127_DS_ 00000418 _00142_DS_ 000001FE _00143_DS_ 00000232 _00144_DS_ 00000244 _00145_DS_ 00000246 _00146_DS_ 0000026E _00147_DS_ 000002E2 _00150_DS_ 000003B4 __18F2680 00000001 __gptrget1 00000000 __gptrget2 00000000 __gptrput1 00000000 __gptrput2 00000000 _addfirstbuff 00000000 _next 00000000 _rxchecker 00000000 r0x00 00000000 r0x01 00000001 r0x02 00000002 r0x03 00000003 r0x04 00000004 r0x05 00000005 r0x06 00000006 r0x07 00000007 r0x08 00000008 r0x09 00000009 r0x0a 0000000A r0x0b 0000000B r0x0c 0000000C r0x0d 0000000D r0x0e 0000000E r0x0f 0000000F r0x10 00000010 gpasm-0.13.7 beta rxcheck.asm 11-9-2010 17:48:18 PAGE 13 LOC OBJECT CODE LINE SOURCE TEXT VALUE r0x11 00000011 r0x12 00000012 r0x13 00000013 r0x14 00000014 r0x15 00000015 r0x16 00000016 Errors : 0 Warnings : 0 reported, 0 suppressed Messages : 0 reported, 0 suppressed