        radix   dec
        ; Code bank 0; Start address: 0; End address: 4095
        org     0
        ; #pin 7 = rc3_in, name=io7, mask=io7_mask, bit=io7_bit

        ; Define start addresses for data regions
shared___globals equ 112
globals___0 equ 32
globals___1 equ 160
globals___2 equ 288
__indf equ 0
__pcl equ 2
__status equ 3
__fsr equ 4
__c___byte equ 3
__c___bit equ 0
__z___byte equ 3
__z___bit equ 2
__rp0___byte equ 3
__rp0___bit equ 5
__rp1___byte equ 3
__rp1___bit equ 6
__irp___byte equ 3
__irp___bit equ 7
__pclath equ 10
__cb0___byte equ 10
__cb0___bit equ 3
__cb1___byte equ 10
__cb1___bit equ 4

        ; # Copyright (c) 2000-2005 by Wayne C. Gramlich
        ; # All rights reserved.

        ; buffer = 'irdistance8'
        ; line_number = 6
        ; library _robobricks_pic16f688 entered

        ; # Copyright (c) 2000-2005 by Wayne C. Gramlich and Bill Benson
        ; # All rights reserved.

        ; buffer = '_robobricks_pic16f688'
        ; line_number = 6
        ; library _pic16f688 entered
        ; # Copyright (c) 2004 by Wayne C. Gramlich
        ; # All rights reserved.

        ; buffer = '_pic16f688'
        ; line_number = 5
        ; processor pic16f688
        ; line_number = 6
        ; configure_address 0x2007
        ; line_number = 7
        ;  configure_fill 0x3000
        ; line_number = 8
        ;  configure_option fcmen: on = 0x800
        ; line_number = 9
        ;  configure_option fcmen: off = 0x000
        ; line_number = 10
        ;  configure_option ieso: on = 0x400
        ; line_number = 11
        ;  configure_option ieso: off = 0x000
        ; line_number = 12
        ;  configure_option boden: on = 0x300
        ; line_number = 13
        ;  configure_option boden: partial = 0x200
        ; line_number = 14
        ;  configure_option boden: sboden = 0x100
        ; line_number = 15
        ;  configure_option boden: off = 0x000
        ; line_number = 16
        ;  configure_option cpd: on = 0x00
        ; line_number = 17
        ;  configure_option cpd: off = 0x80
        ; line_number = 18
        ;  configure_option cp: on = 0x00
        ; line_number = 19
        ;  configure_option cp: off = 0x40
        ; line_number = 20
        ;  configure_option mclre: on = 0x20
        ; line_number = 21
        ;  configure_option mclre: off = 0x20
        ; line_number = 22
        ;  configure_option pwrte: on = 0x00
        ; line_number = 23
        ;  configure_option pwrte: off = 0x10
        ; line_number = 24
        ;  configure_option wdte: on = 8
        ; line_number = 25
        ;  configure_option wdte: off = 0
        ; line_number = 26
        ;  configure_option fosc: rc_clk = 7
        ; line_number = 27
        ;  configure_option fosc: rc_no_clk = 6
        ; line_number = 28
        ;  configure_option fosc: int_clk = 5
        ; line_number = 29
        ;  configure_option fosc: int_no_clk = 4
        ; line_number = 30
        ;  configure_option fosc: ec = 3
        ; line_number = 31
        ;  configure_option fosc: hs = 2
        ; line_number = 32
        ;  configure_option fosc: xt = 1
        ; line_number = 33
        ;  configure_option fosc: lp = 0

        ; line_number = 35
        ;  code_bank 0x0 : 0xfff
        ; line_number = 36
        ;  data_bank 0x0 : 0x7f
        ; line_number = 37
        ;  data_bank 0x80 : 0xff
        ; line_number = 38
        ;  data_bank 0x100 : 0x17f
        ; line_number = 39
        ;  data_bank 0x180 : 0x1ff
        ; line_number = 40
        ;  global_region 0x20 : 0x6f
        ; line_number = 41
        ;  global_region 0xa0 : 0xef
        ; line_number = 42
        ;  global_region 0x120 : 0x16f
        ; line_number = 43
        ;  shared_region 0x70 : 0x7f
        ; line_number = 44
        ;  interrupts_possible
        ; line_number = 45
        ;  packages pdip=14, soic=14, tssop=14
        ; line_number = 46
        ;  pin vdd, power_supply
        ; line_number = 47
        ; pin_bindings pdip=1, soic=1, tssop=1
        ; line_number = 48
        ; pin ra5_in, ra5_nc, ra5_out, t1cki, osc1, clkin
        ; line_number = 49
        ; pin_bindings pdip=2, soic=2, tssop=2
        ; line_number = 50
        ;  bind_to _porta@5
        ; line_number = 51
        ;  or_if ra5_in _trisa 32
        ; line_number = 52
        ;  or_if ra5_nc _trisa 32
        ; line_number = 53
        ;  or_if ra5_out _trisa 0
        ; line_number = 54
        ; pin ra4_in, ra4_nc, ra4_out, t1g, osc2, an3, clkout
        ; line_number = 55
        ; pin_bindings pdip=3, soic=3, tssop=3
        ; line_number = 56
        ;  bind_to _porta@4
        ; line_number = 57
        ;  or_if ra4_in _trisa 16
        ; line_number = 58
        ;  or_if ra4_nc _trisa 16
        ; line_number = 59
        ;  or_if ra4_out _trisa 0
        ; line_number = 60
        ;  or_if an3 _trisa 8
        ; line_number = 61
        ;  or_if ra4_in _ansel 0
        ; line_number = 62
        ;  or_if ra4_out _ansel 0
        ; line_number = 63
        ;  or_if an3 _ansel 8
        ; line_number = 64
        ;  or_if ra4_in _adcon0 0
        ; line_number = 65
        ;  or_if ra4_out _adcon0 0
        ; line_number = 66
        ;  or_if an3 _adcon0 1
        ; line_number = 67
        ; pin ra3_in, ra3_nc, mclr, vpp
        ; line_number = 68
        ; pin_bindings pdip=4, soic=4, tssop=4
        ; line_number = 69
        ;  bind_to _porta@4
        ; line_number = 70
        ;  or_if ra3_in _trisa 8
        ; line_number = 71
        ;  or_if ra3_nc _trisa 8
        ; line_number = 72
        ; pin rc5_in, rc5_nc, rc5_out, rx, dt
        ; line_number = 73
        ; pin_bindings pdip=5, soic=5, tssop=5
        ; line_number = 74
        ;  bind_to _portc@5
        ; line_number = 75
        ;  or_if rc5_in _trisc 32
        ; line_number = 76
        ;  or_if rc5_nc _trisc 32
        ; line_number = 77
        ;  or_if rc5_out _trisc 0
        ; line_number = 78
        ;  or_if rx _trisc 32
        ; line_number = 79
        ; pin rc4_in, rc4_nc, rc4_out, c2out, tx, ck
        ; line_number = 80
        ; pin_bindings pdip=6, soic=6, tssop=6
        ; line_number = 81
        ;  bind_to _portc@4
        ; line_number = 82
        ;  or_if rc4_in _trisc 16
        ; line_number = 83
        ;  or_if rc4_nc _trisc 16
        ; line_number = 84
        ;  or_if rc4_out _trisc 0
        ; # The UART documentation says TX must be marked as in input:
        ; line_number = 86
        ;  or_if tx _trisc 16
        ; line_number = 87
        ; pin rc3_in, rc3_nc, rc3_out, an7
        ; line_number = 88
        ; pin_bindings pdip=7, soic=7, tssop=7
        ; line_number = 89
        ;  bind_to _portc@3
        ; line_number = 90
        ;  or_if rc3_in _trisc 8
        ; line_number = 91
        ;  or_if rc3_nc _trisc 8
        ; line_number = 92
        ;  or_if rc3_out _trisc 0
        ; line_number = 93
        ;  or_if an7 _trisc 8
        ; line_number = 94
        ;  or_if rc3_in _ansel 0
        ; line_number = 95
        ;  or_if rc3_out _ansel 0
        ; line_number = 96
        ;  or_if an7 _ansel 128
        ; line_number = 97
        ;  or_if rc3_in _adcon0 0
        ; line_number = 98
        ;  or_if rc3_out _adcon0 0
        ; line_number = 99
        ;  or_if an7 _adcon0 1
        ; line_number = 100
        ; pin rc2_in, rc2_nc, rc2_out, an6
        ; line_number = 101
        ; pin_bindings pdip=8, soic=8, tssop=8
        ; line_number = 102
        ;  bind_to _portc@2
        ; line_number = 103
        ;  or_if rc2_in _trisc 4
        ; line_number = 104
        ;  or_if rc2_nc _trisc 4
        ; line_number = 105
        ;  or_if rc2_out _trisc 0
        ; line_number = 106
        ;  or_if an6 _trisc 4
        ; line_number = 107
        ;  or_if rc2_in _ansel 0
        ; line_number = 108
        ;  or_if rc2_out _ansel 0
        ; line_number = 109
        ;  or_if an6 _ansel 64
        ; line_number = 110
        ;  or_if rc2_in _adcon0 0
        ; line_number = 111
        ;  or_if rc2_out _adcon0 0
        ; line_number = 112
        ;  or_if an6 _adcon0 1
        ; line_number = 113
        ; pin rc1_in, rc1_nc, rc1_out, an5, c2in_minus
        ; line_number = 114
        ; pin_bindings pdip=9, soic=9, tssop=9
        ; line_number = 115
        ;  bind_to _portc@1
        ; line_number = 116
        ;  or_if rc1_in _trisc 2
        ; line_number = 117
        ;  or_if rc1_nc _trisc 2
        ; line_number = 118
        ;  or_if rc1_out _trisc 0
        ; line_number = 119
        ;  or_if rc1_in _cmcon0 7
        ; line_number = 120
        ;  or_if rc1_out _cmcon0 7
        ; line_number = 121
        ;  or_if an5 _trisc 2
        ; line_number = 122
        ;  or_if rc1_in _ansel 0
        ; line_number = 123
        ;  or_if rc1_out _ansel 0
        ; line_number = 124
        ;  or_if an5 _ansel 32
        ; line_number = 125
        ;  or_if rc1_in _adcon0 0
        ; line_number = 126
        ;  or_if rc1_out _adcon0 0
        ; line_number = 127
        ;  or_if an5 _adcon0 1
        ; line_number = 128
        ; pin rc0_in, rc0_nc, rc0_out, an4, c2in_plus
        ; line_number = 129
        ; pin_bindings pdip=10, soic=10, tssop=10
        ; line_number = 130
        ;  bind_to _portc@0
        ; line_number = 131
        ;  or_if rc0_in _trisc 1
        ; line_number = 132
        ;  or_if rc0_nc _trisc 1
        ; line_number = 133
        ;  or_if rc0_out _trisc 0
        ; line_number = 134
        ;  or_if rc0_in _cmcon0 7
        ; line_number = 135
        ;  or_if rc0_out _cmcon0 7
        ; line_number = 136
        ;  or_if an4 _trisc 1
        ; line_number = 137
        ;  or_if rc0_in _ansel 0
        ; line_number = 138
        ;  or_if rc0_out _ansel 0
        ; line_number = 139
        ;  or_if an4 _ansel 16
        ; line_number = 140
        ;  or_if rc0_in _adcon0 0
        ; line_number = 141
        ;  or_if rc0_out _adcon0 0
        ; line_number = 142
        ;  or_if an4 _adcon0 1
        ; line_number = 143
        ; pin ra2_in, ra2_nc, ra2_out, an2, c1out, t0cki, int
        ; line_number = 144
        ; pin_bindings pdip=11, soic=11, tssop=11
        ; line_number = 145
        ;  bind_to _porta@2
        ; line_number = 146
        ;  or_if ra2_in _trisa 4
        ; line_number = 147
        ;  or_if ra2_nc _trisa 4
        ; line_number = 148
        ;  or_if ra2_out _trisa 0
        ; line_number = 149
        ;  or_if an2 _trisa 4
        ; line_number = 150
        ;  or_if ra2_in _ansel 0
        ; line_number = 151
        ;  or_if ra2_out _ansel 0
        ; line_number = 152
        ;  or_if an2 _ansel 4
        ; line_number = 153
        ;  or_if ra2_in _adcon0 0
        ; line_number = 154
        ;  or_if ra2_out _adcon0 0
        ; line_number = 155
        ;  or_if an2 _adcon0 1
        ; line_number = 156
        ; pin ra1_in, ra1_nc, ra1_out, an1, c1in_minus, vref, icspclk
        ; line_number = 157
        ; pin_bindings pdip=12, soic=12, tssop=12
        ; line_number = 158
        ;  bind_to _porta@1
        ; line_number = 159
        ;  or_if ra1_in _trisa 2
        ; line_number = 160
        ;  or_if ra1_nc _trisa 2
        ; line_number = 161
        ;  or_if ra1_out _trisa 0
        ; line_number = 162
        ;  or_if ra1_in _cmcon0 7
        ; line_number = 163
        ;  or_if ra1_out _cmcon0 7
        ; line_number = 164
        ;  or_if an1 _trisa 2
        ; line_number = 165
        ;  or_if ra1_in _ansel 0
        ; line_number = 166
        ;  or_if ra1_out _ansel 0
        ; line_number = 167
        ;  or_if an1 _ansel 2
        ; line_number = 168
        ;  or_if ra1_in _adcon0 0
        ; line_number = 169
        ;  or_if ra1_out _adcon0 0
        ; line_number = 170
        ;  or_if an1 _adcon0 1
        ; line_number = 171
        ; pin ra0_in, ra0_nc, ra0_out, an0, c1in_plus, icspdat, ulpwu
        ; line_number = 172
        ; pin_bindings pdip=13, soic=13, tssop=13
        ; line_number = 173
        ;  bind_to _porta@0
        ; line_number = 174
        ;  or_if ra0_in _trisa 1
        ; line_number = 175
        ;  or_if ra0_nc _trisa 1
        ; line_number = 176
        ;  or_if ra0_out _trisa 0
        ; line_number = 177
        ;  or_if ra0_in _cmcon0 7
        ; line_number = 178
        ;  or_if ra0_out _cmcon0 7
        ; line_number = 179
        ;  or_if an0 _trisa 1
        ; line_number = 180
        ;  or_if ra0_in _ansel 0
        ; line_number = 181
        ;  or_if ra0_out _ansel 0
        ; line_number = 182
        ;  or_if an0 _ansel 1
        ; line_number = 183
        ;  or_if ra0_in _adcon0 0
        ; line_number = 184
        ;  or_if ra0_out _adcon0 0
        ; line_number = 185
        ;  or_if an0 _adcon0 1
        ; line_number = 186
        ; pin vss, ground
        ; line_number = 187
        ; pin_bindings pdip=14, soic=14, tssop=14


        ; # Register/bit bindings:

        ; # Databank 0 (0x0 - 0x7f):

        ; line_number = 196
        ; register _indf = 
_indf equ 0

        ; line_number = 198
        ; register _tmr0 = 
_tmr0 equ 1

        ; line_number = 200
        ; register _pcl = 
_pcl equ 2

        ; line_number = 202
        ; register _status = 
_status equ 3
        ; line_number = 203
        ; bind _irp = _status@7
_irp___byte equ _status
_irp___bit equ 7
        ; line_number = 204
        ; bind _rp1 = _status@5
_rp1___byte equ _status
_rp1___bit equ 5
        ; line_number = 205
        ; bind _rp0 = _status@5
_rp0___byte equ _status
_rp0___bit equ 5
        ; line_number = 206
        ; bind _to = _status@4
_to___byte equ _status
_to___bit equ 4
        ; line_number = 207
        ; bind _pd = _status@3
_pd___byte equ _status
_pd___bit equ 3
        ; line_number = 208
        ; bind _z = _status@2
_z___byte equ _status
_z___bit equ 2
        ; line_number = 209
        ; bind _dc = _status@1
_dc___byte equ _status
_dc___bit equ 1
        ; line_number = 210
        ; bind _c = _status@0
_c___byte equ _status
_c___bit equ 0

        ; line_number = 212
        ; register _fsr = 
_fsr equ 4

        ; line_number = 214
        ; register _porta = 
_porta equ 5
        ; line_number = 215
        ; register _ra = 
_ra equ 5
        ; line_number = 216
        ; bind _ra5 = _porta@5
_ra5___byte equ _porta
_ra5___bit equ 5
        ; line_number = 217
        ; bind _ra4 = _porta@4
_ra4___byte equ _porta
_ra4___bit equ 4
        ; line_number = 218
        ; bind _ra3 = _porta@3
_ra3___byte equ _porta
_ra3___bit equ 3
        ; line_number = 219
        ; bind _ra2 = _porta@2
