        radix   dec
        ; Code bank 0; Start address: 0; End address: 4095
        org     0
        ; #pin 5 = rc5_in, name = serial_in
        ; #pin 6 = rc4_out, name = serial_out

        ; Define start addresses for data regions
shared___globals equ 112
globals___0 equ 32
globals___1 equ 160
globals___2 equ 288
globals___3 equ 416
__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-2005 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).
        ; # The controller will display the 16 characters of data starting at
        ; # 0x00 + N on the first line, and 0x20 + N on the second line, where
        ; # N is a number between 0 and 0x18(=24).

        ; # The LCD32 module provides the user with 4 lines of 16 characters
        ; # each.  These are arranged as follows:
        ; #
        ; #   Line  Addresses Shift(N)
        ; #     0    00 - 0f    00
        ; #     1    20 - 2f    00
        ; #     2    10 - 1f    10
        ; #     3    30 - 3f    10
        ; #
        ; # In order to display lines 0 and 1, the shift amount (N) is set to 0.
        ; # In order to display lines 2 and 3, the shift amount is set to 0x10(=16).
        ; # The Samsung chip can only change the shift amount in increments of
        ; # +/- 1 per shift command.  However, since the command only requires
        ; # ~40uS, 16 shifts can take place so fast that it appears to be
        ; # instantenous to the end user.

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

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

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


        ; # Register/bit bindings:

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

        ; line_number = 197
        ; register _indf = 
_indf equ 0

        ; line_number = 199
        ; register _tmr0 = 
_tmr0 equ 1

        ; line_number = 201
        ; register _pcl = 
_pcl equ 2

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

        ; line_number = 213
        ; register _fsr = 
_fsr equ 4

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

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

        ; line_number = 233
        ; register _pclath = 
_pclath equ 10

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

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

        ; line_number = 255
        ; register _tmr1l = 
_tmr1l equ 14

        ; line_number = 257
        ; register _tmr1h = 
_tmr1h equ 15

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

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

        ; line_number = 277
        ; register _spbrgh = 
_spbrgh equ 18

        ; line_number = 279
        ; register _spbrg = 
_spbrg equ 19

        ; line_number = 281
        ; register _rcreg = 
_rcreg equ 20

        ; line_number = 283
        ; register _txreg = 
_txreg equ 21

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

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

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

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

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

        ; line_number = 326
        ; register _adresh = 
_adresh equ 30

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

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

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

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

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

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

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

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

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

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

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

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

        ; line_number = 423
        ; register _eedath = 
_eedath equ 151

        ; line_number = 425
        ; register _eeadrh = 
_eeadrh equ 152

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

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

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

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

        ; line_number = 462
        ; register _eecon2 = 
_eecon2 equ 157

        ; line_number = 464
        ; register _adresl = 
_adresl equ 158

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

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

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

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

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


        ; buffer = 'lcd32'
        ; line_number = 36
        ; library clock8mhz exited
        ; #library bit_bang


        ; # Number of instructions required to delay a microsecond:
        ; line_number = 42
        ; constant microsecond = instruction_rate / 1000000
microsecond equ 2

        ; # Port stuff:

        ; line_number = 46
        ; constant trisc_mask = 0x30
trisc_mask equ 48
        ; line_number = 47
        ; constant db47_mask = 0xf
db47_mask equ 15

        ; line_number = 49
        ; package pdip
        ; line_number = 50
        ; pin 1 = power_supply
        ; line_number = 51
        ;  pin 2 = ra5_out, name = rs
rs___byte equ _porta
rs___bit equ 5
        ; line_number = 52
        ;  pin 3 = ra4_in, name = lines34
lines34___byte equ _porta
lines34___bit equ 4
        ; line_number = 53
        ;  pin 4 = ra3_in, name = debug_mode
debug_mode___byte equ _porta
debug_mode___bit equ 4
        ; #pin 5 = rc5_in, name = serial_in
        ; #pin 6 = rc4_out, name = serial_out
        ; line_number = 56
        ;  pin 5 = rx, name = serial_in
serial_in___byte equ _portc
serial_in___bit equ 5
        ; line_number = 57
        ;  pin 6 = tx, name = serial_out
serial_out___byte equ _portc
serial_out___bit equ 4
        ; line_number = 58
        ;  pin 7 = rc3_out, name = db7
db7___byte equ _portc
db7___bit equ 3
        ; line_number = 59
        ;  pin 8 = rc2_out, name = db6
db6___byte equ _portc
db6___bit equ 2
        ; line_number = 60
        ;  pin 9 = rc1_out, name = db5
db5___byte equ _portc
db5___bit equ 1
        ; line_number = 61
        ;  pin 10 = rc0_out, name = db4
db4___byte equ _portc
db4___bit equ 0
        ; line_number = 62
        ;  pin 11 = ra2_out, name = rw
rw___byte equ _porta
rw___bit equ 2
        ; line_number = 63
        ;  pin 12 = ra1_out, name = db3
db3___byte equ _porta
db3___bit equ 1
        ; line_number = 64
        ;  pin 13 = ra0_out, name = e
e___byte equ _porta
e___bit equ 0
        ; line_number = 65
        ;  pin 14 = ground

        ; line_number = 67
        ; constant baud_rate = 2400
baud_rate equ 2400
        ; line_number = 68
        ; constant instructions_per_bit = instruction_rate / baud_rate
instructions_per_bit equ 833
        ; line_number = 69
        ; constant delays_per_bit = 3
delays_per_bit equ 3
        ; line_number = 70
        ; constant instructions_per_delay = instructions_per_bit / delays_per_bit
instructions_per_delay equ 277
        ; line_number = 71
        ; constant extra_instructions = 5
extra_instructions equ 5
        ; line_number = 72
        ; constant delay_instructions = instructions_per_delay - extra_instructions
delay_instructions equ 272

        ; # 2400 baud (BRGH=1, BRG16=1)
        ; line_number = 75
        ; constant br2400 = (clock_rate / (baud_rate * 4)) - 1
br2400 equ 832
        ; line_number = 76
        ; constant br2400_low = br2400 & 0xff
br2400_low equ 64
        ; line_number = 77
        ; constant br2400_high = br2400 >> 8
br2400_high equ 3

        ; line_number = 79
        ; constant line_mask = 3
line_mask equ 3
        ; line_number = 80
        ; constant column_mask = 0xf
column_mask equ 15
        ; line_number = 81
        ; constant cursor_mode_mask = 3
cursor_mode_mask equ 3

        ; line_number = 83
        ; global shift byte
shift equ globals___0
        ; line_number = 84
        ; global column byte
column equ globals___0+1
        ; line_number = 85
        ; global line byte
line equ globals___0+2
        ; line_number = 86
        ; global cursor_mode byte
cursor_mode equ globals___0+3
        ; line_number = 87
        ; global font_address byte
font_address equ globals___0+4

        ; line_number = 89
        ; global command_previous byte
command_previous equ globals___0+5
        ; line_number = 90
        ; global command_last byte
command_last equ globals___0+6
        ; line_number = 91
        ; global sent_previous byte
sent_previous equ globals___0+7
        ; line_number = 92
        ; global sent_last byte
sent_last equ globals___0+8

        ; line_number = 94
        ; constant queue_size = 4
queue_size equ 4
        ; line_number = 95
        ; global data_queue[queue_size] array[byte]
data_queue equ globals___0+9
        ; line_number = 96
        ; global control_queue[queue_size] array[byte]
control_queue equ globals___0+13
        ; line_number = 97
        ; global processed byte
processed equ globals___0+17
        ; line_number = 98
        ; global available byte
available equ globals___0+18

        ; # The field layout of a control mask byte is:
        ; #
        ; #  Bits   Name        Description
        ; #  0-3    Count       Execute command count - 1 times (i.e. 0 => execute once)
        ; #  4      Data Write  0 => Command Write(RS=0); 1=> Data Write(RS=1)
        ; #  5      NOP         No Operation 1=>ignore command; 0=>do command

        ; line_number = 107
        ; constant count_mask = 0x0f
count_mask equ 15
        ; line_number = 108
        ; constant data_write = 0x10
data_write equ 16
        ; line_number = 109
        ; constant command_write = 0
command_write equ 0
        ; line_number = 110
        ; constant nop_mask = 0x20
nop_mask equ 32

        ; line_number = 112
        ; procedure main
main:
        ; Initialize some registers
        clrf    _adcon0
        bsf     __rp0___byte, __rp0___bit
        clrf    _ansel
        movlw   7
        bcf     __rp0___byte, __rp0___bit
        movwf   _cmcon0
        movlw   24
        bsf     __rp0___byte, __rp0___bit
        movwf   _trisa
        movlw   48
        movwf   _trisc
        ; arguments_none
        ; line_number = 114
        ;  returns_nothing

        ; line_number = 116
        ;  local command byte
