        radix   dec
        ; Code bank 0; Start address: 0; End address: 2047
        org     0

        ; 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) 2002-2007 by Wayne C. Gramlich.
        ; # All rights reserved.

        ; # This code started out as some assembly code that was written by
        ; # Chuck McManis.  It has been modified basically beyond recognition.
        ; # None-the-less, I would like to thank Chuck for his contribution
        ; # to the effort.

        ; # The Lumix(r) LCM-S01602DTR/M 2 line by 16 character LCD panel uses the
        ; # Samsung(r) S6A0069 LCD controller.  The S6A0069 LCD controller has
        ; # 80 bytes of internal memory available for displaying characters.
        ; # The byte addresses for these data bytes are 0x00 through 0x4f(=79).

        ; # This module uses a PIC16F628A
        ; buffer = 'lcd32'
        ; line_number = 17
        ; library _pic16f628a entered

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

        ; buffer = '_pic16f628a'
        ; line_number = 6
        ; library _pic16f628 entered

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

        ; buffer = '_pic16f628'
        ; line_number = 6
        ; processor pic16f628
        ; line_number = 7
        ; configure_address 0x2007
        ; line_number = 8
        ;  configure_fill 0x0200
        ; line_number = 9
        ;  configure_option cp: off = 0x3c00
        ; line_number = 10
        ;  configure_option cp: after400 = 0x2800
        ; line_number = 11
        ;  configure_option cp: after200 = 0x1400
        ; line_number = 12
        ;  configure_option cp: on = 0x0000
        ; line_number = 13
        ;  configure_option cpd: off = 0x100
        ; line_number = 14
        ;  configure_option cpd: on = 0x000
        ; line_number = 15
        ;  configure_option lvp: on = 0x80
        ; line_number = 16
        ;  configure_option lvp: off = 0x00
        ; line_number = 17
        ;  configure_option boden: on = 0x40
        ; line_number = 18
        ;  configure_option boden: off = 0x00
        ; line_number = 19
        ;  configure_option mclre: on = 0x20
        ; line_number = 20
        ;  configure_option mclre: off = 0x00
        ; line_number = 21
        ;  configure_option pwrte: on = 0
        ; line_number = 22
        ;  configure_option pwrte: off = 8
        ; line_number = 23
        ;  configure_option wdte: on = 4
        ; line_number = 24
        ;  configure_option wdte: off = 0
        ; line_number = 25
        ;  configure_option fosc: er_clk = 0x13
        ; line_number = 26
        ;  configure_option fosc: er_no_clk = 0x12
        ; line_number = 27
        ;  configure_option fosc: intrc_clk = 0x11
        ; line_number = 28
        ;  configure_option fosc: intrc_no_clk = 0x10
        ; line_number = 29
        ;  configure_option fosc: ec = 3
        ; line_number = 30
        ;  configure_option fosc: hs = 2
        ; line_number = 31
        ;  configure_option fosc: xt = 1
        ; line_number = 32
        ;  configure_option fosc: lp = 0
        ; line_number = 33
        ;  code_bank 0x0 : 0x7ff
        ; line_number = 34
        ;  data_bank 0x0 : 0x7f
        ; line_number = 35
        ;  data_bank 0x80 : 0xff
        ; line_number = 36
        ;  data_bank 0x100 : 0x17f
        ; line_number = 37
        ;  data_bank 0x180 : 0x1ff
        ; line_number = 38
        ;  global_region 0x20 : 0x6f
        ; line_number = 39
        ;  global_region 0xa0 : 0xef
        ; line_number = 40
        ;  global_region 0x120 : 0x14f
        ; line_number = 41
        ;  shared_region 0x70 : 0x7f
        ; line_number = 42
        ;  packages dip=18, soic=18, ssop=20
        ; line_number = 43
        ;  pin ra2_in, ra2_out, ra2_unused
        ; line_number = 44
        ; pin_bindings dip=1, soic=1, ssop=1
        ; line_number = 45
        ;  bind_to _porta@2
        ; line_number = 46
        ;  or_if ra2_in _trisa 4
        ; line_number = 47
        ;  or_if ra2_out _trisa 0
        ; line_number = 48
        ;  or_if ra2_in _cmcon 7
        ; line_number = 49
        ;  or_if ra2_out _cmcon 7
        ; line_number = 50
        ; pin ra3_in, ra3_out, cmp1, ra3_unused
        ; line_number = 51
        ; pin_bindings dip=2, soic=2, ssop=2
        ; line_number = 52
        ;  bind_to _porta@3
        ; line_number = 53
        ;  or_if ra3_in _trisa 8
        ; line_number = 54
        ;  or_if ra3_out _trisa 0
        ; line_number = 55
        ;  or_if ra3_in _cmcon 7
        ; line_number = 56
        ;  or_if ra3_out _cmcon 7
        ; line_number = 57
        ; pin ra4_in, ra4_open_collector, tocki, cmp2, ra4_unused
        ; line_number = 58
        ; pin_bindings dip=3, soic=3, ssop=3
        ; line_number = 59
        ;  bind_to _porta@4
        ; line_number = 60
        ;  or_if ra4_in _trisa 16
        ; line_number = 61
        ;  or_if ra4_open_collector _trisa 0
        ; line_number = 62
        ; pin ra5_in, mclr, thv, ra5_unused
        ; line_number = 63
        ; pin_bindings dip=4, soic=4, ssop=4
        ; line_number = 64
        ;  bind_to _porta@5
        ; line_number = 65
        ;  or_if ra5_in _trisa 32
        ; line_number = 66
        ; pin vss, ground
        ; line_number = 67
        ; pin_bindings dip=5, soic=5, ssop=5
        ; line_number = 68
        ; pin vss2, ground2
        ; line_number = 69
        ; pin_bindings ssop=6
        ; line_number = 70
        ; pin rb0_in, rb0_out, int, rb0_unused
        ; line_number = 71
        ; pin_bindings dip=6, soic=6, ssop=7
        ; line_number = 72
        ;  bind_to _portb@0
        ; line_number = 73
        ;  or_if rb0_in _trisb 1
        ; line_number = 74
        ;  or_if rb0_out _trisb 0
        ; line_number = 75
        ;  or_if int _trisb 1
        ; line_number = 76
        ; pin rb1_in, rb1_out, rx, dt, rb1_unused
        ; line_number = 77
        ; pin_bindings dip=7, soic=7, ssop=8
        ; line_number = 78
        ;  bind_to _portb@1
        ; line_number = 79
        ;  or_if rb1_in _trisb 2
        ; line_number = 80
        ;  or_if rb1_out _trisb 0
        ; line_number = 81
        ;  or_if rx _trisb 2
        ; line_number = 82
        ; pin rb2_in, rb2_out, tx, ck, rb2_unused
        ; line_number = 83
        ; pin_bindings dip=8, soic=8, ssop=9
        ; line_number = 84
        ;  bind_to _portb@2
        ; line_number = 85
        ;  or_if rb2_in _trisb 4
        ; line_number = 86
        ;  or_if rb2_out _trisb 0
        ; line_number = 87
        ;  or_if tx _trisb 4
        ; line_number = 88
        ;  or_if ck _trisb 0
        ; line_number = 89
        ; pin rb3_in, rb3_out, ccp1, rb3unused
        ; line_number = 90
        ; pin_bindings dip=9, soic=9, ssop=10
        ; line_number = 91
        ;  bind_to _portb@3
        ; line_number = 92
        ;  or_if rb3_in _trisb 8
        ; line_number = 93
        ;  or_if rb3_out _trisb 0
        ; line_number = 94
        ;  or_if ccp1 _trisb 8
        ; line_number = 95
        ; pin rb4_in, rb4_out, pgm, rb4_unused
        ; line_number = 96
        ; pin_bindings dip=10, soic=10, ssop=11
        ; line_number = 97
        ;  bind_to _portb@4
        ; line_number = 98
        ;  or_if rb4_in _trisb 16
        ; line_number = 99
        ;  or_if rb4_out _trisb 0
        ; line_number = 100
        ;  or_if pgm _trisb 16
        ; line_number = 101
        ; pin rb5_in, rb5_out, rb5_unused
        ; line_number = 102
        ; pin_bindings dip=11, soic=11, ssop=12
        ; line_number = 103
        ;  bind_to _portb@5
        ; line_number = 104
        ;  or_if rb5_in _trisb 32
        ; line_number = 105
        ;  or_if rb5_out _trisb 0
        ; line_number = 106
        ; pin rb6_in, rb6_out, t1oso, t1cki, rb6_unused
        ; line_number = 107
        ; pin_bindings dip=12, soic=12, ssop=13
        ; line_number = 108
        ;  bind_to _portb@6
        ; line_number = 109
        ;  or_if rb6_in _trisb 64
        ; line_number = 110
        ;  or_if rb6_out _trisb 0
        ; line_number = 111
        ;  or_if t1oso _trisb 0
        ; line_number = 112
        ;  or_if t1cki _trisb 64
        ; line_number = 113
        ; pin rb7_in, rb7_out, t1osi, rb7_unused
        ; line_number = 114
        ; pin_bindings dip=13, soic=13, ssop=14
        ; line_number = 115
        ;  bind_to _portb@6
        ; line_number = 116
        ;  or_if rb7_in _trisb 128
        ; line_number = 117
        ;  or_if rb7_out _trisb 0
        ; line_number = 118
        ;  or_if t1osi _trisb 128
        ; line_number = 119
        ; pin vdd, power_supply
        ; line_number = 120
        ; pin_bindings dip=14, soic=14, ssop=15
        ; line_number = 121
        ; pin vdd2, power_spply2
        ; line_number = 122
        ; pin_bindings ssop=16
        ; line_number = 123
        ; pin ra6_in, ra6_out, osc2, clkout, ra6_unused
        ; line_number = 124
        ; pin_bindings dip=15, soic=15, ssop=17
        ; line_number = 125
        ;  bind_to _porta@6
        ; line_number = 126
        ;  or_if ra6_in _trisa 64
        ; line_number = 127
        ;  or_if ra6_out _trisa 0
        ; line_number = 128
        ;  or_if clkout _trisa 0
        ; line_number = 129
        ; pin ra7_in, ra7_out, osc1, clkin, ra7_unused
        ; line_number = 130
        ; pin_bindings dip=16, soic=16, ssop=18
        ; line_number = 131
        ;  bind_to _porta@7
        ; line_number = 132
        ;  or_if ra7_in _trisa 128
        ; line_number = 133
        ;  or_if ra7_out _trisa 0
        ; line_number = 134
        ;  or_if clkin _trisa 128
        ; line_number = 135
        ; pin ra0_in, ra0_out, ra0_unused
        ; line_number = 136
        ; pin_bindings dip=17, soic=17, ssop=19
        ; line_number = 137
        ;  bind_to _porta@0
        ; line_number = 138
        ;  or_if ra0_in _trisa 1
        ; line_number = 139
        ;  or_if ra0_in _cmcon 7
        ; line_number = 140
        ;  or_if ra0_out _cmcon 7
        ; line_number = 141
        ;  or_if ra0_out _trisa 0
        ; line_number = 142
        ; pin ra1_in, ra1_out, ra1_unused
        ; line_number = 143
        ; pin_bindings dip=18, soic=18, ssop=20
        ; line_number = 144
        ;  bind_to _porta@1
        ; line_number = 145
        ;  or_if ra1_in _trisa 2
        ; line_number = 146
        ;  or_if ra1_out _trisa 0
        ; line_number = 147
        ;  or_if ra1_in _cmcon 7
        ; line_number = 148
        ;  or_if ra1_out _cmcon 7



        ; line_number = 153
        ; library _standard entered

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

        ; # Standard definition for uCL:

        ; buffer = '_standard'
        ; line_number = 8
        ; constant _true = (1 = 1)
_true equ 1
        ; line_number = 9
        ; constant _false = (0 != 0)
_false equ 0


        ; buffer = '_pic16f628'
        ; line_number = 153
        ; library _standard exited

        ; # Data bank 0:

        ; line_number = 157
        ; register _indf = 
_indf equ 0

        ; line_number = 159
        ; register _tmr0 = 
_tmr0 equ 1

        ; line_number = 161
        ; register _pcl = 
_pcl equ 2

        ; line_number = 163
        ; register _status = 
_status equ 3
        ; line_number = 164
        ; bind _irp = _status@7
_irp___byte equ _status
_irp___bit equ 7
        ; line_number = 165
        ; bind _rp1 = _status@6
_rp1___byte equ _status
_rp1___bit equ 6
        ; line_number = 166
        ; bind _rp0 = _status@5
_rp0___byte equ _status
_rp0___bit equ 5
        ; line_number = 167
        ; bind _to = _status@4
_to___byte equ _status
_to___bit equ 4
        ; line_number = 168
        ; bind _pd = _status@3
_pd___byte equ _status
_pd___bit equ 3
        ; line_number = 169
        ; bind _z = _status@2
_z___byte equ _status
_z___bit equ 2
        ; line_number = 170
        ; bind _dc = _status@1
_dc___byte equ _status
_dc___bit equ 1
        ; line_number = 171
        ; bind _c = _status@0
_c___byte equ _status
_c___bit equ 0

        ; line_number = 173
        ; register _fsr = 
_fsr equ 4

        ; line_number = 175
        ; register _porta = 
_porta equ 5
        ; line_number = 176
        ; bind _ra7 = _porta@7
_ra7___byte equ _porta
_ra7___bit equ 7
        ; line_number = 177
        ; bind _ra6 = _porta@6
_ra6___byte equ _porta
_ra6___bit equ 6
        ; line_number = 178
        ; bind _ra5 = _porta@5
_ra5___byte equ _porta
_ra5___bit equ 5
        ; line_number = 179
        ; bind _ra4 = _porta@4
_ra4___byte equ _porta
_ra4___bit equ 4
        ; line_number = 180
        ; bind _ra3 = _porta@3
_ra3___byte equ _porta
_ra3___bit equ 3
        ; line_number = 181
        ; bind _ra2 = _porta@2
_ra2___byte equ _porta
_ra2___bit equ 2
        ; line_number = 182
        ; bind _ra1 = _porta@1
_ra1___byte equ _porta
_ra1___bit equ 1
        ; line_number = 183
        ; bind _ra0 = _porta@0
_ra0___byte equ _porta
_ra0___bit equ 0

        ; line_number = 185
        ; register _portb = 
_portb equ 6
        ; line_number = 186
        ; bind _rb7 = _portb@7
_rb7___byte equ _portb
_rb7___bit equ 7
        ; line_number = 187
        ; bind _rb6 = _portb@6
_rb6___byte equ _portb
_rb6___bit equ 6
        ; line_number = 188
        ; bind _rb5 = _portb@5
_rb5___byte equ _portb
_rb5___bit equ 5
        ; line_number = 189
        ; bind _rb4 = _portb@4
_rb4___byte equ _portb
_rb4___bit equ 4
        ; line_number = 190
        ; bind _rb3 = _portb@3
_rb3___byte equ _portb
_rb3___bit equ 3
        ; line_number = 191
        ; bind _rb2 = _portb@2