_ra2___byte equ _porta
_ra2___bit equ 2
        ; line_number = 220
        ; bind _ra1 = _porta@1
_ra1___byte equ _porta
_ra1___bit equ 1
        ; line_number = 221
        ; bind _ra0 = _porta@0
_ra0___byte equ _porta
_ra0___bit equ 0

        ; line_number = 223
        ; register _portc = 
_portc equ 7
        ; line_number = 224
        ; register _rc = 
_rc equ 7
        ; line_number = 225
        ; bind _rc5 = _portc@5
_rc5___byte equ _portc
_rc5___bit equ 5
        ; line_number = 226
        ; bind _rc4 = _portc@4
_rc4___byte equ _portc
_rc4___bit equ 4
        ; line_number = 227
        ; bind _rc3 = _portc@3
_rc3___byte equ _portc
_rc3___bit equ 3
        ; line_number = 228
        ; bind _rc2 = _portc@2
_rc2___byte equ _portc
_rc2___bit equ 2
        ; line_number = 229
        ; bind _rc1 = _portc@1
_rc1___byte equ _portc
_rc1___bit equ 1
        ; line_number = 230
        ; bind _rc0 = _portc@0
_rc0___byte equ _portc
_rc0___bit equ 0

        ; line_number = 232
        ; register _pclath = 
_pclath equ 10

        ; line_number = 234
        ; register _intcon = 
_intcon equ 11
        ; line_number = 235
        ; bind _gie = _intcon@7
_gie___byte equ _intcon
_gie___bit equ 7
        ; line_number = 236
        ; bind _peie = _intcon@6
_peie___byte equ _intcon
_peie___bit equ 6
        ; line_number = 237
        ; bind _t0ie = _intcon@5
_t0ie___byte equ _intcon
_t0ie___bit equ 5
        ; line_number = 238
        ; bind _inte = _intcon@4
_inte___byte equ _intcon
_inte___bit equ 4
        ; line_number = 239
        ; bind _raie = _intcon@3
_raie___byte equ _intcon
_raie___bit equ 3
        ; line_number = 240
        ; bind _t0if = _intcon@2
_t0if___byte equ _intcon
_t0if___bit equ 2
        ; line_number = 241
        ; bind _intf = _intcon@1
_intf___byte equ _intcon
_intf___bit equ 1
        ; line_number = 242
        ; bind _raif = _intcon@0
_raif___byte equ _intcon
_raif___bit equ 0

        ; line_number = 244
        ; register _pir1 = 
_pir1 equ 12
        ; line_number = 245
        ; bind _eeif = _pir1@7
_eeif___byte equ _pir1
_eeif___bit equ 7
        ; line_number = 246
        ; bind _adif = _pir1@6
_adif___byte equ _pir1
_adif___bit equ 6
        ; line_number = 247
        ; bind _rcif = _pir1@5
_rcif___byte equ _pir1
_rcif___bit equ 5
        ; line_number = 248
        ; bind _c2if = _pir1@4
_c2if___byte equ _pir1
_c2if___bit equ 4
        ; line_number = 249
        ; bind _c1if = _pir1@3
_c1if___byte equ _pir1
_c1if___bit equ 3
        ; line_number = 250
        ; bind _osfif = _pir1@2
_osfif___byte equ _pir1
_osfif___bit equ 2
        ; line_number = 251
        ; bind _txif = _pir1@1
_txif___byte equ _pir1
_txif___bit equ 1
        ; line_number = 252
        ; bind _tmr1if = _pir1@0
_tmr1if___byte equ _pir1
_tmr1if___bit equ 0

        ; line_number = 254
        ; register _tmr1l = 
_tmr1l equ 14

        ; line_number = 256
        ; register _tmr1h = 
_tmr1h equ 15

        ; line_number = 258
        ; register _t1con = 
_t1con equ 16
        ; line_number = 259
        ; bind t1ginv = _t1con@7
t1ginv___byte equ _t1con
t1ginv___bit equ 7
        ; line_number = 260
        ; bind _tmr1ge = _t1con@6
_tmr1ge___byte equ _t1con
_tmr1ge___bit equ 6
        ; line_number = 261
        ; bind _t1ckps1 = _t1con@5
_t1ckps1___byte equ _t1con
_t1ckps1___bit equ 5
        ; line_number = 262
        ; bind _t1ckps0 = _t1con@4
_t1ckps0___byte equ _t1con
_t1ckps0___bit equ 4
        ; line_number = 263
        ; bind _t1oscen = _t1con@3
_t1oscen___byte equ _t1con
_t1oscen___bit equ 3
        ; line_number = 264
        ; bind _t1sync = _t1con@2
_t1sync___byte equ _t1con
_t1sync___bit equ 2
        ; line_number = 265
        ; bind _tmr1cs = _t1con@1
_tmr1cs___byte equ _t1con
_tmr1cs___bit equ 1
        ; line_number = 266
        ; bind _tmr1on = _t1con@0
_tmr1on___byte equ _t1con
_tmr1on___bit equ 0

        ; line_number = 268
        ; register _baudctl = 
_baudctl equ 17
        ; line_number = 269
        ; bind _abdovf = _baudctl@7
_abdovf___byte equ _baudctl
_abdovf___bit equ 7
        ; line_number = 270
        ; bind _rcidl = _baudctl@6
_rcidl___byte equ _baudctl
_rcidl___bit equ 6
        ; line_number = 271
        ; bind _sckp = _baudctl@4
_sckp___byte equ _baudctl
_sckp___bit equ 4
        ; line_number = 272
        ; bind _brg16 = _baudctl@3
_brg16___byte equ _baudctl
_brg16___bit equ 3
        ; line_number = 273
        ; bind _wue = _baudctl@1
_wue___byte equ _baudctl
_wue___bit equ 1
        ; line_number = 274
        ; bind _abden = _baudctl@0
_abden___byte equ _baudctl
_abden___bit equ 0

        ; line_number = 276
        ; register _spbrgh = 
_spbrgh equ 18

        ; line_number = 278
        ; register _spbrg = 
_spbrg equ 19

        ; line_number = 280
        ; register _rcreg = 
_rcreg equ 20

        ; line_number = 282
        ; register _txreg = 
_txreg equ 21

        ; line_number = 284
        ; register _txsta = 
_txsta equ 22
        ; line_number = 285
        ; bind _csrc = _txsta@7
_csrc___byte equ _txsta
_csrc___bit equ 7
        ; line_number = 286
        ; bind _tx9 = _txsta@6
_tx9___byte equ _txsta
_tx9___bit equ 6
        ; line_number = 287
        ; bind _txen = _txsta@5
_txen___byte equ _txsta
_txen___bit equ 5
        ; line_number = 288
        ; bind _sync = _txsta@4
_sync___byte equ _txsta
_sync___bit equ 4
        ; line_number = 289
        ; bind _sendb = _txsta@3
_sendb___byte equ _txsta
_sendb___bit equ 3
        ; line_number = 290
        ; bind _brgh = _txsta@2
_brgh___byte equ _txsta
_brgh___bit equ 2
        ; line_number = 291
        ; bind _trmt = _txsta@1
_trmt___byte equ _txsta
_trmt___bit equ 1
        ; line_number = 292
        ; bind _tx9d = _txsta@7
_tx9d___byte equ _txsta
_tx9d___bit equ 7

        ; line_number = 294
        ; register _rcsta = 
_rcsta equ 23
        ; line_number = 295
        ; bind _spen = _rcsta@7
_spen___byte equ _rcsta
_spen___bit equ 7
        ; line_number = 296
        ; bind _rx9 = _rcsta@6
_rx9___byte equ _rcsta
_rx9___bit equ 6
        ; line_number = 297
        ; bind _sren = _rcsta@5
_sren___byte equ _rcsta
_sren___bit equ 5
        ; line_number = 298
        ; bind _cren = _rcsta@4
_cren___byte equ _rcsta
_cren___bit equ 4
        ; line_number = 299
        ; bind _adden = _rcsta@3
_adden___byte equ _rcsta
_adden___bit equ 3
        ; line_number = 300
        ; bind _ferr = _rcsta@2
_ferr___byte equ _rcsta
_ferr___bit equ 2
        ; line_number = 301
        ; bind _oerr = _rcsta@1
_oerr___byte equ _rcsta
_oerr___bit equ 1
        ; line_number = 302
        ; bind _rx9d = _rcsta@0
_rx9d___byte equ _rcsta
_rx9d___bit equ 0

        ; line_number = 304
        ; register _wdtcon = 
_wdtcon equ 24
        ; line_number = 305
        ; bind _wdtps3 = _wdtcon@4
_wdtps3___byte equ _wdtcon
_wdtps3___bit equ 4
        ; line_number = 306
        ; bind _wdtps2 = _wdtcon@3
_wdtps2___byte equ _wdtcon
_wdtps2___bit equ 3
        ; line_number = 307
        ; bind _wdtps1 = _wdtcon@2
_wdtps1___byte equ _wdtcon
_wdtps1___bit equ 2
        ; line_number = 308
        ; bind _wdtps0 = _wdtcon@1
_wdtps0___byte equ _wdtcon
_wdtps0___bit equ 1
        ; line_number = 309
        ; bind _swdten = _wdtcon@0
_swdten___byte equ _wdtcon
_swdten___bit equ 0

        ; line_number = 311
        ; register _cmcon0 = 
_cmcon0 equ 25
        ; line_number = 312
        ; bind _c1out = _cmcon0@7
_c1out___byte equ _cmcon0
_c1out___bit equ 7
        ; line_number = 313
        ; bind _c2out = _cmcon0@6
_c2out___byte equ _cmcon0
_c2out___bit equ 6
        ; line_number = 314
        ; bind _c1inv = _cmcon0@5
_c1inv___byte equ _cmcon0
_c1inv___bit equ 5
        ; line_number = 315
        ; bind _c2inv = _cmcon0@4
_c2inv___byte equ _cmcon0
_c2inv___bit equ 4
        ; line_number = 316
        ; bind _cis = _cmcon0@3
_cis___byte equ _cmcon0
_cis___bit equ 3
        ; line_number = 317
        ; bind _cm2 = _cmcon0@2
_cm2___byte equ _cmcon0
_cm2___bit equ 2
        ; line_number = 318
        ; bind _cm1 = _cmcon0@1
_cm1___byte equ _cmcon0
_cm1___bit equ 1
        ; line_number = 319
        ; bind _cm0 = _cmcon0@0
_cm0___byte equ _cmcon0
_cm0___bit equ 0

        ; line_number = 321
        ; register _cmcon1 = 
_cmcon1 equ 26
        ; line_number = 322
        ; bind _t1gss = _cmcon1@0
_t1gss___byte equ _cmcon1
_t1gss___bit equ 0
        ; line_number = 323
        ; bind _c2sync = _cmcon1@1
_c2sync___byte equ _cmcon1
_c2sync___bit equ 1

        ; line_number = 325
        ; register _adresh = 
_adresh equ 30

        ; line_number = 327
        ; register _adcon0 = 
_adcon0 equ 31
        ; line_number = 328
        ; bind _adfm = _adcon0@7
_adfm___byte equ _adcon0
_adfm___bit equ 7
        ; line_number = 329
        ; bind _vcfg = _adcon0@6
_vcfg___byte equ _adcon0
_vcfg___bit equ 6
        ; line_number = 330
        ; bind _chs2 = _adcon0@4
_chs2___byte equ _adcon0
_chs2___bit equ 4
        ; line_number = 331
        ; bind _chs1 = _adcon0@3
_chs1___byte equ _adcon0
_chs1___bit equ 3
        ; line_number = 332
        ; bind _chs0 = _adcon0@2
_chs0___byte equ _adcon0
_chs0___bit equ 2
        ; line_number = 333
        ; bind _go = _adcon0@1
_go___byte equ _adcon0
_go___bit equ 1
        ; line_number = 334
        ; bind _adon = _adcon0@0
_adon___byte equ _adcon0
_adon___bit equ 0

        ; # Data bank 1 (0x80-0xff):

        ; line_number = 338
        ; register _option_reg = 
_option_reg equ 129
        ; line_number = 339
        ; bind _rapu = _option_reg@7
_rapu___byte equ _option_reg
_rapu___bit equ 7
        ; line_number = 340
        ; bind _intedg = _option_reg@6
_intedg___byte equ _option_reg
_intedg___bit equ 6
        ; line_number = 341
        ; bind _t0cs = _option_reg@5
_t0cs___byte equ _option_reg
_t0cs___bit equ 5
        ; line_number = 342
        ; bind _t0se = _option_reg@4
_t0se___byte equ _option_reg
_t0se___bit equ 4
        ; line_number = 343
        ; bind _psa = _option_reg@3
_psa___byte equ _option_reg
_psa___bit equ 3
        ; line_number = 344
        ; bind _ps2 = _option_reg@2
_ps2___byte equ _option_reg
_ps2___bit equ 2
        ; line_number = 345
        ; bind _ps1 = _option_reg@1
_ps1___byte equ _option_reg
_ps1___bit equ 1
        ; line_number = 346
        ; bind _ps0 = _option_reg@0
_ps0___byte equ _option_reg
_ps0___bit equ 0

        ; line_number = 348
        ; register _trisa = 
_trisa equ 133
        ; line_number = 349
        ; bind _trisa5 = _trisa@5
_trisa5___byte equ _trisa
_trisa5___bit equ 5
        ; line_number = 350
        ; bind _trisa4 = _trisa@4
_trisa4___byte equ _trisa
_trisa4___bit equ 4
        ; line_number = 351
        ; bind _trisa3 = _trisa@3
_trisa3___byte equ _trisa
_trisa3___bit equ 3
        ; line_number = 352
        ; bind _trisa2 = _trisa@2
_trisa2___byte equ _trisa
_trisa2___bit equ 2
        ; line_number = 353
        ; bind _trisa1 = _trisa@1
_trisa1___byte equ _trisa
_trisa1___bit equ 1
        ; line_number = 354
        ; bind _trisa0 = _trisa@0
_trisa0___byte equ _trisa
_trisa0___bit equ 0

        ; line_number = 356
        ; register _trisc = 
_trisc equ 135
        ; line_number = 357
        ; bind _trisc5 = _trisc@5
_trisc5___byte equ _trisc
_trisc5___bit equ 5
        ; line_number = 358
        ; bind _trisc4 = _trisc@4
_trisc4___byte equ _trisc
_trisc4___bit equ 4
        ; line_number = 359
        ; bind _trisc3 = _trisc@3
_trisc3___byte equ _trisc
_trisc3___bit equ 3
        ; line_number = 360
        ; bind _trisc2 = _trisc@2
_trisc2___byte equ _trisc
_trisc2___bit equ 2
        ; line_number = 361
        ; bind _trisc1 = _trisc@1
_trisc1___byte equ _trisc
_trisc1___bit equ 1
        ; line_number = 362
        ; bind _trisc0 = _trisc@0
_trisc0___byte equ _trisc
_trisc0___bit equ 0

        ; line_number = 364
        ; register _pie1 = 
_pie1 equ 140
        ; line_number = 365
        ; bind _eeie = _pie1@7
_eeie___byte equ _pie1
_eeie___bit equ 7
        ; line_number = 366
        ; bind _adie = _pie1@6
_adie___byte equ _pie1
_adie___bit equ 6
        ; line_number = 367
        ; bind _rcie = _pie1@5
_rcie___byte equ _pie1
_rcie___bit equ 5
        ; line_number = 368
        ; bind _c2ie = _pie1@4
_c2ie___byte equ _pie1
_c2ie___bit equ 4
        ; line_number = 369
        ; bind _c1ie = _pie1@3
_c1ie___byte equ _pie1
_c1ie___bit equ 3
        ; line_number = 370
        ; bind _osfie = _pie1@2
_osfie___byte equ _pie1
_osfie___bit equ 2
        ; line_number = 371
        ; bind _txie = _pie1@1
_txie___byte equ _pie1
_txie___bit equ 1
        ; line_number = 372
        ; bind _tmr1ie = _pie1@0
_tmr1ie___byte equ _pie1
_tmr1ie___bit equ 0

        ; line_number = 374
        ; register _pcon = 
_pcon equ 142
        ; line_number = 375
        ; bind _ulpwue = _pcon@5
_ulpwue___byte equ _pcon
_ulpwue___bit equ 5
        ; line_number = 376
        ; bind _sboden = _pcon@4
_sboden___byte equ _pcon
_sboden___bit equ 4
        ; line_number = 377
        ; bind _por = _pcon@1
_por___byte equ _pcon
_por___bit equ 1
        ; line_number = 378
        ; bind _bod = _pcon@0
_bod___byte equ _pcon
_bod___bit equ 0

        ; line_number = 380
        ; register _osccon = 
