1                       radix   dec
2                       ; Code bank 0; Start address: 0; End address: 2047
3      0000 :           org     0
4               
5                       ; Define start addresses for data regions
6    00000070 = shared___globals equ 112
7    00000020 = globals___0 equ 32
8    000000a0 = globals___1 equ 160
9    00000120 = globals___2 equ 288
10   00000000 = __indf equ 0
11   00000002 = __pcl equ 2
12   00000003 = __status equ 3
13   00000004 = __fsr equ 4
14   00000003 = __c___byte equ 3
15   00000000 = __c___bit equ 0
16   00000003 = __z___byte equ 3
17   00000002 = __z___bit equ 2
18   00000003 = __rp0___byte equ 3
19   00000005 = __rp0___bit equ 5
20   00000003 = __rp1___byte equ 3
21   00000006 = __rp1___bit equ 6
22   00000003 = __irp___byte equ 3
23   00000007 = __irp___bit equ 7
24   0000000a = __pclath equ 10
25   0000000a = __cb0___byte equ 10
26   00000003 = __cb0___bit equ 3
27   0000000a = __cb1___byte equ 10
28   00000004 = __cb1___bit equ 4
29              
30                      ; # Copyright (c) 2002-2007 by Wayne C. Gramlich.
31                      ; # All rights reserved.
32              
33                      ; # This code started out as some assembly code that was written by
34                      ; # Chuck McManis.  It has been modified basically beyond recognition.
35                      ; # None-the-less, I would like to thank Chuck for his contribution
36                      ; # to the effort.
37              
38                      ; # The Lumix(r) LCM-S01602DTR/M 2 line by 16 character LCD panel uses the
39                      ; # Samsung(r) S6A0069 LCD controller.  The S6A0069 LCD controller has
40                      ; # 80 bytes of internal memory available for displaying characters.
41                      ; # The byte addresses for these data bytes are 0x00 through 0x4f(=79).
42              
43                      ; # This module uses a PIC16F628A
44                      ; buffer = 'lcd32'
45                      ; line_number = 17
46                      ; library _pic16f628a entered
47              
48                      ; # Copyright (c) 2007 by Wayne C. Gramlich
49                      ; # All rights reserved.
50              
51                      ; buffer = '_pic16f628a'
52                      ; line_number = 6
53                      ; library _pic16f628 entered
54              
55                      ; # Copyright (c) 2006 by Wayne C. Gramlich
56                      ; # All rights reserved.
57              
58                      ; buffer = '_pic16f628'
59                      ; line_number = 6
60                      ; processor pic16f628
61                      ; line_number = 7
62                      ; configure_address 0x2007
63                      ; line_number = 8
64                      ;  configure_fill 0x0200
65                      ; line_number = 9
66                      ;  configure_option cp: off = 0x3c00
67                      ; line_number = 10
68                      ;  configure_option cp: after400 = 0x2800
69                      ; line_number = 11
70                      ;  configure_option cp: after200 = 0x1400
71                      ; line_number = 12
72                      ;  configure_option cp: on = 0x0000
73                      ; line_number = 13
74                      ;  configure_option cpd: off = 0x100
75                      ; line_number = 14
76                      ;  configure_option cpd: on = 0x000
77                      ; line_number = 15
78                      ;  configure_option lvp: on = 0x80
79                      ; line_number = 16
80                      ;  configure_option lvp: off = 0x00
81                      ; line_number = 17
82                      ;  configure_option boden: on = 0x40
83                      ; line_number = 18
84                      ;  configure_option boden: off = 0x00
85                      ; line_number = 19
86                      ;  configure_option mclre: on = 0x20
87                      ; line_number = 20
88                      ;  configure_option mclre: off = 0x00
89                      ; line_number = 21
90                      ;  configure_option pwrte: on = 0
91                      ; line_number = 22
92                      ;  configure_option pwrte: off = 8
93                      ; line_number = 23
94                      ;  configure_option wdte: on = 4
95                      ; line_number = 24
96                      ;  configure_option wdte: off = 0
97                      ; line_number = 25
98                      ;  configure_option fosc: er_clk = 0x13
99                      ; line_number = 26
100                     ;  configure_option fosc: er_no_clk = 0x12
101                     ; line_number = 27
102                     ;  configure_option fosc: intrc_clk = 0x11
103                     ; line_number = 28
104                     ;  configure_option fosc: intrc_no_clk = 0x10
105                     ; line_number = 29
106                     ;  configure_option fosc: ec = 3
107                     ; line_number = 30
108                     ;  configure_option fosc: hs = 2
109                     ; line_number = 31
110                     ;  configure_option fosc: xt = 1
111                     ; line_number = 32
112                     ;  configure_option fosc: lp = 0
113                     ; line_number = 33
114                     ;  code_bank 0x0 : 0x7ff
115                     ; line_number = 34
116                     ;  data_bank 0x0 : 0x7f
117                     ; line_number = 35
118                     ;  data_bank 0x80 : 0xff
119                     ; line_number = 36
120                     ;  data_bank 0x100 : 0x17f
121                     ; line_number = 37
122                     ;  data_bank 0x180 : 0x1ff
123                     ; line_number = 38
124                     ;  global_region 0x20 : 0x6f
125                     ; line_number = 39
126                     ;  global_region 0xa0 : 0xef
127                     ; line_number = 40
128                     ;  global_region 0x120 : 0x14f
129                     ; line_number = 41
130                     ;  shared_region 0x70 : 0x7f
131                     ; line_number = 42
132                     ;  packages dip=18, soic=18, ssop=20
133                     ; line_number = 43
134                     ;  pin ra2_in, ra2_out, ra2_unused
135                     ; line_number = 44
136                     ; pin_bindings dip=1, soic=1, ssop=1
137                     ; line_number = 45
138                     ;  bind_to _porta@2
139                     ; line_number = 46
140                     ;  or_if ra2_in _trisa 4
141                     ; line_number = 47
142                     ;  or_if ra2_out _trisa 0
143                     ; line_number = 48
144                     ;  or_if ra2_in _cmcon 7
145                     ; line_number = 49
146                     ;  or_if ra2_out _cmcon 7
147                     ; line_number = 50
148                     ; pin ra3_in, ra3_out, cmp1, ra3_unused
149                     ; line_number = 51
150                     ; pin_bindings dip=2, soic=2, ssop=2
151                     ; line_number = 52
152                     ;  bind_to _porta@3
153                     ; line_number = 53
154                     ;  or_if ra3_in _trisa 8
155                     ; line_number = 54
156                     ;  or_if ra3_out _trisa 0
157                     ; line_number = 55
158                     ;  or_if ra3_in _cmcon 7
159                     ; line_number = 56
160                     ;  or_if ra3_out _cmcon 7
161                     ; line_number = 57
162                     ; pin ra4_in, ra4_open_collector, tocki, cmp2, ra4_unused
163                     ; line_number = 58
164                     ; pin_bindings dip=3, soic=3, ssop=3
165                     ; line_number = 59
166                     ;  bind_to _porta@4
167                     ; line_number = 60
168                     ;  or_if ra4_in _trisa 16
169                     ; line_number = 61
170                     ;  or_if ra4_open_collector _trisa 0
171                     ; line_number = 62
172                     ; pin ra5_in, mclr, thv, ra5_unused
173                     ; line_number = 63
174                     ; pin_bindings dip=4, soic=4, ssop=4
175                     ; line_number = 64
176                     ;  bind_to _porta@5
177                     ; line_number = 65
178                     ;  or_if ra5_in _trisa 32
179                     ; line_number = 66
180                     ; pin vss, ground
181                     ; line_number = 67
182                     ; pin_bindings dip=5, soic=5, ssop=5
183                     ; line_number = 68
184                     ; pin vss2, ground2
185                     ; line_number = 69
186                     ; pin_bindings ssop=6
187                     ; line_number = 70
188                     ; pin rb0_in, rb0_out, int, rb0_unused
189                     ; line_number = 71
190                     ; pin_bindings dip=6, soic=6, ssop=7
191                     ; line_number = 72
192                     ;  bind_to _portb@0
193                     ; line_number = 73
194                     ;  or_if rb0_in _trisb 1
195                     ; line_number = 74
196                     ;  or_if rb0_out _trisb 0
197                     ; line_number = 75
198                     ;  or_if int _trisb 1
199                     ; line_number = 76
200                     ; pin rb1_in, rb1_out, rx, dt, rb1_unused
201                     ; line_number = 77
202                     ; pin_bindings dip=7, soic=7, ssop=8
203                     ; line_number = 78
204                     ;  bind_to _portb@1
205                     ; line_number = 79
206                     ;  or_if rb1_in _trisb 2
207                     ; line_number = 80
208                     ;  or_if rb1_out _trisb 0
209                     ; line_number = 81
210                     ;  or_if rx _trisb 2
211                     ; line_number = 82
212                     ; pin rb2_in, rb2_out, tx, ck, rb2_unused
213                     ; line_number = 83
214                     ; pin_bindings dip=8, soic=8, ssop=9
215                     ; line_number = 84
216                     ;  bind_to _portb@2
217                     ; line_number = 85
218                     ;  or_if rb2_in _trisb 4
219                     ; line_number = 86
220                     ;  or_if rb2_out _trisb 0
221                     ; line_number = 87
222                     ;  or_if tx _trisb 4
223                     ; line_number = 88
224                     ;  or_if ck _trisb 0
225                     ; line_number = 89
226                     ; pin rb3_in, rb3_out, ccp1, rb3unused
227                     ; line_number = 90
228                     ; pin_bindings dip=9, soic=9, ssop=10
229                     ; line_number = 91
230                     ;  bind_to _portb@3
231                     ; line_number = 92
232                     ;  or_if rb3_in _trisb 8
233                     ; line_number = 93
234                     ;  or_if rb3_out _trisb 0
235                     ; line_number = 94
236                     ;  or_if ccp1 _trisb 8
237                     ; line_number = 95
238                     ; pin rb4_in, rb4_out, pgm, rb4_unused
239                     ; line_number = 96
240                     ; pin_bindings dip=10, soic=10, ssop=11
241                     ; line_number = 97
242                     ;  bind_to _portb@4
243                     ; line_number = 98
244                     ;  or_if rb4_in _trisb 16
245                     ; line_number = 99
246                     ;  or_if rb4_out _trisb 0
247                     ; line_number = 100
248                     ;  or_if pgm _trisb 16
249                     ; line_number = 101
250                     ; pin rb5_in, rb5_out, rb5_unused
251                     ; line_number = 102
252                     ; pin_bindings dip=11, soic=11, ssop=12
253                     ; line_number = 103
254                     ;  bind_to _portb@5
255                     ; line_number = 104
256                     ;  or_if rb5_in _trisb 32
257                     ; line_number = 105
258                     ;  or_if rb5_out _trisb 0
259                     ; line_number = 106
260                     ; pin rb6_in, rb6_out, t1oso, t1cki, rb6_unused
261                     ; line_number = 107
262                     ; pin_bindings dip=12, soic=12, ssop=13
263                     ; line_number = 108
264                     ;  bind_to _portb@6
265                     ; line_number = 109
266                     ;  or_if rb6_in _trisb 64
267                     ; line_number = 110
268                     ;  or_if rb6_out _trisb 0
269                     ; line_number = 111
270                     ;  or_if t1oso _trisb 0
271                     ; line_number = 112
272                     ;  or_if t1cki _trisb 64
273                     ; line_number = 113
274                     ; pin rb7_in, rb7_out, t1osi, rb7_unused
275                     ; line_number = 114
276                     ; pin_bindings dip=13, soic=13, ssop=14
277                     ; line_number = 115
278                     ;  bind_to _portb@6
279                     ; line_number = 116
280                     ;  or_if rb7_in _trisb 128
281                     ; line_number = 117
282                     ;  or_if rb7_out _trisb 0
283                     ; line_number = 118
284                     ;  or_if t1osi _trisb 128
285                     ; line_number = 119
286                     ; pin vdd, power_supply
287                     ; line_number = 120
288                     ; pin_bindings dip=14, soic=14, ssop=15
289                     ; line_number = 121
290                     ; pin vdd2, power_spply2
291                     ; line_number = 122
292                     ; pin_bindings ssop=16
293                     ; line_number = 123
294                     ; pin ra6_in, ra6_out, osc2, clkout, ra6_unused
295                     ; line_number = 124
296                     ; pin_bindings dip=15, soic=15, ssop=17
297                     ; line_number = 125
298                     ;  bind_to _porta@6
299                     ; line_number = 126
300                     ;  or_if ra6_in _trisa 64
301                     ; line_number = 127
302                     ;  or_if ra6_out _trisa 0
303                     ; line_number = 128
304                     ;  or_if clkout _trisa 0
305                     ; line_number = 129
306                     ; pin ra7_in, ra7_out, osc1, clkin, ra7_unused
307                     ; line_number = 130
308                     ; pin_bindings dip=16, soic=16, ssop=18
309                     ; line_number = 131
310                     ;  bind_to _porta@7
311                     ; line_number = 132
312                     ;  or_if ra7_in _trisa 128
313                     ; line_number = 133
314                     ;  or_if ra7_out _trisa 0
315                     ; line_number = 134
316                     ;  or_if clkin _trisa 128
317                     ; line_number = 135
318                     ; pin ra0_in, ra0_out, ra0_unused
319                     ; line_number = 136
320                     ; pin_bindings dip=17, soic=17, ssop=19
321                     ; line_number = 137
322                     ;  bind_to _porta@0
323                     ; line_number = 138
324                     ;  or_if ra0_in _trisa 1
325                     ; line_number = 139
326                     ;  or_if ra0_in _cmcon 7
327                     ; line_number = 140
328                     ;  or_if ra0_out _cmcon 7
329                     ; line_number = 141
330                     ;  or_if ra0_out _trisa 0
331                     ; line_number = 142
332                     ; pin ra1_in, ra1_out, ra1_unused
333                     ; line_number = 143
334                     ; pin_bindings dip=18, soic=18, ssop=20
335                     ; line_number = 144
336                     ;  bind_to _porta@1
337                     ; line_number = 145
338                     ;  or_if ra1_in _trisa 2
339                     ; line_number = 146
340                     ;  or_if ra1_out _trisa 0
341                     ; line_number = 147
342                     ;  or_if ra1_in _cmcon 7
343                     ; line_number = 148
344                     ;  or_if ra1_out _cmcon 7
345             
346             
347             
348                     ; line_number = 153
349                     ; library _standard entered
350             
351                     ; # Copyright (c) 2006 by Wayne C. Gramlich
352                     ; # All rights reserved.
353             
354                     ; # Standard definition for uCL:
355             
356                     ; buffer = '_standard'
357                     ; line_number = 8
358                     ; constant _true = (1 = 1)
359  00000001 = _true equ 1
360                     ; line_number = 9
361                     ; constant _false = (0 != 0)
362  00000000 = _false equ 0
363             
364             
365                     ; buffer = '_pic16f628'
366                     ; line_number = 153
367                     ; library _standard exited
368             
369                     ; # Data bank 0:
370             
371                     ; line_number = 157
372                     ; register _indf = 
373  00000000 = _indf equ 0
374             
375                     ; line_number = 159
376                     ; register _tmr0 = 
377  00000001 = _tmr0 equ 1
378             
379                     ; line_number = 161
380                     ; register _pcl = 
381  00000002 = _pcl equ 2
382             
383                     ; line_number = 163
384                     ; register _status = 
385  00000003 = _status equ 3
386                     ; line_number = 164
387                     ; bind _irp = _status@7
388  00000003 = _irp___byte equ _status
389  00000007 = _irp___bit equ 7
390                     ; line_number = 165
391                     ; bind _rp1 = _status@6
392  00000003 = _rp1___byte equ _status
393  00000006 = _rp1___bit equ 6
394                     ; line_number = 166
395                     ; bind _rp0 = _status@5
396  00000003 = _rp0___byte equ _status
397  00000005 = _rp0___bit equ 5
398                     ; line_number = 167
399                     ; bind _to = _status@4
400  00000003 = _to___byte equ _status
401  00000004 = _to___bit equ 4
402                     ; line_number = 168
403                     ; bind _pd = _status@3
404  00000003 = _pd___byte equ _status
405  00000003 = _pd___bit equ 3
406                     ; line_number = 169
407                     ; bind _z = _status@2
408  00000003 = _z___byte equ _status
409  00000002 = _z___bit equ 2
410                     ; line_number = 170
411                     ; bind _dc = _status@1
412  00000003 = _dc___byte equ _status
413  00000001 = _dc___bit equ 1
414                     ; line_number = 171
415                     ; bind _c = _status@0
416  00000003 = _c___byte equ _status
417  00000000 = _c___bit equ 0
418             
419                     ; line_number = 173
420                     ; register _fsr = 
421  00000004 = _fsr equ 4
422             
423                     ; line_number = 175
424                     ; register _porta = 
425  00000005 = _porta equ 5
426                     ; line_number = 176
427                     ; bind _ra7 = _porta@7
428  00000005 = _ra7___byte equ _porta
429  00000007 = _ra7___bit equ 7
430                     ; line_number = 177
431                     ; bind _ra6 = _porta@6
432  00000005 = _ra6___byte equ _porta
433  00000006 = _ra6___bit equ 6
434                     ; line_number = 178
435                     ; bind _ra5 = _porta@5
436  00000005 = _ra5___byte equ _porta
437  00000005 = _ra5___bit equ 5
438                     ; line_number = 179
439                     ; bind _ra4 = _porta@4
440  00000005 = _ra4___byte equ _porta
441  00000004 = _ra4___bit equ 4
442                     ; line_number = 180
443                     ; bind _ra3 = _porta@3
444  00000005 = _ra3___byte equ _porta
445  00000003 = _ra3___bit equ 3
446                     ; line_number = 181
447                     ; bind _ra2 = _porta@2
448  00000005 = _ra2___byte equ _porta
449  00000002 = _ra2___bit equ 2
450                     ; line_number = 182
451                     ; bind _ra1 = _porta@1
452  00000005 = _ra1___byte equ _porta
453  00000001 = _ra1___bit equ 1
454                     ; line_number = 183
455                     ; bind _ra0 = _porta@0
456  00000005 = _ra0___byte equ _porta
457  00000000 = _ra0___bit equ 0
458             
459                     ; line_number = 185
460                     ; register _portb = 
461  00000006 = _portb equ 6
462                     ; line_number = 186
463                     ; bind _rb7 = _portb@7
464  00000006 = _rb7___byte equ _portb
465  00000007 = _rb7___bit equ 7
466                     ; line_number = 187
467                     ; bind _rb6 = _portb@6
468  00000006 = _rb6___byte equ _portb
469  00000006 = _rb6___bit equ 6
470                     ; line_number = 188
471                     ; bind _rb5 = _portb@5
472  00000006 = _rb5___byte equ _portb
473  00000005 = _rb5___bit equ 5
474                     ; line_number = 189
475                     ; bind _rb4 = _portb@4
476  00000006 = _rb4___byte equ _portb
477  00000004 = _rb4___bit equ 4
478                     ; line_number = 190
479                     ; bind _rb3 = _portb@3
480  00000006 = _rb3___byte equ _portb
481  00000003 = _rb3___bit equ 3
482                     ; line_number = 191
483                     ; bind _rb2 = _portb@2
484  00000006 = _rb2___byte equ _portb
485  00000002 = _rb2___bit equ 2
486                     ; line_number = 192
487                     ; bind _rb1 = _portb@1
488  00000006 = _rb1___byte equ _portb
489  00000001 = _rb1___bit equ 1
490                     ; line_number = 193
491                     ; bind _rb0 = _portb@0
492  00000006 = _rb0___byte equ _portb
493  00000000 = _rb0___bit equ 0
494             
495                     ; line_number = 195
496                     ; register _pclath = 
497  0000000a = _pclath equ 10
498             
499                     ; line_number = 197
500                     ; register _intcon = 
501  0000000b = _intcon equ 11
502                     ; line_number = 198
503                     ; bind _gie = _intcon@7
504  0000000b = _gie___byte equ _intcon
505  00000007 = _gie___bit equ 7
506                     ; line_number = 199
507                     ; bind _peie = _intcon@6
508  0000000b = _peie___byte equ _intcon
509  00000006 = _peie___bit equ 6
510                     ; line_number = 200
511                     ; bind _t0ie = _intcon@5
512  0000000b = _t0ie___byte equ _intcon
513  00000005 = _t0ie___bit equ 5
514                     ; line_number = 201
515                     ; bind _inte = _intcon@4
516  0000000b = _inte___byte equ _intcon
517  00000004 = _inte___bit equ 4
518                     ; line_number = 202
519                     ; bind _rbie = _intcon@3
520  0000000b = _rbie___byte equ _intcon
521  00000003 = _rbie___bit equ 3
522                     ; line_number = 203
523                     ; bind _t0if = _intcon@2
524  0000000b = _t0if___byte equ _intcon
525  00000002 = _t0if___bit equ 2
526                     ; line_number = 204
527                     ; bind _intf = _intcon@1
528  0000000b = _intf___byte equ _intcon
529  00000001 = _intf___bit equ 1
530                     ; line_number = 205
531                     ; bind _rbif = _intcon@0
532  0000000b = _rbif___byte equ _intcon
533  00000000 = _rbif___bit equ 0
534             
535                     ; line_number = 207
536                     ; register _pir1 = 
537  0000000c = _pir1 equ 12
538                     ; line_number = 208
539                     ; bind _eeif = _pir1@7
540  0000000c = _eeif___byte equ _pir1
541  00000007 = _eeif___bit equ 7
542                     ; line_number = 209
543                     ; bind _cmif = _pir1@6
544  0000000c = _cmif___byte equ _pir1
545  00000006 = _cmif___bit equ 6
546                     ; line_number = 210
547                     ; bind _rcif = _pir1@5
548  0000000c = _rcif___byte equ _pir1
549  00000005 = _rcif___bit equ 5
550                     ; line_number = 211
551                     ; bind _txif = _pir1@4
552  0000000c = _txif___byte equ _pir1
553  00000004 = _txif___bit equ 4
554                     ; line_number = 212
555                     ; bind _ccp1if = _pir1@2
556  0000000c = _ccp1if___byte equ _pir1
557  00000002 = _ccp1if___bit equ 2
558                     ; line_number = 213
559                     ; bind _tmr2if = _pir1@1
560  0000000c = _tmr2if___byte equ _pir1
561  00000001 = _tmr2if___bit equ 1
562                     ; line_number = 214
563                     ; bind _tmr1if = _pir1@0
564  0000000c = _tmr1if___byte equ _pir1
565  00000000 = _tmr1if___bit equ 0
566             
567                     ; line_number = 216
568                     ; register _tmr1l = 
569  0000000e = _tmr1l equ 14
570             
571                     ; line_number = 218
572                     ; register _tmr1h = 
573  0000000f = _tmr1h equ 15
574             
575                     ; line_number = 220
576                     ; register _t1con = 
577  00000010 = _t1con equ 16
578                     ; line_number = 221
579                     ; bind _t1ckps1 = _t1con@5
580  00000010 = _t1ckps1___byte equ _t1con
581  00000005 = _t1ckps1___bit equ 5
582                     ; line_number = 222
583                     ; bind _t1ckps0 = _t1con@4
584  00000010 = _t1ckps0___byte equ _t1con
585  00000004 = _t1ckps0___bit equ 4
586                     ; line_number = 223
587                     ; bind _t1oscen = _t1con@3
588  00000010 = _t1oscen___byte equ _t1con
589  00000003 = _t1oscen___bit equ 3
590                     ; line_number = 224
591                     ; bind _t1sync = _t1con@2
592  00000010 = _t1sync___byte equ _t1con
593  00000002 = _t1sync___bit equ 2
594                     ; line_number = 225
595                     ; bind _tmr1cs = _t1con@1
596  00000010 = _tmr1cs___byte equ _t1con
597  00000001 = _tmr1cs___bit equ 1
598                     ; line_number = 226
599                     ; bind _tmr1on = _t1con@0
600  00000010 = _tmr1on___byte equ _t1con
601  00000000 = _tmr1on___bit equ 0
602             
603                     ; line_number = 228
604                     ; register _tmr2 = 
605  00000011 = _tmr2 equ 17
606             
607                     ; line_number = 230
608                     ; register _t2con = 
609  00000012 = _t2con equ 18
610                     ; line_number = 231
611                     ; bind _toutps3 = _t2con@6
612  00000012 = _toutps3___byte equ _t2con
613  00000006 = _toutps3___bit equ 6
614                     ; line_number = 232
615                     ; bind _toutps2 = _t2con@5
616  00000012 = _toutps2___byte equ _t2con
617  00000005 = _toutps2___bit equ 5
618                     ; line_number = 233
619                     ; bind _toutps1 = _t2con@4
620  00000012 = _toutps1___byte equ _t2con
621  00000004 = _toutps1___bit equ 4
622                     ; line_number = 234
623                     ; bind _toutps0 = _t2con@3
624  00000012 = _toutps0___byte equ _t2con
625  00000003 = _toutps0___bit equ 3
626                     ; line_number = 235
627                     ; bind _trm2on = _t2con@2
628  00000012 = _trm2on___byte equ _t2con
629  00000002 = _trm2on___bit equ 2
630                     ; line_number = 236
631                     ; bind _t2ckps1 = _t2con@1
632  00000012 = _t2ckps1___byte equ _t2con
633  00000001 = _t2ckps1___bit equ 1
634                     ; line_number = 237
635                     ; bind _t2ckps0 = _t2con@0
636  00000012 = _t2ckps0___byte equ _t2con
637  00000000 = _t2ckps0___bit equ 0
638             
639                     ; line_number = 239
640                     ; register _ccpr1l = 
641  00000015 = _ccpr1l equ 21
642             
643                     ; line_number = 241
644                     ; register _ccpr1h = 
645  00000016 = _ccpr1h equ 22
646             
647                     ; line_number = 243
648                     ; register _ccp1con = 
649  00000017 = _ccp1con equ 23
650                     ; line_number = 244
651                     ; bind _ccp1x = _ccp1con@5
652  00000017 = _ccp1x___byte equ _ccp1con
653  00000005 = _ccp1x___bit equ 5
654                     ; line_number = 245
655                     ; bind _ccp1y = _ccp1con@4
656  00000017 = _ccp1y___byte equ _ccp1con
657  00000004 = _ccp1y___bit equ 4
658                     ; line_number = 246
659                     ; bind _ccp1m3 = _ccp1con@3
660  00000017 = _ccp1m3___byte equ _ccp1con
661  00000003 = _ccp1m3___bit equ 3
662                     ; line_number = 247
663                     ; bind _ccp1m2 = _ccp1con@2
664  00000017 = _ccp1m2___byte equ _ccp1con
665  00000002 = _ccp1m2___bit equ 2
666                     ; line_number = 248
667                     ; bind _ccp1m1 = _ccp1con@1
668  00000017 = _ccp1m1___byte equ _ccp1con
669  00000001 = _ccp1m1___bit equ 1
670                     ; line_number = 249
671                     ; bind _ccp1m0 = _ccp1con@0
672  00000017 = _ccp1m0___byte equ _ccp1con
673  00000000 = _ccp1m0___bit equ 0
674             
675                     ; line_number = 251
676                     ; register _rcsta = 
677  00000018 = _rcsta equ 24
678                     ; line_number = 252
679                     ; bind _spen = _rcsta@7
680  00000018 = _spen___byte equ _rcsta
681  00000007 = _spen___bit equ 7
682                     ; line_number = 253
683                     ; bind _rx9 = _rcsta@6
684  00000018 = _rx9___byte equ _rcsta
685  00000006 = _rx9___bit equ 6
686                     ; line_number = 254
687                     ; bind _sren = _rcsta@5
688  00000018 = _sren___byte equ _rcsta
689  00000005 = _sren___bit equ 5
690                     ; line_number = 255
691                     ; bind _cren = _rcsta@4
692  00000018 = _cren___byte equ _rcsta
693  00000004 = _cren___bit equ 4
694                     ; line_number = 256
695                     ; bind _aden = _rcsta@3
696  00000018 = _aden___byte equ _rcsta
697  00000003 = _aden___bit equ 3
698                     ; # Some other modules use _adden instead of _aden:
699                     ; line_number = 258
700                     ; bind _adden = _rcsta@3
701  00000018 = _adden___byte equ _rcsta
702  00000003 = _adden___bit equ 3
703                     ; line_number = 259
704                     ; bind _ferr = _rcsta@2
705  00000018 = _ferr___byte equ _rcsta
706  00000002 = _ferr___bit equ 2
707                     ; line_number = 260
708                     ; bind _oerr = _rcsta@1
709  00000018 = _oerr___byte equ _rcsta
710  00000001 = _oerr___bit equ 1
711                     ; line_number = 261
712                     ; bind _rx9d = _rcsta@0
713  00000018 = _rx9d___byte equ _rcsta
714  00000000 = _rx9d___bit equ 0
715             
716                     ; line_number = 263
717                     ; register _txreg = 
718  00000019 = _txreg equ 25
719             
720                     ; line_number = 265
721                     ; register _rcreg = 
722  0000001a = _rcreg equ 26
723             
724                     ; line_number = 267
725                     ; register _cmcon = 
726  0000001f = _cmcon equ 31
727                     ; line_number = 268
728                     ; bind _c2out = _cmcon@7
729  0000001f = _c2out___byte equ _cmcon
730  00000007 = _c2out___bit equ 7
731                     ; line_number = 269
732                     ; bind _c1out = _cmcon@6
733  0000001f = _c1out___byte equ _cmcon
734  00000006 = _c1out___bit equ 6
735                     ; line_number = 270
736                     ; bind _c2inv = _cmcon@5
737  0000001f = _c2inv___byte equ _cmcon
738  00000005 = _c2inv___bit equ 5
739                     ; line_number = 271
740                     ; bind _c1inv = _cmcon@4
741  0000001f = _c1inv___byte equ _cmcon
742  00000004 = _c1inv___bit equ 4
743                     ; line_number = 272
744                     ; bind _cis = _cmcon@3
745  0000001f = _cis___byte equ _cmcon
746  00000003 = _cis___bit equ 3
747                     ; line_number = 273
748                     ; bind _cm2 = _cmcon@2
749  0000001f = _cm2___byte equ _cmcon
750  00000002 = _cm2___bit equ 2
751                     ; line_number = 274
752                     ; bind _cm1 = _cmcon@1
753  0000001f = _cm1___byte equ _cmcon
754  00000001 = _cm1___bit equ 1
755                     ; line_number = 275
756                     ; bind _cm0 = _cmcon@0
757  0000001f = _cm0___byte equ _cmcon
758  00000000 = _cm0___bit equ 0
759             
760                     ; # Data bank 1:
761             
762                     ; line_number = 279
763                     ; register _option = 
764  00000081 = _option equ 129
765                     ; line_number = 280
766                     ; bind _rbpu = _option@7
767  00000081 = _rbpu___byte equ _option
768  00000007 = _rbpu___bit equ 7
769                     ; line_number = 281
770                     ; bind _intedg = _option@6
771  00000081 = _intedg___byte equ _option
772  00000006 = _intedg___bit equ 6
773                     ; line_number = 282
774                     ; bind _t0cs = _option@5
775  00000081 = _t0cs___byte equ _option
776  00000005 = _t0cs___bit equ 5
777                     ; line_number = 283
778                     ; bind _t0se = _option@4
779  00000081 = _t0se___byte equ _option
780  00000004 = _t0se___bit equ 4
781                     ; line_number = 284
782                     ; bind _psa = _option@3
783  00000081 = _psa___byte equ _option
784  00000003 = _psa___bit equ 3
785                     ; line_number = 285
786                     ; bind _ps2 = _option@2
787  00000081 = _ps2___byte equ _option
788  00000002 = _ps2___bit equ 2
789                     ; line_number = 286
790                     ; bind _ps1 = _option@1
791  00000081 = _ps1___byte equ _option
792  00000001 = _ps1___bit equ 1
793                     ; line_number = 287
794                     ; bind _ps0 = _option@0
795  00000081 = _ps0___byte equ _option
796  00000000 = _ps0___bit equ 0
797             
798                     ; line_number = 289
799                     ; register _trisa = 
800  00000085 = _trisa equ 133
801                     ; line_number = 290
802                     ; bind _trisa7 = _trisa@7
803  00000085 = _trisa7___byte equ _trisa
804  00000007 = _trisa7___bit equ 7
805                     ; line_number = 291
806                     ; bind _trisa6 = _trisa@6
807  00000085 = _trisa6___byte equ _trisa
808  00000006 = _trisa6___bit equ 6
809                     ; # No _trisa5:
810                     ; line_number = 293
811                     ; bind _trisa4 = _trisa@4
812  00000085 = _trisa4___byte equ _trisa
813  00000004 = _trisa4___bit equ 4
814                     ; line_number = 294
815                     ; bind _trisa3 = _trisa@3
816  00000085 = _trisa3___byte equ _trisa
817  00000003 = _trisa3___bit equ 3
818                     ; line_number = 295
819                     ; bind _trisa2 = _trisa@2
820  00000085 = _trisa2___byte equ _trisa
821  00000002 = _trisa2___bit equ 2
822                     ; line_number = 296
823                     ; bind _trisa1 = _trisa@1
824  00000085 = _trisa1___byte equ _trisa
825  00000001 = _trisa1___bit equ 1
826                     ; line_number = 297
827                     ; bind _trisa0 = _trisa@0
828  00000085 = _trisa0___byte equ _trisa
829  00000000 = _trisa0___bit equ 0
830             
831                     ; line_number = 299
832                     ; register _trisb = 
833  00000086 = _trisb equ 134
834                     ; line_number = 300
835                     ; bind _trisb7 = _trisb@7
836  00000086 = _trisb7___byte equ _trisb
837  00000007 = _trisb7___bit equ 7
838                     ; line_number = 301
839                     ; bind _trisb6 = _trisb@6
840  00000086 = _trisb6___byte equ _trisb
841  00000006 = _trisb6___bit equ 6
842                     ; line_number = 302
843                     ; bind _trisb5 = _trisb@5
844  00000086 = _trisb5___byte equ _trisb
845  00000005 = _trisb5___bit equ 5
846                     ; line_number = 303
847                     ; bind _trisb4 = _trisb@4
848  00000086 = _trisb4___byte equ _trisb
849  00000004 = _trisb4___bit equ 4
850                     ; line_number = 304
851                     ; bind _trisb3 = _trisb@3
852  00000086 = _trisb3___byte equ _trisb
853  00000003 = _trisb3___bit equ 3
854                     ; line_number = 305
855                     ; bind _trisb2 = _trisb@2
856  00000086 = _trisb2___byte equ _trisb
857  00000002 = _trisb2___bit equ 2
858                     ; line_number = 306
859                     ; bind _trisb1 = _trisb@1
860  00000086 = _trisb1___byte equ _trisb
861  00000001 = _trisb1___bit equ 1
862                     ; line_number = 307
863                     ; bind _trisb0 = _trisb@0
864  00000086 = _trisb0___byte equ _trisb
865  00000000 = _trisb0___bit equ 0
866             
867                     ; line_number = 309
868                     ; register _pie1 = 
869  0000008c = _pie1 equ 140
870                     ; line_number = 310
871                     ; bind _eeie7 = _pie1@7
872  0000008c = _eeie7___byte equ _pie1
873  00000007 = _eeie7___bit equ 7
874                     ; line_number = 311
875                     ; bind _cmie = _pie1@6
876  0000008c = _cmie___byte equ _pie1
877  00000006 = _cmie___bit equ 6
878                     ; line_number = 312
879                     ; bind _rcie = _pie1@5
880  0000008c = _rcie___byte equ _pie1
881  00000005 = _rcie___bit equ 5
882                     ; line_number = 313
883                     ; bind _txie = _pie1@4
884  0000008c = _txie___byte equ _pie1
885  00000004 = _txie___bit equ 4
886                     ; line_number = 314
887                     ; bind _ccp1ie = _pie1@2
888  0000008c = _ccp1ie___byte equ _pie1
889  00000002 = _ccp1ie___bit equ 2
890                     ; line_number = 315
891                     ; bind _tmr2ie = _pie1@1
892  0000008c = _tmr2ie___byte equ _pie1
893  00000001 = _tmr2ie___bit equ 1
894                     ; line_number = 316
895                     ; bind _tmr1ie = _pie1@0
896  0000008c = _tmr1ie___byte equ _pie1
897  00000000 = _tmr1ie___bit equ 0
898             
899                     ; line_number = 318
900                     ; register _pcon = 
901  0000008e = _pcon equ 142
902                     ; line_number = 319
903                     ; bind _oscf = _pcon@3
904  0000008e = _oscf___byte equ _pcon
905  00000003 = _oscf___bit equ 3
906                     ; line_number = 320
907                     ; bind _por = _pcon@1
908  0000008e = _por___byte equ _pcon
909  00000001 = _por___bit equ 1
910                     ; line_number = 321
911                     ; bind _bod = _pcon@0
912  0000008e = _bod___byte equ _pcon
913  00000000 = _bod___bit equ 0
914             
915                     ; line_number = 323
916                     ; register _pr2 = 
917  00000092 = _pr2 equ 146
918             
919                     ; line_number = 325
920                     ; register _txsta = 
921  00000098 = _txsta equ 152
922                     ; line_number = 326
923                     ; bind _csrc = _txsta@7
924  00000098 = _csrc___byte equ _txsta
925  00000007 = _csrc___bit equ 7
926                     ; line_number = 327
927                     ; bind _tx9 = _txsta@6
928  00000098 = _tx9___byte equ _txsta
929  00000006 = _tx9___bit equ 6
930                     ; line_number = 328
931                     ; bind _txen = _txsta@5
932  00000098 = _txen___byte equ _txsta
933  00000005 = _txen___bit equ 5
934                     ; line_number = 329
935                     ; bind _sync = _txsta@4
936  00000098 = _sync___byte equ _txsta
937  00000004 = _sync___bit equ 4
938                     ; line_number = 330
939                     ; bind _brgh = _txsta@2
940  00000098 = _brgh___byte equ _txsta
941  00000002 = _brgh___bit equ 2
942                     ; line_number = 331
943                     ; bind _trmt = _txsta@1
944  00000098 = _trmt___byte equ _txsta
945  00000001 = _trmt___bit equ 1
946                     ; line_number = 332
947                     ; bind _tx9d = _txsta@0
948  00000098 = _tx9d___byte equ _txsta
949  00000000 = _tx9d___bit equ 0
950             
951                     ; line_number = 334
952                     ; register _spbrg = 
953  00000099 = _spbrg equ 153
954             
955                     ; line_number = 336
956                     ; register _eedat = 
957  0000009a = _eedat equ 154
958             
959                     ; line_number = 338
960                     ; register _eeadr = 
961  0000009b = _eeadr equ 155
962             
963                     ; line_number = 340
964                     ; register _eecon1 = 
965  0000009c = _eecon1 equ 156
966                     ; line_number = 341
967                     ; bind _wrerr = _eecon1@3
968  0000009c = _wrerr___byte equ _eecon1
969  00000003 = _wrerr___bit equ 3
970                     ; line_number = 342
971                     ; bind _wren = _eecon1@2
972  0000009c = _wren___byte equ _eecon1
973  00000002 = _wren___bit equ 2
974                     ; line_number = 343
975                     ; bind _wr = _eecon1@1
976  0000009c = _wr___byte equ _eecon1
977  00000001 = _wr___bit equ 1
978                     ; line_number = 344
979                     ; bind _rd = _eecon1@0
980  0000009c = _rd___byte equ _eecon1
981  00000000 = _rd___bit equ 0
982             
983                     ; line_number = 346
984                     ; register _eecon2 = 
985  0000009d = _eecon2 equ 157
986             
987                     ; line_number = 348
988                     ; register _vrcon = 
989  0000009f = _vrcon equ 159
990                     ; line_number = 349
991                     ; bind _vren = _vrcon@7
992  0000009f = _vren___byte equ _vrcon
993  00000007 = _vren___bit equ 7
994                     ; line_number = 350
995                     ; bind _vroe = _vrcon@6
996  0000009f = _vroe___byte equ _vrcon
997  00000006 = _vroe___bit equ 6
998                     ; line_number = 351
999                     ; bind _vrr = _vrcon@5
1000 0000009f = _vrr___byte equ _vrcon
1001 00000005 = _vrr___bit equ 5
1002                    ; line_number = 352
1003                    ; bind _vr3 = _vrcon@3
1004 0000009f = _vr3___byte equ _vrcon
1005 00000003 = _vr3___bit equ 3
1006                    ; line_number = 353
1007                    ; bind _vr2 = _vrcon@2
1008 0000009f = _vr2___byte equ _vrcon
1009 00000002 = _vr2___bit equ 2
1010                    ; line_number = 354
1011                    ; bind _vr1 = _vrcon@1
1012 0000009f = _vr1___byte equ _vrcon
1013 00000001 = _vr1___bit equ 1
1014                    ; line_number = 355
1015                    ; bind _vr0 = _vrcon@0
1016 0000009f = _vr0___byte equ _vrcon
1017 00000000 = _vr0___bit equ 0
1018            
1019            
1020            
1021                    ; buffer = '_pic16f628a'
1022                    ; line_number = 6
1023                    ; library _pic16f628 exited
1024            
1025            
1026                    ; buffer = 'lcd32'
1027                    ; line_number = 17
1028                    ; library _pic16f628a exited
1029            
1030                    ; # The system is running at 16MHz:
1031                    ; line_number = 20
1032                    ; library clock16mhz entered
1033                    ; # Copyright (c) 2006 by Wayne C. Gramlich
1034                    ; # All rights reserved.
1035            
1036                    ; # This library defines the contstants {clock_rate}, {instruction_rate},
1037                    ; # and {clocks_per_instruction}.
1038            
1039                    ; # Define processor constants:
1040                    ; buffer = 'clock16mhz'
1041                    ; line_number = 9
1042                    ; constant clock_rate = 16000000
1043 00f42400 = clock_rate equ 16000000
1044                    ; line_number = 10
1045                    ; constant clocks_per_instruction = 4
1046 00000004 = clocks_per_instruction equ 4
1047                    ; line_number = 11
1048                    ; constant instruction_rate = clock_rate / clocks_per_instruction
1049 003d0900 = instruction_rate equ 4000000
1050            
1051            
1052                    ; buffer = 'lcd32'
1053                    ; line_number = 20
1054                    ; library clock16mhz exited
1055                    ; # A microsecond takes 4 cycles at 16MHz:
1056                    ; line_number = 22
1057                    ; constant microsecond = 4
1058 00000004 = microsecond equ 4
1059            
1060                    ; # The library of bus access routines for use by the PIC16F628.
1061                    ; line_number = 25
1062                    ; library rb2bus_pic16f628 entered
1063            
1064                    ; # Copyright (c) 2006-2007 by Wayne C. Gramlich
1065                    ; # All rights reserved.
1066            
1067                    ; # This module provides some procedures for accessing a RoboBricks2
1068                    ; # bus via a UART.  It is speicialized for the PIC16F688.
1069                    ; #
1070                    ; # It defines the following procedure:
1071                    ; #
1072                    ; # {rb2bus_initialize}({address}) The procedure that initializes the UART
1073                    ; #                                for bus access.
1074            
1075                    ; # All other bus access procedures are defined in the {rb2bus} library
1076                    ; # which is accessed below:
1077                    ; buffer = 'rb2bus_pic16f628'
1078                    ; line_number = 16
1079                    ; library rb2bus entered
1080            
1081                    ; # Copyright (c) 2006-2007 by Wayne C. Gramlich
1082                    ; # All rights reserved.
1083            
1084                    ; # This module provides some procedures for accessing a RoboBricks2
1085                    ; # bus via a UART.
1086                    ; #
1087                    ; # This procedure defines the following procedures:
1088                    ; #
1089                    ; # {rb2bus_select_wait}  This procedure waits for the module to become selected
1090                    ; # {rb2bus_deselect}     This procedure causes this module to be deselected.
1091                    ; # {rb2bus_byte_get}     This procedure will get a byte form the bus.
1092                    ; # {rb2bus_byte_put}     This procedure will send a byte to the bus.
1093                    ; #
1094                    ; # The global variable {rb2bus_error} is set to 1 whenever the procedures
1095                    ; # feel like there is a command decoding error.
1096                    ; #
1097                    ; # The way to use these procedures is quite as follows:
1098                    ; #
1099                    ; #    # Comamnd byte variable:
1100                    ; #    local command byte
1101                    ; #
1102                    ; #    # Other initialize code goes here:
1103                    ; #
1104                    ; #    # Process commands from bus master:
1105                    ; #    loop_forever
1106                    ; #        rb2bus_error := _true
1107                    ; #	 while rb2bus_error
1108                    ; #	     call rb2bus_select_wait()
1109                    ; #	     command := rb2bus_byte_get()
1110                    ; #
1111                    ; #        # Decode command:
1112                    ; #	 switch command >> 6
1113                    ; #	   ...
1114                    ; #             case 5:
1115                    ; #	        # 0000 0101 (Foo command):
1116                    ; #	          if !rb2bus_error
1117                    ; #		      # Do foo command:
1118                    ; #
1119                    ; # The key concept behind these procedures is to make command
1120                    ; # decoding for the slave module easy.  If the slave module
1121                    ; # is in the middle of command decoding and the master suddenly
1122                    ; # sends out a module select command, we need to gracefully recover
1123                    ; # from the problem.  A command should only be executed if
1124                    ; # {rb2bus_error} is not set.  If {rb2bus_error} is set, we want
1125                    ; # to gracefully get back to the beginning of the loop without
1126                    ; # doing any damage.  Once {rb2bus_error} is set, all calls to
1127                    ; # {rb2bus_byte_get} return 0 and all calls to {rb2bus_byte_put}
1128                    ; # do nothing.  At the beginning of the loop, {rb2bus_error} is
1129                    ; # cleared by the {rb2bus_select_wait}() procedure and we have
1130                    ; # recovered from the situation.
1131            
1132                    ; buffer = 'rb2bus'
1133                    ; line_number = 54
1134                    ; library rb2_constants entered
1135            
1136                    ; # Copyright (c) 2006-2007 by Wayne C. Gramlich.
1137                    ; # All rights reserved.
1138            
1139                    ; buffer = 'rb2_constants'
1140                    ; line_number = 6
1141                    ; constant rb2_ok = 0xa5
1142 000000a5 = rb2_ok equ 165
1143            
1144                    ; line_number = 8
1145                    ; constant rb2_common_address_set = 0xfc
1146 000000fc = rb2_common_address_set equ 252
1147                    ; line_number = 9
1148                    ; constant rb2_common_id_next = 0xfd
1149 000000fd = rb2_common_id_next equ 253
1150                    ; line_number = 10
1151                    ; constant rb2_common_id_start = 0xfe
1152 000000fe = rb2_common_id_start equ 254
1153                    ; line_number = 11
1154                    ; constant rb2_common_deselect = 0xff
1155 000000ff = rb2_common_deselect equ 255
1156            
1157                    ; line_number = 13
1158                    ; constant rb2_laser1_address = 1
1159 00000001 = rb2_laser1_address equ 1
1160                    ; line_number = 14
1161                    ; constant rb2_laser1_sense_read = 0
1162 00000000 = rb2_laser1_sense_read equ 0
1163                    ; line_number = 15
1164                    ; constant rb2_laser1_enable_read = 1
1165 00000001 = rb2_laser1_enable_read equ 1
1166                    ; line_number = 16
1167                    ; constant rb2_laser1_enable_clear = 2
1168 00000002 = rb2_laser1_enable_clear equ 2
1169                    ; line_number = 17
1170                    ; constant rb2_laser1_enable_set = 3
1171 00000003 = rb2_laser1_enable_set equ 3
1172            
1173                    ; line_number = 19
1174                    ; constant rb2_minimotor2_address = 2
1175 00000002 = rb2_minimotor2_address equ 2
1176                    ; line_number = 20
1177                    ; constant rb2_midimotor2_address = 3
1178 00000003 = rb2_midimotor2_address equ 3
1179                    ; line_number = 21
1180                    ; constant rb2_motor0_speed_get = 0
1181 00000000 = rb2_motor0_speed_get equ 0
1182                    ; line_number = 22
1183                    ; constant rb2_motor0_speed_set = 1
1184 00000001 = rb2_motor0_speed_set equ 1
1185                    ; line_number = 23
1186                    ; constant rb2_motor1_speed_get = 2
1187 00000002 = rb2_motor1_speed_get equ 2
1188                    ; line_number = 24
1189                    ; constant rb2_motor1_speed_set = 3
1190 00000003 = rb2_motor1_speed_set equ 3
1191                    ; line_number = 25
1192                    ; constant rb2_duty_cycle_get = 4
1193 00000004 = rb2_duty_cycle_get equ 4
1194                    ; line_number = 26
1195                    ; constant rb2_duty_cycle_set = 8
1196 00000008 = rb2_duty_cycle_set equ 8
1197            
1198                    ; line_number = 28
1199                    ; constant rb2_irdistance2_address = 4
1200 00000004 = rb2_irdistance2_address equ 4
1201                    ; line_number = 29
1202                    ; constant rb2_irdistance2_raw0_get = 0
1203 00000000 = rb2_irdistance2_raw0_get equ 0
1204                    ; line_number = 30
1205                    ; constant rb2_irdistance2_raw1_get = 1
1206 00000001 = rb2_irdistance2_raw1_get equ 1
1207                    ; line_number = 31
1208                    ; constant rb2_irdistance2_smooth0_get = 2
1209 00000002 = rb2_irdistance2_smooth0_get equ 2
1210                    ; line_number = 32
1211                    ; constant rb2_irdistance2_smooth1_get = 3
1212 00000003 = rb2_irdistance2_smooth1_get equ 3
1213                    ; line_number = 33
1214                    ; constant rb2_irdistance2_linear0_get = 4
1215 00000004 = rb2_irdistance2_linear0_get equ 4
1216                    ; line_number = 34
1217                    ; constant rb2_irdistance2_linear1_get = 6
1218 00000006 = rb2_irdistance2_linear1_get equ 6
1219            
1220                    ; line_number = 36
1221                    ; constant rb2_shaft2_address = 5
1222 00000005 = rb2_shaft2_address equ 5
1223                    ; line_number = 37
1224                    ; constant rb2_shaft2_count_latch = 0
1225 00000000 = rb2_shaft2_count_latch equ 0
1226                    ; line_number = 38
1227                    ; constant rb2_shaft2_count_clear = 1
1228 00000001 = rb2_shaft2_count_clear equ 1
1229                    ; line_number = 39
1230                    ; constant rb2_shaft2_shaft0_high_get = 2
1231 00000002 = rb2_shaft2_shaft0_high_get equ 2
1232                    ; line_number = 40
1233                    ; constant rb2_shaft2_shaft1_high_get = 3
1234 00000003 = rb2_shaft2_shaft1_high_get equ 3
1235                    ; line_number = 41
1236                    ; constant rb2_shaft2_continue_get = 4
1237 00000004 = rb2_shaft2_continue_get equ 4
1238                    ; line_number = 42
1239                    ; constant rb2_shaft2_shaft0_low_get = rb2_shaft2_continue_get
1240 00000004 = rb2_shaft2_shaft0_low_get equ 4
1241                    ; line_number = 43
1242                    ; constant rb2_shaft2_shaft1_low_get = rb2_shaft2_continue_get
1243 00000004 = rb2_shaft2_shaft1_low_get equ 4
1244                    ; line_number = 44
1245                    ; constant rb2_shaft2_x_get = 0x10
1246 00000010 = rb2_shaft2_x_get equ 16
1247                    ; line_number = 45
1248                    ; constant rb2_shaft2_y_get = 0x11
1249 00000011 = rb2_shaft2_y_get equ 17
1250                    ; line_number = 46
1251                    ; constant rb2_shaft2_bearing16_get = 0x12
1252 00000012 = rb2_shaft2_bearing16_get equ 18
1253                    ; line_number = 47
1254                    ; constant rb2_shaft2_bearing8_get = 0x13
1255 00000013 = rb2_shaft2_bearing8_get equ 19
1256                    ; line_number = 48
1257                    ; constant rb2_shaft2_target_x_get = 0x14
1258 00000014 = rb2_shaft2_target_x_get equ 20
1259                    ; line_number = 49
1260                    ; constant rb2_shaft2_target_y_get = 0x15
1261 00000015 = rb2_shaft2_target_y_get equ 21
1262                    ; line_number = 50
1263                    ; constant rb2_shaft2_target_bearing16_get = 0x16
1264 00000016 = rb2_shaft2_target_bearing16_get equ 22
1265                    ; line_number = 51
1266                    ; constant rb2_shaft2_target_bearing8_get = 0x17
1267 00000017 = rb2_shaft2_target_bearing8_get equ 23
1268                    ; line_number = 52
1269                    ; constant rb2_shaft2_target_distance_get = 0x18
1270 00000018 = rb2_shaft2_target_distance_get equ 24
1271                    ; line_number = 53
1272                    ; constant rb2_shaft2_wheel_spacing_get = 0x19
1273 00000019 = rb2_shaft2_wheel_spacing_get equ 25
1274                    ; line_number = 54
1275                    ; constant rb2_shaft2_wheel_ticks_get = 0x1a
1276 0000001a = rb2_shaft2_wheel_ticks_get equ 26
1277                    ; line_number = 55
1278                    ; constant rb2_shaft2_wheel_diameter_get = 0x1b
1279 0000001b = rb2_shaft2_wheel_diameter_get equ 27
1280                    ; line_number = 56
1281                    ; constant rb2_shaft2_count_iteration_get = 0x1c
1282 0000001c = rb2_shaft2_count_iteration_get equ 28
1283                    ; line_number = 57
1284                    ; constant rb2_shaft2_counter_signs_get = 0x1d
1285 0000001d = rb2_shaft2_counter_signs_get equ 29
1286                    ; line_number = 58
1287                    ; constant rb2_shaft2_x_set = 0x20
1288 00000020 = rb2_shaft2_x_set equ 32
1289                    ; line_number = 59
1290                    ; constant rb2_shaft2_y_set = 0x21
1291 00000021 = rb2_shaft2_y_set equ 33
1292                    ; line_number = 60
1293                    ; constant rb2_shaft2_bearing16_set = 0x22
1294 00000022 = rb2_shaft2_bearing16_set equ 34
1295                    ; line_number = 61
1296                    ; constant rb2_shaft2_navigation_latch = 0x23
1297 00000023 = rb2_shaft2_navigation_latch equ 35
1298                    ; line_number = 62
1299                    ; constant rb2_shaft2_target_x_set = 0x24
1300 00000024 = rb2_shaft2_target_x_set equ 36
1301                    ; line_number = 63
1302                    ; constant rb2_shaft2_target_y_set = 0x25
1303 00000025 = rb2_shaft2_target_y_set equ 37
1304                    ; line_number = 64
1305                    ; constant rb2_shaft2_wheel_spacing_set = 0x29
1306 00000029 = rb2_shaft2_wheel_spacing_set equ 41
1307                    ; line_number = 65
1308                    ; constant rb2_shaft2_wheel_ticks_set = 0x2a
1309 0000002a = rb2_shaft2_wheel_ticks_set equ 42
1310                    ; line_number = 66
1311                    ; constant rb2_shaft2_wheel_diameter_set = 0x2b
1312 0000002b = rb2_shaft2_wheel_diameter_set equ 43
1313                    ; line_number = 67
1314                    ; constant rb2_shaft2_counter_signs_set = 0x2c
1315 0000002c = rb2_shaft2_counter_signs_set equ 44
1316            
1317                    ; line_number = 69
1318                    ; constant rb2_orient5_address = 6
1319 00000006 = rb2_orient5_address equ 6
1320            
1321                    ; line_number = 71
1322                    ; constant rb2_compass8_address = 7
1323 00000007 = rb2_compass8_address equ 7
1324            
1325                    ; line_number = 73
1326                    ; constant rb2_io8_address = 8
1327 00000008 = rb2_io8_address equ 8
1328                    ; line_number = 74
1329                    ; constant rb2_io8_digital8_get = 0
1330 00000000 = rb2_io8_digital8_get equ 0
1331                    ; line_number = 75
1332                    ; constant rb2_io8_digital8_set = 1
1333 00000001 = rb2_io8_digital8_set equ 1
1334                    ; line_number = 76
1335                    ; constant rb2_io8_direction_get = 2
1336 00000002 = rb2_io8_direction_get equ 2
1337                    ; line_number = 77
1338                    ; constant rb2_io8_direction_set = 3
1339 00000003 = rb2_io8_direction_set equ 3
1340                    ; line_number = 78
1341                    ; constant rb2_io8_analog_mask_get = 4
1342 00000004 = rb2_io8_analog_mask_get equ 4
1343                    ; line_number = 79
1344                    ; constant rb2_io8_analog_mask_set = 5
1345 00000005 = rb2_io8_analog_mask_set equ 5
1346                    ; line_number = 80
1347                    ; constant rb2_io8_analog8_get = 0x10
1348 00000010 = rb2_io8_analog8_get equ 16
1349                    ; line_number = 81
1350                    ; constant rb2_io8_analog10_get = 0x18
1351 00000018 = rb2_io8_analog10_get equ 24
1352                    ; line_number = 82
1353                    ; constant rb2_low_set = 0x20
1354 00000020 = rb2_low_set equ 32
1355                    ; line_number = 83
1356                    ; constant rb2_high_set = 0x30
1357 00000030 = rb2_high_set equ 48
1358            
1359                    ; line_number = 85
1360                    ; constant rb2_sonar2_address = 9
1361 00000009 = rb2_sonar2_address equ 9
1362            
1363                    ; line_number = 87
1364                    ; constant rb2_voice1_address = 10
1365 0000000a = rb2_voice1_address equ 10
1366            
1367                    ; line_number = 89
1368                    ; constant rb2_servo4_address = 11
1369 0000000b = rb2_servo4_address equ 11
1370                    ; line_number = 90
1371                    ; constant rb2_servo4_servo0 = 0
1372 00000000 = rb2_servo4_servo0 equ 0
1373                    ; line_number = 91
1374                    ; constant rb2_servo4_servo1 = 1
1375 00000001 = rb2_servo4_servo1 equ 1
1376                    ; line_number = 92
1377                    ; constant rb2_servo4_servo2 = 2
1378 00000002 = rb2_servo4_servo2 equ 2
1379                    ; line_number = 93
1380                    ; constant rb2_servo4_servo3 = 3
1381 00000003 = rb2_servo4_servo3 equ 3
1382                    ; line_number = 94
1383                    ; constant rb2_servo4_quick_set = 0
1384 00000000 = rb2_servo4_quick_set equ 0
1385                    ; line_number = 95
1386                    ; constant rb2_servo4_quick_low = 0
1387 00000000 = rb2_servo4_quick_low equ 0
1388                    ; line_number = 96
1389                    ; constant rb2_servo4_quick_center = 40
1390 00000028 = rb2_servo4_quick_center equ 40
1391                    ; line_number = 97
1392                    ; constant rb2_servo4_quick_high = 0x7c
1393 0000007c = rb2_servo4_quick_high equ 124
1394                    ; line_number = 98
1395                    ; constant rb2_servo4_high_low_set = 0x80
1396 00000080 = rb2_servo4_high_low_set equ 128
1397                    ; line_number = 99
1398                    ; constant rb2_servo4_short_high_low_set = 0x84
1399 00000084 = rb2_servo4_short_high_low_set equ 132
1400                    ; line_number = 100
1401                    ; constant rb2_servo4_high_set = 0x88
1402 00000088 = rb2_servo4_high_set equ 136
1403                    ; line_number = 101
1404                    ; constant rb2_servo4_low_set = 0x8c
1405 0000008c = rb2_servo4_low_set equ 140
1406                    ; line_number = 102
1407                    ; constant rb2_servo4_enables_set = 0x90
1408 00000090 = rb2_servo4_enables_set equ 144
1409                    ; line_number = 103
1410                    ; constant rb2_servo4_enable0 = 1
1411 00000001 = rb2_servo4_enable0 equ 1
1412                    ; line_number = 104
1413                    ; constant rb2_servo4_enable1 = 2
1414 00000002 = rb2_servo4_enable1 equ 2
1415                    ; line_number = 105
1416                    ; constant rb2_servo4_enable2 = 4
1417 00000004 = rb2_servo4_enable2 equ 4
1418                    ; line_number = 106
1419                    ; constant rb2_servo4_enable3 = 8
1420 00000008 = rb2_servo4_enable3 equ 8
1421                    ; line_number = 107
1422                    ; constant rb2_servo4_enable_all = 0xf
1423 0000000f = rb2_servo4_enable_all equ 15
1424                    ; line_number = 108
1425                    ; constant rb2_servo4_enable_none = 0
1426 00000000 = rb2_servo4_enable_none equ 0
1427                    ; line_number = 109
1428                    ; constant rb2_servo4_high_get = 0xa0
1429 000000a0 = rb2_servo4_high_get equ 160
1430                    ; line_number = 110
1431                    ; constant rb2_servo4_low_get = 0xa4
1432 000000a4 = rb2_servo4_low_get equ 164
1433                    ; line_number = 111
1434                    ; constant rb2_servo4_enables_get = 0xa8
1435 000000a8 = rb2_servo4_enables_get equ 168
1436            
1437                    ; line_number = 113
1438                    ; constant rb2_controller28_address = 28
1439 0000001c = rb2_controller28_address equ 28
1440            
1441                    ; line_number = 115
1442                    ; constant rb2_lcd32_address = 32
1443 00000020 = rb2_lcd32_address equ 32
1444                    ; line_number = 116
1445                    ; constant rb2_lcd32_row_set = 4
1446 00000004 = rb2_lcd32_row_set equ 4
1447                    ; line_number = 117
1448                    ; constant rb2_lcd32_row0_set = rb2_lcd32_row_set | 0
1449 00000004 = rb2_lcd32_row0_set equ 4
1450                    ; line_number = 118
1451                    ; constant rb2_lcd32_row1_set = rb2_lcd32_row_set | 1
1452 00000005 = rb2_lcd32_row1_set equ 5
1453                    ; line_number = 119
1454                    ; constant rb2_lcd32_row2_set = rb2_lcd32_row_set | 2
1455 00000006 = rb2_lcd32_row2_set equ 6
1456                    ; line_number = 120
1457                    ; constant rb2_lcd32_row3_set = rb2_lcd32_row_set | 3
1458 00000007 = rb2_lcd32_row3_set equ 7
1459                    ; line_number = 121
1460                    ; constant rb2_lcd32_new_line = 0xa
1461 0000000a = rb2_lcd32_new_line equ 10
1462                    ; line_number = 122
1463                    ; constant rb2_lcd32_form_feed = 0xc
1464 0000000c = rb2_lcd32_form_feed equ 12
1465                    ; line_number = 123
1466                    ; constant rb2_lcd32_carriage_return = 0xd
1467 0000000d = rb2_lcd32_carriage_return equ 13
1468                    ; line_number = 124
1469                    ; constant rb2_lcd32_column_set = 0x10
1470 00000010 = rb2_lcd32_column_set equ 16
1471            
1472            
1473                    ; buffer = 'rb2bus'
1474                    ; line_number = 54
1475                    ; library rb2_constants exited
1476                    ; line_number = 55
1477                    ; library rb2bus_globals entered
1478            
1479                    ; # Copyright (c) 2006-2007 by Wayne C. Gramlich
1480                    ; # All rights reserved.
1481            
1482                    ; # These are the global variables used by both the {rb2bus} and
1483                    ; # the various {rb2bus_picXXXX} libraries.  Poll based firmware
1484                    ; # uses both libraries, whereas interrupt driven software only
1485                    ; # uses the {rb2bus_picXXX} libraries.
1486            
1487                    ; buffer = 'rb2bus_globals'
1488                    ; line_number = 11
1489                    ; global rb2bus_selected bit	# 
1490 0000006f = rb2bus_selected___byte equ globals___0+79
1491 00000000 = rb2bus_selected___bit equ 0
1492                    ; line_number = 12
1493                    ; global rb2bus_error bit		# Global error bit
1494 0000006f = rb2bus_error___byte equ globals___0+79
1495 00000001 = rb2bus_error___bit equ 1
1496                    ; line_number = 13
1497                    ; global rb2bus_address byte	# Bus address to respond to
1498 00000020 = rb2bus_address equ globals___0
1499                    ; line_number = 14
1500                    ; global rb2bus_index byte	# Index into id information
1501 00000021 = rb2bus_index equ globals___0+1
1502            
1503            
1504                    ; buffer = 'rb2bus'
1505                    ; line_number = 55
1506                    ; library rb2bus_globals exited
1507            
1508                    ; Delaying code generation for procedure  rb2bus_select_wait
1509                    ; Delaying code generation for procedure  rb2bus_deselect
1510                    ; Delaying code generation for procedure  rb2bus_byte_get
1511                    ; Delaying code generation for procedure  rb2bus_byte_put
1512                    ; Delaying code generation for procedure  rb2bus_command
1513            
1514                    ; buffer = 'rb2bus_pic16f628'
1515                    ; line_number = 16
1516                    ; library rb2bus exited
1517            
1518                    ; # Baud_Rate = Fosc / (16(X+1))
1519                    ; # 16 * (X+1) = Fosc/Baud_Rate
1520                    ; # X+1 = Fosc/(16*Baud_Rate)
1521                    ; # X = Fosc/(16*Baud_rate) - 1
1522            
1523                    ; line_number = 23
1524                    ; constant baud_rate_500k = 500000
1525 0007a120 = baud_rate_500k equ 500000
1526                    ; line_number = 24
1527                    ; constant spbrg_500k = clock_rate / (16 * baud_rate_500k) - 1
1528 00000001 = spbrg_500k equ 1
1529            
1530                    ; Delaying code generation for procedure  rb2bus_initialize
1531                    ; # The PIC16F628 only has 128 bytes of EEPROM:
1532                    ; line_number = 69
1533                    ; constant rb2bus_eedata_address = 0x7e
1534 0000007e = rb2bus_eedata_address equ 126
1535            
1536                    ; Delaying code generation for procedure  rb2bus_eedata_read
1537                    ; Delaying code generation for procedure  rb2bus_eedata_write
1538            
1539                    ; buffer = 'lcd32'
1540                    ; line_number = 25
1541                    ; library rb2bus_pic16f628 exited
1542            
1543                    ; # This module uses a 16MHz ceramic resonator; hence fosc = hs:
1544            
1545                    ; # Port stuff:
1546            
1547                    ; line_number = 32
1548                    ; constant trisb_mask = 0x30
1549 00000030 = trisb_mask equ 48
1550                    ; line_number = 33
1551                    ; constant db47_mask = 0xf
1552 0000000f = db47_mask equ 15
1553            
1554                    ; line_number = 35
1555                    ; package dip
1556                    ; line_number = 36
1557                    ; pin 1 = ra2_out, name = db2
1558 00000005 = db2___byte equ _porta
1559 00000002 = db2___bit equ 2
1560                    ; line_number = 37
1561                    ;  pin 2 = ra3_out, name = db3
1562 00000005 = db3___byte equ _porta
1563 00000003 = db3___bit equ 3
1564                    ; line_number = 38
1565                    ;  pin 3 = ra4_open_collector, name = e
1566 00000005 = e___byte equ _porta
1567 00000004 = e___bit equ 4
1568                    ; line_number = 39
1569                    ;  pin 4 = ra5_in, name = lines34
1570 00000005 = lines34___byte equ _porta
1571 00000005 = lines34___bit equ 5
1572                    ; line_number = 40
1573                    ;  pin 5 = ground
1574                    ; line_number = 41
1575                    ;  pin 6 = rb0_out, name = rs
1576 00000006 = rs___byte equ _portb
1577 00000000 = rs___bit equ 0
1578                    ; line_number = 42
1579                    ;  pin 7 = rx
1580                    ; line_number = 43
1581                    ;  pin 8 = tx
1582                    ; line_number = 44
1583                    ;  pin 9 = rb3_out, name = rw
1584 00000006 = rw___byte equ _portb
1585 00000003 = rw___bit equ 3
1586                    ; line_number = 45
1587                    ;  pin 10 = rb4_out, name = db4
1588 00000006 = db4___byte equ _portb
1589 00000004 = db4___bit equ 4
1590                    ; line_number = 46
1591                    ;  pin 11 = rb5_out, name = db5
1592 00000006 = db5___byte equ _portb
1593 00000005 = db5___bit equ 5
1594                    ; line_number = 47
1595                    ;  pin 12 = rb6_out, name = db6
1596 00000006 = db6___byte equ _portb
1597 00000006 = db6___bit equ 6
1598                    ; line_number = 48
1599                    ;  pin 13 = rb7_out, name = db7
1600 00000006 = db7___byte equ _portb
1601 00000006 = db7___bit equ 6
1602                    ; line_number = 49
1603                    ;  pin 14 = power_supply
1604                    ; line_number = 50
1605                    ;  pin 15 = osc2
1606                    ; line_number = 51
1607                    ;  pin 16 = osc1
1608                    ; line_number = 52
1609                    ;  pin 17 = ra0_out, name = db0
1610 00000005 = db0___byte equ _porta
1611 00000000 = db0___bit equ 0
1612                    ; line_number = 53
1613                    ;  pin 18 = ra1_out, name = db1
1614 00000005 = db1___byte equ _porta
1615 00000001 = db1___bit equ 1
1616            
1617                    ; line_number = 55
1618                    ; constant line_mask = 3
1619 00000003 = line_mask equ 3
1620                    ; line_number = 56
1621                    ; constant column_mask = 0xf
1622 0000000f = column_mask equ 15
1623                    ; line_number = 57
1624                    ; constant cursor_mode_mask = 3
1625 00000003 = cursor_mode_mask equ 3
1626            
1627                    ; line_number = 59
1628                    ; constant tmr0_prescale = 32
1629 00000020 = tmr0_prescale equ 32
1630                    ; # Spec. sheet says 1.53ms.  Sometimes a little more is required;
1631                    ; # hence use 1.6ms
1632                    ; line_number = 62
1633                    ; constant big_delay = 1600 * microsecond / tmr0_prescale + 1
1634 000000c9 = big_delay equ 201
1635                    ; line_number = 63
1636                    ; constant standard_delay = 39 * microsecond / tmr0_prescale + 1
1637 00000005 = standard_delay equ 5
1638                    ; line_number = 64
1639                    ; constant other_delay = 43 * microsecond / tmr0_prescale + 1
1640 00000006 = other_delay equ 6
1641            
1642                    ; line_number = 66
1643                    ; constant queue_size = 32
1644 00000020 = queue_size equ 32
1645                    ; line_number = 67
1646                    ; constant queue_mask = queue_size - 1
1647 0000001f = queue_mask equ 31
1648                    ; line_number = 68
1649                    ; global queue[queue_size] array[byte]
1650 0000002c = queue equ globals___0+12
1651                    ; line_number = 69
1652                    ; global processed byte
1653 0000004c = processed equ globals___0+44
1654                    ; line_number = 70
1655                    ; global available byte
1656 0000004d = available equ globals___0+45
1657            
1658                    ; line_number = 72
1659                    ; global cursor byte
1660 0000004e = cursor equ globals___0+46
1661                    ; line_number = 73
1662                    ; global cursor_pending bit
1663 0000006f = cursor_pending___byte equ globals___0+79
1664 00000004 = cursor_pending___bit equ 4
1665            
1666                    ; line_number = 75
1667                    ;info   75, 0
1668                    ; procedure main
1669   0000 :   main:
1670                    ; Initialize some registers
1671 0000 3007          movlw   7
1672 0001 009f          movwf   _cmcon
1673 0002 3020          movlw   32
1674 0003 1683          bsf     __rp0___byte, __rp0___bit
1675 0004 0085          movwf   _trisa
1676 0005 3006          movlw   6
1677 0006 0086          movwf   _trisb
1678                    ; arguments_none
1679                    ; line_number = 77
1680                    ;  returns_nothing
1681            
1682                    ; line_number = 79
1683                    ;  local command byte
1684 0000004f = main__command equ globals___0+47
1685                    ; line_number = 80
1686                    ;  local temporary byte
1687 00000050 = main__temporary equ globals___0+48
1688                    ; line_number = 81
1689                    ;  local id_index byte
1690 00000051 = main__id_index equ globals___0+49
1691            
1692                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>01 code:XX=cc=>XX)
1693                    ; line_number = 83
1694                    ;  call rb2bus_initialize(32)
1695                    ;info   83, 7
1696 0007 3020          movlw   32
1697 0008 1283          bcf     __rp0___byte, __rp0___bit
1698 0009 21f4          call    rb2bus_initialize
1699            
1700                    ; # Set up Timer0:
1701                    ; # Load {_option} register:
1702                    ; # {_rbpu}=0, {_intedg}=0, {_t0cs}=0 {_t0se}=0, _{psa}=0, and
1703                    ; # {_ps#}=100 (i.e. 1:32 prescale):
1704                    ; line_number = 89
1705                    ;  _option := 4
1706                    ;info   89, 10
1707 000a 3004          movlw   4
1708 000b 1683          bsf     __rp0___byte, __rp0___bit
1709 000c 0081          movwf   _option
1710                    ; line_number = 90
1711                    ;  _t0if := _false
1712                    ;info   90, 13
1713 000d 110b          bcf     _t0if___byte, _t0if___bit
1714                    ; line_number = 91
1715                    ;  _t0ie := _false
1716                    ;info   91, 14
1717 000e 128b          bcf     _t0ie___byte, _t0ie___bit
1718                    ; line_number = 92
1719                    ;  _tmr0 := 0
1720                    ;info   92, 15
1721 000f 1283          bcf     __rp0___byte, __rp0___bit
1722 0010 0181          clrf    _tmr0
1723            
1724                    ; line_number = 94
1725                    ;  id_index := 0
1726                    ;info   94, 17
1727 0011 01d1          clrf    main__id_index
1728            
1729                    ; # Initialize the LCD:
1730                    ; line_number = 97
1731                    ;  call lcd_init()
1732                    ;info   97, 18
1733 0012 2096          call    lcd_init
1734            
1735                    ; # Output the message:
1736                    ; line_number = 100
1737                    ;  call line_put(0, '1')
1738                    ;info   100, 19
1739 0013 01d2          clrf    line_put__new_line
1740 0014 3031          movlw   49
1741 0015 2053          call    line_put
1742                    ; line_number = 101
1743                    ;  call line_put(1, '2')
1744                    ;info   101, 22
1745 0016 3001          movlw   1
1746 0017 00d2          movwf   line_put__new_line
1747 0018 3032          movlw   50
1748 0019 2053          call    line_put
1749                    ; line_number = 102
1750                    ;  call line_put(2, '3')
1751                    ;info   102, 26
1752 001a 3002          movlw   2
1753 001b 00d2          movwf   line_put__new_line
1754 001c 3033          movlw   51
1755 001d 2053          call    line_put
1756                    ; line_number = 103
1757                    ;  call line_put(3, '4')
1758                    ;info   103, 30
1759 001e 3003          movlw   3
1760 001f 00d2          movwf   line_put__new_line
1761 0020 3034          movlw   52
1762 0021 2053          call    line_put
1763            
1764                    ; line_number = 105
1765                    ;  call lcd_cursor_set(0)
1766                    ;info   105, 34
1767 0022 3000          movlw   0
1768 0023 2073          call    lcd_cursor_set
1769            
1770                    ; line_number = 107
1771                    ;  cursor := 0
1772                    ;info   107, 36
1773 0024 01ce          clrf    cursor
1774                    ; line_number = 108
1775                    ;  cursor_pending := _false
1776                    ;info   108, 37
1777 0025 126f          bcf     cursor_pending___byte, cursor_pending___bit
1778                    ; line_number = 109
1779                    ;  available := 0
1780                    ;info   109, 38
1781 0026 01cd          clrf    available
1782                    ; line_number = 110
1783                    ;  processed := 0
1784                    ;info   110, 39
1785 0027 01cc          clrf    processed
1786            
1787                    ; line_number = 112
1788                    ;  loop_forever start
1789   0028 :   main__1:
1790                    ; # Make sure that we have been selected:
1791                    ; line_number = 114
1792                    ;  rb2bus_error := _true
1793                    ;info   114, 40
1794 0028 14ef          bsf     rb2bus_error___byte, rb2bus_error___bit
1795                    ; line_number = 115
1796                    ;  while rb2bus_error start
1797   0029 :   main__2:
1798                    ;info   115, 41
1799                    ; =>bit_code_emit@symbol(): sym=rb2bus_error
1800                    ; No 1TEST: true.size=4 false.size=0
1801                    ; No 2TEST: true.size=4 false.size=0
1802                    ; 1GOTO: Single test with GOTO
1803 0029 1cef          btfss   rb2bus_error___byte, rb2bus_error___bit
1804 002a 282f          goto    main__3
1805                    ; line_number = 116
1806                    ; call rb2bus_select_wait()
1807                    ;info   116, 43
1808 002b 2155          call    rb2bus_select_wait
1809                    ; line_number = 117
1810                    ;  command := rb2bus_byte_get()
1811                    ;info   117, 44
1812 002c 2174          call    rb2bus_byte_get
1813 002d 00cf          movwf   main__command
1814            
1815 002e 2829          goto    main__2
1816                    ; Recombine size1 = 0 || size2 = 0
1817   002f :   main__3:
1818                    ; line_number = 115
1819                    ;  while rb2bus_error done
1820                    ; # Dispatch on the command:
1821                    ; line_number = 120
1822                    ;  switch command >> 6 start
1823                    ;info   120, 47
1824                    ; switch_before:(data:00=uu=>00 code:XX=cc=>XX) size=7
1825 002f 3000          movlw   main__10>>8
1826 0030 008a          movwf   __pclath
1827 0000005f = main__11 equ globals___0+63
1828 0031 0e4f          swapf   main__command,w
1829 0032 00df          movwf   main__11
1830 0033 0cdf          rrf     main__11,f
1831 0034 0c5f          rrf     main__11,w
1832 0035 3903          andlw   3
1833                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
1834 0036 3e38          addlw   main__10
1835 0037 0082          movwf   __pcl
1836                    ; page_group 4
1837   0038 :   main__10:
1838 0038 283c          goto    main__8
1839 0039 283c          goto    main__8
1840 003a 283c          goto    main__8
1841 003b 283f          goto    main__9
1842                    ; line_number = 121
1843                    ; case 0, 1, 2
1844   003c :   main__8:
1845                    ; line_number = 122
1846                    ; call enqueue(command)
1847                    ;info   122, 60
1848 003c 084f          movf    main__command,w
1849 003d 2082          call    enqueue
1850 003e 2852          goto    main__12
1851                    ; line_number = 123
1852                    ; case 3
1853   003f :   main__9:
1854                    ; line_number = 124
1855                    ; switch (command >> 3) & 7 start
1856                    ;info   124, 63
1857                    ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
1858 003f 3000          movlw   main__5>>8
1859 0040 008a          movwf   __pclath
1860 0000005f = main__6 equ globals___0+63
1861 0041 0c4f          rrf     main__command,w
1862 0042 00df          movwf   main__6
1863 0043 0cdf          rrf     main__6,f
1864 0044 0c5f          rrf     main__6,w
1865 0045 3907          andlw   7
1866                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
1867 0046 3e48          addlw   main__5
1868 0047 0082          movwf   __pcl
1869                    ; page_group 8
1870   0048 :   main__5:
1871 0048 2852          goto    main__7
1872 0049 2852          goto    main__7
1873 004a 2852          goto    main__7
1874 004b 2852          goto    main__7
1875 004c 2852          goto    main__7
1876 004d 2852          goto    main__7
1877 004e 2852          goto    main__7
1878 004f 2850          goto    main__4
1879                    ; line_number = 125
1880                    ; case 7
1881   0050 :   main__4:
1882                    ; line_number = 126
1883                    ; call rb2bus_command(command)
1884                    ;info   126, 80
1885 0050 084f          movf    main__command,w
1886 0051 21ac          call    rb2bus_command
1887            
1888            
1889   0052 :   main__7:
1890                    ; line_number = 124
1891                    ; switch (command >> 3) & 7 done
1892   0052 :   main__12:
1893                    ; line_number = 120
1894                    ;  switch command >> 6 done
1895                    ; line_number = 112
1896                    ;  loop_forever wrap-up
1897 0052 2828          goto    main__1
1898                    ; line_number = 112
1899                    ;  loop_forever done
1900                    ; delay after procedure statements=non-uniform
1901            
1902            
1903            
1904            
1905                    ; line_number = 129
1906                    ;info   129, 83
1907                    ; procedure line_put
1908   0053 :   line_put:
1909                    ; Last argument is sitting in W; save into argument variable
1910 0053 00d3          movwf   line_put__character
1911                    ; delay=4294967295
1912                    ; line_number = 130
1913                    ; argument new_line byte
1914 00000052 = line_put__new_line equ globals___0+50
1915                    ; line_number = 131
1916                    ; argument character byte
1917 00000053 = line_put__character equ globals___0+51
1918                    ; line_number = 132
1919                    ;  returns_nothing
1920            
1921                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
1922                    ; line_number = 134
1923                    ;  call lcd_cursor_set(new_line << 4)
1924                    ;info   134, 84
1925 00000060 = line_put__1 equ globals___0+64
1926 0054 0e52          swapf   line_put__new_line,w
1927 0055 39f0          andlw   240
1928 0056 2073          call    lcd_cursor_set
1929                    ; line_number = 135
1930                    ;  loop_exactly 16 start
1931                    ;info   135, 87
1932 00000060 = line_put__2 equ globals___0+64
1933 0057 3010          movlw   16
1934 0058 00e0          movwf   line_put__2
1935   0059 :   line_put__3:
1936                    ; line_number = 136
1937                    ; call lcd_character_put(character)
1938                    ;info   136, 89
1939 0059 0853          movf    line_put__character,w
1940 005a 2065          call    lcd_character_put
1941            
1942            
1943                    ; line_number = 135
1944                    ;  loop_exactly 16 wrap-up
1945 005b 0be0          decfsz  line_put__2,f
1946 005c 2859          goto    line_put__3
1947                    ; line_number = 135
1948                    ;  loop_exactly 16 done
1949                    ; delay after procedure statements=non-uniform
1950                    ; Implied return
1951 005d 3400          retlw   0
1952            
1953            
1954            
1955            
1956                    ; line_number = 139
1957                    ;info   139, 94
1958                    ; procedure lcd_command
1959   005e :   lcd_command:
1960                    ; Last argument is sitting in W; save into argument variable
1961 005e 00d5          movwf   lcd_command__command
1962                    ; delay=4294967295
1963                    ; line_number = 140
1964                    ; argument delay byte
1965 00000054 = lcd_command__delay equ globals___0+52
1966                    ; line_number = 141
1967                    ; argument command byte
1968 00000055 = lcd_command__command equ globals___0+53
1969                    ; line_number = 142
1970                    ;  returns_nothing
1971            
1972                    ; # This procedure will strobe {command} into the LCD controller.
1973                    ; # The procedure delays by 52uS to ensure the command has time
1974                    ; # to be digested by the LCD controller.
1975            
1976                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
1977                    ; line_number = 148
1978                    ;  call lcd_data_send(0, delay, command)
1979                    ;info   148, 95
1980 005f 12ef          bcf     lcd_data_send__rs_mode___byte, lcd_data_send__rs_mode___bit
1981 0060 0854          movf    lcd_command__delay,w
1982 0061 00dc          movwf   lcd_data_send__delay
1983 0062 0855          movf    lcd_command__command,w
1984 0063 20b5          call    lcd_data_send
1985            
1986            
1987                    ; delay after procedure statements=non-uniform
1988                    ; Implied return
1989 0064 3400          retlw   0
1990            
1991            
1992            
1993            
1994                    ; line_number = 151
1995                    ;info   151, 101
1996                    ; procedure lcd_character_put
1997   0065 :   lcd_character_put:
1998                    ; Last argument is sitting in W; save into argument variable
1999 0065 00d6          movwf   lcd_character_put__character
2000                    ; delay=4294967295
2001                    ; line_number = 152
2002                    ; argument character byte
2003 00000056 = lcd_character_put__character equ globals___0+54
2004                    ; line_number = 153
2005                    ;  returns_nothing
2006            
2007                    ; # This procedure will output {character} to the LCD display
2008                    ; # and move the cursor right by one.
2009            
2010                    ; # Send high nibble (RW=0 & RS=1):
2011                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
2012                    ; line_number = 159
2013                    ;  call lcd_data_send(1, other_delay, character)
2014                    ;info   159, 102
2015 0066 16ef          bsf     lcd_data_send__rs_mode___byte, lcd_data_send__rs_mode___bit
2016 0067 3006          movlw   6
2017 0068 00dc          movwf   lcd_data_send__delay
2018 0069 0856          movf    lcd_character_put__character,w
2019 006a 20b5          call    lcd_data_send
2020                    ; line_number = 160
2021                    ;  cursor := cursor + 1
2022                    ;info   160, 107
2023 006b 0ace          incf    cursor,f
2024                    ; line_number = 161
2025                    ;  if cursor & 0xf = 0 start
2026                    ;info   161, 108
2027                    ; Left minus Right
2028 006c 300f          movlw   15
2029 006d 054e          andwf   cursor,w
2030                    ; =>bit_code_emit@symbol(): sym=__z
2031                    ; No 1TEST: true.size=2 false.size=0
2032                    ; No 2TEST: true.size=2 false.size=0
2033                    ; 1GOTO: Single test with GOTO
2034 006e 1d03          btfss   __z___byte, __z___bit
2035 006f 2872          goto    lcd_character_put__1
2036                    ; line_number = 162
2037                    ; call lcd_cursor_set(cursor - 1)
2038                    ;info   162, 112
2039 0070 034e          decf    cursor,w
2040 0071 2073          call    lcd_cursor_set
2041            
2042            
2043                    ; Recombine size1 = 0 || size2 = 0
2044   0072 :   lcd_character_put__1:
2045                    ; line_number = 161
2046                    ;  if cursor & 0xf = 0 done
2047                    ; delay after procedure statements=non-uniform
2048                    ; Implied return
2049 0072 3400          retlw   0
2050            
2051            
2052            
2053            
2054                    ; line_number = 165
2055                    ;info   165, 115
2056                    ; procedure lcd_cursor_set
2057   0073 :   lcd_cursor_set:
2058                    ; Last argument is sitting in W; save into argument variable
2059 0073 00d8          movwf   lcd_cursor_set__new_cursor
2060                    ; delay=4294967295
2061                    ; line_number = 166
2062                    ; argument new_cursor byte
2063 00000058 = lcd_cursor_set__new_cursor equ globals___0+56
2064                    ; line_number = 167
2065                    ;  returns_nothing
2066            
2067                    ; # This procedure will set the cursor position to {new_cursor}.
2068            
2069                    ; line_number = 171
2070                    ;  local command byte
2071 00000057 = lcd_cursor_set__command equ globals___0+55
2072            
2073                    ; # Keep the cursor on the first two lines:
2074                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
2075                    ; line_number = 174
2076                    ;  cursor := new_cursor & 0x1f
2077                    ;info   174, 116
2078 0074 301f          movlw   31
2079 0075 0558          andwf   lcd_cursor_set__new_cursor,w
2080 0076 00ce          movwf   cursor
2081            
2082                    ; line_number = 176
2083                    ;  command := cursor & 0xf
2084                    ;info   176, 119
2085 0077 300f          movlw   15
2086 0078 054e          andwf   cursor,w
2087 0079 00d7          movwf   lcd_cursor_set__command
2088                    ; line_number = 177
2089                    ;  if cursor@4 start
2090                    ;info   177, 122
2091 0000004e = lcd_cursor_set__select__2___byte equ cursor
2092 00000004 = lcd_cursor_set__select__2___bit equ 4
2093                    ; =>bit_code_emit@symbol(): sym=lcd_cursor_set__select__2
2094                    ; 1TEST: Single test with code in skip slot
2095 007a 1a4e          btfsc   lcd_cursor_set__select__2___byte, lcd_cursor_set__select__2___bit
2096                    ; line_number = 178
2097                    ; command@6 := _true
2098                    ;info   178, 123
2099 00000057 = lcd_cursor_set__select__1___byte equ lcd_cursor_set__command
2100 00000006 = lcd_cursor_set__select__1___bit equ 6
2101 007b 1757          bsf     lcd_cursor_set__select__1___byte, lcd_cursor_set__select__1___bit
2102                    ; Recombine size1 = 0 || size2 = 0
2103                    ; line_number = 177
2104                    ;  if cursor@4 done
2105                    ; line_number = 179
2106                    ; command@7 := _true
2107                    ;info   179, 124
2108 00000057 = lcd_cursor_set__select__3___byte equ lcd_cursor_set__command
2109 00000007 = lcd_cursor_set__select__3___bit equ 7
2110 007c 17d7          bsf     lcd_cursor_set__select__3___byte, lcd_cursor_set__select__3___bit
2111                    ; line_number = 180
2112                    ;  call lcd_command(standard_delay, command)
2113                    ;info   180, 125
2114 007d 3005          movlw   5
2115 007e 00d4          movwf   lcd_command__delay
2116 007f 0857          movf    lcd_cursor_set__command,w
2117 0080 205e          call    lcd_command
2118            
2119            
2120                    ; delay after procedure statements=non-uniform
2121                    ; Implied return
2122 0081 3400          retlw   0
2123            
2124            
2125            
2126            
2127                    ; line_number = 183
2128                    ;info   183, 130
2129                    ; procedure enqueue
2130   0082 :   enqueue:
2131                    ; Last argument is sitting in W; save into argument variable
2132 0082 00d9          movwf   enqueue__data
2133                    ; delay=4294967295
2134                    ; line_number = 184
2135                    ; argument data byte
2136 00000059 = enqueue__data equ globals___0+57
2137                    ; line_number = 185
2138                    ;  returns_nothing
2139            
2140                    ; # This procedure will enqueue {data} onto the command queue.
2141                    ; # It is your responsibility to ensure that the there is enough
2142                    ; # space in the queue.
2143            
2144                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
2145                    ; line_number = 191
2146                    ;  queue[available & queue_mask] := data
2147                    ;info   191, 131
2148                    ; index_fsr_first
2149 0083 301f          movlw   31
2150 0084 054d          andwf   available,w
2151 0085 3e2c          addlw   queue
2152 0086 0084          movwf   __fsr
2153 0087 0859          movf    enqueue__data,w
2154 0088 0080          movwf   __indf
2155                    ; line_number = 192
2156                    ;  available := available + 1
2157                    ;info   192, 137
2158 0089 0acd          incf    available,f
2159            
2160            
2161                    ; delay after procedure statements=non-uniform
2162                    ; Implied return
2163 008a 3400          retlw   0
2164            
2165            
2166            
2167            
2168                    ; line_number = 195
2169                    ;info   195, 139
2170                    ; procedure lcd_delay
2171   008b :   lcd_delay:
2172                    ; Last argument is sitting in W; save into argument variable
2173 008b 00da          movwf   lcd_delay__amount
2174                    ; delay=4294967295
2175                    ; line_number = 196
2176                    ; argument amount byte
2177 0000005a = lcd_delay__amount equ globals___0+58
2178                    ; line_number = 197
2179                    ;  returns_nothing
2180            
2181                    ; # This procedure is designed to delay for 100uS times {amount}.
2182            
2183                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
2184                    ; line_number = 201
2185                    ;  loop_exactly amount start
2186                    ;info   201, 140
2187 00000061 = lcd_delay__1 equ globals___0+65
2188 008c 085a          movf    lcd_delay__amount,w
2189 008d 00e1          movwf   lcd_delay__1
2190   008e :   lcd_delay__2:
2191                    ; line_number = 202
2192                    ; delay (100 * microsecond) - 3 start
2193                    ;info   202, 142
2194                    ; Delay expression evaluates to 397
2195                    ; line_number = 203
2196                    ; do_nothing
2197                    ;info   203, 142
2198            
2199            
2200                    ; Delay 397 cycles
2201                    ; Delay loop takes 99 * 4 = 396 cycles
2202 008e 3063          movlw   99
2203   008f :   lcd_delay__3:
2204 008f 3eff          addlw   255
2205 0090 1d03          btfss   __z___byte, __z___bit
2206 0091 288f          goto    lcd_delay__3
2207 0092 0000          nop     
2208                    ; line_number = 202
2209                    ; delay (100 * microsecond) - 3 done
2210                    ; line_number = 201
2211                    ;  loop_exactly amount wrap-up
2212 0093 0be1          decfsz  lcd_delay__1,f
2213 0094 288e          goto    lcd_delay__2
2214                    ; line_number = 201
2215                    ;  loop_exactly amount done
2216                    ; delay after procedure statements=non-uniform
2217                    ; Implied return
2218 0095 3400          retlw   0
2219            
2220            
2221            
2222            
2223                    ; line_number = 206
2224                    ;info   206, 150
2225                    ; procedure lcd_init
2226   0096 :   lcd_init:
2227                    ; arguments_none
2228                    ; line_number = 208
2229                    ;  returns_nothing
2230            
2231                    ; # Step 1: Wait for the LCD to initialize from Power on:
2232                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
2233                    ; line_number = 211
2234                    ;  loop_exactly 5 start
2235                    ;info   211, 150
2236 00000062 = lcd_init__1 equ globals___0+66
2237 0096 3005          movlw   5
2238 0097 00e2          movwf   lcd_init__1
2239   0098 :   lcd_init__2:
2240                    ; line_number = 212
2241                    ; call lcd_delay(100)
2242                    ;info   212, 152
2243 0098 3064          movlw   100
2244 0099 208b          call    lcd_delay
2245            
2246                    ; line_number = 211
2247                    ;  loop_exactly 5 wrap-up
2248 009a 0be2          decfsz  lcd_init__1,f
2249 009b 2898          goto    lcd_init__2
2250                    ; line_number = 211
2251                    ;  loop_exactly 5 done
2252                    ; # Step 2: Put the LCD in a "known" mode.
2253            
2254                    ; # FUNCTION SET - 8-bit, 2 lines, 5x8 font:
2255                    ; line_number = 217
2256                    ;  call lcd_command(standard_delay, 0x38)
2257                    ;info   217, 156
2258 009c 3005          movlw   5
2259 009d 00d4          movwf   lcd_command__delay
2260 009e 3038          movlw   56
2261 009f 205e          call    lcd_command
2262            
2263                    ; # AGAIN : FUNCTION SET - 8-bit, 2 lines, 5x8 font:
2264                    ; # Sending this command twice, *does* work.
2265                    ; line_number = 221
2266                    ;  call lcd_command(standard_delay, 0x38)
2267                    ;info   221, 160
2268 00a0 3005          movlw   5
2269 00a1 00d4          movwf   lcd_command__delay
2270 00a2 3038          movlw   56
2271 00a3 205e          call    lcd_command
2272            
2273                    ; # Turn off the display temporarily:
2274                    ; line_number = 224
2275                    ;  call lcd_command(standard_delay, 0x08)
2276                    ;info   224, 164
2277 00a4 3005          movlw   5
2278 00a5 00d4          movwf   lcd_command__delay
2279 00a6 3008          movlw   8
2280 00a7 205e          call    lcd_command
2281            
2282                    ; # Clear the display:
2283                    ; line_number = 227
2284                    ;  call lcd_command(big_delay, 0x01)
2285                    ;info   227, 168
2286 00a8 30c9          movlw   201
2287 00a9 00d4          movwf   lcd_command__delay
2288 00aa 3001          movlw   1
2289 00ab 205e          call    lcd_command
2290            
2291                    ; # Turn the display back on with Cursor:
2292                    ; line_number = 230
2293                    ;  call lcd_command(standard_delay, 0x0f)
2294                    ;info   230, 172
2295 00ac 3005          movlw   5
2296 00ad 00d4          movwf   lcd_command__delay
2297 00ae 300f          movlw   15
2298 00af 205e          call    lcd_command
2299            
2300                    ; # Set shift mode:
2301                    ; line_number = 233
2302                    ;  call lcd_command(standard_delay, 0x06)
2303                    ;info   233, 176
2304 00b0 3005          movlw   5
2305 00b1 00d4          movwf   lcd_command__delay
2306 00b2 3006          movlw   6
2307 00b3 205e          call    lcd_command
2308            
2309            
2310                    ; delay after procedure statements=non-uniform
2311                    ; Implied return
2312 00b4 3400          retlw   0
2313            
2314            
2315            
2316            
2317                    ; line_number = 236
2318                    ;info   236, 181
2319                    ; procedure lcd_data_send
2320   00b5 :   lcd_data_send:
2321                    ; Last argument is sitting in W; save into argument variable
2322 00b5 00dd          movwf   lcd_data_send__data
2323                    ; delay=4294967295
2324                    ; line_number = 237
2325                    ; argument rs_mode bit
2326 0000006f = lcd_data_send__rs_mode___byte equ globals___0+79
2327 00000005 = lcd_data_send__rs_mode___bit equ 5
2328                    ; line_number = 238
2329                    ; argument delay byte
2330 0000005c = lcd_data_send__delay equ globals___0+60
2331                    ; line_number = 239
2332                    ; argument data byte
2333 0000005d = lcd_data_send__data equ globals___0+61
2334                    ; line_number = 240
2335                    ;  returns_nothing
2336            
2337                    ; # This procedure will send the 8-bits of {data} to the LCD
2338                    ; # controller with RS set to {rs_mode} and RW set to 0 (write).
2339            
2340                    ; line_number = 245
2341                    ;  local temp byte
2342 0000005b = lcd_data_send__temp equ globals___0+59
2343            
2344                    ; # Get {db4}, {db5}, {db6}, and {db7} set up, clear {rw} and {rs}:
2345                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
2346                    ; line_number = 248
2347                    ;  _portb := data & 0xf0
2348                    ;info   248, 182
2349 00b6 30f0          movlw   240
2350 00b7 055d          andwf   lcd_data_send__data,w
2351 00b8 0086          movwf   _portb
2352            
2353                    ; # Set up the control lines:
2354                    ; line_number = 251
2355                    ;  if rs_mode start
2356                    ;info   251, 185
2357                    ; =>bit_code_emit@symbol(): sym=lcd_data_send__rs_mode
2358                    ; 1TEST: Single test with code in skip slot
2359 00b9 1aef          btfsc   lcd_data_send__rs_mode___byte, lcd_data_send__rs_mode___bit
2360                    ; line_number = 252
2361                    ; rs := _true
2362                    ;info   252, 186
2363 00ba 1406          bsf     rs___byte, rs___bit
2364            
2365                    ; Recombine size1 = 0 || size2 = 0
2366                    ; line_number = 251
2367                    ;  if rs_mode done
2368                    ; # Get {db0}, {db1}, {db2}, and {db3} set up.  Be careful to
2369                    ; # not accidently toggle {e}.
2370            
2371                    ; line_number = 257
2372                    ;  temp := data & 0xf
2373                    ;info   257, 187
2374 00bb 300f          movlw   15
2375 00bc 055d          andwf   lcd_data_send__data,w
2376 00bd 00db          movwf   lcd_data_send__temp
2377                    ; line_number = 258
2378                    ;  _porta := temp
2379                    ;info   258, 190
2380 00be 085b          movf    lcd_data_send__temp,w
2381 00bf 0085          movwf   _porta
2382            
2383                    ; # Wait for any previous command to clear:
2384                    ; line_number = 261
2385                    ;  while !_t0if start
2386   00c0 :   lcd_data_send__1:
2387                    ;info   261, 192
2388                    ; =>bit_code_emit@symbol(): sym=_t0if
2389                    ; 1TEST: Single test with code in skip slot
2390 00c0 1d0b          btfss   _t0if___byte, _t0if___bit
2391                    ; line_number = 262
2392                    ; do_nothing
2393                    ;info   262, 193
2394            
2395 00c1 28c0          goto    lcd_data_send__1
2396                    ; Recombine size1 = 0 || size2 = 0
2397                    ; line_number = 261
2398                    ;  while !_t0if done
2399                    ; # Toggle {e} to clock the data into the LCD controller.
2400                    ; line_number = 265
2401                    ;  e := _true
2402                    ;info   265, 194
2403 00c2 1605          bsf     e___byte, e___bit
2404                    ; line_number = 266
2405                    ;  e := _false
2406                    ;info   266, 195
2407 00c3 1205          bcf     e___byte, e___bit
2408            
2409                    ; # Set up a delay after this command (just use 1's complement):
2410                    ; line_number = 269
2411                    ;  _tmr0 := 255 ^ delay
2412                    ;info   269, 196
2413 00c4 095c          comf    lcd_data_send__delay,w
2414 00c5 0081          movwf   _tmr0
2415                    ; line_number = 270
2416                    ;  _t0if := _false
2417                    ;info   270, 198
2418 00c6 110b          bcf     _t0if___byte, _t0if___bit
2419            
2420            
2421                    ; delay after procedure statements=non-uniform
2422                    ; Implied return
2423 00c7 3400          retlw   0
2424            
2425            
2426            
2427            
2428                    ; line_number = 273
2429                    ;info   273, 200
2430                    ; procedure wait
2431   00c8 :   wait:
2432                    ; arguments_none
2433                    ; line_number = 275
2434                    ;  returns_nothing
2435            
2436                    ; # This procedure will do any background processing.
2437            
2438                    ; line_number = 279
2439                    ;  local command byte
2440 0000005e = wait__command equ globals___0+62
2441            
2442                    ; # Only do something if there is no pending delay:
2443                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
2444                    ; line_number = 282
2445                    ;  if _t0if start
2446                    ;info   282, 200
2447                    ; =>bit_code_emit@symbol(): sym=_t0if
2448                    ; No 1TEST: true.size=110 false.size=0
2449                    ; No 2TEST: true.size=110 false.size=0
2450                    ; 1GOTO: Single test with GOTO
2451 00c8 1d0b          btfss   _t0if___byte, _t0if___bit
2452 00c9 2939          goto    wait__27
2453                    ; # Any pending delay has expired:
2454                    ; line_number = 284
2455                    ;  if cursor_pending start
2456                    ;info   284, 202
2457                    ; =>bit_code_emit@symbol(): sym=cursor_pending
2458                    ; No 1TEST: true.size=3 false.size=104
2459                    ; No 2TEST: true.size=3 false.size=104
2460                    ; 2GOTO: Single test with two GOTO's
2461 00ca 1e6f          btfss   cursor_pending___byte, cursor_pending___bit
2462 00cb 28d0          goto    wait__25
2463                    ; line_number = 285
2464                    ; call lcd_cursor_set(0)
2465                    ;info   285, 204
2466 00cc 3000          movlw   0
2467 00cd 2073          call    lcd_cursor_set
2468                    ; line_number = 286
2469                    ;  cursor_pending := _false
2470                    ;info   286, 206
2471 00ce 126f          bcf     cursor_pending___byte, cursor_pending___bit
2472 00cf 2939          goto    wait__26
2473                    ; 2GOTO: Starting code 2
2474   00d0 :   wait__25:
2475                    ; line_number = 287
2476                    ;info   287, 208
2477                    ; Left minus Right
2478 00d0 084c          movf    processed,w
2479 00d1 024d          subwf   available,w
2480                    ; =>bit_code_emit@symbol(): sym=__z
2481                    ; No 1TEST: true.size=0 false.size=100
2482                    ; No 2TEST: true.size=0 false.size=100
2483                    ; 1GOTO: Single test with GOTO
2484 00d2 1903          btfsc   __z___byte, __z___bit
2485 00d3 2939          goto    wait__24
2486                    ; line_number = 288
2487                    ; command := queue[processed & queue_mask]
2488                    ;info   288, 212
2489 00d4 301f          movlw   31
2490 00d5 054c          andwf   processed,w
2491 00d6 3e2c          addlw   queue
2492 00d7 0084          movwf   __fsr
2493 00d8 0800          movf    __indf,w
2494 00d9 00de          movwf   wait__command
2495                    ; line_number = 289
2496                    ;  processed := processed + 1
2497                    ;info   289, 218
2498 00da 0acc          incf    processed,f
2499                    ; line_number = 290
2500                    ;  switch command >> 6 start
2501                    ;info   290, 219
2502                    ; switch_before:(data:00=uu=>00 code:XX=cc=>XX) size=7
2503 00db 3000          movlw   wait__21>>8
2504 00dc 008a          movwf   __pclath
2505 00000063 = wait__22 equ globals___0+67
2506 00dd 0e5e          swapf   wait__command,w
2507 00de 00e3          movwf   wait__22
2508 00df 0ce3          rrf     wait__22,f
2509 00e0 0c63          rrf     wait__22,w
2510 00e1 3903          andlw   3
2511                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
2512 00e2 3ee4          addlw   wait__21
2513 00e3 0082          movwf   __pcl
2514                    ; page_group 4
2515   00e4 :   wait__21:
2516 00e4 28e8          goto    wait__18
2517 00e5 2934          goto    wait__19
2518 00e6 2937          goto    wait__20
2519 00e7 2937          goto    wait__20
2520                    ; line_number = 291
2521                    ; case 0
2522   00e8 :   wait__18:
2523                    ; # 00xx xxxx:
2524                    ; line_number = 293
2525                    ;  switch (command >> 3) & 7 start
2526                    ;info   293, 232
2527                    ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
2528 00e8 3000          movlw   wait__15>>8
2529 00e9 008a          movwf   __pclath
2530 00000063 = wait__16 equ globals___0+67
2531 00ea 0c5e          rrf     wait__command,w
2532 00eb 00e3          movwf   wait__16
2533 00ec 0ce3          rrf     wait__16,f
2534 00ed 0c63          rrf     wait__16,w
2535 00ee 3907          andlw   7
2536                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
2537 00ef 3ef1          addlw   wait__15
2538 00f0 0082          movwf   __pcl
2539                    ; page_group 8
2540   00f1 :   wait__15:
2541 00f1 28f9          goto    wait__11
2542 00f2 290c          goto    wait__12
2543 00f3 2929          goto    wait__13
2544 00f4 2929          goto    wait__13
2545 00f5 2931          goto    wait__14
2546 00f6 2931          goto    wait__14
2547 00f7 2931          goto    wait__14
2548 00f8 2931          goto    wait__14
2549                    ; line_number = 294
2550                    ; case 0
2551   00f9 :   wait__11:
2552                    ; # 0000 0xxx:
2553                    ; line_number = 296
2554                    ;  switch command & 7 start
2555                    ;info   296, 249
2556                    ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
2557 00f9 3001          movlw   wait__3>>8
2558 00fa 008a          movwf   __pclath
2559 00fb 3007          movlw   7
2560 00fc 055e          andwf   wait__command,w
2561                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
2562 00fd 3e00          addlw   wait__3
2563 00fe 0082          movwf   __pcl
2564                    ; page_group 6
2565                    ; Add 1 NOP's until start of new page 
2566 00ff 0000          nop     
2567   0100 :   wait__3:
2568 0100 290b          goto    wait__4
2569 0101 290b          goto    wait__4
2570 0102 290b          goto    wait__4
2571 0103 290b          goto    wait__4
2572 0104 2906          goto    wait__1
2573 0105 2909          goto    wait__2
2574                    ; line_number = 297
2575                    ; case 4
2576   0106 :   wait__1:
2577                    ; line_number = 298
2578                    ; call lcd_cursor_set(0)
2579                    ;info   298, 262
2580 0106 3000          movlw   0
2581 0107 2073          call    lcd_cursor_set
2582 0108 290b          goto    wait__4
2583                    ; line_number = 299
2584                    ; case 5
2585   0109 :   wait__2:
2586                    ; line_number = 300
2587                    ; call lcd_cursor_set(0x10)
2588                    ;info   300, 265
2589 0109 3010          movlw   16
2590 010a 2073          call    lcd_cursor_set
2591   010b :   wait__4:
2592                    ; line_number = 296
2593                    ;  switch command & 7 done
2594                    ; #FIXME: Compiler bug with left shift!!!
2595                    ; #  case 4, 5, 6, 7
2596                    ; #	# 0000 01rr (Row Set):
2597                    ; #	#call lcd_cursor_set((command & 3) << 4)
2598                    ; #   call rb2bus_byte_put(cursor)
2599 010b 2933          goto    wait__17
2600                    ; line_number = 306
2601                    ; case 1
2602   010c :   wait__12:
2603                    ; # 0000 1xxx:
2604                    ; line_number = 308
2605                    ;  switch command & 7 start
2606                    ;info   308, 268
2607                    ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
2608                    ; line_number = 309
2609                    ; case_maximum 7
2610 010c 3001          movlw   wait__8>>8
2611 010d 008a          movwf   __pclath
2612 010e 3007          movlw   7
2613 010f 055e          andwf   wait__command,w
2614                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
2615 0110 3e12          addlw   wait__8
2616 0111 0082          movwf   __pcl
2617                    ; page_group 8
2618   0112 :   wait__8:
2619 0112 2928          goto    wait__9
2620 0113 2928          goto    wait__9
2621 0114 291a          goto    wait__5
2622 0115 2928          goto    wait__9
2623 0116 291f          goto    wait__6
2624 0117 2925          goto    wait__7
2625 0118 2928          goto    wait__9
2626 0119 2928          goto    wait__9
2627                    ; line_number = 310
2628                    ; case 2
2629   011a :   wait__5:
2630                    ; # 0000 1010 (Line_Feed):
2631                    ; line_number = 312
2632                    ;  call lcd_cursor_set((cursor | 0xf) + 1)
2633                    ;info   312, 282
2634 011a 300f          movlw   15
2635 011b 044e          iorwf   cursor,w
2636 011c 3e01          addlw   1
2637 011d 2073          call    lcd_cursor_set
2638 011e 2928          goto    wait__9
2639                    ; line_number = 313
2640                    ; case 4
2641   011f :   wait__6:
2642                    ; # 0000 1100 (Form_Feed):
2643                    ; line_number = 315
2644                    ;  call lcd_command(big_delay, 0x1)
2645                    ;info   315, 287
2646 011f 30c9          movlw   201
2647 0120 00d4          movwf   lcd_command__delay
2648 0121 3001          movlw   1
2649 0122 205e          call    lcd_command
2650                    ; line_number = 316
2651                    ;  cursor_pending := _true
2652                    ;info   316, 291
2653 0123 166f          bsf     cursor_pending___byte, cursor_pending___bit
2654 0124 2928          goto    wait__9
2655                    ; line_number = 317
2656                    ; case 5
2657   0125 :   wait__7:
2658                    ; # 0000 1101 (Carriage Return):
2659                    ; line_number = 319
2660                    ;  call lcd_cursor_set(cursor & 0xf0)
2661                    ;info   319, 293
2662 0125 30f0          movlw   240
2663 0126 054e          andwf   cursor,w
2664 0127 2073          call    lcd_cursor_set
2665   0128 :   wait__9:
2666                    ; line_number = 308
2667                    ;  switch command & 7 done
2668 0128 2933          goto    wait__17
2669                    ; line_number = 320
2670                    ; case 2, 3
2671   0129 :   wait__13:
2672                    ; # 0001 xxxx (Column Set):
2673                    ; line_number = 322
2674                    ;  call lcd_cursor_set(cursor & 0xf0 | command & 0xf)
2675                    ;info   322, 297
2676 00000063 = wait__10 equ globals___0+67
2677 0129 30f0          movlw   240
2678 012a 054e          andwf   cursor,w
2679 012b 00e3          movwf   wait__10
2680 012c 300f          movlw   15
2681 012d 055e          andwf   wait__command,w
2682 012e 0463          iorwf   wait__10,w
2683 012f 2073          call    lcd_cursor_set
2684 0130 2933          goto    wait__17
2685                    ; line_number = 323
2686                    ; case 4, 5, 6, 7
2687   0131 :   wait__14:
2688                    ; # 001x xxxx:
2689                    ; line_number = 325
2690                    ;  call lcd_character_put(command)
2691                    ;info   325, 305
2692 0131 085e          movf    wait__command,w
2693 0132 2065          call    lcd_character_put
2694   0133 :   wait__17:
2695                    ; line_number = 293
2696                    ;  switch (command >> 3) & 7 done
2697 0133 2939          goto    wait__23
2698                    ; line_number = 326
2699                    ; case 1
2700   0134 :   wait__19:
2701                    ; # 01xx xxxx:
2702                    ; line_number = 328
2703                    ;  call lcd_character_put(command)
2704                    ;info   328, 308
2705 0134 085e          movf    wait__command,w
2706 0135 2065          call    lcd_character_put
2707 0136 2939          goto    wait__23
2708                    ; line_number = 329
2709                    ; case 2, 3
2710   0137 :   wait__20:
2711                    ; # 1xxx xxxx:
2712                    ; line_number = 331
2713                    ;  call rb2bus_byte_put(cursor)
2714                    ;info   331, 311
2715 0137 084e          movf    cursor,w
2716 0138 2196          call    rb2bus_byte_put
2717            
2718            
2719   0139 :   wait__23:
2720                    ; line_number = 290
2721                    ;  switch command >> 6 done
2722   0139 :   wait__24:
2723                    ; Recombine size1 = 0 || size2 = 0
2724   0139 :   wait__26:
2725                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
2726                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
2727                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
2728                    ; line_number = 284
2729                    ;  if cursor_pending done
2730                    ; Recombine size1 = 0 || size2 = 0
2731   0139 :   wait__27:
2732                    ; line_number = 282
2733                    ;  if _t0if done
2734                    ; delay after procedure statements=non-uniform
2735                    ; Implied return
2736 0139 3400          retlw   0
2737            
2738            
2739            
2740            
2741                    ; line_number = 334
2742                    ; string id = "\16,0,32,2,3,7\LCD32-B\7\Gramson" start
2743                    ; id = '\16,0\ \2,3,7\LCD32-B\7\Gramson'
2744   013a :   id:
2745                    ; Temporarily save index into FSR
2746 013a 0084          movwf   __fsr
2747                    ; Initialize PCLATH to point to this code page
2748 013b 3001          movlw   id___base>>8
2749 013c 008a          movwf   __pclath
2750                    ; Restore index from FSR
2751 013d 0804          movf    __fsr,w
2752 013e 3e40          addlw   id___base
2753                    ; Index to the correct return value
2754 013f 0082          movwf   __pcl
2755                    ; page_group 21
2756   0140 :   id___base:
2757 0140 3410          retlw   16
2758 0141 3400          retlw   0
2759 0142 3420          retlw   32
2760 0143 3402          retlw   2
2761 0144 3403          retlw   3
2762 0145 3407          retlw   7
2763 0146 344c          retlw   76
2764 0147 3443          retlw   67
2765 0148 3444          retlw   68
2766 0149 3433          retlw   51
2767 014a 3432          retlw   50
2768 014b 342d          retlw   45
2769 014c 3442          retlw   66
2770 014d 3407          retlw   7
2771 014e 3447          retlw   71
2772 014f 3472          retlw   114
2773 0150 3461          retlw   97
2774 0151 346d          retlw   109
2775 0152 3473          retlw   115
2776 0153 346f          retlw   111
2777 0154 346e          retlw   110
2778                    ; line_number = 334
2779                    ; string id = "\16,0,32,2,3,7\LCD32-B\7\Gramson" start
2780            
2781            
2782                    ; Appending 8 delayed procedures to code bank 0
2783                    ; buffer = 'rb2bus'
2784                    ; line_number = 57
2785                    ;info   57, 341
2786                    ; procedure rb2bus_select_wait
2787   0155 :   rb2bus_select_wait:
2788                    ; arguments_none
2789                    ; line_number = 59
2790                    ;  returns_nothing
2791            
2792                    ; # This procedure will in an infinite loop until the select
2793                    ; # address matches {rb2bus_address}.  {rb2bus_address} is
2794                    ; # typically set in the {rb2bus_initialize} procedure.
2795                    ; #
2796                    ; # This module will repeatably call the {wait} procedure until
2797                    ; # it is properly selected.
2798            
2799                    ; line_number = 68
2800                    ;  local value byte
2801 00000022 = rb2bus_select_wait__value equ globals___0+2
2802                    ; line_number = 69
2803                    ;  local address_bit bit
2804 0000006f = rb2bus_select_wait__address_bit___byte equ globals___0+79
2805 00000002 = rb2bus_select_wait__address_bit___bit equ 2
2806            
2807                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
2808                    ; line_number = 71
2809                    ;  rb2bus_error := _false
2810                    ;info   71, 341
2811 0155 10ef          bcf     rb2bus_error___byte, rb2bus_error___bit
2812                    ; line_number = 72
2813                    ;  while !rb2bus_selected start
2814   0156 :   rb2bus_select_wait__1:
2815                    ;info   72, 342
2816                    ; =>bit_code_emit@symbol(): sym=rb2bus_selected
2817                    ; No 1TEST: true.size=0 false.size=25
2818                    ; No 2TEST: true.size=0 false.size=25
2819                    ; 1GOTO: Single test with GOTO
2820 0156 186f          btfsc   rb2bus_selected___byte, rb2bus_selected___bit
2821 0157 2971          goto    rb2bus_select_wait__6
2822                    ; line_number = 73
2823                    ; _adden := _true
2824                    ;info   73, 344
2825 0158 1598          bsf     _adden___byte, _adden___bit
2826                    ; # Wait for a byte to arrive.
2827                    ; line_number = 75
2828                    ;  while !_rcif start
2829   0159 :   rb2bus_select_wait__2:
2830                    ;info   75, 345
2831                    ; =>bit_code_emit@symbol(): sym=_rcif
2832                    ; No 1TEST: true.size=0 false.size=2
2833                    ; No 2TEST: true.size=0 false.size=2
2834                    ; 1GOTO: Single test with GOTO
2835 0159 1a8c          btfsc   _rcif___byte, _rcif___bit
2836 015a 295d          goto    rb2bus_select_wait__3
2837                    ; line_number = 76
2838                    ; call wait()
2839                    ;info   76, 347
2840 015b 20c8          call    wait
2841            
2842 015c 2959          goto    rb2bus_select_wait__2
2843   015d :   rb2bus_select_wait__3:
2844                    ; Recombine size1 = 0 || size2 = 0
2845                    ; line_number = 75
2846                    ;  while !_rcif done
2847                    ; # Capture the received value:
2848                    ; line_number = 79
2849                    ;  address_bit := _false
2850                    ;info   79, 349
2851 015d 116f          bcf     rb2bus_select_wait__address_bit___byte, rb2bus_select_wait__address_bit___bit
2852                    ; line_number = 80
2853                    ;  if _rx9d start
2854                    ;info   80, 350
2855                    ; =>bit_code_emit@symbol(): sym=_rx9d
2856                    ; 1TEST: Single test with code in skip slot
2857 015e 1818          btfsc   _rx9d___byte, _rx9d___bit
2858                    ; line_number = 81
2859                    ; address_bit := _true
2860                    ;info   81, 351
2861 015f 156f          bsf     rb2bus_select_wait__address_bit___byte, rb2bus_select_wait__address_bit___bit
2862                    ; Recombine size1 = 0 || size2 = 0
2863                    ; line_number = 80
2864                    ;  if _rx9d done
2865                    ; line_number = 82
2866                    ; value := _rcreg
2867                    ;info   82, 352
2868 0160 081a          movf    _rcreg,w
2869 0161 00a2          movwf   rb2bus_select_wait__value
2870            
2871                    ; # Clear any UART errors by toggling {_cren}:
2872                    ; line_number = 85
2873                    ;  if _oerr start
2874                    ;info   85, 354
2875                    ; =>bit_code_emit@symbol(): sym=_oerr
2876                    ; 1TEST: Single test with code in skip slot
2877 0162 1898          btfsc   _oerr___byte, _oerr___bit
2878                    ; line_number = 86
2879                    ; _cren := _false
2880                    ;info   86, 355
2881 0163 1218          bcf     _cren___byte, _cren___bit
2882                    ; Recombine size1 = 0 || size2 = 0
2883                    ; line_number = 85
2884                    ;  if _oerr done
2885                    ; line_number = 87
2886                    ; if _ferr start
2887                    ;info   87, 356
2888                    ; =>bit_code_emit@symbol(): sym=_ferr
2889                    ; 1TEST: Single test with code in skip slot
2890 0164 1918          btfsc   _ferr___byte, _ferr___bit
2891                    ; line_number = 88
2892                    ; _cren := _false
2893                    ;info   88, 357
2894 0165 1218          bcf     _cren___byte, _cren___bit
2895                    ; Recombine size1 = 0 || size2 = 0
2896                    ; line_number = 87
2897                    ; if _ferr done
2898                    ; line_number = 89
2899                    ; _cren := _true
2900                    ;info   89, 358
2901 0166 1618          bsf     _cren___byte, _cren___bit
2902            
2903                    ; line_number = 91
2904                    ;  if address_bit start
2905                    ;info   91, 359
2906                    ; =>bit_code_emit@symbol(): sym=rb2bus_select_wait__address_bit
2907                    ; No 1TEST: true.size=7 false.size=0
2908                    ; No 2TEST: true.size=7 false.size=0
2909                    ; 1GOTO: Single test with GOTO
2910 0167 1d6f          btfss   rb2bus_select_wait__address_bit___byte, rb2bus_select_wait__address_bit___bit
2911 0168 2970          goto    rb2bus_select_wait__5
2912                    ; line_number = 92
2913                    ; if value = rb2bus_address start
2914                    ;info   92, 361
2915                    ; Left minus Right
2916 0169 0820          movf    rb2bus_address,w
2917 016a 0222          subwf   rb2bus_select_wait__value,w
2918                    ; =>bit_code_emit@symbol(): sym=__z
2919                    ; No 1TEST: true.size=3 false.size=0
2920                    ; No 2TEST: true.size=3 false.size=0
2921                    ; 1GOTO: Single test with GOTO
2922 016b 1d03          btfss   __z___byte, __z___bit
2923 016c 2970          goto    rb2bus_select_wait__4
2924                    ; line_number = 93
2925                    ; rb2bus_selected := _true
2926                    ;info   93, 365
2927 016d 146f          bsf     rb2bus_selected___byte, rb2bus_selected___bit
2928                    ; line_number = 94
2929                    ;  call rb2bus_byte_put(rb2_ok)
2930                    ;info   94, 366
2931 016e 30a5          movlw   165
2932 016f 2196          call    rb2bus_byte_put
2933            
2934            
2935                    ; Recombine size1 = 0 || size2 = 0
2936   0170 :   rb2bus_select_wait__4:
2937                    ; line_number = 92
2938                    ; if value = rb2bus_address done
2939                    ; Recombine size1 = 0 || size2 = 0
2940   0170 :   rb2bus_select_wait__5:
2941                    ; line_number = 91
2942                    ;  if address_bit done
2943 0170 2956          goto    rb2bus_select_wait__1
2944   0171 :   rb2bus_select_wait__6:
2945                    ; Recombine size1 = 0 || size2 = 0
2946                    ; line_number = 72
2947                    ;  while !rb2bus_selected done
2948                    ; delay after procedure statements=non-uniform
2949                    ; Implied return
2950 0171 3400          retlw   0
2951            
2952            
2953            
2954            
2955                    ; line_number = 97
2956                    ;info   97, 370
2957                    ; procedure rb2bus_deselect
2958   0172 :   rb2bus_deselect:
2959                    ; arguments_none
2960                    ; line_number = 99
2961                    ;  returns_nothing
2962            
2963                    ; # This procedure forces this module into the deselected state until
2964                    ; # it is reselected by some master module on the bus.
2965            
2966                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
2967                    ; line_number = 104
2968                    ;  rb2bus_selected := _false
2969                    ;info   104, 370
2970 0172 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
2971            
2972            
2973                    ; delay after procedure statements=non-uniform
2974                    ; Implied return
2975 0173 3400          retlw   0
2976            
2977            
2978            
2979            
2980                    ; line_number = 107
2981                    ;info   107, 372
2982                    ; procedure rb2bus_byte_get
2983   0174 :   rb2bus_byte_get:
2984                    ; arguments_none
2985                    ; line_number = 109
2986                    ;  returns byte
2987            
2988                    ; # This procedure will return the next byte received from the bus.
2989                    ; # The address (9th) bit is stored in the global {is_address}.
2990                    ; #
2991                    ; # If {rb2bus_error} is set, 0 is returned.  Otherwise, the {wait}
2992                    ; # procedure is repeatably called until a command byte is successfully
2993                    ; # received.  If an module select byte comes in, we enter a bus
2994                    ; # error condition by setting {rb2bus_error} and returning 0.
2995            
2996                    ; line_number = 119
2997                    ;  local value byte
2998 00000023 = rb2bus_byte_get__value equ globals___0+3
2999                    ; line_number = 120
3000                    ;  local address_bit bit
3001 0000006f = rb2bus_byte_get__address_bit___byte equ globals___0+79
3002 00000003 = rb2bus_byte_get__address_bit___bit equ 3
3003            
3004                    ; # Return 0 in a bus flush condition to get us back to {rb2bus_select_wait}:
3005                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3006                    ; line_number = 123
3007                    ;  if rb2bus_error start
3008                    ;info   123, 372
3009                    ; =>bit_code_emit@symbol(): sym=rb2bus_error
3010                    ; 1TEST: Single test with code in skip slot
3011 0174 18ef          btfsc   rb2bus_error___byte, rb2bus_error___bit
3012                    ; line_number = 124
3013                    ; return 0 start
3014                    ; line_number = 124
3015                    ;info   124, 373
3016 0175 3400          retlw   0
3017                    ; line_number = 124
3018                    ; return 0 done
3019            
3020                    ; Recombine size1 = 0 || size2 = 0
3021                    ; line_number = 123
3022                    ;  if rb2bus_error done
3023                    ; # Wait for a byte to arrive.
3024                    ; line_number = 127
3025                    ;  _adden := _false
3026                    ;info   127, 374
3027 0176 1198          bcf     _adden___byte, _adden___bit
3028                    ; line_number = 128
3029                    ;  while !_rcif start
3030   0177 :   rb2bus_byte_get__1:
3031                    ;info   128, 375
3032                    ; =>bit_code_emit@symbol(): sym=_rcif
3033                    ; No 1TEST: true.size=0 false.size=2
3034                    ; No 2TEST: true.size=0 false.size=2
3035                    ; 1GOTO: Single test with GOTO
3036 0177 1a8c          btfsc   _rcif___byte, _rcif___bit
3037 0178 297b          goto    rb2bus_byte_get__2
3038                    ; line_number = 129
3039                    ; call wait()
3040                    ;info   129, 377
3041 0179 20c8          call    wait
3042            
3043 017a 2977          goto    rb2bus_byte_get__1
3044   017b :   rb2bus_byte_get__2:
3045                    ; Recombine size1 = 0 || size2 = 0
3046                    ; line_number = 128
3047                    ;  while !_rcif done
3048                    ; # Record the 9th bit in {address_bit}:
3049                    ; line_number = 132
3050                    ;  address_bit := _false
3051                    ;info   132, 379
3052 017b 11ef          bcf     rb2bus_byte_get__address_bit___byte, rb2bus_byte_get__address_bit___bit
3053                    ; line_number = 133
3054                    ;  if _rx9d start
3055                    ;info   133, 380
3056                    ; =>bit_code_emit@symbol(): sym=_rx9d
3057                    ; 1TEST: Single test with code in skip slot
3058 017c 1818          btfsc   _rx9d___byte, _rx9d___bit
3059                    ; line_number = 134
3060                    ; address_bit := _true
3061                    ;info   134, 381
3062 017d 15ef          bsf     rb2bus_byte_get__address_bit___byte, rb2bus_byte_get__address_bit___bit
3063                    ; Recombine size1 = 0 || size2 = 0
3064                    ; line_number = 133
3065                    ;  if _rx9d done
3066                    ; line_number = 135
3067                    ; value := _rcreg
3068                    ;info   135, 382
3069 017e 081a          movf    _rcreg,w
3070 017f 00a3          movwf   rb2bus_byte_get__value
3071            
3072                    ; # Clear any errors by toggling _{cren}:
3073                    ; # FIXME: All of this should be done *before* reading {_rcreg}!!!
3074                    ; line_number = 139
3075                    ;  if _oerr start
3076                    ;info   139, 384
3077                    ; =>bit_code_emit@symbol(): sym=_oerr
3078                    ; 1TEST: Single test with code in skip slot
3079 0180 1898          btfsc   _oerr___byte, _oerr___bit
3080                    ; line_number = 140
3081                    ; _cren := _false
3082                    ;info   140, 385
3083 0181 1218          bcf     _cren___byte, _cren___bit
3084                    ; Recombine size1 = 0 || size2 = 0
3085                    ; line_number = 139
3086                    ;  if _oerr done
3087                    ; line_number = 141
3088                    ; if _ferr start
3089                    ;info   141, 386
3090                    ; =>bit_code_emit@symbol(): sym=_ferr
3091                    ; 1TEST: Single test with code in skip slot
3092 0182 1918          btfsc   _ferr___byte, _ferr___bit
3093                    ; line_number = 142
3094                    ; _cren := _false
3095                    ;info   142, 387
3096 0183 1218          bcf     _cren___byte, _cren___bit
3097                    ; Recombine size1 = 0 || size2 = 0
3098                    ; line_number = 141
3099                    ; if _ferr done
3100                    ; line_number = 143
3101                    ; _cren := _true
3102                    ;info   143, 388
3103 0184 1618          bsf     _cren___byte, _cren___bit
3104            
3105                    ; line_number = 145
3106                    ;  if address_bit start
3107                    ;info   145, 389
3108                    ; =>bit_code_emit@symbol(): sym=rb2bus_byte_get__address_bit
3109                    ; No 1TEST: true.size=13 false.size=0
3110                    ; No 2TEST: true.size=13 false.size=0
3111                    ; 1GOTO: Single test with GOTO
3112 0185 1def          btfss   rb2bus_byte_get__address_bit___byte, rb2bus_byte_get__address_bit___bit
3113 0186 2994          goto    rb2bus_byte_get__5
3114                    ; # We have an unexpected address select coming in:
3115                    ; line_number = 147
3116                    ;  if value = rb2bus_address start
3117                    ;info   147, 391
3118                    ; Left minus Right
3119 0187 0820          movf    rb2bus_address,w
3120 0188 0223          subwf   rb2bus_byte_get__value,w
3121                    ; =>bit_code_emit@symbol(): sym=__z
3122                    ; No 1TEST: true.size=4 false.size=2
3123                    ; No 2TEST: true.size=4 false.size=2
3124                    ; 2GOTO: Single test with two GOTO's
3125 0189 1d03          btfss   __z___byte, __z___bit
3126 018a 2990          goto    rb2bus_byte_get__3
3127                    ; # We are being selected again:
3128                    ; line_number = 149
3129                    ;  rb2bus_selected := _true
3130                    ;info   149, 395
3131 018b 146f          bsf     rb2bus_selected___byte, rb2bus_selected___bit
3132                    ; line_number = 150
3133                    ;  _adden := _false
3134                    ;info   150, 396
3135 018c 1198          bcf     _adden___byte, _adden___bit
3136            
3137                    ; line_number = 152
3138                    ;  call rb2bus_byte_put(rb2_ok)
3139                    ;info   152, 397
3140 018d 30a5          movlw   165
3141 018e 2196          call    rb2bus_byte_put
3142 018f 2992          goto    rb2bus_byte_get__4
3143                    ; 2GOTO: Starting code 2
3144   0190 :   rb2bus_byte_get__3:
3145                    ; # Somebody else is being selected; we deselect:
3146                    ; line_number = 155
3147                    ;  rb2bus_selected := _false
3148                    ;info   155, 400
3149 0190 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
3150                    ; line_number = 156
3151                    ;  _adden := _true
3152                    ;info   156, 401
3153 0191 1598          bsf     _adden___byte, _adden___bit
3154            
3155   0192 :   rb2bus_byte_get__4:
3156                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3157                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3158                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3159                    ; line_number = 147
3160                    ;  if value = rb2bus_address done
3161                    ; # We want to get back to the beginning of decode:
3162                    ; line_number = 159
3163                    ;  rb2bus_error := _true
3164                    ;info   159, 402
3165 0192 14ef          bsf     rb2bus_error___byte, rb2bus_error___bit
3166                    ; line_number = 160
3167                    ;  value := 0
3168                    ;info   160, 403
3169 0193 01a3          clrf    rb2bus_byte_get__value
3170            
3171                    ; Recombine size1 = 0 || size2 = 0
3172   0194 :   rb2bus_byte_get__5:
3173                    ; line_number = 145
3174                    ;  if address_bit done
3175                    ; # Regular data byte:
3176                    ; line_number = 163
3177                    ;  return value start
3178                    ; line_number = 163
3179                    ;info   163, 404
3180 0194 0823          movf    rb2bus_byte_get__value,w
3181 0195 0008          return  
3182                    ; line_number = 163
3183                    ;  return value done
3184            
3185            
3186                    ; delay after procedure statements=non-uniform
3187            
3188            
3189            
3190            
3191                    ; line_number = 166
3192                    ;info   166, 406
3193                    ; procedure rb2bus_byte_put
3194   0196 :   rb2bus_byte_put:
3195                    ; Last argument is sitting in W; save into argument variable
3196 0196 00a4          movwf   rb2bus_byte_put__value
3197                    ; delay=4294967295
3198                    ; line_number = 167
3199                    ; argument value byte
3200 00000024 = rb2bus_byte_put__value equ globals___0+4
3201                    ; line_number = 168
3202                    ;  returns_nothing
3203            
3204                    ; # This procedure will send {value} to the bus.  It automatically
3205                    ; # consumes the echo that is on the bus.  If {rb2bus_error} is
3206                    ; # set, this procedure does nothing.
3207            
3208                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3209                    ; line_number = 174
3210                    ;  if !rb2bus_error start
3211                    ;info   174, 407
3212                    ; =>bit_code_emit@symbol(): sym=rb2bus_error
3213                    ; No 1TEST: true.size=0 false.size=18
3214                    ; No 2TEST: true.size=0 false.size=18
3215                    ; 1GOTO: Single test with GOTO
3216 0197 18ef          btfsc   rb2bus_error___byte, rb2bus_error___bit
3217 0198 29ab          goto    rb2bus_byte_put__4
3218                    ; # Wait until {_txreg} is ready for a value:
3219                    ; line_number = 176
3220                    ;  while !_txif start
3221   0199 :   rb2bus_byte_put__1:
3222                    ;info   176, 409
3223                    ; =>bit_code_emit@symbol(): sym=_txif
3224                    ; No 1TEST: true.size=0 false.size=2
3225                    ; No 2TEST: true.size=0 false.size=2
3226                    ; 1GOTO: Single test with GOTO
3227 0199 1a0c          btfsc   _txif___byte, _txif___bit
3228 019a 299d          goto    rb2bus_byte_put__2
3229                    ; line_number = 177
3230                    ; call wait()
3231                    ;info   177, 411
3232 019b 20c8          call    wait
3233            
3234 019c 2999          goto    rb2bus_byte_put__1
3235   019d :   rb2bus_byte_put__2:
3236                    ; Recombine size1 = 0 || size2 = 0
3237                    ; line_number = 176
3238                    ;  while !_txif done
3239                    ; # Ship {value} out to the bus with 9th bit turned off:
3240                    ; line_number = 180
3241                    ;  _adden := _false
3242                    ;info   180, 413
3243 019d 1198          bcf     _adden___byte, _adden___bit
3244                    ; line_number = 181
3245                    ;  _tx9d := _false
3246                    ;info   181, 414
3247 019e 1683          bsf     __rp0___byte, __rp0___bit
3248 019f 1018          bcf     _tx9d___byte, _tx9d___bit
3249                    ; line_number = 182
3250                    ;  _txreg := value
3251                    ;info   182, 416
3252 01a0 1283          bcf     __rp0___byte, __rp0___bit
3253 01a1 0824          movf    rb2bus_byte_put__value,w
3254 01a2 0099          movwf   _txreg
3255            
3256                    ; # Wait for the echo to show up:
3257                    ; line_number = 185
3258                    ;  while !_rcif start
3259   01a3 :   rb2bus_byte_put__3:
3260                    ;info   185, 419
3261                    ; =>bit_code_emit@symbol(): sym=_rcif
3262                    ; 1TEST: Single test with code in skip slot
3263 01a3 1e8c          btfss   _rcif___byte, _rcif___bit
3264                    ; # Still waiting:
3265 01a4 29a3          goto    rb2bus_byte_put__3
3266                    ; Recombine size1 = 0 || size2 = 0
3267                    ; line_number = 185
3268                    ;  while !_rcif done
3269                    ; # Throw the received byte away (store into {_w}).
3270                    ; line_number = 188
3271                    ;  assemble
3272                    ;info   188, 421
3273                    ; line_number = 189
3274                    ;info   189, 421
3275 01a5 081a          movf    _rcreg,w
3276            
3277                    ; # Recover from any receive errors by toggling {_cren}:
3278                    ; line_number = 192
3279                    ;  if _oerr start
3280                    ;info   192, 422
3281                    ; =>bit_code_emit@symbol(): sym=_oerr
3282                    ; 1TEST: Single test with code in skip slot
3283 01a6 1898          btfsc   _oerr___byte, _oerr___bit
3284                    ; line_number = 193
3285                    ; _cren := _false
3286                    ;info   193, 423
3287 01a7 1218          bcf     _cren___byte, _cren___bit
3288                    ; Recombine size1 = 0 || size2 = 0
3289                    ; line_number = 192
3290                    ;  if _oerr done
3291                    ; line_number = 194
3292                    ; if _ferr start
3293                    ;info   194, 424
3294                    ; =>bit_code_emit@symbol(): sym=_ferr
3295                    ; 1TEST: Single test with code in skip slot
3296 01a8 1918          btfsc   _ferr___byte, _ferr___bit
3297                    ; line_number = 195
3298                    ; _cren := _false
3299                    ;info   195, 425
3300 01a9 1218          bcf     _cren___byte, _cren___bit
3301                    ; Recombine size1 = 0 || size2 = 0
3302                    ; line_number = 194
3303                    ; if _ferr done
3304                    ; line_number = 196
3305                    ; _cren := _true
3306                    ;info   196, 426
3307 01aa 1618          bsf     _cren___byte, _cren___bit
3308            
3309            
3310   01ab :   rb2bus_byte_put__4:
3311                    ; Recombine size1 = 0 || size2 = 0
3312                    ; line_number = 174
3313                    ;  if !rb2bus_error done
3314                    ; delay after procedure statements=non-uniform
3315                    ; Implied return
3316 01ab 3400          retlw   0
3317            
3318            
3319            
3320            
3321                    ; line_number = 199
3322                    ;info   199, 428
3323                    ; procedure rb2bus_command
3324   01ac :   rb2bus_command:
3325                    ; Last argument is sitting in W; save into argument variable
3326 01ac 00a7          movwf   rb2bus_command__command
3327                    ; delay=4294967295
3328                    ; line_number = 200
3329                    ; argument command byte
3330 00000027 = rb2bus_command__command equ globals___0+7
3331                    ; line_number = 201
3332                    ;  returns_nothing
3333            
3334                    ; # This procedure will process an shared {command}.  This procedure
3335                    ; # accesses the global string {id}.
3336            
3337                    ; line_number = 206
3338                    ;  local new_address byte
3339 00000025 = rb2bus_command__new_address equ globals___0+5
3340                    ; line_number = 207
3341                    ;  local temp byte
3342 00000026 = rb2bus_command__temp equ globals___0+6
3343            
3344                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3345                    ; line_number = 209
3346                    ;  switch command & 7 start
3347                    ;info   209, 429
3348                    ; switch_before:(data:00=uu=>00 code:XX=cc=>XX) size=1
3349 01ad 3001          movlw   rb2bus_command__13>>8
3350 01ae 008a          movwf   __pclath
3351 01af 3007          movlw   7
3352 01b0 0527          andwf   rb2bus_command__command,w
3353                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
3354 01b1 3eb3          addlw   rb2bus_command__13
3355 01b2 0082          movwf   __pcl
3356                    ; page_group 8
3357   01b3 :   rb2bus_command__13:
3358 01b3 29f3          goto    rb2bus_command__14
3359 01b4 29f3          goto    rb2bus_command__14
3360 01b5 29f3          goto    rb2bus_command__14
3361 01b6 29f3          goto    rb2bus_command__14
3362 01b7 29bb          goto    rb2bus_command__9
3363 01b8 29e7          goto    rb2bus_command__10
3364 01b9 29f0          goto    rb2bus_command__11
3365 01ba 29f2          goto    rb2bus_command__12
3366                    ; line_number = 210
3367                    ; case 4
3368   01bb :   rb2bus_command__9:
3369                    ; # 1111 1100 (Address_Set):
3370                    ; # Return old address:
3371                    ; line_number = 213
3372                    ;  call rb2bus_byte_put(rb2bus_address)
3373                    ;info   213, 443
3374 01bb 0820          movf    rb2bus_address,w
3375 01bc 2196          call    rb2bus_byte_put
3376            
3377                    ; # Fetch new address:
3378                    ; line_number = 216
3379                    ;  new_address := rb2bus_byte_get()
3380                    ;info   216, 445
3381 01bd 2174          call    rb2bus_byte_get
3382 01be 00a5          movwf   rb2bus_command__new_address
3383                    ; line_number = 217
3384                    ;  if new_address = 0 || new_address = rb2bus_address start
3385                    ;info   217, 447
3386                    ; Left minus Right
3387 01bf 0825          movf    rb2bus_command__new_address,w
3388                    ; =>bit_code_emit@symbol(): sym=__z
3389                    ; No 1TEST: true.size=1 false.size=36
3390                    ; No 2TEST: true.size=1 false.size=36
3391                    ; 2GOTO: Single test with two GOTO's
3392 01c0 1903          btfsc   __z___byte, __z___bit
3393 01c1 29c6          goto    rb2bus_command__5
3394                    ; Recombine code1_bit_states != code2_bit_states
3395                    ; &&||: index=1 true_delay=4294967295 false_delay=4294967295 goto_delay=4294967295
3396                    ; Left minus Right
3397 01c2 0820          movf    rb2bus_address,w
3398 01c3 0225          subwf   rb2bus_command__new_address,w
3399                    ; =>bit_code_emit@symbol(): sym=__z
3400                    ; No 1TEST: true.size=4 false.size=27
3401                    ; No 2TEST: true.size=4 false.size=27
3402                    ; 2GOTO: Single test with two GOTO's
3403 01c4 1d03          btfss   __z___byte, __z___bit
3404 01c5 29cb          goto    rb2bus_command__6
3405   01c6 :   rb2bus_command__5:
3406                    ; line_number = 218
3407                    ; call rb2bus_byte_put(0)
3408                    ;info   218, 454
3409 01c6 3000          movlw   0
3410 01c7 2196          call    rb2bus_byte_put
3411                    ; line_number = 219
3412                    ;  rb2bus_error := _true
3413                    ;info   219, 456
3414 01c8 14ef          bsf     rb2bus_error___byte, rb2bus_error___bit
3415                    ; line_number = 220
3416                    ;  rb2bus_selected := _false
3417                    ;info   220, 457
3418 01c9 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
3419 01ca 29e6          goto    rb2bus_command__7
3420                    ; 2GOTO: Starting code 2
3421   01cb :   rb2bus_command__6:
3422                    ; # Return new address:
3423                    ; line_number = 223
3424                    ;  call rb2bus_byte_put(new_address)
3425                    ;info   223, 459
3426 01cb 0825          movf    rb2bus_command__new_address,w
3427 01cc 2196          call    rb2bus_byte_put
3428            
3429                    ; # Fetch new address again as a check:
3430                    ; line_number = 226
3431                    ;  temp := rb2bus_byte_get()
3432                    ;info   226, 461
3433 01cd 2174          call    rb2bus_byte_get
3434 01ce 00a6          movwf   rb2bus_command__temp
3435                    ; line_number = 227
3436                    ;  if temp != new_address start
3437                    ;info   227, 463
3438                    ; Left minus Right
3439 01cf 0825          movf    rb2bus_command__new_address,w
3440 01d0 0226          subwf   rb2bus_command__temp,w
3441                    ; =>bit_code_emit@symbol(): sym=__z
3442                    ; No 1TEST: true.size=14 false.size=4
3443                    ; No 2TEST: true.size=14 false.size=4
3444                    ; 2GOTO: Single test with two GOTO's
3445 01d1 1d03          btfss   __z___byte, __z___bit
3446 01d2 29e2          goto    rb2bus_command__3
3447                    ; line_number = 232
3448                    ; call rb2bus_eedata_write(new_address)
3449                    ;info   232, 467
3450 01d3 0825          movf    rb2bus_command__new_address,w
3451 01d4 2228          call    rb2bus_eedata_write
3452                    ; line_number = 233
3453                    ;  temp := rb2bus_eedata_read()
3454                    ;info   233, 469
3455 01d5 2213          call    rb2bus_eedata_read
3456 01d6 00a6          movwf   rb2bus_command__temp
3457                    ; line_number = 234
3458                    ;  if temp = new_address start
3459                    ;info   234, 471
3460                    ; Left minus Right
3461 01d7 0825          movf    rb2bus_command__new_address,w
3462 01d8 0226          subwf   rb2bus_command__temp,w
3463                    ; =>bit_code_emit@symbol(): sym=__z
3464                    ; No 1TEST: true.size=3 false.size=1
3465                    ; No 2TEST: true.size=3 false.size=1
3466                    ; 2GOTO: Single test with two GOTO's
3467 01d9 1d03          btfss   __z___byte, __z___bit
3468 01da 29df          goto    rb2bus_command__1
3469                    ; line_number = 235
3470                    ; rb2bus_address := new_address
3471                    ;info   235, 475
3472 01db 0825          movf    rb2bus_command__new_address,w
3473 01dc 00a0          movwf   rb2bus_address
3474                    ; line_number = 236
3475                    ;  call rb2bus_byte_put(rb2_ok)
3476                    ;info   236, 477
3477 01dd 30a5          movlw   165
3478 01de 29e0          goto    rb2bus_command__2
3479                    ; 2GOTO: Starting code 2
3480   01df :   rb2bus_command__1:
3481                    ; line_number = 238
3482                    ; call rb2bus_byte_put(0)
3483                    ;info   238, 479
3484 01df 3000          movlw   0
3485   01e0 :   rb2bus_command__2:
3486                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3487                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3488                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3489 01e0 2196          call    rb2bus_byte_put
3490                    ; line_number = 234
3491                    ;  if temp = new_address done
3492 01e1 29e6          goto    rb2bus_command__4
3493                    ; 2GOTO: Starting code 2
3494   01e2 :   rb2bus_command__3:
3495                    ; line_number = 228
3496                    ; call rb2bus_byte_put(0)
3497                    ;info   228, 482
3498 01e2 3000          movlw   0
3499 01e3 2196          call    rb2bus_byte_put
3500                    ; line_number = 229
3501                    ;  rb2bus_error := _true
3502                    ;info   229, 484
3503 01e4 14ef          bsf     rb2bus_error___byte, rb2bus_error___bit
3504                    ; line_number = 230
3505                    ;  rb2bus_selected := _false
3506                    ;info   230, 485
3507 01e5 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
3508   01e6 :   rb2bus_command__4:
3509                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3510                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3511                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3512                    ; line_number = 227
3513                    ;  if temp != new_address done
3514   01e6 :   rb2bus_command__7:
3515                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3516                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3517                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3518                    ; &&||: index=0 true_delay=4294967295 false_delay=4294967295 goto_delay=4294967295
3519                    ; &&||:: index=0 new_delay=4294967295 goto_delay=4294967295
3520                    ; 2GOTO: No goto needed; true=rb2bus_command__5 false= true_size=1 false_size=36
3521                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3522                    ; 2GOTO: code2 final bitstates:(data:XX=cc=>XX code:XX=cc=>XX)
3523                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3524                    ; line_number = 217
3525                    ;  if new_address = 0 || new_address = rb2bus_address done
3526 01e6 29f3          goto    rb2bus_command__14
3527                    ; line_number = 239
3528                    ; case 5
3529   01e7 :   rb2bus_command__10:
3530                    ; # 1111 1101 (Id_next):
3531                    ; line_number = 241
3532                    ;  if rb2bus_index < id.size start
3533                    ;info   241, 487
3534 01e7 3015          movlw   21
3535 01e8 0221          subwf   rb2bus_index,w
3536                    ; =>bit_code_emit@symbol(): sym=__c
3537                    ; No 1TEST: true.size=0 false.size=4
3538                    ; No 2TEST: true.size=0 false.size=4
3539                    ; 1GOTO: Single test with GOTO
3540 01e9 1803          btfsc   __c___byte, __c___bit
3541 01ea 29ef          goto    rb2bus_command__8
3542                    ; line_number = 242
3543                    ; call rb2bus_byte_put(id[rb2bus_index])
3544                    ;info   242, 491
3545 01eb 0821          movf    rb2bus_index,w
3546 01ec 213a          call    id
3547 01ed 2196          call    rb2bus_byte_put
3548                    ; line_number = 243
3549                    ;  rb2bus_index := rb2bus_index + 1
3550                    ;info   243, 494
3551 01ee 0aa1          incf    rb2bus_index,f
3552                    ; #if rb2bus_index >= id.size
3553                    ; #	rb2bus_index := rb2bus_index - 1
3554   01ef :   rb2bus_command__8:
3555                    ; Recombine size1 = 0 || size2 = 0
3556                    ; line_number = 241
3557                    ;  if rb2bus_index < id.size done
3558 01ef 29f3          goto    rb2bus_command__14
3559                    ; line_number = 246
3560                    ; case 6
3561   01f0 :   rb2bus_command__11:
3562                    ; # 1111 1110 (Id_start):
3563                    ; line_number = 248
3564                    ;  rb2bus_index := 0
3565                    ;info   248, 496
3566 01f0 01a1          clrf    rb2bus_index
3567 01f1 29f3          goto    rb2bus_command__14
3568                    ; line_number = 249
3569                    ; case 7
3570   01f2 :   rb2bus_command__12:
3571                    ; # 1111 1111 (Deselect):
3572                    ; line_number = 251
3573                    ;  call rb2bus_deselect()
3574                    ;info   251, 498
3575 01f2 2172          call    rb2bus_deselect
3576            
3577            
3578   01f3 :   rb2bus_command__14:
3579                    ; line_number = 209
3580                    ;  switch command & 7 done
3581                    ; delay after procedure statements=non-uniform
3582                    ; Implied return
3583 01f3 3400          retlw   0
3584            
3585            
3586            
3587            
3588                    ; buffer = 'rb2bus_pic16f628'
3589                    ; line_number = 26
3590                    ;info   26, 500
3591                    ; procedure rb2bus_initialize
3592   01f4 :   rb2bus_initialize:
3593                    ; Last argument is sitting in W; save into argument variable
3594 01f4 00a8          movwf   rb2bus_initialize__address
3595                    ; delay=4294967295
3596                    ; line_number = 27
3597                    ; argument address byte
3598 00000028 = rb2bus_initialize__address equ globals___0+8
3599                    ; line_number = 28
3600                    ;  returns_nothing
3601            
3602                    ; # This procedure is responsibile for initializing the UART
3603                    ; # connected to the bus.  {address} is the address of this
3604                    ; # slave module.  This code is specific to the PIC16F688.
3605            
3606                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3607                    ; line_number = 34
3608                    ;  rb2bus_address := address
3609                    ;info   34, 501
3610 01f5 0828          movf    rb2bus_initialize__address,w
3611 01f6 00a0          movwf   rb2bus_address
3612            
3613                    ; # Warm up the UART:
3614                    ; line_number = 37
3615                    ;  _trisb@1 := _true
3616                    ;info   37, 503
3617 00000086 = rb2bus_initialize__select__1___byte equ _trisb
3618 00000001 = rb2bus_initialize__select__1___bit equ 1
3619 01f7 1683          bsf     __rp0___byte, __rp0___bit
3620 01f8 1486          bsf     rb2bus_initialize__select__1___byte, rb2bus_initialize__select__1___bit
3621                    ; line_number = 38
3622                    ;  _trisb@2 := _true
3623                    ;info   38, 505
3624 00000086 = rb2bus_initialize__select__2___byte equ _trisb
3625 00000002 = rb2bus_initialize__select__2___bit equ 2
3626 01f9 1506          bsf     rb2bus_initialize__select__2___byte, rb2bus_initialize__select__2___bit
3627            
3628                    ; # Initialize the {_txsta} register:
3629                    ; line_number = 41
3630                    ;  _txsta := 0
3631                    ;info   41, 506
3632 01fa 0198          clrf    _txsta
3633                    ; line_number = 42
3634                    ;  _tx9 := _true
3635                    ;info   42, 507
3636 01fb 1718          bsf     _tx9___byte, _tx9___bit
3637                    ; line_number = 43
3638                    ;  _txen := _true
3639                    ;info   43, 508
3640 01fc 1698          bsf     _txen___byte, _txen___bit
3641                    ; line_number = 44
3642                    ;  _brgh := _true
3643                    ;info   44, 509
3644 01fd 1518          bsf     _brgh___byte, _brgh___bit
3645            
3646                    ; # Initialize the {_rcsta} register:
3647                    ; line_number = 47
3648                    ;  _rcsta := 0
3649                    ;info   47, 510
3650 01fe 1283          bcf     __rp0___byte, __rp0___bit
3651 01ff 0198          clrf    _rcsta
3652                    ; line_number = 48
3653                    ;  _spen := _true
3654                    ;info   48, 512
3655 0200 1798          bsf     _spen___byte, _spen___bit
3656                    ; line_number = 49
3657                    ;  _rx9 := _true
3658                    ;info   49, 513
3659 0201 1718          bsf     _rx9___byte, _rx9___bit
3660                    ; line_number = 50
3661                    ;  _cren := _true
3662                    ;info   50, 514
3663 0202 1618          bsf     _cren___byte, _cren___bit
3664                    ; #_adden := _true
3665                    ; line_number = 52
3666                    ;  _adden := _false
3667                    ;info   52, 515
3668 0203 1198          bcf     _adden___byte, _adden___bit
3669            
3670                    ; # Set up the baud rate generator:
3671                    ; line_number = 55
3672                    ;  _spbrg := spbrg_500k
3673                    ;info   55, 516
3674 0204 3001          movlw   1
3675 0205 1683          bsf     __rp0___byte, __rp0___bit
3676 0206 0099          movwf   _spbrg
3677            
3678                    ; line_number = 57
3679                    ;  rb2bus_selected := _false
3680                    ;info   57, 519
3681 0207 1283          bcf     __rp0___byte, __rp0___bit
3682 0208 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
3683                    ; line_number = 58
3684                    ;  rb2bus_error := _false
3685                    ;info   58, 521
3686 0209 10ef          bcf     rb2bus_error___byte, rb2bus_error___bit
3687                    ; line_number = 59
3688                    ;  rb2bus_index := 0
3689                    ;info   59, 522
3690 020a 01a1          clrf    rb2bus_index
3691            
3692                    ; # Deal with setting {rb2bus_address} from EEData memory:
3693                    ; line_number = 62
3694                    ;  rb2bus_address := rb2bus_eedata_read()
3695                    ;info   62, 523
3696 020b 2213          call    rb2bus_eedata_read
3697 020c 00a0          movwf   rb2bus_address
3698                    ; line_number = 63
3699                    ;  if rb2bus_address = 0 start
3700                    ;info   63, 525
3701                    ; Left minus Right
3702 020d 0820          movf    rb2bus_address,w
3703                    ; =>bit_code_emit@symbol(): sym=__z
3704                    ; No 1TEST: true.size=2 false.size=0
3705                    ; No 2TEST: true.size=2 false.size=0
3706                    ; 1GOTO: Single test with GOTO
3707 020e 1d03          btfss   __z___byte, __z___bit
3708 020f 2a12          goto    rb2bus_initialize__3
3709                    ; # EE data not set, so use {address} passed in as a argument:
3710                    ; line_number = 65
3711                    ;  rb2bus_address := address
3712                    ;info   65, 528
3713 0210 0828          movf    rb2bus_initialize__address,w
3714 0211 00a0          movwf   rb2bus_address
3715            
3716            
3717                    ; Recombine size1 = 0 || size2 = 0
3718   0212 :   rb2bus_initialize__3:
3719                    ; line_number = 63
3720                    ;  if rb2bus_address = 0 done
3721                    ; delay after procedure statements=non-uniform
3722                    ; Implied return
3723 0212 3400          retlw   0
3724            
3725            
3726            
3727            
3728                    ; line_number = 71
3729                    ;info   71, 531
3730                    ; procedure rb2bus_eedata_read
3731   0213 :   rb2bus_eedata_read:
3732                    ; arguments_none
3733                    ; line_number = 73
3734                    ;  returns byte
3735            
3736                    ; # This procedure will return the address stored in EEData.  If
3737                    ; # there is no data, 0 is returned.
3738            
3739                    ; line_number = 78
3740                    ;  local temp1 byte
3741 00000029 = rb2bus_eedata_read__temp1 equ globals___0+9
3742                    ; line_number = 79
3743                    ;  local temp2 byte
3744 0000002a = rb2bus_eedata_read__temp2 equ globals___0+10
3745            
3746                    ; # Read the first byte (the address):
3747                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3748                    ; line_number = 82
3749                    ;  _eecon1 := 0
3750                    ;info   82, 531
3751 0213 1683          bsf     __rp0___byte, __rp0___bit
3752 0214 019c          clrf    _eecon1
3753                    ; line_number = 83
3754                    ;  _eeadr := rb2bus_eedata_address
3755                    ;info   83, 533
3756 0215 307e          movlw   126
3757 0216 009b          movwf   _eeadr
3758                    ; line_number = 84
3759                    ;  _rd := _true
3760                    ;info   84, 535
3761 0217 141c          bsf     _rd___byte, _rd___bit
3762                    ; line_number = 85
3763                    ;  temp1 := _eedat
3764                    ;info   85, 536
3765 0218 081a          movf    _eedat,w
3766 0219 1283          bcf     __rp0___byte, __rp0___bit
3767 021a 00a9          movwf   rb2bus_eedata_read__temp1
3768            
3769                    ; # Read the second byte (the 1'z complement)
3770                    ; line_number = 88
3771                    ;  _eeadr := _eeadr + 1
3772                    ;info   88, 539
3773 021b 1683          bsf     __rp0___byte, __rp0___bit
3774 021c 0a9b          incf    _eeadr,f
3775                    ; line_number = 89
3776                    ;  _rd := _true
3777                    ;info   89, 541
3778 021d 141c          bsf     _rd___byte, _rd___bit
3779                    ; line_number = 90
3780                    ;  temp2 := _eedat
3781                    ;info   90, 542
3782 021e 081a          movf    _eedat,w
3783 021f 1283          bcf     __rp0___byte, __rp0___bit
3784 0220 00aa          movwf   rb2bus_eedata_read__temp2
3785            
3786                    ; # If they are 1's complement of one another, they are valid:
3787                    ; line_number = 93
3788                    ;  if temp1 = (0xff ^ temp2) start
3789                    ;info   93, 545
3790                    ; Left minus Right
3791 0221 092a          comf    rb2bus_eedata_read__temp2,w
3792 0222 0229          subwf   rb2bus_eedata_read__temp1,w
3793                    ; =>bit_code_emit@symbol(): sym=__z
3794                    ; No 1TEST: true.size=2 false.size=0
3795                    ; No 2TEST: true.size=2 false.size=0
3796                    ; 1GOTO: Single test with GOTO
3797 0223 1d03          btfss   __z___byte, __z___bit
3798 0224 2a27          goto    rb2bus_eedata_read__1
3799                    ; # Return the valid address:
3800                    ; line_number = 95
3801                    ;  return temp1 start
3802                    ; line_number = 95
3803                    ;info   95, 549
3804 0225 0829          movf    rb2bus_eedata_read__temp1,w
3805 0226 0008          return  
3806                    ; line_number = 95
3807                    ;  return temp1 done
3808            
3809                    ; Recombine size1 = 0 || size2 = 0
3810   0227 :   rb2bus_eedata_read__1:
3811                    ; line_number = 93
3812                    ;  if temp1 = (0xff ^ temp2) done
3813                    ; # They are not 1's complement, so return 0 as an error:
3814                    ; line_number = 98
3815                    ;  return 0 start
3816                    ; line_number = 98
3817                    ;info   98, 551
3818 0227 3400          retlw   0
3819                    ; line_number = 98
3820                    ;  return 0 done
3821            
3822            
3823                    ; delay after procedure statements=non-uniform
3824            
3825            
3826            
3827            
3828                    ; line_number = 101
3829                    ;info   101, 552
3830                    ; procedure rb2bus_eedata_write
3831   0228 :   rb2bus_eedata_write:
3832                    ; Last argument is sitting in W; save into argument variable
3833 0228 00ab          movwf   rb2bus_eedata_write__address
3834                    ; delay=4294967295
3835                    ; line_number = 102
3836                    ; argument address byte
3837 0000002b = rb2bus_eedata_write__address equ globals___0+11
3838                    ; line_number = 103
3839                    ;  returns_nothing
3840            
3841                    ; # This procedure will write {address} into the EEData.  The
3842                    ; # microcontroll pauses while the EEData is written.
3843            
3844                    ; # Clear out the {_eecon1} register
3845                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3846                    ; line_number = 109
3847                    ;  _eecon1 := 0
3848                    ;info   109, 553
3849 0229 1683          bsf     __rp0___byte, __rp0___bit
3850 022a 019c          clrf    _eecon1
3851                    ; line_number = 110
3852                    ;  _eeadr := rb2bus_eedata_address
3853                    ;info   110, 555
3854 022b 307e          movlw   126
3855 022c 009b          movwf   _eeadr
3856                    ; line_number = 111
3857                    ;  _eedat := address
3858                    ;info   111, 557
3859 022d 1283          bcf     __rp0___byte, __rp0___bit
3860 022e 082b          movf    rb2bus_eedata_write__address,w
3861 022f 1683          bsf     __rp0___byte, __rp0___bit
3862 0230 009a          movwf   _eedat
3863            
3864                    ; # Write 2 bytes ({address} followed by {address}^0xff):
3865                    ; line_number = 114
3866                    ;  loop_exactly 2 start
3867                    ;info   114, 561
3868 00000064 = rb2bus_eedata_write__1 equ globals___0+68
3869 0231 3002          movlw   2
3870 0232 1283          bcf     __rp0___byte, __rp0___bit
3871 0233 00e4          movwf   rb2bus_eedata_write__1
3872   0234 :   rb2bus_eedata_write__2:
3873                    ; # Set the data to write:
3874            
3875                    ; # Set up the for the write:
3876                    ; line_number = 118
3877                    ;  _wren := _true
3878                    ;info   118, 564
3879 0234 1683          bsf     __rp0___byte, __rp0___bit
3880 0235 151c          bsf     _wren___byte, _wren___bit
3881                    ; line_number = 119
3882                    ;  _gie := _false
3883                    ;info   119, 566
3884 0236 138b          bcf     _gie___byte, _gie___bit
3885                    ; line_number = 120
3886                    ;  _eecon2 := 0x55
3887                    ;info   120, 567
3888 0237 3055          movlw   85
3889 0238 009d          movwf   _eecon2
3890                    ; line_number = 121
3891                    ;  _eecon2 := 0xaa
3892                    ;info   121, 569
3893 0239 30aa          movlw   170
3894 023a 009d          movwf   _eecon2
3895                    ; # Start the write:
3896                    ; line_number = 123
3897                    ;  _wr := _true
3898                    ;info   123, 571
3899 023b 149c          bsf     _wr___byte, _wr___bit
3900            
3901                    ; # Wait for write to complete:
3902                    ; line_number = 126
3903                    ;  while _wr start
3904   023c :   rb2bus_eedata_write__3:
3905                    ;info   126, 572
3906                    ; =>bit_code_emit@symbol(): sym=_wr
3907                    ; 1TEST: Single test with code in skip slot
3908 023c 189c          btfsc   _wr___byte, _wr___bit
3909                    ; line_number = 127
3910                    ; do_nothing
3911                    ;info   127, 573
3912            
3913 023d 2a3c          goto    rb2bus_eedata_write__3
3914                    ; Recombine size1 = 0 || size2 = 0
3915                    ; line_number = 126
3916                    ;  while _wr done
3917                    ; # Disable writing:
3918                    ; line_number = 130
3919                    ;  _wren := _false
3920                    ;info   130, 574
3921 023e 111c          bcf     _wren___byte, _wren___bit
3922            
3923                    ; # Prepare the second byte of data:
3924                    ; line_number = 133
3925                    ;  _eeadr := _eeadr + 1
3926                    ;info   133, 575
3927 023f 0a9b          incf    _eeadr,f
3928                    ; line_number = 134
3929                    ;  _eedat := address ^ 0xff
3930                    ;info   134, 576
3931 0240 1283          bcf     __rp0___byte, __rp0___bit
3932 0241 092b          comf    rb2bus_eedata_write__address,w
3933 0242 1683          bsf     __rp0___byte, __rp0___bit
3934 0243 009a          movwf   _eedat
3935            
3936            
3937            
3938            
3939            
3940 0244 1283          bcf     __rp0___byte, __rp0___bit
3941                    ; line_number = 114
3942                    ;  loop_exactly 2 wrap-up
3943 0245 0be4          decfsz  rb2bus_eedata_write__1,f
3944 0246 2a34          goto    rb2bus_eedata_write__2
3945                    ; line_number = 114
3946                    ;  loop_exactly 2 done
3947                    ; delay after procedure statements=non-uniform
3948                    ; Implied return
3949 0247 3400          retlw   0
3950            
3951            
3952            
3953            
3954                    ; Configuration bits
3955                    ; address = 0x2007, fill = 0x200
3956                    ; cp = off (0x3c00)
3957                    ; cpd = off (0x100)
3958                    ; lvp = off (0x0)
3959                    ; boden = off (0x0)
3960                    ; mclre = off (0x0)
3961                    ; pwrte = off (0x8)
3962                    ; wdte = off (0x0)
3963                    ; fosc = hs (0x2)
3964                    ; 16138 = 0x3f0a
3965   3f0a =           __config 16138
3966                    ; Define start addresses for data regions
3967                    ; Region="shared___globals" Address=112" Size=16 Bytes=0 Bits=0 Available=16
3968                    ; Region="globals___0" Address=32" Size=80 Bytes=69 Bits=6 Available=10
3969                    ; Region="globals___1" Address=160" Size=80 Bytes=0 Bits=0 Available=80
3970                    ; Region="globals___2" Address=288" Size=48 Bytes=0 Bits=0 Available=48
3971                    ; Region="shared___globals" Address=112" Size=16 Bytes=0 Bits=0 Available=16
3972                    end