_rb2___byte equ _portb
_rb2___bit equ 2
        ; line_number = 192
        ; bind _rb1 = _portb@1
_rb1___byte equ _portb
_rb1___bit equ 1
        ; line_number = 193
        ; bind _rb0 = _portb@0
_rb0___byte equ _portb
_rb0___bit equ 0

        ; line_number = 195
        ; register _pclath = 
_pclath equ 10

        ; line_number = 197
        ; register _intcon = 
_intcon equ 11
        ; line_number = 198
        ; bind _gie = _intcon@7
_gie___byte equ _intcon
_gie___bit equ 7
        ; line_number = 199
        ; bind _peie = _intcon@6
_peie___byte equ _intcon
_peie___bit equ 6
        ; line_number = 200
        ; bind _t0ie = _intcon@5
_t0ie___byte equ _intcon
_t0ie___bit equ 5
        ; line_number = 201
        ; bind _inte = _intcon@4
_inte___byte equ _intcon
_inte___bit equ 4
        ; line_number = 202
        ; bind _rbie = _intcon@3
_rbie___byte equ _intcon
_rbie___bit equ 3
        ; line_number = 203
        ; bind _t0if = _intcon@2
_t0if___byte equ _intcon
_t0if___bit equ 2
        ; line_number = 204
        ; bind _intf = _intcon@1
_intf___byte equ _intcon
_intf___bit equ 1
        ; line_number = 205
        ; bind _rbif = _intcon@0
_rbif___byte equ _intcon
_rbif___bit equ 0

        ; line_number = 207
        ; register _pir1 = 
_pir1 equ 12
        ; line_number = 208
        ; bind _eeif = _pir1@7
_eeif___byte equ _pir1
_eeif___bit equ 7
        ; line_number = 209
        ; bind _cmif = _pir1@6
_cmif___byte equ _pir1
_cmif___bit equ 6
        ; line_number = 210
        ; bind _rcif = _pir1@5
_rcif___byte equ _pir1
_rcif___bit equ 5
        ; line_number = 211
        ; bind _txif = _pir1@4
_txif___byte equ _pir1
_txif___bit equ 4
        ; line_number = 212
        ; bind _ccp1if = _pir1@2
_ccp1if___byte equ _pir1
_ccp1if___bit equ 2
        ; line_number = 213
        ; bind _tmr2if = _pir1@1
_tmr2if___byte equ _pir1
_tmr2if___bit equ 1
        ; line_number = 214
        ; bind _tmr1if = _pir1@0
_tmr1if___byte equ _pir1
_tmr1if___bit equ 0

        ; line_number = 216
        ; register _tmr1l = 
_tmr1l equ 14

        ; line_number = 218
        ; register _tmr1h = 
_tmr1h equ 15

        ; line_number = 220
        ; register _t1con = 
_t1con equ 16
        ; line_number = 221
        ; bind _t1ckps1 = _t1con@5
_t1ckps1___byte equ _t1con
_t1ckps1___bit equ 5
        ; line_number = 222
        ; bind _t1ckps0 = _t1con@4
_t1ckps0___byte equ _t1con
_t1ckps0___bit equ 4
        ; line_number = 223
        ; bind _t1oscen = _t1con@3
_t1oscen___byte equ _t1con
_t1oscen___bit equ 3
        ; line_number = 224
        ; bind _t1sync = _t1con@2
_t1sync___byte equ _t1con
_t1sync___bit equ 2
        ; line_number = 225
        ; bind _tmr1cs = _t1con@1
_tmr1cs___byte equ _t1con
_tmr1cs___bit equ 1
        ; line_number = 226
        ; bind _tmr1on = _t1con@0
_tmr1on___byte equ _t1con
_tmr1on___bit equ 0

        ; line_number = 228
        ; register _tmr2 = 
_tmr2 equ 17

        ; line_number = 230
        ; register _t2con = 
_t2con equ 18
        ; line_number = 231
        ; bind _toutps3 = _t2con@6
_toutps3___byte equ _t2con
_toutps3___bit equ 6
        ; line_number = 232
        ; bind _toutps2 = _t2con@5
_toutps2___byte equ _t2con
_toutps2___bit equ 5
        ; line_number = 233
        ; bind _toutps1 = _t2con@4
_toutps1___byte equ _t2con
_toutps1___bit equ 4
        ; line_number = 234
        ; bind _toutps0 = _t2con@3
_toutps0___byte equ _t2con
_toutps0___bit equ 3
        ; line_number = 235
        ; bind _trm2on = _t2con@2
_trm2on___byte equ _t2con
_trm2on___bit equ 2
        ; line_number = 236
        ; bind _t2ckps1 = _t2con@1
_t2ckps1___byte equ _t2con
_t2ckps1___bit equ 1
        ; line_number = 237
        ; bind _t2ckps0 = _t2con@0
_t2ckps0___byte equ _t2con
_t2ckps0___bit equ 0

        ; line_number = 239
        ; register _ccpr1l = 
_ccpr1l equ 21

        ; line_number = 241
        ; register _ccpr1h = 
_ccpr1h equ 22

        ; line_number = 243
        ; register _ccp1con = 
_ccp1con equ 23
        ; line_number = 244
        ; bind _ccp1x = _ccp1con@5
_ccp1x___byte equ _ccp1con
_ccp1x___bit equ 5
        ; line_number = 245
        ; bind _ccp1y = _ccp1con@4
_ccp1y___byte equ _ccp1con
_ccp1y___bit equ 4
        ; line_number = 246
        ; bind _ccp1m3 = _ccp1con@3
_ccp1m3___byte equ _ccp1con
_ccp1m3___bit equ 3
        ; line_number = 247
        ; bind _ccp1m2 = _ccp1con@2
_ccp1m2___byte equ _ccp1con
_ccp1m2___bit equ 2
        ; line_number = 248
        ; bind _ccp1m1 = _ccp1con@1
_ccp1m1___byte equ _ccp1con
_ccp1m1___bit equ 1
        ; line_number = 249
        ; bind _ccp1m0 = _ccp1con@0
_ccp1m0___byte equ _ccp1con
_ccp1m0___bit equ 0

        ; line_number = 251
        ; register _rcsta = 
_rcsta equ 24
        ; line_number = 252
        ; bind _spen = _rcsta@7
_spen___byte equ _rcsta
_spen___bit equ 7
        ; line_number = 253
        ; bind _rx9 = _rcsta@6
_rx9___byte equ _rcsta
_rx9___bit equ 6
        ; line_number = 254
        ; bind _sren = _rcsta@5
_sren___byte equ _rcsta
_sren___bit equ 5
        ; line_number = 255
        ; bind _cren = _rcsta@4
_cren___byte equ _rcsta
_cren___bit equ 4
        ; line_number = 256
        ; bind _aden = _rcsta@3
_aden___byte equ _rcsta
_aden___bit equ 3
        ; # Some other modules use _adden instead of _aden:
        ; line_number = 258
        ; bind _adden = _rcsta@3
_adden___byte equ _rcsta
_adden___bit equ 3
        ; line_number = 259
        ; bind _ferr = _rcsta@2
_ferr___byte equ _rcsta
_ferr___bit equ 2
        ; line_number = 260
        ; bind _oerr = _rcsta@1
_oerr___byte equ _rcsta
_oerr___bit equ 1
        ; line_number = 261
        ; bind _rx9d = _rcsta@0
_rx9d___byte equ _rcsta
_rx9d___bit equ 0

        ; line_number = 263
        ; register _txreg = 
_txreg equ 25

        ; line_number = 265
        ; register _rcreg = 
_rcreg equ 26

        ; line_number = 267
        ; register _cmcon = 
_cmcon equ 31
        ; line_number = 268
        ; bind _c2out = _cmcon@7
_c2out___byte equ _cmcon
_c2out___bit equ 7
        ; line_number = 269
        ; bind _c1out = _cmcon@6
_c1out___byte equ _cmcon
_c1out___bit equ 6
        ; line_number = 270
        ; bind _c2inv = _cmcon@5
_c2inv___byte equ _cmcon
_c2inv___bit equ 5
        ; line_number = 271
        ; bind _c1inv = _cmcon@4
_c1inv___byte equ _cmcon
_c1inv___bit equ 4
        ; line_number = 272
        ; bind _cis = _cmcon@3
_cis___byte equ _cmcon
_cis___bit equ 3
        ; line_number = 273
        ; bind _cm2 = _cmcon@2
_cm2___byte equ _cmcon
_cm2___bit equ 2
        ; line_number = 274
        ; bind _cm1 = _cmcon@1
_cm1___byte equ _cmcon
_cm1___bit equ 1
        ; line_number = 275
        ; bind _cm0 = _cmcon@0
_cm0___byte equ _cmcon
_cm0___bit equ 0

        ; # Data bank 1:

        ; line_number = 279
        ; register _option = 
_option equ 129
        ; line_number = 280
        ; bind _rbpu = _option@7
_rbpu___byte equ _option
_rbpu___bit equ 7
        ; line_number = 281
        ; bind _intedg = _option@6
_intedg___byte equ _option
_intedg___bit equ 6
        ; line_number = 282
        ; bind _t0cs = _option@5
_t0cs___byte equ _option
_t0cs___bit equ 5
        ; line_number = 283
        ; bind _t0se = _option@4
_t0se___byte equ _option
_t0se___bit equ 4
        ; line_number = 284
        ; bind _psa = _option@3
_psa___byte equ _option
_psa___bit equ 3
        ; line_number = 285
        ; bind _ps2 = _option@2
_ps2___byte equ _option
_ps2___bit equ 2
        ; line_number = 286
        ; bind _ps1 = _option@1
_ps1___byte equ _option
_ps1___bit equ 1
        ; line_number = 287
        ; bind _ps0 = _option@0
_ps0___byte equ _option
_ps0___bit equ 0

        ; line_number = 289
        ; register _trisa = 
_trisa equ 133
        ; line_number = 290
        ; bind _trisa7 = _trisa@7
_trisa7___byte equ _trisa
_trisa7___bit equ 7
        ; line_number = 291
        ; bind _trisa6 = _trisa@6
_trisa6___byte equ _trisa
_trisa6___bit equ 6
        ; # No _trisa5:
        ; line_number = 293
        ; bind _trisa4 = _trisa@4
_trisa4___byte equ _trisa
_trisa4___bit equ 4
        ; line_number = 294
        ; bind _trisa3 = _trisa@3
_trisa3___byte equ _trisa
_trisa3___bit equ 3
        ; line_number = 295
        ; bind _trisa2 = _trisa@2
_trisa2___byte equ _trisa
_trisa2___bit equ 2
        ; line_number = 296
        ; bind _trisa1 = _trisa@1
_trisa1___byte equ _trisa
_trisa1___bit equ 1
        ; line_number = 297
        ; bind _trisa0 = _trisa@0
_trisa0___byte equ _trisa
_trisa0___bit equ 0

        ; line_number = 299
        ; register _trisb = 
_trisb equ 134
        ; line_number = 300
        ; bind _trisb7 = _trisb@7
_trisb7___byte equ _trisb
_trisb7___bit equ 7
        ; line_number = 301
        ; bind _trisb6 = _trisb@6
_trisb6___byte equ _trisb
_trisb6___bit equ 6
        ; line_number = 302
        ; bind _trisb5 = _trisb@5
_trisb5___byte equ _trisb
_trisb5___bit equ 5
        ; line_number = 303
        ; bind _trisb4 = _trisb@4
_trisb4___byte equ _trisb
_trisb4___bit equ 4
        ; line_number = 304
        ; bind _trisb3 = _trisb@3
_trisb3___byte equ _trisb
_trisb3___bit equ 3
        ; line_number = 305
        ; bind _trisb2 = _trisb@2
_trisb2___byte equ _trisb
_trisb2___bit equ 2
        ; line_number = 306
        ; bind _trisb1 = _trisb@1
_trisb1___byte equ _trisb
_trisb1___bit equ 1
        ; line_number = 307
        ; bind _trisb0 = _trisb@0
_trisb0___byte equ _trisb
_trisb0___bit equ 0

        ; line_number = 309
        ; register _pie1 = 
_pie1 equ 140
        ; line_number = 310
        ; bind _eeie7 = _pie1@7
_eeie7___byte equ _pie1
_eeie7___bit equ 7
        ; line_number = 311
        ; bind _cmie = _pie1@6
_cmie___byte equ _pie1
_cmie___bit equ 6
        ; line_number = 312
        ; bind _rcie = _pie1@5
_rcie___byte equ _pie1
_rcie___bit equ 5
        ; line_number = 313
        ; bind _txie = _pie1@4
_txie___byte equ _pie1
_txie___bit equ 4
        ; line_number = 314
        ; bind _ccp1ie = _pie1@2
_ccp1ie___byte equ _pie1
_ccp1ie___bit equ 2
        ; line_number = 315
        ; bind _tmr2ie = _pie1@1
_tmr2ie___byte equ _pie1
_tmr2ie___bit equ 1
        ; line_number = 316
        ; bind _tmr1ie = _pie1@0
_tmr1ie___byte equ _pie1
_tmr1ie___bit equ 0

        ; line_number = 318
        ; register _pcon = 
_pcon equ 142
        ; line_number = 319
        ; bind _oscf = _pcon@3
_oscf___byte equ _pcon
_oscf___bit equ 3
        ; line_number = 320
        ; bind _por = _pcon@1
_por___byte equ _pcon
_por___bit equ 1
        ; line_number = 321
        ; bind _bod = _pcon@0
_bod___byte equ _pcon
_bod___bit equ 0

        ; line_number = 323
        ; register _pr2 = 
_pr2 equ 146

        ; line_number = 325
        ; register _txsta = 
_txsta equ 152
        ; line_number = 326
        ; bind _csrc = _txsta@7
_csrc___byte equ _txsta
_csrc___bit equ 7
        ; line_number = 327
        ; bind _tx9 = _txsta@6
_tx9___byte equ _txsta
_tx9___bit equ 6
        ; line_number = 328
        ; bind _txen = _txsta@5
_txen___byte equ _txsta
_txen___bit equ 5
        ; line_number = 329
        ; bind _sync = _txsta@4
_sync___byte equ _txsta
_sync___bit equ 4
        ; line_number = 330
        ; bind _brgh = _txsta@2
_brgh___byte equ _txsta
_brgh___bit equ 2
        ; line_number = 331
        ; bind _trmt = _txsta@1
_trmt___byte equ _txsta
_trmt___bit equ 1
        ; line_number = 332
        ; bind _tx9d = _txsta@0
_tx9d___byte equ _txsta
_tx9d___bit equ 0

        ; line_number = 334
        ; register _spbrg = 
_spbrg equ 153

        ; line_number = 336
        ; register _eedat = 
_eedat equ 154

        ; line_number = 338
        ; register _eeadr = 
_eeadr equ 155

        ; line_number = 340
        ; register _eecon1 = 
_eecon1 equ 156
        ; line_number = 341
        ; bind _wrerr = _eecon1@3
_wrerr___byte equ _eecon1
_wrerr___bit equ 3
        ; line_number = 342
        ; bind _wren = _eecon1@2