_osccon equ 143
        ; line_number = 381
        ; bind _ircf2 = _osccon@6
_ircf2___byte equ _osccon
_ircf2___bit equ 6
        ; line_number = 382
        ; bind _ircf1 = _osccon@5
_ircf1___byte equ _osccon
_ircf1___bit equ 5
        ; line_number = 383
        ; bind _ircf0 = _osccon@4
_ircf0___byte equ _osccon
_ircf0___bit equ 4
        ; line_number = 384
        ; bind _osts = _osccon@3
_osts___byte equ _osccon
_osts___bit equ 3
        ; line_number = 385
        ; bind _hts = _osccon@2
_hts___byte equ _osccon
_hts___bit equ 2
        ; line_number = 386
        ; bind _lts = _osccon@3
_lts___byte equ _osccon
_lts___bit equ 3
        ; line_number = 387
        ; bind _scs = _osccon@2
_scs___byte equ _osccon
_scs___bit equ 2

        ; line_number = 389
        ; register _osctune = 
_osctune equ 144
        ; line_number = 390
        ; bind _tun4 = _osctune@4
_tun4___byte equ _osctune
_tun4___bit equ 4
        ; line_number = 391
        ; bind _tun3 = _osctune@3
_tun3___byte equ _osctune
_tun3___bit equ 3
        ; line_number = 392
        ; bind _tun2 = _osctune@2
_tun2___byte equ _osctune
_tun2___bit equ 2
        ; line_number = 393
        ; bind _tun1 = _osctune@1
_tun1___byte equ _osctune
_tun1___bit equ 1
        ; line_number = 394
        ; bind _tun0 = _osctune@0
_tun0___byte equ _osctune
_tun0___bit equ 0
        ; line_number = 395
        ; constant _osccal_lsb = 1
_osccal_lsb equ 1

        ; line_number = 397
        ; register _ansel = 
_ansel equ 145
        ; line_number = 398
        ; bind _ans7 = _ansel@7
_ans7___byte equ _ansel
_ans7___bit equ 7
        ; line_number = 399
        ; bind _ans6 = _ansel@6
_ans6___byte equ _ansel
_ans6___bit equ 6
        ; line_number = 400
        ; bind _ans5 = _ansel@5
_ans5___byte equ _ansel
_ans5___bit equ 5
        ; line_number = 401
        ; bind _ans4 = _ansel@4
_ans4___byte equ _ansel
_ans4___bit equ 4
        ; line_number = 402
        ; bind _ans3 = _ansel@3
_ans3___byte equ _ansel
_ans3___bit equ 3
        ; line_number = 403
        ; bind _ans2 = _ansel@2
_ans2___byte equ _ansel
_ans2___bit equ 2
        ; line_number = 404
        ; bind _ans1 = _ansel@1
_ans1___byte equ _ansel
_ans1___bit equ 1
        ; line_number = 405
        ; bind _ans0 = _ansel@0
_ans0___byte equ _ansel
_ans0___bit equ 0

        ; line_number = 407
        ; register _wpua = 
_wpua equ 149
        ; line_number = 408
        ; bind _wpua5 = _wpua@5
_wpua5___byte equ _wpua
_wpua5___bit equ 5
        ; line_number = 409
        ; bind _wpua4 = _wpua@4
_wpua4___byte equ _wpua
_wpua4___bit equ 4
        ; line_number = 410
        ; bind _wpua2 = _wpua@2
_wpua2___byte equ _wpua
_wpua2___bit equ 2
        ; line_number = 411
        ; bind _wpua1 = _wpua@1
_wpua1___byte equ _wpua
_wpua1___bit equ 1
        ; line_number = 412
        ; bind _wpua0 = _wpua@0
_wpua0___byte equ _wpua
_wpua0___bit equ 0

        ; line_number = 414
        ; register _ioca = 
_ioca equ 150
        ; line_number = 415
        ; bind _ioca5 = _ioca@5
_ioca5___byte equ _ioca
_ioca5___bit equ 5
        ; line_number = 416
        ; bind _ioca4 = _ioca@4
_ioca4___byte equ _ioca
_ioca4___bit equ 4
        ; line_number = 417
        ; bind _ioca3 = _ioca@3
_ioca3___byte equ _ioca
_ioca3___bit equ 3
        ; line_number = 418
        ; bind _ioca2 = _ioca@2
_ioca2___byte equ _ioca
_ioca2___bit equ 2
        ; line_number = 419
        ; bind _ioca1 = _ioca@1
_ioca1___byte equ _ioca
_ioca1___bit equ 1
        ; line_number = 420
        ; bind _ioca0 = _ioca@0
_ioca0___byte equ _ioca
_ioca0___bit equ 0

        ; line_number = 422
        ; register _eedath = 
_eedath equ 151

        ; line_number = 424
        ; register _eeadrh = 
_eeadrh equ 152

        ; line_number = 426
        ; register _vrcon = 
_vrcon equ 153
        ; line_number = 427
        ; bind _vren = _vrcon@7
_vren___byte equ _vrcon
_vren___bit equ 7
        ; line_number = 428
        ; bind _vrr = _vrcon@5
_vrr___byte equ _vrcon
_vrr___bit equ 5
        ; line_number = 429
        ; bind _vr3 = _vrcon@3
_vr3___byte equ _vrcon
_vr3___bit equ 3
        ; line_number = 430
        ; bind _vr2 = _vrcon@2
_vr2___byte equ _vrcon
_vr2___bit equ 2
        ; line_number = 431
        ; bind _vr1 = _vrcon@1
_vr1___byte equ _vrcon
_vr1___bit equ 1
        ; line_number = 432
        ; bind _vr0 = _vrcon@0
_vr0___byte equ _vrcon
_vr0___bit equ 0

        ; line_number = 434
        ; register _eedata = 
_eedata equ 154
        ; line_number = 435
        ; bind _eedat7 = _eedata@7
_eedat7___byte equ _eedata
_eedat7___bit equ 7
        ; line_number = 436
        ; bind _eedat6 = _eedata@6
_eedat6___byte equ _eedata
_eedat6___bit equ 6
        ; line_number = 437
        ; bind _eedat5 = _eedata@5
_eedat5___byte equ _eedata
_eedat5___bit equ 5
        ; line_number = 438
        ; bind _eedat4 = _eedata@4
_eedat4___byte equ _eedata
_eedat4___bit equ 4
        ; line_number = 439
        ; bind _eedat3 = _eedata@3
_eedat3___byte equ _eedata
_eedat3___bit equ 3
        ; line_number = 440
        ; bind _eedat2 = _eedata@2
_eedat2___byte equ _eedata
_eedat2___bit equ 2
        ; line_number = 441
        ; bind _eedat1 = _eedata@1
_eedat1___byte equ _eedata
_eedat1___bit equ 1
        ; line_number = 442
        ; bind _eedat0 = _eedata@0
_eedat0___byte equ _eedata
_eedat0___bit equ 0

        ; line_number = 444
        ; register _eeadr = 
_eeadr equ 155
        ; line_number = 445
        ; bind _eeadr7 = _eeadr@7
_eeadr7___byte equ _eeadr
_eeadr7___bit equ 7
        ; line_number = 446
        ; bind _eeadr6 = _eeadr@6
_eeadr6___byte equ _eeadr
_eeadr6___bit equ 6
        ; line_number = 447
        ; bind _eeadr5 = _eeadr@5
_eeadr5___byte equ _eeadr
_eeadr5___bit equ 5
        ; line_number = 448
        ; bind _eeadr4 = _eeadr@4
_eeadr4___byte equ _eeadr
_eeadr4___bit equ 4
        ; line_number = 449
        ; bind _eeadr3 = _eeadr@3
_eeadr3___byte equ _eeadr
_eeadr3___bit equ 3
        ; line_number = 450
        ; bind _eeadr2 = _eeadr@2
_eeadr2___byte equ _eeadr
_eeadr2___bit equ 2
        ; line_number = 451
        ; bind _eeadr1 = _eeadr@1
_eeadr1___byte equ _eeadr
_eeadr1___bit equ 1
        ; line_number = 452
        ; bind _eeadr0 = _eeadr@0
_eeadr0___byte equ _eeadr
_eeadr0___bit equ 0

        ; line_number = 454
        ; register _eecon1 = 
_eecon1 equ 156
        ; line_number = 455
        ; bind _eepgd = _eecon1@7
_eepgd___byte equ _eecon1
_eepgd___bit equ 7
        ; line_number = 456
        ; bind _wrerr = _eecon1@3
_wrerr___byte equ _eecon1
_wrerr___bit equ 3
        ; line_number = 457
        ; bind _wren = _eecon1@2
_wren___byte equ _eecon1
_wren___bit equ 2
        ; line_number = 458
        ; bind _wr = _eecon1@1
_wr___byte equ _eecon1
_wr___bit equ 1
        ; line_number = 459
        ; bind _rd = _eecon1@0
_rd___byte equ _eecon1
_rd___bit equ 0

        ; line_number = 461
        ; register _eecon2 = 
_eecon2 equ 157

        ; line_number = 463
        ; register _adresl = 
_adresl equ 158

        ; line_number = 465
        ; register _adcon1 = 
_adcon1 equ 159
        ; line_number = 466
        ; bind _adcs2 = _adcon1@6
_adcs2___byte equ _adcon1
_adcs2___bit equ 6
        ; line_number = 467
        ; bind _adcs1 = _adcon1@5
_adcs1___byte equ _adcon1
_adcs1___bit equ 5
        ; line_number = 468
        ; bind _adcs0 = _adcon1@4
_adcs0___byte equ _adcon1
_adcs0___bit equ 4

        ; # Data Bank 2 (0x100 - 0x17f):

        ; buffer = '_robobricks_pic16f688'
        ; line_number = 6
        ; library _pic16f688 exited
        ; line_number = 7
        ; library clock8mhz entered
        ; # Copyright (c) 2004-2005 by Wayne C. Gramlich
        ; # All rights reserved.

        ; # This library defines the contstants {clock_rate}, {instruction_rate},
        ; # and {clocks_per_instruction}.

        ; # Define processor constants:
        ; buffer = 'clock8mhz'
        ; line_number = 9
        ; constant clock_rate = 8000000
clock_rate equ 8000000
        ; line_number = 10
        ; constant clocks_per_instruction = 4
clocks_per_instruction equ 4
        ; line_number = 11
        ; constant instruction_rate = clock_rate / clocks_per_instruction
instruction_rate equ 2000000
        ; line_number = 12
        ; constant microsecond = 2
microsecond equ 2


        ; buffer = '_robobricks_pic16f688'
        ; line_number = 7
        ; library clock8mhz exited

        ; # Get some EUSART constants defined:
        ; line_number = 10
        ; constant _eusart_clock = clock_rate
_eusart_clock equ 8000000
        ; line_number = 11
        ; constant _eusart_factor = 4
_eusart_factor equ 4
        ; line_number = 12
        ; library _eusart entered

        ; # Copyright (c) 2005 by Wayne C. Gramlich
        ; # All rights reserved.

        ; # This library contains a bunch of definitions for the Enhanced Universal
        ; # Asynchronous Serial Receiver/Transmitter (EUSART) that is available
        ; # on many of the PIC microcontrollers.

        ; # In order to use this module you have to get two constants defined
        ; # BEFORE including this library -- {_eusart_factor} and {_eusart_clock}.
        ; # {_eusart_clock} should be set to the frequency oscillator for the chip.
        ; # {_eusart_factor} should be set to 4, 16, or 64 depending upon whether
        ; # the {_brg16} and {_brgh} bits are set.  Use the table below to select:
        ; #
        ; #        _{brg16}	{_brgh}		_{eusart_factor}
        ; #	    0		   0		      64
        ; #	    0		   1		      16
        ; #	    1		   0		      16
        ; #	    1		   1		       

        ; # 2400 baud:
        ; buffer = '_eusart'
        ; line_number = 23
        ; constant _eusart_2400 = (_eusart_clock / (2400 * _eusart_factor)) - 1
_eusart_2400 equ 832
        ; line_number = 24
        ; constant _eusart_2400_low = _eusart_2400 & 0xff
_eusart_2400_low equ 64
        ; line_number = 25
        ; constant _eusart_2400_high = _eusart_2400 >> 8
_eusart_2400_high equ 3
        ; line_number = 26
        ; constant _eusart_2400_index = 0
_eusart_2400_index equ 0
        ; # 4800 baud:
        ; line_number = 28
        ; constant _eusart_4800 = (_eusart_clock / (4800 * _eusart_factor)) - 1
_eusart_4800 equ 415
        ; line_number = 29
        ; constant _eusart_4800_low = _eusart_4800 & 0xff
_eusart_4800_low equ 159
        ; line_number = 30
        ; constant _eusart_4800_high = _eusart_4800 >> 8
_eusart_4800_high equ 1
        ; line_number = 31
        ; constant _eusart_4800_index = 1
_eusart_4800_index equ 1
        ; # 9600 baud:
        ; line_number = 33
        ; constant _eusart_9600 = (_eusart_clock / (9600 * _eusart_factor)) - 1
_eusart_9600 equ 207
        ; line_number = 34
        ; constant _eusart_9600_low = _eusart_9600 & 0xff
_eusart_9600_low equ 207
        ; line_number = 35
        ; constant _eusart_9600_high = _eusart_9600 >> 8
_eusart_9600_high equ 0
        ; line_number = 36
        ; constant _eusart_9600_index = 2
_eusart_9600_index equ 2
        ; # 19200 baud:
        ; line_number = 38
        ; constant _eusart_19200 = (_eusart_clock / (19200 * _eusart_factor)) - 1
_eusart_19200 equ 103
        ; line_number = 39
        ; constant _eusart_19200_low = _eusart_19200 & 0xff
_eusart_19200_low equ 103
        ; line_number = 40
        ; constant _eusart_19200_high = _eusart_19200 >> 8
_eusart_19200_high equ 0
        ; line_number = 41
        ; constant _eusart_19200_index = 3
_eusart_19200_index equ 3
        ; # 38400 baud:
        ; line_number = 43
        ; constant _eusart_38400 = (_eusart_clock / (38400 * _eusart_factor)) - 1
_eusart_38400 equ 51
        ; line_number = 44
        ; constant _eusart_38400_low = _eusart_38400 & 0xff
_eusart_38400_low equ 51
        ; line_number = 45
        ; constant _eusart_38400_high = _eusart_38400 >> 8
_eusart_38400_high equ 0
        ; line_number = 46
        ; constant _eusart_38400_index = 4
_eusart_38400_index equ 4
        ; # 57600 baud:
        ; line_number = 48
        ; constant _eusart_57600 = (_eusart_clock / (57600 * _eusart_factor)) - 1
_eusart_57600 equ 33
        ; line_number = 49
        ; constant _eusart_57600_low = _eusart_57600 & 0xff
_eusart_57600_low equ 33
        ; line_number = 50
        ; constant _eusart_57600_high = _eusart_57600 >> 8
_eusart_57600_high equ 0
        ; line_number = 51
        ; constant _eusart_57600_index = 5
_eusart_57600_index equ 5
        ; # 115200 baud:
        ; line_number = 53
        ; constant _eusart_115200 = (_eusart_clock / (115200 * _eusart_factor)) - 1
_eusart_115200 equ 16
        ; line_number = 54
        ; constant _eusart_115200_low = _eusart_115200 & 0xff
_eusart_115200_low equ 16
        ; line_number = 55
        ; constant _eusart_115200_high = _eusart_115200 >> 8
_eusart_115200_high equ 0
        ; line_number = 56
        ; constant _eusart_115200_index = 6
_eusart_115200_index equ 6
        ; # 203400 baud:
        ; line_number = 58
        ; constant _eusart_203400 = (_eusart_clock / (203400 * _eusart_factor)) - 1
_eusart_203400 equ 8
        ; line_number = 59
        ; constant _eusart_203400_low = _eusart_203400 & 0xff
_eusart_203400_low equ 8
        ; line_number = 60
        ; constant _eusart_203400_high = _eusart_203400 >> 8
_eusart_203400_high equ 0
        ; line_number = 61
        ; constant _eusart_203400_index = 7
_eusart_203400_index equ 7


        ; buffer = '_robobricks_pic16f688'
        ; line_number = 12
        ; library _eusart exited

        ; line_number = 14
        ; global debug_mode bit
debug_mode___byte equ globals___0+79
debug_mode___bit equ 0
        ; line_number = 15
        ; global in_byte_get bit