main__command equ globals___0+19
        ; line_number = 117
        ;  local temporary byte
main__temporary equ globals___0+20
        ; line_number = 118
        ;  local id_index byte
main__id_index equ globals___0+21
        ; line_number = 119
        ;  local glitch byte
main__glitch equ globals___0+22

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

        ; # Warm up the UART:
        ; line_number = 125
        ;  _txsta := 0x24
        movlw   36
        bcf     __rp0___byte, __rp0___bit
        movwf   _txsta
        ; line_number = 126
        ;  _rcsta := 0x90
        movlw   144
        movwf   _rcsta
        ; line_number = 127
        ;  _baudctl := 0x08
        movlw   8
        movwf   _baudctl
        ; line_number = 128
        ;  _spbrg := br2400_low
        movlw   64
        movwf   _spbrg
        ; line_number = 129
        ;  _spbrgh := br2400_high
        movlw   3
        movwf   _spbrgh

        ; line_number = 131
        ;  column := 0
        movlw   0
        movwf   column
        ; line_number = 132
        ;  line := 0
        movlw   0
        movwf   line
        ; line_number = 133
        ;  cursor_mode := 3
        movlw   3
        movwf   cursor_mode
        ; line_number = 134
        ;  shift := 0
        movlw   0
        movwf   shift
        ; line_number = 135
        ;  processed := 0
        movlw   0
        movwf   processed
        ; line_number = 136
        ;  available := 0
        movlw   0
        movwf   available
        ; line_number = 137
        ;  font_address := 0
        movlw   0
        movwf   font_address

        ; line_number = 139
        ;  glitch := 0
        movlw   0
        movwf   main__glitch
        ; line_number = 140
        ;  id_index := 0
        movlw   0
        movwf   main__id_index

        ; # Initialize the LCD:
        ; line_number = 143
        ;  call lcd_init()
        call    lcd_init

        ; # Output the message:
        ; line_number = 146
        ;  call line_put(0, '1')
        movlw   0
        movwf   line_put__new_line
        movlw   49
        call    line_put
        ; line_number = 147
        ;  call line_put(1, '2')
        movlw   1
        movwf   line_put__new_line
        movlw   50
        call    line_put
        ; line_number = 148
        ;  call line_put(2, '3')
        movlw   2
        movwf   line_put__new_line
        movlw   51
        call    line_put
        ; line_number = 149
        ;  call line_put(3, '4')
        movlw   3
        movwf   line_put__new_line
        movlw   52
        call    line_put
        ; line_number = 150
        ;  line := 0
        movlw   0
        movwf   line

        ; line_number = 152
        ;  call lcd_command(0x80)
        movlw   128
        call    lcd_command

        ; line_number = 154
        ;  loop_forever start
main__1:
        ; # Get a command byte:
        ; line_number = 156
        ;  command := byte_get()
        call    byte_get
        movwf   main__command

        ; # The byte_get() procedure returns after 10-2/3 bits have
        ; # been processed.  That means that the serial input bit
        ; # should be processing the stop bit.  After all commands
        ; # that do not return a byte, we must call back into byte_get()
        ; # within about 1/3 of a bit time (138uS).  Anything longer,
        ; # and we might miss the beginning of the start bit for the
        ; # next command byte.
        ; #
        ; # The operations to access the LCD controller take 39uS
        ; # to write a command or data and 43uS to read some data.
        ; # What this means is that for commands that do not return
        ; # any data, we only have time to perform two LCD access
        ; # commands.   There is one command, clear display, that
        ; # that takes 1.53mS.  In addition, some commands, like
        ; # line feed, that needs to clear the entire contents
        ; # of the next line.  This takes 16+ commands.
        ; #
        ; # The solution to all of these problems is to have all of
        ; # the LCD access commands take place from the delay()
        ; # procedure.  As long as everything important is performed
        ; # there and in the right sequence, we won't violate the
        ; # "do everything in 1/3 of a bit time" rule in this procedure.
        ; #
        ; # For more details on the architecture of the delay procedure,
        ; # see the delay procedure comments further below.

        ; # Zero the command queue:
        ; line_number = 185
        ;  available := 0
        movlw   0
        movwf   available
        ; line_number = 186
        ;  processed := 0
        movlw   0
        movwf   processed

        ; # Dispatch on the command:
        ; line_number = 189
        ;  switch command >> 6 start
        movlw   main__59>>8
        movwf   __pclath
main__60 equ globals___0+38
        swapf   main__command,w
        movwf   main__60
        rrf     main__60,f
        rrf     main__60,w
        andlw   3
        addlw   main__59
        movwf   __pcl
        ; page_group 4
main__59:
        goto    main__55
        goto    main__56
        goto    main__57
        goto    main__58
        ; line_number = 190
        ; case 0
main__55:
        ; # 00xx xxxx
        ; line_number = 192
        ;  switch (command >> 3) & 7 start
        movlw   main__11>>8
        movwf   __pclath
main__12 equ globals___0+38
        rrf     main__command,w
        movwf   main__12
        rrf     main__12,f
        rrf     main__12,w
        andlw   7
        addlw   main__11
        movwf   __pcl
        ; page_group 8
main__11:
        goto    main__10
        goto    main__9
        goto    main__13
        goto    main__13
        goto    main__10
        goto    main__10
        goto    main__10
        goto    main__10
        ; line_number = 193
        ; case 1
main__9:
        ; # 0000 1xxx
        ; line_number = 195
        ;  switch command & 7 start
        ; line_number = 196
        ; case_maximum 7
        movlw   main__7>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__7
        movwf   __pcl
        ; page_group 8
main__7:
        goto    main__3
        goto    main__8
        goto    main__4
        goto    main__8
        goto    main__5
        goto    main__6
        goto    main__8
        goto    main__8
        ; line_number = 197
        ; case 0
main__3:
        ; # 0000 1000 (Back Space):
        ; line_number = 199
        ;  if column != 0 start
        ; Left minus Right
        movf    column,w
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true_code.size=0 && false_code.size=1
        btfss   __z___byte, __z___bit
        ; line_number = 200
        ; column := column - 1
        decf    column,f
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; line_number = 199
        ;  if column != 0 done
        goto    main__8
        ; line_number = 201
        ; case 2
main__4:
        ; # 0000 1010 (Line Feed):
        ; line_number = 203
        ;  line := (line + 1) & line_mask
        incf    line,w
        andlw   3
        movwf   line
        ; line_number = 204
        ;  column := 0
        movlw   0
        movwf   column
        ; # Force cursor to correct location:
        ; line_number = 206
        ;  call cursor_enqueue()
        call    cursor_enqueue

        ; # Write out 16 spaces:
        ; line_number = 209
        ;  call enqueue(data_write | (16 - 1), ' ')
        ; Expression is strictly a constant
        movlw   31
        movwf   enqueue__control
        movlw   32
        call    enqueue
        ; # There are now 2 commands in queue:
        goto    main__8
        ; line_number = 211
        ; case 4
main__5:
        ; # 0000 1100 (Form Feed):

        ; # Clear the display:
        ; line_number = 215
        ;  call enqueue(command_write, 0)
        clrf    enqueue__control
        movlw   0
        call    enqueue
        ; # The clear display command takes 1.53mS;
        ; # 12 * .138 = 1.656mS.
        ; line_number = 218
        ;  call enqueue(nop_mask | (12 - 1), 0)
        ; Expression is strictly a constant
        movlw   43
        movwf   enqueue__control
        movlw   0
        call    enqueue
        ; line_number = 219
        ;  line := 0
        movlw   0
        movwf   line
        ; line_number = 220
        ;  column := 0
        movlw   0
        movwf   column
        ; line_number = 221
        ;  shift := 0
        movlw   0
        movwf   shift
        goto    main__8
        ; line_number = 222
        ; case 5
main__6:
        ; # 0000 1101 (Carriage Return):
        ; line_number = 224
        ;  column := 0
        movlw   0
        movwf   column
        ; line_number = 225
        ;  if !debug_mode start
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true.size=0 && false.size>1
        ; bit_code_emit_helper1: body_code.size=2 true_test=false body_code.delay=0 (non-uniform delay)
        btfsc   debug_mode___byte, debug_mode___bit
        goto    main__2
        ; line_number = 226
        ; line := 0
        movlw   0
        movwf   line
main__2:
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=debug_mode (data:00=>00 code:XX=>XX)
        ; line_number = 225
        ;  if !debug_mode done
main__8:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 195
        ;  switch command & 7 done
        ; line_number = 227
        ; call cursor_enqueue()
        call    cursor_enqueue
        goto    main__13
        ; line_number = 228
        ; case 0, 4, 5, 6, 7
main__10:
        ; # 0000 0xxx or 001x xxxx:
        ; line_number = 230
        ;  call character_put(command)
        movf    main__command,w
        call    character_put
main__13:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 192
        ;  switch (command >> 3) & 7 done
        goto    main__61
        ; line_number = 231
        ; case 1