_wren___byte equ _eecon1
_wren___bit equ 2
        ; line_number = 343
        ; bind _wr = _eecon1@1
_wr___byte equ _eecon1
_wr___bit equ 1
        ; line_number = 344
        ; bind _rd = _eecon1@0
_rd___byte equ _eecon1
_rd___bit equ 0

        ; line_number = 346
        ; register _eecon2 = 
_eecon2 equ 157

        ; line_number = 348
        ; register _vrcon = 
_vrcon equ 159
        ; line_number = 349
        ; bind _vren = _vrcon@7
_vren___byte equ _vrcon
_vren___bit equ 7
        ; line_number = 350
        ; bind _vroe = _vrcon@6
_vroe___byte equ _vrcon
_vroe___bit equ 6
        ; line_number = 351
        ; bind _vrr = _vrcon@5
_vrr___byte equ _vrcon
_vrr___bit equ 5
        ; line_number = 352
        ; bind _vr3 = _vrcon@3
_vr3___byte equ _vrcon
_vr3___bit equ 3
        ; line_number = 353
        ; bind _vr2 = _vrcon@2
_vr2___byte equ _vrcon
_vr2___bit equ 2
        ; line_number = 354
        ; bind _vr1 = _vrcon@1
_vr1___byte equ _vrcon
_vr1___bit equ 1
        ; line_number = 355
        ; bind _vr0 = _vrcon@0
_vr0___byte equ _vrcon
_vr0___bit equ 0



        ; buffer = '_pic16f628a'
        ; line_number = 6
        ; library _pic16f628 exited


        ; buffer = 'lcd32'
        ; line_number = 17
        ; library _pic16f628a exited

        ; # The system is running at 16MHz:
        ; line_number = 20
        ; library clock16mhz entered
        ; # Copyright (c) 2006 by Wayne C. Gramlich
        ; # All rights reserved.

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

        ; # Define processor constants:
        ; buffer = 'clock16mhz'
        ; line_number = 9
        ; constant clock_rate = 16000000
clock_rate equ 16000000
        ; 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 4000000


        ; buffer = 'lcd32'
        ; line_number = 20
        ; library clock16mhz exited
        ; # A microsecond takes 4 cycles at 16MHz:
        ; line_number = 22
        ; constant microsecond = 4
microsecond equ 4

        ; # The library of bus access routines for use by the PIC16F628.
        ; line_number = 25
        ; library rb2bus_pic16f628 entered

        ; # Copyright (c) 2006-2007 by Wayne C. Gramlich
        ; # All rights reserved.

        ; # This module provides some procedures for accessing a RoboBricks2
        ; # bus via a UART.  It is speicialized for the PIC16F688.
        ; #
        ; # It defines the following procedure:
        ; #
        ; # {rb2bus_initialize}({address}) The procedure that initializes the UART
        ; #                                for bus access.

        ; # All other bus access procedures are defined in the {rb2bus} library
        ; # which is accessed below:
        ; buffer = 'rb2bus_pic16f628'
        ; line_number = 16
        ; library rb2bus entered

        ; # Copyright (c) 2006-2007 by Wayne C. Gramlich
        ; # All rights reserved.

        ; # This module provides some procedures for accessing a RoboBricks2
        ; # bus via a UART.
        ; #
        ; # This procedure defines the following procedures:
        ; #
        ; # {rb2bus_select_wait}  This procedure waits for the module to become selected
        ; # {rb2bus_deselect}     This procedure causes this module to be deselected.
        ; # {rb2bus_byte_get}     This procedure will get a byte form the bus.
        ; # {rb2bus_byte_put}     This procedure will send a byte to the bus.
        ; #
        ; # The global variable {rb2bus_error} is set to 1 whenever the procedures
        ; # feel like there is a command decoding error.
        ; #
        ; # The way to use these procedures is quite as follows:
        ; #
        ; #    # Comamnd byte variable:
        ; #    local command byte
        ; #
        ; #    # Other initialize code goes here:
        ; #
        ; #    # Process commands from bus master:
        ; #    loop_forever
        ; #        rb2bus_error := _true
        ; #	 while rb2bus_error
        ; #	     call rb2bus_select_wait()
        ; #	     command := rb2bus_byte_get()
        ; #
        ; #        # Decode command:
        ; #	 switch command >> 6
        ; #	   ...
        ; #             case 5:
        ; #	        # 0000 0101 (Foo command):
        ; #	          if !rb2bus_error
        ; #		      # Do foo command:
        ; #
        ; # The key concept behind these procedures is to make command
        ; # decoding for the slave module easy.  If the slave module
        ; # is in the middle of command decoding and the master suddenly
        ; # sends out a module select command, we need to gracefully recover
        ; # from the problem.  A command should only be executed if
        ; # {rb2bus_error} is not set.  If {rb2bus_error} is set, we want
        ; # to gracefully get back to the beginning of the loop without
        ; # doing any damage.  Once {rb2bus_error} is set, all calls to
        ; # {rb2bus_byte_get} return 0 and all calls to {rb2bus_byte_put}
        ; # do nothing.  At the beginning of the loop, {rb2bus_error} is
        ; # cleared by the {rb2bus_select_wait}() procedure and we have
        ; # recovered from the situation.

        ; buffer = 'rb2bus'
        ; line_number = 54
        ; library rb2_constants entered

        ; # Copyright (c) 2006-2007 by Wayne C. Gramlich.
        ; # All rights reserved.

        ; buffer = 'rb2_constants'
        ; line_number = 6
        ; constant rb2_ok = 0xa5
rb2_ok equ 165

        ; line_number = 8
        ; constant rb2_common_address_set = 0xfc
rb2_common_address_set equ 252
        ; line_number = 9
        ; constant rb2_common_id_next = 0xfd
rb2_common_id_next equ 253
        ; line_number = 10
        ; constant rb2_common_id_start = 0xfe
rb2_common_id_start equ 254
        ; line_number = 11
        ; constant rb2_common_deselect = 0xff
rb2_common_deselect equ 255

        ; line_number = 13
        ; constant rb2_laser1_address = 1
rb2_laser1_address equ 1
        ; line_number = 14
        ; constant rb2_laser1_sense_read = 0
rb2_laser1_sense_read equ 0
        ; line_number = 15
        ; constant rb2_laser1_enable_read = 1
rb2_laser1_enable_read equ 1
        ; line_number = 16
        ; constant rb2_laser1_enable_clear = 2
rb2_laser1_enable_clear equ 2
        ; line_number = 17
        ; constant rb2_laser1_enable_set = 3
rb2_laser1_enable_set equ 3

        ; line_number = 19
        ; constant rb2_minimotor2_address = 2
rb2_minimotor2_address equ 2
        ; line_number = 20
        ; constant rb2_midimotor2_address = 3
rb2_midimotor2_address equ 3
        ; line_number = 21
        ; constant rb2_motor0_speed_get = 0
rb2_motor0_speed_get equ 0
        ; line_number = 22
        ; constant rb2_motor0_speed_set = 1
rb2_motor0_speed_set equ 1
        ; line_number = 23
        ; constant rb2_motor1_speed_get = 2
rb2_motor1_speed_get equ 2
        ; line_number = 24
        ; constant rb2_motor1_speed_set = 3
rb2_motor1_speed_set equ 3
        ; line_number = 25
        ; constant rb2_duty_cycle_get = 4
rb2_duty_cycle_get equ 4
        ; line_number = 26
        ; constant rb2_duty_cycle_set = 8
rb2_duty_cycle_set equ 8

        ; line_number = 28
        ; constant rb2_irdistance2_address = 4
rb2_irdistance2_address equ 4
        ; line_number = 29
        ; constant rb2_irdistance2_raw0_get = 0
rb2_irdistance2_raw0_get equ 0
        ; line_number = 30
        ; constant rb2_irdistance2_raw1_get = 1
rb2_irdistance2_raw1_get equ 1
        ; line_number = 31
        ; constant rb2_irdistance2_smooth0_get = 2
rb2_irdistance2_smooth0_get equ 2
        ; line_number = 32
        ; constant rb2_irdistance2_smooth1_get = 3
rb2_irdistance2_smooth1_get equ 3
        ; line_number = 33
        ; constant rb2_irdistance2_linear0_get = 4
rb2_irdistance2_linear0_get equ 4
        ; line_number = 34
        ; constant rb2_irdistance2_linear1_get = 6
rb2_irdistance2_linear1_get equ 6

        ; line_number = 36
        ; constant rb2_shaft2_address = 5
rb2_shaft2_address equ 5
        ; line_number = 37
        ; constant rb2_shaft2_count_latch = 0
rb2_shaft2_count_latch equ 0
        ; line_number = 38
        ; constant rb2_shaft2_count_clear = 1
rb2_shaft2_count_clear equ 1
        ; line_number = 39
        ; constant rb2_shaft2_shaft0_high_get = 2
rb2_shaft2_shaft0_high_get equ 2
        ; line_number = 40
        ; constant rb2_shaft2_shaft1_high_get = 3
rb2_shaft2_shaft1_high_get equ 3
        ; line_number = 41
        ; constant rb2_shaft2_continue_get = 4
rb2_shaft2_continue_get equ 4
        ; line_number = 42
        ; constant rb2_shaft2_shaft0_low_get = rb2_shaft2_continue_get
rb2_shaft2_shaft0_low_get equ 4
        ; line_number = 43
        ; constant rb2_shaft2_shaft1_low_get = rb2_shaft2_continue_get
rb2_shaft2_shaft1_low_get equ 4
        ; line_number = 44
        ; constant rb2_shaft2_x_get = 0x10
rb2_shaft2_x_get equ 16
        ; line_number = 45
        ; constant rb2_shaft2_y_get = 0x11
rb2_shaft2_y_get equ 17
        ; line_number = 46
        ; constant rb2_shaft2_bearing16_get = 0x12
rb2_shaft2_bearing16_get equ 18
        ; line_number = 47
        ; constant rb2_shaft2_bearing8_get = 0x13
rb2_shaft2_bearing8_get equ 19
        ; line_number = 48
        ; constant rb2_shaft2_target_x_get = 0x14
rb2_shaft2_target_x_get equ 20
        ; line_number = 49
        ; constant rb2_shaft2_target_y_get = 0x15
rb2_shaft2_target_y_get equ 21
        ; line_number = 50
        ; constant rb2_shaft2_target_bearing16_get = 0x16
rb2_shaft2_target_bearing16_get equ 22
        ; line_number = 51
        ; constant rb2_shaft2_target_bearing8_get = 0x17
rb2_shaft2_target_bearing8_get equ 23
        ; line_number = 52
        ; constant rb2_shaft2_target_distance_get = 0x18
rb2_shaft2_target_distance_get equ 24
        ; line_number = 53
        ; constant rb2_shaft2_wheel_spacing_get = 0x19
rb2_shaft2_wheel_spacing_get equ 25
        ; line_number = 54
        ; constant rb2_shaft2_wheel_ticks_get = 0x1a
rb2_shaft2_wheel_ticks_get equ 26
        ; line_number = 55
        ; constant rb2_shaft2_wheel_diameter_get = 0x1b
rb2_shaft2_wheel_diameter_get equ 27
        ; line_number = 56
        ; constant rb2_shaft2_count_iteration_get = 0x1c
rb2_shaft2_count_iteration_get equ 28
        ; line_number = 57
        ; constant rb2_shaft2_counter_signs_get = 0x1d
rb2_shaft2_counter_signs_get equ 29
        ; line_number = 58
        ; constant rb2_shaft2_x_set = 0x20
rb2_shaft2_x_set equ 32
        ; line_number = 59
        ; constant rb2_shaft2_y_set = 0x21
rb2_shaft2_y_set equ 33
        ; line_number = 60
        ; constant rb2_shaft2_bearing16_set = 0x22
rb2_shaft2_bearing16_set equ 34
        ; line_number = 61
        ; constant rb2_shaft2_navigation_latch = 0x23
rb2_shaft2_navigation_latch equ 35
        ; line_number = 62
        ; constant rb2_shaft2_target_x_set = 0x24
rb2_shaft2_target_x_set equ 36
        ; line_number = 63
        ; constant rb2_shaft2_target_y_set = 0x25
rb2_shaft2_target_y_set equ 37
        ; line_number = 64
        ; constant rb2_shaft2_wheel_spacing_set = 0x29
rb2_shaft2_wheel_spacing_set equ 41
        ; line_number = 65
        ; constant rb2_shaft2_wheel_ticks_set = 0x2a
rb2_shaft2_wheel_ticks_set equ 42
        ; line_number = 66
        ; constant rb2_shaft2_wheel_diameter_set = 0x2b
rb2_shaft2_wheel_diameter_set equ 43
        ; line_number = 67
        ; constant rb2_shaft2_counter_signs_set = 0x2c
rb2_shaft2_counter_signs_set equ 44

        ; line_number = 69
        ; constant rb2_orient5_address = 6
rb2_orient5_address equ 6

        ; line_number = 71
        ; constant rb2_compass8_address = 7
rb2_compass8_address equ 7

        ; line_number = 73
        ; constant rb2_io8_address = 8
rb2_io8_address equ 8
        ; line_number = 74
        ; constant rb2_io8_digital8_get = 0
rb2_io8_digital8_get equ 0
        ; line_number = 75
        ; constant rb2_io8_digital8_set = 1
rb2_io8_digital8_set equ 1
        ; line_number = 76
        ; constant rb2_io8_direction_get = 2
rb2_io8_direction_get equ 2
        ; line_number = 77
        ; constant rb2_io8_direction_set = 3
rb2_io8_direction_set equ 3
        ; line_number = 78
        ; constant rb2_io8_analog_mask_get = 4
rb2_io8_analog_mask_get equ 4
        ; line_number = 79
        ; constant rb2_io8_analog_mask_set = 5
rb2_io8_analog_mask_set equ 5
        ; line_number = 80
        ; constant rb2_io8_analog8_get = 0x10
rb2_io8_analog8_get equ 16
        ; line_number = 81
        ; constant rb2_io8_analog10_get = 0x18
rb2_io8_analog10_get equ 24
        ; line_number = 82
        ; constant rb2_low_set = 0x20
rb2_low_set equ 32
        ; line_number = 83
        ; constant rb2_high_set = 0x30
rb2_high_set equ 48

        ; line_number = 85
        ; constant rb2_sonar2_address = 9
rb2_sonar2_address equ 9

        ; line_number = 87
        ; constant rb2_voice1_address = 10
rb2_voice1_address equ 10

        ; line_number = 89
        ; constant rb2_servo4_address = 11
rb2_servo4_address equ 11
        ; line_number = 90
        ; constant rb2_servo4_servo0 = 0
rb2_servo4_servo0 equ 0
        ; line_number = 91
        ; constant rb2_servo4_servo1 = 1
rb2_servo4_servo1 equ 1
        ; line_number = 92
        ; constant rb2_servo4_servo2 = 2
rb2_servo4_servo2 equ 2
        ; line_number = 93
        ; constant rb2_servo4_servo3 = 3
rb2_servo4_servo3 equ 3
        ; line_number = 94
        ; constant rb2_servo4_quick_set = 0