in_byte_get___byte equ globals___0+79
in_byte_get___bit equ 1

        ; Delaying code generation for procedure  byte_get
        ; Delaying code generation for procedure  byte_put
        ; Delaying code generation for procedure  baud_rate_low
        ; Delaying code generation for procedure  baud_rate_high

        ; buffer = 'irdistance8'
        ; line_number = 6
        ; library _robobricks_pic16f688 exited

        ; line_number = 8
        ; package pdip
        ; line_number = 9
        ; pin 1 = power_supply
        ; line_number = 10
        ;  pin 2 = ra5_in, name=debug
debug___byte equ _porta
debug___bit equ 5
        ; line_number = 11
        ;  pin 3 = ra4_in, name=io2, mask=io2_mask, bit=io2_bit
io2___byte equ _porta
io2___bit equ 4
io2_mask equ 16
io2_bit equ 4
        ; line_number = 12
        ;  pin 4 = ra3_nc, name=nc1
nc1___byte equ _porta
nc1___bit equ 4
        ; line_number = 13
        ;  pin 5 = rx, name=rx
rx___byte equ _portc
rx___bit equ 5
        ; line_number = 14
        ;  pin 6 = tx, name=tx
tx___byte equ _portc
tx___bit equ 4
        ; #pin 7 = rc3_in, name=io7, mask=io7_mask, bit=io7_bit
        ; line_number = 16
        ;  pin 7 = rc3_out, name=io7, mask=io7_mask, bit=io7_bit
io7___byte equ _portc
io7___bit equ 3
io7_mask equ 8
io7_bit equ 3
        ; line_number = 17
        ;  pin 8 = rc2_in, name=io6, mask=io6_mask, bit=io6_bit
io6___byte equ _portc
io6___bit equ 2
io6_mask equ 4
io6_bit equ 2
        ; line_number = 18
        ;  pin 9 = rc1_in, name=io5, mask=io5_mask, bit=io5_bit
io5___byte equ _portc
io5___bit equ 1
io5_mask equ 2
io5_bit equ 1
        ; line_number = 19
        ;  pin 10 = rc0_in, name=io4, mask=io4_mask, bit=io4_bit
io4___byte equ _portc
io4___bit equ 0
io4_mask equ 1
io4_bit equ 0
        ; line_number = 20
        ;  pin 11 = ra2_in, name=io3, mask=io3_mask, bit=io3_bit
io3___byte equ _porta
io3___bit equ 2
io3_mask equ 4
io3_bit equ 2
        ; line_number = 21
        ;  pin 12 = ra1_in, name=io1, mask=io1_mask, bit=io1_bit
io1___byte equ _porta
io1___bit equ 1
io1_mask equ 2
io1_bit equ 1
        ; line_number = 22
        ;  pin 13 = ra0_in, name=io0, mask=io0_mask, bit=io0_bit
io0___byte equ _porta
io0___bit equ 0
io0_mask equ 1
io0_bit equ 0
        ; line_number = 23
        ;  pin 14 = ground

        ; line_number = 25
        ; constant millisecond = 1000 * microsecond
millisecond equ 2000
        ; line_number = 26
        ; constant millisecond_high = 1000 >> 8
millisecond_high equ 3
        ; line_number = 27
        ; constant millisecond_low = 1000 & 0xff
millisecond_low equ 232
        ; line_number = 28
        ; constant period = 20 * millisecond
period equ 40000
        ; line_number = 29
        ; constant period_high = period >> 8
period_high equ 156
        ; line_number = 30
        ; constant period_low = period & 0xff
period_low equ 64

        ; #constant initial_delay_count = 0xf
        ; #constant initial_servo_delay = 25
        ; #constant initial_servo_increment = 50

        ; line_number = 36
        ; constant initial_servo_span = 2000
initial_servo_span equ 2000
        ; line_number = 37
        ; constant initial_servo_delay = 1
initial_servo_delay equ 1
        ; line_number = 38
        ; constant initial_servo_steps = 0x20
initial_servo_steps equ 32
        ; line_number = 39
        ; constant initial_servo_increment = initial_servo_span / initial_servo_steps
initial_servo_increment equ 62
        ; line_number = 40
        ; constant initial_servo_base = 300
initial_servo_base equ 300
        ; line_number = 41
        ; constant initial_servo_base_low = initial_servo_base & 0xff
initial_servo_base_low equ 44
        ; line_number = 42
        ; constant initial_servo_base_high = initial_servo_base >> 8
initial_servo_base_high equ 1


        ; # Some globals: byte
        ; line_number = 47
        ; constant channels = 8
channels equ 8
        ; line_number = 48
        ; constant state_size = 16
state_size equ 16
        ; line_number = 49
        ; constant state_size2 = state_size << 1
state_size2 equ 32
        ; line_number = 50
        ; global state[state_size] array[byte]
state equ globals___0+3
        ; line_number = 51
        ; bind command_previous = state[0]
command_previous equ globals___0+3
        ; line_number = 52
        ; bind command_last = state[1]
command_last equ globals___0+4
        ; line_number = 53
        ; bind sent_last = state[2]
sent_last equ globals___0+5
        ; line_number = 54
        ; bind sent_previous = state[3]
sent_previous equ globals___0+6
        ; line_number = 55
        ; bind flags = state[4]
flags equ globals___0+7
        ; line_number = 56
        ; bind low_mask = state[5]
low_mask equ globals___0+8
        ; line_number = 57
        ; bind high_mask = state[6]
high_mask equ globals___0+9
        ; line_number = 58
        ; bind rising_mask = state[7]
rising_mask equ globals___0+10
        ; line_number = 59
        ; bind falling_mask = state[8]
falling_mask equ globals___0+11
        ; line_number = 60
        ; bind servo_steps = state[9]
servo_steps equ globals___0+12
        ; line_number = 61
        ; bind servo_base_high = state[10]
servo_base_high equ globals___0+13
        ; line_number = 62
        ; bind servo_base_low = state[11]
servo_base_low equ globals___0+14
        ; line_number = 63
        ; bind servo_increment = state[12]
servo_increment equ globals___0+15
        ; line_number = 64
        ; bind servo_delay = state[13]
servo_delay equ globals___0+16
        ; line_number = 65
        ; bind servo_high = state[14]
servo_high equ globals___0+17
        ; line_number = 66
        ; bind servo_low = state[15]
servo_low equ globals___0+18
        ; line_number = 67
        ; global analogs_high[channels] array[byte]
analogs_high equ globals___0+19
        ; line_number = 68
        ; global analogs_low[channels] array[byte]
analogs_low equ globals___0+27
        ; line_number = 69
        ; global thresholds_high[channels] array[byte]
thresholds_high equ globals___0+35
        ; line_number = 70
        ; global thresholds_low[channels] array[byte]
thresholds_low equ globals___0+43

        ; line_number = 72
        ; bind interrupt_enable = flags@0
interrupt_enable___byte equ globals___0+7
interrupt_enable___bit equ 0
        ; line_number = 73
        ; bind interrupt_pending = flags@1
interrupt_pending___byte equ globals___0+7
interrupt_pending___bit equ 1

        ; line_number = 75
        ; global glitch byte
glitch equ globals___0+51
        ; line_number = 76
        ; global index byte
index equ globals___0+52
        ; line_number = 77
        ; global chan byte
chan equ globals___0+53
        ; line_number = 78
        ; global channel byte
channel equ globals___0+54

        ; line_number = 80
        ; origin 0
        org     0

        ; line_number = 82
        ; procedure xmain
xmain:
        ; arguments_none
        ; line_number = 84
        ;  returns_nothing

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 86
        ;  assemble
        ; line_number = 87
        goto    main

        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 89
        ; origin 4
        org     4


        ; # Scanned distances:
        ; line_number = 94
        ; global analogs[64] array[byte]
analogs equ globals___1


        ; line_number = 98
        ; global adjust_high byte
adjust_high equ globals___2
        ; line_number = 99
        ; global adjust_low byte
adjust_low equ globals___2+1
        ; line_number = 100
        ; global direction byte
direction equ globals___2+2
        ; line_number = 101
        ; global delay_count byte
delay_count equ globals___2+3
        ; line_number = 102
        ; global offset byte
offset equ globals___2+4
        ; line_number = 103
        ; global maximum byte
maximum equ globals___2+5
        ; line_number = 104
        ; global maximum_offset byte
maximum_offset equ globals___2+6
        ; line_number = 105
        ; global minimum byte
minimum equ globals___2+7
        ; line_number = 106
        ; global minimum_offset byte
minimum_offset equ globals___2+8
        ; line_number = 107
        ; global last_maximum byte
last_maximum equ globals___2+9
        ; line_number = 108
        ; global last_maximum_offset byte
last_maximum_offset equ globals___2+10
        ; line_number = 109
        ; global last_minimum byte
last_minimum equ globals___2+11
        ; line_number = 110
        ; global last_minimum_offset byte
last_minimum_offset equ globals___2+12
        ; line_number = 111
        ; global track_minimum byte
track_minimum equ globals___2+13
        ; line_number = 112
        ; global track_maximum byte
track_maximum equ globals___2+14
        ; line_number = 113
        ; global track_offset_span byte
track_offset_span equ globals___2+15
        ; line_number = 114
        ; global track_offset_minimum byte
track_offset_minimum equ globals___2+16
        ; line_number = 115
        ; global track_offset_maximum byte
track_offset_maximum equ globals___2+17

        ; #data_bank 2

        ; line_number = 119
        ; procedure interrupt
interrupt:
interrupt___w_save equ shared___globals+1
interrupt___status_save equ shared___globals
        ; Carefully save __w and __tatus into RAM
        ; Save W first (easy)
        movwf   interrupt___w_save
        ; Save Status without smashing it (tricky)
        ; Move swapped version of status into W
        swapf   __status,w
        ; Store swapped version of status into RAM
        movwf   interrupt___status_save
        ; arguments_none
        ; line_number = 121
        ;  returns_nothing

        ; line_number = 123
        ;  local count byte
interrupt__count equ globals___2+18
        ; line_number = 124
        ;  local high byte
interrupt__high equ globals___2+19
        ; line_number = 125
        ;  local low byte
interrupt__low equ globals___2+20
        ; line_number = 126
        ;  local analog byte
interrupt__analog equ globals___2+21
        ; line_number = 127
        ;  local restart bit
interrupt__restart___byte equ globals___2+79
interrupt__restart___bit equ 0
        ; line_number = 128
        ;  local temp byte
interrupt__temp equ globals___2+22

        ; before procedure statements delay=non-uniform, bit states=(data:??=>?? code:XX=>XX)
        ; line_number = 130
        ;  if io7 start
        ; =>bit_code_emit@symbol(): sym=io7
        bcf     __rp0___byte, __rp0___bit
        ; CASE: true_code_size > 1 && false_code_size > 1
        btfss   io7___byte, io7___bit
        goto    interrupt__23
        bcf     __rp1___byte, __rp1___bit
        ; # Clear the servo pulse and wait 20 ms:
        ; line_number = 132
        ;  io7 := 0
        bcf     io7___byte, io7___bit
        ; line_number = 133
        ;  _tmr1l := 0
        movlw   0
        movwf   _tmr1l
        ; line_number = 134
        ;  _tmr1h := period_high ^ 0xff
        ; Expression is strictly a constant
        movlw   99
        movwf   _tmr1h
        ; line_number = 135
        ;  _tmr1l := period_low ^ 0xff
        ; Expression is strictly a constant
        movlw   191
        movwf   _tmr1l
        ; Recombine code1_bit_states != code2_bit_states
        goto    interrupt__24
interrupt__23:
        bsf     __rp1___byte, __rp1___bit
        ; # Set the servo pulse:
        ; line_number = 138
        ;  delay_count := delay_count - 1
        decf    delay_count,f
        ; line_number = 139
        ;  if _z start
        ; =>bit_code_emit@symbol(): sym=_z
        bcf     __rp1___byte, __rp1___bit
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   _z___byte, _z___bit
        goto    interrupt__20
        ; # Adjust the pulse width
        ; line_number = 141
        ;  delay_count := servo_delay
        movf    servo_delay,w
        bsf     __rp1___byte, __rp1___bit
        movwf   delay_count

        ; # Collect the minimum and maximum:
        ; line_number = 144
        ;  analog := analogs_high[0]
        bcf     __rp1___byte, __rp1___bit
        movf    analogs_high,w
        bsf     __rp1___byte, __rp1___bit
        movwf   interrupt__analog
        ; line_number = 145
        ;  analogs[offset] := analog
        ; index_fsr_first
        movf    offset,w
        addlw   analogs
        movwf   __fsr
        movf    interrupt__analog,w
        movwf   __indf
        ; line_number = 146
        ;  if analog > maximum start
        movf    maximum,w
        subwf   interrupt__analog,w
        bcf     __rp1___byte, __rp1___bit
        btfsc   __z___byte, __z___bit
        bcf     __c___byte, __c___bit
        ; =>bit_code_emit@symbol(): sym=__c
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   __c___byte, __c___bit
        goto    interrupt__1
        bsf     __rp1___byte, __rp1___bit
        ; line_number = 147
        ; maximum := analog
        movf    interrupt__analog,w
        movwf   maximum
        ; line_number = 148
        ;  maximum_offset := offset
        movf    offset,w
        movwf   maximum_offset
        ; Recombine size1 = 0 || size2 = 0
interrupt__1:
        ; <=bit_code_emit@symbol; sym=__c (data:00=>?0 code:XX=>XX)
        ; line_number = 146
        ;  if analog > maximum done
        ; line_number = 149
        ; if analog < minimum start
        bsf     __rp1___byte, __rp1___bit
        movf    minimum,w
        subwf   interrupt__analog,w
        ; =>bit_code_emit@symbol(): sym=__c
        bcf     __rp1___byte, __rp1___bit
        ; CASE: true.size=0 && false.size>1
        btfsc   __c___byte, __c___bit
        goto    interrupt__2
        bsf     __rp1___byte, __rp1___bit
        ; line_number = 150
        ; minimum := analog
        movf    interrupt__analog,w
        movwf   minimum
        ; line_number = 151
        ;  minimum_offset := offset
        movf    offset,w
        movwf   minimum_offset

interrupt__2:
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=__c (data:00=>?0 code:XX=>XX)
        ; line_number = 149
        ; if analog < minimum done
        ; line_number = 153
        ; restart := 0
        bsf     __rp1___byte, __rp1___bit
        bcf     interrupt__restart___byte, interrupt__restart___bit
        ; line_number = 154
        ;  if offset <= track_offset_minimum start
        movf    track_offset_minimum,w
        subwf   offset,w
        bcf     __rp1___byte, __rp1___bit
        btfsc   __z___byte, __z___bit
        bcf     __c___byte, __c___bit
        ; =>bit_code_emit@symbol(): sym=__c
        ; CASE: true_code_size > 1 && false_code_size > 1
        btfss   __c___byte, __c___bit
        goto    interrupt__4
        bsf     __rp1___byte, __rp1___bit
        ; line_number = 157
        movf    track_offset_maximum,w
        subwf   offset,w
        ; =>bit_code_emit@symbol(): sym=__c
        bcf     __rp1___byte, __rp1___bit
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   __c___byte, __c___bit
        goto    interrupt__3
        bsf     __rp1___byte, __rp1___bit
        ; line_number = 158
        ; restart := 1
        bsf     interrupt__restart___byte, interrupt__restart___bit
        ; line_number = 159
        ;  direction := 0xff
        movlw   255
        movwf   direction
        ; Recombine size1 = 0 || size2 = 0
interrupt__3:
        ; <=bit_code_emit@symbol; sym=__c (data:10=>?0 code:XX=>XX)
        ; Recombine code1_bit_states != code2_bit_states
        goto    interrupt__5
interrupt__4:
        bsf     __rp1___byte, __rp1___bit
        ; line_number = 155
        ; restart := 1
        bsf     interrupt__restart___byte, interrupt__restart___bit
        ; line_number = 156
        ;  direction := 1
        movlw   1
        movwf   direction