main__56:
        ; # 01xx xxxx:
        ; line_number = 233
        ;  call character_put(command)
        movf    main__command,w
        call    character_put
        goto    main__61
        ; line_number = 234
        ; case 2
main__57:
        ; # 10xx xxxx:
        ; line_number = 236
        ;  switch (command >> 3) & 7 start
        ; line_number = 237
        ; case_maximum 7
        movlw   main__37>>8
        movwf   __pclath
main__38 equ globals___0+38
        rrf     main__command,w
        movwf   main__38
        rrf     main__38,f
        rrf     main__38,w
        andlw   7
        addlw   main__37
        movwf   __pcl
        ; page_group 8
main__37:
        goto    main__32
        goto    main__33
        goto    main__34
        goto    main__34
        goto    main__35
        goto    main__35
        goto    main__36
        goto    main__39
        ; line_number = 238
        ; case 0
main__32:
        ; # 1000 0xxx:
        ; line_number = 240
        ;  line := command & line_mask
        movlw   3
        andwf   main__command,w
        movwf   line
        ; line_number = 241
        ;  column := 0
        movlw   0
        movwf   column
        ; line_number = 242
        ;  if command@2 start
main__select__14___byte equ main__command
main__select__14___bit equ 2
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true_code.size = 0 && false_code.size > 1
        ; bit_code_emit_helper1: body_code.size=5 true_test=true body_code.delay=0 (non-uniform delay)
        btfss   main__select__14___byte, main__select__14___bit
        goto    main__15
        ; # Clear the line:
        ; line_number = 244
        ;  call cursor_enqueue()
        call    cursor_enqueue
        ; line_number = 245
        ;  call enqueue(data_write | (16 - 1), ' ')
        ; Expression is strictly a constant
        movlw   31
        movwf   enqueue__control
        movlw   32
        call    enqueue
        ; line_number = 246
        ;  do_nothing
        ; Recombine size1 = 0 || size2 = 0
main__15:
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=main__select__14 (data:00=>00 code:XX=>XX)
        ; line_number = 242
        ;  if command@2 done
        ; line_number = 247
        ; call cursor_enqueue()
        call    cursor_enqueue
        goto    main__39
        ; line_number = 248
        ; case 1
main__33:
        ; # 1000 1xxx:
        ; line_number = 250
        ;  switch command & 7 start
        movlw   main__25>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__25
        movwf   __pcl
        ; page_group 8
main__25:
        goto    main__20
        goto    main__20
        goto    main__20
        goto    main__20
        goto    main__21
        goto    main__22
        goto    main__23
        goto    main__24
        ; line_number = 251
        ; case 0, 1, 2, 3
main__20:
        ; # 1000 10vb (Cursor Mode Set):
        ; line_number = 253
        ;  cursor_mode := command & cursor_mode_mask
        movlw   3
        andwf   main__command,w
        movwf   cursor_mode
        ; line_number = 254
        ;  call enqueue(command_write, 0xc | cursor_mode)
        clrf    enqueue__control
        movlw   12
        iorwf   cursor_mode,w
        call    enqueue
        goto    main__26
        ; line_number = 255
        ; case 4
main__21:
        ; # 1000 1100 (Cursor Mode Read):
        ; line_number = 257
        ;  temporary := cursor_mode
        movf    cursor_mode,w
        movwf   main__temporary
        ; line_number = 258
        ;  if debug_mode start
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: True.size=1 False.size=0
        btfsc   debug_mode___byte, debug_mode___bit
        ; line_number = 259
        ; temporary@2 := 1
main__select__16___byte equ main__temporary
main__select__16___bit equ 2
        bsf     main__select__16___byte, main__select__16___bit
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=debug_mode (data:00=>00 code:XX=>XX)
        ; line_number = 258
        ;  if debug_mode done
        ; line_number = 260
        ; if lines34 start
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: True.size=1 False.size=0
        btfsc   lines34___byte, lines34___bit
        ; line_number = 261
        ; temporary@3 := 1
main__select__17___byte equ main__temporary
main__select__17___bit equ 3
        bsf     main__select__17___byte, main__select__17___bit
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=lines34 (data:00=>00 code:XX=>XX)
        ; line_number = 260
        ; if lines34 done
        ; line_number = 262
        ; call byte_put(temporary)
        movf    main__temporary,w
        call    byte_put
        goto    main__26
        ; line_number = 263
        ; case 5
main__22:
        ; # 1000 1101 (Character Read):
        ; line_number = 265
        ;  temporary := lcd_read()
        call    lcd_read
        movwf   main__temporary
        ; line_number = 266
        ;  call byte_put(temporary)
        movf    main__temporary,w
        call    byte_put
        ; line_number = 267
        ;  if column = 15 start
        ; Left minus Right
        movlw   241
        addwf   column,w
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true.size>1 false.size=1; no GOTO's
        btfss   __z___byte, __z___bit
        goto    main__18
        ; line_number = 268
        ; line := (line + 1) & line_mask
        incf    line,w
        andlw   3
        movwf   line
        ; line_number = 269
        ;  column := 0
        movlw   0
        movwf   column
        goto    main__19
main__18:
        ; line_number = 271
        ; column := column + 1
        incf    column,f
main__19:
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; line_number = 267
        ;  if column = 15 done
        ; line_number = 272
        ; call cursor_enqueue()
        call    cursor_enqueue
        goto    main__26
        ; line_number = 273
        ; case 6
main__23:
        ; # 1000 1110 (Line Read):
        ; line_number = 275
        ;  call byte_put(line)
        movf    line,w
        call    byte_put
        goto    main__26
        ; line_number = 276
        ; case 7
main__24:
        ; # 1000 1111 (Column Read):
        ; line_number = 278
        ;  call byte_put(column)
        movf    column,w
        call    byte_put
main__26:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 250
        ;  switch command & 7 done
        goto    main__39
        ; line_number = 279
        ; case 2, 3
main__34:
        ; # 1001 xxxx (Column Set):
        ; line_number = 281
        ;  column := command & column_mask
        movlw   15
        andwf   main__command,w
        movwf   column
        ; line_number = 282
        ;  call cursor_enqueue()
        call    cursor_enqueue
        goto    main__39
        ; line_number = 283
        ; case 4, 5
main__35:
        ; # 1010 xxxx (Column Set and Clear):
        ; line_number = 285
        ;  column := column & column_mask
        movlw   15
        andwf   column,f
        ; line_number = 286
        ;  call cursor_enqueue()
        call    cursor_enqueue
        ; line_number = 287
        ;  call enqueue(data_write | (16 - column), ' ')
        comf    column,w
        addlw   17
        iorlw   16
        movwf   enqueue__control
        movlw   32
        call    enqueue
        ; line_number = 288
        ;  call cursor_enqueue()
        call    cursor_enqueue
        goto    main__39
        ; line_number = 289
        ; case 6
main__36:
        ; # 1011 0xxx:
        ; line_number = 291
        ;  switch command & 7 start
        ; line_number = 292
        ; case_maximum 7
        movlw   main__30>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__30
        movwf   __pcl
        ; page_group 8
main__30:
        goto    main__27
        goto    main__28
        goto    main__29
        goto    main__31
        goto    main__31
        goto    main__31
        goto    main__31
        goto    main__31
        ; line_number = 293
        ; case 0
main__27:
        ; # 1011 0000 (Set Font Address):
        ; line_number = 295
        ;  font_address := byte_get() & 0x1f
        call    byte_get
        andlw   31
        movwf   font_address
        goto    main__31
        ; line_number = 296
        ; case 1
main__28:
        ; # 1011 0001 (Read Font Address):
        ; line_number = 298
        ;  call byte_put(font_address)
        movf    font_address,w
        call    byte_put
        goto    main__31
        ; line_number = 299
        ; case 2
main__29:
        ; # 1011 0010 (Read Font Line):
        ; # Set the font address, and access font memory:
        ; line_number = 302
        ;  call lcd_command(0x40 | font_address)
        movlw   64
        iorwf   font_address,w
        call    lcd_command
        ; # Read the data:
        ; line_number = 304
        ;  temporary := lcd_read()
        call    lcd_read
        movwf   main__temporary
        ; # Force back to display memory:
        ; line_number = 306
        ;  call cursor_position()
        call    cursor_position
        ; line_number = 307
        ;  font_address := font_address + 1
        incf    font_address,f
        ; # Ship the data back:
        ; line_number = 309
        ;  call byte_put(temporary)
        movf    main__temporary,w
        call    byte_put
main__31:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 291
        ;  switch command & 7 done
main__39:
        ; switch end:(data:00=>00 code:XX=>XX)
        ; line_number = 236
        ;  switch (command >> 3) & 7 done
        goto    main__61
        ; line_number = 310
        ; case 3