rb2_servo4_quick_set equ 0
        ; line_number = 95
        ; constant rb2_servo4_quick_low = 0
rb2_servo4_quick_low equ 0
        ; line_number = 96
        ; constant rb2_servo4_quick_center = 40
rb2_servo4_quick_center equ 40
        ; line_number = 97
        ; constant rb2_servo4_quick_high = 0x7c
rb2_servo4_quick_high equ 124
        ; line_number = 98
        ; constant rb2_servo4_high_low_set = 0x80
rb2_servo4_high_low_set equ 128
        ; line_number = 99
        ; constant rb2_servo4_short_high_low_set = 0x84
rb2_servo4_short_high_low_set equ 132
        ; line_number = 100
        ; constant rb2_servo4_high_set = 0x88
rb2_servo4_high_set equ 136
        ; line_number = 101
        ; constant rb2_servo4_low_set = 0x8c
rb2_servo4_low_set equ 140
        ; line_number = 102
        ; constant rb2_servo4_enables_set = 0x90
rb2_servo4_enables_set equ 144
        ; line_number = 103
        ; constant rb2_servo4_enable0 = 1
rb2_servo4_enable0 equ 1
        ; line_number = 104
        ; constant rb2_servo4_enable1 = 2
rb2_servo4_enable1 equ 2
        ; line_number = 105
        ; constant rb2_servo4_enable2 = 4
rb2_servo4_enable2 equ 4
        ; line_number = 106
        ; constant rb2_servo4_enable3 = 8
rb2_servo4_enable3 equ 8
        ; line_number = 107
        ; constant rb2_servo4_enable_all = 0xf
rb2_servo4_enable_all equ 15
        ; line_number = 108
        ; constant rb2_servo4_enable_none = 0
rb2_servo4_enable_none equ 0
        ; line_number = 109
        ; constant rb2_servo4_high_get = 0xa0
rb2_servo4_high_get equ 160
        ; line_number = 110
        ; constant rb2_servo4_low_get = 0xa4
rb2_servo4_low_get equ 164
        ; line_number = 111
        ; constant rb2_servo4_enables_get = 0xa8
rb2_servo4_enables_get equ 168

        ; line_number = 113
        ; constant rb2_controller28_address = 28
rb2_controller28_address equ 28

        ; line_number = 115
        ; constant rb2_lcd32_address = 32
rb2_lcd32_address equ 32
        ; line_number = 116
        ; constant rb2_lcd32_row_set = 4
rb2_lcd32_row_set equ 4
        ; line_number = 117
        ; constant rb2_lcd32_row0_set = rb2_lcd32_row_set | 0
rb2_lcd32_row0_set equ 4
        ; line_number = 118
        ; constant rb2_lcd32_row1_set = rb2_lcd32_row_set | 1
rb2_lcd32_row1_set equ 5
        ; line_number = 119
        ; constant rb2_lcd32_row2_set = rb2_lcd32_row_set | 2
rb2_lcd32_row2_set equ 6
        ; line_number = 120
        ; constant rb2_lcd32_row3_set = rb2_lcd32_row_set | 3
rb2_lcd32_row3_set equ 7
        ; line_number = 121
        ; constant rb2_lcd32_new_line = 0xa
rb2_lcd32_new_line equ 10
        ; line_number = 122
        ; constant rb2_lcd32_form_feed = 0xc
rb2_lcd32_form_feed equ 12
        ; line_number = 123
        ; constant rb2_lcd32_carriage_return = 0xd
rb2_lcd32_carriage_return equ 13
        ; line_number = 124
        ; constant rb2_lcd32_column_set = 0x10
rb2_lcd32_column_set equ 16


        ; buffer = 'rb2bus'
        ; line_number = 54
        ; library rb2_constants exited
        ; line_number = 55
        ; library rb2bus_globals entered

        ; # Copyright (c) 2006-2007 by Wayne C. Gramlich
        ; # All rights reserved.

        ; # These are the global variables used by both the {rb2bus} and
        ; # the various {rb2bus_picXXXX} libraries.  Poll based firmware
        ; # uses both libraries, whereas interrupt driven software only
        ; # uses the {rb2bus_picXXX} libraries.

        ; buffer = 'rb2bus_globals'
        ; line_number = 11
        ; global rb2bus_selected bit	# 
rb2bus_selected___byte equ globals___0+79
rb2bus_selected___bit equ 0
        ; line_number = 12
        ; global rb2bus_error bit		# Global error bit
rb2bus_error___byte equ globals___0+79
rb2bus_error___bit equ 1
        ; line_number = 13
        ; global rb2bus_address byte	# Bus address to respond to
rb2bus_address equ globals___0
        ; line_number = 14
        ; global rb2bus_index byte	# Index into id information
rb2bus_index equ globals___0+1


        ; buffer = 'rb2bus'
        ; line_number = 55
        ; library rb2bus_globals exited

        ; Delaying code generation for procedure  rb2bus_select_wait
        ; Delaying code generation for procedure  rb2bus_deselect
        ; Delaying code generation for procedure  rb2bus_byte_get
        ; Delaying code generation for procedure  rb2bus_byte_put
        ; Delaying code generation for procedure  rb2bus_command

        ; buffer = 'rb2bus_pic16f628'
        ; line_number = 16
        ; library rb2bus exited

        ; # Baud_Rate = Fosc / (16(X+1))
        ; # 16 * (X+1) = Fosc/Baud_Rate
        ; # X+1 = Fosc/(16*Baud_Rate)
        ; # X = Fosc/(16*Baud_rate) - 1

        ; line_number = 23
        ; constant baud_rate_500k = 500000
baud_rate_500k equ 500000
        ; line_number = 24
        ; constant spbrg_500k = clock_rate / (16 * baud_rate_500k) - 1
spbrg_500k equ 1

        ; Delaying code generation for procedure  rb2bus_initialize
        ; # The PIC16F628 only has 128 bytes of EEPROM:
        ; line_number = 69
        ; constant rb2bus_eedata_address = 0x7e
rb2bus_eedata_address equ 126

        ; Delaying code generation for procedure  rb2bus_eedata_read
        ; Delaying code generation for procedure  rb2bus_eedata_write

        ; buffer = 'lcd32'
        ; line_number = 25
        ; library rb2bus_pic16f628 exited

        ; # This module uses a 16MHz ceramic resonator; hence fosc = hs:

        ; # Port stuff:

        ; line_number = 32
        ; constant trisb_mask = 0x30
trisb_mask equ 48
        ; line_number = 33
        ; constant db47_mask = 0xf
db47_mask equ 15

        ; line_number = 35
        ; package dip
        ; line_number = 36
        ; pin 1 = ra2_out, name = db2
db2___byte equ _porta
db2___bit equ 2
        ; line_number = 37
        ;  pin 2 = ra3_out, name = db3
db3___byte equ _porta
db3___bit equ 3
        ; line_number = 38
        ;  pin 3 = ra4_open_collector, name = e
e___byte equ _porta
e___bit equ 4
        ; line_number = 39
        ;  pin 4 = ra5_in, name = lines34
lines34___byte equ _porta
lines34___bit equ 5
        ; line_number = 40
        ;  pin 5 = ground
        ; line_number = 41
        ;  pin 6 = rb0_out, name = rs
rs___byte equ _portb
rs___bit equ 0
        ; line_number = 42
        ;  pin 7 = rx
        ; line_number = 43
        ;  pin 8 = tx
        ; line_number = 44
        ;  pin 9 = rb3_out, name = rw
rw___byte equ _portb
rw___bit equ 3
        ; line_number = 45
        ;  pin 10 = rb4_out, name = db4
db4___byte equ _portb
db4___bit equ 4
        ; line_number = 46
        ;  pin 11 = rb5_out, name = db5
db5___byte equ _portb
db5___bit equ 5
        ; line_number = 47
        ;  pin 12 = rb6_out, name = db6
db6___byte equ _portb
db6___bit equ 6
        ; line_number = 48
        ;  pin 13 = rb7_out, name = db7
db7___byte equ _portb
db7___bit equ 6
        ; line_number = 49
        ;  pin 14 = power_supply
        ; line_number = 50
        ;  pin 15 = osc2
        ; line_number = 51
        ;  pin 16 = osc1
        ; line_number = 52
        ;  pin 17 = ra0_out, name = db0
db0___byte equ _porta
db0___bit equ 0
        ; line_number = 53
        ;  pin 18 = ra1_out, name = db1
db1___byte equ _porta
db1___bit equ 1

        ; line_number = 55
        ; constant line_mask = 3
line_mask equ 3
        ; line_number = 56
        ; constant column_mask = 0xf
column_mask equ 15
        ; line_number = 57
        ; constant cursor_mode_mask = 3
cursor_mode_mask equ 3

        ; line_number = 59
        ; constant tmr0_prescale = 32
tmr0_prescale equ 32
        ; # Spec. sheet says 1.53ms.  Sometimes a little more is required;
        ; # hence use 1.6ms
        ; line_number = 62
        ; constant big_delay = 1600 * microsecond / tmr0_prescale + 1
big_delay equ 201
        ; line_number = 63
        ; constant standard_delay = 39 * microsecond / tmr0_prescale + 1
standard_delay equ 5
        ; line_number = 64
        ; constant other_delay = 43 * microsecond / tmr0_prescale + 1
other_delay equ 6

        ; line_number = 66
        ; constant queue_size = 32
queue_size equ 32
        ; line_number = 67
        ; constant queue_mask = queue_size - 1
queue_mask equ 31
        ; line_number = 68
        ; global queue[queue_size] array[byte]
queue equ globals___0+12
        ; line_number = 69
        ; global processed byte
processed equ globals___0+44
        ; line_number = 70
        ; global available byte
available equ globals___0+45

        ; line_number = 72
        ; global cursor byte
cursor equ globals___0+46
        ; line_number = 73
        ; global cursor_pending bit
cursor_pending___byte equ globals___0+79
cursor_pending___bit equ 4

        ; line_number = 75
        ;info   75, 0
        ; procedure main
main:
        ; Initialize some registers
        movlw   7
        movwf   _cmcon
        movlw   32
        bsf     __rp0___byte, __rp0___bit
        movwf   _trisa
        movlw   6
        movwf   _trisb
        ; arguments_none
        ; line_number = 77
        ;  returns_nothing

        ; line_number = 79
        ;  local command byte
main__command equ globals___0+47
        ; line_number = 80
        ;  local temporary byte
main__temporary equ globals___0+48
        ; line_number = 81
        ;  local id_index byte
main__id_index equ globals___0+49

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>01 code:XX=cc=>XX)
        ; line_number = 83
        ;  call rb2bus_initialize(32)
        ;info   83, 7
        movlw   32
        bcf     __rp0___byte, __rp0___bit
        call    rb2bus_initialize

        ; # Set up Timer0:
        ; # Load {_option} register:
        ; # {_rbpu}=0, {_intedg}=0, {_t0cs}=0 {_t0se}=0, _{psa}=0, and
        ; # {_ps#}=100 (i.e. 1:32 prescale):
        ; line_number = 89
        ;  _option := 4
        ;info   89, 10
        movlw   4
        bsf     __rp0___byte, __rp0___bit
        movwf   _option
        ; line_number = 90
        ;  _t0if := _false
        ;info   90, 13
        bcf     _t0if___byte, _t0if___bit
        ; line_number = 91
        ;  _t0ie := _false
        ;info   91, 14
        bcf     _t0ie___byte, _t0ie___bit
        ; line_number = 92
        ;  _tmr0 := 0
        ;info   92, 15
        bcf     __rp0___byte, __rp0___bit
        clrf    _tmr0

        ; line_number = 94
        ;  id_index := 0
        ;info   94, 17
        clrf    main__id_index

        ; # Initialize the LCD:
        ; line_number = 97
        ;  call lcd_init()
        ;info   97, 18
        call    lcd_init

        ; # Output the message:
        ; line_number = 100
        ;  call line_put(0, '1')
        ;info   100, 19
        clrf    line_put__new_line
        movlw   49
        call    line_put
        ; line_number = 101
        ;  call line_put(1, '2')
        ;info   101, 22
        movlw   1
        movwf   line_put__new_line
        movlw   50
        call    line_put
        ; line_number = 102
        ;  call line_put(2, '3')
        ;info   102, 26
        movlw   2
        movwf   line_put__new_line
        movlw   51
        call    line_put
        ; line_number = 103
        ;  call line_put(3, '4')
        ;info   103, 30
        movlw   3
        movwf   line_put__new_line
        movlw   52
        call    line_put

        ; line_number = 105
        ;  call lcd_cursor_set(0)
        ;info   105, 34
        movlw   0
        call    lcd_cursor_set

        ; line_number = 107
        ;  cursor := 0
        ;info   107, 36
        clrf    cursor
        ; line_number = 108
        ;  cursor_pending := _false
        ;info   108, 37
        bcf     cursor_pending___byte, cursor_pending___bit
        ; line_number = 109
        ;  available := 0
        ;info   109, 38
        clrf    available
        ; line_number = 110
        ;  processed := 0
        ;info   110, 39
        clrf    processed

        ; line_number = 112
        ;  loop_forever start
main__1:
        ; # Make sure that we have been selected:
        ; line_number = 114
        ;  rb2bus_error := _true
        ;info   114, 40
        bsf     rb2bus_error___byte, rb2bus_error___bit
        ; line_number = 115
        ;  while rb2bus_error start
main__2:
        ;info   115, 41
        ; =>bit_code_emit@symbol(): sym=rb2bus_error
        ; No 1TEST: true.size=4 false.size=0
        ; No 2TEST: true.size=4 false.size=0
        ; 1GOTO: Single test with GOTO
        btfss   rb2bus_error___byte, rb2bus_error___bit
        goto    main__3
        ; line_number = 116
        ; call rb2bus_select_wait()
        ;info   116, 43
        call    rb2bus_select_wait
        ; line_number = 117
        ;  command := rb2bus_byte_get()
        ;info   117, 44
        call    rb2bus_byte_get
        movwf   main__command

        goto    main__2
        ; Recombine size1 = 0 || size2 = 0
main__3:
        ; line_number = 115
        ;  while rb2bus_error done
        ; # Dispatch on the command:
        ; line_number = 120
        ;  switch command >> 6 start
        ;info   120, 47
        ; switch_before:(data:00=uu=>00 code:XX=cc=>XX) size=7
        movlw   main__10>>8
        movwf   __pclath
main__11 equ globals___0+63
        swapf   main__command,w
        movwf   main__11
        rrf     main__11,f
        rrf     main__11,w
        andlw   3
        ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
        addlw   main__10
        movwf   __pcl
        ; page_group 4
main__10:
        goto    main__8
        goto    main__8
        goto    main__8
        goto    main__9
        ; line_number = 121
        ; case 0, 1, 2
main__8:
        ; line_number = 122
        ; call enqueue(command)
        ;info   122, 60
        movf    main__command,w
        call    enqueue
        goto    main__12
        ; line_number = 123
        ; case 3
main__9:
        ; line_number = 124
        ; switch (command >> 3) & 7 start
        ;info   124, 63
        ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
        movlw   main__5>>8
        movwf   __pclath