interrupt__5:
        ; <=bit_code_emit@symbol; sym=__c (data:00=>?0 code:XX=>XX)
        ; line_number = 154
        ;  if offset <= track_offset_minimum done
        ; line_number = 160
        ; offset := offset + direction
        bsf     __rp1___byte, __rp1___bit
        movf    direction,w
        addwf   offset,f
        ; line_number = 161
        ;  if restart start
        ; =>bit_code_emit@symbol(): sym=interrupt__restart
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   interrupt__restart___byte, interrupt__restart___bit
        goto    interrupt__13
        ; line_number = 162
        ; last_maximum := maximum
        movf    maximum,w
        movwf   last_maximum
        ; line_number = 163
        ;  last_minimum := minimum
        movf    minimum,w
        movwf   last_minimum
        ; line_number = 164
        ;  last_maximum_offset := maximum_offset
        movf    maximum_offset,w
        movwf   last_maximum_offset
        ; line_number = 165
        ;  last_minimum_offset := minimum_offset
        movf    minimum_offset,w
        movwf   last_minimum_offset
        ; # We stay in full scan mode if no tracking trigers:
        ; line_number = 167
        ;  track_offset_minimum := 0
        movlw   0
        movwf   track_offset_minimum
        ; line_number = 168
        ;  track_offset_maximum := servo_steps
        bcf     __rp1___byte, __rp1___bit
        movf    servo_steps,w
        bsf     __rp1___byte, __rp1___bit
        movwf   track_offset_maximum
        ; line_number = 169
        ;  temp := 0xff
        movlw   255
        movwf   interrupt__temp
        ; line_number = 170
        ;  if last_minimum < track_minimum start
        movf    track_minimum,w
        subwf   last_minimum,w
        ; =>bit_code_emit@symbol(): sym=__c
        bcf     __rp1___byte, __rp1___bit
        ; CASE: true.size=0 && false.size>1
        btfsc   __c___byte, __c___bit
        goto    interrupt__6
        bsf     __rp1___byte, __rp1___bit
        ; line_number = 171
        ; temp := last_minimum_offset
        movf    last_minimum_offset,w
        movwf   interrupt__temp
interrupt__6:
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=__c (data:10=>?0 code:XX=>XX)
        ; line_number = 170
        ;  if last_minimum < track_minimum done
        ; line_number = 172
        ; if last_maximum > track_maximum start
        bsf     __rp1___byte, __rp1___bit
        movf    track_maximum,w
        subwf   last_maximum,w
        bcf     __rp1___byte, __rp1___bit
        btfsc   __z___byte, __z___bit
        bcf     __c___byte, __c___bit
        ; =>bit_code_emit@symbol(): sym=__c
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   __c___byte, __c___bit
        goto    interrupt__7
        bsf     __rp1___byte, __rp1___bit
        ; line_number = 173
        ; temp := last_maximum_offset
        movf    last_maximum_offset,w
        movwf   interrupt__temp
        ; Recombine size1 = 0 || size2 = 0
interrupt__7:
        ; <=bit_code_emit@symbol; sym=__c (data:10=>?0 code:XX=>XX)
        ; line_number = 172
        ; if last_maximum > track_maximum done
        ; line_number = 174
        ; if !(temp@7) start
interrupt__select__11___byte equ interrupt__temp
interrupt__select__11___bit equ 7
        ; =>bit_code_emit@symbol(): sym=interrupt__select__11
        bsf     __rp1___byte, __rp1___bit
        ; CASE: true.size=0 && false.size>1
        btfsc   interrupt__select__11___byte, interrupt__select__11___bit
        goto    interrupt__12
        ; line_number = 175
        ; track_offset_minimum := last_minimum_offset - track_offset_span
        movf    track_offset_span,w
        subwf   last_minimum_offset,w
        movwf   track_offset_minimum

        ; line_number = 177
        ; if track_offset_minimum@7 start
interrupt__select__8___byte equ track_offset_minimum
interrupt__select__8___bit equ 7
        ; =>bit_code_emit@symbol(): sym=interrupt__select__8
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   interrupt__select__8___byte, interrupt__select__8___bit
        goto    interrupt__9
        ; line_number = 178
        ; track_offset_minimum := 0
        movlw   0
        movwf   track_offset_minimum
        ; Recombine size1 = 0 || size2 = 0
interrupt__9:
        ; <=bit_code_emit@symbol; sym=interrupt__select__8 (data:10=>10 code:XX=>XX)
        ; line_number = 177
        ; if track_offset_minimum@7 done
        ; line_number = 179
        ; track_offset_maximum := last_minimum_offset + track_offset_span
        movf    last_minimum_offset,w
        addwf   track_offset_span,w
        movwf   track_offset_maximum

        ; line_number = 181
        ; if track_offset_maximum > servo_steps start
        bcf     __rp1___byte, __rp1___bit
        movf    servo_steps,w
        bsf     __rp1___byte, __rp1___bit
        subwf   track_offset_maximum,w
        bcf     __rp1___byte, __rp1___bit
        btfsc   __z___byte, __z___bit
        bcf     __c___byte, __c___bit
        ; =>bit_code_emit@symbol(): sym=__c
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   __c___byte, __c___bit
        goto    interrupt__10
        ; line_number = 182
        ; track_offset_maximum := servo_steps
        movf    servo_steps,w
        bsf     __rp1___byte, __rp1___bit
        movwf   track_offset_maximum

        ; Recombine size1 = 0 || size2 = 0
interrupt__10:
        ; <=bit_code_emit@symbol; sym=__c (data:10=>?0 code:XX=>XX)
        ; line_number = 181
        ; if track_offset_maximum > servo_steps done
interrupt__12:
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=interrupt__select__11 (data:10=>?0 code:XX=>XX)
        ; line_number = 174
        ; if !(temp@7) done
        ; line_number = 184
        ; minimum_offset := 0
        movlw   0
        bsf     __rp1___byte, __rp1___bit
        movwf   minimum_offset
        ; line_number = 185
        ;  maximum_offset := 0
        movlw   0
        movwf   maximum_offset
        ; line_number = 186
        ;  maximum := 0
        movlw   0
        movwf   maximum
        ; line_number = 187
        ;  minimum := 0xff
        movlw   255
        movwf   minimum

        ; Recombine size1 = 0 || size2 = 0
interrupt__13:
        ; <=bit_code_emit@symbol; sym=interrupt__restart (data:00=>10 code:XX=>XX)
        ; line_number = 161
        ;  if restart done
        ; # Compute {offset} * {servo_increment} as 16-bit result
        ; # into {servo_high}:{servo_low}.
        ; line_number = 191
        ;  servo_high := 0
        movlw   0
        bcf     __rp1___byte, __rp1___bit
        movwf   servo_high
        ; line_number = 192
        ;  servo_low := 0
        movlw   0
        movwf   servo_low
        ; line_number = 193
        ;  adjust_high := 0
        movlw   0
        bsf     __rp1___byte, __rp1___bit
        movwf   adjust_high
        ; line_number = 194
        ;  adjust_low := servo_increment
        bcf     __rp1___byte, __rp1___bit
        movf    servo_increment,w
        bsf     __rp1___byte, __rp1___bit
        movwf   adjust_low

        ; # Only use low order 6 bits of {offset}:
        ; line_number = 197
        ;  temp := offset
        movf    offset,w
        movwf   interrupt__temp
        ; line_number = 198
        ;  loop_exactly 6 start
interrupt__14 equ globals___2+23
        movlw   6
        movwf   interrupt__14
interrupt__15:
        ; # Add in adjust if LSB of {temp} is set:
        ; line_number = 200
        ;  if temp@0 start
interrupt__select__16___byte equ interrupt__temp
interrupt__select__16___bit equ 0
        ; =>bit_code_emit@symbol(): sym=interrupt__select__16
        bcf     __rp0___byte, __rp0___bit
        bsf     __rp1___byte, __rp1___bit
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   interrupt__select__16___byte, interrupt__select__16___bit
        goto    interrupt__17
        ; line_number = 201
        ; servo_high := servo_high + adjust_high
        movf    adjust_high,w
        bcf     __rp1___byte, __rp1___bit
        addwf   servo_high,f
        ; line_number = 202
        ;  servo_low := servo_low + adjust_low
        bsf     __rp1___byte, __rp1___bit
        movf    adjust_low,w
        bcf     __rp1___byte, __rp1___bit
        addwf   servo_low,f
        ; line_number = 203
        ;  if _c start
        ; =>bit_code_emit@symbol(): sym=_c
        ; CASE: True.size=1 False.size=0
        btfsc   _c___byte, _c___bit
        ; line_number = 204
        ; servo_high := servo_high + 1
        incf    servo_high,f

        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=_c (data:10=>00 code:XX=>XX)
        ; line_number = 203
        ;  if _c done
        ; Recombine size1 = 0 || size2 = 0
interrupt__17:
        ; <=bit_code_emit@symbol; sym=interrupt__select__16 (data:??=>?0 code:XX=>XX)
        ; line_number = 200
        ;  if temp@0 done
        ; # Shift {adjust_high}:{adjust_low} left by 1:
        ; line_number = 207
        ;  adjust_high := adjust_high + adjust_high
        bsf     __rp1___byte, __rp1___bit
        movf    adjust_high,w
        addwf   adjust_high,f
        ; line_number = 208
        ;  if adjust_low@7 start
interrupt__select__19___byte equ adjust_low
interrupt__select__19___bit equ 7
        ; =>bit_code_emit@symbol(): sym=interrupt__select__19
        ; CASE: True.size=1 False.size=0
        btfsc   interrupt__select__19___byte, interrupt__select__19___bit
        ; line_number = 209
        ; adjust_high@0 := 1
interrupt__select__18___byte equ adjust_high
interrupt__select__18___bit equ 0
        bsf     interrupt__select__18___byte, interrupt__select__18___bit
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=interrupt__select__19 (data:??=>10 code:XX=>XX)
        ; line_number = 208
        ;  if adjust_low@7 done
        ; line_number = 210
        ; adjust_low := adjust_low + adjust_low
        movf    adjust_low,w
        addwf   adjust_low,f
        ; line_number = 211
        ;  temp := temp >> 1
        ; Assignment of variable to self (no code needed)
        rrf     interrupt__temp,f
        bcf     interrupt__temp, 7

        ; line_number = 198
        ;  loop_exactly 6 wrap-up
        decfsz  interrupt__14,f
        goto    interrupt__15
        ; line_number = 198
        ;  loop_exactly 6 done
        ; Recombine size1 = 0 || size2 = 0
interrupt__20:
        ; <=bit_code_emit@symbol; sym=_z (data:10=>?0 code:XX=>XX)
        ; line_number = 139
        ;  if _z done
        ; # Add servo to servo base:
        ; line_number = 214
        ;  high := servo_base_high + servo_high
        bcf     __rp1___byte, __rp1___bit
        movf    servo_base_high,w
        addwf   servo_high,w
        bsf     __rp1___byte, __rp1___bit
        movwf   interrupt__high
        ; line_number = 215
        ;  low := servo_base_low + servo_low
        bcf     __rp1___byte, __rp1___bit
        movf    servo_base_low,w
        addwf   servo_low,w
        bsf     __rp1___byte, __rp1___bit
        movwf   interrupt__low
        ; line_number = 216
        ;  if _c start
        ; =>bit_code_emit@symbol(): sym=_c
        ; CASE: True.size=1 False.size=0
        btfsc   _c___byte, _c___bit
        ; line_number = 217
        ; high := high + 1
        incf    interrupt__high,f

        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=_c (data:10=>10 code:XX=>XX)
        ; line_number = 216
        ;  if _c done
        ; # Now double it because the processor runs at 2 MIPS, not 1 MIPS:
        ; line_number = 220
        ;  high := high + high
        movf    interrupt__high,w
        addwf   interrupt__high,f
        ; line_number = 221
        ;  if low@7 start
interrupt__select__22___byte equ interrupt__low
interrupt__select__22___bit equ 7
        ; =>bit_code_emit@symbol(): sym=interrupt__select__22
        ; CASE: True.size=1 False.size=0
        btfsc   interrupt__select__22___byte, interrupt__select__22___bit
        ; line_number = 222
        ; high@0 := 1
interrupt__select__21___byte equ interrupt__high
interrupt__select__21___bit equ 0
        bsf     interrupt__select__21___byte, interrupt__select__21___bit
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=interrupt__select__22 (data:10=>10 code:XX=>XX)
        ; line_number = 221
        ;  if low@7 done
        ; line_number = 223
        ; low := low + low
        movf    interrupt__low,w
        addwf   interrupt__low,f

        ; # Set the servo pulse:
        ; line_number = 226
        ;  io7 := 1
        bcf     __rp1___byte, __rp1___bit
        bsf     io7___byte, io7___bit
        ; line_number = 227
        ;  _tmr1l := 0
        movlw   0
        movwf   _tmr1l
        ; line_number = 228
        ;  _tmr1h := high ^ 0xff
        movlw   255
        bsf     __rp1___byte, __rp1___bit
        xorwf   interrupt__high,w
        bcf     __rp1___byte, __rp1___bit
        movwf   _tmr1h
        ; line_number = 229
        ;  _tmr1l := low ^ 0xff
        movlw   255
        bsf     __rp1___byte, __rp1___bit
        xorwf   interrupt__low,w
        bcf     __rp1___byte, __rp1___bit
        movwf   _tmr1l
interrupt__24:
        ; <=bit_code_emit@symbol; sym=io7 (data:??=>00 code:XX=>XX)
        ; line_number = 130
        ;  if io7 done
        ; line_number = 230
        ; _tmr1if := 0
        bcf     _tmr1if___byte, _tmr1if___bit


        ; delay after procedure statements=non-uniform
        bsf     __rp1___byte, __rp1___bit
        ; Interrupt return
        ; Carefully restore __w and __tatus from RAM
        ; Restore swapped status into W
        swapf   interrupt___status_save,w
        ; W now contains (unswapped) status
        ; Restore W to __status
        movwf   __status
        ; From here on out, do not modify __status
        ; Swap saved W register in RAM
        swapf   interrupt___w_save,f
        ; Unswap the saved W reg and restore to W
        swapf   interrupt___w_save,w
        ; __w and __status are now restored
        ; Return from interrupt
        retfie  





        ; line_number = 235
        ; procedure reset
reset:
        ; arguments_none
        ; line_number = 237
        ;  returns_nothing

        ; # This procedure will initialize all global registers:

        ; # Set the TRIS registers and analog masks:
        ; #_ansel := 0xff
        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 243
        ;  _ansel := 0x7f
        movlw   127
        bsf     __rp0___byte, __rp0___bit
        movwf   _ansel
        ; #_trisc := 0x3f
        ; line_number = 245
        ;  _trisc := 0x37
        movlw   55
        movwf   _trisc
        ; line_number = 246
        ;  _trisa := 0x3f
        movlw   63
        movwf   _trisa

        ; # Initialize global registers:
        ; line_number = 249
        ;  index := 0
        movlw   0
        bcf     __rp0___byte, __rp0___bit
        movwf   index
        ; line_number = 250
        ;  loop_exactly state_size start
reset__1 equ globals___0+62
        movlw   16
        movwf   reset__1
reset__2:
        ; line_number = 251
        ; state[index] := 0
        ; index_fsr_first
        movf    index,w
        addlw   state
        movwf   __fsr
        movlw   0
        movwf   __indf
        ; line_number = 252
        ;  index := index + 1
        incf    index,f

        ; line_number = 250
        ;  loop_exactly state_size wrap-up
        decfsz  reset__1,f
        goto    reset__2
        ; line_number = 250
        ;  loop_exactly state_size done
        ; # Set up the timer for the servo pulses:
        ; line_number = 255
        ;  servo_high := 0
        movlw   0
        movwf   servo_high
        ; line_number = 256
        ;  servo_low := 0
        movlw   0
        movwf   servo_low
        ; line_number = 257
        ;  offset := 0
        movlw   0
        bsf     __rp1___byte, __rp1___bit
        movwf   offset
        ; line_number = 258
        ;  direction := 1
        movlw   1
        movwf   direction
        ; line_number = 259
        ;  servo_delay := initial_servo_delay
        movlw   1
        bcf     __rp1___byte, __rp1___bit
        movwf   servo_delay
        ; line_number = 260
        ;  servo_steps := initial_servo_steps
        movlw   32
        movwf   servo_steps
        ; line_number = 261
        ;  delay_count := initial_servo_delay
        movlw   1
        bsf     __rp1___byte, __rp1___bit
        movwf   delay_count
        ; line_number = 262
        ;  servo_increment := initial_servo_increment
        movlw   62
        bcf     __rp1___byte, __rp1___bit
        movwf   servo_increment
        ; line_number = 263
        ;  servo_base_high := initial_servo_base_high
        movlw   1
        movwf   servo_base_high
        ; line_number = 264
        ;  servo_base_low := initial_servo_base_low
        movlw   44
        movwf   servo_base_low
        ; line_number = 265
        ;  adjust_low := initial_servo_increment
        movlw   62
        bsf     __rp1___byte, __rp1___bit
        movwf   adjust_low
        ; line_number = 266
        ;  adjust_high := 0
        movlw   0
        movwf   adjust_high
        ; line_number = 267
        ;  track_minimum := 0
        movlw   0
        movwf   track_minimum
        ; line_number = 268
        ;  track_maximum := 0x3f
        movlw   63
        movwf   track_maximum
        ; line_number = 269
        ;  track_offset_span := 5
        movlw   5
        movwf   track_offset_span
        ; line_number = 270
        ;  track_offset_minimum := 0
        movlw   0
        movwf   track_offset_minimum
        ; line_number = 271
        ;  track_offset_maximum := initial_servo_steps
        movlw   32
        movwf   track_offset_maximum

        ; line_number = 273
        ;  _tmr1l := 0
        movlw   0
        bcf     __rp1___byte, __rp1___bit
        movwf   _tmr1l
        ; line_number = 274
        ;  _tmr1h := 0
        movlw   0
        movwf   _tmr1h
        ; line_number = 275
        ;  _tmr1if := 0
        bcf     _tmr1if___byte, _tmr1if___bit
        ; line_number = 276
        ;  _tmr1ie := 1
        bsf     __rp0___byte, __rp0___bit
        bsf     _tmr1ie___byte, _tmr1ie___bit
        ; line_number = 277
        ;  _t1con := 0
        movlw   0
        bcf     __rp0___byte, __rp0___bit
        movwf   _t1con
        ; line_number = 278
        ;  _peie := 1
        bsf     _peie___byte, _peie___bit
        ; line_number = 279
        ;  _gie := 1
        bsf     _gie___byte, _gie___bit
        ; line_number = 280
        ;  _psa := 0
        bsf     __rp0___byte, __rp0___bit
        bcf     _psa___byte, _psa___bit
        ; line_number = 281
        ;  _tmr1ie := 1
        bsf     _tmr1ie___byte, _tmr1ie___bit

        ; line_number = 283
        ;  _tmr1on := 1
        bcf     __rp0___byte, __rp0___bit
        bsf     _tmr1on___byte, _tmr1on___bit

        ; line_number = 285
        ;  index := 0
        movlw   0
        movwf   index
        ; line_number = 286
        ;  loop_exactly channels start