main__58:
        ; # 11xx xxxx:
        ; line_number = 312
        ;  switch (command >> 3) & 7 start
        movlw   main__52>>8
        movwf   __pclath
main__53 equ globals___0+38
        rrf     main__command,w
        movwf   main__53
        rrf     main__53,f
        rrf     main__53,w
        andlw   7
        addlw   main__52
        movwf   __pcl
        ; page_group 8
main__52:
        goto    main__50
        goto    main__50
        goto    main__50
        goto    main__50
        goto    main__54
        goto    main__54
        goto    main__54
        goto    main__51
        ; line_number = 313
        ; case 0, 1, 2, 3
main__50:
        ; # 110p pppp (Write Font Line):
        ; # Set font address and access font memory:
        ; line_number = 316
        ;  call enqueue(command_write, 0x40 | font_address)
        clrf    enqueue__control
        movlw   64
        iorwf   font_address,w
        call    enqueue
        ; # Write one line of font memory:
        ; line_number = 318
        ;  call enqueue(data_write, command & 0x1f)
        movlw   16
        movwf   enqueue__control
        movlw   31
        andwf   main__command,w
        call    enqueue
        ; # Force back to display memory:
        ; line_number = 320
        ;  call cursor_enqueue()
        call    cursor_enqueue
        ; line_number = 321
        ;  font_address := font_address + 1
        incf    font_address,f
        goto    main__54
        ; line_number = 322
        ; case 7
main__51:
        ; # 1111 1xxx:
        ; line_number = 324
        ;  switch command & 7 start
        movlw   main__48>>8
        movwf   __pclath
        movlw   7
        andwf   main__command,w
        addlw   main__48
        movwf   __pcl
        ; page_group 8
main__48:
        goto    main__40
        goto    main__41
        goto    main__42
        goto    main__43
        goto    main__44
        goto    main__45
        goto    main__46
        goto    main__47
        ; line_number = 325
        ; case 0
main__40:
        ; This case body wants this bit set
        bsf     __rp0___byte, __rp0___bit
        ; # 1111 1000 (Clock Decrement):
        ; #_osccal := _osccal - _osccal_lsb
        ; line_number = 328
        ;  _osctune := _osctune - _osccal_lsb
        decf    _osctune,f
        goto    main__49
        ; line_number = 329
        ; case 1
main__41:
        ; This case body wants this bit set
        bsf     __rp0___byte, __rp0___bit
        ; # 1111 1001 (Clock Increment):
        ; #_osccal := _osccal + _osccal_lsb
        ; line_number = 332
        ;  _osctune := _osctune + _osccal_lsb
        incf    _osctune,f
        goto    main__49
        ; line_number = 333
        ; case 2
main__42:
        ; This case body wants this bit set
        bsf     __rp0___byte, __rp0___bit
        ; # 1111 1010 (Clock Read):
        ; #call byte_put(_osccal)
        ; line_number = 336
        ;  call byte_put(_osctune)
        movf    _osctune,w
        bcf     __rp0___byte, __rp0___bit
        call    byte_put
        goto    main__49
        ; line_number = 337
        ; case 3
main__43:
        ; # 1111 1011 (Clock Pulse):
        ; line_number = 339
        ;  call byte_put(0)
        movlw   0
        call    byte_put
        goto    main__49
        ; line_number = 340
        ; case 4
main__44:
        ; # 1111 1100 (ID Next):
        ; line_number = 342
        ;  call byte_put(id[id_index])
        movf    main__id_index,w
        call    id
        call    byte_put
        ; line_number = 343
        ;  id_index := id_index + 1
        incf    main__id_index,f
        goto    main__49
        ; line_number = 344
        ; case 5
main__45:
        ; # 1111 1101 (ID Reset):
        ; line_number = 346
        ;  id_index := 0
        movlw   0
        movwf   main__id_index
        goto    main__49
        ; line_number = 347
        ; case 6
main__46:
        ; # 1111 1110 (Glitch Read):
        ; line_number = 349
        ;  call byte_put(glitch)
        movf    main__glitch,w
        call    byte_put
        ; line_number = 350
        ;  glitch := 0
        movlw   0
        movwf   main__glitch
        goto    main__49
        ; line_number = 351
        ; case 7
main__47:
        ; # 1111 1111 (Glitch):
        ; line_number = 353
        ;  if glitch != 0xff start
        ; Left minus Right
        incf    main__glitch,w
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true_code.size=0 && false_code.size=1
        btfss   __z___byte, __z___bit
        ; line_number = 354
        ; glitch := glitch + 1
        incf    main__glitch,f


        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; line_number = 353
        ;  if glitch != 0xff done
main__49:
        ; switch end:(data:00=>0? code:XX=>XX)
        ; line_number = 324
        ;  switch command & 7 done
main__54:
        ; switch end:(data:00=>0? code:XX=>XX)
        ; line_number = 312
        ;  switch (command >> 3) & 7 done
main__61:
        ; switch end:(data:00=>0? code:XX=>XX)
        ; line_number = 189
        ;  switch command >> 6 done
        ; line_number = 154
        ;  loop_forever wrap-up
        ; Need to adjust code banks to match front of loop
        bcf     __rp0___byte, __rp0___bit
        goto    main__1
        ; line_number = 154
        ;  loop_forever done
        ; delay after procedure statements=non-uniform




        ; line_number = 357
        ; procedure line_put
line_put:
        ; Last argument is sitting in W; save into argument variable
        movwf   line_put__character
        ; delay=4294967295
        ; line_number = 358
        ; argument new_line byte
line_put__new_line equ globals___0+23
        ; line_number = 359
        ; argument character byte
line_put__character equ globals___0+24
        ; line_number = 360
        ;  returns_nothing

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 362
        ;  line := new_line
        movf    line_put__new_line,w
        movwf   line
        ; line_number = 363
        ;  column := 0
        movlw   0
        movwf   column
        ; line_number = 364
        ;  call cursor_position()
        call    cursor_position
        ; line_number = 365
        ;  loop_exactly 16 start
line_put__1 equ globals___0+39
        movlw   16
        movwf   line_put__1
line_put__2:
        ; line_number = 366
        ; call lcd_character_put(character)
        movf    line_put__character,w
        call    lcd_character_put


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




        ; line_number = 369
        ; procedure character_put
character_put:
        ; Last argument is sitting in W; save into argument variable
        movwf   character_put__character
        ; delay=4294967295
        ; line_number = 370
        ; argument character byte
character_put__character equ globals___0+25
        ; line_number = 371
        ;  returns_nothing

        ; # This procedure will output {character} to the display
        ; # and update the {line} and {position} global variables.
        ; # If the cursor is in the column 15, it is either kept
        ; # there (normal mode) or advanced to the next line in column
        ; # 0 (debug mode).  This procedure enqueues a total of three
        ; # commands onto the command queue.

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 380
        ;  call cursor_enqueue()
        call    cursor_enqueue
        ; line_number = 381
        ;  call enqueue(data_write, character)
        movlw   16
        movwf   enqueue__control
        movf    character_put__character,w
        call    enqueue
        ; line_number = 382
        ;  if column = column_mask start
        ; Left minus Right
        movlw   241
        addwf   column,w
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true.size>1 false.size=1; no GOTO's
        btfss   __z___byte, __z___bit
        goto    character_put__2
        ; line_number = 383
        ; if !debug_mode start
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true.size=0 && false.size>1
        ; bit_code_emit_helper1: body_code.size=5 true_test=false body_code.delay=0 (non-uniform delay)
        btfsc   debug_mode___byte, debug_mode___bit
        goto    character_put__1
        ; # Advance to next line:
        ; line_number = 385
        ;  column := 0
        movlw   0
        movwf   column
        ; line_number = 386
        ;  line := (line + 1) & line_mask
        incf    line,w
        andlw   3
        movwf   line
character_put__1:
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=debug_mode (data:00=>00 code:XX=>XX)
        ; line_number = 383
        ; if !debug_mode done
        ; # else stay put:
        goto    character_put__3
character_put__2:
        ; # Advance to next column:
        ; line_number = 390
        ;  column := column + 1
        incf    column,f
character_put__3:
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; line_number = 382
        ;  if column = column_mask done
        ; line_number = 391
        ; call cursor_enqueue()
        call    cursor_enqueue
        ; # A total of 3 commands are enqueued:


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




        ; line_number = 395
        ; procedure cursor_enqueue
cursor_enqueue:
        ; arguments_none
        ; line_number = 397
        ;  returns_nothing

        ; # This procedure will ensure that a command that forces the cursor
        ; # to the correct location specified by the global variables {line}
        ; # and {column}.

        ; line_number = 403
        ;  local command byte
cursor_enqueue__command equ globals___0+26

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 405
        ;  command := 0x80
        movlw   128
        movwf   cursor_enqueue__command
        ; line_number = 406
        ;  if line@0 start
