1 radix dec 2 ; Code bank 0; Start address: 0; End address: 1023 3 0000 : org 0 4 5 ; Define start addresses for data regions 6 00000020 = shared___globals equ 32 7 00000000 = __indf equ 0 8 00000002 = __pcl equ 2 9 00000003 = __status equ 3 10 00000004 = __fsr equ 4 11 00000003 = __c___byte equ 3 12 00000000 = __c___bit equ 0 13 00000003 = __z___byte equ 3 14 00000002 = __z___bit equ 2 15 00000003 = __rp0___byte equ 3 16 00000005 = __rp0___bit equ 5 17 00000003 = __rp1___byte equ 3 18 00000006 = __rp1___bit equ 6 19 00000003 = __irp___byte equ 3 20 00000007 = __irp___bit equ 7 21 0000000a = __pclath equ 10 22 0000000a = __cb0___byte equ 10 23 00000003 = __cb0___bit equ 3 24 0000000a = __cb1___byte equ 10 25 00000004 = __cb1___bit equ 4 26 27 ; # Copyright (c) 2000-2004 by Wayne C. Gramlich 28 ; # All rights reserved. 29 30 ; # This program contains the firmware for the Switch8 (revision E) 31 ; # module. 32 33 ; buffer = 'switch8' 34 ; line_number = 9 35 ; library _pic16f630 entered 36 ; # Copyright (c) 2004 by Wayne C. Gramlich 37 ; # All rights reserved. 38 39 ; buffer = '_pic16f630' 40 ; line_number = 5 41 ; processor pic16f630 42 ; line_number = 6 43 ; configure_address 0x2007 44 ; line_number = 7 45 ; configure_fill 0x0000 46 ; line_number = 8 47 ; configure_option bg: bg11 = 0x3000 48 ; line_number = 9 49 ; configure_option bg: bg10 = 0x2000 50 ; line_number = 10 51 ; configure_option bg: bg01 = 0x1000 52 ; line_number = 11 53 ; configure_option bg: bg00 = 0x0000 54 ; line_number = 12 55 ; configure_option cpd: on = 0x000 56 ; line_number = 13 57 ; configure_option cpd: off = 0x100 58 ; line_number = 14 59 ; configure_option cp: on = 0x00 60 ; line_number = 15 61 ; configure_option cp: off = 0x80 62 ; line_number = 16 63 ; configure_option boden: on = 0x40 64 ; line_number = 17 65 ; configure_option boden: off = 0x00 66 ; line_number = 18 67 ; configure_option mclre: on = 0x20 68 ; line_number = 19 69 ; configure_option mclre: off = 0x00 70 ; line_number = 20 71 ; configure_option pwrte: on = 0x00 72 ; line_number = 21 73 ; configure_option pwrte: off = 0x10 74 ; line_number = 22 75 ; configure_option wdte: on = 8 76 ; line_number = 23 77 ; configure_option wdte: off = 0 78 ; line_number = 24 79 ; configure_option fosc: rc_clk = 7 80 ; line_number = 25 81 ; configure_option fosc: rc_no_clk = 6 82 ; line_number = 26 83 ; configure_option fosc: int_clk = 5 84 ; line_number = 27 85 ; configure_option fosc: int_no_clk = 4 86 ; line_number = 28 87 ; configure_option fosc: ec = 3 88 ; line_number = 29 89 ; configure_option fosc: hs = 2 90 ; line_number = 30 91 ; configure_option fosc: xt = 1 92 ; line_number = 31 93 ; configure_option fosc: lp = 0 94 ; line_number = 32 95 ; code_bank 0x0 : 0x3ff 96 ; line_number = 33 97 ; data_bank 0x0 : 0x7f 98 ; line_number = 34 99 ; data_bank 0x80 : 0xff 100 ; line_number = 35 101 ; shared_region 0x20 : 0x5f 102 ; line_number = 36 103 ; interrupts_possible 104 ; line_number = 37 105 ; osccal_register_symbol _osccal 106 ; line_number = 38 107 ; osccal_at_address 0x3ff 108 ; line_number = 39 109 ; packages pdip=14, soic=14, tssop=14 110 ; line_number = 40 111 ; pin vdd, power_supply 112 ; line_number = 41 113 ; pin_bindings pdip=1, soic=1, tssop=1 114 ; line_number = 42 115 ; pin ra5_in, ra5_out, t1cki, osc1, clkin, ra5_unused 116 ; line_number = 43 117 ; pin_bindings pdip=2, soic=2, tssop=2 118 ; line_number = 44 119 ; bind_to _porta@5 120 ; line_number = 45 121 ; or_if ra5_in _trisa 16 122 ; line_number = 46 123 ; or_if ra5_out _trisa 0 124 ; line_number = 47 125 ; pin ra4_in, ra4_out, t1g, osc2, clkout, ra4_unused 126 ; line_number = 48 127 ; pin_bindings pdip=3, soic=3, tssop=3 128 ; line_number = 49 129 ; bind_to _porta@4 130 ; line_number = 50 131 ; or_if ra4_in _trisa 8 132 ; line_number = 51 133 ; or_if ra4_out _trisa 0 134 ; line_number = 52 135 ; pin ra3_in, mclr, vpp, ra3_unused 136 ; line_number = 53 137 ; pin_bindings pdip=4, soic=4, tssop=4 138 ; line_number = 54 139 ; bind_to _porta@3 140 ; line_number = 55 141 ; or_if ra3_in _trisa 4 142 ; line_number = 56 143 ; pin rc5_in, rc5_out, rc5_unused 144 ; line_number = 57 145 ; pin_bindings pdip=5, soic=5, tssop=5 146 ; line_number = 58 147 ; bind_to _portc@5 148 ; line_number = 59 149 ; or_if rc5_in _trisc 32 150 ; line_number = 60 151 ; or_if rc5_out _trisc 0 152 ; line_number = 61 153 ; pin rc4_in, rc4_out, rc4_unused 154 ; line_number = 62 155 ; pin_bindings pdip=6, soic=6, tssop=6 156 ; line_number = 63 157 ; bind_to _portc@4 158 ; line_number = 64 159 ; or_if rc4_in _trisc 16 160 ; line_number = 65 161 ; or_if rc4_out _trisc 0 162 ; line_number = 66 163 ; pin rc3_in, rc3_out, r3_unused 164 ; line_number = 67 165 ; pin_bindings pdip=7, soic=7, tssop=7 166 ; line_number = 68 167 ; bind_to _portc@3 168 ; line_number = 69 169 ; or_if rc3_in _trisc 8 170 ; line_number = 70 171 ; or_if rc3_out _trisc 0 172 ; line_number = 71 173 ; pin rc2_in, rc2_out, rc2_unused 174 ; line_number = 72 175 ; pin_bindings pdip=8, soic=8, tssop=8 176 ; line_number = 73 177 ; bind_to _portc@2 178 ; line_number = 74 179 ; or_if rc2_in _trisc 4 180 ; line_number = 75 181 ; or_if rc2_out _trisc 0 182 ; line_number = 76 183 ; pin rc1_in, rc1_out, rc1_unused 184 ; line_number = 77 185 ; pin_bindings pdip=9, soic=9, tssop=9 186 ; line_number = 78 187 ; bind_to _portc@1 188 ; line_number = 79 189 ; or_if rc1_in _trisc 2 190 ; line_number = 80 191 ; or_if rc1_out _trisc 0 192 ; line_number = 81 193 ; pin rc0_in, rc0_out, rc0_unused 194 ; line_number = 82 195 ; pin_bindings pdip=10, soic=10, tssop=10 196 ; line_number = 83 197 ; bind_to _portc@0 198 ; line_number = 84 199 ; or_if rc0_in _trisc 1 200 ; line_number = 85 201 ; or_if rc0_out _trisc 0 202 ; line_number = 86 203 ; pin ra2_in, ra2_out, cout, t0cki, int, ra2_unused 204 ; line_number = 87 205 ; pin_bindings pdip=11, soic=11, tssop=11 206 ; line_number = 88 207 ; bind_to _porta@2 208 ; line_number = 89 209 ; or_if ra2_in _trisa 4 210 ; line_number = 90 211 ; or_if ra2_out _trisa 0 212 ; line_number = 91 213 ; pin ra1_in, ra1_out, cin_minus, vref, icspclk, ra1_unused 214 ; line_number = 92 215 ; pin_bindings pdip=12, soic=12, tssop=12 216 ; line_number = 93 217 ; bind_to _porta@1 218 ; line_number = 94 219 ; or_if ra1_in _trisa 2 220 ; line_number = 95 221 ; or_if ra1_out _trisa 0 222 ; line_number = 96 223 ; pin ra0_in, ra0_out, cin_plus, icspdat, ra0_unused 224 ; line_number = 97 225 ; pin_bindings pdip=13, soic=13, tssop=13 226 ; line_number = 98 227 ; bind_to _porta@0 228 ; line_number = 99 229 ; or_if ra0_in _trisa 1 230 ; line_number = 100 231 ; or_if ra0_out _trisa 0 232 ; line_number = 101 233 ; pin vss, ground 234 ; line_number = 102 235 ; pin_bindings pdip=14, soic=14, tssop=14 236 237 238 ; line_number = 107 239 ; library _pic16f630_676 entered 240 ; # Copyright (c) 2004 by Wayne C. Gramlich 241 ; # All rights reserved. 242 243 ; # Shared register definitions for the PIC16F630 and PIC16F676. 244 245 ; buffer = '_pic16f630_676' 246 ; line_number = 7 247 ; register _indf = 248 00000000 = _indf equ 0 249 250 ; line_number = 9 251 ; register _tmr0 = 252 00000001 = _tmr0 equ 1 253 254 ; line_number = 11 255 ; register _pcl = 256 00000002 = _pcl equ 2 257 258 ; line_number = 13 259 ; register _status = 260 00000003 = _status equ 3 261 ; line_number = 14 262 ; bind _rp0 = _status@5 263 00000003 = _rp0___byte equ _status 264 00000005 = _rp0___bit equ 5 265 ; line_number = 15 266 ; bind _to = _status@4 267 00000003 = _to___byte equ _status 268 00000004 = _to___bit equ 4 269 ; line_number = 16 270 ; bind _pd = _status@3 271 00000003 = _pd___byte equ _status 272 00000003 = _pd___bit equ 3 273 ; line_number = 17 274 ; bind _z = _status@2 275 00000003 = _z___byte equ _status 276 00000002 = _z___bit equ 2 277 ; line_number = 18 278 ; bind _dc = _status@1 279 00000003 = _dc___byte equ _status 280 00000001 = _dc___bit equ 1 281 ; line_number = 19 282 ; bind _c = _status@0 283 00000003 = _c___byte equ _status 284 00000000 = _c___bit equ 0 285 286 ; line_number = 21 287 ; register _fsr = 288 00000004 = _fsr equ 4 289 290 ; line_number = 23 291 ; register _porta = 292 00000005 = _porta equ 5 293 ; line_number = 24 294 ; register _ra = 295 00000005 = _ra equ 5 296 ; line_number = 25 297 ; bind _ra5 = _porta@5 298 00000005 = _ra5___byte equ _porta 299 00000005 = _ra5___bit equ 5 300 ; line_number = 26 301 ; bind _ra4 = _porta@4 302 00000005 = _ra4___byte equ _porta 303 00000004 = _ra4___bit equ 4 304 ; line_number = 27 305 ; bind _ra3 = _porta@3 306 00000005 = _ra3___byte equ _porta 307 00000003 = _ra3___bit equ 3 308 ; line_number = 28 309 ; bind _ra2 = _porta@2 310 00000005 = _ra2___byte equ _porta 311 00000002 = _ra2___bit equ 2 312 ; line_number = 29 313 ; bind _ra1 = _porta@1 314 00000005 = _ra1___byte equ _porta 315 00000001 = _ra1___bit equ 1 316 ; line_number = 30 317 ; bind _ra0 = _porta@0 318 00000005 = _ra0___byte equ _porta 319 00000000 = _ra0___bit equ 0 320 321 ; line_number = 32 322 ; register _portc = 323 00000007 = _portc equ 7 324 ; line_number = 33 325 ; register _rc = 326 00000007 = _rc equ 7 327 ; line_number = 34 328 ; bind _rc5 = _portc@5 329 00000007 = _rc5___byte equ _portc 330 00000005 = _rc5___bit equ 5 331 ; line_number = 35 332 ; bind _rc4 = _portc@4 333 00000007 = _rc4___byte equ _portc 334 00000004 = _rc4___bit equ 4 335 ; line_number = 36 336 ; bind _rc3 = _portc@3 337 00000007 = _rc3___byte equ _portc 338 00000003 = _rc3___bit equ 3 339 ; line_number = 37 340 ; bind _rc2 = _portc@2 341 00000007 = _rc2___byte equ _portc 342 00000002 = _rc2___bit equ 2 343 ; line_number = 38 344 ; bind _rc1 = _portc@1 345 00000007 = _rc1___byte equ _portc 346 00000001 = _rc1___bit equ 1 347 ; line_number = 39 348 ; bind _rc0 = _portc@0 349 00000007 = _rc0___byte equ _portc 350 00000000 = _rc0___bit equ 0 351 352 ; line_number = 41 353 ; register _pclath = 354 0000000a = _pclath equ 10 355 356 ; line_number = 43 357 ; register _intcon = 358 0000000b = _intcon equ 11 359 ; line_number = 44 360 ; bind _gie = _intcon@7 361 0000000b = _gie___byte equ _intcon 362 00000007 = _gie___bit equ 7 363 ; line_number = 45 364 ; bind _peie = _intcon@6 365 0000000b = _peie___byte equ _intcon 366 00000006 = _peie___bit equ 6 367 ; line_number = 46 368 ; bind _t0ie = _intcon@5 369 0000000b = _t0ie___byte equ _intcon 370 00000005 = _t0ie___bit equ 5 371 ; line_number = 47 372 ; bind _inte = _intcon@4 373 0000000b = _inte___byte equ _intcon 374 00000004 = _inte___bit equ 4 375 ; line_number = 48 376 ; bind _raie = _intcon@3 377 0000000b = _raie___byte equ _intcon 378 00000003 = _raie___bit equ 3 379 ; line_number = 49 380 ; bind _t0if = _intcon@2 381 0000000b = _t0if___byte equ _intcon 382 00000002 = _t0if___bit equ 2 383 ; line_number = 50 384 ; bind _intf = _intcon@1 385 0000000b = _intf___byte equ _intcon 386 00000001 = _intf___bit equ 1 387 ; line_number = 51 388 ; bind _raif = _intcon@0 389 0000000b = _raif___byte equ _intcon 390 00000000 = _raif___bit equ 0 391 392 ; line_number = 53 393 ; register _pir1 = 394 0000000c = _pir1 equ 12 395 ; line_number = 54 396 ; bind _eeif = _pir1@7 397 0000000c = _eeif___byte equ _pir1 398 00000007 = _eeif___bit equ 7 399 ; line_number = 55 400 ; bind _cmif = _pir1@3 401 0000000c = _cmif___byte equ _pir1 402 00000003 = _cmif___bit equ 3 403 ; line_number = 56 404 ; bind _tmr1if = _pir1@0 405 0000000c = _tmr1if___byte equ _pir1 406 00000000 = _tmr1if___bit equ 0 407 408 ; line_number = 58 409 ; register _tmr1l = 410 0000000e = _tmr1l equ 14 411 412 ; line_number = 60 413 ; register _tmr1h = 414 0000000f = _tmr1h equ 15 415 416 ; line_number = 62 417 ; register _t1con = 418 00000010 = _t1con equ 16 419 ; line_number = 63 420 ; bind _t1ge = _t1con@6 421 00000010 = _t1ge___byte equ _t1con 422 00000006 = _t1ge___bit equ 6 423 ; line_number = 64 424 ; bind _t1ckps1 = _t1con@5 425 00000010 = _t1ckps1___byte equ _t1con 426 00000005 = _t1ckps1___bit equ 5 427 ; line_number = 65 428 ; bind _t1ckps0 = _t1con@4 429 00000010 = _t1ckps0___byte equ _t1con 430 00000004 = _t1ckps0___bit equ 4 431 ; line_number = 66 432 ; bind _t1oscen = _t1con@3 433 00000010 = _t1oscen___byte equ _t1con 434 00000003 = _t1oscen___bit equ 3 435 ; line_number = 67 436 ; bind _t1sync = _t1con@2 437 00000010 = _t1sync___byte equ _t1con 438 00000002 = _t1sync___bit equ 2 439 ; line_number = 68 440 ; bind _tmr1cs = _t1con@1 441 00000010 = _tmr1cs___byte equ _t1con 442 00000001 = _tmr1cs___bit equ 1 443 ; line_number = 69 444 ; bind _tmr1on = _t1con@0 445 00000010 = _tmr1on___byte equ _t1con 446 00000000 = _tmr1on___bit equ 0 447 448 ; line_number = 71 449 ; register _cmcon = 450 00000019 = _cmcon equ 25 451 ; line_number = 72 452 ; bind _cout = _cmcon@6 453 00000019 = _cout___byte equ _cmcon 454 00000006 = _cout___bit equ 6 455 ; line_number = 73 456 ; bind _cinv = _cmcon@4 457 00000019 = _cinv___byte equ _cmcon 458 00000004 = _cinv___bit equ 4 459 ; line_number = 74 460 ; bind _cis = _cmcon@3 461 00000019 = _cis___byte equ _cmcon 462 00000003 = _cis___bit equ 3 463 ; line_number = 75 464 ; bind _cm2 = _cmcon@2 465 00000019 = _cm2___byte equ _cmcon 466 00000002 = _cm2___bit equ 2 467 ; line_number = 76 468 ; bind _cm1 = _cmcon@1 469 00000019 = _cm1___byte equ _cmcon 470 00000001 = _cm1___bit equ 1 471 ; line_number = 77 472 ; bind _cm0 = _cmcon@0 473 00000019 = _cm0___byte equ _cmcon 474 00000000 = _cm0___bit equ 0 475 476 ; # Data bank 1 (0x80-0xff): 477 478 ; line_number = 81 479 ; register _option_reg = 480 00000080 = _option_reg equ 128 481 ; line_number = 82 482 ; bind _rapu = _option_reg@7 483 00000080 = _rapu___byte equ _option_reg 484 00000007 = _rapu___bit equ 7 485 ; line_number = 83 486 ; bind _intedg = _option_reg@6 487 00000080 = _intedg___byte equ _option_reg 488 00000006 = _intedg___bit equ 6 489 ; line_number = 84 490 ; bind _t0cs = _option_reg@5 491 00000080 = _t0cs___byte equ _option_reg 492 00000005 = _t0cs___bit equ 5 493 ; line_number = 85 494 ; bind _t0se = _option_reg@4 495 00000080 = _t0se___byte equ _option_reg 496 00000004 = _t0se___bit equ 4 497 ; line_number = 86 498 ; bind _psa = _option_reg@3 499 00000080 = _psa___byte equ _option_reg 500 00000003 = _psa___bit equ 3 501 ; line_number = 87 502 ; bind _ps2 = _option_reg@2 503 00000080 = _ps2___byte equ _option_reg 504 00000002 = _ps2___bit equ 2 505 ; line_number = 88 506 ; bind _ps1 = _option_reg@1 507 00000080 = _ps1___byte equ _option_reg 508 00000001 = _ps1___bit equ 1 509 ; line_number = 89 510 ; bind _ps0 = _option_reg@0 511 00000080 = _ps0___byte equ _option_reg 512 00000000 = _ps0___bit equ 0 513 514 ; line_number = 91 515 ; register _trisa = 516 00000085 = _trisa equ 133 517 ; line_number = 92 518 ; bind _trisa5 = _trisa@5 519 00000085 = _trisa5___byte equ _trisa 520 00000005 = _trisa5___bit equ 5 521 ; line_number = 93 522 ; bind _trisa4 = _trisa@4 523 00000085 = _trisa4___byte equ _trisa 524 00000004 = _trisa4___bit equ 4 525 ; line_number = 94 526 ; bind _trisa3 = _trisa@3 527 00000085 = _trisa3___byte equ _trisa 528 00000003 = _trisa3___bit equ 3 529 ; line_number = 95 530 ; bind _trisa2 = _trisa@2 531 00000085 = _trisa2___byte equ _trisa 532 00000002 = _trisa2___bit equ 2 533 ; line_number = 96 534 ; bind _trisa1 = _trisa@1 535 00000085 = _trisa1___byte equ _trisa 536 00000001 = _trisa1___bit equ 1 537 ; line_number = 97 538 ; bind _trisa0 = _trisa@0 539 00000085 = _trisa0___byte equ _trisa 540 00000000 = _trisa0___bit equ 0 541 542 ; line_number = 99 543 ; register _trisc = 544 00000087 = _trisc equ 135 545 ; line_number = 100 546 ; bind _trisc5 = _trisc@5 547 00000087 = _trisc5___byte equ _trisc 548 00000005 = _trisc5___bit equ 5 549 ; line_number = 101 550 ; bind _trisc4 = _trisc@4 551 00000087 = _trisc4___byte equ _trisc 552 00000004 = _trisc4___bit equ 4 553 ; line_number = 102 554 ; bind _trisc3 = _trisc@3 555 00000087 = _trisc3___byte equ _trisc 556 00000003 = _trisc3___bit equ 3 557 ; line_number = 103 558 ; bind _trisc2 = _trisc@2 559 00000087 = _trisc2___byte equ _trisc 560 00000002 = _trisc2___bit equ 2 561 ; line_number = 104 562 ; bind _trisc1 = _trisc@1 563 00000087 = _trisc1___byte equ _trisc 564 00000001 = _trisc1___bit equ 1 565 ; line_number = 105 566 ; bind _trisc0 = _trisc@0 567 00000087 = _trisc0___byte equ _trisc 568 00000000 = _trisc0___bit equ 0 569 570 ; line_number = 107 571 ; register _pie1 = 572 0000008c = _pie1 equ 140 573 ; line_number = 108 574 ; bind _eeie = _pie1@7 575 0000008c = _eeie___byte equ _pie1 576 00000007 = _eeie___bit equ 7 577 ; line_number = 109 578 ; bind _adie = _pie1@6 579 0000008c = _adie___byte equ _pie1 580 00000006 = _adie___bit equ 6 581 ; line_number = 110 582 ; bind _cmie = _pie1@3 583 0000008c = _cmie___byte equ _pie1 584 00000003 = _cmie___bit equ 3 585 ; line_number = 111 586 ; bind _tmr1ie = _pie1@0 587 0000008c = _tmr1ie___byte equ _pie1 588 00000000 = _tmr1ie___bit equ 0 589 590 ; line_number = 113 591 ; register _pcon = 592 0000008e = _pcon equ 142 593 ; line_number = 114 594 ; bind _por = _pcon@1 595 0000008e = _por___byte equ _pcon 596 00000001 = _por___bit equ 1 597 ; line_number = 115 598 ; bind _bor = _pcon@0 599 0000008e = _bor___byte equ _pcon 600 00000000 = _bor___bit equ 0 601 602 ; line_number = 117 603 ; register _osccal = 604 00000090 = _osccal equ 144 605 ; line_number = 118 606 ; bind _cal5 = _osccal@7 607 00000090 = _cal5___byte equ _osccal 608 00000007 = _cal5___bit equ 7 609 ; line_number = 119 610 ; bind _cal4 = _osccal@6 611 00000090 = _cal4___byte equ _osccal 612 00000006 = _cal4___bit equ 6 613 ; line_number = 120 614 ; bind _cal3 = _osccal@5 615 00000090 = _cal3___byte equ _osccal 616 00000005 = _cal3___bit equ 5 617 ; line_number = 121 618 ; bind _cal2 = _osccal@4 619 00000090 = _cal2___byte equ _osccal 620 00000004 = _cal2___bit equ 4 621 ; line_number = 122 622 ; bind _cal1 = _osccal@3 623 00000090 = _cal1___byte equ _osccal 624 00000003 = _cal1___bit equ 3 625 ; line_number = 123 626 ; bind _cal0 = _osccal@2 627 00000090 = _cal0___byte equ _osccal 628 00000002 = _cal0___bit equ 2 629 ; line_number = 124 630 ; constant _osccal_lsb = 4 631 00000004 = _osccal_lsb equ 4 632 633 ; line_number = 126 634 ; register _wpua = 635 00000095 = _wpua equ 149 636 ; line_number = 127 637 ; bind _wpua5 = _wpua@5 638 00000095 = _wpua5___byte equ _wpua 639 00000005 = _wpua5___bit equ 5 640 ; line_number = 128 641 ; bind _wpua4 = _wpua@4 642 00000095 = _wpua4___byte equ _wpua 643 00000004 = _wpua4___bit equ 4 644 ; line_number = 129 645 ; bind _wpua2 = _wpua@2 646 00000095 = _wpua2___byte equ _wpua 647 00000002 = _wpua2___bit equ 2 648 ; line_number = 130 649 ; bind _wpua1 = _wpua@1 650 00000095 = _wpua1___byte equ _wpua 651 00000001 = _wpua1___bit equ 1 652 ; line_number = 131 653 ; bind _wpua0 = _wpua@0 654 00000095 = _wpua0___byte equ _wpua 655 00000000 = _wpua0___bit equ 0 656 657 ; line_number = 133 658 ; register _ioca = 659 00000096 = _ioca equ 150 660 ; line_number = 134 661 ; bind _ioca5 = _ioca@5 662 00000096 = _ioca5___byte equ _ioca 663 00000005 = _ioca5___bit equ 5 664 ; line_number = 135 665 ; bind _ioca4 = _ioca@4 666 00000096 = _ioca4___byte equ _ioca 667 00000004 = _ioca4___bit equ 4 668 ; line_number = 136 669 ; bind _ioca3 = _ioca@3 670 00000096 = _ioca3___byte equ _ioca 671 00000003 = _ioca3___bit equ 3 672 ; line_number = 137 673 ; bind _ioca2 = _ioca@2 674 00000096 = _ioca2___byte equ _ioca 675 00000002 = _ioca2___bit equ 2 676 ; line_number = 138 677 ; bind _ioca1 = _ioca@1 678 00000096 = _ioca1___byte equ _ioca 679 00000001 = _ioca1___bit equ 1 680 ; line_number = 139 681 ; bind _ioca0 = _ioca@0 682 00000096 = _ioca0___byte equ _ioca 683 00000000 = _ioca0___bit equ 0 684 685 ; line_number = 141 686 ; register _vrcon = 687 00000099 = _vrcon equ 153 688 ; line_number = 142 689 ; bind _vren = _vrcon@7 690 00000099 = _vren___byte equ _vrcon 691 00000007 = _vren___bit equ 7 692 ; line_number = 143 693 ; bind _vrr = _vrcon@5 694 00000099 = _vrr___byte equ _vrcon 695 00000005 = _vrr___bit equ 5 696 ; line_number = 144 697 ; bind _vr3 = _vrcon@3 698 00000099 = _vr3___byte equ _vrcon 699 00000003 = _vr3___bit equ 3 700 ; line_number = 145 701 ; bind _vr2 = _vrcon@2 702 00000099 = _vr2___byte equ _vrcon 703 00000002 = _vr2___bit equ 2 704 ; line_number = 146 705 ; bind _vr1 = _vrcon@1 706 00000099 = _vr1___byte equ _vrcon 707 00000001 = _vr1___bit equ 1 708 ; line_number = 147 709 ; bind _vr0 = _vrcon@0 710 00000099 = _vr0___byte equ _vrcon 711 00000000 = _vr0___bit equ 0 712 713 ; line_number = 149 714 ; register _eedata = 715 0000009a = _eedata equ 154 716 717 ; line_number = 151 718 ; register _eeadr = 719 0000009b = _eeadr equ 155 720 721 ; line_number = 153 722 ; register _eecon1 = 723 0000009c = _eecon1 equ 156 724 ; line_number = 154 725 ; bind _wrerr = _eecon1@3 726 0000009c = _wrerr___byte equ _eecon1 727 00000003 = _wrerr___bit equ 3 728 ; line_number = 155 729 ; bind _wren = _eecon1@2 730 0000009c = _wren___byte equ _eecon1 731 00000002 = _wren___bit equ 2 732 ; line_number = 156 733 ; bind _wr = _eecon1@1 734 0000009c = _wr___byte equ _eecon1 735 00000001 = _wr___bit equ 1 736 ; line_number = 157 737 ; bind _rd = _eecon1@0 738 0000009c = _rd___byte equ _eecon1 739 00000000 = _rd___bit equ 0 740 741 ; line_number = 159 742 ; register _eecon2 = 743 0000009d = _eecon2 equ 157 744 745 746 ; buffer = '_pic16f630' 747 ; line_number = 107 748 ; library _pic16f630_676 exited 749 750 751 ; buffer = 'switch8' 752 ; line_number = 9 753 ; library _pic16f630 exited 754 ; line_number = 10 755 ; library clock4mhz entered 756 ; # Copyright (c) 2004 by Wayne C. Gramlich 757 ; # All rights reserved. 758 759 ; # This library defines the contstants {clock_rate}, {instruction_rate}, 760 ; # and {clocks_per_instruction}. 761 762 ; # Define processor constants: 763 ; buffer = 'clock4mhz' 764 ; line_number = 9 765 ; constant clock_rate = 4000000 766 003d0900 = clock_rate equ 4000000 767 ; line_number = 10 768 ; constant clocks_per_instruction = 4 769 00000004 = clocks_per_instruction equ 4 770 ; line_number = 11 771 ; constant instruction_rate = clock_rate / clocks_per_instruction 772 000f4240 = instruction_rate equ 1000000 773 774 775 ; buffer = 'switch8' 776 ; line_number = 10 777 ; library clock4mhz exited 778 ; line_number = 11 779 ; library bit_bang entered 780 ; # Copyright (c) 2004 by Wayne C. Gramlich 781 ; # All rights reserved. 782 783 ; # This library provides bit bang routines for sending and receiving 784 ; # serial data at 2400 baud in 8N1 format (1 start bit, 8 data bits, 785 ; # No parity bit, 1 stop stop bit.) 786 ; # 787 ; # This library requires that the pins {serial_in} and {serial_out} 788 ; # be defined. In addition, the variable {instruction_rate} needs 789 ; # to be defined. Lastly, there needs to be a {delay} procedure 790 ; # with an "exact_delay delay_instructions" clause in it. The {delay} 791 ; # routine should invoke "watch_dog_reset" so that the watch dog time 792 ; # can be set. 793 794 ; # Define some constants that we will be needing: 795 ; buffer = 'bit_bang' 796 ; line_number = 17 797 ; constant baud_rate = 2400 798 00000960 = baud_rate equ 2400 799 ; line_number = 18 800 ; constant instructions_per_bit = instruction_rate / baud_rate 801 000001a0 = instructions_per_bit equ 416 802 ; line_number = 19 803 ; constant delays_per_bit = 3 804 00000003 = delays_per_bit equ 3 805 ; line_number = 20 806 ; constant instructions_per_delay = instructions_per_bit / delays_per_bit 807 0000008a = instructions_per_delay equ 138 808 ; line_number = 21 809 ; constant extra_instructions = 5 810 00000005 = extra_instructions equ 5 811 ; line_number = 22 812 ; constant delay_instructions = instructions_per_delay - extra_instructions 813 00000085 = delay_instructions equ 133 814 815 ; # The {receiving} bit is sent when data is being received. 816 ; # It gets cleared whenever data gets sent. It is used to 817 ; # determine whether additional delay is needed to turn a 818 ; # line around for slow interpretted chips like the Basic 819 ; # Stamp 2 and the OOPIC. 820 821 ; line_number = 30 822 ; global receiving bit 823 0000005f = receiving___byte equ shared___globals+63 824 00000000 = receiving___bit equ 0 825 ; line_number = 31 826 ; global waiting bit 827 0000005f = waiting___byte equ shared___globals+63 828 00000001 = waiting___bit equ 1 829 830 ; Delaying code generation for procedure byte_get 831 ; Delaying code generation for procedure byte_put 832 833 ; buffer = 'switch8' 834 ; line_number = 11 835 ; library bit_bang exited 836 837 ; line_number = 13 838 ; package pdip 839 ; line_number = 14 840 ; pin 1 = power_supply 841 ; line_number = 15 842 ; pin 2 = ra5_in, name = sw2 843 00000005 = sw2___byte equ _porta 844 00000005 = sw2___bit equ 5 845 ; line_number = 16 846 ; pin 3 = ra4_in, name = sw3 847 00000005 = sw3___byte equ _porta 848 00000004 = sw3___bit equ 4 849 ; line_number = 17 850 ; pin 4 = ra3_in, name = sw4 851 00000005 = sw4___byte equ _porta 852 00000003 = sw4___bit equ 3 853 ; line_number = 18 854 ; pin 5 = rc5_unused 855 ; line_number = 19 856 ; pin 6 = rc4_out, name = debug_out 857 00000007 = debug_out___byte equ _portc 858 00000004 = debug_out___bit equ 4 859 ; line_number = 20 860 ; pin 7 = rc3_in, name = serial_in 861 00000007 = serial_in___byte equ _portc 862 00000003 = serial_in___bit equ 3 863 ; line_number = 21 864 ; pin 8 = rc2_out, name = serial_out 865 00000007 = serial_out___byte equ _portc 866 00000002 = serial_out___bit equ 2 867 ; line_number = 22 868 ; pin 9 = rc1_in, name = sw0 869 00000007 = sw0___byte equ _portc 870 00000001 = sw0___bit equ 1 871 ; line_number = 23 872 ; pin 10 = rc0_in, name = sw1 873 00000007 = sw1___byte equ _portc 874 00000000 = sw1___bit equ 0 875 ; line_number = 24 876 ; pin 11 = ra2_in, name = sw5 877 00000005 = sw5___byte equ _porta 878 00000002 = sw5___bit equ 2 879 ; line_number = 25 880 ; pin 12 = ra1_in, name = sw6 881 00000005 = sw6___byte equ _porta 882 00000001 = sw6___bit equ 1 883 ; line_number = 26 884 ; pin 13 = ra0_in, name = sw7 885 00000005 = sw7___byte equ _porta 886 00000000 = sw7___bit equ 0 887 ; line_number = 27 888 ; pin 14 = ground 889 890 891 ; # Some globals: byte 892 ; line_number = 32 893 ; constant state_size = 11 894 0000000b = state_size equ 11 895 ; line_number = 33 896 ; constant state_size2 = state_size << 1 897 00000016 = state_size2 equ 22 898 ; line_number = 34 899 ; global state[state_size] array[byte] 900 00000024 = state equ shared___globals+4 901 ; line_number = 35 902 ; bind command_previous = state[0] 903 00000024 = command_previous equ shared___globals+4 904 ; line_number = 36 905 ; bind command_last = state[1] 906 00000025 = command_last equ shared___globals+5 907 ; line_number = 37 908 ; bind sent_last = state[2] 909 00000026 = sent_last equ shared___globals+6 910 ; line_number = 38 911 ; bind sent_previous = state[3] 912 00000027 = sent_previous equ shared___globals+7 913 ; line_number = 39 914 ; bind raw = state[4] 915 00000028 = raw equ shared___globals+8 916 ; line_number = 40 917 ; bind complement_mask = state[5] 918 00000029 = complement_mask equ shared___globals+9 919 ; line_number = 41 920 ; bind flags = state[6] 921 0000002a = flags equ shared___globals+10 922 ; line_number = 42 923 ; bind low_mask = state[7] 924 0000002b = low_mask equ shared___globals+11 925 ; line_number = 43 926 ; bind high_mask = state[8] 927 0000002c = high_mask equ shared___globals+12 928 ; line_number = 44 929 ; bind rising_mask = state[9] 930 0000002d = rising_mask equ shared___globals+13 931 ; line_number = 45 932 ; bind falling_mask = state[10] 933 0000002e = falling_mask equ shared___globals+14 934 ; line_number = 46 935 ; bind interrupt_enable = flags@0 936 0000002a = interrupt_enable___byte equ shared___globals+10 937 00000000 = interrupt_enable___bit equ 0 938 ; line_number = 47 939 ; bind interrupt_pending = flags@1 940 0000002a = interrupt_pending___byte equ shared___globals+10 941 00000001 = interrupt_pending___bit equ 1 942 943 ; line_number = 49 944 ; global direction byte 945 0000002f = direction equ shared___globals+15 946 ; line_number = 50 947 ; global glitch byte 948 00000030 = glitch equ shared___globals+16 949 ; line_number = 51 950 ; global index byte 951 00000031 = index equ shared___globals+17 952 953 ; line_number = 53 954 ; global debug_character byte 955 00000032 = debug_character equ shared___globals+18 956 ; line_number = 54 957 ; global debug_counter byte 958 00000033 = debug_counter equ shared___globals+19 959 ; line_number = 55 960 ; global debug_index byte 961 00000034 = debug_index equ shared___globals+20 962 963 ; line_number = 57 964 ; procedure main 965 0000 : main: 966 ; Need to calibrate the oscillator 967 0000 23ff call 1023 968 0001 1683 bsf __rp0___byte, __rp0___bit 969 0002 0090 movwf _osccal 970 ; Initialize some registers 971 0003 301f movlw 31 972 0004 0085 movwf _trisa 973 0005 300b movlw 11 974 0006 0087 movwf _trisc 975 ; arguments_none 976 ; line_number = 59 977 ; returns_nothing 978 979 ; line_number = 61 980 ; local command byte 981 00000035 = main__command equ shared___globals+21 982 ; line_number = 62 983 ; local temp byte 984 00000036 = main__temp equ shared___globals+22 985 ; line_number = 63 986 ; local do_send bit 987 0000005f = main__do_send___byte equ shared___globals+63 988 00000002 = main__do_send___bit equ 2 989 990 ; # Initalize all of the globals: 991 ; before procedure statements delay=non-uniform, bit states=(data:X0=>X1 code:XX=>XX) 992 ; line_number = 66 993 ; call reset() 994 0007 1283 bcf __rp0___byte, __rp0___bit 995 0008 20e3 call reset 996 997 ; # Process commands: 998 ; line_number = 69 999 ; loop_forever start 1000 0009 : main__1: 1001 ; # Wait for command: 1002 ; line_number = 71 1003 ; command := byte_get() 1004 0009 2400 call byte_get 1005 000a 00b5 movwf main__command 1006 1007 ; # Dispatch on command 1008 ; line_number = 74 1009 ; switch command >> 6 start 1010 000b 3000 movlw main__60>>8 1011 000c 008a movwf __pclath 1012 0000003d = main__61 equ shared___globals+29 1013 000d 0e35 swapf main__command,w 1014 000e 00bd movwf main__61 1015 000f 0cbd rrf main__61,f 1016 0010 0c3d rrf main__61,w 1017 0011 3903 andlw 3 1018 0012 3e14 addlw main__60 1019 0013 0082 movwf __pcl 1020 ; page_group 4 1021 0014 : main__60: 1022 0014 2818 goto main__58 1023 0015 28e1 goto main__62 1024 0016 28e1 goto main__62 1025 0017 2877 goto main__59 1026 ; line_number = 75 1027 ; case 0 1028 0018 : main__58: 1029 ; # 00xx xxxx: 1030 ; line_number = 77 1031 ; switch (command >> 3) & 7 start 1032 ; line_number = 78 1033 ; case_maximum 7 1034 0018 3000 movlw main__26>>8 1035 0019 008a movwf __pclath 1036 0000003d = main__27 equ shared___globals+29 1037 001a 0c35 rrf main__command,w 1038 001b 00bd movwf main__27 1039 001c 0cbd rrf main__27,f 1040 001d 0c3d rrf main__27,w 1041 001e 3907 andlw 7 1042 001f 3e21 addlw main__26 1043 0020 0082 movwf __pcl 1044 ; page_group 8 1045 0021 : main__26: 1046 0021 2829 goto main__23 1047 0022 2853 goto main__24 1048 0023 2876 goto main__25 1049 0024 2876 goto main__25 1050 0025 2876 goto main__25 1051 0026 2876 goto main__25 1052 0027 2876 goto main__25 1053 0028 2876 goto main__25 1054 ; line_number = 79 1055 ; case 0 1056 0029 : main__23: 1057 ; # 0000 0xxx: 1058 ; line_number = 81 1059 ; do_send := 1 1060 0029 155f bsf main__do_send___byte, main__do_send___bit 1061 ; line_number = 82 1062 ; switch command start 1063 002a 3000 movlw main__10>>8 1064 002b 008a movwf __pclath 1065 002c 0835 movf main__command,w 1066 002d 3e2f addlw main__10 1067 002e 0082 movwf __pcl 1068 ; page_group 8 1069 002f : main__10: 1070 002f 2837 goto main__2 1071 0030 283b goto main__3 1072 0031 283e goto main__4 1073 0032 284d goto main__9 1074 0033 2841 goto main__5 1075 0034 2844 goto main__6 1076 0035 2847 goto main__7 1077 0036 284a goto main__8 1078 ; line_number = 83 1079 ; case 0 1080 0037 : main__2: 1081 ; # 0000 0000 (Read Inputs): 1082 ; line_number = 85 1083 ; temp := raw ^ complement_mask 1084 0037 0828 movf raw,w 1085 0038 0629 xorwf complement_mask,w 1086 0039 00b6 movwf main__temp 1087 003a 284e goto main__11 1088 ; line_number = 86 1089 ; case 1 1090 003b : main__3: 1091 ; # 0000 0001 (Read Complement): 1092 ; line_number = 88 1093 ; temp := complement_mask 1094 003b 0829 movf complement_mask,w 1095 003c 00b6 movwf main__temp 1096 003d 284e goto main__11 1097 ; line_number = 89 1098 ; case 2 1099 003e : main__4: 1100 ; # 0000 0010 (Read Raw): 1101 ; line_number = 91 1102 ; temp := raw 1103 003e 0828 movf raw,w 1104 003f 00b6 movwf main__temp 1105 0040 284e goto main__11 1106 ; line_number = 92 1107 ; case 4 1108 0041 : main__5: 1109 ; # 0000 0100 (Read Read Low Mask): 1110 ; line_number = 94 1111 ; temp := low_mask 1112 0041 082b movf low_mask,w 1113 0042 00b6 movwf main__temp 1114 0043 284e goto main__11 1115 ; line_number = 95 1116 ; case 5 1117 0044 : main__6: 1118 ; # 0000 0101 (Read High Mask): 1119 ; line_number = 97 1120 ; temp := high_mask 1121 0044 082c movf high_mask,w 1122 0045 00b6 movwf main__temp 1123 0046 284e goto main__11 1124 ; line_number = 98 1125 ; case 6 1126 0047 : main__7: 1127 ; # 0000 0110 (Read Rising Mask): 1128 ; line_number = 100 1129 ; temp := rising_mask 1130 0047 082d movf rising_mask,w 1131 0048 00b6 movwf main__temp 1132 0049 284e goto main__11 1133 ; line_number = 101 1134 ; case 7 1135 004a : main__8: 1136 ; # 0000 0111 (Read Falling Mask): 1137 ; line_number = 103 1138 ; temp := falling_mask 1139 004a 082e movf falling_mask,w 1140 004b 00b6 movwf main__temp 1141 004c 284e goto main__11 1142 ; line_number = 104 1143 ; default 1144 004d : main__9: 1145 ; line_number = 105 1146 ; do_send := 0 1147 004d 115f bcf main__do_send___byte, main__do_send___bit 1148 004e : main__11: 1149 ; switch end:(data:XX=>X0 code:XX=>XX) 1150 ; line_number = 82 1151 ; switch command done 1152 ; line_number = 106 1153 ; if do_send start 1154 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 1155 ; CASE: true_code.size = 0 && false_code.size > 1 1156 ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=0 (non-uniform delay) 1157 004e 1d5f btfss main__do_send___byte, main__do_send___bit 1158 004f 2852 goto main__12 1159 ; line_number = 107 1160 ; call byte_put(temp) 1161 0050 0836 movf main__temp,w 1162 0051 2429 call byte_put 1163 ; Recombine size1 = 0 || size2 = 0 1164 0052 : main__12: 1165 ; code.delay=4294967295 back_code.delay=4294967295 1166 ; <=bit_code_emit@symbol; sym=main__do_send (data:XX=>X0 code:XX=>XX) 1167 ; line_number = 106 1168 ; if do_send done 1169 0052 2876 goto main__28 1170 ; line_number = 108 1171 ; case 1 1172 0053 : main__24: 1173 ; # 0000 1xxx: 1174 ; line_number = 110 1175 ; switch (command >> 3) & 7 start 1176 0053 3000 movlw main__20>>8 1177 0054 008a movwf __pclath 1178 0000003d = main__21 equ shared___globals+29 1179 0055 0c35 rrf main__command,w 1180 0056 00bd movwf main__21 1181 0057 0cbd rrf main__21,f 1182 0058 0c3d rrf main__21,w 1183 0059 3907 andlw 7 1184 005a 3e5c addlw main__20 1185 005b 0082 movwf __pcl 1186 ; page_group 8 1187 005c : main__20: 1188 005c 2864 goto main__13 1189 005d 2866 goto main__14 1190 005e 2875 goto main__19 1191 005f 2875 goto main__19 1192 0060 2869 goto main__15 1193 0061 286c goto main__16 1194 0062 286f goto main__17 1195 0063 2872 goto main__18 1196 ; line_number = 111 1197 ; case 0 1198 0064 : main__13: 1199 ; # 0001 0000 (Reset): 1200 ; line_number = 113 1201 ; call reset() 1202 0064 20e3 call reset 1203 0065 2875 goto main__22 1204 ; line_number = 114 1205 ; case 1 1206 0066 : main__14: 1207 ; # 0001 0010 (Set Complement Mask): 1208 ; line_number = 116 1209 ; complement_mask := byte_get() 1210 0066 2400 call byte_get 1211 0067 00a9 movwf complement_mask 1212 0068 2875 goto main__22 1213 ; line_number = 117 1214 ; case 4 1215 0069 : main__15: 1216 ; # 0001 0100 (Set Low Mask): 1217 ; line_number = 119 1218 ; low_mask := byte_get() 1219 0069 2400 call byte_get 1220 006a 00ab movwf low_mask 1221 006b 2875 goto main__22 1222 ; line_number = 120 1223 ; case 5 1224 006c : main__16: 1225 ; # 0001 0101 (Set High Mask): 1226 ; line_number = 122 1227 ; high_mask := byte_get() 1228 006c 2400 call byte_get 1229 006d 00ac movwf high_mask 1230 006e 2875 goto main__22 1231 ; line_number = 123 1232 ; case 6 1233 006f : main__17: 1234 ; # 0001 0110 (Set Rising Mask): 1235 ; line_number = 125 1236 ; rising_mask := byte_get() 1237 006f 2400 call byte_get 1238 0070 00ad movwf rising_mask 1239 0071 2875 goto main__22 1240 ; line_number = 126 1241 ; case 7 1242 0072 : main__18: 1243 ; # 0001 0111 (Set Falling Mask): 1244 ; line_number = 128 1245 ; falling_mask := byte_get() 1246 0072 2400 call byte_get 1247 0073 00ae movwf falling_mask 1248 0074 2875 goto main__22 1249 ; line_number = 129 1250 ; default 1251 0075 : main__19: 1252 ; line_number = 130 1253 ; do_nothing 1254 0075 : main__22: 1255 ; switch end:(data:X0=>X? code:XX=>XX) 1256 ; line_number = 110 1257 ; switch (command >> 3) & 7 done 1258 0075 2876 goto main__28 1259 ; line_number = 131 1260 ; default 1261 0076 : main__25: 1262 ; line_number = 132 1263 ; do_nothing 1264 0076 : main__28: 1265 ; switch end:(data:X0=>X? code:XX=>XX) 1266 ; line_number = 77 1267 ; switch (command >> 3) & 7 done 1268 0076 28e1 goto main__62 1269 ; line_number = 133 1270 ; case 3 1271 0077 : main__59: 1272 ; # 11xx xxxx: 1273 ; line_number = 135 1274 ; switch (command >> 3) & 7 start 1275 0077 3000 movlw main__55>>8 1276 0078 008a movwf __pclath 1277 0000003d = main__56 equ shared___globals+29 1278 0079 0c35 rrf main__command,w 1279 007a 00bd movwf main__56 1280 007b 0cbd rrf main__56,f 1281 007c 0c3d rrf main__56,w 1282 007d 3907 andlw 7 1283 007e 3e80 addlw main__55 1284 007f 0082 movwf __pcl 1285 ; page_group 8 1286 0080 : main__55: 1287 0080 28e1 goto main__54 1288 0081 28e1 goto main__54 1289 0082 28e1 goto main__54 1290 0083 28e1 goto main__54 1291 0084 28e1 goto main__54 1292 0085 2888 goto main__51 1293 0086 2895 goto main__52 1294 0087 28b2 goto main__53 1295 ; line_number = 136 1296 ; case 5 1297 0088 : main__51: 1298 ; # 1110 1xxx: 1299 ; line_number = 138 1300 ; if command = 0xef start 1301 ; Left minus Right 1302 0088 3011 movlw 17 1303 0089 0735 addwf main__command,w 1304 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 1305 ; CASE: true_code.size = 0 && false_code.size > 1 1306 ; bit_code_emit_helper1: body_code.size=8 true_test=true body_code.delay=0 (non-uniform delay) 1307 008a 1d03 btfss __z___byte, __z___bit 1308 008b 2894 goto main__31 1309 ; # 1110 1111 (Read Interrupt Bits): 1310 ; line_number = 140 1311 ; temp := 0 1312 008c 3000 movlw 0 1313 008d 00b6 movwf main__temp 1314 ; line_number = 141 1315 ; if interrupt_pending start 1316 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 1317 ; CASE: True.size=1 False.size=0 1318 008e 18aa btfsc interrupt_pending___byte, interrupt_pending___bit 1319 ; line_number = 142 1320 ; temp@0 := 1 1321 00000036 = main__select__29___byte equ main__temp 1322 00000000 = main__select__29___bit equ 0 1323 008f 1436 bsf main__select__29___byte, main__select__29___bit 1324 ; Recombine size1 = 0 || size2 = 0 1325 ; code.delay=4294967295 back_code.delay=4294967295 1326 ; <=bit_code_emit@symbol; sym=interrupt_pending (data:X0=>X0 code:XX=>XX) 1327 ; line_number = 141 1328 ; if interrupt_pending done 1329 ; line_number = 143 1330 ; if interrupt_enable start 1331 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 1332 ; CASE: True.size=1 False.size=0 1333 0090 182a btfsc interrupt_enable___byte, interrupt_enable___bit 1334 ; line_number = 144 1335 ; temp@1 := 1 1336 00000036 = main__select__30___byte equ main__temp 1337 00000001 = main__select__30___bit equ 1 1338 0091 14b6 bsf main__select__30___byte, main__select__30___bit 1339 ; Recombine size1 = 0 || size2 = 0 1340 ; code.delay=4294967295 back_code.delay=4294967295 1341 ; <=bit_code_emit@symbol; sym=interrupt_enable (data:X0=>X0 code:XX=>XX) 1342 ; line_number = 143 1343 ; if interrupt_enable done 1344 ; line_number = 145 1345 ; call byte_put(temp) 1346 0092 0836 movf main__temp,w 1347 0093 2429 call byte_put 1348 ; Recombine size1 = 0 || size2 = 0 1349 0094 : main__31: 1350 ; code.delay=4294967295 back_code.delay=4294967295 1351 ; <=bit_code_emit@symbol; sym=__z (data:X0=>X0 code:XX=>XX) 1352 ; line_number = 138 1353 ; if command = 0xef done 1354 0094 28e1 goto main__57 1355 ; line_number = 146 1356 ; case 6 1357 0095 : main__52: 1358 ; # 1111 0xxx: 1359 ; line_number = 148 1360 ; switch command & 7 start 1361 0095 3000 movlw main__39>>8 1362 0096 008a movwf __pclath 1363 0097 3007 movlw 7 1364 0098 0535 andwf main__command,w 1365 0099 3e9b addlw main__39 1366 009a 0082 movwf __pcl 1367 ; page_group 8 1368 009b : main__39: 1369 009b 28a3 goto main__36 1370 009c 28a3 goto main__36 1371 009d 28a3 goto main__36 1372 009e 28a3 goto main__36 1373 009f 28aa goto main__37 1374 00a0 28aa goto main__37 1375 00a1 28ae goto main__38 1376 00a2 28ae goto main__38 1377 ; line_number = 149 1378 ; case 0, 1, 2, 3 1379 00a3 : main__36: 1380 ; # 1111 00ep (Set Interrupt Bits): 1381 ; line_number = 151 1382 ; interrupt_enable := command@1 1383 00a3 102a bcf interrupt_enable___byte, interrupt_enable___bit 1384 00000035 = main__select__32___byte equ main__command 1385 00000001 = main__select__32___bit equ 1 1386 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 1387 ; CASE: True.size=1 False.size=0 1388 00a4 18b5 btfsc main__select__32___byte, main__select__32___bit 1389 00a5 142a bsf interrupt_enable___byte, interrupt_enable___bit 1390 ; Recombine size1 = 0 || size2 = 0 1391 ; code.delay=4294967295 back_code.delay=4294967295 1392 ; <=bit_code_emit@symbol; sym=main__select__32 (data:X0=>X0 code:XX=>XX) 1393 ; line_number = 152 1394 ; interrupt_pending := command@0 1395 00a6 10aa bcf interrupt_pending___byte, interrupt_pending___bit 1396 00000035 = main__select__33___byte equ main__command 1397 00000000 = main__select__33___bit equ 0 1398 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 1399 ; CASE: True.size=1 False.size=0 1400 00a7 1835 btfsc main__select__33___byte, main__select__33___bit 1401 00a8 14aa bsf interrupt_pending___byte, interrupt_pending___bit 1402 ; Recombine size1 = 0 || size2 = 0 1403 ; code.delay=4294967295 back_code.delay=4294967295 1404 ; <=bit_code_emit@symbol; sym=main__select__33 (data:X0=>X0 code:XX=>XX) 1405 00a9 28b1 goto main__40 1406 ; line_number = 153 1407 ; case 4, 5 1408 00aa : main__37: 1409 ; # 1111 010p (Set Interrupt Pending): 1410 ; line_number = 155 1411 ; interrupt_pending := command@0 1412 00aa 10aa bcf interrupt_pending___byte, interrupt_pending___bit 1413 00000035 = main__select__34___byte equ main__command 1414 00000000 = main__select__34___bit equ 0 1415 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 1416 ; CASE: True.size=1 False.size=0 1417 00ab 1835 btfsc main__select__34___byte, main__select__34___bit 1418 00ac 14aa bsf interrupt_pending___byte, interrupt_pending___bit 1419 ; Recombine size1 = 0 || size2 = 0 1420 ; code.delay=4294967295 back_code.delay=4294967295 1421 ; <=bit_code_emit@symbol; sym=main__select__34 (data:X0=>X0 code:XX=>XX) 1422 00ad 28b1 goto main__40 1423 ; line_number = 156 1424 ; case 6, 7 1425 00ae : main__38: 1426 ; # 1111 011e (Set Interrupt Enable): 1427 ; line_number = 158 1428 ; interrupt_enable := command@0 1429 00ae 102a bcf interrupt_enable___byte, interrupt_enable___bit 1430 00000035 = main__select__35___byte equ main__command 1431 00000000 = main__select__35___bit equ 0 1432 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 1433 ; CASE: True.size=1 False.size=0 1434 00af 1835 btfsc main__select__35___byte, main__select__35___bit 1435 00b0 142a bsf interrupt_enable___byte, interrupt_enable___bit 1436 ; Recombine size1 = 0 || size2 = 0 1437 ; code.delay=4294967295 back_code.delay=4294967295 1438 ; <=bit_code_emit@symbol; sym=main__select__35 (data:X0=>X0 code:XX=>XX) 1439 00b1 : main__40: 1440 ; switch end:(data:X0=>X0 code:XX=>XX) 1441 ; line_number = 148 1442 ; switch command & 7 done 1443 00b1 28e1 goto main__57 1444 ; line_number = 159 1445 ; case 7 1446 00b2 : main__53: 1447 ; line_number = 160 1448 ; switch command & 7 start 1449 00b2 3000 movlw main__49>>8 1450 00b3 008a movwf __pclath 1451 00b4 3007 movlw 7 1452 00b5 0535 andwf main__command,w 1453 00b6 3eb8 addlw main__49 1454 00b7 0082 movwf __pcl 1455 ; page_group 8 1456 00b8 : main__49: 1457 00b8 28c0 goto main__41 1458 00b9 28c4 goto main__42 1459 00ba 28c8 goto main__43 1460 00bb 28cd goto main__44 1461 00bc 28d0 goto main__45 1462 00bd 28d5 goto main__46 1463 00be 28d8 goto main__47 1464 00bf 28dd goto main__48 1465 ; line_number = 161 1466 ; case 0 1467 00c0 : main__41: 1468 ; This case body wants this bit set 1469 00c0 1683 bsf __rp0___byte, __rp0___bit 1470 ; # 1111 1000 (Clock Decrement): 1471 ; line_number = 163 1472 ; _osccal := _osccal - _osccal_lsb 1473 00c1 30fc movlw 252 1474 00c2 0790 addwf _osccal,f 1475 00c3 28e0 goto main__50 1476 ; line_number = 164 1477 ; case 1 1478 00c4 : main__42: 1479 ; This case body wants this bit set 1480 00c4 1683 bsf __rp0___byte, __rp0___bit 1481 ; # 1111 1001 (Clock Increment): 1482 ; line_number = 166 1483 ; _osccal := _osccal + _osccal_lsb 1484 00c5 3004 movlw 4 1485 00c6 0790 addwf _osccal,f 1486 00c7 28e0 goto main__50 1487 ; line_number = 167 1488 ; case 2 1489 00c8 : main__43: 1490 ; This case body wants this bit set 1491 00c8 1683 bsf __rp0___byte, __rp0___bit 1492 ; # 1111 1010 (Clock Read): 1493 ; line_number = 169 1494 ; call byte_put(_osccal) 1495 00c9 0810 movf _osccal,w 1496 00ca 1283 bcf __rp0___byte, __rp0___bit 1497 00cb 2429 call byte_put 1498 00cc 28e0 goto main__50 1499 ; line_number = 170 1500 ; case 3 1501 00cd : main__44: 1502 ; # 1111 1011 (Clock Pulse): 1503 ; line_number = 172 1504 ; call byte_put(0) 1505 00cd 3000 movlw 0 1506 00ce 2429 call byte_put 1507 00cf 28e0 goto main__50 1508 ; line_number = 173 1509 ; case 4 1510 00d0 : main__45: 1511 ; # 1111 1100 (ID Next): 1512 ; line_number = 175 1513 ; call byte_put(id(index)) 1514 00d0 0831 movf index,w 1515 00d1 21da call id 1516 00d2 2429 call byte_put 1517 ; line_number = 176 1518 ; index := index + 1 1519 00d3 0ab1 incf index,f 1520 00d4 28e0 goto main__50 1521 ; line_number = 177 1522 ; case 5 1523 00d5 : main__46: 1524 ; # 1111 1101 (ID Reset): 1525 ; line_number = 179 1526 ; index := 0 1527 00d5 3000 movlw 0 1528 00d6 00b1 movwf index 1529 00d7 28e0 goto main__50 1530 ; line_number = 180 1531 ; case 6 1532 00d8 : main__47: 1533 ; # 1111 1110 (Glitch Read): 1534 ; line_number = 182 1535 ; call byte_put(glitch) 1536 00d8 0830 movf glitch,w 1537 00d9 2429 call byte_put 1538 ; line_number = 183 1539 ; glitch := 0 1540 00da 3000 movlw 0 1541 00db 00b0 movwf glitch 1542 00dc 28e0 goto main__50 1543 ; line_number = 184 1544 ; case 7 1545 00dd : main__48: 1546 ; # 1111 1111 (Glitch): 1547 ; line_number = 186 1548 ; if glitch != 0xff start 1549 ; Left minus Right 1550 00dd 0a30 incf glitch,w 1551 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 1552 ; CASE: true_code.size=0 && false_code.size=1 1553 00de 1d03 btfss __z___byte, __z___bit 1554 ; line_number = 187 1555 ; glitch := glitch + 1 1556 00df 0ab0 incf glitch,f 1557 ; Recombine size1 = 0 || size2 = 0 1558 ; code.delay=4294967295 back_code.delay=4294967295 1559 ; <=bit_code_emit@symbol; sym=__z (data:X0=>X0 code:XX=>XX) 1560 ; line_number = 186 1561 ; if glitch != 0xff done 1562 00e0 : main__50: 1563 ; switch end:(data:X0=>X? code:XX=>XX) 1564 ; line_number = 160 1565 ; switch command & 7 done 1566 00e0 28e1 goto main__57 1567 ; line_number = 188 1568 ; default 1569 00e1 : main__54: 1570 ; line_number = 189 1571 ; do_nothing 1572 1573 1574 00e1 : main__57: 1575 ; switch end:(data:X0=>X? code:XX=>XX) 1576 ; line_number = 135 1577 ; switch (command >> 3) & 7 done 1578 00e1 : main__62: 1579 ; switch end:(data:X0=>X? code:XX=>XX) 1580 ; line_number = 74 1581 ; switch command >> 6 done 1582 ; line_number = 69 1583 ; loop_forever wrap-up 1584 ; Need to adjust code banks to match front of loop 1585 00e1 1283 bcf __rp0___byte, __rp0___bit 1586 00e2 2809 goto main__1 1587 ; line_number = 69 1588 ; loop_forever done 1589 ; delay after procedure statements=non-uniform 1590 1591 1592 1593 1594 ; line_number = 192 1595 ; procedure reset 1596 00e3 : reset: 1597 ; arguments_none 1598 ; line_number = 194 1599 ; returns_nothing 1600 1601 ; # This procedure will initialize all global registers: 1602 1603 ; before procedure statements delay=non-uniform, bit states=(data:X0=>X0 code:XX=>XX) 1604 ; line_number = 198 1605 ; _cmcon := 7 1606 00e3 3007 movlw 7 1607 00e4 0099 movwf _cmcon 1608 1609 ; # Initialize global registers: 1610 ; line_number = 201 1611 ; index := 0 1612 00e5 3000 movlw 0 1613 00e6 00b1 movwf index 1614 ; line_number = 202 1615 ; loop_exactly state_size start 1616 0000003e = reset__1 equ shared___globals+30 1617 00e7 300b movlw 11 1618 00e8 00be movwf reset__1 1619 00e9 : reset__2: 1620 ; line_number = 203 1621 ; state[index] := 0 1622 ; index_fsr_first 1623 00e9 0831 movf index,w 1624 00ea 3e24 addlw state 1625 00eb 0084 movwf __fsr 1626 00ec 3000 movlw 0 1627 00ed 0080 movwf __indf 1628 ; line_number = 204 1629 ; index := index + 1 1630 00ee 0ab1 incf index,f 1631 1632 ; line_number = 202 1633 ; loop_exactly state_size wrap-up 1634 00ef 0bbe decfsz reset__1,f 1635 00f0 28e9 goto reset__2 1636 ; line_number = 202 1637 ; loop_exactly state_size done 1638 ; line_number = 206 1639 ; debug_counter := 0 1640 00f1 3000 movlw 0 1641 00f2 00b3 movwf debug_counter 1642 ; line_number = 207 1643 ; debug_index := 0 1644 00f3 3000 movlw 0 1645 00f4 00b4 movwf debug_index 1646 ; line_number = 208 1647 ; debug_character := 0 1648 00f5 3000 movlw 0 1649 00f6 00b2 movwf debug_character 1650 1651 ; # Initialize remaining registers: 1652 ; line_number = 211 1653 ; glitch := 0 1654 00f7 3000 movlw 0 1655 00f8 00b0 movwf glitch 1656 ; line_number = 212 1657 ; index := 0 1658 00f9 3000 movlw 0 1659 00fa 00b1 movwf index 1660 1661 1662 ; delay after procedure statements=non-uniform 1663 ; Implied return 1664 00fb 3400 retlw 0 1665 1666 1667 1668 1669 ; line_number = 215 1670 ; procedure delay 1671 00fc : delay: 1672 ; arguments_none 1673 ; line_number = 217 1674 ; returns_nothing 1675 ; line_number = 218 1676 ; exact_delay delay_instructions 1677 1678 ; # This procedure delays 1/3 of a bit. 1679 1680 ; line_number = 222 1681 ; local temp byte 1682 00000037 = delay__temp equ shared___globals+23 1683 ; line_number = 223 1684 ; local previous byte 1685 00000038 = delay__previous equ shared___globals+24 1686 ; line_number = 224 1687 ; local current byte 1688 00000039 = delay__current equ shared___globals+25 1689 ; line_number = 225 1690 ; local not_current byte 1691 0000003a = delay__not_current equ shared___globals+26 1692 ; line_number = 226 1693 ; local changed byte 1694 0000003b = delay__changed equ shared___globals+27 1695 1696 ; # Kick the dog: 1697 ; before procedure statements delay=0, bit states=(data:X0=>X0 code:XX=>XX) 1698 ; line_number = 229 1699 ; watch_dog_reset done 1700 ; Delay at watch_dog_reset is 0 1701 00fc 0064 clrwdt 1702 1703 ; # Read inputs: 1704 ; line_number = 232 1705 ; raw := 0 1706 ; Delay at assignment is 1 1707 00fd 3000 movlw 0 1708 00fe 00a8 movwf raw 1709 ; # We want "switch up" to be "one"; hence "if !sw?": 1710 ; # The labels on the board are backwards; hence, 0=>7, 1=>6,..., 7=>0: 1711 ; line_number = 235 1712 ; if !sw7 start 1713 ; Delay at if is 3 1714 ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true 1715 ; CASE: true_code.size=0 && false_code.size=1 1716 00ff 1c05 btfss sw7___byte, sw7___bit 1717 ; line_number = 236 1718 ; raw@0 := 1 1719 ; Delay at assignment is 0 1720 00000028 = delay__select__1___byte equ raw 1721 00000000 = delay__select__1___bit equ 0 1722 0100 1428 bsf delay__select__1___byte, delay__select__1___bit 1723 ; code.delay=5 back_code.delay=0 1724 ; <=bit_code_emit@symbol; sym=sw7 (data:X0=>X0 code:XX=>XX) 1725 ; if final true delay=1 false delay=0 code delay=5 1726 ; line_number = 235 1727 ; if !sw7 done 1728 ; line_number = 237 1729 ; if !sw6 start 1730 ; Delay at if is 5 1731 ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true 1732 ; CASE: true_code.size=0 && false_code.size=1 1733 0101 1c85 btfss sw6___byte, sw6___bit 1734 ; line_number = 238 1735 ; raw@1 := 1 1736 ; Delay at assignment is 0 1737 00000028 = delay__select__2___byte equ raw 1738 00000001 = delay__select__2___bit equ 1 1739 0102 14a8 bsf delay__select__2___byte, delay__select__2___bit 1740 ; code.delay=7 back_code.delay=0 1741 ; <=bit_code_emit@symbol; sym=sw6 (data:X0=>X0 code:XX=>XX) 1742 ; if final true delay=1 false delay=0 code delay=7 1743 ; line_number = 237 1744 ; if !sw6 done 1745 ; line_number = 239 1746 ; if !sw5 start 1747 ; Delay at if is 7 1748 ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true 1749 ; CASE: true_code.size=0 && false_code.size=1 1750 0103 1d05 btfss sw5___byte, sw5___bit 1751 ; line_number = 240 1752 ; raw@2 := 1 1753 ; Delay at assignment is 0 1754 00000028 = delay__select__3___byte equ raw 1755 00000002 = delay__select__3___bit equ 2 1756 0104 1528 bsf delay__select__3___byte, delay__select__3___bit 1757 ; code.delay=9 back_code.delay=0 1758 ; <=bit_code_emit@symbol; sym=sw5 (data:X0=>X0 code:XX=>XX) 1759 ; if final true delay=1 false delay=0 code delay=9 1760 ; line_number = 239 1761 ; if !sw5 done 1762 ; line_number = 241 1763 ; if !sw4 start 1764 ; Delay at if is 9 1765 ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true 1766 ; CASE: true_code.size=0 && false_code.size=1 1767 0105 1d85 btfss sw4___byte, sw4___bit 1768 ; line_number = 242 1769 ; raw@3 := 1 1770 ; Delay at assignment is 0 1771 00000028 = delay__select__4___byte equ raw 1772 00000003 = delay__select__4___bit equ 3 1773 0106 15a8 bsf delay__select__4___byte, delay__select__4___bit 1774 ; code.delay=11 back_code.delay=0 1775 ; <=bit_code_emit@symbol; sym=sw4 (data:X0=>X0 code:XX=>XX) 1776 ; if final true delay=1 false delay=0 code delay=11 1777 ; line_number = 241 1778 ; if !sw4 done 1779 ; line_number = 243 1780 ; if !sw3 start 1781 ; Delay at if is 11 1782 ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true 1783 ; CASE: true_code.size=0 && false_code.size=1 1784 0107 1e05 btfss sw3___byte, sw3___bit 1785 ; line_number = 244 1786 ; raw@4 := 1 1787 ; Delay at assignment is 0 1788 00000028 = delay__select__5___byte equ raw 1789 00000004 = delay__select__5___bit equ 4 1790 0108 1628 bsf delay__select__5___byte, delay__select__5___bit 1791 ; code.delay=13 back_code.delay=0 1792 ; <=bit_code_emit@symbol; sym=sw3 (data:X0=>X0 code:XX=>XX) 1793 ; if final true delay=1 false delay=0 code delay=13 1794 ; line_number = 243 1795 ; if !sw3 done 1796 ; line_number = 245 1797 ; if !sw2 start 1798 ; Delay at if is 13 1799 ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true 1800 ; CASE: true_code.size=0 && false_code.size=1 1801 0109 1e85 btfss sw2___byte, sw2___bit 1802 ; line_number = 246 1803 ; raw@5 := 1 1804 ; Delay at assignment is 0 1805 00000028 = delay__select__6___byte equ raw 1806 00000005 = delay__select__6___bit equ 5 1807 010a 16a8 bsf delay__select__6___byte, delay__select__6___bit 1808 ; code.delay=15 back_code.delay=0 1809 ; <=bit_code_emit@symbol; sym=sw2 (data:X0=>X0 code:XX=>XX) 1810 ; if final true delay=1 false delay=0 code delay=15 1811 ; line_number = 245 1812 ; if !sw2 done 1813 ; line_number = 247 1814 ; if !sw1 start 1815 ; Delay at if is 15 1816 ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true 1817 ; CASE: true_code.size=0 && false_code.size=1 1818 010b 1c07 btfss sw1___byte, sw1___bit 1819 ; line_number = 248 1820 ; raw@6 := 1 1821 ; Delay at assignment is 0 1822 00000028 = delay__select__7___byte equ raw 1823 00000006 = delay__select__7___bit equ 6 1824 010c 1728 bsf delay__select__7___byte, delay__select__7___bit 1825 ; code.delay=17 back_code.delay=0 1826 ; <=bit_code_emit@symbol; sym=sw1 (data:X0=>X0 code:XX=>XX) 1827 ; if final true delay=1 false delay=0 code delay=17 1828 ; line_number = 247 1829 ; if !sw1 done 1830 ; line_number = 249 1831 ; if !sw0 start 1832 ; Delay at if is 17 1833 ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true 1834 ; CASE: true_code.size=0 && false_code.size=1 1835 010d 1c87 btfss sw0___byte, sw0___bit 1836 ; line_number = 250 1837 ; raw@7 := 1 1838 ; Delay at assignment is 0 1839 00000028 = delay__select__8___byte equ raw 1840 00000007 = delay__select__8___bit equ 7 1841 010e 17a8 bsf delay__select__8___byte, delay__select__8___bit 1842 1843 ; code.delay=19 back_code.delay=0 1844 ; <=bit_code_emit@symbol; sym=sw0 (data:X0=>X0 code:XX=>XX) 1845 ; if final true delay=1 false delay=0 code delay=19 1846 ; line_number = 249 1847 ; if !sw0 done 1848 ; # Setup for interrupts: 1849 ; line_number = 253 1850 ; previous := current 1851 ; Delay at assignment is 19 1852 010f 0839 movf delay__current,w 1853 0110 00b8 movwf delay__previous 1854 ; # Read the I/O port once: 1855 ; line_number = 255 1856 ; current := raw ^ complement_mask 1857 ; Delay at assignment is 21 1858 0111 0828 movf raw,w 1859 0112 0629 xorwf complement_mask,w 1860 0113 00b9 movwf delay__current 1861 ; line_number = 256 1862 ; not_current := current ^ 0xf 1863 ; Delay at assignment is 24 1864 0114 300f movlw 15 1865 0115 0639 xorwf delay__current,w 1866 0116 00ba movwf delay__not_current 1867 ; line_number = 257 1868 ; changed := current ^ previous 1869 ; Delay at assignment is 27 1870 0117 0839 movf delay__current,w 1871 0118 0638 xorwf delay__previous,w 1872 0119 00bb movwf delay__changed 1873 1874 ; # See about triggering the interrupt_pending flag: 1875 ; line_number = 260 1876 ; if (low_mask & not_current) | (high_mask & current) | (changed & current & rising_mask) | (changed & not_current & falling_mask) != 0 start 1877 ; Delay at if is 30 1878 ; Left minus Right 1879 0000003f = delay__9 equ shared___globals+31 1880 011a 082b movf low_mask,w 1881 011b 053a andwf delay__not_current,w 1882 011c 00bf movwf delay__9 1883 011d 082c movf high_mask,w 1884 011e 0539 andwf delay__current,w 1885 011f 04bf iorwf delay__9,f 1886 0120 083b movf delay__changed,w 1887 0121 0539 andwf delay__current,w 1888 0122 052d andwf rising_mask,w 1889 0123 04bf iorwf delay__9,f 1890 0124 083b movf delay__changed,w 1891 0125 053a andwf delay__not_current,w 1892 0126 052e andwf falling_mask,w 1893 0127 043f iorwf delay__9,w 1894 ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true 1895 ; CASE: true_code.size=0 && false_code.size=1 1896 0128 1d03 btfss __z___byte, __z___bit 1897 ; line_number = 261 1898 ; interrupt_pending := 1 1899 ; Delay at assignment is 0 1900 0129 14aa bsf interrupt_pending___byte, interrupt_pending___bit 1901 1902 ; code.delay=46 back_code.delay=0 1903 ; <=bit_code_emit@symbol; sym=__z (data:X0=>X0 code:XX=>XX) 1904 ; Uniform delay broke in relation_code_emit 1905 ; if final true delay=1 false delay=0 code delay=46 1906 ; line_number = 260 1907 ; if (low_mask & not_current) | (high_mask & current) | (changed & current & rising_mask) | (changed & not_current & falling_mask) != 0 done 1908 ; # Send an interrupt if interrupts are enabled: 1909 ; line_number = 264 1910 ; if interrupt_pending start 1911 ; Delay at if is 46 1912 ; (after recombine) true_delay=5, false_delay=0 uniform_delay=true 1913 ; CASE: true_code.size = 0 && false_code.size > 1 1914 ; bit_code_emit_helper1: body_code.size=6 true_test=true body_code.delay=5 (uniform delay) 1915 012a 18aa btfsc interrupt_pending___byte, interrupt_pending___bit 1916 012b 292f goto delay__12 1917 ; Delay 4 cycles 1918 012c 292d goto delay__14 1919 012d : delay__14: 1920 012d 292e goto delay__15 1921 012e : delay__15: 1922 012e 2935 goto delay__13 1923 012f : delay__12: 1924 ; line_number = 265 1925 ; if interrupt_enable start 1926 ; Delay at if is 0 1927 ; (after recombine) true_delay=2, false_delay=0 uniform_delay=true 1928 ; CASE: true_code.size = 0 && false_code.size > 1 1929 ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=2 (uniform delay) 1930 012f 182a btfsc interrupt_enable___byte, interrupt_enable___bit 1931 0130 2933 goto delay__10 1932 ; Delay 1 cycles 1933 0131 0000 nop 1934 0132 2935 goto delay__11 1935 0133 : delay__10: 1936 ; # Shove serial out to low: 1937 ; line_number = 267 1938 ; interrupt_enable := 0 1939 ; Delay at assignment is 0 1940 0133 102a bcf interrupt_enable___byte, interrupt_enable___bit 1941 ; line_number = 268 1942 ; serial_out := 0 1943 ; Delay at assignment is 1 1944 0134 1107 bcf serial_out___byte, serial_out___bit 1945 1946 1947 0135 : delay__11: 1948 ; code.delay=5 back_code.delay=0 1949 ; <=bit_code_emit@symbol; sym=interrupt_enable (data:X0=>X0 code:XX=>XX) 1950 ; if final true delay=2 false delay=0 code delay=5 1951 ; line_number = 265 1952 ; if interrupt_enable done 1953 0135 : delay__13: 1954 ; code.delay=54 back_code.delay=0 1955 ; <=bit_code_emit@symbol; sym=interrupt_pending (data:X0=>X0 code:XX=>XX) 1956 ; if final true delay=5 false delay=0 code delay=54 1957 ; line_number = 264 1958 ; if interrupt_pending done 1959 ; # Provide debug information: 1960 ; line_number = 272 1961 ; switch debug_counter start 1962 0135 3001 movlw delay__44>>8 1963 0136 008a movwf __pclath 1964 0137 0833 movf debug_counter,w 1965 0138 3e3a addlw delay__44 1966 0139 0082 movwf __pcl 1967 ; page_group 39 1968 013a : delay__44: 1969 013a 2961 goto delay__30 1970 013b 29cd goto delay__43 1971 013c 29cd goto delay__43 1972 013d 2967 goto delay__31 1973 013e 296f goto delay__32 1974 013f 29cd goto delay__43 1975 0140 2967 goto delay__31 1976 0141 296f goto delay__32 1977 0142 29cd goto delay__43 1978 0143 2967 goto delay__31 1979 0144 296f goto delay__32 1980 0145 29cd goto delay__43 1981 0146 2967 goto delay__31 1982 0147 296f goto delay__32 1983 0148 29cd goto delay__43 1984 0149 2967 goto delay__31 1985 014a 296f goto delay__32 1986 014b 29cd goto delay__43 1987 014c 2967 goto delay__31 1988 014d 296f goto delay__32 1989 014e 29cd goto delay__43 1990 014f 2967 goto delay__31 1991 0150 296f goto delay__32 1992 0151 29cd goto delay__43 1993 0152 2967 goto delay__31 1994 0153 296f goto delay__32 1995 0154 29cd goto delay__43 1996 0155 2967 goto delay__31 1997 0156 2976 goto delay__33 1998 0157 29cd goto delay__43 1999 0158 297d goto delay__34 2000 0159 2985 goto delay__35 2001 015a 298f goto delay__36 2002 015b 2997 goto delay__37 2003 015c 29a2 goto delay__38 2004 015d 29ac goto delay__39 2005 015e 29b6 goto delay__40 2006 015f 29bc goto delay__41 2007 0160 29c6 goto delay__42 2008 ; case_data[0] delay=1{0 } 2009 ; case_data[1] delay=4{3 6 9 12 15 18 21 24 27 } 2010 ; case_data[2] delay=3{4 7 10 13 16 19 22 25 } 2011 ; case_data[3] delay=3{28 } 2012 ; case_data[4] delay=5{30 } 2013 ; case_data[5] delay=6{31 } 2014 ; case_data[6] delay=4{32 } 2015 ; case_data[7] delay=9{33 } 2016 ; case_data[8] delay=7{34 } 2017 ; case_data[9] delay=7{35 } 2018 ; case_data[10] delay=1{36 } 2019 ; case_data[11] delay=7{37 } 2020 ; case_data[12] delay=2{38 } 2021 ; case_data[13] delay=0 2022 ; Maximum Case Delay = 9 2023 ; line_number = 273 2024 ; case 0 2025 0161 : delay__30: 2026 ; # Send out start bit: 2027 ; line_number = 275 2028 ; debug_out := 0 2029 ; Delay at assignment is 0 2030 0161 1207 bcf debug_out___byte, debug_out___bit 2031 ; Delay 8 cycles 2032 ; Delay loop takes 2 * 4 = 8 cycles 2033 0162 3002 movlw 2 2034 0163 : delay__46: 2035 0163 3eff addlw 255 2036 0164 1d03 btfss __z___byte, __z___bit 2037 0165 2963 goto delay__46 2038 0166 29d3 goto delay__45 2039 ; line_number = 276 2040 ; case 3, 6, 9, 12, 15, 18, 21, 24, 27 2041 0167 : delay__31: 2042 ; # Send out data bit or stop bit: 2043 ; line_number = 278 2044 ; if debug_character@0 start 2045 ; Delay at if is 0 2046 00000032 = delay__select__16___byte equ debug_character 2047 00000000 = delay__select__16___bit equ 0 2048 ; (after recombine) true_delay=1, false_delay=1 uniform_delay=true 2049 ; CASE: true_size=1 && false_size=1 2050 ; SUBCASE: Double test; true, then false 2051 0167 1832 btfsc delay__select__16___byte, delay__select__16___bit 2052 ; line_number = 279 2053 ; debug_out := 1 2054 ; Delay at assignment is 0 2055 0168 1607 bsf debug_out___byte, debug_out___bit 2056 0169 1c32 btfss delay__select__16___byte, delay__select__16___bit 2057 ; line_number = 281 2058 ; debug_out := 0 2059 ; Delay at assignment is 0 2060 016a 1207 bcf debug_out___byte, debug_out___bit 2061 ; code.delay=4 back_code.delay=0 2062 ; <=bit_code_emit@symbol; sym=delay__select__16 (data:X0=>X0 code:XX=>XX) 2063 ; if final true delay=1 false delay=1 code delay=4 2064 ; line_number = 278 2065 ; if debug_character@0 done 2066 ; Delay 5 cycles 2067 016b 296c goto delay__47 2068 016c : delay__47: 2069 016c 296d goto delay__48 2070 016d : delay__48: 2071 016d 0000 nop 2072 016e 29d3 goto delay__45 2073 ; line_number = 282 2074 ; case 4, 7, 10, 13, 16, 19, 22, 25 2075 016f : delay__32: 2076 ; # Select next bit of debug_character: 2077 ; line_number = 284 2078 ; debug_character := debug_character >> 1 2079 ; Delay at assignment is 0 2080 ; Assignment of variable to self (no code needed) 2081 016f 0cb2 rrf debug_character,f 2082 0170 13b2 bcf debug_character, 7 2083 ; line_number = 285 2084 ; debug_character@7 := 1 2085 ; Delay at assignment is 2 2086 00000032 = delay__select__17___byte equ debug_character 2087 00000007 = delay__select__17___bit equ 7 2088 0171 17b2 bsf delay__select__17___byte, delay__select__17___bit 2089 ; Delay 6 cycles 2090 0172 2973 goto delay__49 2091 0173 : delay__49: 2092 0173 2974 goto delay__50 2093 0174 : delay__50: 2094 0174 2975 goto delay__51 2095 0175 : delay__51: 2096 0175 29d3 goto delay__45 2097 ; line_number = 286 2098 ; case 28 2099 0176 : delay__33: 2100 ; line_number = 287 2101 ; debug_character := debug_index >> 1 2102 ; Delay at assignment is 0 2103 0176 0c34 rrf debug_index,w 2104 0177 00b2 movwf debug_character 2105 0178 13b2 bcf debug_character, 7 2106 ; Delay 6 cycles 2107 0179 297a goto delay__52 2108 017a : delay__52: 2109 017a 297b goto delay__53 2110 017b : delay__53: 2111 017b 297c goto delay__54 2112 017c : delay__54: 2113 017c 29d3 goto delay__45 2114 ; line_number = 288 2115 ; case 30 2116 017d : delay__34: 2117 ; line_number = 289 2118 ; debug_character := state[debug_character] 2119 ; Delay at assignment is 0 2120 017d 0832 movf debug_character,w 2121 017e 3e24 addlw state 2122 017f 0084 movwf __fsr 2123 0180 0800 movf __indf,w 2124 0181 00b2 movwf debug_character 2125 ; #debug_character := 0x5a 2126 ; Delay 4 cycles 2127 0182 2983 goto delay__55 2128 0183 : delay__55: 2129 0183 2984 goto delay__56 2130 0184 : delay__56: 2131 0184 29d3 goto delay__45 2132 ; line_number = 291 2133 ; case 31 2134 0185 : delay__35: 2135 ; line_number = 292 2136 ; if !(debug_index@0) start 2137 ; Delay at if is 0 2138 00000034 = delay__select__18___byte equ debug_index 2139 00000000 = delay__select__18___bit equ 0 2140 ; (after recombine) true_delay=0, false_delay=3 uniform_delay=true 2141 ; CASE: true.size=0 && false.size>1 2142 ; bit_code_emit_helper1: body_code.size=3 true_test=false body_code.delay=3 (uniform delay) 2143 0185 1c34 btfss delay__select__18___byte, delay__select__18___bit 2144 0186 2989 goto delay__19 2145 ; Delay 2 cycles 2146 0187 2988 goto delay__21 2147 0188 : delay__21: 2148 0188 298c goto delay__20 2149 0189 : delay__19: 2150 ; line_number = 293 2151 ; debug_character := debug_character >> 4 2152 ; Delay at assignment is 0 2153 ; Assignment of variable to self (no code needed) 2154 0189 0eb2 swapf debug_character,f 2155 018a 300f movlw 15 2156 018b 05b2 andwf debug_character,f 2157 018c : delay__20: 2158 ; code.delay=6 back_code.delay=0 2159 ; <=bit_code_emit@symbol; sym=delay__select__18 (data:X0=>X0 code:XX=>XX) 2160 ; if final true delay=3 false delay=0 code delay=6 2161 ; line_number = 292 2162 ; if !(debug_index@0) done 2163 ; Delay 3 cycles 2164 018c 298d goto delay__57 2165 018d : delay__57: 2166 018d 0000 nop 2167 018e 29d3 goto delay__45 2168 ; line_number = 294 2169 ; case 32 2170 018f : delay__36: 2171 ; line_number = 295 2172 ; debug_character := (debug_character & 0xf) + '0' 2173 ; Delay at assignment is 0 2174 018f 300f movlw 15 2175 0190 0532 andwf debug_character,w 2176 0191 3e30 addlw 48 2177 0192 00b2 movwf debug_character 2178 ; Delay 5 cycles 2179 0193 2994 goto delay__58 2180 0194 : delay__58: 2181 0194 2995 goto delay__59 2182 0195 : delay__59: 2183 0195 0000 nop 2184 0196 29d3 goto delay__45 2185 ; line_number = 296 2186 ; case 33 2187 0197 : delay__37: 2188 ; line_number = 297 2189 ; if debug_character > '9' start 2190 ; Delay at if is 0 2191 0197 3039 movlw 57 2192 0198 0232 subwf debug_character,w 2193 0199 1903 btfsc __z___byte, __z___bit 2194 019a 1003 bcf __c___byte, __c___bit 2195 ; (after recombine) true_delay=2, false_delay=0 uniform_delay=true 2196 ; CASE: true_code.size = 0 && false_code.size > 1 2197 ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=2 (uniform delay) 2198 019b 1803 btfsc __c___byte, __c___bit 2199 019c 299f goto delay__22 2200 ; Delay 1 cycles 2201 019d 0000 nop 2202 019e 29a1 goto delay__23 2203 019f : delay__22: 2204 ; line_number = 298 2205 ; debug_character := debug_character + 'A' - '0' - 10 2206 ; Delay at assignment is 0 2207 019f 3007 movlw 7 2208 01a0 07b2 addwf debug_character,f 2209 01a1 : delay__23: 2210 ; code.delay=9 back_code.delay=0 2211 ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX) 2212 ; Uniform delay broke in relation_code_emit 2213 ; if final true delay=2 false delay=0 code delay=9 2214 ; line_number = 297 2215 ; if debug_character > '9' done 2216 01a1 29d3 goto delay__45 2217 ; line_number = 299 2218 ; case 34 2219 01a2 : delay__38: 2220 ; line_number = 300 2221 ; if debug_index >= state_size2 start 2222 ; Delay at if is 0 2223 01a2 3016 movlw 22 2224 01a3 0234 subwf debug_index,w 2225 ; (after recombine) true_delay=2, false_delay=0 uniform_delay=true 2226 ; CASE: true_code.size = 0 && false_code.size > 1 2227 ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=2 (uniform delay) 2228 01a4 1803 btfsc __c___byte, __c___bit 2229 01a5 29a8 goto delay__24 2230 ; Delay 1 cycles 2231 01a6 0000 nop 2232 01a7 29aa goto delay__25 2233 01a8 : delay__24: 2234 ; line_number = 301 2235 ; debug_character := '\r\' 2236 ; Delay at assignment is 0 2237 01a8 300d movlw 13 2238 01a9 00b2 movwf debug_character 2239 01aa : delay__25: 2240 ; code.delay=7 back_code.delay=0 2241 ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX) 2242 ; Uniform delay broke in relation_code_emit 2243 ; if final true delay=2 false delay=0 code delay=7 2244 ; line_number = 300 2245 ; if debug_index >= state_size2 done 2246 ; Delay 2 cycles 2247 01aa 29ab goto delay__60 2248 01ab : delay__60: 2249 01ab 29d3 goto delay__45 2250 ; line_number = 302 2251 ; case 35 2252 01ac : delay__39: 2253 ; line_number = 303 2254 ; if debug_index >= state_size2 + 1 start 2255 ; Delay at if is 0 2256 ; Expression is strictly a constant 2257 01ac 3017 movlw 23 2258 01ad 0234 subwf debug_index,w 2259 ; (after recombine) true_delay=2, false_delay=0 uniform_delay=true 2260 ; CASE: true_code.size = 0 && false_code.size > 1 2261 ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=2 (uniform delay) 2262 01ae 1803 btfsc __c___byte, __c___bit 2263 01af 29b2 goto delay__26 2264 ; Delay 1 cycles 2265 01b0 0000 nop 2266 01b1 29b4 goto delay__27 2267 01b2 : delay__26: 2268 ; # Turn off cursor and blink mode: 2269 ; line_number = 305 2270 ; debug_character := 0x88 2271 ; Delay at assignment is 0 2272 01b2 3088 movlw 136 2273 01b3 00b2 movwf debug_character 2274 01b4 : delay__27: 2275 ; code.delay=7 back_code.delay=0 2276 ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX) 2277 ; Uniform delay broke in relation_code_emit 2278 ; if final true delay=2 false delay=0 code delay=7 2279 ; line_number = 303 2280 ; if debug_index >= state_size2 + 1 done 2281 ; Delay 2 cycles 2282 01b4 29b5 goto delay__61 2283 01b5 : delay__61: 2284 01b5 29d3 goto delay__45 2285 ; line_number = 306 2286 ; case 36 2287 01b6 : delay__40: 2288 ; line_number = 307 2289 ; debug_index := debug_index + 1 2290 ; Delay at assignment is 0 2291 01b6 0ab4 incf debug_index,f 2292 ; Delay 8 cycles 2293 ; Delay loop takes 2 * 4 = 8 cycles 2294 01b7 3002 movlw 2 2295 01b8 : delay__62: 2296 01b8 3eff addlw 255 2297 01b9 1d03 btfss __z___byte, __z___bit 2298 01ba 29b8 goto delay__62 2299 01bb 29d3 goto delay__45 2300 ; line_number = 308 2301 ; case 37 2302 01bc : delay__41: 2303 ; line_number = 309 2304 ; if debug_index >= state_size2 + 2 start 2305 ; Delay at if is 0 2306 ; Expression is strictly a constant 2307 01bc 3018 movlw 24 2308 01bd 0234 subwf debug_index,w 2309 ; (after recombine) true_delay=2, false_delay=0 uniform_delay=true 2310 ; CASE: true_code.size = 0 && false_code.size > 1 2311 ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=2 (uniform delay) 2312 01be 1803 btfsc __c___byte, __c___bit 2313 01bf 29c2 goto delay__28 2314 ; Delay 1 cycles 2315 01c0 0000 nop 2316 01c1 29c4 goto delay__29 2317 01c2 : delay__28: 2318 ; line_number = 310 2319 ; debug_index := 0 2320 ; Delay at assignment is 0 2321 01c2 3000 movlw 0 2322 01c3 00b4 movwf debug_index 2323 01c4 : delay__29: 2324 ; code.delay=7 back_code.delay=0 2325 ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX) 2326 ; Uniform delay broke in relation_code_emit 2327 ; if final true delay=2 false delay=0 code delay=7 2328 ; line_number = 309 2329 ; if debug_index >= state_size2 + 2 done 2330 ; Delay 2 cycles 2331 01c4 29c5 goto delay__63 2332 01c5 : delay__63: 2333 01c5 29d3 goto delay__45 2334 ; line_number = 311 2335 ; case 38 2336 01c6 : delay__42: 2337 ; line_number = 312 2338 ; debug_counter := 0xff 2339 ; Delay at assignment is 0 2340 01c6 30ff movlw 255 2341 01c7 00b3 movwf debug_counter 2342 ; Delay 7 cycles 2343 01c8 29c9 goto delay__64 2344 01c9 : delay__64: 2345 01c9 29ca goto delay__65 2346 01ca : delay__65: 2347 01ca 29cb goto delay__66 2348 01cb : delay__66: 2349 01cb 0000 nop 2350 01cc 29d3 goto delay__45 2351 ; line_number = 313 2352 ; default 2353 01cd : delay__43: 2354 ; line_number = 314 2355 ; do_nothing 2356 ; Delay 9 cycles 2357 ; Delay loop takes 2 * 4 = 8 cycles 2358 01cd 3002 movlw 2 2359 01ce : delay__67: 2360 01ce 3eff addlw 255 2361 01cf 1d03 btfss __z___byte, __z___bit 2362 01d0 29ce goto delay__67 2363 01d1 0000 nop 2364 01d2 29d3 goto delay__45 2365 01d3 : delay__45: 2366 ; switch end:(data:X0=>X? code:XX=>XX) 2367 ; line_number = 272 2368 ; switch debug_counter done 2369 ; line_number = 315 2370 ; debug_counter := debug_counter + 1 2371 ; Delay at assignment is 73 2372 01d3 1283 bcf __rp0___byte, __rp0___bit 2373 01d4 0ab3 incf debug_counter,f 2374 2375 2376 ; delay after procedure statements=75 2377 ; Delay 56 cycles 2378 ; Delay loop takes 14 * 4 = 56 cycles 2379 01d5 300e movlw 14 2380 01d6 : delay__68: 2381 01d6 3eff addlw 255 2382 01d7 1d03 btfss __z___byte, __z___bit 2383 01d8 29d6 goto delay__68 2384 ; Implied return 2385 01d9 3400 retlw 0 2386 ; Final delay = 133 2387 2388 2389 2390 2391 ; line_number = 318 2392 ; procedure id 2393 01da : id: 2394 ; Last argument is sitting in W; save into argument variable 2395 01da 00bc movwf id__index 2396 ; delay=4294967295 2397 ; line_number = 319 2398 ; argument index byte 2399 0000003c = id__index equ shared___globals+28 2400 ; line_number = 320 2401 ; returns byte 2402 2403 ; # This procedure will return the index'th byte of the id: 2404 2405 ; before procedure statements delay=non-uniform, bit states=(data:X0=>X0 code:XX=>XX) 2406 ; line_number = 324 2407 ; if index <= 46 start 2408 01db 302e movlw 46 2409 01dc 023c subwf id__index,w 2410 01dd 1903 btfsc __z___byte, __z___bit 2411 01de 1003 bcf __c___byte, __c___bit 2412 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 2413 ; CASE: true.size=0 && false.size>1 2414 ; bit_code_emit_helper1: body_code.size=52 true_test=false body_code.delay=0 (non-uniform delay) 2415 01df 1803 btfsc __c___byte, __c___bit 2416 01e0 2a2f goto id__34 2417 ; line_number = 325 2418 ; switch index start 2419 01e1 3002 movlw id__32>>8 2420 01e2 008a movwf __pclath 2421 01e3 083c movf id__index,w 2422 01e4 3e00 addlw id__32 2423 01e5 0082 movwf __pcl 2424 ; page_group 47 2425 ; Add 26 NOP's until start of new page 2426 01e6 0000 nop 2427 01e7 0000 nop 2428 01e8 0000 nop 2429 01e9 0000 nop 2430 01ea 0000 nop 2431 01eb 0000 nop 2432 01ec 0000 nop 2433 01ed 0000 nop 2434 01ee 0000 nop 2435 01ef 0000 nop 2436 01f0 0000 nop 2437 01f1 0000 nop 2438 01f2 0000 nop 2439 01f3 0000 nop 2440 01f4 0000 nop 2441 01f5 0000 nop 2442 01f6 0000 nop 2443 01f7 0000 nop 2444 01f8 0000 nop 2445 01f9 0000 nop 2446 01fa 0000 nop 2447 01fb 0000 nop 2448 01fc 0000 nop 2449 01fd 0000 nop 2450 01fe 0000 nop 2451 01ff 0000 nop 2452 0200 : id__32: 2453 ; line_number = 327 2454 ; return 1 start 2455 ; line_number = 327 2456 0200 3401 retlw 1 2457 ; line_number = 327 2458 ; return 1 done 2459 ; line_number = 329 2460 ; return 0 start 2461 ; line_number = 329 2462 0201 3400 retlw 0 2463 ; line_number = 329 2464 ; return 0 done 2465 ; line_number = 331 2466 ; return 32 start 2467 ; line_number = 331 2468 0202 3420 retlw 32 2469 ; line_number = 331 2470 ; return 32 done 2471 ; line_number = 333 2472 ; return 1 start 2473 ; line_number = 333 2474 0203 3401 retlw 1 2475 ; line_number = 333 2476 ; return 1 done 2477 ; line_number = 335 2478 ; return 3 start 2479 ; line_number = 335 2480 0204 3403 retlw 3 2481 ; line_number = 335 2482 ; return 3 done 2483 ; line_number = 337 2484 ; return 1 start 2485 ; line_number = 337 2486 0205 3401 retlw 1 2487 ; line_number = 337 2488 ; return 1 done 2489 ; line_number = 339 2490 ; return 0 start 2491 ; line_number = 339 2492 0206 3400 retlw 0 2493 ; line_number = 339 2494 ; return 0 done 2495 ; line_number = 339 2496 ; return 0 start 2497 ; line_number = 339 2498 0207 3400 retlw 0 2499 ; line_number = 339 2500 ; return 0 done 2501 ; line_number = 341 2502 ; return 0 start 2503 ; line_number = 341 2504 0208 3400 retlw 0 2505 ; line_number = 341 2506 ; return 0 done 2507 ; line_number = 341 2508 ; return 0 start 2509 ; line_number = 341 2510 0209 3400 retlw 0 2511 ; line_number = 341 2512 ; return 0 done 2513 ; line_number = 341 2514 ; return 0 start 2515 ; line_number = 341 2516 020a 3400 retlw 0 2517 ; line_number = 341 2518 ; return 0 done 2519 ; line_number = 341 2520 ; return 0 start 2521 ; line_number = 341 2522 020b 3400 retlw 0 2523 ; line_number = 341 2524 ; return 0 done 2525 ; line_number = 341 2526 ; return 0 start 2527 ; line_number = 341 2528 020c 3400 retlw 0 2529 ; line_number = 341 2530 ; return 0 done 2531 ; line_number = 341 2532 ; return 0 start 2533 ; line_number = 341 2534 020d 3400 retlw 0 2535 ; line_number = 341 2536 ; return 0 done 2537 ; line_number = 341 2538 ; return 0 start 2539 ; line_number = 341 2540 020e 3400 retlw 0 2541 ; line_number = 341 2542 ; return 0 done 2543 ; line_number = 341 2544 ; return 0 start 2545 ; line_number = 341 2546 020f 3400 retlw 0 2547 ; line_number = 341 2548 ; return 0 done 2549 ; line_number = 341 2550 ; return 0 start 2551 ; line_number = 341 2552 0210 3400 retlw 0 2553 ; line_number = 341 2554 ; return 0 done 2555 ; line_number = 341 2556 ; return 0 start 2557 ; line_number = 341 2558 0211 3400 retlw 0 2559 ; line_number = 341 2560 ; return 0 done 2561 ; line_number = 341 2562 ; return 0 start 2563 ; line_number = 341 2564 0212 3400 retlw 0 2565 ; line_number = 341 2566 ; return 0 done 2567 ; line_number = 341 2568 ; return 0 start 2569 ; line_number = 341 2570 0213 3400 retlw 0 2571 ; line_number = 341 2572 ; return 0 done 2573 ; line_number = 341 2574 ; return 0 start 2575 ; line_number = 341 2576 0214 3400 retlw 0 2577 ; line_number = 341 2578 ; return 0 done 2579 ; line_number = 341 2580 ; return 0 start 2581 ; line_number = 341 2582 0215 3400 retlw 0 2583 ; line_number = 341 2584 ; return 0 done 2585 ; line_number = 341 2586 ; return 0 start 2587 ; line_number = 341 2588 0216 3400 retlw 0 2589 ; line_number = 341 2590 ; return 0 done 2591 ; line_number = 341 2592 ; return 0 start 2593 ; line_number = 341 2594 0217 3400 retlw 0 2595 ; line_number = 341 2596 ; return 0 done 2597 ; line_number = 343 2598 ; return 8 start 2599 ; line_number = 343 2600 0218 3408 retlw 8 2601 ; line_number = 343 2602 ; return 8 done 2603 ; line_number = 345 2604 ; return 'S' start 2605 ; line_number = 345 2606 0219 3453 retlw 83 2607 ; line_number = 345 2608 ; return 'S' done 2609 ; line_number = 347 2610 ; return 'w' start 2611 ; line_number = 347 2612 021a 3477 retlw 119 2613 ; line_number = 347 2614 ; return 'w' done 2615 ; line_number = 349 2616 ; return 'i' start 2617 ; line_number = 349 2618 021b 3469 retlw 105 2619 ; line_number = 349 2620 ; return 'i' done 2621 ; line_number = 351 2622 ; return 't' start 2623 ; line_number = 351 2624 021c 3474 retlw 116 2625 ; line_number = 351 2626 ; return 't' done 2627 ; line_number = 353 2628 ; return 'c' start 2629 ; line_number = 353 2630 021d 3463 retlw 99 2631 ; line_number = 353 2632 ; return 'c' done 2633 ; line_number = 355 2634 ; return 'h' start 2635 ; line_number = 355 2636 021e 3468 retlw 104 2637 ; line_number = 355 2638 ; return 'h' done 2639 ; line_number = 357 2640 ; return '8' start 2641 ; line_number = 357 2642 021f 3438 retlw 56 2643 ; line_number = 357 2644 ; return '8' done 2645 ; line_number = 359 2646 ; return 'E' start 2647 ; line_number = 359 2648 0220 3445 retlw 69 2649 ; line_number = 359 2650 ; return 'E' done 2651 ; line_number = 361 2652 ; return 13 start 2653 ; line_number = 361 2654 0221 340d retlw 13 2655 ; line_number = 361 2656 ; return 13 done 2657 ; line_number = 363 2658 ; return 'M' start 2659 ; line_number = 363 2660 0222 344d retlw 77 2661 ; line_number = 363 2662 ; return 'M' done 2663 ; line_number = 365 2664 ; return 'o' start 2665 ; line_number = 365 2666 0223 346f retlw 111 2667 ; line_number = 365 2668 ; return 'o' done 2669 ; line_number = 367 2670 ; return 'n' start 2671 ; line_number = 367 2672 0224 346e retlw 110 2673 ; line_number = 367 2674 ; return 'n' done 2675 ; line_number = 369 2676 ; return 'd' start 2677 ; line_number = 369 2678 0225 3464 retlw 100 2679 ; line_number = 369 2680 ; return 'd' done 2681 ; line_number = 371 2682 ; return 'o' start 2683 ; line_number = 371 2684 0226 346f retlw 111 2685 ; line_number = 371 2686 ; return 'o' done 2687 ; line_number = 373 2688 ; return '-' start 2689 ; line_number = 373 2690 0227 342d retlw 45 2691 ; line_number = 373 2692 ; return '-' done 2693 ; line_number = 375 2694 ; return 't' start 2695 ; line_number = 375 2696 0228 3474 retlw 116 2697 ; line_number = 375 2698 ; return 't' done 2699 ; line_number = 377 2700 ; return 'r' start 2701 ; line_number = 377 2702 0229 3472 retlw 114 2703 ; line_number = 377 2704 ; return 'r' done 2705 ; line_number = 379 2706 ; return 'o' start 2707 ; line_number = 379 2708 022a 346f retlw 111 2709 ; line_number = 379 2710 ; return 'o' done 2711 ; line_number = 381 2712 ; return 'n' start 2713 ; line_number = 381 2714 022b 346e retlw 110 2715 ; line_number = 381 2716 ; return 'n' done 2717 ; line_number = 383 2718 ; return 'i' start 2719 ; line_number = 383 2720 022c 3469 retlw 105 2721 ; line_number = 383 2722 ; return 'i' done 2723 ; line_number = 385 2724 ; return 'c' start 2725 ; line_number = 385 2726 022d 3463 retlw 99 2727 ; line_number = 385 2728 ; return 'c' done 2729 ; line_number = 387 2730 ; return 's' start 2731 ; line_number = 387 2732 022e 3473 retlw 115 2733 ; line_number = 387 2734 ; return 's' done 2735 022f : id__33: 2736 ; switch end:(data:X0=>X0 code:XX=>XX) 2737 ; line_number = 325 2738 ; switch index done 2739 022f : id__34: 2740 ; Recombine size1 = 0 || size2 = 0 2741 ; code.delay=4294967295 back_code.delay=4294967295 2742 ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX) 2743 ; line_number = 324 2744 ; if index <= 46 done 2745 ; line_number = 388 2746 ; return 0 start 2747 ; line_number = 388 2748 022f 3400 retlw 0 2749 ; line_number = 388 2750 ; return 0 done 2751 2752 ; delay after procedure statements=non-uniform 2753 2754 2755 2756 2757 ; line_number = 390 2758 ; origin 0x3ff 2759 03ff : org 1023 2760 2761 ; line_number = 392 2762 ; procedure osccal 2763 03ff : osccal: 2764 ; arguments_none 2765 ; line_number = 394 2766 ; returns byte 2767 2768 ; before procedure statements delay=non-uniform, bit states=(data:X0=>X0 code:XX=>XX) 2769 ; line_number = 396 2770 ; return 0xa0 start 2771 ; line_number = 396 2772 03ff 34a0 retlw 160 2773 ; line_number = 396 2774 ; return 0xa0 done 2775 2776 2777 ; delay after procedure statements=non-uniform 2778 2779 2780 2781 2782 2783 ; Appending 2 delayed procedures to code bank 0 2784 ; buffer = 'bit_bang' 2785 ; line_number = 33 2786 ; procedure byte_get 2787 0400 : byte_get: 2788 ; arguments_none 2789 ; line_number = 35 2790 ; returns byte 2791 2792 ; # This procedure will wait for a byte to be received from 2793 ; # serial_in_bit. It calls the delay procedure for all delays. 2794 ; # This procedure will keep calling the {delay} routine until 2795 ; # data is received. 2796 2797 ; line_number = 42 2798 ; local count byte 2799 00000020 = byte_get__count equ shared___globals 2800 ; line_number = 43 2801 ; local byte byte 2802 00000021 = byte_get__byte equ shared___globals+1 2803 2804 ; # Why does the delay procedure wait for a third of bit? Well, it 2805 ; # has to do with the loop immediately below. If we catch the 2806 ; # start bit at the beginning of a 1/3 bit time, we will be 2807 ; # sampling data at approximately 1/3 of the way into each bit. 2808 ; # Conversely, if we catch the start near the end of a 1/3 bit 2809 ; # bit time, we will be sampling data at approximately 2/3 of the 2810 ; # way into each bit. So, what this means is that our bit sample 2811 ; # times will be somewhere between 1/3 and 2/3 of bit (i.e. in 2812 ; # the middle of the bit. 2813 2814 ; # It would be nice to tweak the code to shorter delay times 2815 ; # (1/4 bit, 1/5 bit, etc.) but then it gets too hard to get 2816 ; # the bookeeping done in the delay routine. A PIC running at 2817 ; # 4MHz (=1MIPS), only has 138 instructions available for the 2818 ; # delay routine when at 1/3 of bit. 2819 2820 ; # Wait for a start bit: 2821 ; before procedure statements delay=non-uniform, bit states=(data:X0=>X0 code:XX=>XX) 2822 ; line_number = 62 2823 ; waiting := 1 2824 0400 14df bsf waiting___byte, waiting___bit 2825 ; line_number = 63 2826 ; receiving := 1 2827 0401 145f bsf receiving___byte, receiving___bit 2828 ; line_number = 64 2829 ; while serial_in start 2830 0402 : byte_get__1: 2831 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 2832 ; CASE: true_code.size = 0 && false_code.size > 1 2833 ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=0 (non-uniform delay) 2834 0402 1d87 btfss serial_in___byte, serial_in___bit 2835 0403 2c06 goto byte_get__2 2836 ; line_number = 65 2837 ; delay instructions_per_delay - 3 start 2838 ; Delay expression evaluates to 135 2839 ; line_number = 66 2840 ; call delay() 2841 ; Delay at call is 0 2842 0404 20fc call delay 2843 ; line_number = 65 2844 ; delay instructions_per_delay - 3 done 2845 0405 2c02 goto byte_get__1 2846 ; Recombine size1 = 0 || size2 = 0 2847 0406 : byte_get__2: 2848 ; code.delay=4294967295 back_code.delay=4294967295 2849 ; <=bit_code_emit@symbol; sym=serial_in (data:X0=>X0 code:XX=>XX) 2850 ; line_number = 64 2851 ; while serial_in done 2852 ; line_number = 67 2853 ; waiting := 0 2854 0406 10df bcf waiting___byte, waiting___bit 2855 2856 ; # Clear out any preceeding interrupt condition: 2857 ; line_number = 70 2858 ; serial_out := 1 2859 0407 1507 bsf serial_out___byte, serial_out___bit 2860 2861 ; # Skip over start bit: 2862 ; line_number = 73 2863 ; delay instructions_per_bit - 2 start 2864 ; Delay expression evaluates to 414 2865 ; # There are two instructions of set-up for following loop_exactly: 2866 ; line_number = 75 2867 ; call delay() 2868 ; Delay at call is 0 2869 0408 20fc call delay 2870 ; line_number = 76 2871 ; call delay() 2872 ; Delay at call is 135 2873 0409 20fc call delay 2874 ; line_number = 77 2875 ; call delay() 2876 ; Delay at call is 270 2877 040a 20fc call delay 2878 ; line_number = 78 2879 ; byte := 0 2880 ; Delay at assignment is 405 2881 040b 3000 movlw 0 2882 040c 00a1 movwf byte_get__byte 2883 2884 ; Delay 7 cycles 2885 040d 2c0e goto byte_get__3 2886 040e : byte_get__3: 2887 040e 2c0f goto byte_get__4 2888 040f : byte_get__4: 2889 040f 2c10 goto byte_get__5 2890 0410 : byte_get__5: 2891 0410 0000 nop 2892 ; line_number = 73 2893 ; delay instructions_per_bit - 2 done 2894 ; # Read in 8 bits of data: 2895 ; line_number = 81 2896 ; loop_exactly 8 start 2897 00000040 = byte_get__6 equ shared___globals+32 2898 0411 3008 movlw 8 2899 0412 00c0 movwf byte_get__6 2900 0413 : byte_get__7: 2901 ; # There are 3 instrucitons of loop_exactly overhead: 2902 ; line_number = 83 2903 ; delay instructions_per_bit - 3 start 2904 ; Delay expression evaluates to 413 2905 ; line_number = 84 2906 ; call delay() 2907 ; Delay at call is 0 2908 0413 20fc call delay 2909 ; line_number = 85 2910 ; byte := byte >> 1 2911 ; Delay at assignment is 135 2912 ; Assignment of variable to self (no code needed) 2913 0414 0ca1 rrf byte_get__byte,f 2914 0415 13a1 bcf byte_get__byte, 7 2915 ; line_number = 86 2916 ; if serial_in start 2917 ; Delay at if is 137 2918 ; (after recombine) true_delay=1, false_delay=0 uniform_delay=true 2919 ; CASE: True.size=1 False.size=0 2920 0416 1987 btfsc serial_in___byte, serial_in___bit 2921 ; line_number = 87 2922 ; byte@7 := 1 2923 ; Delay at assignment is 0 2924 00000021 = byte_get__select__8___byte equ byte_get__byte 2925 00000007 = byte_get__select__8___bit equ 7 2926 0417 17a1 bsf byte_get__select__8___byte, byte_get__select__8___bit 2927 ; code.delay=139 back_code.delay=0 2928 ; <=bit_code_emit@symbol; sym=serial_in (data:X0=>X0 code:XX=>XX) 2929 ; if final true delay=1 false delay=0 code delay=139 2930 ; line_number = 86 2931 ; if serial_in done 2932 ; line_number = 88 2933 ; call delay() 2934 ; Delay at call is 139 2935 0418 20fc call delay 2936 ; line_number = 89 2937 ; call delay() 2938 ; Delay at call is 274 2939 0419 20fc call delay 2940 2941 ; Delay 4 cycles 2942 041a 2c1b goto byte_get__9 2943 041b : byte_get__9: 2944 041b 2c1c goto byte_get__10 2945 041c : byte_get__10: 2946 ; line_number = 83 2947 ; delay instructions_per_bit - 3 done 2948 ; line_number = 81 2949 ; loop_exactly 8 wrap-up 2950 041c 0bc0 decfsz byte_get__6,f 2951 041d 2c13 goto byte_get__7 2952 ; line_number = 81 2953 ; loop_exactly 8 done 2954 ; # Skip over 2/3's of stop bit; 3 cycles for return: 2955 ; line_number = 92 2956 ; delay instructions_per_delay*2 - 3 start 2957 ; Delay expression evaluates to 273 2958 ; line_number = 93 2959 ; call delay() 2960 ; Delay at call is 0 2961 041e 20fc call delay 2962 ; line_number = 94 2963 ; call delay() 2964 ; Delay at call is 135 2965 041f 20fc call delay 2966 ; Delay 3 cycles 2967 0420 2c21 goto byte_get__11 2968 0421 : byte_get__11: 2969 0421 0000 nop 2970 ; line_number = 92 2971 ; delay instructions_per_delay*2 - 3 done 2972 ; line_number = 95 2973 ; command_previous := command_last 2974 0422 0825 movf command_last,w 2975 0423 00a4 movwf command_previous 2976 ; line_number = 96 2977 ; command_last := byte 2978 0424 0821 movf byte_get__byte,w 2979 0425 00a5 movwf command_last 2980 ; line_number = 97 2981 ; serial_out := 1 2982 0426 1507 bsf serial_out___byte, serial_out___bit 2983 ; line_number = 98 2984 ; return byte start 2985 ; line_number = 98 2986 0427 0821 movf byte_get__byte,w 2987 0428 0008 return 2988 ; line_number = 98 2989 ; return byte done 2990 2991 2992 ; delay after procedure statements=non-uniform 2993 2994 2995 2996 2997 ; line_number = 101 2998 ; procedure byte_put 2999 0429 : byte_put: 3000 ; Last argument is sitting in W; save into argument variable 3001 0429 00a3 movwf byte_put__byte 3002 ; delay=4294967295 3003 ; line_number = 102 3004 ; argument byte byte 3005 00000023 = byte_put__byte equ shared___globals+3 3006 ; line_number = 103 3007 ; returns_nothing 3008 3009 ; # This procedure will send {byte} to {serial_out} pin. The {delay} 3010 ; # procedure is called to provide the appropriate bit timing. 3011 3012 ; line_number = 108 3013 ; local count byte 3014 00000022 = byte_put__count equ shared___globals+2 3015 3016 ; # {receiving} will be 1 if the last get/put routine was a get. 3017 ; # Before we start transmitting a response back, we want to ensure 3018 ; # that there has been enough time to turn the line around. 3019 ; # We delay the first 1/3 of a bit to pad out the 9-2/3 bits 3020 ; # from get_byte to 10 bits. We delay another 3 bits just to 3021 ; # ensure that slow interpreters do not get overrun. 3022 ; before procedure statements delay=non-uniform, bit states=(data:X0=>X0 code:XX=>XX) 3023 ; line_number = 116 3024 ; sent_previous := sent_last 3025 042a 0826 movf sent_last,w 3026 042b 00a7 movwf sent_previous 3027 ; line_number = 117 3028 ; sent_last := byte 3029 042c 0823 movf byte_put__byte,w 3030 042d 00a6 movwf sent_last 3031 ; line_number = 118 3032 ; if receiving start 3033 ; (after recombine) true_delay=non-uniform, false_delay=non-uniform 3034 ; CASE: true_code.size = 0 && false_code.size > 1 3035 ; bit_code_emit_helper1: body_code.size=4 true_test=true body_code.delay=0 (non-uniform delay) 3036 042e 1c5f btfss receiving___byte, receiving___bit 3037 042f 2c36 goto byte_put__3 3038 ; line_number = 119 3039 ; receiving := 0 3040 0430 105f bcf receiving___byte, receiving___bit 3041 ; # 10 = 1 + 3*3 = 3-1/3 extra bits of delay: 3042 ; line_number = 121 3043 ; loop_exactly 10 start 3044 00000041 = byte_put__1 equ shared___globals+33 3045 0431 300a movlw 10 3046 0432 00c1 movwf byte_put__1 3047 0433 : byte_put__2: 3048 ; line_number = 122 3049 ; call delay() 3050 0433 20fc call delay 3051 3052 ; line_number = 121 3053 ; loop_exactly 10 wrap-up 3054 0434 0bc1 decfsz byte_put__1,f 3055 0435 2c33 goto byte_put__2 3056 ; line_number = 121 3057 ; loop_exactly 10 done 3058 ; Recombine size1 = 0 || size2 = 0 3059 0436 : byte_put__3: 3060 ; code.delay=4294967295 back_code.delay=4294967295 3061 ; <=bit_code_emit@symbol; sym=receiving (data:X0=>X0 code:XX=>XX) 3062 ; line_number = 118 3063 ; if receiving done 3064 ; # Send the start bit: 3065 ; line_number = 125 3066 ; delay instructions_per_bit - 2 start 3067 ; Delay expression evaluates to 414 3068 ; # The loop_exactly setup after this is 2 instructions: 3069 ; line_number = 127 3070 ; serial_out := 0 3071 ; Delay at assignment is 0 3072 0436 1107 bcf serial_out___byte, serial_out___bit 3073 ; line_number = 128 3074 ; call delay() 3075 ; Delay at call is 1 3076 0437 20fc call delay 3077 ; line_number = 129 3078 ; call delay() 3079 ; Delay at call is 136 3080 0438 20fc call delay 3081 ; line_number = 130 3082 ; call delay() 3083 ; Delay at call is 271 3084 0439 20fc call delay 3085 3086 ; Delay 8 cycles 3087 ; Delay loop takes 2 * 4 = 8 cycles 3088 043a 3002 movlw 2 3089 043b : byte_put__4: 3090 043b 3eff addlw 255 3091 043c 1d03 btfss __z___byte, __z___bit 3092 043d 2c3b goto byte_put__4 3093 ; line_number = 125 3094 ; delay instructions_per_bit - 2 done 3095 ; # Send the data: 3096 ; line_number = 133 3097 ; loop_exactly 8 start 3098 00000041 = byte_put__5 equ shared___globals+33 3099 043e 3008 movlw 8 3100 043f 00c1 movwf byte_put__5 3101 0440 : byte_put__6: 3102 ; # Loop_exactly overhead is 3 instructions: 3103 ; line_number = 135 3104 ; delay instructions_per_bit - 3 start 3105 ; Delay expression evaluates to 413 3106 ; line_number = 136 3107 ; if byte@0 start 3108 ; Delay at if is 0 3109 00000023 = byte_put__select__7___byte equ byte_put__byte 3110 00000000 = byte_put__select__7___bit equ 0 3111 ; (after recombine) true_delay=1, false_delay=1 uniform_delay=true 3112 ; CASE: true_size=1 && false_size=1 3113 ; SUBCASE: Double test; true, then false 3114 0440 1823 btfsc byte_put__select__7___byte, byte_put__select__7___bit 3115 ; line_number = 137 3116 ; serial_out := 1 3117 ; Delay at assignment is 0 3118 0441 1507 bsf serial_out___byte, serial_out___bit 3119 0442 1c23 btfss byte_put__select__7___byte, byte_put__select__7___bit 3120 ; line_number = 139 3121 ; serial_out := 0 3122 ; Delay at assignment is 0 3123 0443 1107 bcf serial_out___byte, serial_out___bit 3124 ; code.delay=4 back_code.delay=0 3125 ; <=bit_code_emit@symbol; sym=byte_put__select__7 (data:X0=>X0 code:XX=>XX) 3126 ; if final true delay=1 false delay=1 code delay=4 3127 ; line_number = 136 3128 ; if byte@0 done 3129 ; line_number = 140 3130 ; byte := byte >> 1 3131 ; Delay at assignment is 4 3132 ; Assignment of variable to self (no code needed) 3133 0444 0ca3 rrf byte_put__byte,f 3134 0445 13a3 bcf byte_put__byte, 7 3135 ; line_number = 141 3136 ; call delay() 3137 ; Delay at call is 6 3138 0446 20fc call delay 3139 ; line_number = 142 3140 ; call delay() 3141 ; Delay at call is 141 3142 0447 20fc call delay 3143 ; line_number = 143 3144 ; call delay() 3145 ; Delay at call is 276 3146 0448 20fc call delay 3147 3148 ; Delay 2 cycles 3149 0449 2c4a goto byte_put__8 3150 044a : byte_put__8: 3151 ; line_number = 135 3152 ; delay instructions_per_bit - 3 done 3153 ; line_number = 133 3154 ; loop_exactly 8 wrap-up 3155 044a 0bc1 decfsz byte_put__5,f 3156 044b 2c40 goto byte_put__6 3157 ; line_number = 133 3158 ; loop_exactly 8 done 3159 ; # Send the stop bit: 3160 ; line_number = 146 3161 ; delay instructions_per_bit start 3162 ; Delay expression evaluates to 416 3163 ; line_number = 147 3164 ; serial_out := 1 3165 ; Delay at assignment is 0 3166 044c 1507 bsf serial_out___byte, serial_out___bit 3167 ; line_number = 148 3168 ; call delay() 3169 ; Delay at call is 1 3170 044d 20fc call delay 3171 ; line_number = 149 3172 ; call delay() 3173 ; Delay at call is 136 3174 044e 20fc call delay 3175 ; line_number = 150 3176 ; call delay() 3177 ; Delay at call is 271 3178 044f 20fc call delay 3179 3180 3181 ; Delay 10 cycles 3182 ; Delay loop takes 2 * 4 = 8 cycles 3183 0450 3002 movlw 2 3184 0451 : byte_put__9: 3185 0451 3eff addlw 255 3186 0452 1d03 btfss __z___byte, __z___bit 3187 0453 2c51 goto byte_put__9 3188 0454 2c55 goto byte_put__10 3189 0455 : byte_put__10: 3190 ; line_number = 146 3191 ; delay instructions_per_bit done 3192 ; delay after procedure statements=non-uniform 3193 ; Implied return 3194 0455 3400 retlw 0 3195 3196 3197 3198 3199 ; Configuration bits 3200 ; fill = 0x0 3201 ; bg = bg11 (0x3000) 3202 ; cpd = off (0x100) 3203 ; cp = off (0x80) 3204 ; boden = off (0x0) 3205 ; mclre = off (0x0) 3206 ; pwrte = off (0x10) 3207 ; wdte = off (0x0) 3208 ; fosc = int_no_clk (0x4) 3209 ; 12692 = 0x3194 3210 3194 = __config 12692 3211 ; Define start addresses for data regions 3212 ; Region="shared___globals" Address=32" Size=64 Bytes=34 Bits=3 Available=29 3213 ; Region="shared___globals" Address=32" Size=64 Bytes=34 Bits=3 Available=29 3214 ; Region="shared___globals" Address=32" Size=64 Bytes=34 Bits=3 Available=29 3215 end