reset__3 equ globals___0+62
        movlw   8
        movwf   reset__3
reset__4:
        ; line_number = 287
        ; thresholds_high[index] := 0x80
        ; index_fsr_first
        movf    index,w
        addlw   thresholds_high
        movwf   __fsr
        movlw   128
        movwf   __indf
        ; line_number = 288
        ;  thresholds_low[index] := 0x80
        ; index_fsr_first
        movf    index,w
        addlw   thresholds_low
        movwf   __fsr
        movlw   128
        movwf   __indf
        ; line_number = 289
        ;  index := index + 1
        incf    index,f

        ; line_number = 286
        ;  loop_exactly channels wrap-up
        decfsz  reset__3,f
        goto    reset__4
        ; line_number = 286
        ;  loop_exactly channels done
        ; line_number = 291
        ; interrupt_enable := 0
        bcf     interrupt_enable___byte, interrupt_enable___bit
        ; line_number = 292
        ;  interrupt_pending := 0
        bcf     interrupt_pending___byte, interrupt_pending___bit

        ; # Initialize the A/D module:
        ; # A/D Conversion clock is Fosc/8 (Tad=2uS) and AD is on:
        ; line_number = 296
        ;  _adcon0 := 1
        movlw   1
        movwf   _adcon0
        ; line_number = 297
        ;  _adcon1 := 0x20
        movlw   32
        bsf     __rp0___byte, __rp0___bit
        movwf   _adcon1
        ; line_number = 298
        ;  _adcs0 := 1
        bsf     _adcs0___byte, _adcs0___bit
        ; line_number = 299
        ;  _adif := 0
        bcf     __rp0___byte, __rp0___bit
        bcf     _adif___byte, _adif___bit
        ; line_number = 300
        ;  _adie := 0
        bsf     __rp0___byte, __rp0___bit
        bcf     _adie___byte, _adie___bit
        ; #_gie := 0
        ; line_number = 302
        ;  channel := 0
        movlw   0
        bcf     __rp0___byte, __rp0___bit
        movwf   channel
        ; line_number = 303
        ;  _vcfg := 0
        bcf     _vcfg___byte, _vcfg___bit

        ; # Initialize remaining registers:
        ; line_number = 306
        ;  glitch := 0
        movlw   0
        movwf   glitch
        ; line_number = 307
        ;  index := 0
        movlw   0
        movwf   index
        ; line_number = 308
        ;  _gie := 1
        bsf     _gie___byte, _gie___bit


        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 311
        ; procedure main
main:
        ; Initialize some registers
        clrf    _adcon0
        bsf     __rp0___byte, __rp0___bit
        clrf    _ansel
        movlw   7
        bcf     __rp0___byte, __rp0___bit
        movwf   _cmcon0
        movlw   63
        bsf     __rp0___byte, __rp0___bit
        movwf   _trisa
        movlw   55
        movwf   _trisc
        ; arguments_none
        ; line_number = 313
        ;  returns_nothing

        ; line_number = 315
        ;  local command byte
main__command equ globals___0+55
        ; line_number = 316
        ;  local temp byte
main__temp equ globals___0+56
        ; line_number = 317
        ;  local do_send bit
main__do_send___byte equ globals___0+79
main__do_send___bit equ 2

        ; # Switch over to 8MHz:
        ; before procedure statements delay=non-uniform, bit states=(data:00=>01 code:XX=>XX)
        ; line_number = 320
        ;  _osccon := 0x71
        movlw   113
        movwf   _osccon

        ; # Warm up the UART:
        ; line_number = 323
        ;  _txsta := 0x24
        movlw   36
        bcf     __rp0___byte, __rp0___bit
        movwf   _txsta
        ; line_number = 324
        ;  _rcsta := 0x90
        movlw   144
        movwf   _rcsta
        ; line_number = 325
        ;  _baudctl := 0x08
        movlw   8
        movwf   _baudctl
        ; line_number = 326
        ;  _spbrg := _eusart_2400_low
        movlw   64
        movwf   _spbrg
        ; line_number = 327
        ;  _spbrgh := _eusart_2400_high
        movlw   3
        movwf   _spbrgh

        ; # Initalize all of the globals:
        ; line_number = 330
        ;  call reset()
        call    reset

        ; #loop_forever
        ; #	io7 := 0
        ; #	io7 := 1

        ; # Process commands:
        ; line_number = 337
        ;  loop_forever start
main__1:
        ; # Wait for command:
        ; line_number = 339
        ;  command := byte_get()
        call    byte_get
        movwf   main__command

        ; # Dispatch on command:
        ; line_number = 342
        ;  switch command >> 6 start
        movlw   main__98>>8
        movwf   __pclath
main__99 equ globals___0+63
        swapf   main__command,w
        movwf   main__99
        rrf     main__99,f
        rrf     main__99,w
        andlw   3
        addlw   main__98
        movwf   __pcl
        ; page_group 4
main__98:
        goto    main__94
        goto    main__95
        goto    main__96
        goto    main__97
        ; line_number = 343
        ; case 0
main__94:
        ; # 00xx xxxx:
        ; line_number = 345
        ;  do_send := 1
        bsf     main__do_send___byte, main__do_send___bit
        ; line_number = 346
        ;  channel := command & 3
        movlw   3
        andwf   main__command,w
        movwf   channel
        ; line_number = 347
        ;  switch command >> 3 start
        movlw   main__31>>8
        movwf   __pclath
main__32 equ globals___0+63
        rrf     main__command,w
        movwf   main__32
        rrf     main__32,f
        rrf     main__32,w
        andlw   31
        addlw   main__31
        movwf   __pcl
        ; page_group 8
main__31:
        goto    main__23
        goto    main__24
        goto    main__25
        goto    main__26
        goto    main__27
        goto    main__28
        goto    main__29
        goto    main__30
        ; line_number = 348
        ; case 0
main__23:
        ; # 0000 0ccc (Read 8-bit Analog):
        ; line_number = 350
        ;  temp := analogs_high[channel]
        movf    channel,w
        addlw   analogs_high
        movwf   __fsr
        movf    __indf,w
        movwf   main__temp
        goto    main__33
        ; line_number = 351
        ; case 1
main__24:
        ; # 0000 1ccc (Read 10-bit Analog):
        ; line_number = 353
        ;  call byte_put(analogs_high[channel])
        movf    channel,w
        addlw   analogs_high
        movwf   __fsr
        movf    __indf,w
        call    byte_put
        ; line_number = 354
        ;  temp := analogs_low[channel]
        movf    channel,w
        addlw   analogs_low
        movwf   __fsr
        movf    __indf,w
        movwf   main__temp
        goto    main__33
        ; line_number = 355
        ; case 2
main__25:
        ; # 0001 0ccc (Read Low Threshold):
        ; line_number = 357
        ;  temp := thresholds_low[channel]
        movf    channel,w
        addlw   thresholds_low
        movwf   __fsr
        movf    __indf,w
        movwf   main__temp
        goto    main__33
        ; line_number = 358
        ; case 3
main__26:
        ; # 0001 1ccc (Read High Threshold):
        ; line_number = 360
        ;  temp := thresholds_high[channel]
        movf    channel,w
        addlw   thresholds_high
        movwf   __fsr
        movf    __indf,w
        movwf   main__temp
        goto    main__33
        ; line_number = 361
        ; case 4
main__27:
        ; # 0010 0xxx:
        ; line_number = 363
        ;  switch command & 7 start
        ; line_number = 364
        ; case_maximum 7
        movlw   main__7>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__7
        movwf   __pcl
        ; page_group 8
main__7:
        goto    main__2
        goto    main__3
        goto    main__4
        goto    main__5
        goto    main__6
        goto    main__6
        goto    main__6
        goto    main__6
        ; line_number = 365
        ; case 0
main__2:
        ; # 0010 0000 (Read High Mask):
        ; line_number = 367
        ;  temp := high_mask
        movf    high_mask,w
        movwf   main__temp
        goto    main__8
        ; line_number = 368
        ; case 1
main__3:
        ; # 0010 0001 (Read Low Mask):
        ; line_number = 370
        ;  temp := low_mask
        movf    low_mask,w
        movwf   main__temp
        goto    main__8
        ; line_number = 371
        ; case 2
main__4:
        ; # 0010 0010 (Read Rising Mask):
        ; line_number = 373
        ;  temp := rising_mask
        movf    rising_mask,w
        movwf   main__temp
        goto    main__8
        ; line_number = 374
        ; case 3
main__5:
        ; # 0010 0011 (Read Falling Mask):
        ; line_number = 376
        ;  temp := falling_mask
        movf    falling_mask,w
        movwf   main__temp
        goto    main__8
        ; line_number = 377
        ; default
main__6:
        ; line_number = 378
        ; do_send := 0
        bcf     main__do_send___byte, main__do_send___bit
main__8:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 363
        ;  switch command & 7 done
        goto    main__33
        ; line_number = 379
        ; case 5
main__28:
        ; # 0010 1xxx:
        ; line_number = 381
        ;  switch command & 7 start
        ; line_number = 382
        ; case_maximum 7
        movlw   main__14>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__14
        movwf   __pcl
        ; page_group 8
main__14:
        goto    main__9
        goto    main__10
        goto    main__11
        goto    main__12
        goto    main__13
        goto    main__13
        goto    main__13
        goto    main__13
        ; line_number = 383
        ; case 0
main__9:
        ; # 0010 1000 (Read Servo Steps):
        ; line_number = 385
        ;  temp := servo_steps
        movf    servo_steps,w
        movwf   main__temp
        goto    main__15
        ; line_number = 386
        ; case 1
main__10:
        ; # 0010 1001 (Read Servo Base):
        ; line_number = 388
        ;  call byte_put(servo_base_high)
        movf    servo_base_high,w
        call    byte_put
        ; line_number = 389
        ;  temp := servo_base_low
        movf    servo_base_low,w
        movwf   main__temp
        goto    main__15
        ; line_number = 390
        ; case 2
main__11:
        ; # 0010 0010 (Read Servo Increment):
        ; line_number = 392
        ;  temp := servo_increment
        movf    servo_increment,w
        movwf   main__temp
        goto    main__15
        ; line_number = 393
        ; case 3
main__12:
        ; # 0010 0011 (Read Servo Delay):
        ; line_number = 395
        ;  temp := servo_delay
        movf    servo_delay,w
        movwf   main__temp
        goto    main__15
        ; line_number = 396
        ; default
main__13:
        ; line_number = 397
        ; do_send := 0
        bcf     main__do_send___byte, main__do_send___bit
main__15:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 381
        ;  switch command & 7 done
        goto    main__33
        ; line_number = 398
        ; case 6
main__29:
        ; # 0011 0xxx:
        ; line_number = 400
        ;  switch command & 7 start
        ; line_number = 401
        ; case_maximum 7
        movlw   main__21>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__21
        movwf   __pcl
        ; page_group 8
        ; Add 6 NOP's until start of new page 
        nop     
        nop     
        nop     
        nop     
        nop     
        nop     
main__21:
        goto    main__20
        goto    main__20
        goto    main__20
        goto    main__20
        goto    main__16
        goto    main__17
        goto    main__18
        goto    main__19
        ; line_number = 402
        ; case 4
main__16:
        ; This case body wants this bit set
        bsf     __rp1___byte, __rp1___bit
        ; # 0011 0100 (Read Minimum Distance):
        ; line_number = 404
        ;  temp := last_minimum
        movf    last_minimum,w
        bcf     __rp1___byte, __rp1___bit
        movwf   main__temp
        goto    main__22
        ; line_number = 405
        ; case 5
main__17:
        ; This case body wants this bit set
        bsf     __rp1___byte, __rp1___bit
        ; # 0011 0101 (Read Minimum Distance Index):
        ; line_number = 407
        ;  temp := last_minimum_offset
        movf    last_minimum_offset,w
        bcf     __rp1___byte, __rp1___bit
        movwf   main__temp
        goto    main__22
        ; line_number = 408
        ; case 6
main__18:
        ; This case body wants this bit set
        bsf     __rp1___byte, __rp1___bit
        ; # 0011 0110 (Read Maximum Distance):
        ; line_number = 410
        ;  temp := last_maximum
        movf    last_maximum,w
        bcf     __rp1___byte, __rp1___bit
        movwf   main__temp
        goto    main__22
        ; line_number = 411
        ; case 7
main__19:
        ; This case body wants this bit set
        bsf     __rp1___byte, __rp1___bit
        ; # 0011 0111 (Read Maximum Distance Index):
        ; line_number = 413
        ;  temp := last_maximum_offset
        movf    last_maximum_offset,w
        bcf     __rp1___byte, __rp1___bit
        movwf   main__temp
        goto    main__22
        ; line_number = 414
        ; default
main__20:
        ; line_number = 415
        ; do_send := 0
        bcf     main__do_send___byte, main__do_send___bit
main__22:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 400
        ;  switch command & 7 done
        goto    main__33
        ; line_number = 416
        ; case 7
main__30:
        ; # 0011 1xxx:
        ; line_number = 418
        ;  do_send := 0
        bcf     main__do_send___byte, main__do_send___bit
main__33:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 347
        ;  switch command >> 3 done
        ; line_number = 419
        ; if do_send start
        ; =>bit_code_emit@symbol(): sym=main__do_send
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   main__do_send___byte, main__do_send___bit
        goto    main__34
        ; line_number = 420
        ; call byte_put(temp)
        movf    main__temp,w
        call    byte_put
        ; Recombine size1 = 0 || size2 = 0
main__34:
        ; <=bit_code_emit@symbol; sym=main__do_send (data:00=>00 code:XX=>XX)
        ; line_number = 419
        ; if do_send done
        goto    main__100
        ; line_number = 421
        ; case 1
main__95:
        ; # 01xx xxxx:
        ; line_number = 423
        ;  channel := command & 7
        movlw   7
        andwf   main__command,w
        movwf   channel
        ; line_number = 424
        ;  switch (command >> 3) & 7 start
        movlw   main__59>>8
        movwf   __pclath
main__60 equ globals___0+63
        rrf     main__command,w
        movwf   main__60
        rrf     main__60,f
        rrf     main__60,w
        andlw   7
        addlw   main__59
        movwf   __pcl
        ; page_group 8
main__59:
        goto    main__51
        goto    main__52
        goto    main__53
        goto    main__54
        goto    main__55
        goto    main__56
        goto    main__57
        goto    main__58
        ; line_number = 425
        ; case 0
main__51:
        ; # 0100 0xxx:
        goto    main__61
        ; line_number = 427
        ; case 1
main__52:
        ; # 0100 1xxx:
        goto    main__61
        ; line_number = 429
        ; case 2
main__53:
        ; # 0101 0ccc (Set Low Threshold):
        ; line_number = 431
        ;  thresholds_low[channel] := byte_get()
        ; index_temporary_first
main__35 equ globals___0+63
main__36 equ globals___0+64
        movf    channel,w
        movwf   main__35
        call    byte_get
        movwf   main__36
        movf    main__35,w
        addlw   thresholds_low
        movwf   __fsr
        movf    main__36,w
        movwf   __indf
        goto    main__61
        ; line_number = 432
        ; case 3