main__6 equ globals___0+63
        rrf     main__command,w
        movwf   main__6
        rrf     main__6,f
        rrf     main__6,w
        andlw   7
        ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
        addlw   main__5
        movwf   __pcl
        ; page_group 8
main__5:
        goto    main__7
        goto    main__7
        goto    main__7
        goto    main__7
        goto    main__7
        goto    main__7
        goto    main__7
        goto    main__4
        ; line_number = 125
        ; case 7
main__4:
        ; line_number = 126
        ; call rb2bus_command(command)
        ;info   126, 80
        movf    main__command,w
        call    rb2bus_command


main__7:
        ; line_number = 124
        ; switch (command >> 3) & 7 done
main__12:
        ; line_number = 120
        ;  switch command >> 6 done
        ; line_number = 112
        ;  loop_forever wrap-up
        goto    main__1
        ; line_number = 112
        ;  loop_forever done
        ; delay after procedure statements=non-uniform




        ; line_number = 129
        ;info   129, 83
        ; procedure line_put
line_put:
        ; Last argument is sitting in W; save into argument variable
        movwf   line_put__character
        ; delay=4294967295
        ; line_number = 130
        ; argument new_line byte
line_put__new_line equ globals___0+50
        ; line_number = 131
        ; argument character byte
line_put__character equ globals___0+51
        ; line_number = 132
        ;  returns_nothing

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 134
        ;  call lcd_cursor_set(new_line << 4)
        ;info   134, 84
line_put__1 equ globals___0+64
        swapf   line_put__new_line,w
        andlw   240
        call    lcd_cursor_set
        ; line_number = 135
        ;  loop_exactly 16 start
        ;info   135, 87
line_put__2 equ globals___0+64
        movlw   16
        movwf   line_put__2
line_put__3:
        ; line_number = 136
        ; call lcd_character_put(character)
        ;info   136, 89
        movf    line_put__character,w
        call    lcd_character_put


        ; line_number = 135
        ;  loop_exactly 16 wrap-up
        decfsz  line_put__2,f
        goto    line_put__3
        ; line_number = 135
        ;  loop_exactly 16 done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 139
        ;info   139, 94
        ; procedure lcd_command
lcd_command:
        ; Last argument is sitting in W; save into argument variable
        movwf   lcd_command__command
        ; delay=4294967295
        ; line_number = 140
        ; argument delay byte
lcd_command__delay equ globals___0+52
        ; line_number = 141
        ; argument command byte
lcd_command__command equ globals___0+53
        ; line_number = 142
        ;  returns_nothing

        ; # This procedure will strobe {command} into the LCD controller.
        ; # The procedure delays by 52uS to ensure the command has time
        ; # to be digested by the LCD controller.

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 148
        ;  call lcd_data_send(0, delay, command)
        ;info   148, 95
        bcf     lcd_data_send__rs_mode___byte, lcd_data_send__rs_mode___bit
        movf    lcd_command__delay,w
        movwf   lcd_data_send__delay
        movf    lcd_command__command,w
        call    lcd_data_send


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




        ; line_number = 151
        ;info   151, 101
        ; procedure lcd_character_put
lcd_character_put:
        ; Last argument is sitting in W; save into argument variable
        movwf   lcd_character_put__character
        ; delay=4294967295
        ; line_number = 152
        ; argument character byte
lcd_character_put__character equ globals___0+54
        ; line_number = 153
        ;  returns_nothing

        ; # This procedure will output {character} to the LCD display
        ; # and move the cursor right by one.

        ; # Send high nibble (RW=0 & RS=1):
        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 159
        ;  call lcd_data_send(1, other_delay, character)
        ;info   159, 102
        bsf     lcd_data_send__rs_mode___byte, lcd_data_send__rs_mode___bit
        movlw   6
        movwf   lcd_data_send__delay
        movf    lcd_character_put__character,w
        call    lcd_data_send
        ; line_number = 160
        ;  cursor := cursor + 1
        ;info   160, 107
        incf    cursor,f
        ; line_number = 161
        ;  if cursor & 0xf = 0 start
        ;info   161, 108
        ; Left minus Right
        movlw   15
        andwf   cursor,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=2 false.size=0
        ; No 2TEST: true.size=2 false.size=0
        ; 1GOTO: Single test with GOTO
        btfss   __z___byte, __z___bit
        goto    lcd_character_put__1
        ; line_number = 162
        ; call lcd_cursor_set(cursor - 1)
        ;info   162, 112
        decf    cursor,w
        call    lcd_cursor_set


        ; Recombine size1 = 0 || size2 = 0
lcd_character_put__1:
        ; line_number = 161
        ;  if cursor & 0xf = 0 done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 165
        ;info   165, 115
        ; procedure lcd_cursor_set
lcd_cursor_set:
        ; Last argument is sitting in W; save into argument variable
        movwf   lcd_cursor_set__new_cursor
        ; delay=4294967295
        ; line_number = 166
        ; argument new_cursor byte
lcd_cursor_set__new_cursor equ globals___0+56
        ; line_number = 167
        ;  returns_nothing

        ; # This procedure will set the cursor position to {new_cursor}.

        ; line_number = 171
        ;  local command byte
lcd_cursor_set__command equ globals___0+55

        ; # Keep the cursor on the first two lines:
        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 174
        ;  cursor := new_cursor & 0x1f
        ;info   174, 116
        movlw   31
        andwf   lcd_cursor_set__new_cursor,w
        movwf   cursor

        ; line_number = 176
        ;  command := cursor & 0xf
        ;info   176, 119
        movlw   15
        andwf   cursor,w
        movwf   lcd_cursor_set__command
        ; line_number = 177
        ;  if cursor@4 start
        ;info   177, 122
lcd_cursor_set__select__2___byte equ cursor
lcd_cursor_set__select__2___bit equ 4
        ; =>bit_code_emit@symbol(): sym=lcd_cursor_set__select__2
        ; 1TEST: Single test with code in skip slot
        btfsc   lcd_cursor_set__select__2___byte, lcd_cursor_set__select__2___bit
        ; line_number = 178
        ; command@6 := _true
        ;info   178, 123
lcd_cursor_set__select__1___byte equ lcd_cursor_set__command
lcd_cursor_set__select__1___bit equ 6
        bsf     lcd_cursor_set__select__1___byte, lcd_cursor_set__select__1___bit
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 177
        ;  if cursor@4 done
        ; line_number = 179
        ; command@7 := _true
        ;info   179, 124
lcd_cursor_set__select__3___byte equ lcd_cursor_set__command
lcd_cursor_set__select__3___bit equ 7
        bsf     lcd_cursor_set__select__3___byte, lcd_cursor_set__select__3___bit
        ; line_number = 180
        ;  call lcd_command(standard_delay, command)
        ;info   180, 125
        movlw   5
        movwf   lcd_command__delay
        movf    lcd_cursor_set__command,w
        call    lcd_command


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




        ; line_number = 183
        ;info   183, 130
        ; procedure enqueue
enqueue:
        ; Last argument is sitting in W; save into argument variable
        movwf   enqueue__data
        ; delay=4294967295
        ; line_number = 184
        ; argument data byte
enqueue__data equ globals___0+57
        ; line_number = 185
        ;  returns_nothing

        ; # This procedure will enqueue {data} onto the command queue.
        ; # It is your responsibility to ensure that the there is enough
        ; # space in the queue.

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 191
        ;  queue[available & queue_mask] := data
        ;info   191, 131
        ; index_fsr_first
        movlw   31
        andwf   available,w
        addlw   queue
        movwf   __fsr
        movf    enqueue__data,w
        movwf   __indf
        ; line_number = 192
        ;  available := available + 1
        ;info   192, 137
        incf    available,f


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




        ; line_number = 195
        ;info   195, 139
        ; procedure lcd_delay
lcd_delay:
        ; Last argument is sitting in W; save into argument variable
        movwf   lcd_delay__amount
        ; delay=4294967295
        ; line_number = 196
        ; argument amount byte
lcd_delay__amount equ globals___0+58
        ; line_number = 197
        ;  returns_nothing

        ; # This procedure is designed to delay for 100uS times {amount}.

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 201
        ;  loop_exactly amount start
        ;info   201, 140
lcd_delay__1 equ globals___0+65
        movf    lcd_delay__amount,w
        movwf   lcd_delay__1
lcd_delay__2:
        ; line_number = 202
        ; delay (100 * microsecond) - 3 start
        ;info   202, 142
        ; Delay expression evaluates to 397
        ; line_number = 203
        ; do_nothing
        ;info   203, 142


        ; Delay 397 cycles
        ; Delay loop takes 99 * 4 = 396 cycles
        movlw   99
lcd_delay__3:
        addlw   255
        btfss   __z___byte, __z___bit
        goto    lcd_delay__3
        nop     
        ; line_number = 202
        ; delay (100 * microsecond) - 3 done
        ; line_number = 201
        ;  loop_exactly amount wrap-up
        decfsz  lcd_delay__1,f
        goto    lcd_delay__2
        ; line_number = 201
        ;  loop_exactly amount done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 206
        ;info   206, 150
        ; procedure lcd_init
lcd_init:
        ; arguments_none
        ; line_number = 208
        ;  returns_nothing

        ; # Step 1: Wait for the LCD to initialize from Power on:
        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 211
        ;  loop_exactly 5 start
        ;info   211, 150
lcd_init__1 equ globals___0+66
        movlw   5
        movwf   lcd_init__1
lcd_init__2:
        ; line_number = 212
        ; call lcd_delay(100)
        ;info   212, 152
        movlw   100
        call    lcd_delay

        ; line_number = 211
        ;  loop_exactly 5 wrap-up
        decfsz  lcd_init__1,f
        goto    lcd_init__2
        ; line_number = 211
        ;  loop_exactly 5 done
        ; # Step 2: Put the LCD in a "known" mode.

        ; # FUNCTION SET - 8-bit, 2 lines, 5x8 font:
        ; line_number = 217
        ;  call lcd_command(standard_delay, 0x38)
        ;info   217, 156
        movlw   5
        movwf   lcd_command__delay
        movlw   56
        call    lcd_command

        ; # AGAIN : FUNCTION SET - 8-bit, 2 lines, 5x8 font:
        ; # Sending this command twice, *does* work.
        ; line_number = 221
        ;  call lcd_command(standard_delay, 0x38)
        ;info   221, 160
        movlw   5
        movwf   lcd_command__delay
        movlw   56
        call    lcd_command

        ; # Turn off the display temporarily:
        ; line_number = 224
        ;  call lcd_command(standard_delay, 0x08)
        ;info   224, 164
        movlw   5
        movwf   lcd_command__delay
        movlw   8
        call    lcd_command

        ; # Clear the display:
        ; line_number = 227
        ;  call lcd_command(big_delay, 0x01)
        ;info   227, 168
        movlw   201
        movwf   lcd_command__delay
        movlw   1
        call    lcd_command

        ; # Turn the display back on with Cursor:
        ; line_number = 230
        ;  call lcd_command(standard_delay, 0x0f)
        ;info   230, 172
        movlw   5
        movwf   lcd_command__delay
        movlw   15
        call    lcd_command

        ; # Set shift mode:
        ; line_number = 233
        ;  call lcd_command(standard_delay, 0x06)
        ;info   233, 176
        movlw   5
        movwf   lcd_command__delay
        movlw   6
        call    lcd_command


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




        ; line_number = 236
        ;info   236, 181
        ; procedure lcd_data_send
lcd_data_send:
        ; Last argument is sitting in W; save into argument variable
        movwf   lcd_data_send__data
        ; delay=4294967295
        ; line_number = 237
        ; argument rs_mode bit
lcd_data_send__rs_mode___byte equ globals___0+79
lcd_data_send__rs_mode___bit equ 5
        ; line_number = 238
        ; argument delay byte
lcd_data_send__delay equ globals___0+60
        ; line_number = 239
        ; argument data byte
lcd_data_send__data equ globals___0+61
        ; line_number = 240
        ;  returns_nothing

        ; # This procedure will send the 8-bits of {data} to the LCD
        ; # controller with RS set to {rs_mode} and RW set to 0 (write).

        ; line_number = 245
        ;  local temp byte
lcd_data_send__temp equ globals___0+59

        ; # Get {db4}, {db5}, {db6}, and {db7} set up, clear {rw} and {rs}:
        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 248
        ;  _portb := data & 0xf0
        ;info   248, 182
        movlw   240
        andwf   lcd_data_send__data,w
        movwf   _portb

        ; # Set up the control lines:
        ; line_number = 251
        ;  if rs_mode start
        ;info   251, 185
        ; =>bit_code_emit@symbol(): sym=lcd_data_send__rs_mode
        ; 1TEST: Single test with code in skip slot
        btfsc   lcd_data_send__rs_mode___byte, lcd_data_send__rs_mode___bit
        ; line_number = 252
        ; rs := _true
        ;info   252, 186
        bsf     rs___byte, rs___bit

        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 251
        ;  if rs_mode done
        ; # Get {db0}, {db1}, {db2}, and {db3} set up.  Be careful to
        ; # not accidently toggle {e}.

        ; line_number = 257
        ;  temp := data & 0xf
        ;info   257, 187
        movlw   15
        andwf   lcd_data_send__data,w
        movwf   lcd_data_send__temp
        ; line_number = 258
        ;  _porta := temp
        ;info   258, 190
        movf    lcd_data_send__temp,w
        movwf   _porta

        ; # Wait for any previous command to clear:
        ; line_number = 261
        ;  while !_t0if start
lcd_data_send__1:
        ;info   261, 192
        ; =>bit_code_emit@symbol(): sym=_t0if
        ; 1TEST: Single test with code in skip slot
        btfss   _t0if___byte, _t0if___bit
        ; line_number = 262
        ; do_nothing
        ;info   262, 193

        goto    lcd_data_send__1
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 261
        ;  while !_t0if done
        ; # Toggle {e} to clock the data into the LCD controller.
        ; line_number = 265
        ;  e := _true
        ;info   265, 194
        bsf     e___byte, e___bit
        ; line_number = 266
        ;  e := _false
        ;info   266, 195
        bcf     e___byte, e___bit

        ; # Set up a delay after this command (just use 1's complement):
        ; line_number = 269
        ;  _tmr0 := 255 ^ delay
        ;info   269, 196
        comf    lcd_data_send__delay,w
        movwf   _tmr0
        ; line_number = 270
        ;  _t0if := _false
        ;info   270, 198
        bcf     _t0if___byte, _t0if___bit


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




        ; line_number = 273
        ;info   273, 200
        ; procedure wait
wait:
        ; arguments_none
        ; line_number = 275
        ;  returns_nothing

        ; # This procedure will do any background processing.

        ; line_number = 279
        ;  local command byte