cursor_enqueue__select__1___byte equ line
cursor_enqueue__select__1___bit equ 0
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: True.size=1 False.size=0
        btfsc   cursor_enqueue__select__1___byte, cursor_enqueue__select__1___bit
        ; line_number = 407
        ; command := command | 0x40
        bsf     cursor_enqueue__command, 6
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=cursor_enqueue__select__1 (data:00=>00 code:XX=>XX)
        ; line_number = 406
        ;  if line@0 done
        ; line_number = 408
        ; if line@1 start
cursor_enqueue__select__2___byte equ line
cursor_enqueue__select__2___bit equ 1
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: True.size=1 False.size=0
        btfsc   cursor_enqueue__select__2___byte, cursor_enqueue__select__2___bit
        ; line_number = 409
        ; command := command | 0x10
        bsf     cursor_enqueue__command, 4
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=cursor_enqueue__select__2 (data:00=>00 code:XX=>XX)
        ; line_number = 408
        ; if line@1 done
        ; line_number = 410
        ; call enqueue(command_write, command | column)
        clrf    enqueue__control
        movf    cursor_enqueue__command,w
        iorwf   column,w
        call    enqueue


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




        ; line_number = 413
        ; procedure cursor_position
cursor_position:
        ; arguments_none
        ; line_number = 415
        ;  returns_nothing

        ; # This prodedure will force the cursor to the location specified
        ; # by the globals variables {line} and {position}.

        ; line_number = 420
        ;  local command byte
cursor_position__command equ globals___0+27

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 422
        ;  command := 0x80
        movlw   128
        movwf   cursor_position__command
        ; line_number = 423
        ;  if line@0 start
cursor_position__select__1___byte equ line
cursor_position__select__1___bit equ 0
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: True.size=1 False.size=0
        btfsc   cursor_position__select__1___byte, cursor_position__select__1___bit
        ; line_number = 424
        ; command := command | 0x40
        bsf     cursor_position__command, 6
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=cursor_position__select__1 (data:00=>00 code:XX=>XX)
        ; line_number = 423
        ;  if line@0 done
        ; line_number = 425
        ; if line@1 start
cursor_position__select__2___byte equ line
cursor_position__select__2___bit equ 1
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: True.size=1 False.size=0
        btfsc   cursor_position__select__2___byte, cursor_position__select__2___bit
        ; line_number = 426
        ; command := command | 0x10
        bsf     cursor_position__command, 4
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=cursor_position__select__2 (data:00=>00 code:XX=>XX)
        ; line_number = 425
        ; if line@1 done
        ; line_number = 427
        ; command := command | column
        movf    column,w
        iorwf   cursor_position__command,f
        ; line_number = 428
        ;  call lcd_command(command)
        movf    cursor_position__command,w
        call    lcd_command


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




        ; line_number = 431
        ; procedure lcd_command
lcd_command:
        ; Last argument is sitting in W; save into argument variable
        movwf   lcd_command__command
        ; delay=1
        ; line_number = 432
        ; argument command byte
lcd_command__command equ globals___0+28
        ; line_number = 433
        ;  returns_nothing
        ; line_number = 434
        ;  exact_delay 52 * microsecond

        ; # This procedure will strobe {command} into the LCD controller
        ; # as two 4-bit nibbles.  The procedure delays by 39uS to ensure
        ; # the command has time to be digested by the LCD controller.

        ; # Send high nibble (RW=0 & RS=0):
        ; #FIXME: Shouldn't need "& 0xf" because ">> 4" should do it!!!
        ; before procedure statements delay=1, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 442
        ;  _portc := (command >> 4) & 0xf
        ; Delay at assignment is 1
lcd_command__1 equ globals___0+40
        swapf   lcd_command__command,w
        andlw   15
        movwf   _portc
        ; line_number = 443
        ;  rw := 0
        ; Delay at assignment is 4
        bcf     rw___byte, rw___bit
        ; line_number = 444
        ;  rs := 0
        ; Delay at assignment is 5
        bcf     rs___byte, rs___bit
        ; line_number = 445
        ;  e := 1
        ; Delay at assignment is 6
        bsf     e___byte, e___bit
        ; line_number = 446
        ;  e := 0
        ; Delay at assignment is 7
        bcf     e___byte, e___bit

        ; # Send low nibble (RW=0 & RS=0):
        ; line_number = 449
        ;  _portc := command & 0xf
        ; Delay at assignment is 8
        movlw   15
        andwf   lcd_command__command,w
        movwf   _portc
        ; line_number = 450
        ;  rw := 0
        ; Delay at assignment is 11
        bcf     rw___byte, rw___bit
        ; line_number = 451
        ;  rs := 0
        ; Delay at assignment is 12
        bcf     rs___byte, rs___bit
        ; line_number = 452
        ;  e := 1
        ; Delay at assignment is 13
        bsf     e___byte, e___bit
        ; line_number = 453
        ;  e := 0
        ; Delay at assignment is 14
        bcf     e___byte, e___bit

        ; # Wait for the command to be digested:
        ; # (RETURN instruction takes two cycles):
        ; #delay 39 - 2
        ; #	do_nothing


        ; delay after procedure statements=15
        ; Delay 87 cycles
        ; Delay loop takes 21 * 4 = 84 cycles
        movlw   21
lcd_command__2:
        addlw   255
        btfss   __z___byte, __z___bit
        goto    lcd_command__2
        goto    lcd_command__3
lcd_command__3:
        nop     
        ; Implied return
        retlw   0
        ; Final delay = 104




        ; line_number = 461
        ; procedure lcd_character_put
lcd_character_put:
        ; Last argument is sitting in W; save into argument variable
        movwf   lcd_character_put__character
        ; delay=1
        ; line_number = 462
        ; argument character byte
lcd_character_put__character equ globals___0+29
        ; line_number = 463
        ;  returns_nothing
        ; line_number = 464
        ;  exact_delay 52 * microsecond

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

        ; # Send high nibble (RW=0 & RS=1):
        ; #_portc := (character >> 4) | rs_mask
        ; before procedure statements delay=1, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 471
        ;  _portc := character >> 4
        ; Delay at assignment is 1
        swapf   lcd_character_put__character,w
        movwf   _portc
        movlw   15
        andwf   _portc,f
        ; line_number = 472
        ;  rw := 0
        ; Delay at assignment is 5
        bcf     rw___byte, rw___bit
        ; line_number = 473
        ;  rs := 1
        ; Delay at assignment is 6
        bsf     rs___byte, rs___bit
        ; line_number = 474
        ;  e := 1
        ; Delay at assignment is 7
        bsf     e___byte, e___bit
        ; line_number = 475
        ;  e := 0
        ; Delay at assignment is 8
        bcf     e___byte, e___bit

        ; # Send low nibble (RW=0 & RS=1):
        ; #_portc := (character & 0xf) | rs_mask
        ; line_number = 479
        ;  _portc := character & 0xf
        ; Delay at assignment is 9
        movlw   15
        andwf   lcd_character_put__character,w
        movwf   _portc
        ; line_number = 480
        ;  rw := 0
        ; Delay at assignment is 12
        bcf     rw___byte, rw___bit
        ; line_number = 481
        ;  rs := 1
        ; Delay at assignment is 13
        bsf     rs___byte, rs___bit
        ; line_number = 482
        ;  e := 1
        ; Delay at assignment is 14
        bsf     e___byte, e___bit
        ; line_number = 483
        ;  e := 0
        ; Delay at assignment is 15
        bcf     e___byte, e___bit

        ; # Wait 39uS for the command to finish:
        ; # (RETURN instruction takes two cycles):
        ; #delay 39 - 2
        ; #	do_nothing


        ; delay after procedure statements=16
        ; Delay 86 cycles
        ; Delay loop takes 21 * 4 = 84 cycles
        movlw   21
lcd_character_put__1:
        addlw   255
        btfss   __z___byte, __z___bit
        goto    lcd_character_put__1
        goto    lcd_character_put__2
lcd_character_put__2:
        ; Implied return
        retlw   0
        ; Final delay = 104




        ; line_number = 491
        ; procedure lcd_read
lcd_read:
        ; arguments_none
        ; line_number = 493
        ;  returns byte

        ; # Generic routine to read a byte from the LCD controller.

        ; line_number = 497
        ;  local result byte
lcd_read__result equ globals___0+30

        ; # First, turn DB4-7 into inputs:
        ; #_trisc := db4_mask | db5_mask | db6_mask | db7_mask
        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 501
        ;  _trisc := trisc_mask | db47_mask
        ; Expression is strictly a constant
        movlw   63
        bsf     __rp0___byte, __rp0___bit
        movwf   _trisc

        ; # Read high nibble:
        ; #_portc := rs_mask | rw_mask
        ; line_number = 505
        ;  rs := 1
        bcf     __rp0___byte, __rp0___bit
        bsf     rs___byte, rs___bit
        ; line_number = 506
        ;  rw := 1
        bsf     rw___byte, rw___bit
        ; line_number = 507
        ;  e := 1
        bsf     e___byte, e___bit
        ; line_number = 508
        ;  delay 43 * microsecond start
        ; Delay expression evaluates to 86
        ; line_number = 509
        ; do_nothing
        ; Delay 86 cycles
        ; Delay loop takes 21 * 4 = 84 cycles
        movlw   21