main__54:
        ; # 0101 1ccc (Set High Threshold):
        ; line_number = 434
        ;  thresholds_high[channel] := byte_get()
        ; index_temporary_first
main__37 equ globals___0+63
main__38 equ globals___0+64
        movf    channel,w
        movwf   main__37
        call    byte_get
        movwf   main__38
        movf    main__37,w
        addlw   thresholds_high
        movwf   __fsr
        movf    main__38,w
        movwf   __indf
        goto    main__61
        ; line_number = 435
        ; case 4
main__55:
        ; # 0110 0xxx:
        ; line_number = 437
        ;  temp := byte_get()
        call    byte_get
        movwf   main__temp
        ; line_number = 438
        ;  switch channel start
        ; line_number = 439
        ; case_maximum 7
        movlw   main__43>>8
        movwf   __pclath
        movf    channel,w
        addlw   main__43
        movwf   __pcl
        ; page_group 8
main__43:
        goto    main__39
        goto    main__40
        goto    main__41
        goto    main__42
        goto    main__44
        goto    main__44
        goto    main__44
        goto    main__44
        ; line_number = 440
        ; case 0
main__39:
        ; # 0110 0000 (Set High Mask):
        ; line_number = 442
        ;  high_mask := temp
        movf    main__temp,w
        movwf   high_mask
        goto    main__44
        ; line_number = 443
        ; case 1
main__40:
        ; # 0110 0001 (Set Low Mask):
        ; line_number = 445
        ;  low_mask := temp
        movf    main__temp,w
        movwf   low_mask
        goto    main__44
        ; line_number = 446
        ; case 2
main__41:
        ; # 0110 0010 (Set Rising Mask):
        ; line_number = 448
        ;  rising_mask := temp
        movf    main__temp,w
        movwf   rising_mask
        goto    main__44
        ; line_number = 449
        ; case 3
main__42:
        ; # 0110 0011 (Set Falling Mask):
        ; line_number = 451
        ;  falling_mask := temp
        movf    main__temp,w
        movwf   falling_mask
main__44:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 438
        ;  switch channel done
        goto    main__61
        ; line_number = 452
        ; case 5
main__56:
        ; # 0110 1xxx:
        ; line_number = 454
        ;  temp := byte_get()
        call    byte_get
        movwf   main__temp
        ; line_number = 455
        ;  switch command & 7 start
        ; line_number = 456
        ; case_maximum 7
        movlw   main__49>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__49
        movwf   __pcl
        ; page_group 8
main__49:
        goto    main__45
        goto    main__46
        goto    main__47
        goto    main__48
        goto    main__50
        goto    main__50
        goto    main__50
        goto    main__50
        ; line_number = 457
        ; case 0
main__45:
        ; This case body wants this bit set
        bsf     __rp1___byte, __rp1___bit
        ; # 0110 1000 (Set Servo Steps):
        ; line_number = 459
        ;  offset := 0
        movlw   0
        movwf   offset
        ; line_number = 460
        ;  servo_steps := temp & 0x1f
        movlw   31
        bcf     __rp1___byte, __rp1___bit
        andwf   main__temp,w
        movwf   servo_steps
        goto    main__50
        ; line_number = 461
        ; case 1
main__46:
        ; # 0110 1001 (Set Servo Base):
        ; line_number = 463
        ;  servo_base_high := temp
        movf    main__temp,w
        movwf   servo_base_high
        ; line_number = 464
        ;  servo_base_low := byte_get()
        call    byte_get
        movwf   servo_base_low
        goto    main__50
        ; line_number = 465
        ; case 2
main__47:
        ; This case body wants this bit set
        bsf     __rp1___byte, __rp1___bit
        ; # 0110 1010 (Set Servo Increment):
        ; line_number = 467
        ;  offset := 0
        movlw   0
        movwf   offset
        ; line_number = 468
        ;  servo_increment := temp
        bcf     __rp1___byte, __rp1___bit
        movf    main__temp,w
        movwf   servo_increment
        goto    main__50
        ; line_number = 469
        ; case 3
main__48:
        ; # 0110 1011 (Set Servo Step Delay):
        ; line_number = 471
        ;  servo_delay := temp
        movf    main__temp,w
        movwf   servo_delay
main__50:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 455
        ;  switch command & 7 done
        goto    main__61
        ; line_number = 472
        ; case 6
main__57:
        ; # 0111 0xxx:
        goto    main__61
        ; line_number = 474
        ; case 7
main__58:
        ; # 0111 1xxx:
main__61:
        ; switch end:(data:00=>?? code:XX=>XX)
        ; line_number = 424
        ;  switch (command >> 3) & 7 done
        goto    main__100
        ; line_number = 476
        ; case 2
main__96:
        ; # 10ii iiii (Read Scan Distance):
        ; line_number = 478
        ;  call byte_put(analogs[command & 0x3f])
        movlw   63
        andwf   main__command,w
        addlw   analogs
        movwf   __fsr
        movf    __indf,w
        call    byte_put
        goto    main__100
        ; line_number = 479
        ; case 3
main__97:
        ; # 11xx xxxx:
        ; line_number = 481
        ;  switch (command >> 3) & 7 start
        movlw   main__91>>8
        movwf   __pclath
main__92 equ globals___0+63
        rrf     main__command,w
        movwf   main__92
        rrf     main__92,f
        rrf     main__92,w
        andlw   7
        addlw   main__91
        movwf   __pcl
        ; page_group 8
main__91:
        goto    main__93
        goto    main__93
        goto    main__93
        goto    main__93
        goto    main__93
        goto    main__88
        goto    main__89
        goto    main__90
        ; line_number = 482
        ; case 5
main__88:
        ; # 1110 1xxx:
        ; line_number = 484
        ;  switch command & 7 start
        movlw   main__66>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__66
        movwf   __pcl
        ; page_group 8
main__66:
        goto    main__67
        goto    main__67
        goto    main__67
        goto    main__67
        goto    main__67
        goto    main__67
        goto    main__64
        goto    main__65
        ; line_number = 485
        ; case 6
main__64:
        ; # 1110 1110 (Reset)
        ; line_number = 487
        ;  call reset()
        call    reset
        goto    main__67
        ; line_number = 488
        ; case 7
main__65:
        ; # 1110 1111 (Read Interrupt Bits):
        ; line_number = 490
        ;  temp := 0
        movlw   0
        movwf   main__temp
        ; line_number = 491
        ;  if interrupt_pending start
        ; =>bit_code_emit@symbol(): sym=interrupt_pending
        ; CASE: True.size=1 False.size=0
        btfsc   interrupt_pending___byte, interrupt_pending___bit
        ; line_number = 492
        ; temp@0 := 1
main__select__62___byte equ main__temp
main__select__62___bit equ 0
        bsf     main__select__62___byte, main__select__62___bit
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=interrupt_pending (data:00=>00 code:XX=>XX)
        ; line_number = 491
        ;  if interrupt_pending done
        ; line_number = 493
        ; if interrupt_enable start
        ; =>bit_code_emit@symbol(): sym=interrupt_enable
        ; CASE: True.size=1 False.size=0
        btfsc   interrupt_enable___byte, interrupt_enable___bit
        ; line_number = 494
        ; temp@1 := 1
main__select__63___byte equ main__temp
main__select__63___bit equ 1
        bsf     main__select__63___byte, main__select__63___bit
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=interrupt_enable (data:00=>00 code:XX=>XX)
        ; line_number = 493
        ; if interrupt_enable done
        ; line_number = 495
        ; call byte_put(temp)
        movf    main__temp,w
        call    byte_put
main__67:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 484
        ;  switch command & 7 done
        goto    main__93
        ; line_number = 496
        ; case 6
main__89:
        ; # 1111 0xxx:
        ; line_number = 498
        ;  switch command & 7 start
        movlw   main__75>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__75
        movwf   __pcl
        ; page_group 8
main__75:
        goto    main__72
        goto    main__72
        goto    main__72
        goto    main__72
        goto    main__73
        goto    main__73
        goto    main__74
        goto    main__74
        ; line_number = 499
        ; case 0, 1, 2, 3
main__72:
        ; # 1111 00ep (Set Interrupt Bits):
        ; line_number = 501
        ;  interrupt_enable := command@1
        bcf     interrupt_enable___byte, interrupt_enable___bit
main__select__68___byte equ main__command
main__select__68___bit equ 1
        ; =>bit_code_emit@symbol(): sym=main__select__68
        ; CASE: True.size=1 False.size=0
        btfsc   main__select__68___byte, main__select__68___bit
        bsf     interrupt_enable___byte, interrupt_enable___bit
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=main__select__68 (data:00=>00 code:XX=>XX)
        ; line_number = 502
        ;  interrupt_pending := command@0
        bcf     interrupt_pending___byte, interrupt_pending___bit
main__select__69___byte equ main__command
main__select__69___bit equ 0
        ; =>bit_code_emit@symbol(): sym=main__select__69
        ; CASE: True.size=1 False.size=0
        btfsc   main__select__69___byte, main__select__69___bit
        bsf     interrupt_pending___byte, interrupt_pending___bit
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=main__select__69 (data:00=>00 code:XX=>XX)
        goto    main__76
        ; line_number = 503
        ; case 4, 5
main__73:
        ; # 1111 010p (Set Interrupt Pending):
        ; line_number = 505
        ;  interrupt_pending := command@0
        bcf     interrupt_pending___byte, interrupt_pending___bit
main__select__70___byte equ main__command
main__select__70___bit equ 0
        ; =>bit_code_emit@symbol(): sym=main__select__70
        ; CASE: True.size=1 False.size=0
        btfsc   main__select__70___byte, main__select__70___bit
        bsf     interrupt_pending___byte, interrupt_pending___bit
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=main__select__70 (data:00=>00 code:XX=>XX)
        goto    main__76
        ; line_number = 506
        ; case 6, 7
main__74:
        ; # 1111 011e (Set Interrupt Enable):
        ; line_number = 508
        ;  interrupt_enable := command@0
        bcf     interrupt_enable___byte, interrupt_enable___bit
main__select__71___byte equ main__command
main__select__71___bit equ 0
        ; =>bit_code_emit@symbol(): sym=main__select__71
        ; CASE: True.size=1 False.size=0
        btfsc   main__select__71___byte, main__select__71___bit
        bsf     interrupt_enable___byte, interrupt_enable___bit
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=main__select__71 (data:00=>00 code:XX=>XX)
main__76:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 498
        ;  switch command & 7 done
        goto    main__93
        ; line_number = 509
        ; case 7
main__90:
        ; line_number = 510
        ; switch command & 7 start
        movlw   main__86>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__86
        movwf   __pcl
        ; page_group 8
main__86:
        goto    main__78
        goto    main__79
        goto    main__80
        goto    main__81
        goto    main__82
        goto    main__83
        goto    main__84
        goto    main__85
        ; line_number = 511
        ; case 0
main__78:
        ; This case body wants this bit set
        bsf     __rp0___byte, __rp0___bit
        ; # 1111 1000 (Clock Decrement):
        ; line_number = 513
        ;  _osctune := _osctune - _osccal_lsb
        decf    _osctune,f
        goto    main__87
        ; line_number = 514
        ; case 1
main__79:
        ; This case body wants this bit set
        bsf     __rp0___byte, __rp0___bit
        ; # 1111 1001 (Clock Increment):
        ; line_number = 516
        ;  _osctune := _osctune + _osccal_lsb
        incf    _osctune,f
        goto    main__87
        ; line_number = 517
        ; case 2
main__80:
        ; This case body wants this bit set
        bsf     __rp0___byte, __rp0___bit
        ; # 1111 1010 (Clock Read):
        ; line_number = 519
        ;  call byte_put(_osctune)
        movf    _osctune,w
        bcf     __rp0___byte, __rp0___bit
        call    byte_put
        goto    main__87
        ; line_number = 520
        ; case 3
main__81:
        ; # 1111 1011 (Clock Pulse):
        ; line_number = 522
        ;  call byte_put(0)
        movlw   0
        call    byte_put
        goto    main__87
        ; line_number = 523
        ; case 4
main__82:
        ; # 1111 1100 (ID Next):
        ; line_number = 525
        ;  temp := 0
        movlw   0
        movwf   main__temp
        ; line_number = 526
        ;  if index < id.size start
        movlw   53
        subwf   index,w
        ; =>bit_code_emit@symbol(): sym=__c
        ; CASE: true.size=0 && false.size>1
        btfsc   __c___byte, __c___bit
        goto    main__77
        ; line_number = 527
        ; temp := id[index]
        movf    index,w
        call    id
        movwf   main__temp
        ; line_number = 528
        ;  index := index + 1
        incf    index,f
main__77:
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=__c (data:00=>00 code:XX=>XX)
        ; line_number = 526
        ;  if index < id.size done
        ; line_number = 529
        ; call byte_put(temp)
        movf    main__temp,w
        call    byte_put
        goto    main__87
        ; line_number = 530
        ; case 5
main__83:
        ; # 1111 1101 (ID Reset):
        ; line_number = 532
        ;  index := 0
        movlw   0
        movwf   index
        goto    main__87
        ; line_number = 533
        ; case 6
main__84:
        ; # 1111 1110 (Glitch Read):
        ; line_number = 535
        ;  call byte_put(glitch)
        movf    glitch,w
        call    byte_put
        ; line_number = 536
        ;  glitch := 0
        movlw   0
        movwf   glitch
        goto    main__87
        ; line_number = 537
        ; case 7
main__85:
        ; # 1111 1111 (Glitch):
        ; line_number = 539
        ;  if glitch != 0xff start
        ; Left minus Right
        incf    glitch,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; CASE: true_code.size=0 && false_code.size=1
        btfss   __z___byte, __z___bit
        ; line_number = 540
        ; glitch := glitch + 1
        incf    glitch,f


        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; line_number = 539
        ;  if glitch != 0xff done
main__87:
        ; switch end:(data:00=>0? code:XX=>XX)
        ; line_number = 510
        ; switch command & 7 done
main__93:
        ; switch end:(data:00=>0? code:XX=>XX)
        ; line_number = 481
        ;  switch (command >> 3) & 7 done
main__100:
        ; switch end:(data:00=>?? code:XX=>XX)
        ; line_number = 342
        ;  switch command >> 6 done
        ; line_number = 337
        ;  loop_forever wrap-up
        ; Need to adjust code banks to match front of loop
        bcf     __rp0___byte, __rp0___bit
        bcf     __rp1___byte, __rp1___bit
        goto    main__1
        ; line_number = 337
        ;  loop_forever done
        ; delay after procedure statements=non-uniform




        ; line_number = 543
        ; procedure delay
delay:
        ; arguments_none
        ; line_number = 545
        ;  returns_nothing

        ; # This procedure delays 1/3 of a bit.

        ; line_number = 549
        ;  local temp byte
delay__temp equ globals___0+57
        ; line_number = 550
        ;  local previous byte
delay__previous equ globals___0+58
        ; line_number = 551
        ;  local current byte
delay__current equ globals___0+59
        ; line_number = 552
        ;  local not_current byte
delay__not_current equ globals___0+60
        ; line_number = 553
        ;  local changed byte
delay__changed equ globals___0+61

        ; # Perform A/D:
        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 556
        ;  chan := chans[channel]
        movf    channel,w
        call    chans
        movwf   chan

        ; # At 8MHz, TAD = 1.6uS (ADCS<2:0>=010).  An A/D conversion takes
        ; # 11*TAD = 11*1.6uS = 17.1uS 

        ; # Acquiring the signal takes approximately 20uS.
        ; # We'll pad that out a little to 25uS to be safe:

        ; line_number = 564
        ;  temp := (chan << 2) | 1
delay__1 equ globals___0+65
        rlf     chan,w
        movwf   delay__1
        rlf     delay__1,w
        andlw   252
        iorlw   1
        movwf   delay__temp
        ; line_number = 565
        ;  if _vcfg start
        ; =>bit_code_emit@symbol(): sym=_vcfg
        ; CASE: True.size=1 False.size=0
        btfsc   _vcfg___byte, _vcfg___bit
        ; # Keep _vcfg set:
        ; line_number = 567
        ;  temp@6 := 1
delay__select__2___byte equ delay__temp
delay__select__2___bit equ 6
        bsf     delay__select__2___byte, delay__select__2___bit
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=_vcfg (data:00=>00 code:XX=>XX)
        ; line_number = 565
        ;  if _vcfg done
        ; line_number = 568
        ; _adcon0 := temp
        movf    delay__temp,w
        movwf   _adcon0
        ; line_number = 569
        ;  delay 25 * microsecond start
        ; Delay expression evaluates to 50
        ; # Kick the dog:
        ; line_number = 571
        ;  watch_dog_reset done
        ; Delay at watch_dog_reset is 0
        clrwdt  

        ; Delay 49 cycles
        ; Delay loop takes 12 * 4 = 48 cycles
        movlw   12