wait__command equ globals___0+62

        ; # Only do something if there is no pending delay:
        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 282
        ;  if _t0if start
        ;info   282, 200
        ; =>bit_code_emit@symbol(): sym=_t0if
        ; No 1TEST: true.size=110 false.size=0
        ; No 2TEST: true.size=110 false.size=0
        ; 1GOTO: Single test with GOTO
        btfss   _t0if___byte, _t0if___bit
        goto    wait__27
        ; # Any pending delay has expired:
        ; line_number = 284
        ;  if cursor_pending start
        ;info   284, 202
        ; =>bit_code_emit@symbol(): sym=cursor_pending
        ; No 1TEST: true.size=3 false.size=104
        ; No 2TEST: true.size=3 false.size=104
        ; 2GOTO: Single test with two GOTO's
        btfss   cursor_pending___byte, cursor_pending___bit
        goto    wait__25
        ; line_number = 285
        ; call lcd_cursor_set(0)
        ;info   285, 204
        movlw   0
        call    lcd_cursor_set
        ; line_number = 286
        ;  cursor_pending := _false
        ;info   286, 206
        bcf     cursor_pending___byte, cursor_pending___bit
        goto    wait__26
        ; 2GOTO: Starting code 2
wait__25:
        ; line_number = 287
        ;info   287, 208
        ; Left minus Right
        movf    processed,w
        subwf   available,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=0 false.size=100
        ; No 2TEST: true.size=0 false.size=100
        ; 1GOTO: Single test with GOTO
        btfsc   __z___byte, __z___bit
        goto    wait__24
        ; line_number = 288
        ; command := queue[processed & queue_mask]
        ;info   288, 212
        movlw   31
        andwf   processed,w
        addlw   queue
        movwf   __fsr
        movf    __indf,w
        movwf   wait__command
        ; line_number = 289
        ;  processed := processed + 1
        ;info   289, 218
        incf    processed,f
        ; line_number = 290
        ;  switch command >> 6 start
        ;info   290, 219
        ; switch_before:(data:00=uu=>00 code:XX=cc=>XX) size=7
        movlw   wait__21>>8
        movwf   __pclath
wait__22 equ globals___0+67
        swapf   wait__command,w
        movwf   wait__22
        rrf     wait__22,f
        rrf     wait__22,w
        andlw   3
        ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
        addlw   wait__21
        movwf   __pcl
        ; page_group 4
wait__21:
        goto    wait__18
        goto    wait__19
        goto    wait__20
        goto    wait__20
        ; line_number = 291
        ; case 0
wait__18:
        ; # 00xx xxxx:
        ; line_number = 293
        ;  switch (command >> 3) & 7 start
        ;info   293, 232
        ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
        movlw   wait__15>>8
        movwf   __pclath
wait__16 equ globals___0+67
        rrf     wait__command,w
        movwf   wait__16
        rrf     wait__16,f
        rrf     wait__16,w
        andlw   7
        ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
        addlw   wait__15
        movwf   __pcl
        ; page_group 8
wait__15:
        goto    wait__11
        goto    wait__12
        goto    wait__13
        goto    wait__13
        goto    wait__14
        goto    wait__14
        goto    wait__14
        goto    wait__14
        ; line_number = 294
        ; case 0
wait__11:
        ; # 0000 0xxx:
        ; line_number = 296
        ;  switch command & 7 start
        ;info   296, 249
        ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
        movlw   wait__3>>8
        movwf   __pclath
        movlw   7
        andwf   wait__command,w
        ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
        addlw   wait__3
        movwf   __pcl
        ; page_group 6
        ; Add 1 NOP's until start of new page 
        nop     
wait__3:
        goto    wait__4
        goto    wait__4
        goto    wait__4
        goto    wait__4
        goto    wait__1
        goto    wait__2
        ; line_number = 297
        ; case 4
wait__1:
        ; line_number = 298
        ; call lcd_cursor_set(0)
        ;info   298, 262
        movlw   0
        call    lcd_cursor_set
        goto    wait__4
        ; line_number = 299
        ; case 5
wait__2:
        ; line_number = 300
        ; call lcd_cursor_set(0x10)
        ;info   300, 265
        movlw   16
        call    lcd_cursor_set
wait__4:
        ; line_number = 296
        ;  switch command & 7 done
        ; #FIXME: Compiler bug with left shift!!!
        ; #  case 4, 5, 6, 7
        ; #	# 0000 01rr (Row Set):
        ; #	#call lcd_cursor_set((command & 3) << 4)
        ; #   call rb2bus_byte_put(cursor)
        goto    wait__17
        ; line_number = 306
        ; case 1
wait__12:
        ; # 0000 1xxx:
        ; line_number = 308
        ;  switch command & 7 start
        ;info   308, 268
        ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
        ; line_number = 309
        ; case_maximum 7
        movlw   wait__8>>8
        movwf   __pclath
        movlw   7
        andwf   wait__command,w
        ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
        addlw   wait__8
        movwf   __pcl
        ; page_group 8
wait__8:
        goto    wait__9
        goto    wait__9
        goto    wait__5
        goto    wait__9
        goto    wait__6
        goto    wait__7
        goto    wait__9
        goto    wait__9
        ; line_number = 310
        ; case 2
wait__5:
        ; # 0000 1010 (Line_Feed):
        ; line_number = 312
        ;  call lcd_cursor_set((cursor | 0xf) + 1)
        ;info   312, 282
        movlw   15
        iorwf   cursor,w
        addlw   1
        call    lcd_cursor_set
        goto    wait__9
        ; line_number = 313
        ; case 4
wait__6:
        ; # 0000 1100 (Form_Feed):
        ; line_number = 315
        ;  call lcd_command(big_delay, 0x1)
        ;info   315, 287
        movlw   201
        movwf   lcd_command__delay
        movlw   1
        call    lcd_command
        ; line_number = 316
        ;  cursor_pending := _true
        ;info   316, 291
        bsf     cursor_pending___byte, cursor_pending___bit
        goto    wait__9
        ; line_number = 317
        ; case 5
wait__7:
        ; # 0000 1101 (Carriage Return):
        ; line_number = 319
        ;  call lcd_cursor_set(cursor & 0xf0)
        ;info   319, 293
        movlw   240
        andwf   cursor,w
        call    lcd_cursor_set
wait__9:
        ; line_number = 308
        ;  switch command & 7 done
        goto    wait__17
        ; line_number = 320
        ; case 2, 3
wait__13:
        ; # 0001 xxxx (Column Set):
        ; line_number = 322
        ;  call lcd_cursor_set(cursor & 0xf0 | command & 0xf)
        ;info   322, 297
wait__10 equ globals___0+67
        movlw   240
        andwf   cursor,w
        movwf   wait__10
        movlw   15
        andwf   wait__command,w
        iorwf   wait__10,w
        call    lcd_cursor_set
        goto    wait__17
        ; line_number = 323
        ; case 4, 5, 6, 7
wait__14:
        ; # 001x xxxx:
        ; line_number = 325
        ;  call lcd_character_put(command)
        ;info   325, 305
        movf    wait__command,w
        call    lcd_character_put
wait__17:
        ; line_number = 293
        ;  switch (command >> 3) & 7 done
        goto    wait__23
        ; line_number = 326
        ; case 1
wait__19:
        ; # 01xx xxxx:
        ; line_number = 328
        ;  call lcd_character_put(command)
        ;info   328, 308
        movf    wait__command,w
        call    lcd_character_put
        goto    wait__23
        ; line_number = 329
        ; case 2, 3
wait__20:
        ; # 1xxx xxxx:
        ; line_number = 331
        ;  call rb2bus_byte_put(cursor)
        ;info   331, 311
        movf    cursor,w
        call    rb2bus_byte_put


wait__23:
        ; line_number = 290
        ;  switch command >> 6 done
wait__24:
        ; Recombine size1 = 0 || size2 = 0
wait__26:
        ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 284
        ;  if cursor_pending done
        ; Recombine size1 = 0 || size2 = 0
wait__27:
        ; line_number = 282
        ;  if _t0if done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 334
        ; string id = "\16,0,32,2,3,7\LCD32-B\7\Gramson" start
        ; id = '\16,0\ \2,3,7\LCD32-B\7\Gramson'
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 21
id___base:
        retlw   16
        retlw   0
        retlw   32
        retlw   2
        retlw   3
        retlw   7
        retlw   76
        retlw   67
        retlw   68
        retlw   51
        retlw   50
        retlw   45
        retlw   66
        retlw   7
        retlw   71
        retlw   114
        retlw   97
        retlw   109
        retlw   115
        retlw   111
        retlw   110
        ; line_number = 334
        ; string id = "\16,0,32,2,3,7\LCD32-B\7\Gramson" start


        ; Appending 8 delayed procedures to code bank 0
        ; buffer = 'rb2bus'
        ; line_number = 57
        ;info   57, 341
        ; procedure rb2bus_select_wait
rb2bus_select_wait:
        ; arguments_none
        ; line_number = 59
        ;  returns_nothing

        ; # This procedure will in an infinite loop until the select
        ; # address matches {rb2bus_address}.  {rb2bus_address} is
        ; # typically set in the {rb2bus_initialize} procedure.
        ; #
        ; # This module will repeatably call the {wait} procedure until
        ; # it is properly selected.

        ; line_number = 68
        ;  local value byte
rb2bus_select_wait__value equ globals___0+2
        ; line_number = 69
        ;  local address_bit bit
rb2bus_select_wait__address_bit___byte equ globals___0+79
rb2bus_select_wait__address_bit___bit equ 2

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 71
        ;  rb2bus_error := _false
        ;info   71, 341
        bcf     rb2bus_error___byte, rb2bus_error___bit
        ; line_number = 72
        ;  while !rb2bus_selected start
rb2bus_select_wait__1:
        ;info   72, 342
        ; =>bit_code_emit@symbol(): sym=rb2bus_selected
        ; No 1TEST: true.size=0 false.size=25
        ; No 2TEST: true.size=0 false.size=25
        ; 1GOTO: Single test with GOTO
        btfsc   rb2bus_selected___byte, rb2bus_selected___bit
        goto    rb2bus_select_wait__6
        ; line_number = 73
        ; _adden := _true
        ;info   73, 344
        bsf     _adden___byte, _adden___bit
        ; # Wait for a byte to arrive.
        ; line_number = 75
        ;  while !_rcif start
rb2bus_select_wait__2:
        ;info   75, 345
        ; =>bit_code_emit@symbol(): sym=_rcif
        ; No 1TEST: true.size=0 false.size=2
        ; No 2TEST: true.size=0 false.size=2
        ; 1GOTO: Single test with GOTO
        btfsc   _rcif___byte, _rcif___bit
        goto    rb2bus_select_wait__3
        ; line_number = 76
        ; call wait()
        ;info   76, 347
        call    wait

        goto    rb2bus_select_wait__2
rb2bus_select_wait__3:
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 75
        ;  while !_rcif done
        ; # Capture the received value:
        ; line_number = 79
        ;  address_bit := _false
        ;info   79, 349
        bcf     rb2bus_select_wait__address_bit___byte, rb2bus_select_wait__address_bit___bit
        ; line_number = 80
        ;  if _rx9d start
        ;info   80, 350
        ; =>bit_code_emit@symbol(): sym=_rx9d
        ; 1TEST: Single test with code in skip slot
        btfsc   _rx9d___byte, _rx9d___bit
        ; line_number = 81
        ; address_bit := _true
        ;info   81, 351
        bsf     rb2bus_select_wait__address_bit___byte, rb2bus_select_wait__address_bit___bit
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 80
        ;  if _rx9d done
        ; line_number = 82
        ; value := _rcreg
        ;info   82, 352
        movf    _rcreg,w
        movwf   rb2bus_select_wait__value

        ; # Clear any UART errors by toggling {_cren}:
        ; line_number = 85
        ;  if _oerr start
        ;info   85, 354
        ; =>bit_code_emit@symbol(): sym=_oerr
        ; 1TEST: Single test with code in skip slot
        btfsc   _oerr___byte, _oerr___bit
        ; line_number = 86
        ; _cren := _false
        ;info   86, 355
        bcf     _cren___byte, _cren___bit
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 85
        ;  if _oerr done
        ; line_number = 87
        ; if _ferr start
        ;info   87, 356
        ; =>bit_code_emit@symbol(): sym=_ferr
        ; 1TEST: Single test with code in skip slot
        btfsc   _ferr___byte, _ferr___bit
        ; line_number = 88
        ; _cren := _false
        ;info   88, 357
        bcf     _cren___byte, _cren___bit
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 87
        ; if _ferr done
        ; line_number = 89
        ; _cren := _true
        ;info   89, 358
        bsf     _cren___byte, _cren___bit

        ; line_number = 91
        ;  if address_bit start
        ;info   91, 359
        ; =>bit_code_emit@symbol(): sym=rb2bus_select_wait__address_bit
        ; No 1TEST: true.size=7 false.size=0
        ; No 2TEST: true.size=7 false.size=0
        ; 1GOTO: Single test with GOTO
        btfss   rb2bus_select_wait__address_bit___byte, rb2bus_select_wait__address_bit___bit
        goto    rb2bus_select_wait__5
        ; line_number = 92
        ; if value = rb2bus_address start
        ;info   92, 361
        ; Left minus Right
        movf    rb2bus_address,w
        subwf   rb2bus_select_wait__value,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=3 false.size=0
        ; No 2TEST: true.size=3 false.size=0
        ; 1GOTO: Single test with GOTO
        btfss   __z___byte, __z___bit
        goto    rb2bus_select_wait__4
        ; line_number = 93
        ; rb2bus_selected := _true
        ;info   93, 365
        bsf     rb2bus_selected___byte, rb2bus_selected___bit
        ; line_number = 94
        ;  call rb2bus_byte_put(rb2_ok)
        ;info   94, 366
        movlw   165
        call    rb2bus_byte_put


        ; Recombine size1 = 0 || size2 = 0
rb2bus_select_wait__4:
        ; line_number = 92
        ; if value = rb2bus_address done
        ; Recombine size1 = 0 || size2 = 0
rb2bus_select_wait__5:
        ; line_number = 91
        ;  if address_bit done
        goto    rb2bus_select_wait__1
rb2bus_select_wait__6:
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 72
        ;  while !rb2bus_selected done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 97
        ;info   97, 370
        ; procedure rb2bus_deselect
rb2bus_deselect:
        ; arguments_none
        ; line_number = 99
        ;  returns_nothing

        ; # This procedure forces this module into the deselected state until
        ; # it is reselected by some master module on the bus.

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 104
        ;  rb2bus_selected := _false
        ;info   104, 370
        bcf     rb2bus_selected___byte, rb2bus_selected___bit


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




        ; line_number = 107
        ;info   107, 372
        ; procedure rb2bus_byte_get
rb2bus_byte_get:
        ; arguments_none
        ; line_number = 109
        ;  returns byte

        ; # This procedure will return the next byte received from the bus.
        ; # The address (9th) bit is stored in the global {is_address}.
        ; #
        ; # If {rb2bus_error} is set, 0 is returned.  Otherwise, the {wait}
        ; # procedure is repeatably called until a command byte is successfully
        ; # received.  If an module select byte comes in, we enter a bus
        ; # error condition by setting {rb2bus_error} and returning 0.

        ; line_number = 119
        ;  local value byte
rb2bus_byte_get__value equ globals___0+3
        ; line_number = 120
        ;  local address_bit bit