lcd_read__1:
        addlw   255
        btfss   __z___byte, __z___bit
        goto    lcd_read__1
        goto    lcd_read__2
lcd_read__2:
        ; line_number = 508
        ;  delay 43 * microsecond done
        ; line_number = 510
        ; result := _portc << 4
        swapf   _portc,w
        movwf   lcd_read__result
        movlw   240
        andwf   lcd_read__result,f
        ; line_number = 511
        ;  e := 0
        bcf     e___byte, e___bit

        ; # Read low nibble:
        ; #_portc := rs_mask | rw_mask
        ; line_number = 515
        ;  rs := 1
        bsf     rs___byte, rs___bit
        ; line_number = 516
        ;  rw := 1
        bsf     rw___byte, rw___bit
        ; line_number = 517
        ;  e := 1
        bsf     e___byte, e___bit
        ; line_number = 518
        ;  result := result | (_portc & 0xf)
        movlw   15
        andwf   _portc,w
        iorwf   lcd_read__result,f
        ; line_number = 519
        ;  e := 0
        bcf     e___byte, e___bit

        ; # Return DB4-7 to outputs:
        ; #_trisc := 0
        ; line_number = 523
        ;  _trisc := trisc_mask
        movlw   48
        bsf     __rp0___byte, __rp0___bit
        movwf   _trisc

        ; line_number = 525
        ;  return result start
        ; line_number = 525
        bcf     __rp0___byte, __rp0___bit
        movf    lcd_read__result,w
        return  
        ; line_number = 525
        ;  return result done


        ; delay after procedure statements=non-uniform




        ; line_number = 528
        ; procedure enqueue
enqueue:
        ; Last argument is sitting in W; save into argument variable
        movwf   enqueue__data
        ; delay=4294967295
        ; line_number = 529
        ; argument control byte
enqueue__control equ globals___0+31
        ; line_number = 530
        ; argument data byte
enqueue__data equ globals___0+32
        ; line_number = 531
        ;  returns_nothing

        ; #: This procedure will enqueue {control} and {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=>00 code:XX=>XX)
        ; line_number = 537
        ;  data_queue[available] := data
        ; index_fsr_first
        movf    available,w
        addlw   data_queue
        movwf   __fsr
        movf    enqueue__data,w
        movwf   __indf
        ; line_number = 538
        ;  control_queue[available] := control
        ; index_fsr_first
        movf    available,w
        addlw   control_queue
        movwf   __fsr
        movf    enqueue__control,w
        movwf   __indf
        ; line_number = 539
        ;  available := available + 1
        incf    available,f


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




        ; line_number = 542
        ; procedure lcd_delay
lcd_delay:
        ; Last argument is sitting in W; save into argument variable
        movwf   lcd_delay__amount
        ; delay=4294967295
        ; line_number = 543
        ; argument amount byte
lcd_delay__amount equ globals___0+33
        ; line_number = 544
        ;  returns_nothing

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

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 548
        ;  loop_exactly amount start
lcd_delay__1 equ globals___0+41
        movf    lcd_delay__amount,w
        movwf   lcd_delay__1
lcd_delay__2:
        ; line_number = 549
        ; delay (100 * microsecond) - 3 start
        ; Delay expression evaluates to 197
        ; line_number = 550
        ; do_nothing


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




        ; line_number = 553
        ; procedure lcd_init
lcd_init:
        ; arguments_none
        ; line_number = 555
        ;  returns_nothing

        ; # The LCD needs to be initialized into 4 bit mode and then
        ; # we can write letters to it. Note that the LCD is ALWAYS 
        ; # in write mode, no need to check to see if its busy, I just
        ; # wait and assume it isn't.
        ; #
        ; # According to the SAMSUNG data sheet, you first have to
        ; # wait 30+ mS to insure the display is "stable" after Vcc is
        ; # applied. Then the follow a specific sequence puts it into
        ; # "4 bit" mode.  However, I've noticed they assume that the
        ; # LCD is already in 8 bit mode, which it won't be following
        ; # a warm restart (resetting the PIC).  Further, if you ever
        ; # get "out of sync" and start sending the low nibble and then
        ; # the high nibble all heck breaks loose. So the INIT function
        ; # actually does three things:
        ; #	1) It waits 40mS for the display to initialize just
        ; #	   in case this was a power up event.
        ; #	2) Next it programs the display into 8 bit mode on
        ; #	   purpose. Even if it was in 4 bit mode already we
        ; #	   put the display in a "known" state.
        ; #	3) Finally, now that it knows what state the display
        ; #	   is in, it configures it for two line, 4 bit operation.
        ; #
        ; # This is a routine that clocks out two nibbles using the E clock and
        ; # then waits 100 uS.  The first commands we send it are 0x33 hex. We send
        ; # 0x33 followed by 0x32.  This has the effect of clocking out 0x3 to the
        ; # port at least 3 times, with the command bit (R/S) set.  This will ALWAYS
        ; # set us to 8 bit mode eventually.
        ; #
        ; # *  On power up we're already in 8 bit mode and 0x3 doesn't change that.
        ; # *  In 4 bit mode the first two nibbles will put you into 8 bit mode
        ; # *  Out of sync 4-bit mode, the first nibble finishes the low nybble of
        ; #    the previous command, and the next two put us into 8 bit mode.
        ; #
        ; # Once we are SURE we're in 4 bit mode, we can send commands through
        ; # the 4 bit interface, to finish initialization we send:
        ; # 	0x28 - Four bit mode, two line display, 5 x 8 font.
        ; #	0x08 - Turn off the display
        ; #	0x01 - Clear the display, reset the DDRAM pointer
        ; #	0x0E - Turn on the display, cursor, blink it, and don't shift.

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

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

        ; # "8-bit mode"; R/W = 0, RS = 0, DB7 - DB4 = 0x03:
        ; line_number = 604
        ;  _portc := 0x03
        movlw   3
        movwf   _portc
        ; line_number = 605
        ;  rw := 0
        bcf     rw___byte, rw___bit
        ; line_number = 606
        ;  rs := 0
        bcf     rs___byte, rs___bit
        ; line_number = 607
        ;  e := 1
        bsf     e___byte, e___bit
        ; line_number = 608
        ;  e := 0
        bcf     e___byte, e___bit
        ; line_number = 609
        ;  call lcd_delay(1)
        movlw   1
        call    lcd_delay

        ; # If in 4 bit mode this is the "low nibble":
        ; line_number = 612
        ;  e := 1
        bsf     e___byte, e___bit
        ; line_number = 613
        ;  e := 0
        bcf     e___byte, e___bit
        ; line_number = 614
        ;  call lcd_delay(1)
        movlw   1
        call    lcd_delay


        ; # If out of sync this is the low nybble in 4 bit mode:
        ; line_number = 618
        ;  e := 1
        bsf     e___byte, e___bit
        ; line_number = 619
        ;  e := 0
        bcf     e___byte, e___bit
        ; line_number = 620
        ;  call lcd_delay(1)
        movlw   1
        call    lcd_delay

        ; # Finally we can ask for 4 bit mode:
        ; line_number = 623
        ;  _portc := 0x02
        movlw   2
        movwf   _portc
        ; line_number = 624
        ;  rw := 0
        bcf     rw___byte, rw___bit
        ; line_number = 625
        ;  rs := 0
        bcf     rs___byte, rs___bit
        ; line_number = 626
        ;  e := 1
        bsf     e___byte, e___bit
        ; line_number = 627
        ;  e := 0
        bcf     e___byte, e___bit
        ; # Changing this delay didn't work (#2)
        ; line_number = 629
        ;  call lcd_delay(1)
        movlw   1
        call    lcd_delay

        ; # Now its in 4 bit mode and we have to send double nybbles each
        ; # time. Fortunately we can use a subroutine for this.

        ; # FUNCTION SET - 4-bit, 2 lines, 5x8 font:
        ; line_number = 635
        ;  call lcd_command(0x28)
        movlw   40
        call    lcd_command

        ; # AGAIN : FUNCTION SET - 4-bit, 2 lines, 5x8 font:
        ; # Sending this command twice, *does* work.
        ; line_number = 639
        ;  call lcd_command(0x28)
        movlw   40
        call    lcd_command

        ; # Turn off the display temporarily:
        ; line_number = 642
        ;  call lcd_command(0x08)
        movlw   8
        call    lcd_command

        ; # Clear the display:
        ; line_number = 645
        ;  call lcd_command(0x01)
        movlw   1
        call    lcd_command
        ; line_number = 646
        ;  call lcd_delay(20)
        movlw   20
        call    lcd_delay

        ; # Turn the display back on with Cursor:
        ; line_number = 649
        ;  call lcd_command(0x0f)
        movlw   15
        call    lcd_command

        ; # Set shift mode:
        ; line_number = 652
        ;  call lcd_command(0x06)
        movlw   6
        call    lcd_command


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




        ; line_number = 655
        ; procedure byte_get