delay__3:
        addlw   255
        btfss   __z___byte, __z___bit
        goto    delay__3
        nop     
        ; line_number = 569
        ;  delay 25 * microsecond done
        ; # Getting the value takes 11 & Tad, where Tad = 2uS = 22uS.
        ; # We'll add 5uS for a little pad:
        ; line_number = 575
        ;  _go := 1
        bsf     _go___byte, _go___bit
        ; line_number = 576
        ;  delay 28 * microsecond start
        ; Delay expression evaluates to 56
        ; # do_nothing

        ; Delay 56 cycles
        ; Delay loop takes 14 * 4 = 56 cycles
        movlw   14
delay__4:
        addlw   255
        btfss   __z___byte, __z___bit
        goto    delay__4
        ; line_number = 576
        ;  delay 28 * microsecond done
        ; # A/D result is ready:
        ; line_number = 580
        ;  analogs_high[channel] := _adresh
        ; index_fsr_first
        movf    channel,w
        addlw   analogs_high
        movwf   __fsr
        movf    _adresh,w
        movwf   __indf
        ; line_number = 581
        ;  analogs_low[channel] := _adresl
        ; index_fsr_first
        movf    channel,w
        addlw   analogs_low
        movwf   __fsr
        bsf     __rp0___byte, __rp0___bit
        movf    _adresl,w
        movwf   __indf

        ; line_number = 583
        ;  channel := (channel + 1) & 7
        bcf     __rp0___byte, __rp0___bit
        incf    channel,w
        andlw   7
        movwf   channel

        ; # Setup for interrupts:
        ; line_number = 586
        ;  previous := current
        movf    delay__current,w
        movwf   delay__previous

        ; #FIXME!!!
        ; line_number = 589
        ;  current := 0
        movlw   0
        movwf   delay__current
        ; line_number = 590
        ;  not_current := current ^ 0xff
        movlw   255
        xorwf   delay__current,w
        movwf   delay__not_current
        ; line_number = 591
        ;  changed := current ^ previous
        movf    delay__current,w
        xorwf   delay__previous,w
        movwf   delay__changed

        ; # See about triggering the interrupt_pending flag:
        ; line_number = 594
        ;  if (low_mask & not_current) | (high_mask & current) | (changed & current & rising_mask) | (changed & not_current & falling_mask) != 0 start
        ; Left minus Right
delay__5 equ globals___0+65
        movf    low_mask,w
        andwf   delay__not_current,w
        movwf   delay__5
        movf    high_mask,w
        andwf   delay__current,w
        iorwf   delay__5,f
        movf    delay__changed,w
        andwf   delay__current,w
        andwf   rising_mask,w
        iorwf   delay__5,f
        movf    delay__changed,w
        andwf   delay__not_current,w
        andwf   falling_mask,w
        iorwf   delay__5,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; CASE: true_code.size=0 && false_code.size=1
        btfss   __z___byte, __z___bit
        ; line_number = 597
        ; interrupt_pending := 1
        bsf     interrupt_pending___byte, interrupt_pending___bit

        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; line_number = 594
        ;  if (low_mask & not_current) | (high_mask & current) | (changed & current & rising_mask) | (changed & not_current & falling_mask) != 0 done

        ; # Send an interrupt if interrupts are enabled:
        ; line_number = 600
        ;  if interrupt_pending start
        ; =>bit_code_emit@symbol(): sym=interrupt_pending
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   interrupt_pending___byte, interrupt_pending___bit
        goto    delay__8
        ; line_number = 601
        ; if interrupt_enable start
        ; =>bit_code_emit@symbol(): sym=interrupt_enable
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   interrupt_enable___byte, interrupt_enable___bit
        goto    delay__7
        ; # If transmit buffer is empty, send a null:
        ; line_number = 603
        ;  if _trmt start
        ; =>bit_code_emit@symbol(): sym=_trmt
        ; CASE: true_code.size = 0 && false_code.size > 1
        btfss   _trmt___byte, _trmt___bit
        goto    delay__6
        ; line_number = 604
        ; _txreg := 0
        movlw   0
        movwf   _txreg


        ; Recombine size1 = 0 || size2 = 0
delay__6:
        ; <=bit_code_emit@symbol; sym=_trmt (data:00=>00 code:XX=>XX)
        ; line_number = 603
        ;  if _trmt done
        ; Recombine size1 = 0 || size2 = 0
delay__7:
        ; <=bit_code_emit@symbol; sym=interrupt_enable (data:00=>00 code:XX=>XX)
        ; line_number = 601
        ; if interrupt_enable done
        ; Recombine size1 = 0 || size2 = 0
delay__8:
        ; <=bit_code_emit@symbol; sym=interrupt_pending (data:00=>00 code:XX=>XX)
        ; line_number = 600
        ;  if interrupt_pending done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 607
        ; constant zeros8 = "\0,0,0,0,0,0,0,0\"
        ; zeros8 = '\0,0,0,0,0,0,0,0\'
        ; line_number = 608
        ; constant module_name = "\12\IRDistance8D"
        ; module_name = '\12\IRDistance8D'
        ; line_number = 609
        ; constant vendor_name = "\15\Gramlich&Benson"
        ; vendor_name = '\15\Gramlich&Benson'
        ; line_number = 610
        ; string id = "\1,0,0,2,3,0,0,0\" ~ zeros8 ~ zeros8 ~ module_name ~ vendor_name start
        ; id = '\1,0,0,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12\IRDistance8D\15\Gramlich&Benson'
id:
        ; Temporarily save index into FSR
        movwf   __fsr
        ; Initialize PCLATH to point to this code page
        movlw   id___base>>8
        movwf   __pclath
        ; Restore index from FSR
        movf    __fsr,w
        addlw   id___base
        ; Index to the correct return value
        movwf   __pcl
        ; page_group 53
id___base:
        retlw   1
        retlw   0
        retlw   0
        retlw   2
        retlw   3
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   12
        retlw   73
        retlw   82
        retlw   68
        retlw   105
        retlw   115
        retlw   116
        retlw   97
        retlw   110
        retlw   99
        retlw   101
        retlw   56
        retlw   68
        retlw   15
        retlw   71
        retlw   114
        retlw   97
        retlw   109
        retlw   108
        retlw   105
        retlw   99
        retlw   104
        retlw   38
        retlw   66
        retlw   101
        retlw   110
        retlw   115
        retlw   111
        retlw   110
        ; line_number = 610
        ; string id = "\1,0,0,2,3,0,0,0\" ~ zeros8 ~ zeros8 ~ module_name ~ vendor_name start

        ; line_number = 612
        ; string chans = "\0,1,3,2,4,5,6,7\" start
        ; chans = '\0,1,3,2,4,5,6,7\'
chans:
        ; Temporarily save index into FSR
        movwf   __fsr
        ; Initialize PCLATH to point to this code page
        movlw   chans___base>>8
        movwf   __pclath
        ; Restore index from FSR
        movf    __fsr,w
        addlw   chans___base
        ; Index to the correct return value
        movwf   __pcl
        ; page_group 8
chans___base:
        retlw   0
        retlw   1
        retlw   3
        retlw   2
        retlw   4
        retlw   5
        retlw   6
        retlw   7
        ; line_number = 612
        ; string chans = "\0,1,3,2,4,5,6,7\" start

        ; line_number = 614
        ; string mask = "\1,2,4,8,16,32,64,128\" start
        ; mask = '\1,2,4,8,16\ @\128\'
mask:
        ; Temporarily save index into FSR
        movwf   __fsr
        ; Initialize PCLATH to point to this code page
        movlw   mask___base>>8
        movwf   __pclath
        ; Restore index from FSR
        movf    __fsr,w
        addlw   mask___base
        ; Index to the correct return value
        movwf   __pcl
        ; page_group 8
mask___base:
        retlw   1
        retlw   2
        retlw   4
        retlw   8
        retlw   16
        retlw   32
        retlw   64
        retlw   128
        ; line_number = 614
        ; string mask = "\1,2,4,8,16,32,64,128\" start



        ; Appending 4 delayed procedures to code bank 0
        ; buffer = '_robobricks_pic16f688'
        ; line_number = 17
        ; procedure byte_get
byte_get:
        ; arguments_none
        ; line_number = 19
        ;  returns byte

        ; # This procedure will return the next byte from the UART.
        ; # It continuously calls delay() while it is waiting.

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 24
        ;  while !_rcif start
byte_get__1:
        ; =>bit_code_emit@symbol(): sym=_rcif
        ; CASE: true.size=0 && false.size>1
        btfsc   _rcif___byte, _rcif___bit
        goto    byte_get__2
        ; line_number = 25
        ; in_byte_get := 1
        bsf     in_byte_get___byte, in_byte_get___bit
        ; line_number = 26
        ;  call delay()
        call    delay
        ; line_number = 27
        ;  in_byte_get := 0
        bcf     in_byte_get___byte, in_byte_get___bit
        goto    byte_get__1
byte_get__2:
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=_rcif (data:00=>00 code:XX=>XX)
        ; line_number = 24
        ;  while !_rcif done
        ; line_number = 28
        ; interrupt_pending := 0
        bcf     interrupt_pending___byte, interrupt_pending___bit
        ; line_number = 29
        ;  command_previous := command_last
        movf    command_last,w
        movwf   command_previous
        ; line_number = 30
        ;  _rcif := 0
        bcf     _rcif___byte, _rcif___bit
        ; line_number = 31
        ;  return _rcreg start
        ; line_number = 31
        movf    _rcreg,w
        return  
        ; line_number = 31
        ;  return _rcreg done


        ; delay after procedure statements=non-uniform




        ; line_number = 34
        ; procedure byte_put
byte_put:
        ; Last argument is sitting in W; save into argument variable
        movwf   byte_put__value
        ; delay=4294967295
        ; line_number = 35
        ; argument value byte
byte_put__value equ globals___0
        ; line_number = 36
        ;  returns_nothing

        ; # This procedure will output {value} to the UART.  If the UART is
        ; # already busy transmitting a character, the {delay} procedure is
        ; # repeatably called until {value} can be sent.

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 42
        ;  while !_trmt start
byte_put__1:
        ; =>bit_code_emit@symbol(): sym=_trmt
        ; CASE: true.size=0 && false.size>1
        btfsc   _trmt___byte, _trmt___bit
        goto    byte_put__2
        ; line_number = 43
        ; call delay()
        call    delay
        goto    byte_put__1
byte_put__2:
        ; Recombine size1 = 0 || size2 = 0
        ; <=bit_code_emit@symbol; sym=_trmt (data:00=>00 code:XX=>XX)
        ; line_number = 42
        ;  while !_trmt done
        ; line_number = 44
        ; debug := 0
        bcf     debug___byte, debug___bit
        ; line_number = 45
        ;  sent_previous := sent_last
        movf    sent_last,w
        movwf   sent_previous
        ; line_number = 46
        ;  sent_last := value
        movf    byte_put__value,w
        movwf   sent_last
        ; line_number = 47
        ;  _txreg := value
        movf    byte_put__value,w
        movwf   _txreg


        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 50
        ; procedure baud_rate_low
baud_rate_low:
        ; Last argument is sitting in W; save into argument variable
        movwf   baud_rate_low__baud_rate_index
        ; delay=4294967295
        ; line_number = 51
        ; argument baud_rate_index byte
baud_rate_low__baud_rate_index equ globals___0+1
        ; line_number = 52
        ;  returns byte

        ; #: This procedure will return the baud rate low byte for {baud_rate_index}.

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 56
        ;  switch baud_rate_index start
        movlw   baud_rate_low__9>>8
        movwf   __pclath
        movf    baud_rate_low__baud_rate_index,w
        addlw   baud_rate_low__9
        movwf   __pcl
        ; page_group 8
baud_rate_low__9:
        ; line_number = 58
        ; return _eusart_2400_low start
        ; line_number = 58
        retlw   64
        ; line_number = 58
        ; return _eusart_2400_low done
        ; line_number = 60
        ; return _eusart_4800_low start
        ; line_number = 60
        retlw   159
        ; line_number = 60
        ; return _eusart_4800_low done
        ; line_number = 62
        ; return _eusart_9600_low start
        ; line_number = 62
        retlw   207
        ; line_number = 62
        ; return _eusart_9600_low done
        ; line_number = 64
        ; return _eusart_19200_low start
        ; line_number = 64
        retlw   103
        ; line_number = 64
        ; return _eusart_19200_low done
        ; line_number = 66
        ; return _eusart_38400_low start
        ; line_number = 66
        retlw   51
        ; line_number = 66
        ; return _eusart_38400_low done
        ; line_number = 68
        ; return _eusart_57600_low start
        ; line_number = 68
        retlw   33
        ; line_number = 68
        ; return _eusart_57600_low done
        ; line_number = 70
        ; return _eusart_115200_low start
        ; line_number = 70
        retlw   16
        ; line_number = 70
        ; return _eusart_115200_low done
        ; line_number = 72
        ; return _eusart_203400_low start
        ; line_number = 72
        retlw   8
        ; line_number = 72
        ; return _eusart_203400_low done


baud_rate_low__10:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 56
        ;  switch baud_rate_index done
        ; delay after procedure statements=non-uniform
        ; Exiting procedure with no return(s); fail with infinite loop
baud_rate_low__11:
        goto    baud_rate_low__11




        ; line_number = 75
        ; procedure baud_rate_high
baud_rate_high:
        ; Last argument is sitting in W; save into argument variable
        movwf   baud_rate_high__baud_rate_index
        ; delay=4294967295
        ; line_number = 76
        ; argument baud_rate_index byte
baud_rate_high__baud_rate_index equ globals___0+2
        ; line_number = 77
        ;  returns byte

        ; # This procedure will return the baud rate high byte for
        ; # {baud_rate_index}.

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 82
        ;  switch baud_rate_index start
        movlw   baud_rate_high__9>>8
        movwf   __pclath
        movf    baud_rate_high__baud_rate_index,w
        addlw   baud_rate_high__9
        movwf   __pcl
        ; page_group 8
baud_rate_high__9:
        ; line_number = 84
        ; return _eusart_2400_high start
        ; line_number = 84
        retlw   3
        ; line_number = 84
        ; return _eusart_2400_high done
        ; line_number = 86
        ; return _eusart_4800_high start
        ; line_number = 86
        retlw   1
        ; line_number = 86
        ; return _eusart_4800_high done
        ; line_number = 88
        ; return _eusart_9600_high start
        ; line_number = 88
        retlw   0
        ; line_number = 88
        ; return _eusart_9600_high done
        ; line_number = 90
        ; return _eusart_19200_high start
        ; line_number = 90
        retlw   0
        ; line_number = 90
        ; return _eusart_19200_high done
        ; line_number = 92
        ; return _eusart_38400_high start
        ; line_number = 92
        retlw   0
        ; line_number = 92
        ; return _eusart_38400_high done
        ; line_number = 94
        ; return _eusart_57600_high start
        ; line_number = 94
        retlw   0
        ; line_number = 94
        ; return _eusart_57600_high done
        ; line_number = 96
        ; return _eusart_115200_high start
        ; line_number = 96
        retlw   0
        ; line_number = 96
        ; return _eusart_115200_high done
        ; line_number = 98
        ; return _eusart_203400_high start
        ; line_number = 98
        retlw   0
        ; line_number = 98
        ; return _eusart_203400_high done

baud_rate_high__10:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 82
        ;  switch baud_rate_index done
        ; delay after procedure statements=non-uniform
        ; Exiting procedure with no return(s); fail with infinite loop
baud_rate_high__11:
        goto    baud_rate_high__11




        ; Configuration bits
        ; fill = 0x3000
        ; fcmen = off (0x0)
        ; ieso = off (0x0)
        ; boden = off (0x0)
        ; cpd = off (0x80)
        ; cp = off (0x40)
        ; mclre = off (0x20)
        ; pwrte = off (0x10)
        ; wdte = off (0x0)
        ; fosc = int_no_clk (0x4)
        ; 12532 = 0x30f4
        __config 12532
        ; Define start addresses for data regions
        ; Region="shared___globals" Address=112" Size=16 Bytes=2 Bits=0 Available=14
        ; Region="globals___0" Address=32" Size=80 Bytes=66 Bits=3 Available=13
        ; Region="globals___1" Address=160" Size=80 Bytes=64 Bits=0 Available=16
        ; Region="globals___2" Address=288" Size=80 Bytes=24 Bits=1 Available=55
        ; Region="shared___globals" Address=112" Size=16 Bytes=2 Bits=0 Available=14
        end