rb2bus_byte_get__address_bit___byte equ globals___0+79
rb2bus_byte_get__address_bit___bit equ 3

        ; # Return 0 in a bus flush condition to get us back to {rb2bus_select_wait}:
        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 123
        ;  if rb2bus_error start
        ;info   123, 372
        ; =>bit_code_emit@symbol(): sym=rb2bus_error
        ; 1TEST: Single test with code in skip slot
        btfsc   rb2bus_error___byte, rb2bus_error___bit
        ; line_number = 124
        ; return 0 start
        ; line_number = 124
        ;info   124, 373
        retlw   0
        ; line_number = 124
        ; return 0 done

        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 123
        ;  if rb2bus_error done
        ; # Wait for a byte to arrive.
        ; line_number = 127
        ;  _adden := _false
        ;info   127, 374
        bcf     _adden___byte, _adden___bit
        ; line_number = 128
        ;  while !_rcif start
rb2bus_byte_get__1:
        ;info   128, 375
        ; =>bit_code_emit@symbol(): sym=_rcif
        ; No 1TEST: true.size=0 false.size=2
        ; No 2TEST: true.size=0 false.size=2
        ; 1GOTO: Single test with GOTO
        btfsc   _rcif___byte, _rcif___bit
        goto    rb2bus_byte_get__2
        ; line_number = 129
        ; call wait()
        ;info   129, 377
        call    wait

        goto    rb2bus_byte_get__1
rb2bus_byte_get__2:
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 128
        ;  while !_rcif done
        ; # Record the 9th bit in {address_bit}:
        ; line_number = 132
        ;  address_bit := _false
        ;info   132, 379
        bcf     rb2bus_byte_get__address_bit___byte, rb2bus_byte_get__address_bit___bit
        ; line_number = 133
        ;  if _rx9d start
        ;info   133, 380
        ; =>bit_code_emit@symbol(): sym=_rx9d
        ; 1TEST: Single test with code in skip slot
        btfsc   _rx9d___byte, _rx9d___bit
        ; line_number = 134
        ; address_bit := _true
        ;info   134, 381
        bsf     rb2bus_byte_get__address_bit___byte, rb2bus_byte_get__address_bit___bit
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 133
        ;  if _rx9d done
        ; line_number = 135
        ; value := _rcreg
        ;info   135, 382
        movf    _rcreg,w
        movwf   rb2bus_byte_get__value

        ; # Clear any errors by toggling _{cren}:
        ; # FIXME: All of this should be done *before* reading {_rcreg}!!!
        ; line_number = 139
        ;  if _oerr start
        ;info   139, 384
        ; =>bit_code_emit@symbol(): sym=_oerr
        ; 1TEST: Single test with code in skip slot
        btfsc   _oerr___byte, _oerr___bit
        ; line_number = 140
        ; _cren := _false
        ;info   140, 385
        bcf     _cren___byte, _cren___bit
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 139
        ;  if _oerr done
        ; line_number = 141
        ; if _ferr start
        ;info   141, 386
        ; =>bit_code_emit@symbol(): sym=_ferr
        ; 1TEST: Single test with code in skip slot
        btfsc   _ferr___byte, _ferr___bit
        ; line_number = 142
        ; _cren := _false
        ;info   142, 387
        bcf     _cren___byte, _cren___bit
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 141
        ; if _ferr done
        ; line_number = 143
        ; _cren := _true
        ;info   143, 388
        bsf     _cren___byte, _cren___bit

        ; line_number = 145
        ;  if address_bit start
        ;info   145, 389
        ; =>bit_code_emit@symbol(): sym=rb2bus_byte_get__address_bit
        ; No 1TEST: true.size=13 false.size=0
        ; No 2TEST: true.size=13 false.size=0
        ; 1GOTO: Single test with GOTO
        btfss   rb2bus_byte_get__address_bit___byte, rb2bus_byte_get__address_bit___bit
        goto    rb2bus_byte_get__5
        ; # We have an unexpected address select coming in:
        ; line_number = 147
        ;  if value = rb2bus_address start
        ;info   147, 391
        ; Left minus Right
        movf    rb2bus_address,w
        subwf   rb2bus_byte_get__value,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=4 false.size=2
        ; No 2TEST: true.size=4 false.size=2
        ; 2GOTO: Single test with two GOTO's
        btfss   __z___byte, __z___bit
        goto    rb2bus_byte_get__3
        ; # We are being selected again:
        ; line_number = 149
        ;  rb2bus_selected := _true
        ;info   149, 395
        bsf     rb2bus_selected___byte, rb2bus_selected___bit
        ; line_number = 150
        ;  _adden := _false
        ;info   150, 396
        bcf     _adden___byte, _adden___bit

        ; line_number = 152
        ;  call rb2bus_byte_put(rb2_ok)
        ;info   152, 397
        movlw   165
        call    rb2bus_byte_put
        goto    rb2bus_byte_get__4
        ; 2GOTO: Starting code 2
rb2bus_byte_get__3:
        ; # Somebody else is being selected; we deselect:
        ; line_number = 155
        ;  rb2bus_selected := _false
        ;info   155, 400
        bcf     rb2bus_selected___byte, rb2bus_selected___bit
        ; line_number = 156
        ;  _adden := _true
        ;info   156, 401
        bsf     _adden___byte, _adden___bit

rb2bus_byte_get__4:
        ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 147
        ;  if value = rb2bus_address done
        ; # We want to get back to the beginning of decode:
        ; line_number = 159
        ;  rb2bus_error := _true
        ;info   159, 402
        bsf     rb2bus_error___byte, rb2bus_error___bit
        ; line_number = 160
        ;  value := 0
        ;info   160, 403
        clrf    rb2bus_byte_get__value

        ; Recombine size1 = 0 || size2 = 0
rb2bus_byte_get__5:
        ; line_number = 145
        ;  if address_bit done
        ; # Regular data byte:
        ; line_number = 163
        ;  return value start
        ; line_number = 163
        ;info   163, 404
        movf    rb2bus_byte_get__value,w
        return  
        ; line_number = 163
        ;  return value done


        ; delay after procedure statements=non-uniform




        ; line_number = 166
        ;info   166, 406
        ; procedure rb2bus_byte_put
rb2bus_byte_put:
        ; Last argument is sitting in W; save into argument variable
        movwf   rb2bus_byte_put__value
        ; delay=4294967295
        ; line_number = 167
        ; argument value byte
rb2bus_byte_put__value equ globals___0+4
        ; line_number = 168
        ;  returns_nothing

        ; # This procedure will send {value} to the bus.  It automatically
        ; # consumes the echo that is on the bus.  If {rb2bus_error} is
        ; # set, this procedure does nothing.

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 174
        ;  if !rb2bus_error start
        ;info   174, 407
        ; =>bit_code_emit@symbol(): sym=rb2bus_error
        ; No 1TEST: true.size=0 false.size=18
        ; No 2TEST: true.size=0 false.size=18
        ; 1GOTO: Single test with GOTO
        btfsc   rb2bus_error___byte, rb2bus_error___bit
        goto    rb2bus_byte_put__4
        ; # Wait until {_txreg} is ready for a value:
        ; line_number = 176
        ;  while !_txif start
rb2bus_byte_put__1:
        ;info   176, 409
        ; =>bit_code_emit@symbol(): sym=_txif
        ; No 1TEST: true.size=0 false.size=2
        ; No 2TEST: true.size=0 false.size=2
        ; 1GOTO: Single test with GOTO
        btfsc   _txif___byte, _txif___bit
        goto    rb2bus_byte_put__2
        ; line_number = 177
        ; call wait()
        ;info   177, 411
        call    wait

        goto    rb2bus_byte_put__1
rb2bus_byte_put__2:
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 176
        ;  while !_txif done
        ; # Ship {value} out to the bus with 9th bit turned off:
        ; line_number = 180
        ;  _adden := _false
        ;info   180, 413
        bcf     _adden___byte, _adden___bit
        ; line_number = 181
        ;  _tx9d := _false
        ;info   181, 414
        bsf     __rp0___byte, __rp0___bit
        bcf     _tx9d___byte, _tx9d___bit
        ; line_number = 182
        ;  _txreg := value
        ;info   182, 416
        bcf     __rp0___byte, __rp0___bit
        movf    rb2bus_byte_put__value,w
        movwf   _txreg

        ; # Wait for the echo to show up:
        ; line_number = 185
        ;  while !_rcif start
rb2bus_byte_put__3:
        ;info   185, 419
        ; =>bit_code_emit@symbol(): sym=_rcif
        ; 1TEST: Single test with code in skip slot
        btfss   _rcif___byte, _rcif___bit
        ; # Still waiting:
        goto    rb2bus_byte_put__3
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 185
        ;  while !_rcif done
        ; # Throw the received byte away (store into {_w}).
        ; line_number = 188
        ;  assemble
        ;info   188, 421
        ; line_number = 189
        ;info   189, 421
        movf    _rcreg,w

        ; # Recover from any receive errors by toggling {_cren}:
        ; line_number = 192
        ;  if _oerr start
        ;info   192, 422
        ; =>bit_code_emit@symbol(): sym=_oerr
        ; 1TEST: Single test with code in skip slot
        btfsc   _oerr___byte, _oerr___bit
        ; line_number = 193
        ; _cren := _false
        ;info   193, 423
        bcf     _cren___byte, _cren___bit
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 192
        ;  if _oerr done
        ; line_number = 194
        ; if _ferr start
        ;info   194, 424
        ; =>bit_code_emit@symbol(): sym=_ferr
        ; 1TEST: Single test with code in skip slot
        btfsc   _ferr___byte, _ferr___bit
        ; line_number = 195
        ; _cren := _false
        ;info   195, 425
        bcf     _cren___byte, _cren___bit
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 194
        ; if _ferr done
        ; line_number = 196
        ; _cren := _true
        ;info   196, 426
        bsf     _cren___byte, _cren___bit


rb2bus_byte_put__4:
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 174
        ;  if !rb2bus_error done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 199
        ;info   199, 428
        ; procedure rb2bus_command
rb2bus_command:
        ; Last argument is sitting in W; save into argument variable
        movwf   rb2bus_command__command
        ; delay=4294967295
        ; line_number = 200
        ; argument command byte
rb2bus_command__command equ globals___0+7
        ; line_number = 201
        ;  returns_nothing

        ; # This procedure will process an shared {command}.  This procedure
        ; # accesses the global string {id}.

        ; line_number = 206
        ;  local new_address byte
rb2bus_command__new_address equ globals___0+5
        ; line_number = 207
        ;  local temp byte
rb2bus_command__temp equ globals___0+6

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 209
        ;  switch command & 7 start
        ;info   209, 429
        ; switch_before:(data:00=uu=>00 code:XX=cc=>XX) size=1
        movlw   rb2bus_command__13>>8
        movwf   __pclath
        movlw   7
        andwf   rb2bus_command__command,w
        ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
        addlw   rb2bus_command__13
        movwf   __pcl
        ; page_group 8
rb2bus_command__13:
        goto    rb2bus_command__14
        goto    rb2bus_command__14
        goto    rb2bus_command__14
        goto    rb2bus_command__14
        goto    rb2bus_command__9
        goto    rb2bus_command__10
        goto    rb2bus_command__11
        goto    rb2bus_command__12
        ; line_number = 210
        ; case 4
rb2bus_command__9:
        ; # 1111 1100 (Address_Set):
        ; # Return old address:
        ; line_number = 213
        ;  call rb2bus_byte_put(rb2bus_address)
        ;info   213, 443
        movf    rb2bus_address,w
        call    rb2bus_byte_put

        ; # Fetch new address:
        ; line_number = 216
        ;  new_address := rb2bus_byte_get()
        ;info   216, 445
        call    rb2bus_byte_get
        movwf   rb2bus_command__new_address
        ; line_number = 217
        ;  if new_address = 0 || new_address = rb2bus_address start
        ;info   217, 447
        ; Left minus Right
        movf    rb2bus_command__new_address,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=1 false.size=36
        ; No 2TEST: true.size=1 false.size=36
        ; 2GOTO: Single test with two GOTO's
        btfsc   __z___byte, __z___bit
        goto    rb2bus_command__5
        ; Recombine code1_bit_states != code2_bit_states
        ; &&||: index=1 true_delay=4294967295 false_delay=4294967295 goto_delay=4294967295
        ; Left minus Right
        movf    rb2bus_address,w
        subwf   rb2bus_command__new_address,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=4 false.size=27
        ; No 2TEST: true.size=4 false.size=27
        ; 2GOTO: Single test with two GOTO's
        btfss   __z___byte, __z___bit
        goto    rb2bus_command__6
rb2bus_command__5:
        ; line_number = 218
        ; call rb2bus_byte_put(0)
        ;info   218, 454
        movlw   0
        call    rb2bus_byte_put
        ; line_number = 219
        ;  rb2bus_error := _true
        ;info   219, 456
        bsf     rb2bus_error___byte, rb2bus_error___bit
        ; line_number = 220
        ;  rb2bus_selected := _false
        ;info   220, 457
        bcf     rb2bus_selected___byte, rb2bus_selected___bit
        goto    rb2bus_command__7
        ; 2GOTO: Starting code 2
rb2bus_command__6:
        ; # Return new address:
        ; line_number = 223
        ;  call rb2bus_byte_put(new_address)
        ;info   223, 459
        movf    rb2bus_command__new_address,w
        call    rb2bus_byte_put

        ; # Fetch new address again as a check:
        ; line_number = 226
        ;  temp := rb2bus_byte_get()
        ;info   226, 461
        call    rb2bus_byte_get
        movwf   rb2bus_command__temp
        ; line_number = 227
        ;  if temp != new_address start
        ;info   227, 463
        ; Left minus Right
        movf    rb2bus_command__new_address,w
        subwf   rb2bus_command__temp,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=14 false.size=4
        ; No 2TEST: true.size=14 false.size=4
        ; 2GOTO: Single test with two GOTO's
        btfss   __z___byte, __z___bit
        goto    rb2bus_command__3
        ; line_number = 232
        ; call rb2bus_eedata_write(new_address)
        ;info   232, 467
        movf    rb2bus_command__new_address,w
        call    rb2bus_eedata_write
        ; line_number = 233
        ;  temp := rb2bus_eedata_read()
        ;info   233, 469
        call    rb2bus_eedata_read
        movwf   rb2bus_command__temp
        ; line_number = 234
        ;  if temp = new_address start
        ;info   234, 471
        ; Left minus Right
        movf    rb2bus_command__new_address,w
        subwf   rb2bus_command__temp,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=3 false.size=1
        ; No 2TEST: true.size=3 false.size=1
        ; 2GOTO: Single test with two GOTO's
        btfss   __z___byte, __z___bit
        goto    rb2bus_command__1
        ; line_number = 235
        ; rb2bus_address := new_address
        ;info   235, 475
        movf    rb2bus_command__new_address,w
        movwf   rb2bus_address
        ; line_number = 236
        ;  call rb2bus_byte_put(rb2_ok)
        ;info   236, 477
        movlw   165
        goto    rb2bus_command__2
        ; 2GOTO: Starting code 2