byte_get:
        ; arguments_none
        ; line_number = 657
        ;  returns byte

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

        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 662
        ;  while !_rcif start
byte_get__1:
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true.size=0 && false.size>1
        ; bit_code_emit_helper1: body_code.size=2 true_test=false body_code.delay=0 (non-uniform delay)
        btfsc   _rcif___byte, _rcif___bit
        goto    byte_get__2
        ; line_number = 663
        ; call delay()
        call    delay
        goto    byte_get__1
byte_get__2:
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=_rcif (data:00=>00 code:XX=>XX)
        ; line_number = 662
        ;  while !_rcif done
        ; line_number = 664
        ; _rcif := 0
        bcf     _rcif___byte, _rcif___bit
        ; line_number = 665
        ;  if _oerr start
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true_code.size = 0 && false_code.size > 1
        ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=0 (non-uniform delay)
        btfss   _oerr___byte, _oerr___bit
        goto    byte_get__3
        ; line_number = 666
        ; _cren := 0
        bcf     _cren___byte, _cren___bit
        ; line_number = 667
        ;  _cren := 1
        bsf     _cren___byte, _cren___bit
        ; Recombine size1 = 0 || size2 = 0
byte_get__3:
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=_oerr (data:00=>00 code:XX=>XX)
        ; line_number = 665
        ;  if _oerr done
        ; line_number = 668
        ; return _rcreg start
        ; line_number = 668
        movf    _rcreg,w
        return  
        ; line_number = 668
        ; return _rcreg done


        ; delay after procedure statements=non-uniform




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

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

        ; #while !_txif
        ; before procedure statements delay=non-uniform, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 680
        ;  while !_trmt start
byte_put__1:
        ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
        ; CASE: true.size=0 && false.size>1
        ; bit_code_emit_helper1: body_code.size=2 true_test=false body_code.delay=0 (non-uniform delay)
        btfsc   _trmt___byte, _trmt___bit
        goto    byte_put__2
        ; line_number = 681
        ; call delay()
        call    delay
        goto    byte_put__1
byte_put__2:
        ; Recombine size1 = 0 || size2 = 0
        ; code.delay=4294967295 back_code.delay=4294967295
        ; <=bit_code_emit@symbol; sym=_trmt (data:00=>00 code:XX=>XX)
        ; line_number = 680
        ;  while !_trmt done
        ; line_number = 682
        ; _txreg := value
        movf    byte_put__value,w
        movwf   _txreg


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




        ; line_number = 685
        ; procedure delay
delay:
        ; arguments_none
        ; line_number = 687
        ;  returns_nothing
        ; line_number = 688
        ;  exact_delay delay_instructions

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

        ; # This procedure processes the command queue commands that have
        ; # been set up by the main() procedure.  If there are no more
        ; # commands in the queue, we figure out whether or not the
        ; # line switch requires any display shifting.
        ; #
        ; # The entire command queue from main() will be emptied before
        ; # the next command comes in.  The reasoning for this is because
        ; # most top level commands only take two or three LCD commands.
        ; # A clear display command takes 1.53mS, a total of 12 calls to
        ; #  delay() (12 * 138uS = 1.56mS).  A line clear takes a few
        ; # overhead commands followed by 16 data writes.  Since a command
        ; # byte requites 9-2/3 bits, 29 calls to delay will occur.  Thus,
        ; # we are safe.  The display shifting stuff can take place last,
        ; # since it has no time criticalities.
        ; #
        ; # What this all means is we can set up a simple queue of
        ; # instructions to be executed by the delay() procedure.
        ; # The main() procedure fills the queue and the delay()
        ; # procedure empties it.  We do not have to be very sophisticated,
        ; # the queue will be empty before the next time main()
        ; # gets around to filling it.

        ; line_number = 714
        ;  local control byte
delay__control equ globals___0+35
        ; line_number = 715
        ;  local data byte
delay__data equ globals___0+36
        ; line_number = 716
        ;  local do_it bit
delay__do_it___byte equ globals___0+79
delay__do_it___bit equ 0
        ; line_number = 717
        ;  local count byte
delay__count equ globals___0+37

        ; # Kick the dog:
        ; before procedure statements delay=0, bit states=(data:00=>00 code:XX=>XX)
        ; line_number = 720
        ;  watch_dog_reset done
        ; Delay at watch_dog_reset is 0
        clrwdt  

        ; line_number = 722
        ;  do_it := 0
        ; Delay at assignment is 1
        bcf     delay__do_it___byte, delay__do_it___bit
        ; line_number = 723
        ;  if processed < available start
        ; Delay at if is 2
        movf    available,w
        subwf   processed,w
        ; (after recombine) true_delay=12, false_delay=29 uniform_delay=true
        ; CASE: true_code_size > 1 && false_code_size > 1
        ; true_code_size=26 false_code_size=29
        btfss   __c___byte, __c___bit
        goto    delay__12
        ; # Make sure that the proper lines are visible:
        ; line_number = 740
        ;  if lines34 start
        ; Delay at if is 0
        ; (after recombine) true_delay=10, false_delay=9 uniform_delay=true
        ; CASE: true_code_size > 1 && false_code_size > 1
        ; true_code_size=12 false_code_size=11
        btfsc   lines34___byte, lines34___bit
        goto    delay__9
        ; Delay 0 cycles
        ; # Make sure that lines 1-2 are displayed:
        ; line_number = 750
        ;  if shift != 0 start
        ; Delay at if is 0
        ; Left minus Right
        movf    shift,w
        ; (after recombine) true_delay=0, false_delay=5 uniform_delay=true
        ; CASE: true.size=0 && false.size>1
        ; bit_code_emit_helper1: body_code.size=5 true_test=false body_code.delay=5 (uniform delay)
        btfss   __z___byte, __z___bit
        goto    delay__1
        ; Delay 4 cycles
        goto    delay__3
delay__3:
        goto    delay__4
delay__4:
        goto    delay__2
delay__1:
        ; # Lines 1-2 are not completely visible yet; shift right by 1:
        ; line_number = 752
        ;  data := 0x1c
        ; Delay at assignment is 0
        movlw   28
        movwf   delay__data
        ; line_number = 753
        ;  control := command_write
        ; Delay at assignment is 2
        clrf    delay__control
        ; line_number = 754
        ;  shift := shift - 1
        ; Delay at assignment is 3
        decf    shift,f
        ; line_number = 755
        ;  do_it := 1
        ; Delay at assignment is 4
        bsf     delay__do_it___byte, delay__do_it___bit

delay__2:
        ; code.delay=9 back_code.delay=0
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; Uniform delay broke in relation_code_emit
        ; if final true delay=5 false delay=0 code delay=9
        ; line_number = 750
        ;  if shift != 0 done
        goto    delay__10
delay__9:
        ; # Make sure that lines 3-4 are displayed:
        ; line_number = 742
        ;  if shift < 16 start
        ; Delay at if is 0
        movlw   16
        subwf   shift,w
        ; (after recombine) true_delay=0, false_delay=5 uniform_delay=true
        ; CASE: true.size=0 && false.size>1
        ; bit_code_emit_helper1: body_code.size=5 true_test=false body_code.delay=5 (uniform delay)
        btfss   __c___byte, __c___bit
        goto    delay__5
        ; Delay 4 cycles
        goto    delay__7
delay__7:
        goto    delay__8
delay__8:
        goto    delay__6
delay__5:
        ; # Lines 3-4 are not completely visible yet; shift left by 1:
        ; line_number = 744
        ;  data := 0x18
        ; Delay at assignment is 0
        movlw   24
        movwf   delay__data
        ; line_number = 745
        ;  control := command_write
        ; Delay at assignment is 2
        clrf    delay__control
        ; line_number = 746
        ;  shift := shift + 1
        ; Delay at assignment is 3
        incf    shift,f
        ; line_number = 747
        ;  do_it := 1
        ; Delay at assignment is 4
        bsf     delay__do_it___byte, delay__do_it___bit
delay__6:
        ; code.delay=10 back_code.delay=0
        ; <=bit_code_emit@symbol; sym=__c (data:00=>00 code:XX=>XX)
        ; Uniform delay broke in relation_code_emit
        ; if final true delay=5 false delay=0 code delay=10
        ; line_number = 742
        ;  if shift < 16 done
