1 radix dec 2 ; Code bank 0; Start address: 0; End address: 2047 3 0000 : org 0 4 5 ; Define start addresses for data regions 6 00000070 = shared___globals equ 112 7 00000020 = globals___0 equ 32 8 000000a0 = globals___1 equ 160 9 00000110 = globals___2 equ 272 10 00000190 = globals___3 equ 400 11 00000000 = __indf equ 0 12 00000002 = __pcl equ 2 13 00000003 = __status equ 3 14 00000004 = __fsr equ 4 15 00000003 = __c___byte equ 3 16 00000000 = __c___bit equ 0 17 00000003 = __z___byte equ 3 18 00000002 = __z___bit equ 2 19 00000003 = __rp0___byte equ 3 20 00000005 = __rp0___bit equ 5 21 00000003 = __rp1___byte equ 3 22 00000006 = __rp1___bit equ 6 23 00000003 = __irp___byte equ 3 24 00000007 = __irp___bit equ 7 25 0000000a = __pclath equ 10 26 0000000a = __cb0___byte equ 10 27 00000003 = __cb0___bit equ 3 28 0000000a = __cb1___byte equ 10 29 00000004 = __cb1___bit equ 4 30 31 ; # Copyright (c) 2006 by Wayne C. Gramlich. 32 ; # All rights reserved. 33 34 ; # This is a boot loader that resides in high memory for 35 ; # loading programs into low memory. 36 37 ; #library _pic16f767 38 ; buffer = 'controller28' 39 ; line_number = 10 40 ; library _pic16f876 entered 41 42 ; # Copyright (c) 2004-2007 by Wayne C. Gramlich 43 ; # All rights reserved. 44 45 ; buffer = '_pic16f876' 46 ; line_number = 6 47 ; processor pic16f876 48 ; line_number = 7 49 ; configure_address 0x2007 50 ; line_number = 8 51 ; configure_fill 0x0400 52 ; line_number = 9 53 ; configure_option cp: off = 0x3030 54 ; line_number = 10 55 ; configure_option cp: quarter = 0x2020 56 ; line_number = 11 57 ; configure_option cp: half = 0x1010 58 ; line_number = 12 59 ; configure_option cp: on = 0x0000 60 ; line_number = 13 61 ; configure_option debug: on = 0x000 62 ; line_number = 14 63 ; configure_option debug: off = 0x800 64 ; line_number = 15 65 ; configure_option wrt: on = 0x200 66 ; line_number = 16 67 ; configure_option wrt: off = 0x000 68 ; line_number = 17 69 ; configure_option cpd: on = 0x000 70 ; line_number = 18 71 ; configure_option cpd: off = 0x100 72 ; line_number = 19 73 ; configure_option lvp: on = 0x80 74 ; line_number = 20 75 ; configure_option lvp: off = 0x00 76 ; line_number = 21 77 ; configure_option boden: on = 0x40 78 ; line_number = 22 79 ; configure_option boden: off = 0x00 80 ; line_number = 23 81 ; configure_option pwrte: on = 0 82 ; line_number = 24 83 ; configure_option pwrte: off = 8 84 ; line_number = 25 85 ; configure_option wdte: on = 4 86 ; line_number = 26 87 ; configure_option wdte: off = 0 88 ; line_number = 27 89 ; configure_option fosc: rc = 3 90 ; line_number = 28 91 ; configure_option fosc: hs = 2 92 ; line_number = 29 93 ; configure_option fosc: xt = 1 94 ; line_number = 30 95 ; configure_option fosc: lp = 0 96 ; line_number = 31 97 ; code_bank 0x0 : 0x7ff 98 ; line_number = 32 99 ; code_bank 0x800 : 0xfff 100 ; line_number = 33 101 ; code_bank 0x1000 : 0x17ff 102 ; line_number = 34 103 ; code_bank 0x1800 : 0x1fff 104 ; line_number = 35 105 ; data_bank 0x0 : 0x7f 106 ; line_number = 36 107 ; data_bank 0x80 : 0xff 108 ; line_number = 37 109 ; data_bank 0x100 : 0x17f 110 ; line_number = 38 111 ; data_bank 0x180 : 0x1ff 112 ; line_number = 39 113 ; global_region 0x20 : 0x6f 114 ; line_number = 40 115 ; global_region 0xa0 : 0xef 116 ; line_number = 41 117 ; global_region 0x110 : 0x16f 118 ; line_number = 42 119 ; global_region 0x190 : 0x1ff 120 ; line_number = 43 121 ; shared_region 0x70 : 0x7f 122 ; line_number = 44 123 ; interrupts_possible 124 ; line_number = 45 125 ; packages pdip = 28 126 ; line_number = 46 127 ; pin mclr, vpp, thv, mclr_unused 128 ; line_number = 47 129 ; pin_bindings pdip = 1 130 ; line_number = 48 131 ; pin ra0_in, ra0_out, an0, ra0_unused 132 ; line_number = 49 133 ; pin_bindings pdip = 2 134 ; line_number = 50 135 ; bind_to _porta@0 136 ; line_number = 51 137 ; or_if ra0_in _trisa 1 138 ; line_number = 52 139 ; or_if ra0_in _adcon1 7 140 ; line_number = 53 141 ; or_if ra0_in _adcon0 0 142 ; line_number = 54 143 ; or_if ra0_in _cmcon 7 144 ; line_number = 55 145 ; or_if ra0_out _trisa 0 146 ; line_number = 56 147 ; or_if ra0_out _adcon1 7 148 ; line_number = 57 149 ; or_if ra0_out _adcon0 0 150 ; line_number = 58 151 ; or_if ra0_out _cmcon 7 152 ; line_number = 59 153 ; or_if ra0_unused _trisa 1 154 ; line_number = 60 155 ; or_if ra0_unused _adcon1 7 156 ; line_number = 61 157 ; or_if ra0_unused _adcon0 0 158 ; line_number = 62 159 ; or_if ra0_unused _cmcon 7 160 ; line_number = 63 161 ; pin ra1_in, ra1_out, an1, ra1_unused 162 ; line_number = 64 163 ; pin_bindings pdip = 3 164 ; line_number = 65 165 ; bind_to _porta@1 166 ; line_number = 66 167 ; or_if ra1_in _trisa 2 168 ; line_number = 67 169 ; or_if ra1_in _adcon1 7 170 ; line_number = 68 171 ; or_if ra1_in _adcon0 0 172 ; line_number = 69 173 ; or_if ra1_in _cmcon 7 174 ; line_number = 70 175 ; or_if ra1_out _trisa 0 176 ; line_number = 71 177 ; or_if ra1_out _adcon1 7 178 ; line_number = 72 179 ; or_if ra1_out _adcon0 0 180 ; line_number = 73 181 ; or_if ra1_out _cmcon 7 182 ; line_number = 74 183 ; or_if ra1_unused _trisa 2 184 ; line_number = 75 185 ; or_if ra1_unused _adcon1 7 186 ; line_number = 76 187 ; or_if ra1_unused _adcon0 0 188 ; line_number = 77 189 ; or_if ra1_unused _cmcon 7 190 ; line_number = 78 191 ; pin ra2_in, ra2_out, an2, vref_minus, ra2_unused 192 ; line_number = 79 193 ; pin_bindings pdip = 4 194 ; line_number = 80 195 ; bind_to _porta@2 196 ; line_number = 81 197 ; or_if ra2_in _trisa 4 198 ; line_number = 82 199 ; or_if ra2_in _adcon1 7 200 ; line_number = 83 201 ; or_if ra2_in _adcon0 0 202 ; line_number = 84 203 ; or_if ra2_in _cmcon 7 204 ; line_number = 85 205 ; or_if ra2_out _trisa 0 206 ; line_number = 86 207 ; or_if ra2_out _adcon1 7 208 ; line_number = 87 209 ; or_if ra2_out _adcon0 0 210 ; line_number = 88 211 ; or_if ra2_out _cmcon 7 212 ; line_number = 89 213 ; or_if ra2_unused _trisa 4 214 ; line_number = 90 215 ; or_if ra2_unused _adcon1 7 216 ; line_number = 91 217 ; or_if ra2_unused _adcon0 0 218 ; line_number = 92 219 ; or_if ra2_unused _cmcon 7 220 ; line_number = 93 221 ; pin ra3_in, ra3_out, an3, vrev_plus, ra3_unused 222 ; line_number = 94 223 ; pin_bindings pdip = 5 224 ; line_number = 95 225 ; bind_to _porta@3 226 ; line_number = 96 227 ; or_if ra3_in _trisa 8 228 ; line_number = 97 229 ; or_if ra3_in _adcon1 7 230 ; line_number = 98 231 ; or_if ra3_in _adcon0 0 232 ; line_number = 99 233 ; or_if ra3_in _cmcon 7 234 ; line_number = 100 235 ; or_if ra3_out _trisa 0 236 ; line_number = 101 237 ; or_if ra3_out _adcon1 7 238 ; line_number = 102 239 ; or_if ra3_out _adcon0 0 240 ; line_number = 103 241 ; or_if ra3_out _cmcon 7 242 ; line_number = 104 243 ; or_if ra3_unused _trisa 8 244 ; line_number = 105 245 ; or_if ra3_unused _adcon1 7 246 ; line_number = 106 247 ; or_if ra3_unused _adcon0 0 248 ; line_number = 107 249 ; or_if ra3_unused _cmcon 7 250 ; line_number = 108 251 ; pin ra4_in, ra4_out, t0cki, ra4_unused 252 ; line_number = 109 253 ; pin_bindings pdip = 6 254 ; line_number = 110 255 ; bind_to _porta@4 256 ; line_number = 111 257 ; or_if ra4_in _trisa 16 258 ; line_number = 112 259 ; or_if ra4_in _adcon1 7 260 ; line_number = 113 261 ; or_if ra4_in _adcon0 0 262 ; line_number = 114 263 ; or_if ra4_out _trisa 0 264 ; line_number = 115 265 ; or_if ra4_out _adcon1 7 266 ; line_number = 116 267 ; or_if ra4_out _adcon0 0 268 ; line_number = 117 269 ; or_if ra4_unused _trisa 16 270 ; line_number = 118 271 ; or_if ra4_unused _adcon1 7 272 ; line_number = 119 273 ; or_if ra4_unused _adcon0 0 274 ; line_number = 120 275 ; pin ra5_in, ra5_out, an4, ra5_unused 276 ; line_number = 121 277 ; pin_bindings pdip = 7 278 ; line_number = 122 279 ; bind_to _porta@5 280 ; line_number = 123 281 ; or_if ra5_in _trisa 32 282 ; line_number = 124 283 ; or_if ra5_in _adcon1 7 284 ; line_number = 125 285 ; or_if ra5_in _adcon1 0 286 ; line_number = 126 287 ; or_if ra5_out _trisa 0 288 ; line_number = 127 289 ; or_if ra5_out _adcon1 7 290 ; line_number = 128 291 ; or_if ra5_out _adcon0 0 292 ; line_number = 129 293 ; or_if ra5_unused _trisa 32 294 ; line_number = 130 295 ; or_if ra5_unused _adcon1 7 296 ; line_number = 131 297 ; or_if ra5_unused _adcon1 0 298 ; line_number = 132 299 ; pin vss, ground 300 ; line_number = 133 301 ; pin_bindings pdip = 8 302 ; line_number = 134 303 ; pin osc1, clkin 304 ; line_number = 135 305 ; pin_bindings pdip = 9 306 ; line_number = 136 307 ; pin osc2, clkout 308 ; line_number = 137 309 ; pin_bindings pdip = 10 310 ; line_number = 138 311 ; pin rc0_in, rc0_out, t1oso, t1cki, rc0_unused 312 ; line_number = 139 313 ; pin_bindings pdip = 11 314 ; line_number = 140 315 ; bind_to _portc@0 316 ; line_number = 141 317 ; or_if rc0_in _trisc 1 318 ; line_number = 142 319 ; or_if rc0_in _adcon1 7 320 ; line_number = 143 321 ; or_if rc0_in _adcon0 0 322 ; line_number = 144 323 ; or_if rc0_out _trisc 0 324 ; line_number = 145 325 ; or_if rc0_out _adcon1 7 326 ; line_number = 146 327 ; or_if rc0_out _adcon0 0 328 ; line_number = 147 329 ; or_if rc0_unused _trisc 1 330 ; line_number = 148 331 ; or_if rc0_unused _adcon1 7 332 ; line_number = 149 333 ; or_if rc0_unused _adcon0 0 334 ; line_number = 150 335 ; pin rc1_in, rc1_out, t1osi, ccp2, rc1_unused 336 ; line_number = 151 337 ; pin_bindings pdip = 12 338 ; line_number = 152 339 ; bind_to _portc@1 340 ; line_number = 153 341 ; or_if rc1_in _trisc 2 342 ; line_number = 154 343 ; or_if rc1_in _adcon1 7 344 ; line_number = 155 345 ; or_if rc1_in _adcon0 0 346 ; line_number = 156 347 ; or_if rc1_out _trisc 0 348 ; line_number = 157 349 ; or_if rc1_out _adcon1 7 350 ; line_number = 158 351 ; or_if rc1_out _adcon0 0 352 ; line_number = 159 353 ; or_if rc1_unused _trisc 2 354 ; line_number = 160 355 ; or_if rc1_unused _adcon1 7 356 ; line_number = 161 357 ; or_if rc1_unused _adcon0 0 358 ; line_number = 162 359 ; pin rc2_in, rc2_out, ccp1, rc2_unused 360 ; line_number = 163 361 ; pin_bindings pdip = 13 362 ; line_number = 164 363 ; bind_to _portc@2 364 ; line_number = 165 365 ; or_if rc2_in _trisc 4 366 ; line_number = 166 367 ; or_if rc2_in _adcon1 7 368 ; line_number = 167 369 ; or_if rc2_in _adcon0 0 370 ; line_number = 168 371 ; or_if rc2_out _trisc 0 372 ; line_number = 169 373 ; or_if rc2_out _adcon1 7 374 ; line_number = 170 375 ; or_if rc2_out _adcon0 0 376 ; line_number = 171 377 ; or_if rc2_unused _trisc 4 378 ; line_number = 172 379 ; or_if rc2_unused _adcon1 7 380 ; line_number = 173 381 ; or_if rc2_unused _adcon0 0 382 ; line_number = 174 383 ; pin rc3_in, rc3_out, sck_master, sck_slave, scl, rc3_unused 384 ; line_number = 175 385 ; pin_bindings pdip = 14 386 ; line_number = 176 387 ; bind_to _portc@3 388 ; line_number = 177 389 ; or_if rc3_in _trisc 8 390 ; line_number = 178 391 ; or_if rc3_in _adcon1 7 392 ; line_number = 179 393 ; or_if rc3_in _adcon0 0 394 ; line_number = 180 395 ; or_if rc3_out _trisc 0 396 ; line_number = 181 397 ; or_if rc3_out _adcon1 7 398 ; line_number = 182 399 ; or_if rc3_out _adcon0 0 400 ; line_number = 183 401 ; or_if sck_slave _trisc 8 402 ; line_number = 184 403 ; or_if sck_slave _adcon1 7 404 ; line_number = 185 405 ; or_if sck_slave _adcon0 0 406 ; line_number = 186 407 ; or_if sck_master _trisc 0 408 ; line_number = 187 409 ; or_if sck_master _adcon1 7 410 ; line_number = 188 411 ; or_if sck_master _adcon0 0 412 ; line_number = 189 413 ; or_if rc3_unused _trisc 8 414 ; line_number = 190 415 ; or_if rc3_unused _adcon1 7 416 ; line_number = 191 417 ; or_if rc3_unused _adcon0 0 418 ; line_number = 192 419 ; pin rc4_in, rc4_out, sdi, sda, rc4_unused 420 ; line_number = 193 421 ; pin_bindings pdip = 15 422 ; line_number = 194 423 ; bind_to _portc@4 424 ; line_number = 195 425 ; or_if rc4_in _trisc 16 426 ; line_number = 196 427 ; or_if rc4_in _adcon1 7 428 ; line_number = 197 429 ; or_if rc4_in _adcon0 0 430 ; line_number = 198 431 ; or_if rc4_out _trisc 0 432 ; line_number = 199 433 ; or_if rc4_out _adcon1 7 434 ; line_number = 200 435 ; or_if rc4_out _adcon0 0 436 ; line_number = 201 437 ; or_if sdi _trisc 16 438 ; line_number = 202 439 ; or_if sdi _adcon1 7 440 ; line_number = 203 441 ; or_if sdi _adcon0 0 442 ; line_number = 204 443 ; or_if rc4_unused _trisc 16 444 ; line_number = 205 445 ; or_if rc4_unused _adcon1 7 446 ; line_number = 206 447 ; or_if rc4_unused _adcon0 0 448 ; line_number = 207 449 ; pin rc5_in, rc5_out, sdo, rc5_unused 450 ; line_number = 208 451 ; pin_bindings pdip = 16 452 ; line_number = 209 453 ; bind_to _portc@5 454 ; line_number = 210 455 ; or_if rc5_in _trisc 32 456 ; line_number = 211 457 ; or_if rc5_in _adcon1 7 458 ; line_number = 212 459 ; or_if rc5_in _adcon0 0 460 ; line_number = 213 461 ; or_if rc5_out _trisc 0 462 ; line_number = 214 463 ; or_if rc5_out _adcon1 7 464 ; line_number = 215 465 ; or_if rc5_out _adcon0 0 466 ; line_number = 216 467 ; or_if sdo _trisc 0 468 ; line_number = 217 469 ; or_if sdo _adcon1 7 470 ; line_number = 218 471 ; or_if sdo _adcon0 0 472 ; line_number = 219 473 ; or_if rc5_unused _trisc 32 474 ; line_number = 220 475 ; or_if rc5_unused _adcon1 7 476 ; line_number = 221 477 ; or_if rc5_unused _adcon0 0 478 ; line_number = 222 479 ; pin rc6_in, rc6_out, tx, ck, rc6_unused 480 ; line_number = 223 481 ; pin_bindings pdip = 17 482 ; line_number = 224 483 ; bind_to _portc@6 484 ; line_number = 225 485 ; or_if rc6_in _trisc 64 486 ; line_number = 226 487 ; or_if rc6_in _adcon1 7 488 ; line_number = 227 489 ; or_if rc6_in _adcon0 0 490 ; line_number = 228 491 ; or_if rc6_out _trisc 0 492 ; line_number = 229 493 ; or_if rc6_out _adcon1 7 494 ; line_number = 230 495 ; or_if rc6_out _adcon0 0 496 ; line_number = 231 497 ; or_if tx _trisc 0 498 ; line_number = 232 499 ; or_if tx _adcon1 7 500 ; line_number = 233 501 ; or_if tx _adcon0 0 502 ; line_number = 234 503 ; or_if rc6_unused _trisc 64 504 ; line_number = 235 505 ; or_if rc6_unused _adcon1 7 506 ; line_number = 236 507 ; or_if rc6_unused _adcon0 0 508 ; line_number = 237 509 ; pin rc7_in, rc7_out, rx, dt, rc7_unused 510 ; line_number = 238 511 ; pin_bindings pdip = 18 512 ; line_number = 239 513 ; bind_to _portc@7 514 ; line_number = 240 515 ; or_if rc7_in _trisc 128 516 ; line_number = 241 517 ; or_if rc7_in _adcon1 7 518 ; line_number = 242 519 ; or_if rc7_in _adcon0 0 520 ; line_number = 243 521 ; or_if rx _trisc 128 522 ; line_number = 244 523 ; or_if rx _adcon1 7 524 ; line_number = 245 525 ; or_if rx _adcon0 0 526 ; line_number = 246 527 ; or_if rc7_out _trisc 0 528 ; line_number = 247 529 ; or_if rc7_out _adcon1 7 530 ; line_number = 248 531 ; or_if rc7_out _adcon0 0 532 ; line_number = 249 533 ; or_if rc7_unused _trisc 128 534 ; line_number = 250 535 ; or_if rc7_unused _adcon1 7 536 ; line_number = 251 537 ; or_if rc7_unused _adcon0 0 538 ; line_number = 252 539 ; pin vss2, ground2 540 ; line_number = 253 541 ; pin_bindings pdip = 19 542 ; line_number = 254 543 ; pin vdd, power_supply 544 ; line_number = 255 545 ; pin_bindings pdip = 20 546 ; line_number = 256 547 ; pin rb0_in, rb0_out, int, rb0_unused 548 ; line_number = 257 549 ; pin_bindings pdip = 21 550 ; line_number = 258 551 ; bind_to _portb@0 552 ; line_number = 259 553 ; or_if rb0_in _trisb 1 554 ; line_number = 260 555 ; or_if rb0_in _adcon1 7 556 ; line_number = 261 557 ; or_if rb0_in _adcon0 0 558 ; line_number = 262 559 ; or_if rb0_out _trisb 0 560 ; line_number = 263 561 ; or_if rb0_out _adcon1 7 562 ; line_number = 264 563 ; or_if rb0_out _adcon0 0 564 ; line_number = 265 565 ; or_if rb0_unused _trisb 1 566 ; line_number = 266 567 ; or_if rb0_unused _adcon1 7 568 ; line_number = 267 569 ; or_if rb0_unused _adcon0 0 570 ; line_number = 268 571 ; pin rb1_in, rb1_out, rb1_unused 572 ; line_number = 269 573 ; pin_bindings pdip = 22 574 ; line_number = 270 575 ; bind_to _portb@1 576 ; line_number = 271 577 ; or_if rb1_in _trisb 2 578 ; line_number = 272 579 ; or_if rb1_in _adcon1 7 580 ; line_number = 273 581 ; or_if rb1_in _adcon0 0 582 ; line_number = 274 583 ; or_if rb1_out _trisb 0 584 ; line_number = 275 585 ; or_if rb1_out _adcon1 7 586 ; line_number = 276 587 ; or_if rb1_out _adcon0 0 588 ; line_number = 277 589 ; or_if rb1_unused _trisb 2 590 ; line_number = 278 591 ; or_if rb1_unused _adcon1 7 592 ; line_number = 279 593 ; or_if rb1_unused _adcon0 0 594 ; line_number = 280 595 ; pin rb2_in, rb2_out, rb2_unused 596 ; line_number = 281 597 ; pin_bindings pdip = 23 598 ; line_number = 282 599 ; bind_to _portb@2 600 ; line_number = 283 601 ; or_if rb2_in _trisb 4 602 ; line_number = 284 603 ; or_if rb2_in _adcon1 7 604 ; line_number = 285 605 ; or_if rb2_in _adcon0 0 606 ; line_number = 286 607 ; or_if rb2_out _trisb 0 608 ; line_number = 287 609 ; or_if rb2_out _adcon1 7 610 ; line_number = 288 611 ; or_if rb2_out _adcon0 0 612 ; line_number = 289 613 ; or_if rb2_unused _trisb 4 614 ; line_number = 290 615 ; or_if rb2_unused _adcon1 7 616 ; line_number = 291 617 ; or_if rb2_unused _adcon0 0 618 ; line_number = 292 619 ; pin rb3_in, rb3_out, pgm, rb3_unused 620 ; line_number = 293 621 ; pin_bindings pdip = 24 622 ; line_number = 294 623 ; bind_to _portb@3 624 ; line_number = 295 625 ; or_if rb3_in _trisb 8 626 ; line_number = 296 627 ; or_if rb3_in _adcon1 7 628 ; line_number = 297 629 ; or_if rb3_in _adcon0 0 630 ; line_number = 298 631 ; or_if rb3_out _trisb 0 632 ; line_number = 299 633 ; or_if rb3_out _adcon1 7 634 ; line_number = 300 635 ; or_if rb3_out _adcon0 0 636 ; line_number = 301 637 ; or_if rb3_unused _trisb 8 638 ; line_number = 302 639 ; or_if rb3_unused _adcon1 7 640 ; line_number = 303 641 ; or_if rb3_unused _adcon0 0 642 ; line_number = 304 643 ; pin rb4_in, rb4_out, rb4_unused 644 ; line_number = 305 645 ; pin_bindings pdip = 25 646 ; line_number = 306 647 ; bind_to _portb@4 648 ; line_number = 307 649 ; or_if rb4_in _trisb 16 650 ; line_number = 308 651 ; or_if rb4_in _adcon1 7 652 ; line_number = 309 653 ; or_if rb4_in _adcon0 0 654 ; line_number = 310 655 ; or_if rb4_out _trisb 0 656 ; line_number = 311 657 ; or_if rb4_out _adcon1 7 658 ; line_number = 312 659 ; or_if rb4_out _adcon0 0 660 ; line_number = 313 661 ; or_if rb4_unused _trisb 16 662 ; line_number = 314 663 ; or_if rb4_unused _adcon1 7 664 ; line_number = 315 665 ; or_if rb4_unused _adcon0 0 666 ; line_number = 316 667 ; pin rb5_in, rb5_out, rb5_unused 668 ; line_number = 317 669 ; pin_bindings pdip = 26 670 ; line_number = 318 671 ; bind_to _portb@5 672 ; line_number = 319 673 ; or_if rb5_in _trisb 32 674 ; line_number = 320 675 ; or_if rb5_in _adcon1 7 676 ; line_number = 321 677 ; or_if rb5_in _adcon0 0 678 ; line_number = 322 679 ; or_if rb5_out _trisb 0 680 ; line_number = 323 681 ; or_if rb5_out _adcon1 7 682 ; line_number = 324 683 ; or_if rb5_out _adcon0 0 684 ; line_number = 325 685 ; or_if rb5_unused _trisb 32 686 ; line_number = 326 687 ; or_if rb5_unused _adcon1 7 688 ; line_number = 327 689 ; or_if rb5_unused _adcon0 0 690 ; line_number = 328 691 ; pin rb6_in, rb6_out, pgc, rb6_unused 692 ; line_number = 329 693 ; pin_bindings pdip = 27 694 ; line_number = 330 695 ; bind_to _portb@6 696 ; line_number = 331 697 ; or_if rb6_in _trisb 64 698 ; line_number = 332 699 ; or_if rb6_in _adcon1 7 700 ; line_number = 333 701 ; or_if rb6_in _adcon0 0 702 ; line_number = 334 703 ; or_if rb6_out _trisb 0 704 ; line_number = 335 705 ; or_if rb6_out _adcon1 7 706 ; line_number = 336 707 ; or_if rb6_out _adcon0 0 708 ; line_number = 337 709 ; or_if rb6_unused _trisb 64 710 ; line_number = 338 711 ; or_if rb6_unused _adcon1 7 712 ; line_number = 339 713 ; or_if rb6_unused _adcon0 0 714 ; line_number = 340 715 ; pin rb7_in, rb7_out, pgd, rb7_unused 716 ; line_number = 341 717 ; pin_bindings pdip = 28 718 ; line_number = 342 719 ; bind_to _portb@7 720 ; line_number = 343 721 ; or_if rb7_in _trisb 128 722 ; line_number = 344 723 ; or_if rb7_in _adcon1 7 724 ; line_number = 345 725 ; or_if rb7_in _adcon0 0 726 ; line_number = 346 727 ; or_if rb7_out _trisb 0 728 ; line_number = 347 729 ; or_if rb7_out _adcon1 7 730 ; line_number = 348 731 ; or_if rb7_out _adcon0 0 732 ; line_number = 349 733 ; or_if rb7_unused _trisb 128 734 ; line_number = 350 735 ; or_if rb7_unused _adcon1 7 736 ; line_number = 351 737 ; or_if rb7_unused _adcon0 0 738 739 740 ; # Register and pin definitions: 741 742 ; line_number = 358 743 ; library _pic16f87x entered 744 745 ; # Copyright (c) 2004-2006 by Wayne C. Gramlich 746 ; # All rights reserved. 747 748 ; # Common declarations for PIC16F87x series microcontrollers: 749 750 ; buffer = '_pic16f87x' 751 ; line_number = 8 752 ; library _standard entered 753 754 ; # Copyright (c) 2006 by Wayne C. Gramlich 755 ; # All rights reserved. 756 757 ; # Standard definition for uCL: 758 759 ; buffer = '_standard' 760 ; line_number = 8 761 ; constant _true = (1 = 1) 762 00000001 = _true equ 1 763 ; line_number = 9 764 ; constant _false = (0 != 0) 765 00000000 = _false equ 0 766 767 768 ; buffer = '_pic16f87x' 769 ; line_number = 8 770 ; library _standard exited 771 772 ; # Register and pin definitions: 773 774 ; # Bank 0: 775 776 ; line_number = 14 777 ; register _indf = 778 00000000 = _indf equ 0 779 780 ; line_number = 16 781 ; register _tmr0 = 782 00000001 = _tmr0 equ 1 783 784 ; line_number = 18 785 ; register _pcl = 786 00000002 = _pcl equ 2 787 788 ; line_number = 20 789 ; register _status = 790 00000003 = _status equ 3 791 ; line_number = 21 792 ; bind _irp = _status@7 793 00000003 = _irp___byte equ _status 794 00000007 = _irp___bit equ 7 795 ; line_number = 22 796 ; bind _rp1 = _status@6 797 00000003 = _rp1___byte equ _status 798 00000006 = _rp1___bit equ 6 799 ; line_number = 23 800 ; bind _rp0 = _status@5 801 00000003 = _rp0___byte equ _status 802 00000005 = _rp0___bit equ 5 803 ; line_number = 24 804 ; bind _to = _status@4 805 00000003 = _to___byte equ _status 806 00000004 = _to___bit equ 4 807 ; line_number = 25 808 ; bind _pd = _status@3 809 00000003 = _pd___byte equ _status 810 00000003 = _pd___bit equ 3 811 ; line_number = 26 812 ; bind _z = _status@2 813 00000003 = _z___byte equ _status 814 00000002 = _z___bit equ 2 815 ; line_number = 27 816 ; bind _dc = _status@1 817 00000003 = _dc___byte equ _status 818 00000001 = _dc___bit equ 1 819 ; line_number = 28 820 ; bind _c = _status@0 821 00000003 = _c___byte equ _status 822 00000000 = _c___bit equ 0 823 824 ; line_number = 30 825 ; register _fsr = 826 00000004 = _fsr equ 4 827 828 ; line_number = 32 829 ; register _porta = 830 00000005 = _porta equ 5 831 832 ; line_number = 34 833 ; register _portb = 834 00000006 = _portb equ 6 835 836 ; line_number = 36 837 ; register _portc = 838 00000007 = _portc equ 7 839 840 ; line_number = 38 841 ; register _pclath = 842 0000000a = _pclath equ 10 843 844 ; line_number = 40 845 ; register _intcon = 846 0000000b = _intcon equ 11 847 ; line_number = 41 848 ; bind _gie = _intcon@7 849 0000000b = _gie___byte equ _intcon 850 00000007 = _gie___bit equ 7 851 ; line_number = 42 852 ; bind _peie = _intcon@6 853 0000000b = _peie___byte equ _intcon 854 00000006 = _peie___bit equ 6 855 ; line_number = 43 856 ; bind _t0ie = _intcon@5 857 0000000b = _t0ie___byte equ _intcon 858 00000005 = _t0ie___bit equ 5 859 ; line_number = 44 860 ; bind _inte = _intcon@4 861 0000000b = _inte___byte equ _intcon 862 00000004 = _inte___bit equ 4 863 ; line_number = 45 864 ; bind _rbie = _intcon@3 865 0000000b = _rbie___byte equ _intcon 866 00000003 = _rbie___bit equ 3 867 ; line_number = 46 868 ; bind _t0if = _intcon@2 869 0000000b = _t0if___byte equ _intcon 870 00000002 = _t0if___bit equ 2 871 ; line_number = 47 872 ; bind _intf = _intcon@1 873 0000000b = _intf___byte equ _intcon 874 00000001 = _intf___bit equ 1 875 ; line_number = 48 876 ; bind _rbf = _intcon@0 877 0000000b = _rbf___byte equ _intcon 878 00000000 = _rbf___bit equ 0 879 880 ; line_number = 50 881 ; register _pir1 = 882 0000000c = _pir1 equ 12 883 ; line_number = 51 884 ; bind _pspif = _pir1@7 885 0000000c = _pspif___byte equ _pir1 886 00000007 = _pspif___bit equ 7 887 ; line_number = 52 888 ; bind _adif = _pir1@6 889 0000000c = _adif___byte equ _pir1 890 00000006 = _adif___bit equ 6 891 ; line_number = 53 892 ; bind _rcif = _pir1@5 893 0000000c = _rcif___byte equ _pir1 894 00000005 = _rcif___bit equ 5 895 ; line_number = 54 896 ; bind _txif = _pir1@4 897 0000000c = _txif___byte equ _pir1 898 00000004 = _txif___bit equ 4 899 ; line_number = 55 900 ; bind _sspif = _pir1@3 901 0000000c = _sspif___byte equ _pir1 902 00000003 = _sspif___bit equ 3 903 ; line_number = 56 904 ; bind _ccpif = _pir1@2 905 0000000c = _ccpif___byte equ _pir1 906 00000002 = _ccpif___bit equ 2 907 ; line_number = 57 908 ; bind _tmr2if = _pir1@1 909 0000000c = _tmr2if___byte equ _pir1 910 00000001 = _tmr2if___bit equ 1 911 ; line_number = 58 912 ; bind _tmr1if = _pir1@0 913 0000000c = _tmr1if___byte equ _pir1 914 00000000 = _tmr1if___bit equ 0 915 916 ; line_number = 60 917 ; register _pir2 = 918 0000000d = _pir2 equ 13 919 ; line_number = 61 920 ; bind _eeif = _pir2@4 921 0000000d = _eeif___byte equ _pir2 922 00000004 = _eeif___bit equ 4 923 ; line_number = 62 924 ; bind _bclif = _pir2@3 925 0000000d = _bclif___byte equ _pir2 926 00000003 = _bclif___bit equ 3 927 ; line_number = 63 928 ; bind _ccp2if = _pir2@0 929 0000000d = _ccp2if___byte equ _pir2 930 00000000 = _ccp2if___bit equ 0 931 932 ; line_number = 65 933 ; register _tmr1l = 934 0000000e = _tmr1l equ 14 935 936 ; line_number = 67 937 ; register _tmr1h = 938 0000000f = _tmr1h equ 15 939 940 ; line_number = 69 941 ; register _t1con = 942 00000010 = _t1con equ 16 943 ; line_number = 70 944 ; bind _t1ckps1 = _t1con@5 945 00000010 = _t1ckps1___byte equ _t1con 946 00000005 = _t1ckps1___bit equ 5 947 ; line_number = 71 948 ; bind _t1ckps0 = _t1con@4 949 00000010 = _t1ckps0___byte equ _t1con 950 00000004 = _t1ckps0___bit equ 4 951 ; line_number = 72 952 ; bind _t1oscen = _t1con@3 953 00000010 = _t1oscen___byte equ _t1con 954 00000003 = _t1oscen___bit equ 3 955 ; line_number = 73 956 ; bind _t1sync = _t1con@2 957 00000010 = _t1sync___byte equ _t1con 958 00000002 = _t1sync___bit equ 2 959 ; line_number = 74 960 ; bind _tmr1cs = _t1con@1 961 00000010 = _tmr1cs___byte equ _t1con 962 00000001 = _tmr1cs___bit equ 1 963 ; line_number = 75 964 ; bind _tmr1on = _t1con@0 965 00000010 = _tmr1on___byte equ _t1con 966 00000000 = _tmr1on___bit equ 0 967 968 ; line_number = 77 969 ; register _tmr2 = 970 00000011 = _tmr2 equ 17 971 972 ; line_number = 79 973 ; register _t2con = 974 00000012 = _t2con equ 18 975 ; line_number = 80 976 ; bind _toutps3 = _t2con@6 977 00000012 = _toutps3___byte equ _t2con 978 00000006 = _toutps3___bit equ 6 979 ; line_number = 81 980 ; bind _toutps2 = _t2con@5 981 00000012 = _toutps2___byte equ _t2con 982 00000005 = _toutps2___bit equ 5 983 ; line_number = 82 984 ; bind _toutps1 = _t2con@4 985 00000012 = _toutps1___byte equ _t2con 986 00000004 = _toutps1___bit equ 4 987 ; line_number = 83 988 ; bind _toutps0 = _t2con@3 989 00000012 = _toutps0___byte equ _t2con 990 00000003 = _toutps0___bit equ 3 991 ; line_number = 84 992 ; bind _tmr2on = _t2con@2 993 00000012 = _tmr2on___byte equ _t2con 994 00000002 = _tmr2on___bit equ 2 995 ; line_number = 85 996 ; bind _t2ckps1 = _t2con@1 997 00000012 = _t2ckps1___byte equ _t2con 998 00000001 = _t2ckps1___bit equ 1 999 ; line_number = 86 1000 ; bind _t2ckps0 = _t2con@0 1001 00000012 = _t2ckps0___byte equ _t2con 1002 00000000 = _t2ckps0___bit equ 0 1003 1004 ; line_number = 88 1005 ; register _sspbuf = 1006 00000013 = _sspbuf equ 19 1007 1008 ; line_number = 90 1009 ; register _sspcon = 1010 00000014 = _sspcon equ 20 1011 ; line_number = 91 1012 ; bind _wcol = _sspcon@7 1013 00000014 = _wcol___byte equ _sspcon 1014 00000007 = _wcol___bit equ 7 1015 ; line_number = 92 1016 ; bind _sspov = _sspcon@6 1017 00000014 = _sspov___byte equ _sspcon 1018 00000006 = _sspov___bit equ 6 1019 ; line_number = 93 1020 ; bind _sspen = _sspcon@5 1021 00000014 = _sspen___byte equ _sspcon 1022 00000005 = _sspen___bit equ 5 1023 ; line_number = 94 1024 ; bind _ckp = _sspcon@4 1025 00000014 = _ckp___byte equ _sspcon 1026 00000004 = _ckp___bit equ 4 1027 ; line_number = 95 1028 ; bind _sspm3 = _sspcon@3 1029 00000014 = _sspm3___byte equ _sspcon 1030 00000003 = _sspm3___bit equ 3 1031 ; line_number = 96 1032 ; bind _sspm2 = _sspcon@2 1033 00000014 = _sspm2___byte equ _sspcon 1034 00000002 = _sspm2___bit equ 2 1035 ; line_number = 97 1036 ; bind _sspm1 = _sspcon@1 1037 00000014 = _sspm1___byte equ _sspcon 1038 00000001 = _sspm1___bit equ 1 1039 ; line_number = 98 1040 ; bind _sspm0 = _sspcon@0 1041 00000014 = _sspm0___byte equ _sspcon 1042 00000000 = _sspm0___bit equ 0 1043 1044 ; line_number = 100 1045 ; register _ccpr1l = 1046 00000015 = _ccpr1l equ 21 1047 1048 ; line_number = 102 1049 ; register _ccpr1h = 1050 00000016 = _ccpr1h equ 22 1051 1052 ; line_number = 104 1053 ; register _ccp1con = 1054 00000017 = _ccp1con equ 23 1055 ; line_number = 105 1056 ; bind _ccp1x = _ccp1con@5 1057 00000017 = _ccp1x___byte equ _ccp1con 1058 00000005 = _ccp1x___bit equ 5 1059 ; line_number = 106 1060 ; bind _ccp1y = _ccp1con@4 1061 00000017 = _ccp1y___byte equ _ccp1con 1062 00000004 = _ccp1y___bit equ 4 1063 ; line_number = 107 1064 ; bind _ccp1m3 = _ccp1con@3 1065 00000017 = _ccp1m3___byte equ _ccp1con 1066 00000003 = _ccp1m3___bit equ 3 1067 ; line_number = 108 1068 ; bind _ccp1m2 = _ccp1con@2 1069 00000017 = _ccp1m2___byte equ _ccp1con 1070 00000002 = _ccp1m2___bit equ 2 1071 ; line_number = 109 1072 ; bind _ccp1m1 = _ccp1con@1 1073 00000017 = _ccp1m1___byte equ _ccp1con 1074 00000001 = _ccp1m1___bit equ 1 1075 ; line_number = 110 1076 ; bind _ccp1m0 = _ccp1con@0 1077 00000017 = _ccp1m0___byte equ _ccp1con 1078 00000000 = _ccp1m0___bit equ 0 1079 1080 ; line_number = 112 1081 ; register _rcsta = 1082 00000018 = _rcsta equ 24 1083 ; line_number = 113 1084 ; bind _spen = _rcsta@7 1085 00000018 = _spen___byte equ _rcsta 1086 00000007 = _spen___bit equ 7 1087 ; line_number = 114 1088 ; bind _rx9 = _rcsta@6 1089 00000018 = _rx9___byte equ _rcsta 1090 00000006 = _rx9___bit equ 6 1091 ; line_number = 115 1092 ; bind _sren = _rcsta@5 1093 00000018 = _sren___byte equ _rcsta 1094 00000005 = _sren___bit equ 5 1095 ; line_number = 116 1096 ; bind _cren = _rcsta@4 1097 00000018 = _cren___byte equ _rcsta 1098 00000004 = _cren___bit equ 4 1099 ; line_number = 117 1100 ; bind _adden = _rcsta@3 1101 00000018 = _adden___byte equ _rcsta 1102 00000003 = _adden___bit equ 3 1103 ; line_number = 118 1104 ; bind _ferr = _rcsta@2 1105 00000018 = _ferr___byte equ _rcsta 1106 00000002 = _ferr___bit equ 2 1107 ; line_number = 119 1108 ; bind _oerr = _rcsta@1 1109 00000018 = _oerr___byte equ _rcsta 1110 00000001 = _oerr___bit equ 1 1111 ; line_number = 120 1112 ; bind _rx9d = _rcsta@0 1113 00000018 = _rx9d___byte equ _rcsta 1114 00000000 = _rx9d___bit equ 0 1115 1116 ; line_number = 122 1117 ; register _txreg = 1118 00000019 = _txreg equ 25 1119 1120 ; line_number = 124 1121 ; register _rcreg = 1122 0000001a = _rcreg equ 26 1123 1124 ; line_number = 126 1125 ; register _ccpr2l = 1126 0000001b = _ccpr2l equ 27 1127 1128 ; line_number = 128 1129 ; register _ccpr2h = 1130 0000001c = _ccpr2h equ 28 1131 1132 ; line_number = 130 1133 ; register _ccp2con = 1134 0000001d = _ccp2con equ 29 1135 ; line_number = 131 1136 ; bind _ccp2x = _ccp2con@5 1137 0000001d = _ccp2x___byte equ _ccp2con 1138 00000005 = _ccp2x___bit equ 5 1139 ; line_number = 132 1140 ; bind _ccp2y = _ccp2con@4 1141 0000001d = _ccp2y___byte equ _ccp2con 1142 00000004 = _ccp2y___bit equ 4 1143 ; line_number = 133 1144 ; bind _ccp2m3 = _ccp2con@3 1145 0000001d = _ccp2m3___byte equ _ccp2con 1146 00000003 = _ccp2m3___bit equ 3 1147 ; line_number = 134 1148 ; bind _ccp2m2 = _ccp2con@2 1149 0000001d = _ccp2m2___byte equ _ccp2con 1150 00000002 = _ccp2m2___bit equ 2 1151 ; line_number = 135 1152 ; bind _ccp2m1 = _ccp2con@1 1153 0000001d = _ccp2m1___byte equ _ccp2con 1154 00000001 = _ccp2m1___bit equ 1 1155 ; line_number = 136 1156 ; bind _ccp2m0 = _ccp2con@0 1157 0000001d = _ccp2m0___byte equ _ccp2con 1158 00000000 = _ccp2m0___bit equ 0 1159 1160 ; line_number = 138 1161 ; register _adresh = 1162 0000001e = _adresh equ 30 1163 1164 ; line_number = 140 1165 ; register _adcon0 = 1166 0000001f = _adcon0 equ 31 1167 ; line_number = 141 1168 ; bind _adcs1 = _adcon0@7 1169 0000001f = _adcs1___byte equ _adcon0 1170 00000007 = _adcs1___bit equ 7 1171 ; line_number = 142 1172 ; bind _adcs0 = _adcon0@6 1173 0000001f = _adcs0___byte equ _adcon0 1174 00000006 = _adcs0___bit equ 6 1175 ; line_number = 143 1176 ; bind _chs2 = _adcon0@5 1177 0000001f = _chs2___byte equ _adcon0 1178 00000005 = _chs2___bit equ 5 1179 ; line_number = 144 1180 ; bind _chs1 = _adcon0@4 1181 0000001f = _chs1___byte equ _adcon0 1182 00000004 = _chs1___bit equ 4 1183 ; line_number = 145 1184 ; bind _chs0 = _adcon0@3 1185 0000001f = _chs0___byte equ _adcon0 1186 00000003 = _chs0___bit equ 3 1187 ; line_number = 146 1188 ; bind _go_done = _adcon0@2 1189 0000001f = _go_done___byte equ _adcon0 1190 00000002 = _go_done___bit equ 2 1191 ; line_number = 147 1192 ; bind _adon = _adcon0@0 1193 0000001f = _adon___byte equ _adcon0 1194 00000000 = _adon___bit equ 0 1195 1196 ; # Bank 1: 1197 1198 ; line_number = 151 1199 ; register _option_reg = 1200 00000081 = _option_reg equ 129 1201 ; line_number = 152 1202 ; bind _rbpu = _option_reg@7 1203 00000081 = _rbpu___byte equ _option_reg 1204 00000007 = _rbpu___bit equ 7 1205 ; line_number = 153 1206 ; bind _intedg = _option_reg@6 1207 00000081 = _intedg___byte equ _option_reg 1208 00000006 = _intedg___bit equ 6 1209 ; line_number = 154 1210 ; bind _t0cs = _option_reg@5 1211 00000081 = _t0cs___byte equ _option_reg 1212 00000005 = _t0cs___bit equ 5 1213 ; line_number = 155 1214 ; bind _t0se = _option_reg@4 1215 00000081 = _t0se___byte equ _option_reg 1216 00000004 = _t0se___bit equ 4 1217 ; line_number = 156 1218 ; bind _psa = _option_reg@3 1219 00000081 = _psa___byte equ _option_reg 1220 00000003 = _psa___bit equ 3 1221 ; line_number = 157 1222 ; bind _ps2 = _option_reg@2 1223 00000081 = _ps2___byte equ _option_reg 1224 00000002 = _ps2___bit equ 2 1225 ; line_number = 158 1226 ; bind _ps1 = _option_reg@1 1227 00000081 = _ps1___byte equ _option_reg 1228 00000001 = _ps1___bit equ 1 1229 ; line_number = 159 1230 ; bind _ps0 = _option_reg@0 1231 00000081 = _ps0___byte equ _option_reg 1232 00000000 = _ps0___bit equ 0 1233 1234 ; line_number = 161 1235 ; register _trisa = 1236 00000085 = _trisa equ 133 1237 1238 ; line_number = 163 1239 ; register _trisb = 1240 00000086 = _trisb equ 134 1241 1242 ; line_number = 165 1243 ; register _trisc = 1244 00000087 = _trisc equ 135 1245 1246 ; line_number = 167 1247 ; register _pie1 = 1248 0000008c = _pie1 equ 140 1249 ; line_number = 168 1250 ; bind _pspie = _pie1@7 1251 0000008c = _pspie___byte equ _pie1 1252 00000007 = _pspie___bit equ 7 1253 ; line_number = 169 1254 ; bind _adie = _pie1@6 1255 0000008c = _adie___byte equ _pie1 1256 00000006 = _adie___bit equ 6 1257 ; line_number = 170 1258 ; bind _rcie = _pie1@5 1259 0000008c = _rcie___byte equ _pie1 1260 00000005 = _rcie___bit equ 5 1261 ; line_number = 171 1262 ; bind _txie = _pie1@4 1263 0000008c = _txie___byte equ _pie1 1264 00000004 = _txie___bit equ 4 1265 ; line_number = 172 1266 ; bind _sspie = _pie1@3 1267 0000008c = _sspie___byte equ _pie1 1268 00000003 = _sspie___bit equ 3 1269 ; line_number = 173 1270 ; bind _ccp1ie = _pie1@2 1271 0000008c = _ccp1ie___byte equ _pie1 1272 00000002 = _ccp1ie___bit equ 2 1273 ; line_number = 174 1274 ; bind _tmr2ie = _pie1@1 1275 0000008c = _tmr2ie___byte equ _pie1 1276 00000001 = _tmr2ie___bit equ 1 1277 ; line_number = 175 1278 ; bind _tmr1ie = _pie1@0 1279 0000008c = _tmr1ie___byte equ _pie1 1280 00000000 = _tmr1ie___bit equ 0 1281 1282 ; line_number = 177 1283 ; register _pie2 = 1284 0000008d = _pie2 equ 141 1285 ; line_number = 178 1286 ; bind _eeie = _pie2@4 1287 0000008d = _eeie___byte equ _pie2 1288 00000004 = _eeie___bit equ 4 1289 ; line_number = 179 1290 ; bind _bcie = _pie2@3 1291 0000008d = _bcie___byte equ _pie2 1292 00000003 = _bcie___bit equ 3 1293 ; line_number = 180 1294 ; bind _ccp2ie = _pie2@0 1295 0000008d = _ccp2ie___byte equ _pie2 1296 00000000 = _ccp2ie___bit equ 0 1297 1298 ; line_number = 182 1299 ; register _pcon = 1300 0000008e = _pcon equ 142 1301 ; line_number = 183 1302 ; bind _por = _pcon@1 1303 0000008e = _por___byte equ _pcon 1304 00000001 = _por___bit equ 1 1305 ; line_number = 184 1306 ; bind _bor = _pcon@0 1307 0000008e = _bor___byte equ _pcon 1308 00000000 = _bor___bit equ 0 1309 1310 ; line_number = 186 1311 ; register _sspcon2 = 1312 00000091 = _sspcon2 equ 145 1313 ; line_number = 187 1314 ; bind _gcen = _sspcon2@7 1315 00000091 = _gcen___byte equ _sspcon2 1316 00000007 = _gcen___bit equ 7 1317 ; line_number = 188 1318 ; bind _ackstat = _sspcon2@6 1319 00000091 = _ackstat___byte equ _sspcon2 1320 00000006 = _ackstat___bit equ 6 1321 ; line_number = 189 1322 ; bind _ackdt = _sspcon2@5 1323 00000091 = _ackdt___byte equ _sspcon2 1324 00000005 = _ackdt___bit equ 5 1325 ; line_number = 190 1326 ; bind _acken = _sspcon2@4 1327 00000091 = _acken___byte equ _sspcon2 1328 00000004 = _acken___bit equ 4 1329 ; line_number = 191 1330 ; bind _rcen = _sspcon2@3 1331 00000091 = _rcen___byte equ _sspcon2 1332 00000003 = _rcen___bit equ 3 1333 ; line_number = 192 1334 ; bind _pen = _sspcon2@2 1335 00000091 = _pen___byte equ _sspcon2 1336 00000002 = _pen___bit equ 2 1337 ; line_number = 193 1338 ; bind _rsen = _sspcon2@1 1339 00000091 = _rsen___byte equ _sspcon2 1340 00000001 = _rsen___bit equ 1 1341 ; line_number = 194 1342 ; bind _sen = _sspcon2@0 1343 00000091 = _sen___byte equ _sspcon2 1344 00000000 = _sen___bit equ 0 1345 1346 ; line_number = 196 1347 ; register _pr2 = 1348 00000092 = _pr2 equ 146 1349 1350 ; line_number = 198 1351 ; register _sspadd = 1352 00000093 = _sspadd equ 147 1353 1354 ; line_number = 200 1355 ; register _sspstat = 1356 00000094 = _sspstat equ 148 1357 ; line_number = 201 1358 ; bind _smp = _sspstat@7 1359 00000094 = _smp___byte equ _sspstat 1360 00000007 = _smp___bit equ 7 1361 ; line_number = 202 1362 ; bind _cke = _sspstat@6 1363 00000094 = _cke___byte equ _sspstat 1364 00000006 = _cke___bit equ 6 1365 ; line_number = 203 1366 ; bind _da = _sspstat@5 1367 00000094 = _da___byte equ _sspstat 1368 00000005 = _da___bit equ 5 1369 ; line_number = 204 1370 ; bind _p = _sspstat@4 1371 00000094 = _p___byte equ _sspstat 1372 00000004 = _p___bit equ 4 1373 ; line_number = 205 1374 ; bind _s = _sspstat@3 1375 00000094 = _s___byte equ _sspstat 1376 00000003 = _s___bit equ 3 1377 ; line_number = 206 1378 ; bind _rw = _sspstat@2 1379 00000094 = _rw___byte equ _sspstat 1380 00000002 = _rw___bit equ 2 1381 ; line_number = 207 1382 ; bind _ua = _sspstat@1 1383 00000094 = _ua___byte equ _sspstat 1384 00000001 = _ua___bit equ 1 1385 ; line_number = 208 1386 ; bind _bf = _sspstat@0 1387 00000094 = _bf___byte equ _sspstat 1388 00000000 = _bf___bit equ 0 1389 1390 ; line_number = 210 1391 ; register _txsta = 1392 00000098 = _txsta equ 152 1393 ; line_number = 211 1394 ; bind _csrc = _txsta@7 1395 00000098 = _csrc___byte equ _txsta 1396 00000007 = _csrc___bit equ 7 1397 ; line_number = 212 1398 ; bind _tx9 = _txsta@6 1399 00000098 = _tx9___byte equ _txsta 1400 00000006 = _tx9___bit equ 6 1401 ; line_number = 213 1402 ; bind _txen = _txsta@5 1403 00000098 = _txen___byte equ _txsta 1404 00000005 = _txen___bit equ 5 1405 ; line_number = 214 1406 ; bind _sync = _txsta@4 1407 00000098 = _sync___byte equ _txsta 1408 00000004 = _sync___bit equ 4 1409 ; line_number = 215 1410 ; bind _brgh = _txsta@2 1411 00000098 = _brgh___byte equ _txsta 1412 00000002 = _brgh___bit equ 2 1413 ; line_number = 216 1414 ; bind _trmt = _txsta@1 1415 00000098 = _trmt___byte equ _txsta 1416 00000001 = _trmt___bit equ 1 1417 ; line_number = 217 1418 ; bind _tx9d = _txsta@0 1419 00000098 = _tx9d___byte equ _txsta 1420 00000000 = _tx9d___bit equ 0 1421 1422 ; line_number = 219 1423 ; register _spbrg = 1424 00000099 = _spbrg equ 153 1425 1426 ; line_number = 221 1427 ; register _cmcon = 1428 0000009c = _cmcon equ 156 1429 ; line_number = 222 1430 ; bind _c2out = _cmcon@7 1431 0000009c = _c2out___byte equ _cmcon 1432 00000007 = _c2out___bit equ 7 1433 ; line_number = 223 1434 ; bind _c1out = _cmcon@6 1435 0000009c = _c1out___byte equ _cmcon 1436 00000006 = _c1out___bit equ 6 1437 ; line_number = 224 1438 ; bind _c2inv = _cmcon@5 1439 0000009c = _c2inv___byte equ _cmcon 1440 00000005 = _c2inv___bit equ 5 1441 ; line_number = 225 1442 ; bind _c1inv = _cmcon@4 1443 0000009c = _c1inv___byte equ _cmcon 1444 00000004 = _c1inv___bit equ 4 1445 ; line_number = 226 1446 ; bind _cis = _cmcon@3 1447 0000009c = _cis___byte equ _cmcon 1448 00000003 = _cis___bit equ 3 1449 ; line_number = 227 1450 ; bind _cm2 = _cmcon@2 1451 0000009c = _cm2___byte equ _cmcon 1452 00000002 = _cm2___bit equ 2 1453 ; line_number = 228 1454 ; bind _cm1 = _cmcon@1 1455 0000009c = _cm1___byte equ _cmcon 1456 00000001 = _cm1___bit equ 1 1457 ; line_number = 229 1458 ; bind _cm0 = _cmcon@0 1459 0000009c = _cm0___byte equ _cmcon 1460 00000000 = _cm0___bit equ 0 1461 1462 ; line_number = 231 1463 ; register _cvrcon = 1464 0000009d = _cvrcon equ 157 1465 ; line_number = 232 1466 ; bind _cvren = _cvrcon@7 1467 0000009d = _cvren___byte equ _cvrcon 1468 00000007 = _cvren___bit equ 7 1469 ; line_number = 233 1470 ; bind _cvroe = _cvrcon@6 1471 0000009d = _cvroe___byte equ _cvrcon 1472 00000006 = _cvroe___bit equ 6 1473 ; line_number = 234 1474 ; bind _cvrr = _cvrcon@5 1475 0000009d = _cvrr___byte equ _cvrcon 1476 00000005 = _cvrr___bit equ 5 1477 ; line_number = 235 1478 ; bind _cvr3 = _cvrcon@3 1479 0000009d = _cvr3___byte equ _cvrcon 1480 00000003 = _cvr3___bit equ 3 1481 ; line_number = 236 1482 ; bind _cvr2 = _cvrcon@2 1483 0000009d = _cvr2___byte equ _cvrcon 1484 00000002 = _cvr2___bit equ 2 1485 ; line_number = 237 1486 ; bind _cvr1 = _cvrcon@1 1487 0000009d = _cvr1___byte equ _cvrcon 1488 00000001 = _cvr1___bit equ 1 1489 ; line_number = 238 1490 ; bind _cvr0 = _cvrcon@0 1491 0000009d = _cvr0___byte equ _cvrcon 1492 00000000 = _cvr0___bit equ 0 1493 1494 ; line_number = 240 1495 ; register _adresl = 1496 0000009e = _adresl equ 158 1497 1498 ; line_number = 242 1499 ; register _adcon1 = 1500 0000009f = _adcon1 equ 159 1501 ; line_number = 243 1502 ; bind _adfm = _adcon1@7 1503 0000009f = _adfm___byte equ _adcon1 1504 00000007 = _adfm___bit equ 7 1505 ; line_number = 244 1506 ; bind _pcfg3 = _adcon1@3 1507 0000009f = _pcfg3___byte equ _adcon1 1508 00000003 = _pcfg3___bit equ 3 1509 ; line_number = 245 1510 ; bind _pcfg2 = _adcon1@2 1511 0000009f = _pcfg2___byte equ _adcon1 1512 00000002 = _pcfg2___bit equ 2 1513 ; line_number = 246 1514 ; bind _pcfg1 = _adcon1@1 1515 0000009f = _pcfg1___byte equ _adcon1 1516 00000001 = _pcfg1___bit equ 1 1517 ; line_number = 247 1518 ; bind _pcfg0 = _adcon1@0 1519 0000009f = _pcfg0___byte equ _adcon1 1520 00000000 = _pcfg0___bit equ 0 1521 1522 ; # Bank 2: 1523 1524 ; line_number = 251 1525 ; register _eedata = 1526 0000010c = _eedata equ 268 1527 1528 ; line_number = 253 1529 ; register _eeadr = 1530 0000010d = _eeadr equ 269 1531 1532 ; line_number = 255 1533 ; register _eedath = 1534 0000010e = _eedath equ 270 1535 1536 ; line_number = 257 1537 ; register _eeadrh = 1538 0000010f = _eeadrh equ 271 1539 1540 ; # Bank 3: 1541 1542 ; line_number = 261 1543 ; register _eecon1 = 1544 0000018c = _eecon1 equ 396 1545 ; line_number = 262 1546 ; bind _eepgd = _eecon1@7 1547 0000018c = _eepgd___byte equ _eecon1 1548 00000007 = _eepgd___bit equ 7 1549 ; line_number = 263 1550 ; bind _wrerr = _eecon1@3 1551 0000018c = _wrerr___byte equ _eecon1 1552 00000003 = _wrerr___bit equ 3 1553 ; line_number = 264 1554 ; bind _wren = _eecon1@2 1555 0000018c = _wren___byte equ _eecon1 1556 00000002 = _wren___bit equ 2 1557 ; line_number = 265 1558 ; bind _wr = _eecon1@1 1559 0000018c = _wr___byte equ _eecon1 1560 00000001 = _wr___bit equ 1 1561 ; line_number = 266 1562 ; bind _rd = _eecon1@0 1563 0000018c = _rd___byte equ _eecon1 1564 00000000 = _rd___bit equ 0 1565 1566 ; line_number = 268 1567 ; register _eecon2 = 1568 0000018d = _eecon2 equ 397 1569 1570 1571 ; buffer = '_pic16f876' 1572 ; line_number = 358 1573 ; library _pic16f87x exited 1574 1575 1576 ; buffer = 'controller28' 1577 ; line_number = 10 1578 ; library _pic16f876 exited 1579 ; line_number = 11 1580 ; library clock20mhz entered 1581 ; # Copyright (c) 2004 by Wayne C. Gramlich 1582 ; # All rights reserved. 1583 1584 ; # This library defines the contstants {clock_rate}, {instruction_rate}, 1585 ; # and {clocks_per_instruction}. 1586 1587 ; # Define processor constants: 1588 ; buffer = 'clock20mhz' 1589 ; line_number = 9 1590 ; constant clock_rate = 20000000 1591 01312d00 = clock_rate equ 20000000 1592 ; line_number = 10 1593 ; constant clocks_per_instruction = 4 1594 00000004 = clocks_per_instruction equ 4 1595 ; line_number = 11 1596 ; constant instruction_rate = clock_rate / clocks_per_instruction 1597 004c4b40 = instruction_rate equ 5000000 1598 1599 1600 ; buffer = 'controller28' 1601 ; line_number = 11 1602 ; library clock20mhz exited 1603 ; line_number = 12 1604 ; library _uart entered 1605 ; # Copyright (c) 2004 by Wayne C. Gramlich. 1606 ; # All rights reserved. 1607 1608 ; # This library contains some procedures for accessing the UART. 1609 1610 ; Delaying code generation for procedure _uart_byte_safe_get 1611 ; Delaying code generation for procedure _uart_byte_get 1612 ; Delaying code generation for procedure _uart_hex_put 1613 ; Delaying code generation for procedure _uart_nibble_put 1614 ; Delaying code generation for procedure _uart_space_put 1615 ; Delaying code generation for procedure _uart_crlf_put 1616 ; Delaying code generation for procedure _uart_byte_put 1617 1618 ; line_number = 12 1619 ; library _uart exited 1620 1621 1622 ; # Port and pin definitions: 1623 1624 ; # Port definitions: 1625 1626 ; line_number = 20 1627 ; package pdip 1628 ; line_number = 21 1629 ; pin 1 = mclr 1630 ; line_number = 22 1631 ; pin 2 = ra0_unused 1632 ; line_number = 23 1633 ; pin 3 = ra1_unused 1634 ; line_number = 24 1635 ; pin 4 = ra2_unused 1636 ; line_number = 25 1637 ; pin 5 = ra3_unused 1638 ; line_number = 26 1639 ; pin 6 = ra4_unused 1640 ; line_number = 27 1641 ; pin 7 = ra5_unused 1642 ; line_number = 28 1643 ; pin 8 = ground 1644 ; line_number = 29 1645 ; pin 9 = osc1 1646 ; line_number = 30 1647 ; pin 10 = osc2 1648 ; line_number = 31 1649 ; pin 11 = rc0_unused 1650 ; line_number = 32 1651 ; pin 12 = rc1_unused 1652 ; line_number = 33 1653 ; pin 13 = rc2_unused 1654 ; line_number = 34 1655 ; pin 14 = rc3_unused 1656 ; line_number = 35 1657 ; pin 15 = rc4_unused 1658 ; line_number = 36 1659 ; pin 16 = rc5_unused 1660 ; line_number = 37 1661 ; pin 17 = tx 1662 ; line_number = 38 1663 ; pin 18 = rx 1664 ; line_number = 39 1665 ; pin 19 = ground2 1666 ; line_number = 40 1667 ; pin 20 = power_supply 1668 ; line_number = 41 1669 ; pin 21 = rb0_unused 1670 ; line_number = 42 1671 ; pin 22 = rb1_unused 1672 ; line_number = 43 1673 ; pin 23 = rb2_unused 1674 ; line_number = 44 1675 ; pin 24 = rb3_unused 1676 ; line_number = 45 1677 ; pin 25 = rb4_unused 1678 ; line_number = 46 1679 ; pin 26 = rb5_unused 1680 ; line_number = 47 1681 ; pin 27 = rb6_unused 1682 ; line_number = 48 1683 ; pin 28 = rb7_unused 1684 1685 ; line_number = 50 1686 ; global module_address byte 1687 00000023 = module_address equ globals___0+3 1688 ; line_number = 51 1689 ; global rx9d bit 1690 0000006f = rx9d___byte equ globals___0+79 1691 00000000 = rx9d___bit equ 0 1692 ; line_number = 52 1693 ; global id_index byte 1694 00000024 = id_index equ globals___0+4 1695 ; line_number = 53 1696 ; global address_high byte 1697 00000025 = address_high equ globals___0+5 1698 ; line_number = 54 1699 ; global address_low byte 1700 00000026 = address_low equ globals___0+6 1701 ; line_number = 55 1702 ; global count byte 1703 00000027 = count equ globals___0+7 1704 ; line_number = 56 1705 ; global index byte 1706 00000028 = index equ globals___0+8 1707 1708 ; line_number = 58 1709 ; origin 0 1710 0000 : org 0 1711 1712 ; line_number = 60 1713 ;info 60, 0 1714 ; procedure main 1715 0000 : main: 1716 ; Initialize some registers 1717 0000 019f clrf _adcon0 1718 0001 3007 movlw 7 1719 0002 1683 bsf __rp0___byte, __rp0___bit 1720 0003 009f movwf _adcon1 1721 0004 3007 movlw 7 1722 0005 009c movwf _cmcon 1723 0006 303f movlw 63 1724 0007 0085 movwf _trisa 1725 0008 30ff movlw 255 1726 0009 0086 movwf _trisb 1727 000a 30bf movlw 191 1728 000b 0087 movwf _trisc 1729 ; arguments_none 1730 ; line_number = 62 1731 ; returns_nothing 1732 1733 ; line_number = 64 1734 ; local byte_high byte 1735 00000029 = main__byte_high equ globals___0+9 1736 ; line_number = 65 1737 ; local byte_low byte 1738 0000002a = main__byte_low equ globals___0+10 1739 ; line_number = 66 1740 ; local command byte 1741 0000002b = main__command equ globals___0+11 1742 ; line_number = 67 1743 ; local transmit bit 1744 0000006f = main__transmit___byte equ globals___0+79 1745 00000001 = main__transmit___bit equ 1 1746 ; line_number = 68 1747 ; local result byte 1748 0000002c = main__result equ globals___0+12 1749 ; line_number = 69 1750 ; local mode byte 1751 0000002d = main__mode equ globals___0+13 1752 1753 ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>01 code:00=uu=>00) 1754 ; line_number = 71 1755 ; module_address := 28 1756 ;info 71, 12 1757 000c 301c movlw 28 1758 000d 1283 bcf __rp0___byte, __rp0___bit 1759 000e 00a3 movwf module_address 1760 1761 ; # Warm up the UART: 1762 ; line_number = 74 1763 ; _trisc@7 := _true 1764 ;info 74, 15 1765 00000087 = main__select__1___byte equ _trisc 1766 00000007 = main__select__1___bit equ 7 1767 000f 1683 bsf __rp0___byte, __rp0___bit 1768 0010 1787 bsf main__select__1___byte, main__select__1___bit 1769 ; line_number = 75 1770 ; _trisc@6 := _true 1771 ;info 75, 17 1772 00000087 = main__select__2___byte equ _trisc 1773 00000006 = main__select__2___bit equ 6 1774 0011 1707 bsf main__select__2___byte, main__select__2___bit 1775 1776 ; line_number = 77 1777 ; _txsta := 0 1778 ;info 77, 18 1779 0012 0198 clrf _txsta 1780 ; line_number = 78 1781 ; _tx9 := _true 1782 ;info 78, 19 1783 0013 1718 bsf _tx9___byte, _tx9___bit 1784 ; #_tx9 := _false 1785 ; line_number = 80 1786 ; _txen := _true 1787 ;info 80, 20 1788 0014 1698 bsf _txen___byte, _txen___bit 1789 ; line_number = 81 1790 ; _brgh := _true 1791 ;info 81, 21 1792 0015 1518 bsf _brgh___byte, _brgh___bit 1793 1794 ; line_number = 83 1795 ; _rcsta := 0 1796 ;info 83, 22 1797 0016 1283 bcf __rp0___byte, __rp0___bit 1798 0017 0198 clrf _rcsta 1799 ; line_number = 84 1800 ; _spen := _true 1801 ;info 84, 24 1802 0018 1798 bsf _spen___byte, _spen___bit 1803 ; line_number = 85 1804 ; _rx9 := _true 1805 ;info 85, 25 1806 0019 1718 bsf _rx9___byte, _rx9___bit 1807 ; #_rx9 := _false 1808 ; line_number = 87 1809 ; _cren := _true 1810 ;info 87, 26 1811 001a 1618 bsf _cren___byte, _cren___bit 1812 ; #_adden := _true 1813 ; line_number = 89 1814 ; _adden := _false 1815 ;info 89, 27 1816 001b 1198 bcf _adden___byte, _adden___bit 1817 1818 ; # Baud rate = 625000 @ 20MHz. 1819 ; line_number = 92 1820 ; _spbrg := 1 1821 ;info 92, 28 1822 001c 3001 movlw 1 1823 001d 1683 bsf __rp0___byte, __rp0___bit 1824 001e 0099 movwf _spbrg 1825 1826 ; line_number = 94 1827 ; mode := 0 1828 ;info 94, 31 1829 001f 1283 bcf __rp0___byte, __rp0___bit 1830 0020 01ad clrf main__mode 1831 ; line_number = 95 1832 ; id_index := 0 1833 ;info 95, 33 1834 0021 01a4 clrf id_index 1835 1836 ; #loop_forever 1837 ; # call _uart_byte_put(command) 1838 ; # loop_exactly 100 1839 ; # delay 500 1840 ; # do_nothing 1841 ; # command := command + 1 1842 1843 ; #loop_forever 1844 ; # command := _uart_byte_get() 1845 ; # call _uart_byte_put(command + 1) 1846 ; # call _uart_byte_get() 1847 1848 ; line_number = 109 1849 ; loop_forever start 1850 0022 : main__3: 1851 ; line_number = 110 1852 ; transmit := _false 1853 ;info 110, 34 1854 0022 10ef bcf main__transmit___byte, main__transmit___bit 1855 ; line_number = 111 1856 ; rx9d := _false 1857 ;info 111, 35 1858 0023 106f bcf rx9d___byte, rx9d___bit 1859 ; line_number = 112 1860 ; while !_rcif start 1861 0024 : main__4: 1862 ;info 112, 36 1863 ; =>bit_code_emit@symbol(): sym=_rcif 1864 ; 1TEST: Single test with code in skip slot 1865 0024 1e8c btfss _rcif___byte, _rcif___bit 1866 ; line_number = 113 1867 ; do_nothing 1868 ;info 113, 37 1869 0025 2824 goto main__4 1870 ; Recombine size1 = 0 || size2 = 0 1871 ; line_number = 112 1872 ; while !_rcif done 1873 ; line_number = 114 1874 ; if _rx9d start 1875 ;info 114, 38 1876 ; =>bit_code_emit@symbol(): sym=_rx9d 1877 ; 1TEST: Single test with code in skip slot 1878 0026 1818 btfsc _rx9d___byte, _rx9d___bit 1879 ; line_number = 115 1880 ; rx9d := _true 1881 ;info 115, 39 1882 0027 146f bsf rx9d___byte, rx9d___bit 1883 ; Recombine size1 = 0 || size2 = 0 1884 ; line_number = 114 1885 ; if _rx9d done 1886 ; line_number = 116 1887 ; command := _rcreg 1888 ;info 116, 40 1889 0028 081a movf _rcreg,w 1890 0029 00ab movwf main__command 1891 1892 ; line_number = 118 1893 ; if rx9d start 1894 ;info 118, 42 1895 ; =>bit_code_emit@symbol(): sym=rx9d 1896 ; No 1TEST: true.size=11 false.size=230 1897 ; No 2TEST: true.size=11 false.size=230 1898 ; 2GOTO: Single test with two GOTO's 1899 002a 1c6f btfss rx9d___byte, rx9d___bit 1900 002b 2838 goto main__45 1901 ; # We have an address bit: 1902 ; line_number = 120 1903 ; if command = module_address start 1904 ;info 120, 44 1905 ; Left minus Right 1906 002c 0823 movf module_address,w 1907 002d 022b subwf main__command,w 1908 ; =>bit_code_emit@symbol(): sym=__z 1909 ; No 1TEST: true.size=4 false.size=1 1910 ; No 2TEST: true.size=4 false.size=1 1911 ; 2GOTO: Single test with two GOTO's 1912 002e 1d03 btfss __z___byte, __z___bit 1913 002f 2835 goto main__43 1914 ; # We have a match: 1915 ; line_number = 122 1916 ; _adden := _false 1917 ;info 122, 48 1918 0030 1198 bcf _adden___byte, _adden___bit 1919 ; line_number = 123 1920 ; result := 0x5a 1921 ;info 123, 49 1922 0031 305a movlw 90 1923 0032 00ac movwf main__result 1924 ; line_number = 124 1925 ; transmit := _true 1926 ;info 124, 51 1927 0033 14ef bsf main__transmit___byte, main__transmit___bit 1928 0034 2836 goto main__44 1929 ; 2GOTO: Starting code 2 1930 0035 : main__43: 1931 ; # We need to disable non-address reception: 1932 ; line_number = 127 1933 ; _adden := _true 1934 ;info 127, 53 1935 0035 1598 bsf _adden___byte, _adden___bit 1936 0036 : main__44: 1937 ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX) 1938 ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX) 1939 ; 2GOTO: code final bitstates:(data:00=uu=>00 code:00=uu=>00) 1940 ; line_number = 120 1941 ; if command = module_address done 1942 ; line_number = 128 1943 ; mode := 0 1944 ;info 128, 54 1945 0036 01ad clrf main__mode 1946 0037 2920 goto main__46 1947 ; 2GOTO: Starting code 2 1948 0038 : main__45: 1949 ; # We have a command: 1950 ; line_number = 131 1951 ; switch mode start 1952 ;info 131, 56 1953 ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0 1954 0038 3000 movlw main__41>>8 1955 0039 008a movwf __pclath 1956 003a 082d movf main__mode,w 1957 ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX) 1958 003b 3e3d addlw main__41 1959 003c 0082 movwf __pcl 1960 ; page_group 6 1961 003d : main__41: 1962 003d 2843 goto main__35 1963 003e 28b0 goto main__36 1964 003f 28b5 goto main__37 1965 0040 28bc goto main__38 1966 0041 28e0 goto main__39 1967 0042 28e5 goto main__40 1968 ; line_number = 132 1969 ; case 0 1970 0043 : main__35: 1971 ; # Basic instruction decoding: 1972 ; line_number = 134 1973 ; switch command >> 6 start 1974 ;info 134, 67 1975 ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0 1976 0043 3000 movlw main__28>>8 1977 0044 008a movwf __pclath 1978 0000002e = main__29 equ globals___0+14 1979 0045 0e2b swapf main__command,w 1980 0046 00ae movwf main__29 1981 0047 0cae rrf main__29,f 1982 0048 0c2e rrf main__29,w 1983 0049 3903 andlw 3 1984 ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX) 1985 004a 3e4c addlw main__28 1986 004b 0082 movwf __pcl 1987 ; page_group 4 1988 004c : main__28: 1989 004c 2850 goto main__26 1990 004d 28af goto main__30 1991 004e 28af goto main__30 1992 004f 287d goto main__27 1993 ; line_number = 135 1994 ; case 0 1995 0050 : main__26: 1996 ; # 00xx xxxx: 1997 ; line_number = 137 1998 ; switch (command >> 3) & 7 start 1999 ;info 137, 80 2000 ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0 2001 ; line_number = 138 2002 ; case_maximum 7 2003 0050 3000 movlw main__12>>8 2004 0051 008a movwf __pclath 2005 0000002e = main__13 equ globals___0+14 2006 0052 0c2b rrf main__command,w 2007 0053 00ae movwf main__13 2008 0054 0cae rrf main__13,f 2009 0055 0c2e rrf main__13,w 2010 0056 3907 andlw 7 2011 ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX) 2012 0057 3e59 addlw main__12 2013 0058 0082 movwf __pcl 2014 ; page_group 8 2015 0059 : main__12: 2016 0059 2861 goto main__11 2017 005a 287c goto main__14 2018 005b 287c goto main__14 2019 005c 287c goto main__14 2020 005d 287c goto main__14 2021 005e 287c goto main__14 2022 005f 287c goto main__14 2023 0060 287c goto main__14 2024 ; line_number = 139 2025 ; case 0 2026 0061 : main__11: 2027 ; #: 0000 0xxx: 2028 ; line_number = 141 2029 ; switch command & 7 start 2030 ;info 141, 97 2031 ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0 2032 ; line_number = 142 2033 ; case_maximum 7 2034 0061 3000 movlw main__9>>8 2035 0062 008a movwf __pclath 2036 0063 3007 movlw 7 2037 0064 052b andwf main__command,w 2038 ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX) 2039 0065 3e67 addlw main__9 2040 0066 0082 movwf __pcl 2041 ; page_group 8 2042 0067 : main__9: 2043 0067 286f goto main__5 2044 0068 2872 goto main__6 2045 0069 2875 goto main__7 2046 006a 2878 goto main__8 2047 006b 287c goto main__10 2048 006c 287c goto main__10 2049 006d 287c goto main__10 2050 006e 287c goto main__10 2051 ; line_number = 143 2052 ; case 0 2053 006f : main__5: 2054 ; #: 0000 0000 (Set Memory Address): 2055 ; line_number = 145 2056 ; mode := 1 2057 ;info 145, 111 2058 006f 3001 movlw 1 2059 0070 00ad movwf main__mode 2060 0071 287c goto main__10 2061 ; line_number = 146 2062 ; case 1 2063 0072 : main__6: 2064 ; #: 0000 0001 (Read Program Memory): 2065 ; line_number = 148 2066 ; mode := 3 2067 ;info 148, 114 2068 0072 3003 movlw 3 2069 0073 00ad movwf main__mode 2070 0074 287c goto main__10 2071 ; line_number = 149 2072 ; case 2 2073 0075 : main__7: 2074 ; #: 0000 0010 (Set Program Memory): 2075 ; line_number = 151 2076 ; mode := 4 2077 ;info 151, 117 2078 0075 3004 movlw 4 2079 0076 00ad movwf main__mode 2080 0077 287c goto main__10 2081 ; line_number = 152 2082 ; case 3 2083 0078 : main__8: 2084 ; #: 0000 0013 (Execute): 2085 ; line_number = 154 2086 ; _pclath := address_high 2087 ;info 154, 120 2088 0078 0825 movf address_high,w 2089 0079 008a movwf _pclath 2090 ; line_number = 155 2091 ; _pcl := address_low 2092 ;info 155, 122 2093 007a 0826 movf address_low,w 2094 007b 0082 movwf _pcl 2095 007c : main__10: 2096 ; line_number = 141 2097 ; switch command & 7 done 2098 007c : main__14: 2099 ; line_number = 137 2100 ; switch (command >> 3) & 7 done 2101 007c 28af goto main__30 2102 ; line_number = 156 2103 ; case 3 2104 007d : main__27: 2105 ; # 11xx xxxx: 2106 ; line_number = 158 2107 ; switch (command >> 3) & 7 start 2108 ;info 158, 125 2109 ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0 2110 007d 3000 movlw main__23>>8 2111 007e 008a movwf __pclath 2112 0000002e = main__24 equ globals___0+14 2113 007f 0c2b rrf main__command,w 2114 0080 00ae movwf main__24 2115 0081 0cae rrf main__24,f 2116 0082 0c2e rrf main__24,w 2117 0083 3907 andlw 7 2118 ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX) 2119 0084 3e86 addlw main__23 2120 0085 0082 movwf __pcl 2121 ; page_group 8 2122 0086 : main__23: 2123 0086 28af goto main__25 2124 0087 28af goto main__25 2125 0088 28af goto main__25 2126 0089 28af goto main__25 2127 008a 28af goto main__25 2128 008b 28af goto main__25 2129 008c 28af goto main__25 2130 008d 288e goto main__22 2131 ; line_number = 159 2132 ; case 7 2133 008e : main__22: 2134 ; # 1111 1xxx: 2135 ; line_number = 161 2136 ; switch command & 7 start 2137 ;info 161, 142 2138 ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0 2139 008e 3000 movlw main__20>>8 2140 008f 008a movwf __pclath 2141 0090 3007 movlw 7 2142 0091 052b andwf main__command,w 2143 ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX) 2144 0092 3e94 addlw main__20 2145 0093 0082 movwf __pcl 2146 ; page_group 8 2147 0094 : main__20: 2148 0094 28af goto main__21 2149 0095 28af goto main__21 2150 0096 28af goto main__21 2151 0097 28af goto main__21 2152 0098 289c goto main__16 2153 0099 289d goto main__17 2154 009a 28a8 goto main__18 2155 009b 28ac goto main__19 2156 ; line_number = 162 2157 ; case 4 2158 009c : main__16: 2159 ; # 1111 1100 (Address_Set) 2160 009c 28af goto main__21 2161 ; line_number = 164 2162 ; case 5 2163 009d : main__17: 2164 ; # 1111 1101 (Id_Next) 2165 ; line_number = 166 2166 ; transmit := _true 2167 ;info 166, 157 2168 009d 14ef bsf main__transmit___byte, main__transmit___bit 2169 ; line_number = 167 2170 ; result := 0 2171 ;info 167, 158 2172 009e 01ac clrf main__result 2173 ; line_number = 168 2174 ; if id_index < id.size start 2175 ;info 168, 159 2176 009f 301c movlw 28 2177 00a0 0224 subwf id_index,w 2178 ; =>bit_code_emit@symbol(): sym=__c 2179 ; No 1TEST: true.size=0 false.size=4 2180 ; No 2TEST: true.size=0 false.size=4 2181 ; 1GOTO: Single test with GOTO 2182 00a1 1803 btfsc __c___byte, __c___bit 2183 00a2 28a7 goto main__15 2184 ; line_number = 169 2185 ; result := id[id_index] 2186 ;info 169, 163 2187 00a3 0824 movf id_index,w 2188 00a4 2127 call id 2189 00a5 00ac movwf main__result 2190 ; line_number = 170 2191 ; id_index := id_index + 1 2192 ;info 170, 166 2193 00a6 0aa4 incf id_index,f 2194 00a7 : main__15: 2195 ; Recombine size1 = 0 || size2 = 0 2196 ; line_number = 168 2197 ; if id_index < id.size done 2198 ; #result := id_index 2199 00a7 28af goto main__21 2200 ; line_number = 172 2201 ; case 6 2202 00a8 : main__18: 2203 ; # 1111 1110 (Id_Start) 2204 ; line_number = 174 2205 ; id_index := 0 2206 ;info 174, 168 2207 00a8 01a4 clrf id_index 2208 ; line_number = 175 2209 ; result := 0 2210 ;info 175, 169 2211 00a9 01ac clrf main__result 2212 ; line_number = 176 2213 ; transmit := _true 2214 ;info 176, 170 2215 00aa 14ef bsf main__transmit___byte, main__transmit___bit 2216 00ab 28af goto main__21 2217 ; line_number = 177 2218 ; case 7 2219 00ac : main__19: 2220 ; # 1111 1111 (Deselect): 2221 ; line_number = 179 2222 ; result := 0 2223 ;info 179, 172 2224 00ac 01ac clrf main__result 2225 ; line_number = 180 2226 ; transmit := _true 2227 ;info 180, 173 2228 00ad 14ef bsf main__transmit___byte, main__transmit___bit 2229 ; line_number = 181 2230 ; _adden := _true 2231 ;info 181, 174 2232 00ae 1598 bsf _adden___byte, _adden___bit 2233 00af : main__21: 2234 ; line_number = 161 2235 ; switch command & 7 done 2236 00af : main__25: 2237 ; line_number = 158 2238 ; switch (command >> 3) & 7 done 2239 00af : main__30: 2240 ; line_number = 134 2241 ; switch command >> 6 done 2242 00af 2920 goto main__42 2243 ; line_number = 182 2244 ; case 1 2245 00b0 : main__36: 2246 ; # Read Program Memory: Get high address: 2247 ; line_number = 184 2248 ; mode := 2 2249 ;info 184, 176 2250 00b0 3002 movlw 2 2251 00b1 00ad movwf main__mode 2252 ; line_number = 185 2253 ; address_high := command 2254 ;info 185, 178 2255 00b2 082b movf main__command,w 2256 00b3 00a5 movwf address_high 2257 00b4 2920 goto main__42 2258 ; line_number = 186 2259 ; case 2 2260 00b5 : main__37: 2261 ; # Read Program Memory: Get high address: 2262 ; line_number = 188 2263 ; mode := 0 2264 ;info 188, 181 2265 00b5 01ad clrf main__mode 2266 ; line_number = 189 2267 ; address_low := command 2268 ;info 189, 182 2269 00b6 082b movf main__command,w 2270 00b7 00a6 movwf address_low 2271 ; line_number = 190 2272 ; result := 0x5b 2273 ;info 190, 184 2274 00b8 305b movlw 91 2275 00b9 00ac movwf main__result 2276 ; line_number = 191 2277 ; transmit := _true 2278 ;info 191, 186 2279 00ba 14ef bsf main__transmit___byte, main__transmit___bit 2280 00bb 2920 goto main__42 2281 ; line_number = 192 2282 ; case 3 2283 00bc : main__38: 2284 ; # Read Program Memory: Get count: 2285 ; line_number = 194 2286 ; mode := 0 2287 ;info 194, 188 2288 00bc 01ad clrf main__mode 2289 ; line_number = 195 2290 ; count := command 2291 ;info 195, 189 2292 00bd 082b movf main__command,w 2293 00be 00a7 movwf count 2294 2295 ; # Pump the program memory data back: 2296 ; line_number = 198 2297 ; loop_exactly count start 2298 ;info 198, 191 2299 0000002e = main__31 equ globals___0+14 2300 00bf 0827 movf count,w 2301 00c0 00ae movwf main__31 2302 00c1 : main__32: 2303 ; line_number = 199 2304 ; _eeadrh := address_high 2305 ;info 199, 193 2306 00c1 0825 movf address_high,w 2307 00c2 1703 bsf __rp1___byte, __rp1___bit 2308 00c3 008f movwf _eeadrh 2309 ; line_number = 200 2310 ; _eeadr := address_low 2311 ;info 200, 196 2312 00c4 1303 bcf __rp1___byte, __rp1___bit 2313 00c5 0826 movf address_low,w 2314 00c6 1703 bsf __rp1___byte, __rp1___bit 2315 00c7 008d movwf _eeadr 2316 2317 ; # Read the word: 2318 ; line_number = 203 2319 ; _eepgd := _true 2320 ;info 203, 200 2321 00c8 1683 bsf __rp0___byte, __rp0___bit 2322 00c9 178c bsf _eepgd___byte, _eepgd___bit 2323 ; line_number = 204 2324 ; _rd := _true 2325 ;info 204, 202 2326 00ca 140c bsf _rd___byte, _rd___bit 2327 ; # The next two instructions are *ignored*: 2328 ; line_number = 206 2329 ; assemble 2330 ;info 206, 203 2331 ; line_number = 207 2332 ;info 207, 203 2333 00cb 0000 nop 2334 ; Statement 0 of 3 delay = 9 2335 ; line_number = 208 2336 ;info 208, 204 2337 00cc 0000 nop 2338 ; Statement 1 of 3 delay = 10 2339 2340 ; Statement 2 of 3 delay = 10 2341 ; # Ship the results back: 2342 ; line_number = 211 2343 ; call _uart_byte_put(_eedath) 2344 ;info 211, 205 2345 00cd 1283 bcf __rp0___byte, __rp0___bit 2346 00ce 080e movf _eedath,w 2347 00cf 1303 bcf __rp1___byte, __rp1___bit 2348 00d0 2175 call _uart_byte_put 2349 ; line_number = 212 2350 ; call _uart_byte_get() 2351 ;info 212, 209 2352 00d1 2156 call _uart_byte_get 2353 ; line_number = 213 2354 ; call _uart_byte_put(_eedata) 2355 ;info 213, 210 2356 00d2 1703 bsf __rp1___byte, __rp1___bit 2357 00d3 080c movf _eedata,w 2358 00d4 1303 bcf __rp1___byte, __rp1___bit 2359 00d5 2175 call _uart_byte_put 2360 ; line_number = 214 2361 ; call _uart_byte_get() 2362 ;info 214, 214 2363 00d6 2156 call _uart_byte_get 2364 2365 ; line_number = 216 2366 ; address_low := address_low + 1 2367 ;info 216, 215 2368 00d7 0aa6 incf address_low,f 2369 ; line_number = 217 2370 ; if _z start 2371 ;info 217, 216 2372 ; =>bit_code_emit@symbol(): sym=_z 2373 ; 1TEST: Single test with code in skip slot 2374 00d8 1903 btfsc _z___byte, _z___bit 2375 ; line_number = 218 2376 ; address_high := address_high + 1 2377 ;info 218, 217 2378 00d9 0aa5 incf address_high,f 2379 ; Recombine size1 = 0 || size2 = 0 2380 ; line_number = 217 2381 ; if _z done 2382 ; line_number = 198 2383 ; loop_exactly count wrap-up 2384 00da 0bae decfsz main__31,f 2385 00db 28c1 goto main__32 2386 ; line_number = 198 2387 ; loop_exactly count done 2388 ; line_number = 219 2389 ; result := 0x5c 2390 ;info 219, 220 2391 00dc 305c movlw 92 2392 00dd 00ac movwf main__result 2393 ; line_number = 220 2394 ; transmit := _true 2395 ;info 220, 222 2396 00de 14ef bsf main__transmit___byte, main__transmit___bit 2397 00df 2920 goto main__42 2398 ; line_number = 221 2399 ; case 4 2400 00e0 : main__39: 2401 ; # Set Program Memory; Get {byte_high}: 2402 ; line_number = 223 2403 ; mode := 5 2404 ;info 223, 224 2405 00e0 3005 movlw 5 2406 00e1 00ad movwf main__mode 2407 ; line_number = 224 2408 ; byte_high := command 2409 ;info 224, 226 2410 00e2 082b movf main__command,w 2411 00e3 00a9 movwf main__byte_high 2412 00e4 2920 goto main__42 2413 ; line_number = 225 2414 ; case 5 2415 00e5 : main__40: 2416 ; # Set Program Memory; Get {byte_low}: 2417 ; line_number = 227 2418 ; mode := 0 2419 ;info 227, 229 2420 00e5 01ad clrf main__mode 2421 ; line_number = 228 2422 ; byte_low := command 2423 ;info 228, 230 2424 00e6 082b movf main__command,w 2425 00e7 00aa movwf main__byte_low 2426 2427 ; # Fry it in: 2428 ; line_number = 231 2429 ; _eedath := byte_high 2430 ;info 231, 232 2431 00e8 0829 movf main__byte_high,w 2432 00e9 1703 bsf __rp1___byte, __rp1___bit 2433 00ea 008e movwf _eedath 2434 ; line_number = 232 2435 ; _eedata := byte_low 2436 ;info 232, 235 2437 00eb 1303 bcf __rp1___byte, __rp1___bit 2438 00ec 082a movf main__byte_low,w 2439 00ed 1703 bsf __rp1___byte, __rp1___bit 2440 00ee 008c movwf _eedata 2441 ; line_number = 233 2442 ; _eeadrh := address_high 2443 ;info 233, 239 2444 00ef 1303 bcf __rp1___byte, __rp1___bit 2445 00f0 0825 movf address_high,w 2446 00f1 1703 bsf __rp1___byte, __rp1___bit 2447 00f2 008f movwf _eeadrh 2448 ; line_number = 234 2449 ; _eeadr := address_low 2450 ;info 234, 243 2451 00f3 1303 bcf __rp1___byte, __rp1___bit 2452 00f4 0826 movf address_low,w 2453 00f5 1703 bsf __rp1___byte, __rp1___bit 2454 00f6 008d movwf _eeadr 2455 2456 ; # Remember to get the WRT bit in the configuration 2457 ; # word set -- "configure wrt=on" 2458 2459 ; # Write the word: 2460 ; line_number = 240 2461 ; _eepgd := _true 2462 ;info 240, 247 2463 00f7 1683 bsf __rp0___byte, __rp0___bit 2464 00f8 178c bsf _eepgd___byte, _eepgd___bit 2465 ; line_number = 241 2466 ; _wren := _true 2467 ;info 241, 249 2468 00f9 150c bsf _wren___byte, _wren___bit 2469 ; line_number = 242 2470 ; _eecon2 := 0x55 2471 ;info 242, 250 2472 00fa 3055 movlw 85 2473 00fb 008d movwf _eecon2 2474 ; line_number = 243 2475 ; _eecon2 := 0xaa 2476 ;info 243, 252 2477 00fc 30aa movlw 170 2478 00fd 008d movwf _eecon2 2479 ; line_number = 244 2480 ; _wr := _true 2481 ;info 244, 254 2482 00fe 148c bsf _wr___byte, _wr___bit 2483 ; # The next two instructions are *ignored*: 2484 ; line_number = 246 2485 ; assemble 2486 ;info 246, 255 2487 ; line_number = 247 2488 ;info 247, 255 2489 00ff 0000 nop 2490 ; line_number = 248 2491 ;info 248, 256 2492 0100 0000 nop 2493 ; line_number = 249 2494 ; _wren := _true 2495 ;info 249, 257 2496 0101 150c bsf _wren___byte, _wren___bit 2497 2498 ; # Now read it back: 2499 2500 ; # Read the word: 2501 ; line_number = 254 2502 ; _eepgd := _true 2503 ;info 254, 258 2504 0102 178c bsf _eepgd___byte, _eepgd___bit 2505 ; line_number = 255 2506 ; _rd := _true 2507 ;info 255, 259 2508 0103 140c bsf _rd___byte, _rd___bit 2509 ; # The next two instructions are *ignored*: 2510 ; line_number = 257 2511 ; assemble 2512 ;info 257, 260 2513 ; line_number = 258 2514 ;info 258, 260 2515 0104 0000 nop 2516 ; line_number = 259 2517 ;info 259, 261 2518 0105 0000 nop 2519 2520 ; # Send the result code back: 2521 ; line_number = 262 2522 ; result := 0x5f 2523 ;info 262, 262 2524 0106 305f movlw 95 2525 0107 1283 bcf __rp0___byte, __rp0___bit 2526 0108 1303 bcf __rp1___byte, __rp1___bit 2527 0109 00ac movwf main__result 2528 ; line_number = 263 2529 ; if _eedath != byte_high start 2530 ;info 263, 266 2531 ; Left minus Right 2532 010a 0829 movf main__byte_high,w 2533 010b 1703 bsf __rp1___byte, __rp1___bit 2534 010c 020e subwf _eedath,w 2535 ; =>bit_code_emit@symbol(): sym=__z 2536 ; No 1TEST: true.size=0 false.size=2 2537 ; No 2TEST: true.size=0 false.size=2 2538 ; 1GOTO: Single test with GOTO 2539 010d 1903 btfsc __z___byte, __z___bit 2540 010e 2912 goto main__33 2541 010f 1303 bcf __rp1___byte, __rp1___bit 2542 ; line_number = 264 2543 ; result := 0x5e 2544 ;info 264, 272 2545 0110 305e movlw 94 2546 0111 00ac movwf main__result 2547 0112 : main__33: 2548 ; Recombine size1 = 0 || size2 = 0 2549 ; line_number = 263 2550 ; if _eedath != byte_high done 2551 ; line_number = 265 2552 ; if _eedata != byte_low start 2553 ;info 265, 274 2554 ; Left minus Right 2555 0112 1303 bcf __rp1___byte, __rp1___bit 2556 0113 082a movf main__byte_low,w 2557 0114 1703 bsf __rp1___byte, __rp1___bit 2558 0115 020c subwf _eedata,w 2559 ; =>bit_code_emit@symbol(): sym=__z 2560 ; No 1TEST: true.size=0 false.size=2 2561 ; No 2TEST: true.size=0 false.size=2 2562 ; 1GOTO: Single test with GOTO 2563 0116 1903 btfsc __z___byte, __z___bit 2564 0117 291b goto main__34 2565 0118 1303 bcf __rp1___byte, __rp1___bit 2566 ; line_number = 266 2567 ; result := 0x5d 2568 ;info 266, 281 2569 0119 305d movlw 93 2570 011a 00ac movwf main__result 2571 011b : main__34: 2572 ; Recombine size1 = 0 || size2 = 0 2573 ; line_number = 265 2574 ; if _eedata != byte_low done 2575 ; line_number = 267 2576 ; transmit := _true 2577 ;info 267, 283 2578 011b 1303 bcf __rp1___byte, __rp1___bit 2579 011c 14ef bsf main__transmit___byte, main__transmit___bit 2580 2581 ; # Bump the address: 2582 ; line_number = 270 2583 ; address_low := address_low + 1 2584 ;info 270, 285 2585 011d 0aa6 incf address_low,f 2586 ; line_number = 271 2587 ; if _z start 2588 ;info 271, 286 2589 ; =>bit_code_emit@symbol(): sym=_z 2590 ; 1TEST: Single test with code in skip slot 2591 011e 1903 btfsc _z___byte, _z___bit 2592 ; line_number = 272 2593 ; address_high := address_high + 1 2594 ;info 272, 287 2595 011f 0aa5 incf address_high,f 2596 2597 ; Recombine size1 = 0 || size2 = 0 2598 ; line_number = 271 2599 ; if _z done 2600 0120 : main__42: 2601 ; line_number = 131 2602 ; switch mode done 2603 0120 : main__46: 2604 ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:00=uu=>00) 2605 ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:00=uu=>00) 2606 ; 2GOTO: code final bitstates:(data:00=uu=>00 code:00=uu=>00) 2607 ; line_number = 118 2608 ; if rx9d done 2609 ; line_number = 274 2610 ; if transmit start 2611 ;info 274, 288 2612 ; =>bit_code_emit@symbol(): sym=main__transmit 2613 ; No 1TEST: true.size=4 false.size=0 2614 ; No 2TEST: true.size=4 false.size=0 2615 ; 1GOTO: Single test with GOTO 2616 0120 1cef btfss main__transmit___byte, main__transmit___bit 2617 0121 2926 goto main__47 2618 ; line_number = 275 2619 ; transmit := _true 2620 ;info 275, 290 2621 0122 14ef bsf main__transmit___byte, main__transmit___bit 2622 ; # Send the result byte: 2623 ; line_number = 277 2624 ; call _uart_byte_put(result) 2625 ;info 277, 291 2626 0123 082c movf main__result,w 2627 0124 2175 call _uart_byte_put 2628 2629 ; # Dispose of echoed command in buffer: 2630 ; line_number = 280 2631 ; call _uart_byte_get() 2632 ;info 280, 293 2633 0125 2156 call _uart_byte_get 2634 2635 2636 ; Recombine size1 = 0 || size2 = 0 2637 0126 : main__47: 2638 ; line_number = 274 2639 ; if transmit done 2640 ; line_number = 109 2641 ; loop_forever wrap-up 2642 0126 2822 goto main__3 2643 ; line_number = 109 2644 ; loop_forever done 2645 ; delay after procedure statements=non-uniform 2646 2647 2648 2649 2650 ; line_number = 283 2651 ; string id = "\16,0,28,1,3,14\Controller28-A\7\Gramson" start 2652 ; id = '\16,0,28,1,3,14\Controller28-A\7\Gramson' 2653 0127 : id: 2654 ; Temporarily save index into FSR 2655 0127 0084 movwf __fsr 2656 ; Initialize PCLATH to point to this code page 2657 0128 3001 movlw id___base>>8 2658 0129 008a movwf __pclath 2659 ; Restore index from FSR 2660 012a 0804 movf __fsr,w 2661 012b 3e2d addlw id___base 2662 ; Index to the correct return value 2663 012c 0082 movwf __pcl 2664 ; page_group 28 2665 012d : id___base: 2666 012d 3410 retlw 16 2667 012e 3400 retlw 0 2668 012f 341c retlw 28 2669 0130 3401 retlw 1 2670 0131 3403 retlw 3 2671 0132 340e retlw 14 2672 0133 3443 retlw 67 2673 0134 346f retlw 111 2674 0135 346e retlw 110 2675 0136 3474 retlw 116 2676 0137 3472 retlw 114 2677 0138 346f retlw 111 2678 0139 346c retlw 108 2679 013a 346c retlw 108 2680 013b 3465 retlw 101 2681 013c 3472 retlw 114 2682 013d 3432 retlw 50 2683 013e 3438 retlw 56 2684 013f 342d retlw 45 2685 0140 3441 retlw 65 2686 0141 3407 retlw 7 2687 0142 3447 retlw 71 2688 0143 3472 retlw 114 2689 0144 3461 retlw 97 2690 0145 346d retlw 109 2691 0146 3473 retlw 115 2692 0147 346f retlw 111 2693 0148 346e retlw 110 2694 ; line_number = 283 2695 ; string id = "\16,0,28,1,3,14\Controller28-A\7\Gramson" start 2696 2697 2698 2699 2700 2701 ; Appending 7 delayed procedures to code bank 0 2702 ; buffer = '_uart' 2703 ; line_number = 7 2704 ;info 7, 329 2705 ; procedure _uart_byte_safe_get 2706 0149 : _uart_byte_safe_get: 2707 ; arguments_none 2708 ; line_number = 9 2709 ; returns byte 2710 2711 ; # This procedure will the next byte from UART. If no byte 2712 ; # received in a reasonable time, 0xfc is returned. 2713 2714 ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:00=uu=>00) 2715 ; line_number = 14 2716 ; loop_exactly 255 start 2717 ;info 14, 329 2718 0000002f = _uart_byte_safe_get__1 equ globals___0+15 2719 0149 30ff movlw 255 2720 014a 00af movwf _uart_byte_safe_get__1 2721 014b : _uart_byte_safe_get__2: 2722 ; line_number = 15 2723 ; loop_exactly 255 start 2724 ;info 15, 331 2725 00000030 = _uart_byte_safe_get__3 equ globals___0+16 2726 014b 30ff movlw 255 2727 014c 00b0 movwf _uart_byte_safe_get__3 2728 014d : _uart_byte_safe_get__4: 2729 ; line_number = 16 2730 ; if _rcif start 2731 ;info 16, 333 2732 ; =>bit_code_emit@symbol(): sym=_rcif 2733 ; No 1TEST: true.size=2 false.size=0 2734 ; No 2TEST: true.size=2 false.size=0 2735 ; 1GOTO: Single test with GOTO 2736 014d 1e8c btfss _rcif___byte, _rcif___bit 2737 014e 2951 goto _uart_byte_safe_get__5 2738 ; line_number = 17 2739 ; return _rcreg start 2740 ; line_number = 17 2741 ;info 17, 335 2742 014f 081a movf _rcreg,w 2743 0150 0008 return 2744 ; line_number = 17 2745 ; return _rcreg done 2746 ; Recombine size1 = 0 || size2 = 0 2747 0151 : _uart_byte_safe_get__5: 2748 ; line_number = 16 2749 ; if _rcif done 2750 ; line_number = 15 2751 ; loop_exactly 255 wrap-up 2752 0151 0bb0 decfsz _uart_byte_safe_get__3,f 2753 0152 294d goto _uart_byte_safe_get__4 2754 ; line_number = 15 2755 ; loop_exactly 255 done 2756 ; line_number = 14 2757 ; loop_exactly 255 wrap-up 2758 0153 0baf decfsz _uart_byte_safe_get__1,f 2759 0154 294b goto _uart_byte_safe_get__2 2760 ; line_number = 14 2761 ; loop_exactly 255 done 2762 ; line_number = 18 2763 ; return 0xfc start 2764 ; line_number = 18 2765 ;info 18, 341 2766 0155 34fc retlw 252 2767 ; line_number = 18 2768 ; return 0xfc done 2769 2770 2771 ; delay after procedure statements=non-uniform 2772 2773 2774 2775 2776 ; line_number = 21 2777 ;info 21, 342 2778 ; procedure _uart_byte_get 2779 0156 : _uart_byte_get: 2780 ; arguments_none 2781 ; line_number = 23 2782 ; returns byte 2783 2784 ; # This procedure will return the next byte from the UART. 2785 2786 ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:00=uu=>00) 2787 ; line_number = 27 2788 ; while !_rcif start 2789 0156 : _uart_byte_get__1: 2790 ;info 27, 342 2791 ; =>bit_code_emit@symbol(): sym=_rcif 2792 ; 1TEST: Single test with code in skip slot 2793 0156 1e8c btfss _rcif___byte, _rcif___bit 2794 ; line_number = 28 2795 ; do_nothing 2796 ;info 28, 343 2797 0157 2956 goto _uart_byte_get__1 2798 ; Recombine size1 = 0 || size2 = 0 2799 ; line_number = 27 2800 ; while !_rcif done 2801 ; line_number = 29 2802 ; return _rcreg start 2803 ; line_number = 29 2804 ;info 29, 344 2805 0158 081a movf _rcreg,w 2806 0159 0008 return 2807 ; line_number = 29 2808 ; return _rcreg done 2809 2810 2811 ; delay after procedure statements=non-uniform 2812 2813 2814 2815 2816 ; line_number = 32 2817 ;info 32, 346 2818 ; procedure _uart_hex_put 2819 015a : _uart_hex_put: 2820 ; Last argument is sitting in W; save into argument variable 2821 015a 00a0 movwf _uart_hex_put__value 2822 ; delay=4294967295 2823 ; line_number = 33 2824 ; argument value byte 2825 00000020 = _uart_hex_put__value equ globals___0 2826 ; line_number = 34 2827 ; returns_nothing 2828 2829 ; # This procedure will output {value} to the UART as a 2-digit 2830 ; # hexadecimal number. 2831 2832 ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:00=uu=>00) 2833 ; line_number = 39 2834 ; call _uart_nibble_put(value >> 4) 2835 ;info 39, 347 2836 00000031 = _uart_hex_put__1 equ globals___0+17 2837 015b 0e20 swapf _uart_hex_put__value,w 2838 015c 390f andlw 15 2839 015d 2162 call _uart_nibble_put 2840 ; line_number = 40 2841 ; call _uart_nibble_put(value & 0xf) 2842 ;info 40, 350 2843 015e 300f movlw 15 2844 015f 0520 andwf _uart_hex_put__value,w 2845 0160 2162 call _uart_nibble_put 2846 2847 2848 ; delay after procedure statements=non-uniform 2849 ; Implied return 2850 0161 3400 retlw 0 2851 2852 2853 2854 2855 ; line_number = 43 2856 ;info 43, 354 2857 ; procedure _uart_nibble_put 2858 0162 : _uart_nibble_put: 2859 ; Last argument is sitting in W; save into argument variable 2860 0162 00a1 movwf _uart_nibble_put__nibble 2861 ; delay=4294967295 2862 ; line_number = 44 2863 ; argument nibble byte 2864 00000021 = _uart_nibble_put__nibble equ globals___0+1 2865 ; line_number = 45 2866 ; returns_nothing 2867 2868 ; # This procedure will output {value} to UART as a 1 digit 2869 ; # hexadecimal number. 2870 2871 ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:00=uu=>00) 2872 ; line_number = 50 2873 ; if nibble < 10 start 2874 ;info 50, 355 2875 0163 300a movlw 10 2876 0164 0221 subwf _uart_nibble_put__nibble,w 2877 ; =>bit_code_emit@symbol(): sym=__c 2878 ; No 1TEST: true.size=1 false.size=1 2879 ; 2TEST: two tests with code in both delay slots 2880 0165 1803 btfsc __c___byte, __c___bit 2881 ; line_number = 53 2882 ; nibble := nibble - 10 + 'A' 2883 ;info 53, 358 2884 0166 3037 movlw 55 2885 0167 1c03 btfss __c___byte, __c___bit 2886 ; line_number = 51 2887 ; nibble := nibble + '0' 2888 ;info 51, 360 2889 0168 3030 movlw 48 2890 0169 07a1 addwf _uart_nibble_put__nibble,f 2891 ; line_number = 50 2892 ; if nibble < 10 done 2893 ; line_number = 54 2894 ; call _uart_byte_put(nibble) 2895 ;info 54, 362 2896 016a 0821 movf _uart_nibble_put__nibble,w 2897 016b 2175 call _uart_byte_put 2898 2899 2900 ; delay after procedure statements=non-uniform 2901 ; Implied return 2902 016c 3400 retlw 0 2903 2904 2905 2906 2907 ; line_number = 57 2908 ;info 57, 365 2909 ; procedure _uart_space_put 2910 016d : _uart_space_put: 2911 ; arguments_none 2912 ; line_number = 59 2913 ; returns_nothing 2914 2915 ; # This procedure will output a space to the UART. 2916 2917 ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:00=uu=>00) 2918 ; line_number = 63 2919 ; call _uart_byte_put(' ') 2920 ;info 63, 365 2921 016d 3020 movlw 32 2922 016e 2175 call _uart_byte_put 2923 2924 2925 ; delay after procedure statements=non-uniform 2926 ; Implied return 2927 016f 3400 retlw 0 2928 2929 2930 2931 2932 ; line_number = 66 2933 ;info 66, 368 2934 ; procedure _uart_crlf_put 2935 0170 : _uart_crlf_put: 2936 ; arguments_none 2937 ; line_number = 68 2938 ; returns_nothing 2939 2940 ; # This procedure will output a carriage return line feed sequecne to 2941 ; # the UART. 2942 2943 ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:00=uu=>00) 2944 ; line_number = 73 2945 ; call _uart_byte_put('\cr\') 2946 ;info 73, 368 2947 0170 300d movlw 13 2948 0171 2175 call _uart_byte_put 2949 ; line_number = 74 2950 ; call _uart_byte_put('\lf\') 2951 ;info 74, 370 2952 0172 300a movlw 10 2953 0173 2175 call _uart_byte_put 2954 2955 2956 ; delay after procedure statements=non-uniform 2957 ; Implied return 2958 0174 3400 retlw 0 2959 2960 2961 2962 2963 ; line_number = 77 2964 ;info 77, 373 2965 ; procedure _uart_byte_put 2966 0175 : _uart_byte_put: 2967 ; Last argument is sitting in W; save into argument variable 2968 0175 00a2 movwf _uart_byte_put__byte 2969 ; delay=4294967295 2970 ; line_number = 78 2971 ; argument byte byte 2972 00000022 = _uart_byte_put__byte equ globals___0+2 2973 ; line_number = 79 2974 ; returns_nothing 2975 2976 ; # This procedure will send {byte} out using to the UART. 2977 2978 ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:00=uu=>00) 2979 ; line_number = 83 2980 ; while !_txif start 2981 0176 : _uart_byte_put__1: 2982 ;info 83, 374 2983 ; =>bit_code_emit@symbol(): sym=_txif 2984 ; 1TEST: Single test with code in skip slot 2985 0176 1e0c btfss _txif___byte, _txif___bit 2986 ; line_number = 84 2987 ; do_nothing 2988 ;info 84, 375 2989 0177 2976 goto _uart_byte_put__1 2990 ; Recombine size1 = 0 || size2 = 0 2991 ; line_number = 83 2992 ; while !_txif done 2993 ; line_number = 85 2994 ; _txreg := byte 2995 ;info 85, 376 2996 0178 0822 movf _uart_byte_put__byte,w 2997 0179 0099 movwf _txreg 2998 2999 3000 ; delay after procedure statements=non-uniform 3001 ; Implied return 3002 017a 3400 retlw 0 3003 3004 3005 3006 3007 ; Code bank 1; Start address: 2048; End address: 4095 3008 0800 : org 2048 3009 ; Code bank 2; Start address: 4096; End address: 6143 3010 1000 : org 4096 3011 ; Code bank 3; Start address: 6144; End address: 8191 3012 1800 : org 6144 3013 ; Configuration bits 3014 ; address = 0x2007, fill = 0x400 3015 ; cp = off (0x3030) 3016 ; debug = off (0x800) 3017 ; wrt = on (0x200) 3018 ; cpd = off (0x100) 3019 ; lvp = off (0x0) 3020 ; boden = off (0x0) 3021 ; pwrte = off (0x8) 3022 ; wdte = off (0x0) 3023 ; fosc = hs (0x2) 3024 ; 16186 = 0x3f3a 3025 3f3a = __config 16186 3026 ; Define start addresses for data regions 3027 ; Region="shared___globals" Address=112" Size=16 Bytes=0 Bits=0 Available=16 3028 ; Region="globals___0" Address=32" Size=80 Bytes=18 Bits=2 Available=61 3029 ; Region="globals___1" Address=160" Size=80 Bytes=0 Bits=0 Available=80 3030 ; Region="globals___2" Address=272" Size=96 Bytes=0 Bits=0 Available=96 3031 ; Region="globals___3" Address=400" Size=112 Bytes=0 Bits=0 Available=112 3032 end