rb2bus_command__1:
        ; line_number = 238
        ; call rb2bus_byte_put(0)
        ;info   238, 479
        movlw   0
rb2bus_command__2:
        ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        call    rb2bus_byte_put
        ; line_number = 234
        ;  if temp = new_address done
        goto    rb2bus_command__4
        ; 2GOTO: Starting code 2
rb2bus_command__3:
        ; line_number = 228
        ; call rb2bus_byte_put(0)
        ;info   228, 482
        movlw   0
        call    rb2bus_byte_put
        ; line_number = 229
        ;  rb2bus_error := _true
        ;info   229, 484
        bsf     rb2bus_error___byte, rb2bus_error___bit
        ; line_number = 230
        ;  rb2bus_selected := _false
        ;info   230, 485
        bcf     rb2bus_selected___byte, rb2bus_selected___bit
rb2bus_command__4:
        ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 227
        ;  if temp != new_address done
rb2bus_command__7:
        ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; &&||: index=0 true_delay=4294967295 false_delay=4294967295 goto_delay=4294967295
        ; &&||:: index=0 new_delay=4294967295 goto_delay=4294967295
        ; 2GOTO: No goto needed; true=rb2bus_command__5 false= true_size=1 false_size=36
        ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; 2GOTO: code2 final bitstates:(data:XX=cc=>XX code:XX=cc=>XX)
        ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 217
        ;  if new_address = 0 || new_address = rb2bus_address done
        goto    rb2bus_command__14
        ; line_number = 239
        ; case 5
rb2bus_command__10:
        ; # 1111 1101 (Id_next):
        ; line_number = 241
        ;  if rb2bus_index < id.size start
        ;info   241, 487
        movlw   21
        subwf   rb2bus_index,w
        ; =>bit_code_emit@symbol(): sym=__c
        ; No 1TEST: true.size=0 false.size=4
        ; No 2TEST: true.size=0 false.size=4
        ; 1GOTO: Single test with GOTO
        btfsc   __c___byte, __c___bit
        goto    rb2bus_command__8
        ; line_number = 242
        ; call rb2bus_byte_put(id[rb2bus_index])
        ;info   242, 491
        movf    rb2bus_index,w
        call    id
        call    rb2bus_byte_put
        ; line_number = 243
        ;  rb2bus_index := rb2bus_index + 1
        ;info   243, 494
        incf    rb2bus_index,f
        ; #if rb2bus_index >= id.size
        ; #	rb2bus_index := rb2bus_index - 1
rb2bus_command__8:
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 241
        ;  if rb2bus_index < id.size done
        goto    rb2bus_command__14
        ; line_number = 246
        ; case 6
rb2bus_command__11:
        ; # 1111 1110 (Id_start):
        ; line_number = 248
        ;  rb2bus_index := 0
        ;info   248, 496
        clrf    rb2bus_index
        goto    rb2bus_command__14
        ; line_number = 249
        ; case 7
rb2bus_command__12:
        ; # 1111 1111 (Deselect):
        ; line_number = 251
        ;  call rb2bus_deselect()
        ;info   251, 498
        call    rb2bus_deselect


rb2bus_command__14:
        ; line_number = 209
        ;  switch command & 7 done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; buffer = 'rb2bus_pic16f628'
        ; line_number = 26
        ;info   26, 500
        ; procedure rb2bus_initialize
rb2bus_initialize:
        ; Last argument is sitting in W; save into argument variable
        movwf   rb2bus_initialize__address
        ; delay=4294967295
        ; line_number = 27
        ; argument address byte
rb2bus_initialize__address equ globals___0+8
        ; line_number = 28
        ;  returns_nothing

        ; # This procedure is responsibile for initializing the UART
        ; # connected to the bus.  {address} is the address of this
        ; # slave module.  This code is specific to the PIC16F688.

        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 34
        ;  rb2bus_address := address
        ;info   34, 501
        movf    rb2bus_initialize__address,w
        movwf   rb2bus_address

        ; # Warm up the UART:
        ; line_number = 37
        ;  _trisb@1 := _true
        ;info   37, 503
rb2bus_initialize__select__1___byte equ _trisb
rb2bus_initialize__select__1___bit equ 1
        bsf     __rp0___byte, __rp0___bit
        bsf     rb2bus_initialize__select__1___byte, rb2bus_initialize__select__1___bit
        ; line_number = 38
        ;  _trisb@2 := _true
        ;info   38, 505
rb2bus_initialize__select__2___byte equ _trisb
rb2bus_initialize__select__2___bit equ 2
        bsf     rb2bus_initialize__select__2___byte, rb2bus_initialize__select__2___bit

        ; # Initialize the {_txsta} register:
        ; line_number = 41
        ;  _txsta := 0
        ;info   41, 506
        clrf    _txsta
        ; line_number = 42
        ;  _tx9 := _true
        ;info   42, 507
        bsf     _tx9___byte, _tx9___bit
        ; line_number = 43
        ;  _txen := _true
        ;info   43, 508
        bsf     _txen___byte, _txen___bit
        ; line_number = 44
        ;  _brgh := _true
        ;info   44, 509
        bsf     _brgh___byte, _brgh___bit

        ; # Initialize the {_rcsta} register:
        ; line_number = 47
        ;  _rcsta := 0
        ;info   47, 510
        bcf     __rp0___byte, __rp0___bit
        clrf    _rcsta
        ; line_number = 48
        ;  _spen := _true
        ;info   48, 512
        bsf     _spen___byte, _spen___bit
        ; line_number = 49
        ;  _rx9 := _true
        ;info   49, 513
        bsf     _rx9___byte, _rx9___bit
        ; line_number = 50
        ;  _cren := _true
        ;info   50, 514
        bsf     _cren___byte, _cren___bit
        ; #_adden := _true
        ; line_number = 52
        ;  _adden := _false
        ;info   52, 515
        bcf     _adden___byte, _adden___bit

        ; # Set up the baud rate generator:
        ; line_number = 55
        ;  _spbrg := spbrg_500k
        ;info   55, 516
        movlw   1
        bsf     __rp0___byte, __rp0___bit
        movwf   _spbrg

        ; line_number = 57
        ;  rb2bus_selected := _false
        ;info   57, 519
        bcf     __rp0___byte, __rp0___bit
        bcf     rb2bus_selected___byte, rb2bus_selected___bit
        ; line_number = 58
        ;  rb2bus_error := _false
        ;info   58, 521
        bcf     rb2bus_error___byte, rb2bus_error___bit
        ; line_number = 59
        ;  rb2bus_index := 0
        ;info   59, 522
        clrf    rb2bus_index

        ; # Deal with setting {rb2bus_address} from EEData memory:
        ; line_number = 62
        ;  rb2bus_address := rb2bus_eedata_read()
        ;info   62, 523
        call    rb2bus_eedata_read
        movwf   rb2bus_address
        ; line_number = 63
        ;  if rb2bus_address = 0 start
        ;info   63, 525
        ; Left minus Right
        movf    rb2bus_address,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=2 false.size=0
        ; No 2TEST: true.size=2 false.size=0
        ; 1GOTO: Single test with GOTO
        btfss   __z___byte, __z___bit
        goto    rb2bus_initialize__3
        ; # EE data not set, so use {address} passed in as a argument:
        ; line_number = 65
        ;  rb2bus_address := address
        ;info   65, 528
        movf    rb2bus_initialize__address,w
        movwf   rb2bus_address


        ; Recombine size1 = 0 || size2 = 0
rb2bus_initialize__3:
        ; line_number = 63
        ;  if rb2bus_address = 0 done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; line_number = 71
        ;info   71, 531
        ; procedure rb2bus_eedata_read
rb2bus_eedata_read:
        ; arguments_none
        ; line_number = 73
        ;  returns byte

        ; # This procedure will return the address stored in EEData.  If
        ; # there is no data, 0 is returned.

        ; line_number = 78
        ;  local temp1 byte
rb2bus_eedata_read__temp1 equ globals___0+9
        ; line_number = 79
        ;  local temp2 byte
rb2bus_eedata_read__temp2 equ globals___0+10

        ; # Read the first byte (the address):
        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 82
        ;  _eecon1 := 0
        ;info   82, 531
        bsf     __rp0___byte, __rp0___bit
        clrf    _eecon1
        ; line_number = 83
        ;  _eeadr := rb2bus_eedata_address
        ;info   83, 533
        movlw   126
        movwf   _eeadr
        ; line_number = 84
        ;  _rd := _true
        ;info   84, 535
        bsf     _rd___byte, _rd___bit
        ; line_number = 85
        ;  temp1 := _eedat
        ;info   85, 536
        movf    _eedat,w
        bcf     __rp0___byte, __rp0___bit
        movwf   rb2bus_eedata_read__temp1

        ; # Read the second byte (the 1'z complement)
        ; line_number = 88
        ;  _eeadr := _eeadr + 1
        ;info   88, 539
        bsf     __rp0___byte, __rp0___bit
        incf    _eeadr,f
        ; line_number = 89
        ;  _rd := _true
        ;info   89, 541
        bsf     _rd___byte, _rd___bit
        ; line_number = 90
        ;  temp2 := _eedat
        ;info   90, 542
        movf    _eedat,w
        bcf     __rp0___byte, __rp0___bit
        movwf   rb2bus_eedata_read__temp2

        ; # If they are 1's complement of one another, they are valid:
        ; line_number = 93
        ;  if temp1 = (0xff ^ temp2) start
        ;info   93, 545
        ; Left minus Right
        comf    rb2bus_eedata_read__temp2,w
        subwf   rb2bus_eedata_read__temp1,w
        ; =>bit_code_emit@symbol(): sym=__z
        ; No 1TEST: true.size=2 false.size=0
        ; No 2TEST: true.size=2 false.size=0
        ; 1GOTO: Single test with GOTO
        btfss   __z___byte, __z___bit
        goto    rb2bus_eedata_read__1
        ; # Return the valid address:
        ; line_number = 95
        ;  return temp1 start
        ; line_number = 95
        ;info   95, 549
        movf    rb2bus_eedata_read__temp1,w
        return  
        ; line_number = 95
        ;  return temp1 done

        ; Recombine size1 = 0 || size2 = 0
rb2bus_eedata_read__1:
        ; line_number = 93
        ;  if temp1 = (0xff ^ temp2) done
        ; # They are not 1's complement, so return 0 as an error:
        ; line_number = 98
        ;  return 0 start
        ; line_number = 98
        ;info   98, 551
        retlw   0
        ; line_number = 98
        ;  return 0 done


        ; delay after procedure statements=non-uniform




        ; line_number = 101
        ;info   101, 552
        ; procedure rb2bus_eedata_write
rb2bus_eedata_write:
        ; Last argument is sitting in W; save into argument variable
        movwf   rb2bus_eedata_write__address
        ; delay=4294967295
        ; line_number = 102
        ; argument address byte
rb2bus_eedata_write__address equ globals___0+11
        ; line_number = 103
        ;  returns_nothing

        ; # This procedure will write {address} into the EEData.  The
        ; # microcontroll pauses while the EEData is written.

        ; # Clear out the {_eecon1} register
        ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
        ; line_number = 109
        ;  _eecon1 := 0
        ;info   109, 553
        bsf     __rp0___byte, __rp0___bit
        clrf    _eecon1
        ; line_number = 110
        ;  _eeadr := rb2bus_eedata_address
        ;info   110, 555
        movlw   126
        movwf   _eeadr
        ; line_number = 111
        ;  _eedat := address
        ;info   111, 557
        bcf     __rp0___byte, __rp0___bit
        movf    rb2bus_eedata_write__address,w
        bsf     __rp0___byte, __rp0___bit
        movwf   _eedat

        ; # Write 2 bytes ({address} followed by {address}^0xff):
        ; line_number = 114
        ;  loop_exactly 2 start
        ;info   114, 561
rb2bus_eedata_write__1 equ globals___0+68
        movlw   2
        bcf     __rp0___byte, __rp0___bit
        movwf   rb2bus_eedata_write__1
rb2bus_eedata_write__2:
        ; # Set the data to write:

        ; # Set up the for the write:
        ; line_number = 118
        ;  _wren := _true
        ;info   118, 564
        bsf     __rp0___byte, __rp0___bit
        bsf     _wren___byte, _wren___bit
        ; line_number = 119
        ;  _gie := _false
        ;info   119, 566
        bcf     _gie___byte, _gie___bit
        ; line_number = 120
        ;  _eecon2 := 0x55
        ;info   120, 567
        movlw   85
        movwf   _eecon2
        ; line_number = 121
        ;  _eecon2 := 0xaa
        ;info   121, 569
        movlw   170
        movwf   _eecon2
        ; # Start the write:
        ; line_number = 123
        ;  _wr := _true
        ;info   123, 571
        bsf     _wr___byte, _wr___bit

        ; # Wait for write to complete:
        ; line_number = 126
        ;  while _wr start
rb2bus_eedata_write__3:
        ;info   126, 572
        ; =>bit_code_emit@symbol(): sym=_wr
        ; 1TEST: Single test with code in skip slot
        btfsc   _wr___byte, _wr___bit
        ; line_number = 127
        ; do_nothing
        ;info   127, 573

        goto    rb2bus_eedata_write__3
        ; Recombine size1 = 0 || size2 = 0
        ; line_number = 126
        ;  while _wr done
        ; # Disable writing:
        ; line_number = 130
        ;  _wren := _false
        ;info   130, 574
        bcf     _wren___byte, _wren___bit

        ; # Prepare the second byte of data:
        ; line_number = 133
        ;  _eeadr := _eeadr + 1
        ;info   133, 575
        incf    _eeadr,f
        ; line_number = 134
        ;  _eedat := address ^ 0xff
        ;info   134, 576
        bcf     __rp0___byte, __rp0___bit
        comf    rb2bus_eedata_write__address,w
        bsf     __rp0___byte, __rp0___bit
        movwf   _eedat





        bcf     __rp0___byte, __rp0___bit
        ; line_number = 114
        ;  loop_exactly 2 wrap-up
        decfsz  rb2bus_eedata_write__1,f
        goto    rb2bus_eedata_write__2
        ; line_number = 114
        ;  loop_exactly 2 done
        ; delay after procedure statements=non-uniform
        ; Implied return
        retlw   0




        ; Configuration bits
        ; address = 0x2007, fill = 0x200
        ; cp = off (0x3c00)
        ; cpd = off (0x100)
        ; lvp = off (0x0)
        ; boden = off (0x0)
        ; mclre = off (0x0)
        ; pwrte = off (0x8)
        ; wdte = off (0x0)
        ; fosc = hs (0x2)
        ; 16138 = 0x3f0a
        __config 16138
        ; Define start addresses for data regions
        ; Region="shared___globals" Address=112" Size=16 Bytes=0 Bits=0 Available=16
        ; Region="globals___0" Address=32" Size=80 Bytes=69 Bits=6 Available=10
        ; Region="globals___1" Address=160" Size=80 Bytes=0 Bits=0 Available=80
        ; Region="globals___2" Address=288" Size=48 Bytes=0 Bits=0 Available=48
        ; Region="shared___globals" Address=112" Size=16 Bytes=0 Bits=0 Available=16
        end