delay__10:
        ; code.delay=12 back_code.delay=0
        ; <=bit_code_emit@symbol; sym=lines34 (data:00=>00 code:XX=>XX)
        ; if final true delay=10 false delay=9 code delay=12
        ; line_number = 740
        ;  if lines34 done
        ; Delay 16 cycles
        ; Delay loop takes 4 * 4 = 16 cycles
        movlw   4
delay__14:
        addlw   255
        btfss   __z___byte, __z___bit
        goto    delay__14
        goto    delay__13
delay__12:
        ; # We have commands in queue to execute:
        ; line_number = 725
        ;  control := control_queue[processed]
        ; Delay at assignment is 0
        movf    processed,w
        addlw   control_queue
        movwf   __fsr
        movf    __indf,w
        movwf   delay__control
        ; line_number = 726
        ;  data := data_queue[processed]
        ; Delay at assignment is 5
        movf    processed,w
        addlw   data_queue
        movwf   __fsr
        movf    __indf,w
        movwf   delay__data

        ; # Figure out whether to actually process this command:
        ; line_number = 729
        ;  if control & nop_mask = 0 start
        ; Delay at if is 10
        ; Left minus Right
        movlw   32
        andwf   delay__control,w
        ; (after recombine) true_delay=1, false_delay=0 uniform_delay=true
        ; CASE: True.size=1 False.size=0
        btfsc   __z___byte, __z___bit
        ; line_number = 730
        ; do_it := 1
        ; Delay at assignment is 0
        bsf     delay__do_it___byte, delay__do_it___bit

        ; code.delay=14 back_code.delay=0
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; Uniform delay broke in relation_code_emit
        ; if final true delay=1 false delay=0 code delay=14
        ; line_number = 729
        ;  if control & nop_mask = 0 done
        ; # Process count:
        ; line_number = 733
        ;  count := control & count_mask
        ; Delay at assignment is 14
        movlw   15
        andwf   delay__control,w
        movwf   delay__count
        ; line_number = 734
        ;  control_queue[processed] := control & 0xf0 | (count - 1)
        ; Delay at assignment is 17
        ; index_fsr_first
        movf    processed,w
        addlw   control_queue
        movwf   __fsr
delay__11 equ globals___0+43
        movlw   240
        andwf   delay__control,w
        movwf   delay__11
        decf    delay__count,w
        iorwf   delay__11,w
        movwf   __indf
        ; line_number = 735
        ;  if count = 0 start
        ; Delay at if is 26
        ; Left minus Right
        movf    delay__count,w
        ; (after recombine) true_delay=1, false_delay=0 uniform_delay=true
        ; CASE: True.size=1 False.size=0
        btfsc   __z___byte, __z___bit
        ; # Advance to next command:
        ; line_number = 737
        ;  processed := processed + 1
        ; Delay at assignment is 0
        incf    processed,f
        ; code.delay=29 back_code.delay=0
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; Uniform delay broke in relation_code_emit
        ; if final true delay=1 false delay=0 code delay=29
        ; line_number = 735
        ;  if count = 0 done
delay__13:
        ; code.delay=36 back_code.delay=0
        ; <=bit_code_emit@symbol; sym=__c (data:00=>00 code:XX=>XX)
        ; Uniform delay broke in relation_code_emit
        ; if final true delay=29 false delay=12 code delay=36
        ; line_number = 723
        ;  if processed < available done
        ; line_number = 757
        ; if do_it start
        ; Delay at if is 36
        ; (after recombine) true_delay=25, false_delay=0 uniform_delay=true
        ; CASE: true_code.size = 0 && false_code.size > 1
        ; bit_code_emit_helper1: body_code.size=25 true_test=true body_code.delay=25 (uniform delay)
        btfsc   delay__do_it___byte, delay__do_it___bit
        goto    delay__15
        ; Delay 24 cycles
        ; Delay loop takes 6 * 4 = 24 cycles
        movlw   6
delay__17:
        addlw   255
        btfss   __z___byte, __z___bit
        goto    delay__17
        goto    delay__16
delay__15:
        ; # Note that {data_write} = {rs_mask}:

        ; # Send high nibble (RW=0):
        ; #_portc := control & rs_mask | data >> 4
        ; line_number = 762
        ;  _portc := data >> 4
        ; Delay at assignment is 0
        swapf   delay__data,w
        movwf   _portc
        movlw   15
        andwf   _portc,f
        ; line_number = 763
        ;  rw := 0
        ; Delay at assignment is 4
        bcf     rw___byte, rw___bit
        ; line_number = 764
        ;  rs := 0
        ; Delay at assignment is 5
        bcf     rs___byte, rs___bit
        ; line_number = 765
        ;  if control & data_write != 0 start
        ; Delay at if is 6
        ; Left minus Right
        movlw   16
        andwf   delay__control,w
        ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true
        ; CASE: true_code.size=0 && false_code.size=1
        btfss   __z___byte, __z___bit
        ; line_number = 766
        ; rs := 1
        ; Delay at assignment is 0
        bsf     rs___byte, rs___bit
        ; code.delay=10 back_code.delay=0
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; Uniform delay broke in relation_code_emit
        ; if final true delay=1 false delay=0 code delay=10
        ; line_number = 765
        ;  if control & data_write != 0 done
        ; line_number = 767
        ; rs := 1
        ; Delay at assignment is 10
        bsf     rs___byte, rs___bit
        ; line_number = 768
        ;  e := 1
        ; Delay at assignment is 11
        bsf     e___byte, e___bit
        ; line_number = 769
        ;  e := 0
        ; Delay at assignment is 12
        bcf     e___byte, e___bit

        ; # Send low nibble (RW=0):
        ; #_portc := control & rs_mask | data & 0xf
        ; line_number = 773
        ;  _portc := control | (data & 0xf)
        ; Delay at assignment is 13
        movlw   15
        andwf   delay__data,w
        iorwf   delay__control,w
        movwf   _portc
        ; line_number = 774
        ;  rw := 0
        ; Delay at assignment is 17
        bcf     rw___byte, rw___bit
        ; line_number = 775
        ;  rs := 0
        ; Delay at assignment is 18
        bcf     rs___byte, rs___bit
        ; line_number = 776
        ;  if control & data_write != 0 start
        ; Delay at if is 19
        ; Left minus Right
        movlw   16
        andwf   delay__control,w
        ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true
        ; CASE: true_code.size=0 && false_code.size=1
        btfss   __z___byte, __z___bit
        ; line_number = 777
        ; rs := 1
        ; Delay at assignment is 0
        bsf     rs___byte, rs___bit
        ; code.delay=23 back_code.delay=0
        ; <=bit_code_emit@symbol; sym=__z (data:00=>00 code:XX=>XX)
        ; Uniform delay broke in relation_code_emit
        ; if final true delay=1 false delay=0 code delay=23
        ; line_number = 776
        ;  if control & data_write != 0 done
        ; line_number = 778
        ; e := 1
        ; Delay at assignment is 23
        bsf     e___byte, e___bit
        ; line_number = 779
        ;  e := 0
        ; Delay at assignment is 24
        bcf     e___byte, e___bit

        ; # The delay() procedure is 138uS which is much greater than
        ; # 39uS - 43uS that commands take.  We do not have to do any
        ; # further action for command delay.

delay__16:
        ; code.delay=64 back_code.delay=0
        ; <=bit_code_emit@symbol; sym=delay__do_it (data:00=>00 code:XX=>XX)
        ; if final true delay=25 false delay=0 code delay=64
        ; line_number = 757
        ; if do_it done
        ; # We are all done:


        ; delay after procedure statements=64
        ; Delay 206 cycles
        ; Delay loop takes 51 * 4 = 204 cycles
        movlw   51
delay__18:
        addlw   255
        btfss   __z___byte, __z___bit
        goto    delay__18
        goto    delay__19
delay__19:
        ; Implied return
        retlw   0
        ; Final delay = 272




        ; line_number = 788
        ; constant zero8 = "\0,0,0,0,0,0,0,0\"
        ; zero8 = '\0,0,0,0,0,0,0,0\'
        ; line_number = 789
        ; constant module_name = "\6\LCD32D"
        ; module_name = '\6\LCD32D'
        ; line_number = 790
        ; constant vendor_name = "\7\Gramson"
        ; vendor_name = '\7\Gramson'

        ; line_number = 792
        ; string id = "\1,0,9,0,0,0,0,0\" ~ zero8 ~ zero8 ~ module_name ~ vendor_name start
        ; id = '\1,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6\LCD32D\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 39
id___base:
        retlw   1
        retlw   0
        retlw   9
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   0
        retlw   6
        retlw   76
        retlw   67
        retlw   68
        retlw   51
        retlw   50
        retlw   68
        retlw   7
        retlw   71
        retlw   114
        retlw   97
        retlw   109
        retlw   115
        retlw   111
        retlw   110
        ; line_number = 792
        ; string id = "\1,0,9,0,0,0,0,0\" ~ zero8 ~ zero8 ~ module_name ~ vendor_name start


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