1                       radix   dec
2                       ; Code bank 0; Start address: 0; End address: 4095
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) 2006-2007 by Wayne C. Gramlich
31                      ; # All rights reserved.
32              
33                      ; # This module uses a PIC16F688:
34                      ; buffer = 'sonar2'
35                      ; line_number = 7
36                      ; library _pic16f688 entered
37              
38                      ; # Copyright (c) 2004-2006 by Wayne C. Gramlich
39                      ; # All rights reserved.
40              
41                      ; buffer = '_pic16f688'
42                      ; line_number = 6
43                      ; processor pic16f688
44                      ; line_number = 7
45                      ; configure_address 0x2007
46                      ; line_number = 8
47                      ;  configure_fill 0x3000
48                      ; line_number = 9
49                      ;  configure_option fcmen: on = 0x800
50                      ; line_number = 10
51                      ;  configure_option fcmen: off = 0x000
52                      ; line_number = 11
53                      ;  configure_option ieso: on = 0x400
54                      ; line_number = 12
55                      ;  configure_option ieso: off = 0x000
56                      ; line_number = 13
57                      ;  configure_option boden: on = 0x300
58                      ; line_number = 14
59                      ;  configure_option boden: partial = 0x200
60                      ; line_number = 15
61                      ;  configure_option boden: sboden = 0x100
62                      ; line_number = 16
63                      ;  configure_option boden: off = 0x000
64                      ; line_number = 17
65                      ;  configure_option cpd: on = 0x00
66                      ; line_number = 18
67                      ;  configure_option cpd: off = 0x80
68                      ; line_number = 19
69                      ;  configure_option cp: on = 0x00
70                      ; line_number = 20
71                      ;  configure_option cp: off = 0x40
72                      ; line_number = 21
73                      ;  configure_option mclre: on = 0x20
74                      ; line_number = 22
75                      ;  configure_option mclre: off = 0x00
76                      ; line_number = 23
77                      ;  configure_option pwrte: on = 0x00
78                      ; line_number = 24
79                      ;  configure_option pwrte: off = 0x10
80                      ; line_number = 25
81                      ;  configure_option wdte: on = 8
82                      ; line_number = 26
83                      ;  configure_option wdte: off = 0
84                      ; line_number = 27
85                      ;  configure_option fosc: rc_clk = 7
86                      ; line_number = 28
87                      ;  configure_option fosc: rc_no_clk = 6
88                      ; line_number = 29
89                      ;  configure_option fosc: int_clk = 5
90                      ; line_number = 30
91                      ;  configure_option fosc: int_no_clk = 4
92                      ; line_number = 31
93                      ;  configure_option fosc: ec = 3
94                      ; line_number = 32
95                      ;  configure_option fosc: hs = 2
96                      ; line_number = 33
97                      ;  configure_option fosc: xt = 1
98                      ; line_number = 34
99                      ;  configure_option fosc: lp = 0
100             
101                     ; line_number = 36
102                     ;  code_bank 0x0 : 0xfff
103                     ; line_number = 37
104                     ;  data_bank 0x0 : 0x7f
105                     ; line_number = 38
106                     ;  data_bank 0x80 : 0xff
107                     ; line_number = 39
108                     ;  data_bank 0x100 : 0x17f
109                     ; line_number = 40
110                     ;  data_bank 0x180 : 0x1ff
111             
112                     ; line_number = 42
113                     ;  global_region 0x20 : 0x6f
114                     ; line_number = 43
115                     ;  icd2_global_region 0x20 : 0x6f
116             
117                     ; line_number = 45
118                     ;  global_region 0xa0 : 0xef
119                     ; line_number = 46
120                     ;  icd2_global_region 0xa0 : 0xef
121             
122                     ; line_number = 48
123                     ;  global_region 0x120 : 0x16f
124                     ; line_number = 49
125                     ;  icd2_global_region 0x120 : 0x164
126             
127                     ; line_number = 51
128                     ;  shared_region 0x70 : 0x7f
129                     ; line_number = 52
130                     ;  icd2_shared_region 0x71 : 0x7f
131             
132                     ; line_number = 54
133                     ;  interrupts_possible
134                     ; line_number = 55
135                     ;  packages pdip=14, soic=14, tssop=14
136                     ; line_number = 56
137                     ;  pin vdd, power_supply
138                     ; line_number = 57
139                     ; pin_bindings pdip=1, soic=1, tssop=1
140                     ; line_number = 58
141                     ; pin ra5_in, ra5_nc, ra5_out, t1cki, osc1, clkin
142                     ; line_number = 59
143                     ; pin_bindings pdip=2, soic=2, tssop=2
144                     ; line_number = 60
145                     ;  bind_to _porta@5
146                     ; line_number = 61
147                     ;  or_if ra5_in _trisa 32
148                     ; line_number = 62
149                     ;  or_if ra5_nc _trisa 32
150                     ; line_number = 63
151                     ;  or_if ra5_out _trisa 0
152                     ; line_number = 64
153                     ;  or_if osc1 _trisa 32
154                     ; line_number = 65
155                     ; pin ra4_in, ra4_nc, ra4_out, t1g, osc2, an3, clkout
156                     ; line_number = 66
157                     ; pin_bindings pdip=3, soic=3, tssop=3
158                     ; line_number = 67
159                     ;  bind_to _porta@4
160                     ; line_number = 68
161                     ;  or_if ra4_in _trisa 16
162                     ; line_number = 69
163                     ;  or_if ra4_nc _trisa 16
164                     ; line_number = 70
165                     ;  or_if ra4_out _trisa 0
166                     ; line_number = 71
167                     ;  or_if an3 _trisa 16
168                     ; line_number = 72
169                     ;  or_if osc2 _trisa 16
170                     ; line_number = 73
171                     ;  or_if ra4_in _ansel 0
172                     ; line_number = 74
173                     ;  or_if ra4_out _ansel 0
174                     ; line_number = 75
175                     ;  or_if an3 _ansel 8
176                     ; line_number = 76
177                     ;  or_if ra4_in _adcon0 0
178                     ; line_number = 77
179                     ;  or_if ra4_out _adcon0 0
180                     ; line_number = 78
181                     ;  or_if an3 _adcon0 1
182                     ; line_number = 79
183                     ; pin ra3_in, ra3_nc, mclr, vpp
184                     ; line_number = 80
185                     ; pin_bindings pdip=4, soic=4, tssop=4
186                     ; line_number = 81
187                     ;  bind_to _porta@3
188                     ; line_number = 82
189                     ;  or_if ra3_in _trisa 8
190                     ; line_number = 83
191                     ;  or_if ra3_nc _trisa 8
192                     ; line_number = 84
193                     ; pin rc5_in, rc5_nc, rc5_out, rx, dt
194                     ; line_number = 85
195                     ; pin_bindings pdip=5, soic=5, tssop=5
196                     ; line_number = 86
197                     ;  bind_to _portc@5
198                     ; line_number = 87
199                     ;  or_if rc5_in _trisc 32
200                     ; line_number = 88
201                     ;  or_if rc5_nc _trisc 32
202                     ; line_number = 89
203                     ;  or_if rc5_out _trisc 0
204                     ; line_number = 90
205                     ;  or_if rx _trisc 32
206                     ; line_number = 91
207                     ; pin rc4_in, rc4_nc, rc4_out, c2out, tx, ck
208                     ; line_number = 92
209                     ; pin_bindings pdip=6, soic=6, tssop=6
210                     ; line_number = 93
211                     ;  bind_to _portc@4
212                     ; line_number = 94
213                     ;  or_if rc4_in _trisc 16
214                     ; line_number = 95
215                     ;  or_if rc4_nc _trisc 16
216                     ; line_number = 96
217                     ;  or_if rc4_out _trisc 0
218                     ; # The UART documentation says TX must be marked as in input:
219                     ; line_number = 98
220                     ;  or_if tx _trisc 16
221                     ; line_number = 99
222                     ; pin rc3_in, rc3_nc, rc3_out, an7
223                     ; line_number = 100
224                     ; pin_bindings pdip=7, soic=7, tssop=7
225                     ; line_number = 101
226                     ;  bind_to _portc@3
227                     ; line_number = 102
228                     ;  or_if rc3_in _trisc 8
229                     ; line_number = 103
230                     ;  or_if rc3_nc _trisc 8
231                     ; line_number = 104
232                     ;  or_if rc3_out _trisc 0
233                     ; line_number = 105
234                     ;  or_if an7 _trisc 8
235                     ; line_number = 106
236                     ;  or_if rc3_in _ansel 0
237                     ; line_number = 107
238                     ;  or_if rc3_out _ansel 0
239                     ; line_number = 108
240                     ;  or_if an7 _ansel 128
241                     ; line_number = 109
242                     ;  or_if rc3_in _adcon0 0
243                     ; line_number = 110
244                     ;  or_if rc3_out _adcon0 0
245                     ; line_number = 111
246                     ;  or_if an7 _adcon0 1
247                     ; line_number = 112
248                     ; pin rc2_in, rc2_nc, rc2_out, an6
249                     ; line_number = 113
250                     ; pin_bindings pdip=8, soic=8, tssop=8
251                     ; line_number = 114
252                     ;  bind_to _portc@2
253                     ; line_number = 115
254                     ;  or_if rc2_in _trisc 4
255                     ; line_number = 116
256                     ;  or_if rc2_nc _trisc 4
257                     ; line_number = 117
258                     ;  or_if rc2_out _trisc 0
259                     ; line_number = 118
260                     ;  or_if an6 _trisc 4
261                     ; line_number = 119
262                     ;  or_if rc2_in _ansel 0
263                     ; line_number = 120
264                     ;  or_if rc2_out _ansel 0
265                     ; line_number = 121
266                     ;  or_if an6 _ansel 64
267                     ; line_number = 122
268                     ;  or_if rc2_in _adcon0 0
269                     ; line_number = 123
270                     ;  or_if rc2_out _adcon0 0
271                     ; line_number = 124
272                     ;  or_if an6 _adcon0 1
273                     ; line_number = 125
274                     ; pin rc1_in, rc1_nc, rc1_out, an5, c2in_minus
275                     ; line_number = 126
276                     ; pin_bindings pdip=9, soic=9, tssop=9
277                     ; line_number = 127
278                     ;  bind_to _portc@1
279                     ; line_number = 128
280                     ;  or_if rc1_in _trisc 2
281                     ; line_number = 129
282                     ;  or_if rc1_nc _trisc 2
283                     ; line_number = 130
284                     ;  or_if rc1_out _trisc 0
285                     ; line_number = 131
286                     ;  or_if rc1_in _cmcon0 7
287                     ; line_number = 132
288                     ;  or_if rc1_out _cmcon0 7
289                     ; line_number = 133
290                     ;  or_if an5 _trisc 2
291                     ; line_number = 134
292                     ;  or_if rc1_in _ansel 0
293                     ; line_number = 135
294                     ;  or_if rc1_out _ansel 0
295                     ; line_number = 136
296                     ;  or_if an5 _ansel 32
297                     ; line_number = 137
298                     ;  or_if rc1_in _adcon0 0
299                     ; line_number = 138
300                     ;  or_if rc1_out _adcon0 0
301                     ; line_number = 139
302                     ;  or_if an5 _adcon0 1
303                     ; line_number = 140
304                     ; pin rc0_in, rc0_nc, rc0_out, an4, c2in_plus
305                     ; line_number = 141
306                     ; pin_bindings pdip=10, soic=10, tssop=10
307                     ; line_number = 142
308                     ;  bind_to _portc@0
309                     ; line_number = 143
310                     ;  or_if rc0_in _trisc 1
311                     ; line_number = 144
312                     ;  or_if rc0_nc _trisc 1
313                     ; line_number = 145
314                     ;  or_if rc0_out _trisc 0
315                     ; line_number = 146
316                     ;  or_if rc0_in _cmcon0 7
317                     ; line_number = 147
318                     ;  or_if rc0_out _cmcon0 7
319                     ; line_number = 148
320                     ;  or_if an4 _trisc 1
321                     ; line_number = 149
322                     ;  or_if rc0_in _ansel 0
323                     ; line_number = 150
324                     ;  or_if rc0_out _ansel 0
325                     ; line_number = 151
326                     ;  or_if an4 _ansel 16
327                     ; line_number = 152
328                     ;  or_if rc0_in _adcon0 0
329                     ; line_number = 153
330                     ;  or_if rc0_out _adcon0 0
331                     ; line_number = 154
332                     ;  or_if an4 _adcon0 1
333                     ; line_number = 155
334                     ; pin ra2_in, ra2_nc, ra2_out, an2, c1out, t0cki, int
335                     ; line_number = 156
336                     ; pin_bindings pdip=11, soic=11, tssop=11
337                     ; line_number = 157
338                     ;  bind_to _porta@2
339                     ; line_number = 158
340                     ;  or_if ra2_in _trisa 4
341                     ; line_number = 159
342                     ;  or_if ra2_nc _trisa 4
343                     ; line_number = 160
344                     ;  or_if ra2_out _trisa 0
345                     ; line_number = 161
346                     ;  or_if an2 _trisa 4
347                     ; line_number = 162
348                     ;  or_if ra2_in _ansel 0
349                     ; line_number = 163
350                     ;  or_if ra2_out _ansel 0
351                     ; line_number = 164
352                     ;  or_if an2 _ansel 4
353                     ; line_number = 165
354                     ;  or_if ra2_in _adcon0 0
355                     ; line_number = 166
356                     ;  or_if ra2_out _adcon0 0
357                     ; line_number = 167
358                     ;  or_if an2 _adcon0 1
359                     ; line_number = 168
360                     ; pin ra1_in, ra1_nc, ra1_out, an1, c1in_minus, vref, icspclk
361                     ; line_number = 169
362                     ; pin_bindings pdip=12, soic=12, tssop=12
363                     ; line_number = 170
364                     ;  bind_to _porta@1
365                     ; line_number = 171
366                     ;  or_if ra1_in _trisa 2
367                     ; line_number = 172
368                     ;  or_if ra1_nc _trisa 2
369                     ; line_number = 173
370                     ;  or_if ra1_out _trisa 0
371                     ; line_number = 174
372                     ;  or_if ra1_in _cmcon0 7
373                     ; line_number = 175
374                     ;  or_if ra1_out _cmcon0 7
375                     ; line_number = 176
376                     ;  or_if an1 _trisa 2
377                     ; line_number = 177
378                     ;  or_if vref _trisa 2
379                     ; line_number = 178
380                     ;  or_if ra1_in _ansel 0
381                     ; line_number = 179
382                     ;  or_if ra1_out _ansel 0
383                     ; line_number = 180
384                     ;  or_if an1 _ansel 2
385                     ; line_number = 181
386                     ;  or_if vref _ansel 2
387                     ; line_number = 182
388                     ;  or_if ra1_in _adcon0 0
389                     ; line_number = 183
390                     ;  or_if ra1_out _adcon0 0
391                     ; line_number = 184
392                     ;  or_if an1 _adcon0 1		# Turn on _addon
393                     ; line_number = 185
394                     ;  or_if vref _adcon0 1		# Turn on _addon
395                     ; line_number = 186
396                     ;  or_if vref _adcon0 64		# Turn of _vcfg
397                     ; line_number = 187
398                     ; pin ra0_in, ra0_nc, ra0_out, an0, c1in_plus, icspdat, ulpwu
399                     ; line_number = 188
400                     ; pin_bindings pdip=13, soic=13, tssop=13
401                     ; line_number = 189
402                     ;  bind_to _porta@0
403                     ; line_number = 190
404                     ;  or_if ra0_in _trisa 1
405                     ; line_number = 191
406                     ;  or_if ra0_nc _trisa 1
407                     ; line_number = 192
408                     ;  or_if ra0_out _trisa 0
409                     ; line_number = 193
410                     ;  or_if ra0_in _cmcon0 7
411                     ; line_number = 194
412                     ;  or_if ra0_out _cmcon0 7
413                     ; line_number = 195
414                     ;  or_if an0 _trisa 1
415                     ; line_number = 196
416                     ;  or_if ra0_in _ansel 0
417                     ; line_number = 197
418                     ;  or_if ra0_out _ansel 0
419                     ; line_number = 198
420                     ;  or_if an0 _ansel 1
421                     ; line_number = 199
422                     ;  or_if ra0_in _adcon0 0
423                     ; line_number = 200
424                     ;  or_if ra0_out _adcon0 0
425                     ; line_number = 201
426                     ;  or_if an0 _adcon0 1
427                     ; line_number = 202
428                     ; pin vss, ground
429                     ; line_number = 203
430                     ; pin_bindings pdip=14, soic=14, tssop=14
431             
432                     ; line_number = 205
433                     ; library _standard entered
434             
435                     ; # Copyright (c) 2006 by Wayne C. Gramlich
436                     ; # All rights reserved.
437             
438                     ; # Standard definition for uCL:
439             
440                     ; buffer = '_standard'
441                     ; line_number = 8
442                     ; constant _true = (1 = 1)
443  00000001 = _true equ 1
444                     ; line_number = 9
445                     ; constant _false = (0 != 0)
446  00000000 = _false equ 0
447             
448             
449                     ; buffer = '_pic16f688'
450                     ; line_number = 205
451                     ; library _standard exited
452             
453             
454                     ; # Register/bit bindings:
455             
456                     ; # Databank 0 (0x0 - 0x7f):
457             
458                     ; line_number = 216
459                     ; register _indf = 
460  00000000 = _indf equ 0
461             
462                     ; line_number = 218
463                     ; register _tmr0 = 
464  00000001 = _tmr0 equ 1
465             
466                     ; line_number = 220
467                     ; register _pcl = 
468  00000002 = _pcl equ 2
469             
470                     ; line_number = 222
471                     ; register _status = 
472  00000003 = _status equ 3
473                     ; line_number = 223
474                     ; bind _irp = _status@7
475  00000003 = _irp___byte equ _status
476  00000007 = _irp___bit equ 7
477                     ; line_number = 224
478                     ; bind _rp1 = _status@5
479  00000003 = _rp1___byte equ _status
480  00000005 = _rp1___bit equ 5
481                     ; line_number = 225
482                     ; bind _rp0 = _status@5
483  00000003 = _rp0___byte equ _status
484  00000005 = _rp0___bit equ 5
485                     ; line_number = 226
486                     ; bind _to = _status@4
487  00000003 = _to___byte equ _status
488  00000004 = _to___bit equ 4
489                     ; line_number = 227
490                     ; bind _pd = _status@3
491  00000003 = _pd___byte equ _status
492  00000003 = _pd___bit equ 3
493                     ; line_number = 228
494                     ; bind _z = _status@2
495  00000003 = _z___byte equ _status
496  00000002 = _z___bit equ 2
497                     ; line_number = 229
498                     ; bind _dc = _status@1
499  00000003 = _dc___byte equ _status
500  00000001 = _dc___bit equ 1
501                     ; line_number = 230
502                     ; bind _c = _status@0
503  00000003 = _c___byte equ _status
504  00000000 = _c___bit equ 0
505             
506                     ; line_number = 232
507                     ; register _fsr = 
508  00000004 = _fsr equ 4
509             
510                     ; line_number = 234
511                     ; register _porta = 
512  00000005 = _porta equ 5
513                     ; line_number = 235
514                     ; register _ra = 
515  00000005 = _ra equ 5
516                     ; line_number = 236
517                     ; bind _ra5 = _porta@5
518  00000005 = _ra5___byte equ _porta
519  00000005 = _ra5___bit equ 5
520                     ; line_number = 237
521                     ; bind _ra4 = _porta@4
522  00000005 = _ra4___byte equ _porta
523  00000004 = _ra4___bit equ 4
524                     ; line_number = 238
525                     ; bind _ra3 = _porta@3
526  00000005 = _ra3___byte equ _porta
527  00000003 = _ra3___bit equ 3
528                     ; line_number = 239
529                     ; bind _ra2 = _porta@2
530  00000005 = _ra2___byte equ _porta
531  00000002 = _ra2___bit equ 2
532                     ; line_number = 240
533                     ; bind _ra1 = _porta@1
534  00000005 = _ra1___byte equ _porta
535  00000001 = _ra1___bit equ 1
536                     ; line_number = 241
537                     ; bind _ra0 = _porta@0
538  00000005 = _ra0___byte equ _porta
539  00000000 = _ra0___bit equ 0
540             
541                     ; line_number = 243
542                     ; register _portc = 
543  00000007 = _portc equ 7
544                     ; line_number = 244
545                     ; register _rc = 
546  00000007 = _rc equ 7
547                     ; line_number = 245
548                     ; bind _rc5 = _portc@5
549  00000007 = _rc5___byte equ _portc
550  00000005 = _rc5___bit equ 5
551                     ; line_number = 246
552                     ; bind _rc4 = _portc@4
553  00000007 = _rc4___byte equ _portc
554  00000004 = _rc4___bit equ 4
555                     ; line_number = 247
556                     ; bind _rc3 = _portc@3
557  00000007 = _rc3___byte equ _portc
558  00000003 = _rc3___bit equ 3
559                     ; line_number = 248
560                     ; bind _rc2 = _portc@2
561  00000007 = _rc2___byte equ _portc
562  00000002 = _rc2___bit equ 2
563                     ; line_number = 249
564                     ; bind _rc1 = _portc@1
565  00000007 = _rc1___byte equ _portc
566  00000001 = _rc1___bit equ 1
567                     ; line_number = 250
568                     ; bind _rc0 = _portc@0
569  00000007 = _rc0___byte equ _portc
570  00000000 = _rc0___bit equ 0
571             
572                     ; line_number = 252
573                     ; register _pclath = 
574  0000000a = _pclath equ 10
575             
576                     ; line_number = 254
577                     ; register _intcon = 
578  0000000b = _intcon equ 11
579                     ; line_number = 255
580                     ; bind _gie = _intcon@7
581  0000000b = _gie___byte equ _intcon
582  00000007 = _gie___bit equ 7
583                     ; line_number = 256
584                     ; bind _peie = _intcon@6
585  0000000b = _peie___byte equ _intcon
586  00000006 = _peie___bit equ 6
587                     ; line_number = 257
588                     ; bind _t0ie = _intcon@5
589  0000000b = _t0ie___byte equ _intcon
590  00000005 = _t0ie___bit equ 5
591                     ; line_number = 258
592                     ; bind _inte = _intcon@4
593  0000000b = _inte___byte equ _intcon
594  00000004 = _inte___bit equ 4
595                     ; line_number = 259
596                     ; bind _raie = _intcon@3
597  0000000b = _raie___byte equ _intcon
598  00000003 = _raie___bit equ 3
599                     ; line_number = 260
600                     ; bind _t0if = _intcon@2
601  0000000b = _t0if___byte equ _intcon
602  00000002 = _t0if___bit equ 2
603                     ; line_number = 261
604                     ; bind _intf = _intcon@1
605  0000000b = _intf___byte equ _intcon
606  00000001 = _intf___bit equ 1
607                     ; line_number = 262
608                     ; bind _raif = _intcon@0
609  0000000b = _raif___byte equ _intcon
610  00000000 = _raif___bit equ 0
611             
612                     ; line_number = 264
613                     ; register _pir1 = 
614  0000000c = _pir1 equ 12
615                     ; line_number = 265
616                     ; bind _eeif = _pir1@7
617  0000000c = _eeif___byte equ _pir1
618  00000007 = _eeif___bit equ 7
619                     ; line_number = 266
620                     ; bind _adif = _pir1@6
621  0000000c = _adif___byte equ _pir1
622  00000006 = _adif___bit equ 6
623                     ; line_number = 267
624                     ; bind _rcif = _pir1@5
625  0000000c = _rcif___byte equ _pir1
626  00000005 = _rcif___bit equ 5
627                     ; line_number = 268
628                     ; bind _c2if = _pir1@4
629  0000000c = _c2if___byte equ _pir1
630  00000004 = _c2if___bit equ 4
631                     ; line_number = 269
632                     ; bind _c1if = _pir1@3
633  0000000c = _c1if___byte equ _pir1
634  00000003 = _c1if___bit equ 3
635                     ; line_number = 270
636                     ; bind _osfif = _pir1@2
637  0000000c = _osfif___byte equ _pir1
638  00000002 = _osfif___bit equ 2
639                     ; line_number = 271
640                     ; bind _txif = _pir1@1
641  0000000c = _txif___byte equ _pir1
642  00000001 = _txif___bit equ 1
643                     ; line_number = 272
644                     ; bind _tmr1if = _pir1@0
645  0000000c = _tmr1if___byte equ _pir1
646  00000000 = _tmr1if___bit equ 0
647             
648                     ; line_number = 274
649                     ; register _tmr1l = 
650  0000000e = _tmr1l equ 14
651             
652                     ; line_number = 276
653                     ; register _tmr1h = 
654  0000000f = _tmr1h equ 15
655             
656                     ; line_number = 278
657                     ; register _t1con = 
658  00000010 = _t1con equ 16
659                     ; line_number = 279
660                     ; bind t1ginv = _t1con@7
661  00000010 = t1ginv___byte equ _t1con
662  00000007 = t1ginv___bit equ 7
663                     ; line_number = 280
664                     ; bind _tmr1ge = _t1con@6
665  00000010 = _tmr1ge___byte equ _t1con
666  00000006 = _tmr1ge___bit equ 6
667                     ; line_number = 281
668                     ; bind _t1ckps1 = _t1con@5
669  00000010 = _t1ckps1___byte equ _t1con
670  00000005 = _t1ckps1___bit equ 5
671                     ; line_number = 282
672                     ; bind _t1ckps0 = _t1con@4
673  00000010 = _t1ckps0___byte equ _t1con
674  00000004 = _t1ckps0___bit equ 4
675                     ; line_number = 283
676                     ; bind _t1oscen = _t1con@3
677  00000010 = _t1oscen___byte equ _t1con
678  00000003 = _t1oscen___bit equ 3
679                     ; line_number = 284
680                     ; bind _t1sync = _t1con@2
681  00000010 = _t1sync___byte equ _t1con
682  00000002 = _t1sync___bit equ 2
683                     ; line_number = 285
684                     ; bind _tmr1cs = _t1con@1
685  00000010 = _tmr1cs___byte equ _t1con
686  00000001 = _tmr1cs___bit equ 1
687                     ; line_number = 286
688                     ; bind _tmr1on = _t1con@0
689  00000010 = _tmr1on___byte equ _t1con
690  00000000 = _tmr1on___bit equ 0
691             
692                     ; line_number = 288
693                     ; register _baudctl = 
694  00000011 = _baudctl equ 17
695                     ; line_number = 289
696                     ; bind _abdovf = _baudctl@7
697  00000011 = _abdovf___byte equ _baudctl
698  00000007 = _abdovf___bit equ 7
699                     ; line_number = 290
700                     ; bind _rcidl = _baudctl@6
701  00000011 = _rcidl___byte equ _baudctl
702  00000006 = _rcidl___bit equ 6
703                     ; line_number = 291
704                     ; bind _sckp = _baudctl@4
705  00000011 = _sckp___byte equ _baudctl
706  00000004 = _sckp___bit equ 4
707                     ; line_number = 292
708                     ; bind _brg16 = _baudctl@3
709  00000011 = _brg16___byte equ _baudctl
710  00000003 = _brg16___bit equ 3
711                     ; line_number = 293
712                     ; bind _wue = _baudctl@1
713  00000011 = _wue___byte equ _baudctl
714  00000001 = _wue___bit equ 1
715                     ; line_number = 294
716                     ; bind _abden = _baudctl@0
717  00000011 = _abden___byte equ _baudctl
718  00000000 = _abden___bit equ 0
719             
720                     ; line_number = 296
721                     ; register _spbrgh = 
722  00000012 = _spbrgh equ 18
723             
724                     ; line_number = 298
725                     ; register _spbrg = 
726  00000013 = _spbrg equ 19
727             
728                     ; line_number = 300
729                     ; register _rcreg = 
730  00000014 = _rcreg equ 20
731             
732                     ; line_number = 302
733                     ; register _txreg = 
734  00000015 = _txreg equ 21
735             
736                     ; line_number = 304
737                     ; register _txsta = 
738  00000016 = _txsta equ 22
739                     ; line_number = 305
740                     ; bind _csrc = _txsta@7
741  00000016 = _csrc___byte equ _txsta
742  00000007 = _csrc___bit equ 7
743                     ; line_number = 306
744                     ; bind _tx9 = _txsta@6
745  00000016 = _tx9___byte equ _txsta
746  00000006 = _tx9___bit equ 6
747                     ; line_number = 307
748                     ; bind _txen = _txsta@5
749  00000016 = _txen___byte equ _txsta
750  00000005 = _txen___bit equ 5
751                     ; line_number = 308
752                     ; bind _sync = _txsta@4
753  00000016 = _sync___byte equ _txsta
754  00000004 = _sync___bit equ 4
755                     ; line_number = 309
756                     ; bind _sendb = _txsta@3
757  00000016 = _sendb___byte equ _txsta
758  00000003 = _sendb___bit equ 3
759                     ; line_number = 310
760                     ; bind _brgh = _txsta@2
761  00000016 = _brgh___byte equ _txsta
762  00000002 = _brgh___bit equ 2
763                     ; line_number = 311
764                     ; bind _trmt = _txsta@1
765  00000016 = _trmt___byte equ _txsta
766  00000001 = _trmt___bit equ 1
767                     ; line_number = 312
768                     ; bind _tx9d = _txsta@0
769  00000016 = _tx9d___byte equ _txsta
770  00000000 = _tx9d___bit equ 0
771             
772                     ; line_number = 314
773                     ; register _rcsta = 
774  00000017 = _rcsta equ 23
775                     ; line_number = 315
776                     ; bind _spen = _rcsta@7
777  00000017 = _spen___byte equ _rcsta
778  00000007 = _spen___bit equ 7
779                     ; line_number = 316
780                     ; bind _rx9 = _rcsta@6
781  00000017 = _rx9___byte equ _rcsta
782  00000006 = _rx9___bit equ 6
783                     ; line_number = 317
784                     ; bind _sren = _rcsta@5
785  00000017 = _sren___byte equ _rcsta
786  00000005 = _sren___bit equ 5
787                     ; line_number = 318
788                     ; bind _cren = _rcsta@4
789  00000017 = _cren___byte equ _rcsta
790  00000004 = _cren___bit equ 4
791                     ; line_number = 319
792                     ; bind _adden = _rcsta@3
793  00000017 = _adden___byte equ _rcsta
794  00000003 = _adden___bit equ 3
795                     ; line_number = 320
796                     ; bind _ferr = _rcsta@2
797  00000017 = _ferr___byte equ _rcsta
798  00000002 = _ferr___bit equ 2
799                     ; line_number = 321
800                     ; bind _oerr = _rcsta@1
801  00000017 = _oerr___byte equ _rcsta
802  00000001 = _oerr___bit equ 1
803                     ; line_number = 322
804                     ; bind _rx9d = _rcsta@0
805  00000017 = _rx9d___byte equ _rcsta
806  00000000 = _rx9d___bit equ 0
807             
808                     ; line_number = 324
809                     ; register _wdtcon = 
810  00000018 = _wdtcon equ 24
811                     ; line_number = 325
812                     ; bind _wdtps3 = _wdtcon@4
813  00000018 = _wdtps3___byte equ _wdtcon
814  00000004 = _wdtps3___bit equ 4
815                     ; line_number = 326
816                     ; bind _wdtps2 = _wdtcon@3
817  00000018 = _wdtps2___byte equ _wdtcon
818  00000003 = _wdtps2___bit equ 3
819                     ; line_number = 327
820                     ; bind _wdtps1 = _wdtcon@2
821  00000018 = _wdtps1___byte equ _wdtcon
822  00000002 = _wdtps1___bit equ 2
823                     ; line_number = 328
824                     ; bind _wdtps0 = _wdtcon@1
825  00000018 = _wdtps0___byte equ _wdtcon
826  00000001 = _wdtps0___bit equ 1
827                     ; line_number = 329
828                     ; bind _swdten = _wdtcon@0
829  00000018 = _swdten___byte equ _wdtcon
830  00000000 = _swdten___bit equ 0
831             
832                     ; line_number = 331
833                     ; register _cmcon0 = 
834  00000019 = _cmcon0 equ 25
835                     ; line_number = 332
836                     ; bind _c1out = _cmcon0@7
837  00000019 = _c1out___byte equ _cmcon0
838  00000007 = _c1out___bit equ 7
839                     ; line_number = 333
840                     ; bind _c2out = _cmcon0@6
841  00000019 = _c2out___byte equ _cmcon0
842  00000006 = _c2out___bit equ 6
843                     ; line_number = 334
844                     ; bind _c1inv = _cmcon0@5
845  00000019 = _c1inv___byte equ _cmcon0
846  00000005 = _c1inv___bit equ 5
847                     ; line_number = 335
848                     ; bind _c2inv = _cmcon0@4
849  00000019 = _c2inv___byte equ _cmcon0
850  00000004 = _c2inv___bit equ 4
851                     ; line_number = 336
852                     ; bind _cis = _cmcon0@3
853  00000019 = _cis___byte equ _cmcon0
854  00000003 = _cis___bit equ 3
855                     ; line_number = 337
856                     ; bind _cm2 = _cmcon0@2
857  00000019 = _cm2___byte equ _cmcon0
858  00000002 = _cm2___bit equ 2
859                     ; line_number = 338
860                     ; bind _cm1 = _cmcon0@1
861  00000019 = _cm1___byte equ _cmcon0
862  00000001 = _cm1___bit equ 1
863                     ; line_number = 339
864                     ; bind _cm0 = _cmcon0@0
865  00000019 = _cm0___byte equ _cmcon0
866  00000000 = _cm0___bit equ 0
867             
868                     ; line_number = 341
869                     ; register _cmcon1 = 
870  0000001a = _cmcon1 equ 26
871                     ; line_number = 342
872                     ; bind _t1gss = _cmcon1@0
873  0000001a = _t1gss___byte equ _cmcon1
874  00000000 = _t1gss___bit equ 0
875                     ; line_number = 343
876                     ; bind _c2sync = _cmcon1@1
877  0000001a = _c2sync___byte equ _cmcon1
878  00000001 = _c2sync___bit equ 1
879             
880                     ; line_number = 345
881                     ; register _adresh = 
882  0000001e = _adresh equ 30
883             
884                     ; line_number = 347
885                     ; register _adcon0 = 
886  0000001f = _adcon0 equ 31
887                     ; line_number = 348
888                     ; bind _adfm = _adcon0@7
889  0000001f = _adfm___byte equ _adcon0
890  00000007 = _adfm___bit equ 7
891                     ; line_number = 349
892                     ; bind _vcfg = _adcon0@6
893  0000001f = _vcfg___byte equ _adcon0
894  00000006 = _vcfg___bit equ 6
895                     ; line_number = 350
896                     ; bind _chs2 = _adcon0@4
897  0000001f = _chs2___byte equ _adcon0
898  00000004 = _chs2___bit equ 4
899                     ; line_number = 351
900                     ; bind _chs1 = _adcon0@3
901  0000001f = _chs1___byte equ _adcon0
902  00000003 = _chs1___bit equ 3
903                     ; line_number = 352
904                     ; bind _chs0 = _adcon0@2
905  0000001f = _chs0___byte equ _adcon0
906  00000002 = _chs0___bit equ 2
907                     ; line_number = 353
908                     ; bind _go = _adcon0@1
909  0000001f = _go___byte equ _adcon0
910  00000001 = _go___bit equ 1
911                     ; line_number = 354
912                     ; bind _adon = _adcon0@0
913  0000001f = _adon___byte equ _adcon0
914  00000000 = _adon___bit equ 0
915             
916                     ; # Data bank 1 (0x80-0xff):
917             
918                     ; line_number = 358
919                     ; register _option_reg = 
920  00000081 = _option_reg equ 129
921                     ; line_number = 359
922                     ; bind _rapu = _option_reg@7
923  00000081 = _rapu___byte equ _option_reg
924  00000007 = _rapu___bit equ 7
925                     ; line_number = 360
926                     ; bind _intedg = _option_reg@6
927  00000081 = _intedg___byte equ _option_reg
928  00000006 = _intedg___bit equ 6
929                     ; line_number = 361
930                     ; bind _t0cs = _option_reg@5
931  00000081 = _t0cs___byte equ _option_reg
932  00000005 = _t0cs___bit equ 5
933                     ; line_number = 362
934                     ; bind _t0se = _option_reg@4
935  00000081 = _t0se___byte equ _option_reg
936  00000004 = _t0se___bit equ 4
937                     ; line_number = 363
938                     ; bind _psa = _option_reg@3
939  00000081 = _psa___byte equ _option_reg
940  00000003 = _psa___bit equ 3
941                     ; line_number = 364
942                     ; bind _ps2 = _option_reg@2
943  00000081 = _ps2___byte equ _option_reg
944  00000002 = _ps2___bit equ 2
945                     ; line_number = 365
946                     ; bind _ps1 = _option_reg@1
947  00000081 = _ps1___byte equ _option_reg
948  00000001 = _ps1___bit equ 1
949                     ; line_number = 366
950                     ; bind _ps0 = _option_reg@0
951  00000081 = _ps0___byte equ _option_reg
952  00000000 = _ps0___bit equ 0
953             
954                     ; line_number = 368
955                     ; register _trisa = 
956  00000085 = _trisa equ 133
957                     ; line_number = 369
958                     ; bind _trisa5 = _trisa@5
959  00000085 = _trisa5___byte equ _trisa
960  00000005 = _trisa5___bit equ 5
961                     ; line_number = 370
962                     ; bind _trisa4 = _trisa@4
963  00000085 = _trisa4___byte equ _trisa
964  00000004 = _trisa4___bit equ 4
965                     ; line_number = 371
966                     ; bind _trisa3 = _trisa@3
967  00000085 = _trisa3___byte equ _trisa
968  00000003 = _trisa3___bit equ 3
969                     ; line_number = 372
970                     ; bind _trisa2 = _trisa@2
971  00000085 = _trisa2___byte equ _trisa
972  00000002 = _trisa2___bit equ 2
973                     ; line_number = 373
974                     ; bind _trisa1 = _trisa@1
975  00000085 = _trisa1___byte equ _trisa
976  00000001 = _trisa1___bit equ 1
977                     ; line_number = 374
978                     ; bind _trisa0 = _trisa@0
979  00000085 = _trisa0___byte equ _trisa
980  00000000 = _trisa0___bit equ 0
981             
982                     ; line_number = 376
983                     ; register _trisc = 
984  00000087 = _trisc equ 135
985                     ; line_number = 377
986                     ; bind _trisc5 = _trisc@5
987  00000087 = _trisc5___byte equ _trisc
988  00000005 = _trisc5___bit equ 5
989                     ; line_number = 378
990                     ; bind _trisc4 = _trisc@4
991  00000087 = _trisc4___byte equ _trisc
992  00000004 = _trisc4___bit equ 4
993                     ; line_number = 379
994                     ; bind _trisc3 = _trisc@3
995  00000087 = _trisc3___byte equ _trisc
996  00000003 = _trisc3___bit equ 3
997                     ; line_number = 380
998                     ; bind _trisc2 = _trisc@2
999  00000087 = _trisc2___byte equ _trisc
1000 00000002 = _trisc2___bit equ 2
1001                    ; line_number = 381
1002                    ; bind _trisc1 = _trisc@1
1003 00000087 = _trisc1___byte equ _trisc
1004 00000001 = _trisc1___bit equ 1
1005                    ; line_number = 382
1006                    ; bind _trisc0 = _trisc@0
1007 00000087 = _trisc0___byte equ _trisc
1008 00000000 = _trisc0___bit equ 0
1009            
1010                    ; line_number = 384
1011                    ; register _pie1 = 
1012 0000008c = _pie1 equ 140
1013                    ; line_number = 385
1014                    ; bind _eeie = _pie1@7
1015 0000008c = _eeie___byte equ _pie1
1016 00000007 = _eeie___bit equ 7
1017                    ; line_number = 386
1018                    ; bind _adie = _pie1@6
1019 0000008c = _adie___byte equ _pie1
1020 00000006 = _adie___bit equ 6
1021                    ; line_number = 387
1022                    ; bind _rcie = _pie1@5
1023 0000008c = _rcie___byte equ _pie1
1024 00000005 = _rcie___bit equ 5
1025                    ; line_number = 388
1026                    ; bind _c2ie = _pie1@4
1027 0000008c = _c2ie___byte equ _pie1
1028 00000004 = _c2ie___bit equ 4
1029                    ; line_number = 389
1030                    ; bind _c1ie = _pie1@3
1031 0000008c = _c1ie___byte equ _pie1
1032 00000003 = _c1ie___bit equ 3
1033                    ; line_number = 390
1034                    ; bind _osfie = _pie1@2
1035 0000008c = _osfie___byte equ _pie1
1036 00000002 = _osfie___bit equ 2
1037                    ; line_number = 391
1038                    ; bind _txie = _pie1@1
1039 0000008c = _txie___byte equ _pie1
1040 00000001 = _txie___bit equ 1
1041                    ; line_number = 392
1042                    ; bind _tmr1ie = _pie1@0
1043 0000008c = _tmr1ie___byte equ _pie1
1044 00000000 = _tmr1ie___bit equ 0
1045            
1046                    ; line_number = 394
1047                    ; register _pcon = 
1048 0000008e = _pcon equ 142
1049                    ; line_number = 395
1050                    ; bind _ulpwue = _pcon@5
1051 0000008e = _ulpwue___byte equ _pcon
1052 00000005 = _ulpwue___bit equ 5
1053                    ; line_number = 396
1054                    ; bind _sboden = _pcon@4
1055 0000008e = _sboden___byte equ _pcon
1056 00000004 = _sboden___bit equ 4
1057                    ; line_number = 397
1058                    ; bind _por = _pcon@1
1059 0000008e = _por___byte equ _pcon
1060 00000001 = _por___bit equ 1
1061                    ; line_number = 398
1062                    ; bind _bod = _pcon@0
1063 0000008e = _bod___byte equ _pcon
1064 00000000 = _bod___bit equ 0
1065            
1066                    ; line_number = 400
1067                    ; register _osccon = 
1068 0000008f = _osccon equ 143
1069                    ; line_number = 401
1070                    ; bind _ircf2 = _osccon@6
1071 0000008f = _ircf2___byte equ _osccon
1072 00000006 = _ircf2___bit equ 6
1073                    ; line_number = 402
1074                    ; bind _ircf1 = _osccon@5
1075 0000008f = _ircf1___byte equ _osccon
1076 00000005 = _ircf1___bit equ 5
1077                    ; line_number = 403
1078                    ; bind _ircf0 = _osccon@4
1079 0000008f = _ircf0___byte equ _osccon
1080 00000004 = _ircf0___bit equ 4
1081                    ; line_number = 404
1082                    ; bind _osts = _osccon@3
1083 0000008f = _osts___byte equ _osccon
1084 00000003 = _osts___bit equ 3
1085                    ; line_number = 405
1086                    ; bind _hts = _osccon@2
1087 0000008f = _hts___byte equ _osccon
1088 00000002 = _hts___bit equ 2
1089                    ; line_number = 406
1090                    ; bind _lts = _osccon@3
1091 0000008f = _lts___byte equ _osccon
1092 00000003 = _lts___bit equ 3
1093                    ; line_number = 407
1094                    ; bind _scs = _osccon@2
1095 0000008f = _scs___byte equ _osccon
1096 00000002 = _scs___bit equ 2
1097            
1098                    ; line_number = 409
1099                    ; register _osctune = 
1100 00000090 = _osctune equ 144
1101                    ; line_number = 410
1102                    ; bind _tun4 = _osctune@4
1103 00000090 = _tun4___byte equ _osctune
1104 00000004 = _tun4___bit equ 4
1105                    ; line_number = 411
1106                    ; bind _tun3 = _osctune@3
1107 00000090 = _tun3___byte equ _osctune
1108 00000003 = _tun3___bit equ 3
1109                    ; line_number = 412
1110                    ; bind _tun2 = _osctune@2
1111 00000090 = _tun2___byte equ _osctune
1112 00000002 = _tun2___bit equ 2
1113                    ; line_number = 413
1114                    ; bind _tun1 = _osctune@1
1115 00000090 = _tun1___byte equ _osctune
1116 00000001 = _tun1___bit equ 1
1117                    ; line_number = 414
1118                    ; bind _tun0 = _osctune@0
1119 00000090 = _tun0___byte equ _osctune
1120 00000000 = _tun0___bit equ 0
1121                    ; line_number = 415
1122                    ; constant _osccal_lsb = 1
1123 00000001 = _osccal_lsb equ 1
1124            
1125                    ; line_number = 417
1126                    ; register _ansel = 
1127 00000091 = _ansel equ 145
1128                    ; line_number = 418
1129                    ; bind _ans7 = _ansel@7
1130 00000091 = _ans7___byte equ _ansel
1131 00000007 = _ans7___bit equ 7
1132                    ; line_number = 419
1133                    ; bind _ans6 = _ansel@6
1134 00000091 = _ans6___byte equ _ansel
1135 00000006 = _ans6___bit equ 6
1136                    ; line_number = 420
1137                    ; bind _ans5 = _ansel@5
1138 00000091 = _ans5___byte equ _ansel
1139 00000005 = _ans5___bit equ 5
1140                    ; line_number = 421
1141                    ; bind _ans4 = _ansel@4
1142 00000091 = _ans4___byte equ _ansel
1143 00000004 = _ans4___bit equ 4
1144                    ; line_number = 422
1145                    ; bind _ans3 = _ansel@3
1146 00000091 = _ans3___byte equ _ansel
1147 00000003 = _ans3___bit equ 3
1148                    ; line_number = 423
1149                    ; bind _ans2 = _ansel@2
1150 00000091 = _ans2___byte equ _ansel
1151 00000002 = _ans2___bit equ 2
1152                    ; line_number = 424
1153                    ; bind _ans1 = _ansel@1
1154 00000091 = _ans1___byte equ _ansel
1155 00000001 = _ans1___bit equ 1
1156                    ; line_number = 425
1157                    ; bind _ans0 = _ansel@0
1158 00000091 = _ans0___byte equ _ansel
1159 00000000 = _ans0___bit equ 0
1160            
1161                    ; line_number = 427
1162                    ; register _wpua = 
1163 00000095 = _wpua equ 149
1164                    ; line_number = 428
1165                    ; bind _wpua5 = _wpua@5
1166 00000095 = _wpua5___byte equ _wpua
1167 00000005 = _wpua5___bit equ 5
1168                    ; line_number = 429
1169                    ; bind _wpua4 = _wpua@4
1170 00000095 = _wpua4___byte equ _wpua
1171 00000004 = _wpua4___bit equ 4
1172                    ; line_number = 430
1173                    ; bind _wpua2 = _wpua@2
1174 00000095 = _wpua2___byte equ _wpua
1175 00000002 = _wpua2___bit equ 2
1176                    ; line_number = 431
1177                    ; bind _wpua1 = _wpua@1
1178 00000095 = _wpua1___byte equ _wpua
1179 00000001 = _wpua1___bit equ 1
1180                    ; line_number = 432
1181                    ; bind _wpua0 = _wpua@0
1182 00000095 = _wpua0___byte equ _wpua
1183 00000000 = _wpua0___bit equ 0
1184            
1185                    ; line_number = 434
1186                    ; register _ioca = 
1187 00000096 = _ioca equ 150
1188                    ; line_number = 435
1189                    ; bind _ioca5 = _ioca@5
1190 00000096 = _ioca5___byte equ _ioca
1191 00000005 = _ioca5___bit equ 5
1192                    ; line_number = 436
1193                    ; bind _ioca4 = _ioca@4
1194 00000096 = _ioca4___byte equ _ioca
1195 00000004 = _ioca4___bit equ 4
1196                    ; line_number = 437
1197                    ; bind _ioca3 = _ioca@3
1198 00000096 = _ioca3___byte equ _ioca
1199 00000003 = _ioca3___bit equ 3
1200                    ; line_number = 438
1201                    ; bind _ioca2 = _ioca@2
1202 00000096 = _ioca2___byte equ _ioca
1203 00000002 = _ioca2___bit equ 2
1204                    ; line_number = 439
1205                    ; bind _ioca1 = _ioca@1
1206 00000096 = _ioca1___byte equ _ioca
1207 00000001 = _ioca1___bit equ 1
1208                    ; line_number = 440
1209                    ; bind _ioca0 = _ioca@0
1210 00000096 = _ioca0___byte equ _ioca
1211 00000000 = _ioca0___bit equ 0
1212            
1213                    ; line_number = 442
1214                    ; register _eedath = 
1215 00000097 = _eedath equ 151
1216            
1217                    ; line_number = 444
1218                    ; register _eeadrh = 
1219 00000098 = _eeadrh equ 152
1220            
1221                    ; line_number = 446
1222                    ; register _vrcon = 
1223 00000099 = _vrcon equ 153
1224                    ; line_number = 447
1225                    ; bind _vren = _vrcon@7
1226 00000099 = _vren___byte equ _vrcon
1227 00000007 = _vren___bit equ 7
1228                    ; line_number = 448
1229                    ; bind _vrr = _vrcon@5
1230 00000099 = _vrr___byte equ _vrcon
1231 00000005 = _vrr___bit equ 5
1232                    ; line_number = 449
1233                    ; bind _vr3 = _vrcon@3
1234 00000099 = _vr3___byte equ _vrcon
1235 00000003 = _vr3___bit equ 3
1236                    ; line_number = 450
1237                    ; bind _vr2 = _vrcon@2
1238 00000099 = _vr2___byte equ _vrcon
1239 00000002 = _vr2___bit equ 2
1240                    ; line_number = 451
1241                    ; bind _vr1 = _vrcon@1
1242 00000099 = _vr1___byte equ _vrcon
1243 00000001 = _vr1___bit equ 1
1244                    ; line_number = 452
1245                    ; bind _vr0 = _vrcon@0
1246 00000099 = _vr0___byte equ _vrcon
1247 00000000 = _vr0___bit equ 0
1248            
1249                    ; line_number = 454
1250                    ; register _eedat = 
1251 0000009a = _eedat equ 154
1252                    ; line_number = 455
1253                    ; bind _eedat7 = _eedat@7
1254 0000009a = _eedat7___byte equ _eedat
1255 00000007 = _eedat7___bit equ 7
1256                    ; line_number = 456
1257                    ; bind _eedat6 = _eedat@6
1258 0000009a = _eedat6___byte equ _eedat
1259 00000006 = _eedat6___bit equ 6
1260                    ; line_number = 457
1261                    ; bind _eedat5 = _eedat@5
1262 0000009a = _eedat5___byte equ _eedat
1263 00000005 = _eedat5___bit equ 5
1264                    ; line_number = 458
1265                    ; bind _eedat4 = _eedat@4
1266 0000009a = _eedat4___byte equ _eedat
1267 00000004 = _eedat4___bit equ 4
1268                    ; line_number = 459
1269                    ; bind _eedat3 = _eedat@3
1270 0000009a = _eedat3___byte equ _eedat
1271 00000003 = _eedat3___bit equ 3
1272                    ; line_number = 460
1273                    ; bind _eedat2 = _eedat@2
1274 0000009a = _eedat2___byte equ _eedat
1275 00000002 = _eedat2___bit equ 2
1276                    ; line_number = 461
1277                    ; bind _eedat1 = _eedat@1
1278 0000009a = _eedat1___byte equ _eedat
1279 00000001 = _eedat1___bit equ 1
1280                    ; line_number = 462
1281                    ; bind _eedat0 = _eedat@0
1282 0000009a = _eedat0___byte equ _eedat
1283 00000000 = _eedat0___bit equ 0
1284            
1285                    ; line_number = 464
1286                    ; register _eeadr = 
1287 0000009b = _eeadr equ 155
1288                    ; line_number = 465
1289                    ; bind _eeadr7 = _eeadr@7
1290 0000009b = _eeadr7___byte equ _eeadr
1291 00000007 = _eeadr7___bit equ 7
1292                    ; line_number = 466
1293                    ; bind _eeadr6 = _eeadr@6
1294 0000009b = _eeadr6___byte equ _eeadr
1295 00000006 = _eeadr6___bit equ 6
1296                    ; line_number = 467
1297                    ; bind _eeadr5 = _eeadr@5
1298 0000009b = _eeadr5___byte equ _eeadr
1299 00000005 = _eeadr5___bit equ 5
1300                    ; line_number = 468
1301                    ; bind _eeadr4 = _eeadr@4
1302 0000009b = _eeadr4___byte equ _eeadr
1303 00000004 = _eeadr4___bit equ 4
1304                    ; line_number = 469
1305                    ; bind _eeadr3 = _eeadr@3
1306 0000009b = _eeadr3___byte equ _eeadr
1307 00000003 = _eeadr3___bit equ 3
1308                    ; line_number = 470
1309                    ; bind _eeadr2 = _eeadr@2
1310 0000009b = _eeadr2___byte equ _eeadr
1311 00000002 = _eeadr2___bit equ 2
1312                    ; line_number = 471
1313                    ; bind _eeadr1 = _eeadr@1
1314 0000009b = _eeadr1___byte equ _eeadr
1315 00000001 = _eeadr1___bit equ 1
1316                    ; line_number = 472
1317                    ; bind _eeadr0 = _eeadr@0
1318 0000009b = _eeadr0___byte equ _eeadr
1319 00000000 = _eeadr0___bit equ 0
1320            
1321                    ; line_number = 474
1322                    ; register _eecon1 = 
1323 0000009c = _eecon1 equ 156
1324                    ; line_number = 475
1325                    ; bind _eepgd = _eecon1@7
1326 0000009c = _eepgd___byte equ _eecon1
1327 00000007 = _eepgd___bit equ 7
1328                    ; line_number = 476
1329                    ; bind _wrerr = _eecon1@3
1330 0000009c = _wrerr___byte equ _eecon1
1331 00000003 = _wrerr___bit equ 3
1332                    ; line_number = 477
1333                    ; bind _wren = _eecon1@2
1334 0000009c = _wren___byte equ _eecon1
1335 00000002 = _wren___bit equ 2
1336                    ; line_number = 478
1337                    ; bind _wr = _eecon1@1
1338 0000009c = _wr___byte equ _eecon1
1339 00000001 = _wr___bit equ 1
1340                    ; line_number = 479
1341                    ; bind _rd = _eecon1@0
1342 0000009c = _rd___byte equ _eecon1
1343 00000000 = _rd___bit equ 0
1344            
1345                    ; line_number = 481
1346                    ; register _eecon2 = 
1347 0000009d = _eecon2 equ 157
1348            
1349                    ; line_number = 483
1350                    ; register _adresl = 
1351 0000009e = _adresl equ 158
1352            
1353                    ; line_number = 485
1354                    ; register _adcon1 = 
1355 0000009f = _adcon1 equ 159
1356                    ; line_number = 486
1357                    ; bind _adcs2 = _adcon1@6
1358 0000009f = _adcs2___byte equ _adcon1
1359 00000006 = _adcs2___bit equ 6
1360                    ; line_number = 487
1361                    ; bind _adcs1 = _adcon1@5
1362 0000009f = _adcs1___byte equ _adcon1
1363 00000005 = _adcs1___bit equ 5
1364                    ; line_number = 488
1365                    ; bind _adcs0 = _adcon1@4
1366 0000009f = _adcs0___byte equ _adcon1
1367 00000004 = _adcs0___bit equ 4
1368            
1369                    ; # Data Bank 2 (0x100 - 0x17f):
1370            
1371                    ; buffer = 'sonar2'
1372                    ; line_number = 7
1373                    ; library _pic16f688 exited
1374            
1375                    ; # The system is running at 20MHz:
1376                    ; line_number = 10
1377                    ; library clock20mhz entered
1378                    ; # Copyright (c) 2004 by Wayne C. Gramlich
1379                    ; # All rights reserved.
1380            
1381                    ; # This library defines the contstants {clock_rate}, {instruction_rate},
1382                    ; # and {clocks_per_instruction}.
1383            
1384                    ; # Define processor constants:
1385                    ; buffer = 'clock20mhz'
1386                    ; line_number = 9
1387                    ; constant clock_rate = 20000000
1388 01312d00 = clock_rate equ 20000000
1389                    ; line_number = 10
1390                    ; constant clocks_per_instruction = 4
1391 00000004 = clocks_per_instruction equ 4
1392                    ; line_number = 11
1393                    ; constant instruction_rate = clock_rate / clocks_per_instruction
1394 004c4b40 = instruction_rate equ 5000000
1395            
1396            
1397                    ; buffer = 'sonar2'
1398                    ; line_number = 10
1399                    ; library clock20mhz exited
1400                    ; # A microsecond takes 4 cycles at 20MHz:
1401                    ; line_number = 12
1402                    ; constant microsecond = 5
1403 00000005 = microsecond equ 5
1404            
1405                    ; # The {_eusart} library defines some baud rate generator constants:
1406                    ; line_number = 15
1407                    ; constant _eusart_clock = clock_rate
1408 01312d00 = _eusart_clock equ 20000000
1409                    ; line_number = 16
1410                    ; constant _eusart_factor = 4
1411 00000004 = _eusart_factor equ 4
1412                    ; line_number = 17
1413                    ; library _eusart entered
1414            
1415                    ; # Copyright (c) 2005 by Wayne C. Gramlich
1416                    ; # All rights reserved.
1417            
1418                    ; # This library contains a bunch of definitions for the Enhanced Universal
1419                    ; # Asynchronous Serial Receiver/Transmitter (EUSART) that is available
1420                    ; # on many of the PIC microcontrollers.
1421            
1422                    ; # In order to use this module you have to get two constants defined
1423                    ; # BEFORE including this library -- {_eusart_factor} and {_eusart_clock}.
1424                    ; # {_eusart_clock} should be set to the frequency oscillator for the chip.
1425                    ; # {_eusart_factor} should be set to 4, 16, or 64 depending upon whether
1426                    ; # the {_brg16} and {_brgh} bits are set.  Use the table below to select:
1427                    ; #
1428                    ; #        _{brg16}	{_brgh}		_{eusart_factor}
1429                    ; #	    0		   0		      64
1430                    ; #	    0		   1		      16
1431                    ; #	    1		   0		      16
1432                    ; #	    1		   1		       4
1433            
1434                    ; # 2400 baud:
1435                    ; buffer = '_eusart'
1436                    ; line_number = 23
1437                    ; constant _eusart_2400 = (_eusart_clock / (2400 * _eusart_factor)) - 1
1438 00000822 = _eusart_2400 equ 2082
1439                    ; line_number = 24
1440                    ; constant _eusart_2400_low = _eusart_2400 & 0xff
1441 00000022 = _eusart_2400_low equ 34
1442                    ; line_number = 25
1443                    ; constant _eusart_2400_high = _eusart_2400 >> 8
1444 00000008 = _eusart_2400_high equ 8
1445                    ; line_number = 26
1446                    ; constant _eusart_2400_index = 0
1447 00000000 = _eusart_2400_index equ 0
1448                    ; # 4800 baud:
1449                    ; line_number = 28
1450                    ; constant _eusart_4800 = (_eusart_clock / (4800 * _eusart_factor)) - 1
1451 00000410 = _eusart_4800 equ 1040
1452                    ; line_number = 29
1453                    ; constant _eusart_4800_low = _eusart_4800 & 0xff
1454 00000010 = _eusart_4800_low equ 16
1455                    ; line_number = 30
1456                    ; constant _eusart_4800_high = _eusart_4800 >> 8
1457 00000004 = _eusart_4800_high equ 4
1458                    ; line_number = 31
1459                    ; constant _eusart_4800_index = 1
1460 00000001 = _eusart_4800_index equ 1
1461                    ; # 9600 baud:
1462                    ; line_number = 33
1463                    ; constant _eusart_9600 = (_eusart_clock / (9600 * _eusart_factor)) - 1
1464 00000207 = _eusart_9600 equ 519
1465                    ; line_number = 34
1466                    ; constant _eusart_9600_low = _eusart_9600 & 0xff
1467 00000007 = _eusart_9600_low equ 7
1468                    ; line_number = 35
1469                    ; constant _eusart_9600_high = _eusart_9600 >> 8
1470 00000002 = _eusart_9600_high equ 2
1471                    ; line_number = 36
1472                    ; constant _eusart_9600_index = 2
1473 00000002 = _eusart_9600_index equ 2
1474                    ; # 19200 baud:
1475                    ; line_number = 38
1476                    ; constant _eusart_19200 = (_eusart_clock / (19200 * _eusart_factor)) - 1
1477 00000103 = _eusart_19200 equ 259
1478                    ; line_number = 39
1479                    ; constant _eusart_19200_low = _eusart_19200 & 0xff
1480 00000003 = _eusart_19200_low equ 3
1481                    ; line_number = 40
1482                    ; constant _eusart_19200_high = _eusart_19200 >> 8
1483 00000001 = _eusart_19200_high equ 1
1484                    ; line_number = 41
1485                    ; constant _eusart_19200_index = 3
1486 00000003 = _eusart_19200_index equ 3
1487                    ; # 38400 baud:
1488                    ; line_number = 43
1489                    ; constant _eusart_38400 = (_eusart_clock / (38400 * _eusart_factor)) - 1
1490 00000081 = _eusart_38400 equ 129
1491                    ; line_number = 44
1492                    ; constant _eusart_38400_low = _eusart_38400 & 0xff
1493 00000081 = _eusart_38400_low equ 129
1494                    ; line_number = 45
1495                    ; constant _eusart_38400_high = _eusart_38400 >> 8
1496 00000000 = _eusart_38400_high equ 0
1497                    ; line_number = 46
1498                    ; constant _eusart_38400_index = 4
1499 00000004 = _eusart_38400_index equ 4
1500                    ; # 57600 baud:
1501                    ; line_number = 48
1502                    ; constant _eusart_57600 = (_eusart_clock / (57600 * _eusart_factor)) - 1
1503 00000055 = _eusart_57600 equ 85
1504                    ; line_number = 49
1505                    ; constant _eusart_57600_low = _eusart_57600 & 0xff
1506 00000055 = _eusart_57600_low equ 85
1507                    ; line_number = 50
1508                    ; constant _eusart_57600_high = _eusart_57600 >> 8
1509 00000000 = _eusart_57600_high equ 0
1510                    ; line_number = 51
1511                    ; constant _eusart_57600_index = 5
1512 00000005 = _eusart_57600_index equ 5
1513                    ; # 115200 baud:
1514                    ; line_number = 53
1515                    ; constant _eusart_115200 = (_eusart_clock / (115200 * _eusart_factor)) - 1
1516 0000002a = _eusart_115200 equ 42
1517                    ; line_number = 54
1518                    ; constant _eusart_115200_low = _eusart_115200 & 0xff
1519 0000002a = _eusart_115200_low equ 42
1520                    ; line_number = 55
1521                    ; constant _eusart_115200_high = _eusart_115200 >> 8
1522 00000000 = _eusart_115200_high equ 0
1523                    ; line_number = 56
1524                    ; constant _eusart_115200_index = 6
1525 00000006 = _eusart_115200_index equ 6
1526                    ; # 203400 baud:
1527                    ; line_number = 58
1528                    ; constant _eusart_230400 = (_eusart_clock / (230400 * _eusart_factor)) - 1
1529 00000014 = _eusart_230400 equ 20
1530                    ; line_number = 59
1531                    ; constant _eusart_230400_low = _eusart_230400 & 0xff
1532 00000014 = _eusart_230400_low equ 20
1533                    ; line_number = 60
1534                    ; constant _eusart_230400_high = _eusart_230400 >> 8
1535 00000000 = _eusart_230400_high equ 0
1536                    ; line_number = 61
1537                    ; constant _eusart_230400_index = 7
1538 00000007 = _eusart_230400_index equ 7
1539                    ; # 406800 baud:
1540                    ; line_number = 63
1541                    ; constant _eusart_406800 = (_eusart_clock / (406800 * _eusart_factor)) - 1
1542 0000000b = _eusart_406800 equ 11
1543                    ; line_number = 64
1544                    ; constant _eusart_406800_low = _eusart_406800 & 0xff
1545 0000000b = _eusart_406800_low equ 11
1546                    ; line_number = 65
1547                    ; constant _eusart_406800_high = _eusart_406800 >> 8
1548 00000000 = _eusart_406800_high equ 0
1549                    ; line_number = 66
1550                    ; constant _eusart_406800_index = 8
1551 00000008 = _eusart_406800_index equ 8
1552                    ; # 500000 baud:
1553                    ; line_number = 68
1554                    ; constant _eusart_500000 = (_eusart_clock / (500000 * _eusart_factor)) - 1
1555 00000009 = _eusart_500000 equ 9
1556                    ; line_number = 69
1557                    ; constant _eusart_500000_low = _eusart_500000 & 0xff
1558 00000009 = _eusart_500000_low equ 9
1559                    ; line_number = 70
1560                    ; constant _eusart_500000_high = _eusart_500000 >> 8
1561 00000000 = _eusart_500000_high equ 0
1562                    ; line_number = 71
1563                    ; constant _eusart_500000_index = 8
1564 00000008 = _eusart_500000_index equ 8
1565                    ; # 62500 baud:
1566                    ; line_number = 73
1567                    ; constant _eusart_625000 = (_eusart_clock / (625000 * _eusart_factor)) - 1
1568 00000007 = _eusart_625000 equ 7
1569                    ; line_number = 74
1570                    ; constant _eusart_625000_low = _eusart_625000 & 0xff
1571 00000007 = _eusart_625000_low equ 7
1572                    ; line_number = 75
1573                    ; constant _eusart_625000_high = _eusart_625000 >> 8
1574 00000000 = _eusart_625000_high equ 0
1575                    ; line_number = 76
1576                    ; constant _eusart_625000_index = 9
1577 00000009 = _eusart_625000_index equ 9
1578                    ; # 833333 baud:
1579                    ; line_number = 78
1580                    ; constant _eusart_833333 = (_eusart_clock / (833333 * _eusart_factor)) - 1
1581 00000005 = _eusart_833333 equ 5
1582                    ; line_number = 79
1583                    ; constant _eusart_833333_low = _eusart_833333 & 0xff
1584 00000005 = _eusart_833333_low equ 5
1585                    ; line_number = 80
1586                    ; constant _eusart_833333_high = _eusart_833333 >> 8
1587 00000000 = _eusart_833333_high equ 0
1588                    ; line_number = 81
1589                    ; constant _eusart_833333_index = 10
1590 0000000a = _eusart_833333_index equ 10
1591                    ; # 1000000 baud (1MHz):
1592                    ; line_number = 83
1593                    ; constant _eusart_1000000 = (_eusart_clock / (1000000 * _eusart_factor)) - 1
1594 00000004 = _eusart_1000000 equ 4
1595                    ; line_number = 84
1596                    ; constant _eusart_1000000_low = _eusart_1000000 & 0xff
1597 00000004 = _eusart_1000000_low equ 4
1598                    ; line_number = 85
1599                    ; constant _eusart_1000000_high = _eusart_1000000 >> 8
1600 00000000 = _eusart_1000000_high equ 0
1601                    ; line_number = 86
1602                    ; constant _eusart_1000000_index = 11
1603 0000000b = _eusart_1000000_index equ 11
1604            
1605                    ; buffer = 'sonar2'
1606                    ; line_number = 17
1607                    ; library _eusart exited
1608            
1609                    ; # The library of bus access routines for use by a PIC16F688.
1610                    ; line_number = 20
1611                    ; library rb2bus_pic16f688 entered
1612            
1613                    ; # Copyright (c) 2006 by Wayne C. Gramlich
1614                    ; # All rights reserved.
1615            
1616                    ; # This module provides some procedures for accessing a RoboBricks2
1617                    ; # bus via a UART.  It is speicialized for the PIC16F688.
1618                    ; #
1619                    ; # It defines the following procedure:
1620                    ; #
1621                    ; # {rb2bus_initialize}({address}) The procedure that initializes the UART
1622                    ; #                                for bus access.
1623            
1624                    ; # All other bus access procedures are defined in the {rb2bus} library
1625                    ; # which is accessed below:
1626                    ; buffer = 'rb2bus_pic16f688'
1627                    ; line_number = 16
1628                    ; library rb2bus entered
1629            
1630                    ; # Copyright (c) 2006-2007 by Wayne C. Gramlich
1631                    ; # All rights reserved.
1632            
1633                    ; # This module provides some procedures for accessing a RoboBricks2
1634                    ; # bus via a UART.
1635                    ; #
1636                    ; # This procedure defines the following procedures:
1637                    ; #
1638                    ; # {rb2bus_select_wait}  This procedure waits for the module to become selected
1639                    ; # {rb2bus_deselect}     This procedure causes this module to be deselected.
1640                    ; # {rb2bus_byte_get}     This procedure will get a byte form the bus.
1641                    ; # {rb2bus_byte_put}     This procedure will send a byte to the bus.
1642                    ; #
1643                    ; # The global variable {rb2bus_error} is set to 1 whenever the procedures
1644                    ; # feel like there is a command decoding error.
1645                    ; #
1646                    ; # The way to use these procedures is quite as follows:
1647                    ; #
1648                    ; #    # Comamnd byte variable:
1649                    ; #    local command byte
1650                    ; #
1651                    ; #    # Other initialize code goes here:
1652                    ; #
1653                    ; #    # Process commands from bus master:
1654                    ; #    loop_forever
1655                    ; #        rb2bus_error := _true
1656                    ; #	 while rb2bus_error
1657                    ; #	     call rb2bus_select_wait()
1658                    ; #	     command := rb2bus_byte_get()
1659                    ; #
1660                    ; #        # Decode command:
1661                    ; #	 switch command >> 6
1662                    ; #	   ...
1663                    ; #             case 5:
1664                    ; #	        # 0000 0101 (Foo command):
1665                    ; #	          if !rb2bus_error
1666                    ; #		      # Do foo command:
1667                    ; #
1668                    ; # The key concept behind these procedures is to make command
1669                    ; # decoding for the slave module easy.  If the slave module
1670                    ; # is in the middle of command decoding and the master suddenly
1671                    ; # sends out a module select command, we need to gracefully recover
1672                    ; # from the problem.  A command should only be executed if
1673                    ; # {rb2bus_error} is not set.  If {rb2bus_error} is set, we want
1674                    ; # to gracefully get back to the beginning of the loop without
1675                    ; # doing any damage.  Once {rb2bus_error} is set, all calls to
1676                    ; # {rb2bus_byte_get} return 0 and all calls to {rb2bus_byte_put}
1677                    ; # do nothing.  At the beginning of the loop, {rb2bus_error} is
1678                    ; # cleared by the {rb2bus_select_wait}() procedure and we have
1679                    ; # recovered from the situation.
1680            
1681                    ; buffer = 'rb2bus'
1682                    ; line_number = 54
1683                    ; library rb2_constants entered
1684            
1685                    ; # Copyright (c) 2006-2007 by Wayne C. Gramlich.
1686                    ; # All rights reserved.
1687            
1688                    ; buffer = 'rb2_constants'
1689                    ; line_number = 6
1690                    ; constant rb2_ok = 0xa5
1691 000000a5 = rb2_ok equ 165
1692            
1693                    ; line_number = 8
1694                    ; constant rb2_common_address_set = 0xfc
1695 000000fc = rb2_common_address_set equ 252
1696                    ; line_number = 9
1697                    ; constant rb2_common_id_next = 0xfd
1698 000000fd = rb2_common_id_next equ 253
1699                    ; line_number = 10
1700                    ; constant rb2_common_id_start = 0xfe
1701 000000fe = rb2_common_id_start equ 254
1702                    ; line_number = 11
1703                    ; constant rb2_common_deselect = 0xff
1704 000000ff = rb2_common_deselect equ 255
1705            
1706                    ; line_number = 13
1707                    ; constant rb2_laser1_address = 1
1708 00000001 = rb2_laser1_address equ 1
1709            
1710                    ; line_number = 15
1711                    ; constant rb2_minimotor2_address = 2
1712 00000002 = rb2_minimotor2_address equ 2
1713                    ; line_number = 16
1714                    ; constant rb2_midimotor2_address = 3
1715 00000003 = rb2_midimotor2_address equ 3
1716                    ; line_number = 17
1717                    ; constant rb2_motor0_speed_get = 0
1718 00000000 = rb2_motor0_speed_get equ 0
1719                    ; line_number = 18
1720                    ; constant rb2_motor0_speed_set = 1
1721 00000001 = rb2_motor0_speed_set equ 1
1722                    ; line_number = 19
1723                    ; constant rb2_motor1_speed_get = 2
1724 00000002 = rb2_motor1_speed_get equ 2
1725                    ; line_number = 20
1726                    ; constant rb2_motor1_speed_set = 3
1727 00000003 = rb2_motor1_speed_set equ 3
1728                    ; line_number = 21
1729                    ; constant rb2_duty_cycle_get = 4
1730 00000004 = rb2_duty_cycle_get equ 4
1731                    ; line_number = 22
1732                    ; constant rb2_duty_cycle_set = 8
1733 00000008 = rb2_duty_cycle_set equ 8
1734            
1735                    ; line_number = 24
1736                    ; constant rb2_irdistance2_address = 4
1737 00000004 = rb2_irdistance2_address equ 4
1738                    ; line_number = 25
1739                    ; constant rb2_irdistance2_raw0_get = 0
1740 00000000 = rb2_irdistance2_raw0_get equ 0
1741                    ; line_number = 26
1742                    ; constant rb2_irdistance2_raw1_get = 1
1743 00000001 = rb2_irdistance2_raw1_get equ 1
1744                    ; line_number = 27
1745                    ; constant rb2_irdistance2_smooth0_get = 2
1746 00000002 = rb2_irdistance2_smooth0_get equ 2
1747                    ; line_number = 28
1748                    ; constant rb2_irdistance2_smooth1_get = 3
1749 00000003 = rb2_irdistance2_smooth1_get equ 3
1750                    ; line_number = 29
1751                    ; constant rb2_irdistance2_linear0_get = 4
1752 00000004 = rb2_irdistance2_linear0_get equ 4
1753                    ; line_number = 30
1754                    ; constant rb2_irdistance2_linear1_get = 6
1755 00000006 = rb2_irdistance2_linear1_get equ 6
1756            
1757                    ; line_number = 32
1758                    ; constant rb2_shaft2_address = 5
1759 00000005 = rb2_shaft2_address equ 5
1760                    ; line_number = 33
1761                    ; constant rb2_shaft2_count_latch = 0
1762 00000000 = rb2_shaft2_count_latch equ 0
1763                    ; line_number = 34
1764                    ; constant rb2_shaft2_count_clear = 1
1765 00000001 = rb2_shaft2_count_clear equ 1
1766                    ; line_number = 35
1767                    ; constant rb2_shaft2_shaft0_high_get = 2
1768 00000002 = rb2_shaft2_shaft0_high_get equ 2
1769                    ; line_number = 36
1770                    ; constant rb2_shaft2_shaft1_high_get = 3
1771 00000003 = rb2_shaft2_shaft1_high_get equ 3
1772                    ; line_number = 37
1773                    ; constant rb2_shaft2_continue_get = 4
1774 00000004 = rb2_shaft2_continue_get equ 4
1775                    ; line_number = 38
1776                    ; constant rb2_shaft2_shaft0_low_get = rb2_shaft2_continue_get
1777 00000004 = rb2_shaft2_shaft0_low_get equ 4
1778                    ; line_number = 39
1779                    ; constant rb2_shaft2_shaft1_low_get = rb2_shaft2_continue_get
1780 00000004 = rb2_shaft2_shaft1_low_get equ 4
1781                    ; line_number = 40
1782                    ; constant rb2_shaft2_x_get = 0x10
1783 00000010 = rb2_shaft2_x_get equ 16
1784                    ; line_number = 41
1785                    ; constant rb2_shaft2_y_get = 0x11
1786 00000011 = rb2_shaft2_y_get equ 17
1787                    ; line_number = 42
1788                    ; constant rb2_shaft2_bearing16_get = 0x12
1789 00000012 = rb2_shaft2_bearing16_get equ 18
1790                    ; line_number = 43
1791                    ; constant rb2_shaft2_bearing8_get = 0x13
1792 00000013 = rb2_shaft2_bearing8_get equ 19
1793                    ; line_number = 44
1794                    ; constant rb2_shaft2_target_x_get = 0x14
1795 00000014 = rb2_shaft2_target_x_get equ 20
1796                    ; line_number = 45
1797                    ; constant rb2_shaft2_target_y_get = 0x15
1798 00000015 = rb2_shaft2_target_y_get equ 21
1799                    ; line_number = 46
1800                    ; constant rb2_shaft2_target_bearing16_get = 0x16
1801 00000016 = rb2_shaft2_target_bearing16_get equ 22
1802                    ; line_number = 47
1803                    ; constant rb2_shaft2_target_bearing8_get = 0x17
1804 00000017 = rb2_shaft2_target_bearing8_get equ 23
1805                    ; line_number = 48
1806                    ; constant rb2_shaft2_target_distance_get = 0x18
1807 00000018 = rb2_shaft2_target_distance_get equ 24
1808                    ; line_number = 49
1809                    ; constant rb2_shaft2_wheel_spacing_get = 0x19
1810 00000019 = rb2_shaft2_wheel_spacing_get equ 25
1811                    ; line_number = 50
1812                    ; constant rb2_shaft2_wheel_ticks_get = 0x1a
1813 0000001a = rb2_shaft2_wheel_ticks_get equ 26
1814                    ; line_number = 51
1815                    ; constant rb2_shaft2_wheel_diameter_get = 0x1b
1816 0000001b = rb2_shaft2_wheel_diameter_get equ 27
1817                    ; line_number = 52
1818                    ; constant rb2_shaft2_x_set = 0x20
1819 00000020 = rb2_shaft2_x_set equ 32
1820                    ; line_number = 53
1821                    ; constant rb2_shaft2_y_set = 0x21
1822 00000021 = rb2_shaft2_y_set equ 33
1823                    ; line_number = 54
1824                    ; constant rb2_shaft2_bearing16_set = 0x22
1825 00000022 = rb2_shaft2_bearing16_set equ 34
1826                    ; line_number = 55
1827                    ; constant rb2_shaft2_navigation_latch = 0x23
1828 00000023 = rb2_shaft2_navigation_latch equ 35
1829                    ; line_number = 56
1830                    ; constant rb2_shaft2_target_x_set = 0x24
1831 00000024 = rb2_shaft2_target_x_set equ 36
1832                    ; line_number = 57
1833                    ; constant rb2_shaft2_target_y_set = 0x25
1834 00000025 = rb2_shaft2_target_y_set equ 37
1835                    ; line_number = 58
1836                    ; constant rb2_shaft2_wheel_spacing_set = 0x29
1837 00000029 = rb2_shaft2_wheel_spacing_set equ 41
1838                    ; line_number = 59
1839                    ; constant rb2_shaft2_wheel_ticks_set = 0x2a
1840 0000002a = rb2_shaft2_wheel_ticks_set equ 42
1841                    ; line_number = 60
1842                    ; constant rb2_shaft2_wheel_diameter_set = 0x2b
1843 0000002b = rb2_shaft2_wheel_diameter_set equ 43
1844            
1845            
1846                    ; line_number = 63
1847                    ; constant rb2_orient5_address = 6
1848 00000006 = rb2_orient5_address equ 6
1849            
1850                    ; line_number = 65
1851                    ; constant rb2_compass8_address = 7
1852 00000007 = rb2_compass8_address equ 7
1853            
1854                    ; line_number = 67
1855                    ; constant rb2_io8_address = 8
1856 00000008 = rb2_io8_address equ 8
1857                    ; line_number = 68
1858                    ; constant rb2_io8_digital8_get = 0
1859 00000000 = rb2_io8_digital8_get equ 0
1860                    ; line_number = 69
1861                    ; constant rb2_io8_digital8_set = 1
1862 00000001 = rb2_io8_digital8_set equ 1
1863                    ; line_number = 70
1864                    ; constant rb2_io8_direction_get = 2
1865 00000002 = rb2_io8_direction_get equ 2
1866                    ; line_number = 71
1867                    ; constant rb2_io8_direction_set = 3
1868 00000003 = rb2_io8_direction_set equ 3
1869                    ; line_number = 72
1870                    ; constant rb2_io8_analog_mask_get = 4
1871 00000004 = rb2_io8_analog_mask_get equ 4
1872                    ; line_number = 73
1873                    ; constant rb2_io8_analog_mask_set = 5
1874 00000005 = rb2_io8_analog_mask_set equ 5
1875                    ; line_number = 74
1876                    ; constant rb2_io8_analog8_get = 0x10
1877 00000010 = rb2_io8_analog8_get equ 16
1878                    ; line_number = 75
1879                    ; constant rb2_io8_analog10_get = 0x18
1880 00000018 = rb2_io8_analog10_get equ 24
1881                    ; line_number = 76
1882                    ; constant rb2_low_set = 0x20
1883 00000020 = rb2_low_set equ 32
1884                    ; line_number = 77
1885                    ; constant rb2_high_set = 0x30
1886 00000030 = rb2_high_set equ 48
1887            
1888                    ; line_number = 79
1889                    ; constant rb2_sonar2_address = 9
1890 00000009 = rb2_sonar2_address equ 9
1891            
1892                    ; line_number = 81
1893                    ; constant rb2_voice1_address = 10
1894 0000000a = rb2_voice1_address equ 10
1895            
1896                    ; line_number = 83
1897                    ; constant rb2_servo4_address = 11
1898 0000000b = rb2_servo4_address equ 11
1899                    ; line_number = 84
1900                    ; constant rb2_servo4_servo0 = 0
1901 00000000 = rb2_servo4_servo0 equ 0
1902                    ; line_number = 85
1903                    ; constant rb2_servo4_servo1 = 1
1904 00000001 = rb2_servo4_servo1 equ 1
1905                    ; line_number = 86
1906                    ; constant rb2_servo4_servo2 = 2
1907 00000002 = rb2_servo4_servo2 equ 2
1908                    ; line_number = 87
1909                    ; constant rb2_servo4_servo3 = 3
1910 00000003 = rb2_servo4_servo3 equ 3
1911                    ; line_number = 88
1912                    ; constant rb2_servo4_quick_set = 0
1913 00000000 = rb2_servo4_quick_set equ 0
1914                    ; line_number = 89
1915                    ; constant rb2_servo4_quick_low = 0
1916 00000000 = rb2_servo4_quick_low equ 0
1917                    ; line_number = 90
1918                    ; constant rb2_servo4_quick_center = 40
1919 00000028 = rb2_servo4_quick_center equ 40
1920                    ; line_number = 91
1921                    ; constant rb2_servo4_quick_high = 0x7c
1922 0000007c = rb2_servo4_quick_high equ 124
1923                    ; line_number = 92
1924                    ; constant rb2_servo4_high_low_set = 0x80
1925 00000080 = rb2_servo4_high_low_set equ 128
1926                    ; line_number = 93
1927                    ; constant rb2_servo4_short_high_low_set = 0x84
1928 00000084 = rb2_servo4_short_high_low_set equ 132
1929                    ; line_number = 94
1930                    ; constant rb2_servo4_high_set = 0x88
1931 00000088 = rb2_servo4_high_set equ 136
1932                    ; line_number = 95
1933                    ; constant rb2_servo4_low_set = 0x8c
1934 0000008c = rb2_servo4_low_set equ 140
1935                    ; line_number = 96
1936                    ; constant rb2_servo4_enables_set = 0x90
1937 00000090 = rb2_servo4_enables_set equ 144
1938                    ; line_number = 97
1939                    ; constant rb2_servo4_enable0 = 1
1940 00000001 = rb2_servo4_enable0 equ 1
1941                    ; line_number = 98
1942                    ; constant rb2_servo4_enable1 = 2
1943 00000002 = rb2_servo4_enable1 equ 2
1944                    ; line_number = 99
1945                    ; constant rb2_servo4_enable2 = 4
1946 00000004 = rb2_servo4_enable2 equ 4
1947                    ; line_number = 100
1948                    ; constant rb2_servo4_enable3 = 8
1949 00000008 = rb2_servo4_enable3 equ 8
1950                    ; line_number = 101
1951                    ; constant rb2_servo4_enable_all = 0xf
1952 0000000f = rb2_servo4_enable_all equ 15
1953                    ; line_number = 102
1954                    ; constant rb2_servo4_enable_none = 0
1955 00000000 = rb2_servo4_enable_none equ 0
1956                    ; line_number = 103
1957                    ; constant rb2_servo4_high_get = 0xa0
1958 000000a0 = rb2_servo4_high_get equ 160
1959                    ; line_number = 104
1960                    ; constant rb2_servo4_low_get = 0xa4
1961 000000a4 = rb2_servo4_low_get equ 164
1962                    ; line_number = 105
1963                    ; constant rb2_servo4_enables_get = 0xa8
1964 000000a8 = rb2_servo4_enables_get equ 168
1965            
1966                    ; line_number = 107
1967                    ; constant rb2_controller28_address = 28
1968 0000001c = rb2_controller28_address equ 28
1969            
1970                    ; line_number = 109
1971                    ; constant rb2_lcd32_address = 32
1972 00000020 = rb2_lcd32_address equ 32
1973                    ; line_number = 110
1974                    ; constant rb2_lcd32_new_line = 0xa
1975 0000000a = rb2_lcd32_new_line equ 10
1976                    ; line_number = 111
1977                    ; constant rb2_lcd32_form_feed = 0xc
1978 0000000c = rb2_lcd32_form_feed equ 12
1979                    ; line_number = 112
1980                    ; constant rb2_lcd32_carriage_return = 0xd
1981 0000000d = rb2_lcd32_carriage_return equ 13
1982                    ; line_number = 113
1983                    ; constant rb2_lcd32_column_set = 0x20
1984 00000020 = rb2_lcd32_column_set equ 32
1985            
1986            
1987                    ; buffer = 'rb2bus'
1988                    ; line_number = 54
1989                    ; library rb2_constants exited
1990                    ; line_number = 55
1991                    ; library rb2bus_globals entered
1992            
1993                    ; # Copyright (c) 2006-2007 by Wayne C. Gramlich
1994                    ; # All rights reserved.
1995            
1996                    ; # These are the global variables used by both the {rb2bus} and
1997                    ; # the various {rb2bus_picXXXX} libraries.  Poll based firmware
1998                    ; # uses both libraries, whereas interrupt driven software only
1999                    ; # uses the {rb2bus_picXXX} libraries.
2000            
2001                    ; buffer = 'rb2bus_globals'
2002                    ; line_number = 11
2003                    ; global rb2bus_selected bit	# 
2004 0000006f = rb2bus_selected___byte equ globals___0+79
2005 00000000 = rb2bus_selected___bit equ 0
2006                    ; line_number = 12
2007                    ; global rb2bus_error bit		# Global error bit
2008 0000006f = rb2bus_error___byte equ globals___0+79
2009 00000001 = rb2bus_error___bit equ 1
2010                    ; line_number = 13
2011                    ; global rb2bus_address byte	# Bus address to respond to
2012 00000020 = rb2bus_address equ globals___0
2013                    ; line_number = 14
2014                    ; global rb2bus_index byte	# Index into id information
2015 00000021 = rb2bus_index equ globals___0+1
2016            
2017            
2018                    ; buffer = 'rb2bus'
2019                    ; line_number = 55
2020                    ; library rb2bus_globals exited
2021            
2022                    ; Delaying code generation for procedure  rb2bus_select_wait
2023                    ; Delaying code generation for procedure  rb2bus_deselect
2024                    ; Delaying code generation for procedure  rb2bus_byte_get
2025                    ; Delaying code generation for procedure  rb2bus_byte_put
2026                    ; Delaying code generation for procedure  rb2bus_command
2027            
2028                    ; buffer = 'rb2bus_pic16f688'
2029                    ; line_number = 16
2030                    ; library rb2bus exited
2031            
2032                    ; Delaying code generation for procedure  rb2bus_initialize
2033                    ; line_number = 62
2034                    ; constant rb2bus_eedata_address = 0xfe
2035 000000fe = rb2bus_eedata_address equ 254
2036            
2037                    ; Delaying code generation for procedure  rb2bus_eedata_read
2038                    ; Delaying code generation for procedure  rb2bus_eedata_write
2039            
2040                    ; buffer = 'sonar2'
2041                    ; line_number = 20
2042                    ; library rb2bus_pic16f688 exited
2043            
2044                    ; # This module uses 20MHz crystal oscillator; hence mode EC=External Clock:
2045            
2046                    ; # All pins on this package are used except RA3.
2047                    ; line_number = 26
2048                    ; package pdip
2049                    ; line_number = 27
2050                    ; pin 1 = power_supply
2051                    ; line_number = 28
2052                    ;  pin 2 = osc1
2053                    ; line_number = 29
2054                    ;  pin 3 = osc2
2055                    ; line_number = 30
2056                    ;  pin 4 = ra3_nc
2057                    ; line_number = 31
2058                    ;  pin 5 = rx, name = rx, bit = rx_bit
2059 00000007 = rx___byte equ _portc
2060 00000005 = rx___bit equ 5
2061 00000005 = rx_bit equ 5
2062                    ; line_number = 32
2063                    ;  pin 6 = tx, name = tx, bit = tx_bit
2064 00000007 = tx___byte equ _portc
2065 00000004 = tx___bit equ 4
2066 00000004 = tx_bit equ 4
2067                    ; line_number = 33
2068                    ;  pin 7 = rc3_nc
2069                    ; line_number = 34
2070                    ;  pin 8 = rc2_nc
2071                    ; line_number = 35
2072                    ;  pin 9 = rc1_out, name = trigger1
2073 00000007 = trigger1___byte equ _portc
2074 00000001 = trigger1___bit equ 1
2075                    ; line_number = 36
2076                    ;  pin 10 = rc0_in, name = response0
2077 00000007 = response0___byte equ _portc
2078 00000000 = response0___bit equ 0
2079                    ; line_number = 37
2080                    ;  pin 11 = ra2_nc
2081                    ; line_number = 38
2082                    ;  pin 12 = ra1_in, name = response1
2083 00000005 = response1___byte equ _porta
2084 00000001 = response1___bit equ 1
2085                    ; line_number = 39
2086                    ;  pin 13 = ra0_out, name = trigger0
2087 00000005 = trigger0___byte equ _porta
2088 00000000 = trigger0___bit equ 0
2089                    ; line_number = 40
2090                    ;  pin 14 = ground
2091            
2092                    ; line_number = 42
2093                    ; origin 0
2094   0000 :           org     0
2095            
2096                    ; line_number = 44
2097                    ;info   44, 0
2098                    ; procedure main
2099   0000 :   main:
2100                    ; Initialize some registers
2101 0000 019f          clrf    _adcon0
2102 0001 1683          bsf     __rp0___byte, __rp0___bit
2103 0002 0191          clrf    _ansel
2104 0003 3007          movlw   7
2105 0004 1283          bcf     __rp0___byte, __rp0___bit
2106 0005 0099          movwf   _cmcon0
2107 0006 303e          movlw   62
2108 0007 1683          bsf     __rp0___byte, __rp0___bit
2109 0008 0085          movwf   _trisa
2110 0009 303d          movlw   61
2111 000a 0087          movwf   _trisc
2112                    ; arguments_none
2113                    ; line_number = 46
2114                    ;  returns_nothing
2115            
2116                    ; # This procedure initializes everything and does command decoding.
2117            
2118                    ; line_number = 50
2119                    ;  local command byte
2120 0000002c = main__command equ globals___0+12
2121                    ; line_number = 51
2122                    ;  local count byte
2123 0000002d = main__count equ globals___0+13
2124                    ; line_number = 52
2125                    ;  local result byte
2126 0000002e = main__result equ globals___0+14
2127            
2128                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>01 code:XX=cc=>XX)
2129                    ; line_number = 54
2130                    ;  call rb2bus_initialize(9)
2131                    ;info   54, 11
2132 000b 3009          movlw   9
2133 000c 1283          bcf     __rp0___byte, __rp0___bit
2134 000d 21c9          call    rb2bus_initialize
2135                    ; line_number = 55
2136                    ;  count := 1
2137                    ;info   55, 14
2138 000e 3001          movlw   1
2139 000f 00ad          movwf   main__count
2140            
2141                    ; line_number = 57
2142                    ;  loop_forever start
2143   0010 :   main__1:
2144                    ; # Make sure that we have been selected:
2145                    ; line_number = 59
2146                    ;  rb2bus_error := _true
2147                    ;info   59, 16
2148 0010 14ef          bsf     rb2bus_error___byte, rb2bus_error___bit
2149                    ; line_number = 60
2150                    ;  while rb2bus_error start
2151   0011 :   main__2:
2152                    ;info   60, 17
2153                    ; =>bit_code_emit@symbol(): sym=rb2bus_error
2154                    ; No 1TEST: true.size=4 false.size=0
2155                    ; No 2TEST: true.size=4 false.size=0
2156                    ; 1GOTO: Single test with GOTO
2157 0011 1cef          btfss   rb2bus_error___byte, rb2bus_error___bit
2158 0012 2817          goto    main__3
2159                    ; line_number = 61
2160                    ; call rb2bus_select_wait()
2161                    ;info   61, 19
2162 0013 212c          call    rb2bus_select_wait
2163                    ; line_number = 62
2164                    ;  command := rb2bus_byte_get()
2165                    ;info   62, 20
2166 0014 214b          call    rb2bus_byte_get
2167 0015 00ac          movwf   main__command
2168 0016 2811          goto    main__2
2169                    ; Recombine size1 = 0 || size2 = 0
2170   0017 :   main__3:
2171                    ; line_number = 60
2172                    ;  while rb2bus_error done
2173                    ; line_number = 63
2174                    ; switch command >> 6 start
2175                    ;info   63, 23
2176                    ; switch_before:(data:00=uu=>00 code:XX=cc=>XX) size=7
2177 0017 3000          movlw   main__74>>8
2178 0018 008a          movwf   __pclath
2179 0000002f = main__75 equ globals___0+15
2180 0019 0e2c          swapf   main__command,w
2181 001a 00af          movwf   main__75
2182 001b 0caf          rrf     main__75,f
2183 001c 0c2f          rrf     main__75,w
2184 001d 3903          andlw   3
2185                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
2186 001e 3e20          addlw   main__74
2187 001f 0082          movwf   __pcl
2188                    ; page_group 4
2189   0020 :   main__74:
2190 0020 2824          goto    main__72
2191 0021 290e          goto    main__76
2192 0022 290e          goto    main__76
2193 0023 28fb          goto    main__73
2194                    ; line_number = 64
2195                    ; case 0
2196   0024 :   main__72:
2197                    ; # 00xx xxxx:
2198                    ; line_number = 66
2199                    ;  switch (command >> 3) & 7 start
2200                    ;info   66, 36
2201                    ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
2202                    ; line_number = 67
2203                    ; case_maximum 7
2204 0024 3000          movlw   main__65>>8
2205 0025 008a          movwf   __pclath
2206 0000002f = main__66 equ globals___0+15
2207 0026 0c2c          rrf     main__command,w
2208 0027 00af          movwf   main__66
2209 0028 0caf          rrf     main__66,f
2210 0029 0c2f          rrf     main__66,w
2211 002a 3907          andlw   7
2212                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
2213 002b 3e2d          addlw   main__65
2214 002c 0082          movwf   __pcl
2215                    ; page_group 8
2216   002d :   main__65:
2217 002d 2835          goto    main__62
2218 002e 28b4          goto    main__63
2219 002f 28f6          goto    main__64
2220 0030 28f6          goto    main__64
2221 0031 28fa          goto    main__67
2222 0032 28fa          goto    main__67
2223 0033 28fa          goto    main__67
2224 0034 28fa          goto    main__67
2225                    ; line_number = 68
2226                    ; case 0
2227   0035 :   main__62:
2228                    ; # 0000 0xxx:
2229                    ; line_number = 70
2230                    ;  switch command & 7 start
2231                    ;info   70, 53
2232                    ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
2233                    ; line_number = 71
2234                    ; case_maximum 7
2235 0035 3000          movlw   main__43>>8
2236 0036 008a          movwf   __pclath
2237 0037 3007          movlw   7
2238 0038 052c          andwf   main__command,w
2239                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
2240 0039 3e3b          addlw   main__43
2241 003a 0082          movwf   __pcl
2242                    ; page_group 8
2243   003b :   main__43:
2244 003b 2843          goto    main__38
2245 003c 285b          goto    main__39
2246 003d 2873          goto    main__40
2247 003e 2888          goto    main__41
2248 003f 289d          goto    main__42
2249 0040 289d          goto    main__42
2250 0041 289d          goto    main__42
2251 0042 289d          goto    main__42
2252                    ; line_number = 72
2253                    ; case 0
2254   0043 :   main__38:
2255                    ; # 0000 0000:
2256            
2257                    ; # Trigger the sonar:
2258                    ; line_number = 76
2259                    ;  delay 10 * microsecond start
2260                    ;info   76, 67
2261                    ; Delay expression evaluates to 50
2262                    ; line_number = 77
2263                    ; trigger0 := _true
2264                    ; Delay at assignment is 0
2265                    ;info   77, 67
2266 0043 1405          bsf     trigger0___byte, trigger0___bit
2267                    ; line_number = 78
2268                    ;  _t1con := 0
2269                    ; Delay at assignment is 1
2270                    ;info   78, 68
2271 0044 0190          clrf    _t1con
2272                    ; line_number = 79
2273                    ;  _tmr1l := 0
2274                    ; Delay at assignment is 2
2275                    ;info   79, 69
2276 0045 018e          clrf    _tmr1l
2277                    ; line_number = 80
2278                    ;  _tmr1h := 0
2279                    ; Delay at assignment is 3
2280                    ;info   80, 70
2281 0046 018f          clrf    _tmr1h
2282            
2283                    ; Delay 46 cycles
2284                    ; Delay loop takes 11 * 4 = 44 cycles
2285 0047 300b          movlw   11
2286   0048 :   main__4:
2287 0048 3eff          addlw   255
2288 0049 1d03          btfss   __z___byte, __z___bit
2289 004a 2848          goto    main__4
2290 004b 284c          goto    main__5
2291   004c :   main__5:
2292                    ; line_number = 76
2293                    ;  delay 10 * microsecond done
2294                    ; # We wait for the trigger pulse to go low
2295                    ; line_number = 83
2296                    ;  while response0 start
2297   004c :   main__6:
2298                    ;info   83, 76
2299                    ; =>bit_code_emit@symbol(): sym=response0
2300                    ; No 1TEST: true.size=2 false.size=0
2301                    ; No 2TEST: true.size=2 false.size=0
2302                    ; 1GOTO: Single test with GOTO
2303 004c 1c07          btfss   response0___byte, response0___bit
2304 004d 2850          goto    main__7
2305                    ; line_number = 84
2306                    ; trigger0 := _false
2307                    ;info   84, 78
2308 004e 1005          bcf     trigger0___byte, trigger0___bit
2309            
2310 004f 284c          goto    main__6
2311                    ; Recombine size1 = 0 || size2 = 0
2312   0050 :   main__7:
2313                    ; line_number = 83
2314                    ;  while response0 done
2315                    ; # Wait for pulse to start:
2316                    ; line_number = 87
2317                    ;  while !response0 start
2318   0050 :   main__8:
2319                    ;info   87, 80
2320                    ; =>bit_code_emit@symbol(): sym=response0
2321                    ; 1TEST: Single test with code in skip slot
2322 0050 1c07          btfss   response0___byte, response0___bit
2323                    ; line_number = 88
2324                    ; do_nothing
2325                    ;info   88, 81
2326            
2327 0051 2850          goto    main__8
2328                    ; Recombine size1 = 0 || size2 = 0
2329                    ; line_number = 87
2330                    ;  while !response0 done
2331                    ; # Wait for pulse to end:
2332                    ; line_number = 91
2333                    ;  _tmr1on := _true
2334                    ;info   91, 82
2335 0052 1410          bsf     _tmr1on___byte, _tmr1on___bit
2336                    ; line_number = 92
2337                    ;  while response0 start
2338   0053 :   main__9:
2339                    ;info   92, 83
2340                    ; =>bit_code_emit@symbol(): sym=response0
2341                    ; 1TEST: Single test with code in skip slot
2342 0053 1807          btfsc   response0___byte, response0___bit
2343                    ; line_number = 93
2344                    ; do_nothing
2345                    ;info   93, 84
2346            
2347 0054 2853          goto    main__9
2348                    ; Recombine size1 = 0 || size2 = 0
2349                    ; line_number = 92
2350                    ;  while response0 done
2351                    ; # Pulse has ended; Turn off TMR1:
2352                    ; line_number = 96
2353                    ;  _tmr1on := _false
2354                    ;info   96, 85
2355 0055 1010          bcf     _tmr1on___byte, _tmr1on___bit
2356            
2357                    ; # Send the result:
2358                    ; line_number = 99
2359                    ;  call rb2bus_byte_put(_tmr1h)
2360                    ;info   99, 86
2361 0056 080f          movf    _tmr1h,w
2362 0057 216d          call    rb2bus_byte_put
2363                    ; line_number = 100
2364                    ;  call rb2bus_byte_put(_tmr1l)
2365                    ;info   100, 88
2366 0058 080e          movf    _tmr1l,w
2367 0059 216d          call    rb2bus_byte_put
2368            
2369 005a 28b3          goto    main__44
2370                    ; line_number = 102
2371                    ; case 1
2372   005b :   main__39:
2373                    ; # 0000 0001:
2374            
2375                    ; # Trigger the sonar:
2376                    ; line_number = 106
2377                    ;  delay 10 * microsecond start
2378                    ;info   106, 91
2379                    ; Delay expression evaluates to 50
2380                    ; line_number = 107
2381                    ; trigger1 := _true
2382                    ; Delay at assignment is 0
2383                    ;info   107, 91
2384 005b 1487          bsf     trigger1___byte, trigger1___bit
2385                    ; line_number = 108
2386                    ;  _t1con := 0
2387                    ; Delay at assignment is 1
2388                    ;info   108, 92
2389 005c 0190          clrf    _t1con
2390                    ; line_number = 109
2391                    ;  _tmr1l := 0
2392                    ; Delay at assignment is 2
2393                    ;info   109, 93
2394 005d 018e          clrf    _tmr1l
2395                    ; line_number = 110
2396                    ;  _tmr1h := 0
2397                    ; Delay at assignment is 3
2398                    ;info   110, 94
2399 005e 018f          clrf    _tmr1h
2400            
2401                    ; Delay 46 cycles
2402                    ; Delay loop takes 11 * 4 = 44 cycles
2403 005f 300b          movlw   11
2404   0060 :   main__10:
2405 0060 3eff          addlw   255
2406 0061 1d03          btfss   __z___byte, __z___bit
2407 0062 2860          goto    main__10
2408 0063 2864          goto    main__11
2409   0064 :   main__11:
2410                    ; line_number = 106
2411                    ;  delay 10 * microsecond done
2412                    ; # We wait for the trigger pulse to go low
2413                    ; line_number = 113
2414                    ;  while response1 start
2415   0064 :   main__12:
2416                    ;info   113, 100
2417                    ; =>bit_code_emit@symbol(): sym=response1
2418                    ; No 1TEST: true.size=2 false.size=0
2419                    ; No 2TEST: true.size=2 false.size=0
2420                    ; 1GOTO: Single test with GOTO
2421 0064 1c85          btfss   response1___byte, response1___bit
2422 0065 2868          goto    main__13
2423                    ; line_number = 114
2424                    ; trigger1 := _false
2425                    ;info   114, 102
2426 0066 1087          bcf     trigger1___byte, trigger1___bit
2427            
2428 0067 2864          goto    main__12
2429                    ; Recombine size1 = 0 || size2 = 0
2430   0068 :   main__13:
2431                    ; line_number = 113
2432                    ;  while response1 done
2433                    ; # Wait for pulse to start:
2434                    ; line_number = 117
2435                    ;  while !response1 start
2436   0068 :   main__14:
2437                    ;info   117, 104
2438                    ; =>bit_code_emit@symbol(): sym=response1
2439                    ; 1TEST: Single test with code in skip slot
2440 0068 1c85          btfss   response1___byte, response1___bit
2441                    ; line_number = 118
2442                    ; do_nothing
2443                    ;info   118, 105
2444            
2445 0069 2868          goto    main__14
2446                    ; Recombine size1 = 0 || size2 = 0
2447                    ; line_number = 117
2448                    ;  while !response1 done
2449                    ; # Wait for pulse to end:
2450                    ; line_number = 121
2451                    ;  _tmr1on := _true
2452                    ;info   121, 106
2453 006a 1410          bsf     _tmr1on___byte, _tmr1on___bit
2454                    ; line_number = 122
2455                    ;  while response1 start
2456   006b :   main__15:
2457                    ;info   122, 107
2458                    ; =>bit_code_emit@symbol(): sym=response1
2459                    ; 1TEST: Single test with code in skip slot
2460 006b 1885          btfsc   response1___byte, response1___bit
2461                    ; line_number = 123
2462                    ; do_nothing
2463                    ;info   123, 108
2464            
2465 006c 286b          goto    main__15
2466                    ; Recombine size1 = 0 || size2 = 0
2467                    ; line_number = 122
2468                    ;  while response1 done
2469                    ; # Pulse has ended; Turn off TMR1:
2470                    ; line_number = 126
2471                    ;  _tmr1on := _false
2472                    ;info   126, 109
2473 006d 1010          bcf     _tmr1on___byte, _tmr1on___bit
2474            
2475                    ; # Send the result:
2476                    ; line_number = 129
2477                    ;  call rb2bus_byte_put(_tmr1h)
2478                    ;info   129, 110
2479 006e 080f          movf    _tmr1h,w
2480 006f 216d          call    rb2bus_byte_put
2481                    ; line_number = 130
2482                    ;  call rb2bus_byte_put(_tmr1l)
2483                    ;info   130, 112
2484 0070 080e          movf    _tmr1l,w
2485 0071 216d          call    rb2bus_byte_put
2486 0072 28b3          goto    main__44
2487                    ; line_number = 131
2488                    ; case 2
2489   0073 :   main__40:
2490                    ; # 0000 0010:
2491                    ; line_number = 133
2492                    ;  loop_forever start
2493   0073 :   main__16:
2494                    ; line_number = 134
2495                    ; trigger0 := _true
2496                    ;info   134, 115
2497 0073 1405          bsf     trigger0___byte, trigger0___bit
2498                    ; line_number = 135
2499                    ;  delay 5 * microsecond start
2500                    ;info   135, 116
2501                    ; Delay expression evaluates to 25
2502                    ; line_number = 136
2503                    ; do_nothing
2504                    ;info   136, 116
2505                    ; Delay 25 cycles
2506                    ; Delay loop takes 6 * 4 = 24 cycles
2507 0074 3006          movlw   6
2508   0075 :   main__17:
2509 0075 3eff          addlw   255
2510 0076 1d03          btfss   __z___byte, __z___bit
2511 0077 2875          goto    main__17
2512 0078 0000          nop     
2513                    ; line_number = 135
2514                    ;  delay 5 * microsecond done
2515                    ; line_number = 137
2516                    ; trigger0 := _false
2517                    ;info   137, 121
2518 0079 1005          bcf     trigger0___byte, trigger0___bit
2519            
2520                    ; line_number = 139
2521                    ;  loop_exactly 3 start
2522                    ;info   139, 122
2523 0000002f = main__18 equ globals___0+15
2524 007a 3003          movlw   3
2525 007b 00af          movwf   main__18
2526   007c :   main__19:
2527                    ; line_number = 140
2528                    ; loop_exactly 200 start
2529                    ;info   140, 124
2530 00000030 = main__20 equ globals___0+16
2531 007c 30c8          movlw   200
2532 007d 00b0          movwf   main__20
2533   007e :   main__21:
2534                    ; line_number = 141
2535                    ; delay 100 * microsecond start
2536                    ;info   141, 126
2537                    ; Delay expression evaluates to 500
2538                    ; line_number = 142
2539                    ; do_nothing
2540                    ;info   142, 126
2541                    ; Delay 500 cycles
2542                    ; Delay loop takes 125 * 4 = 500 cycles
2543 007e 307d          movlw   125
2544   007f :   main__22:
2545 007f 3eff          addlw   255
2546 0080 1d03          btfss   __z___byte, __z___bit
2547 0081 287f          goto    main__22
2548                    ; line_number = 141
2549                    ; delay 100 * microsecond done
2550                    ; line_number = 140
2551                    ; loop_exactly 200 wrap-up
2552 0082 0bb0          decfsz  main__20,f
2553 0083 287e          goto    main__21
2554                    ; line_number = 140
2555                    ; loop_exactly 200 done
2556                    ; line_number = 139
2557                    ;  loop_exactly 3 wrap-up
2558 0084 0baf          decfsz  main__18,f
2559 0085 287c          goto    main__19
2560                    ; line_number = 139
2561                    ;  loop_exactly 3 done
2562                    ; line_number = 133
2563                    ;  loop_forever wrap-up
2564 0086 2873          goto    main__16
2565                    ; line_number = 133
2566                    ;  loop_forever done
2567 0087 28b3          goto    main__44
2568                    ; line_number = 143
2569                    ; case 3
2570   0088 :   main__41:
2571                    ; # 0000 0011:
2572                    ; line_number = 145
2573                    ;  loop_forever start
2574   0088 :   main__23:
2575                    ; line_number = 146
2576                    ; trigger1 := _true
2577                    ;info   146, 136
2578 0088 1487          bsf     trigger1___byte, trigger1___bit
2579                    ; line_number = 147
2580                    ;  delay 5 * microsecond start
2581                    ;info   147, 137
2582                    ; Delay expression evaluates to 25
2583                    ; line_number = 148
2584                    ; do_nothing
2585                    ;info   148, 137
2586                    ; Delay 25 cycles
2587                    ; Delay loop takes 6 * 4 = 24 cycles
2588 0089 3006          movlw   6
2589   008a :   main__24:
2590 008a 3eff          addlw   255
2591 008b 1d03          btfss   __z___byte, __z___bit
2592 008c 288a          goto    main__24
2593 008d 0000          nop     
2594                    ; line_number = 147
2595                    ;  delay 5 * microsecond done
2596                    ; line_number = 149
2597                    ; trigger1 := _false
2598                    ;info   149, 142
2599 008e 1087          bcf     trigger1___byte, trigger1___bit
2600            
2601                    ; line_number = 151
2602                    ;  loop_exactly 3 start
2603                    ;info   151, 143
2604 0000002f = main__25 equ globals___0+15
2605 008f 3003          movlw   3
2606 0090 00af          movwf   main__25
2607   0091 :   main__26:
2608                    ; line_number = 152
2609                    ; loop_exactly 200 start
2610                    ;info   152, 145
2611 00000030 = main__27 equ globals___0+16
2612 0091 30c8          movlw   200
2613 0092 00b0          movwf   main__27
2614   0093 :   main__28:
2615                    ; line_number = 153
2616                    ; delay 100 * microsecond start
2617                    ;info   153, 147
2618                    ; Delay expression evaluates to 500
2619                    ; line_number = 154
2620                    ; do_nothing
2621                    ;info   154, 147
2622                    ; Delay 500 cycles
2623                    ; Delay loop takes 125 * 4 = 500 cycles
2624 0093 307d          movlw   125
2625   0094 :   main__29:
2626 0094 3eff          addlw   255
2627 0095 1d03          btfss   __z___byte, __z___bit
2628 0096 2894          goto    main__29
2629                    ; line_number = 153
2630                    ; delay 100 * microsecond done
2631                    ; line_number = 152
2632                    ; loop_exactly 200 wrap-up
2633 0097 0bb0          decfsz  main__27,f
2634 0098 2893          goto    main__28
2635                    ; line_number = 152
2636                    ; loop_exactly 200 done
2637                    ; line_number = 151
2638                    ;  loop_exactly 3 wrap-up
2639 0099 0baf          decfsz  main__25,f
2640 009a 2891          goto    main__26
2641                    ; line_number = 151
2642                    ;  loop_exactly 3 done
2643                    ; line_number = 145
2644                    ;  loop_forever wrap-up
2645 009b 2888          goto    main__23
2646                    ; line_number = 145
2647                    ;  loop_forever done
2648 009c 28b3          goto    main__44
2649                    ; line_number = 155
2650                    ; case 4, 5, 6, 7
2651   009d :   main__42:
2652                    ; # 0000 01xx (Set Triggers):
2653                    ; line_number = 157
2654                    ;  if command@1 start
2655                    ;info   157, 157
2656 0000002c = main__select__32___byte equ main__command
2657 00000001 = main__select__32___bit equ 1
2658                    ; =>bit_code_emit@symbol(): sym=main__select__32
2659                    ; No 1TEST: true.size=4 false.size=4
2660                    ; No 2TEST: true.size=4 false.size=4
2661                    ; 2GOTO: Single test with two GOTO's
2662 009d 1cac          btfss   main__select__32___byte, main__select__32___bit
2663 009e 28a4          goto    main__33
2664                    ; # Set/clear {trigger1}:
2665                    ; line_number = 159
2666                    ;  if command@0 start
2667                    ;info   159, 159
2668 0000002c = main__select__31___byte equ main__command
2669 00000000 = main__select__31___bit equ 0
2670                    ; =>bit_code_emit@symbol(): sym=main__select__31
2671                    ; No 1TEST: true.size=1 false.size=1
2672                    ; 2TEST: two tests with code in both delay slots
2673 009f 182c          btfsc   main__select__31___byte, main__select__31___bit
2674                    ; line_number = 160
2675                    ; trigger1 := _true
2676                    ;info   160, 160
2677 00a0 1487          bsf     trigger1___byte, trigger1___bit
2678 00a1 1c2c          btfss   main__select__31___byte, main__select__31___bit
2679                    ; line_number = 162
2680                    ; trigger1 := _false
2681                    ;info   162, 162
2682 00a2 1087          bcf     trigger1___byte, trigger1___bit
2683                    ; line_number = 159
2684                    ;  if command@0 done
2685 00a3 28a8          goto    main__34
2686                    ; 2GOTO: Starting code 2
2687   00a4 :   main__33:
2688                    ; # Set/clear {trigger0}:
2689                    ; line_number = 165
2690                    ;  if command@0 start
2691                    ;info   165, 164
2692 0000002c = main__select__30___byte equ main__command
2693 00000000 = main__select__30___bit equ 0
2694                    ; =>bit_code_emit@symbol(): sym=main__select__30
2695                    ; No 1TEST: true.size=1 false.size=1
2696                    ; 2TEST: two tests with code in both delay slots
2697 00a4 182c          btfsc   main__select__30___byte, main__select__30___bit
2698                    ; line_number = 166
2699                    ; trigger0 := _true
2700                    ;info   166, 165
2701 00a5 1405          bsf     trigger0___byte, trigger0___bit
2702 00a6 1c2c          btfss   main__select__30___byte, main__select__30___bit
2703                    ; line_number = 168
2704                    ; trigger0 := _false
2705                    ;info   168, 167
2706 00a7 1005          bcf     trigger0___byte, trigger0___bit
2707                    ; line_number = 165
2708                    ;  if command@0 done
2709   00a8 :   main__34:
2710                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
2711                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
2712                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
2713                    ; line_number = 157
2714                    ;  if command@1 done
2715                    ; line_number = 169
2716                    ; delay 40 * microsecond start
2717                    ;info   169, 168
2718                    ; Delay expression evaluates to 200
2719                    ; line_number = 170
2720                    ; do_nothing
2721                    ;info   170, 168
2722                    ; Delay 200 cycles
2723                    ; Delay loop takes 50 * 4 = 200 cycles
2724 00a8 3032          movlw   50
2725   00a9 :   main__35:
2726 00a9 3eff          addlw   255
2727 00aa 1d03          btfss   __z___byte, __z___bit
2728 00ab 28a9          goto    main__35
2729                    ; line_number = 169
2730                    ; delay 40 * microsecond done
2731                    ; line_number = 171
2732                    ; result := 0
2733                    ;info   171, 172
2734 00ac 01ae          clrf    main__result
2735                    ; line_number = 172
2736                    ;  if response0 start
2737                    ;info   172, 173
2738                    ; =>bit_code_emit@symbol(): sym=response0
2739                    ; 1TEST: Single test with code in skip slot
2740 00ad 1807          btfsc   response0___byte, response0___bit
2741                    ; line_number = 173
2742                    ; result@0 := _true
2743                    ;info   173, 174
2744 0000002e = main__select__36___byte equ main__result
2745 00000000 = main__select__36___bit equ 0
2746 00ae 142e          bsf     main__select__36___byte, main__select__36___bit
2747                    ; Recombine size1 = 0 || size2 = 0
2748                    ; line_number = 172
2749                    ;  if response0 done
2750                    ; line_number = 174
2751                    ; if response1 start
2752                    ;info   174, 175
2753                    ; =>bit_code_emit@symbol(): sym=response1
2754                    ; 1TEST: Single test with code in skip slot
2755 00af 1885          btfsc   response1___byte, response1___bit
2756                    ; line_number = 175
2757                    ; result@1 := _true
2758                    ;info   175, 176
2759 0000002e = main__select__37___byte equ main__result
2760 00000001 = main__select__37___bit equ 1
2761 00b0 14ae          bsf     main__select__37___byte, main__select__37___bit
2762                    ; Recombine size1 = 0 || size2 = 0
2763                    ; line_number = 174
2764                    ; if response1 done
2765                    ; line_number = 176
2766                    ; call rb2bus_byte_put(result)
2767                    ;info   176, 177
2768 00b1 082e          movf    main__result,w
2769 00b2 216d          call    rb2bus_byte_put
2770   00b3 :   main__44:
2771                    ; line_number = 70
2772                    ;  switch command & 7 done
2773 00b3 28fa          goto    main__67
2774                    ; line_number = 177
2775                    ; case 1
2776   00b4 :   main__63:
2777                    ; # 0000 1xxx:
2778                    ; line_number = 179
2779                    ;  result := 0
2780                    ;info   179, 180
2781 00b4 01ae          clrf    main__result
2782                    ; line_number = 180
2783                    ;  switch command & 7 start
2784                    ;info   180, 181
2785                    ; switch_before:(data:00=uu=>00 code:XX=cc=>XX) size=1
2786                    ; line_number = 181
2787                    ; case_maximum 7
2788 00b5 3000          movlw   main__60>>8
2789 00b6 008a          movwf   __pclath
2790 00b7 3007          movlw   7
2791 00b8 052c          andwf   main__command,w
2792                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
2793 00b9 3ebb          addlw   main__60
2794 00ba 0082          movwf   __pcl
2795                    ; page_group 8
2796   00bb :   main__60:
2797 00bb 28c3          goto    main__52
2798 00bc 28c6          goto    main__53
2799 00bd 28c9          goto    main__54
2800 00be 28ce          goto    main__55
2801 00bf 28d3          goto    main__56
2802 00c0 28d8          goto    main__57
2803 00c1 28db          goto    main__58
2804 00c2 28f1          goto    main__59
2805                    ; line_number = 182
2806                    ; case 0
2807   00c3 :   main__52:
2808                    ; # 0000 1000:
2809                    ; line_number = 184
2810                    ;  result := _porta
2811                    ;info   184, 195
2812 00c3 0805          movf    _porta,w
2813 00c4 00ae          movwf   main__result
2814 00c5 28f3          goto    main__61
2815                    ; line_number = 185
2816                    ; case 1
2817   00c6 :   main__53:
2818                    ; # 0000 1001:
2819                    ; line_number = 187
2820                    ;  result := _portc
2821                    ;info   187, 198
2822 00c6 0807          movf    _portc,w
2823 00c7 00ae          movwf   main__result
2824 00c8 28f3          goto    main__61
2825                    ; line_number = 188
2826                    ; case 2
2827   00c9 :   main__54:
2828                    ; This case body wants this bit set
2829 00c9 1683          bsf     __rp0___byte, __rp0___bit
2830                    ; # 0000 1010:
2831                    ; line_number = 190
2832                    ;  result := _trisa
2833                    ;info   190, 202
2834 00ca 0805          movf    _trisa,w
2835 00cb 1283          bcf     __rp0___byte, __rp0___bit
2836 00cc 00ae          movwf   main__result
2837 00cd 28f3          goto    main__61
2838                    ; line_number = 191
2839                    ; case 3
2840   00ce :   main__55:
2841                    ; This case body wants this bit set
2842 00ce 1683          bsf     __rp0___byte, __rp0___bit
2843                    ; # 0000 1011:
2844                    ; line_number = 193
2845                    ;  result := _trisc
2846                    ;info   193, 207
2847 00cf 0807          movf    _trisc,w
2848 00d0 1283          bcf     __rp0___byte, __rp0___bit
2849 00d1 00ae          movwf   main__result
2850 00d2 28f3          goto    main__61
2851                    ; line_number = 194
2852                    ; case 4
2853   00d3 :   main__56:
2854                    ; This case body wants this bit set
2855 00d3 1683          bsf     __rp0___byte, __rp0___bit
2856                    ; # 0000 1100:
2857                    ; line_number = 196
2858                    ;  result := _ansel
2859                    ;info   196, 212
2860 00d4 0811          movf    _ansel,w
2861 00d5 1283          bcf     __rp0___byte, __rp0___bit
2862 00d6 00ae          movwf   main__result
2863 00d7 28f3          goto    main__61
2864                    ; line_number = 197
2865                    ; case 5
2866   00d8 :   main__57:
2867                    ; # 0000 1101:
2868                    ; line_number = 199
2869                    ;  result := _cmcon0
2870                    ;info   199, 216
2871 00d8 0819          movf    _cmcon0,w
2872 00d9 00ae          movwf   main__result
2873 00da 28f3          goto    main__61
2874                    ; line_number = 200
2875                    ; case 6
2876   00db :   main__58:
2877                    ; # 0000 1110:
2878                    ; line_number = 202
2879                    ;  loop_forever start
2880   00db :   main__45:
2881                    ; line_number = 203
2882                    ; loop_exactly count start
2883                    ;info   203, 219
2884 0000002f = main__46 equ globals___0+15
2885 00db 082d          movf    main__count,w
2886 00dc 00af          movwf   main__46
2887   00dd :   main__47:
2888                    ; line_number = 204
2889                    ; delay 10 * microsecond start
2890                    ;info   204, 221
2891                    ; Delay expression evaluates to 50
2892                    ; line_number = 205
2893                    ; trigger0 := _true
2894                    ; Delay at assignment is 0
2895                    ;info   205, 221
2896 00dd 1405          bsf     trigger0___byte, trigger0___bit
2897                    ; line_number = 206
2898                    ;  trigger1 := _true
2899                    ; Delay at assignment is 1
2900                    ;info   206, 222
2901 00de 1487          bsf     trigger1___byte, trigger1___bit
2902                    ; Delay 48 cycles
2903                    ; Delay loop takes 12 * 4 = 48 cycles
2904 00df 300c          movlw   12
2905   00e0 :   main__48:
2906 00e0 3eff          addlw   255
2907 00e1 1d03          btfss   __z___byte, __z___bit
2908 00e2 28e0          goto    main__48
2909                    ; line_number = 204
2910                    ; delay 10 * microsecond done
2911                    ; line_number = 203
2912                    ; loop_exactly count wrap-up
2913 00e3 0baf          decfsz  main__46,f
2914 00e4 28dd          goto    main__47
2915                    ; line_number = 203
2916                    ; loop_exactly count done
2917                    ; line_number = 207
2918                    ; loop_exactly count start
2919                    ;info   207, 229
2920 0000002f = main__49 equ globals___0+15
2921 00e5 082d          movf    main__count,w
2922 00e6 00af          movwf   main__49
2923   00e7 :   main__50:
2924                    ; line_number = 208
2925                    ; delay 90 * microsecond start
2926                    ;info   208, 231
2927                    ; Delay expression evaluates to 450
2928                    ; line_number = 209
2929                    ; trigger0 := _false
2930                    ; Delay at assignment is 0
2931                    ;info   209, 231
2932 00e7 1005          bcf     trigger0___byte, trigger0___bit
2933                    ; line_number = 210
2934                    ;  trigger1 := _false
2935                    ; Delay at assignment is 1
2936                    ;info   210, 232
2937 00e8 1087          bcf     trigger1___byte, trigger1___bit
2938                    ; Delay 448 cycles
2939                    ; Delay loop takes 112 * 4 = 448 cycles
2940 00e9 3070          movlw   112
2941   00ea :   main__51:
2942 00ea 3eff          addlw   255
2943 00eb 1d03          btfss   __z___byte, __z___bit
2944 00ec 28ea          goto    main__51
2945                    ; line_number = 208
2946                    ; delay 90 * microsecond done
2947                    ; line_number = 207
2948                    ; loop_exactly count wrap-up
2949 00ed 0baf          decfsz  main__49,f
2950 00ee 28e7          goto    main__50
2951                    ; line_number = 207
2952                    ; loop_exactly count done
2953                    ; line_number = 202
2954                    ;  loop_forever wrap-up
2955 00ef 28db          goto    main__45
2956                    ; line_number = 202
2957                    ;  loop_forever done
2958 00f0 28f3          goto    main__61
2959                    ; line_number = 211
2960                    ; case 7
2961   00f1 :   main__59:
2962                    ; # 0000 1111:
2963                    ; line_number = 213
2964                    ;  result := count
2965                    ;info   213, 241
2966 00f1 082d          movf    main__count,w
2967 00f2 00ae          movwf   main__result
2968   00f3 :   main__61:
2969                    ; line_number = 180
2970                    ;  switch command & 7 done
2971                    ; line_number = 214
2972                    ; call rb2bus_byte_put(result)
2973                    ;info   214, 243
2974 00f3 082e          movf    main__result,w
2975 00f4 216d          call    rb2bus_byte_put
2976 00f5 28fa          goto    main__67
2977                    ; line_number = 215
2978                    ; case 2, 3
2979   00f6 :   main__64:
2980                    ; # 0001 xxxx:
2981                    ; line_number = 217
2982                    ;  count := (command & 0xf) + 1
2983                    ;info   217, 246
2984 00f6 300f          movlw   15
2985 00f7 052c          andwf   main__command,w
2986 00f8 3e01          addlw   1
2987 00f9 00ad          movwf   main__count
2988   00fa :   main__67:
2989                    ; line_number = 66
2990                    ;  switch (command >> 3) & 7 done
2991 00fa 290e          goto    main__76
2992                    ; line_number = 218
2993                    ; case 3
2994   00fb :   main__73:
2995                    ; line_number = 219
2996                    ; switch (command >> 3) & 7 start
2997                    ;info   219, 251
2998                    ; switch_before:(data:XX=cc=>XX code:XX=cc=>XX) size=0
2999 00fb 3001          movlw   main__69>>8
3000 00fc 008a          movwf   __pclath
3001 0000002f = main__70 equ globals___0+15
3002 00fd 0c2c          rrf     main__command,w
3003 00fe 00af          movwf   main__70
3004 00ff 0caf          rrf     main__70,f
3005 0100 0c2f          rrf     main__70,w
3006 0101 3907          andlw   7
3007                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
3008 0102 3e04          addlw   main__69
3009 0103 0082          movwf   __pcl
3010                    ; page_group 8
3011   0104 :   main__69:
3012 0104 290e          goto    main__71
3013 0105 290e          goto    main__71
3014 0106 290e          goto    main__71
3015 0107 290e          goto    main__71
3016 0108 290e          goto    main__71
3017 0109 290e          goto    main__71
3018 010a 290e          goto    main__71
3019 010b 290c          goto    main__68
3020                    ; line_number = 220
3021                    ; case 7
3022   010c :   main__68:
3023                    ; # 1111 1xxx (Shared command):
3024                    ; line_number = 222
3025                    ;  call rb2bus_command(command)
3026                    ;info   222, 268
3027 010c 082c          movf    main__command,w
3028 010d 2181          call    rb2bus_command
3029            
3030   010e :   main__71:
3031                    ; line_number = 219
3032                    ; switch (command >> 3) & 7 done
3033   010e :   main__76:
3034                    ; line_number = 63
3035                    ; switch command >> 6 done
3036                    ; line_number = 57
3037                    ;  loop_forever wrap-up
3038 010e 2810          goto    main__1
3039                    ; line_number = 57
3040                    ;  loop_forever done
3041                    ; delay after procedure statements=non-uniform
3042            
3043            
3044            
3045            
3046                    ; line_number = 224
3047                    ;info   224, 271
3048                    ; procedure wait
3049   010f :   wait:
3050                    ; arguments_none
3051                    ; line_number = 226
3052                    ;  returns_nothing
3053            
3054                    ; # This procedure is repeatably called whenever the software
3055                    ; # is waiting for a byte to arrive from the bus.
3056            
3057                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3058                    ; line_number = 231
3059                    ;  do_nothing
3060                    ;info   231, 271
3061            
3062                    ; delay after procedure statements=non-uniform
3063                    ; Implied return
3064 010f 3400          retlw   0
3065            
3066            
3067            
3068            
3069                    ; line_number = 233
3070                    ; string id = "\16,0,9,4,3,8\Sonar2-D\7\Gramson" start
3071                    ; id = '\16,0,9,4,3,8\Sonar2-D\7\Gramson'
3072   0110 :   id:
3073                    ; Temporarily save index into FSR
3074 0110 0084          movwf   __fsr
3075                    ; Initialize PCLATH to point to this code page
3076 0111 3001          movlw   id___base>>8
3077 0112 008a          movwf   __pclath
3078                    ; Restore index from FSR
3079 0113 0804          movf    __fsr,w
3080 0114 3e16          addlw   id___base
3081                    ; Index to the correct return value
3082 0115 0082          movwf   __pcl
3083                    ; page_group 22
3084   0116 :   id___base:
3085 0116 3410          retlw   16
3086 0117 3400          retlw   0
3087 0118 3409          retlw   9
3088 0119 3404          retlw   4
3089 011a 3403          retlw   3
3090 011b 3408          retlw   8
3091 011c 3453          retlw   83
3092 011d 346f          retlw   111
3093 011e 346e          retlw   110
3094 011f 3461          retlw   97
3095 0120 3472          retlw   114
3096 0121 3432          retlw   50
3097 0122 342d          retlw   45
3098 0123 3444          retlw   68
3099 0124 3407          retlw   7
3100 0125 3447          retlw   71
3101 0126 3472          retlw   114
3102 0127 3461          retlw   97
3103 0128 346d          retlw   109
3104 0129 3473          retlw   115
3105 012a 346f          retlw   111
3106 012b 346e          retlw   110
3107                    ; line_number = 233
3108                    ; string id = "\16,0,9,4,3,8\Sonar2-D\7\Gramson" start
3109            
3110            
3111                    ; Appending 8 delayed procedures to code bank 0
3112                    ; buffer = 'rb2bus'
3113                    ; line_number = 57
3114                    ;info   57, 300
3115                    ; procedure rb2bus_select_wait
3116   012c :   rb2bus_select_wait:
3117                    ; arguments_none
3118                    ; line_number = 59
3119                    ;  returns_nothing
3120            
3121                    ; # This procedure will in an infinite loop until the select
3122                    ; # address matches {rb2bus_address}.  {rb2bus_address} is
3123                    ; # typically set in the {rb2bus_initialize} procedure.
3124                    ; #
3125                    ; # This module will repeatably call the {wait} procedure until
3126                    ; # it is properly selected.
3127            
3128                    ; line_number = 68
3129                    ;  local value byte
3130 00000022 = rb2bus_select_wait__value equ globals___0+2
3131                    ; line_number = 69
3132                    ;  local address_bit bit
3133 0000006f = rb2bus_select_wait__address_bit___byte equ globals___0+79
3134 00000002 = rb2bus_select_wait__address_bit___bit equ 2
3135            
3136                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3137                    ; line_number = 71
3138                    ;  rb2bus_error := _false
3139                    ;info   71, 300
3140 012c 10ef          bcf     rb2bus_error___byte, rb2bus_error___bit
3141                    ; line_number = 72
3142                    ;  while !rb2bus_selected start
3143   012d :   rb2bus_select_wait__1:
3144                    ;info   72, 301
3145                    ; =>bit_code_emit@symbol(): sym=rb2bus_selected
3146                    ; No 1TEST: true.size=0 false.size=25
3147                    ; No 2TEST: true.size=0 false.size=25
3148                    ; 1GOTO: Single test with GOTO
3149 012d 186f          btfsc   rb2bus_selected___byte, rb2bus_selected___bit
3150 012e 2948          goto    rb2bus_select_wait__6
3151                    ; line_number = 73
3152                    ; _adden := _true
3153                    ;info   73, 303
3154 012f 1597          bsf     _adden___byte, _adden___bit
3155                    ; # Wait for a byte to arrive.
3156                    ; line_number = 75
3157                    ;  while !_rcif start
3158   0130 :   rb2bus_select_wait__2:
3159                    ;info   75, 304
3160                    ; =>bit_code_emit@symbol(): sym=_rcif
3161                    ; No 1TEST: true.size=0 false.size=2
3162                    ; No 2TEST: true.size=0 false.size=2
3163                    ; 1GOTO: Single test with GOTO
3164 0130 1a8c          btfsc   _rcif___byte, _rcif___bit
3165 0131 2934          goto    rb2bus_select_wait__3
3166                    ; line_number = 76
3167                    ; call wait()
3168                    ;info   76, 306
3169 0132 210f          call    wait
3170            
3171 0133 2930          goto    rb2bus_select_wait__2
3172   0134 :   rb2bus_select_wait__3:
3173                    ; Recombine size1 = 0 || size2 = 0
3174                    ; line_number = 75
3175                    ;  while !_rcif done
3176                    ; # Capture the received value:
3177                    ; line_number = 79
3178                    ;  address_bit := _false
3179                    ;info   79, 308
3180 0134 116f          bcf     rb2bus_select_wait__address_bit___byte, rb2bus_select_wait__address_bit___bit
3181                    ; line_number = 80
3182                    ;  if _rx9d start
3183                    ;info   80, 309
3184                    ; =>bit_code_emit@symbol(): sym=_rx9d
3185                    ; 1TEST: Single test with code in skip slot
3186 0135 1817          btfsc   _rx9d___byte, _rx9d___bit
3187                    ; line_number = 81
3188                    ; address_bit := _true
3189                    ;info   81, 310
3190 0136 156f          bsf     rb2bus_select_wait__address_bit___byte, rb2bus_select_wait__address_bit___bit
3191                    ; Recombine size1 = 0 || size2 = 0
3192                    ; line_number = 80
3193                    ;  if _rx9d done
3194                    ; line_number = 82
3195                    ; value := _rcreg
3196                    ;info   82, 311
3197 0137 0814          movf    _rcreg,w
3198 0138 00a2          movwf   rb2bus_select_wait__value
3199            
3200                    ; # Clear any UART errors by toggling {_cren}:
3201                    ; line_number = 85
3202                    ;  if _oerr start
3203                    ;info   85, 313
3204                    ; =>bit_code_emit@symbol(): sym=_oerr
3205                    ; 1TEST: Single test with code in skip slot
3206 0139 1897          btfsc   _oerr___byte, _oerr___bit
3207                    ; line_number = 86
3208                    ; _cren := _false
3209                    ;info   86, 314
3210 013a 1217          bcf     _cren___byte, _cren___bit
3211                    ; Recombine size1 = 0 || size2 = 0
3212                    ; line_number = 85
3213                    ;  if _oerr done
3214                    ; line_number = 87
3215                    ; if _ferr start
3216                    ;info   87, 315
3217                    ; =>bit_code_emit@symbol(): sym=_ferr
3218                    ; 1TEST: Single test with code in skip slot
3219 013b 1917          btfsc   _ferr___byte, _ferr___bit
3220                    ; line_number = 88
3221                    ; _cren := _false
3222                    ;info   88, 316
3223 013c 1217          bcf     _cren___byte, _cren___bit
3224                    ; Recombine size1 = 0 || size2 = 0
3225                    ; line_number = 87
3226                    ; if _ferr done
3227                    ; line_number = 89
3228                    ; _cren := _true
3229                    ;info   89, 317
3230 013d 1617          bsf     _cren___byte, _cren___bit
3231            
3232                    ; line_number = 91
3233                    ;  if address_bit start
3234                    ;info   91, 318
3235                    ; =>bit_code_emit@symbol(): sym=rb2bus_select_wait__address_bit
3236                    ; No 1TEST: true.size=7 false.size=0
3237                    ; No 2TEST: true.size=7 false.size=0
3238                    ; 1GOTO: Single test with GOTO
3239 013e 1d6f          btfss   rb2bus_select_wait__address_bit___byte, rb2bus_select_wait__address_bit___bit
3240 013f 2947          goto    rb2bus_select_wait__5
3241                    ; line_number = 92
3242                    ; if value = rb2bus_address start
3243                    ;info   92, 320
3244                    ; Left minus Right
3245 0140 0820          movf    rb2bus_address,w
3246 0141 0222          subwf   rb2bus_select_wait__value,w
3247                    ; =>bit_code_emit@symbol(): sym=__z
3248                    ; No 1TEST: true.size=3 false.size=0
3249                    ; No 2TEST: true.size=3 false.size=0
3250                    ; 1GOTO: Single test with GOTO
3251 0142 1d03          btfss   __z___byte, __z___bit
3252 0143 2947          goto    rb2bus_select_wait__4
3253                    ; line_number = 93
3254                    ; rb2bus_selected := _true
3255                    ;info   93, 324
3256 0144 146f          bsf     rb2bus_selected___byte, rb2bus_selected___bit
3257                    ; line_number = 94
3258                    ;  call rb2bus_byte_put(rb2_ok)
3259                    ;info   94, 325
3260 0145 30a5          movlw   165
3261 0146 216d          call    rb2bus_byte_put
3262            
3263            
3264                    ; Recombine size1 = 0 || size2 = 0
3265   0147 :   rb2bus_select_wait__4:
3266                    ; line_number = 92
3267                    ; if value = rb2bus_address done
3268                    ; Recombine size1 = 0 || size2 = 0
3269   0147 :   rb2bus_select_wait__5:
3270                    ; line_number = 91
3271                    ;  if address_bit done
3272 0147 292d          goto    rb2bus_select_wait__1
3273   0148 :   rb2bus_select_wait__6:
3274                    ; Recombine size1 = 0 || size2 = 0
3275                    ; line_number = 72
3276                    ;  while !rb2bus_selected done
3277                    ; delay after procedure statements=non-uniform
3278                    ; Implied return
3279 0148 3400          retlw   0
3280            
3281            
3282            
3283            
3284                    ; line_number = 97
3285                    ;info   97, 329
3286                    ; procedure rb2bus_deselect
3287   0149 :   rb2bus_deselect:
3288                    ; arguments_none
3289                    ; line_number = 99
3290                    ;  returns_nothing
3291            
3292                    ; # This procedure forces this module into the deselected state until
3293                    ; # it is reselected by some master module on the bus.
3294            
3295                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3296                    ; line_number = 104
3297                    ;  rb2bus_selected := _false
3298                    ;info   104, 329
3299 0149 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
3300            
3301            
3302                    ; delay after procedure statements=non-uniform
3303                    ; Implied return
3304 014a 3400          retlw   0
3305            
3306            
3307            
3308            
3309                    ; line_number = 107
3310                    ;info   107, 331
3311                    ; procedure rb2bus_byte_get
3312   014b :   rb2bus_byte_get:
3313                    ; arguments_none
3314                    ; line_number = 109
3315                    ;  returns byte
3316            
3317                    ; # This procedure will return the next byte received from the bus.
3318                    ; # The address (9th) bit is stored in the global {is_address}.
3319                    ; #
3320                    ; # If {rb2bus_error} is set, 0 is returned.  Otherwise, the {wait}
3321                    ; # procedure is repeatably called until a command byte is successfully
3322                    ; # received.  If an module select byte comes in, we enter a bus
3323                    ; # error condition by setting {rb2bus_error} and returning 0.
3324            
3325                    ; line_number = 119
3326                    ;  local value byte
3327 00000023 = rb2bus_byte_get__value equ globals___0+3
3328                    ; line_number = 120
3329                    ;  local address_bit bit
3330 0000006f = rb2bus_byte_get__address_bit___byte equ globals___0+79
3331 00000003 = rb2bus_byte_get__address_bit___bit equ 3
3332            
3333                    ; # Return 0 in a bus flush condition to get us back to {rb2bus_select_wait}:
3334                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3335                    ; line_number = 123
3336                    ;  if rb2bus_error start
3337                    ;info   123, 331
3338                    ; =>bit_code_emit@symbol(): sym=rb2bus_error
3339                    ; 1TEST: Single test with code in skip slot
3340 014b 18ef          btfsc   rb2bus_error___byte, rb2bus_error___bit
3341                    ; line_number = 124
3342                    ; return 0 start
3343                    ; line_number = 124
3344                    ;info   124, 332
3345 014c 3400          retlw   0
3346                    ; line_number = 124
3347                    ; return 0 done
3348            
3349                    ; Recombine size1 = 0 || size2 = 0
3350                    ; line_number = 123
3351                    ;  if rb2bus_error done
3352                    ; # Wait for a byte to arrive.
3353                    ; line_number = 127
3354                    ;  _adden := _false
3355                    ;info   127, 333
3356 014d 1197          bcf     _adden___byte, _adden___bit
3357                    ; line_number = 128
3358                    ;  while !_rcif start
3359   014e :   rb2bus_byte_get__1:
3360                    ;info   128, 334
3361                    ; =>bit_code_emit@symbol(): sym=_rcif
3362                    ; No 1TEST: true.size=0 false.size=2
3363                    ; No 2TEST: true.size=0 false.size=2
3364                    ; 1GOTO: Single test with GOTO
3365 014e 1a8c          btfsc   _rcif___byte, _rcif___bit
3366 014f 2952          goto    rb2bus_byte_get__2
3367                    ; line_number = 129
3368                    ; call wait()
3369                    ;info   129, 336
3370 0150 210f          call    wait
3371            
3372 0151 294e          goto    rb2bus_byte_get__1
3373   0152 :   rb2bus_byte_get__2:
3374                    ; Recombine size1 = 0 || size2 = 0
3375                    ; line_number = 128
3376                    ;  while !_rcif done
3377                    ; # Record the 9th bit in {address_bit}:
3378                    ; line_number = 132
3379                    ;  address_bit := _false
3380                    ;info   132, 338
3381 0152 11ef          bcf     rb2bus_byte_get__address_bit___byte, rb2bus_byte_get__address_bit___bit
3382                    ; line_number = 133
3383                    ;  if _rx9d start
3384                    ;info   133, 339
3385                    ; =>bit_code_emit@symbol(): sym=_rx9d
3386                    ; 1TEST: Single test with code in skip slot
3387 0153 1817          btfsc   _rx9d___byte, _rx9d___bit
3388                    ; line_number = 134
3389                    ; address_bit := _true
3390                    ;info   134, 340
3391 0154 15ef          bsf     rb2bus_byte_get__address_bit___byte, rb2bus_byte_get__address_bit___bit
3392                    ; Recombine size1 = 0 || size2 = 0
3393                    ; line_number = 133
3394                    ;  if _rx9d done
3395                    ; line_number = 135
3396                    ; value := _rcreg
3397                    ;info   135, 341
3398 0155 0814          movf    _rcreg,w
3399 0156 00a3          movwf   rb2bus_byte_get__value
3400            
3401                    ; # Clear any errors by toggling _{cren}:
3402                    ; # FIXME: All of this should be done *before* reading {_rcreg}!!!
3403                    ; line_number = 139
3404                    ;  if _oerr start
3405                    ;info   139, 343
3406                    ; =>bit_code_emit@symbol(): sym=_oerr
3407                    ; 1TEST: Single test with code in skip slot
3408 0157 1897          btfsc   _oerr___byte, _oerr___bit
3409                    ; line_number = 140
3410                    ; _cren := _false
3411                    ;info   140, 344
3412 0158 1217          bcf     _cren___byte, _cren___bit
3413                    ; Recombine size1 = 0 || size2 = 0
3414                    ; line_number = 139
3415                    ;  if _oerr done
3416                    ; line_number = 141
3417                    ; if _ferr start
3418                    ;info   141, 345
3419                    ; =>bit_code_emit@symbol(): sym=_ferr
3420                    ; 1TEST: Single test with code in skip slot
3421 0159 1917          btfsc   _ferr___byte, _ferr___bit
3422                    ; line_number = 142
3423                    ; _cren := _false
3424                    ;info   142, 346
3425 015a 1217          bcf     _cren___byte, _cren___bit
3426                    ; Recombine size1 = 0 || size2 = 0
3427                    ; line_number = 141
3428                    ; if _ferr done
3429                    ; line_number = 143
3430                    ; _cren := _true
3431                    ;info   143, 347
3432 015b 1617          bsf     _cren___byte, _cren___bit
3433            
3434                    ; line_number = 145
3435                    ;  if address_bit start
3436                    ;info   145, 348
3437                    ; =>bit_code_emit@symbol(): sym=rb2bus_byte_get__address_bit
3438                    ; No 1TEST: true.size=13 false.size=0
3439                    ; No 2TEST: true.size=13 false.size=0
3440                    ; 1GOTO: Single test with GOTO
3441 015c 1def          btfss   rb2bus_byte_get__address_bit___byte, rb2bus_byte_get__address_bit___bit
3442 015d 296b          goto    rb2bus_byte_get__5
3443                    ; # We have an unexpected address select coming in:
3444                    ; line_number = 147
3445                    ;  if value = rb2bus_address start
3446                    ;info   147, 350
3447                    ; Left minus Right
3448 015e 0820          movf    rb2bus_address,w
3449 015f 0223          subwf   rb2bus_byte_get__value,w
3450                    ; =>bit_code_emit@symbol(): sym=__z
3451                    ; No 1TEST: true.size=4 false.size=2
3452                    ; No 2TEST: true.size=4 false.size=2
3453                    ; 2GOTO: Single test with two GOTO's
3454 0160 1d03          btfss   __z___byte, __z___bit
3455 0161 2967          goto    rb2bus_byte_get__3
3456                    ; # We are being selected again:
3457                    ; line_number = 149
3458                    ;  rb2bus_selected := _true
3459                    ;info   149, 354
3460 0162 146f          bsf     rb2bus_selected___byte, rb2bus_selected___bit
3461                    ; line_number = 150
3462                    ;  _adden := _false
3463                    ;info   150, 355
3464 0163 1197          bcf     _adden___byte, _adden___bit
3465            
3466                    ; line_number = 152
3467                    ;  call rb2bus_byte_put(rb2_ok)
3468                    ;info   152, 356
3469 0164 30a5          movlw   165
3470 0165 216d          call    rb2bus_byte_put
3471 0166 2969          goto    rb2bus_byte_get__4
3472                    ; 2GOTO: Starting code 2
3473   0167 :   rb2bus_byte_get__3:
3474                    ; # Somebody else is being selected; we deselect:
3475                    ; line_number = 155
3476                    ;  rb2bus_selected := _false
3477                    ;info   155, 359
3478 0167 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
3479                    ; line_number = 156
3480                    ;  _adden := _true
3481                    ;info   156, 360
3482 0168 1597          bsf     _adden___byte, _adden___bit
3483            
3484   0169 :   rb2bus_byte_get__4:
3485                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3486                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3487                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3488                    ; line_number = 147
3489                    ;  if value = rb2bus_address done
3490                    ; # We want to get back to the beginning of decode:
3491                    ; line_number = 159
3492                    ;  rb2bus_error := _true
3493                    ;info   159, 361
3494 0169 14ef          bsf     rb2bus_error___byte, rb2bus_error___bit
3495                    ; line_number = 160
3496                    ;  value := 0
3497                    ;info   160, 362
3498 016a 01a3          clrf    rb2bus_byte_get__value
3499            
3500                    ; Recombine size1 = 0 || size2 = 0
3501   016b :   rb2bus_byte_get__5:
3502                    ; line_number = 145
3503                    ;  if address_bit done
3504                    ; # Regular data byte:
3505                    ; line_number = 163
3506                    ;  return value start
3507                    ; line_number = 163
3508                    ;info   163, 363
3509 016b 0823          movf    rb2bus_byte_get__value,w
3510 016c 0008          return  
3511                    ; line_number = 163
3512                    ;  return value done
3513            
3514            
3515                    ; delay after procedure statements=non-uniform
3516            
3517            
3518            
3519            
3520                    ; line_number = 166
3521                    ;info   166, 365
3522                    ; procedure rb2bus_byte_put
3523   016d :   rb2bus_byte_put:
3524                    ; Last argument is sitting in W; save into argument variable
3525 016d 00a4          movwf   rb2bus_byte_put__value
3526                    ; delay=4294967295
3527                    ; line_number = 167
3528                    ; argument value byte
3529 00000024 = rb2bus_byte_put__value equ globals___0+4
3530                    ; line_number = 168
3531                    ;  returns_nothing
3532            
3533                    ; # This procedure will send {value} to the bus.  It automatically
3534                    ; # consumes the echo that is on the bus.  If {rb2bus_error} is
3535                    ; # set, this procedure does nothing.
3536            
3537                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3538                    ; line_number = 174
3539                    ;  if !rb2bus_error start
3540                    ;info   174, 366
3541                    ; =>bit_code_emit@symbol(): sym=rb2bus_error
3542                    ; No 1TEST: true.size=0 false.size=16
3543                    ; No 2TEST: true.size=0 false.size=16
3544                    ; 1GOTO: Single test with GOTO
3545 016e 18ef          btfsc   rb2bus_error___byte, rb2bus_error___bit
3546 016f 2980          goto    rb2bus_byte_put__4
3547                    ; # Wait until {_txreg} is ready for a value:
3548                    ; line_number = 176
3549                    ;  while !_txif start
3550   0170 :   rb2bus_byte_put__1:
3551                    ;info   176, 368
3552                    ; =>bit_code_emit@symbol(): sym=_txif
3553                    ; No 1TEST: true.size=0 false.size=2
3554                    ; No 2TEST: true.size=0 false.size=2
3555                    ; 1GOTO: Single test with GOTO
3556 0170 188c          btfsc   _txif___byte, _txif___bit
3557 0171 2974          goto    rb2bus_byte_put__2
3558                    ; line_number = 177
3559                    ; call wait()
3560                    ;info   177, 370
3561 0172 210f          call    wait
3562            
3563 0173 2970          goto    rb2bus_byte_put__1
3564   0174 :   rb2bus_byte_put__2:
3565                    ; Recombine size1 = 0 || size2 = 0
3566                    ; line_number = 176
3567                    ;  while !_txif done
3568                    ; # Ship {value} out to the bus with 9th bit turned off:
3569                    ; line_number = 180
3570                    ;  _adden := _false
3571                    ;info   180, 372
3572 0174 1197          bcf     _adden___byte, _adden___bit
3573                    ; line_number = 181
3574                    ;  _tx9d := _false
3575                    ;info   181, 373
3576 0175 1016          bcf     _tx9d___byte, _tx9d___bit
3577                    ; line_number = 182
3578                    ;  _txreg := value
3579                    ;info   182, 374
3580 0176 0824          movf    rb2bus_byte_put__value,w
3581 0177 0095          movwf   _txreg
3582            
3583                    ; # Wait for the echo to show up:
3584                    ; line_number = 185
3585                    ;  while !_rcif start
3586   0178 :   rb2bus_byte_put__3:
3587                    ;info   185, 376
3588                    ; =>bit_code_emit@symbol(): sym=_rcif
3589                    ; 1TEST: Single test with code in skip slot
3590 0178 1e8c          btfss   _rcif___byte, _rcif___bit
3591                    ; # Still waiting:
3592 0179 2978          goto    rb2bus_byte_put__3
3593                    ; Recombine size1 = 0 || size2 = 0
3594                    ; line_number = 185
3595                    ;  while !_rcif done
3596                    ; # Throw the received byte away (store into {_w}).
3597                    ; line_number = 188
3598                    ;  assemble
3599                    ;info   188, 378
3600                    ; line_number = 189
3601                    ;info   189, 378
3602 017a 0814          movf    _rcreg,w
3603            
3604                    ; # Recover from any receive errors by toggling {_cren}:
3605                    ; line_number = 192
3606                    ;  if _oerr start
3607                    ;info   192, 379
3608                    ; =>bit_code_emit@symbol(): sym=_oerr
3609                    ; 1TEST: Single test with code in skip slot
3610 017b 1897          btfsc   _oerr___byte, _oerr___bit
3611                    ; line_number = 193
3612                    ; _cren := _false
3613                    ;info   193, 380
3614 017c 1217          bcf     _cren___byte, _cren___bit
3615                    ; Recombine size1 = 0 || size2 = 0
3616                    ; line_number = 192
3617                    ;  if _oerr done
3618                    ; line_number = 194
3619                    ; if _ferr start
3620                    ;info   194, 381
3621                    ; =>bit_code_emit@symbol(): sym=_ferr
3622                    ; 1TEST: Single test with code in skip slot
3623 017d 1917          btfsc   _ferr___byte, _ferr___bit
3624                    ; line_number = 195
3625                    ; _cren := _false
3626                    ;info   195, 382
3627 017e 1217          bcf     _cren___byte, _cren___bit
3628                    ; Recombine size1 = 0 || size2 = 0
3629                    ; line_number = 194
3630                    ; if _ferr done
3631                    ; line_number = 196
3632                    ; _cren := _true
3633                    ;info   196, 383
3634 017f 1617          bsf     _cren___byte, _cren___bit
3635            
3636            
3637   0180 :   rb2bus_byte_put__4:
3638                    ; Recombine size1 = 0 || size2 = 0
3639                    ; line_number = 174
3640                    ;  if !rb2bus_error done
3641                    ; delay after procedure statements=non-uniform
3642                    ; Implied return
3643 0180 3400          retlw   0
3644            
3645            
3646            
3647            
3648                    ; line_number = 199
3649                    ;info   199, 385
3650                    ; procedure rb2bus_command
3651   0181 :   rb2bus_command:
3652                    ; Last argument is sitting in W; save into argument variable
3653 0181 00a7          movwf   rb2bus_command__command
3654                    ; delay=4294967295
3655                    ; line_number = 200
3656                    ; argument command byte
3657 00000027 = rb2bus_command__command equ globals___0+7
3658                    ; line_number = 201
3659                    ;  returns_nothing
3660            
3661                    ; # This procedure will process an shared {command}.  This procedure
3662                    ; # accesses the global string {id}.
3663            
3664                    ; line_number = 206
3665                    ;  local new_address byte
3666 00000025 = rb2bus_command__new_address equ globals___0+5
3667                    ; line_number = 207
3668                    ;  local temp byte
3669 00000026 = rb2bus_command__temp equ globals___0+6
3670            
3671                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3672                    ; line_number = 209
3673                    ;  switch command & 7 start
3674                    ;info   209, 386
3675                    ; switch_before:(data:00=uu=>00 code:XX=cc=>XX) size=1
3676 0182 3001          movlw   rb2bus_command__13>>8
3677 0183 008a          movwf   __pclath
3678 0184 3007          movlw   7
3679 0185 0527          andwf   rb2bus_command__command,w
3680                    ; switch after expression:(data:00=uu=>00 code:XX=cc=>XX)
3681 0186 3e88          addlw   rb2bus_command__13
3682 0187 0082          movwf   __pcl
3683                    ; page_group 8
3684   0188 :   rb2bus_command__13:
3685 0188 29c8          goto    rb2bus_command__14
3686 0189 29c8          goto    rb2bus_command__14
3687 018a 29c8          goto    rb2bus_command__14
3688 018b 29c8          goto    rb2bus_command__14
3689 018c 2990          goto    rb2bus_command__9
3690 018d 29bc          goto    rb2bus_command__10
3691 018e 29c5          goto    rb2bus_command__11
3692 018f 29c7          goto    rb2bus_command__12
3693                    ; line_number = 210
3694                    ; case 4
3695   0190 :   rb2bus_command__9:
3696                    ; # 1111 1100 (Address_Set):
3697                    ; # Return old address:
3698                    ; line_number = 213
3699                    ;  call rb2bus_byte_put(rb2bus_address)
3700                    ;info   213, 400
3701 0190 0820          movf    rb2bus_address,w
3702 0191 216d          call    rb2bus_byte_put
3703            
3704                    ; # Fetch new address:
3705                    ; line_number = 216
3706                    ;  new_address := rb2bus_byte_get()
3707                    ;info   216, 402
3708 0192 214b          call    rb2bus_byte_get
3709 0193 00a5          movwf   rb2bus_command__new_address
3710                    ; line_number = 217
3711                    ;  if new_address = 0 || new_address = rb2bus_address start
3712                    ;info   217, 404
3713                    ; Left minus Right
3714 0194 0825          movf    rb2bus_command__new_address,w
3715                    ; =>bit_code_emit@symbol(): sym=__z
3716                    ; No 1TEST: true.size=1 false.size=36
3717                    ; No 2TEST: true.size=1 false.size=36
3718                    ; 2GOTO: Single test with two GOTO's
3719 0195 1903          btfsc   __z___byte, __z___bit
3720 0196 299b          goto    rb2bus_command__5
3721                    ; Recombine code1_bit_states != code2_bit_states
3722                    ; &&||: index=1 true_delay=4294967295 false_delay=4294967295 goto_delay=4294967295
3723                    ; Left minus Right
3724 0197 0820          movf    rb2bus_address,w
3725 0198 0225          subwf   rb2bus_command__new_address,w
3726                    ; =>bit_code_emit@symbol(): sym=__z
3727                    ; No 1TEST: true.size=4 false.size=27
3728                    ; No 2TEST: true.size=4 false.size=27
3729                    ; 2GOTO: Single test with two GOTO's
3730 0199 1d03          btfss   __z___byte, __z___bit
3731 019a 29a0          goto    rb2bus_command__6
3732   019b :   rb2bus_command__5:
3733                    ; line_number = 218
3734                    ; call rb2bus_byte_put(0)
3735                    ;info   218, 411
3736 019b 3000          movlw   0
3737 019c 216d          call    rb2bus_byte_put
3738                    ; line_number = 219
3739                    ;  rb2bus_error := _true
3740                    ;info   219, 413
3741 019d 14ef          bsf     rb2bus_error___byte, rb2bus_error___bit
3742                    ; line_number = 220
3743                    ;  rb2bus_selected := _false
3744                    ;info   220, 414
3745 019e 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
3746 019f 29bb          goto    rb2bus_command__7
3747                    ; 2GOTO: Starting code 2
3748   01a0 :   rb2bus_command__6:
3749                    ; # Return new address:
3750                    ; line_number = 223
3751                    ;  call rb2bus_byte_put(new_address)
3752                    ;info   223, 416
3753 01a0 0825          movf    rb2bus_command__new_address,w
3754 01a1 216d          call    rb2bus_byte_put
3755            
3756                    ; # Fetch new address again as a check:
3757                    ; line_number = 226
3758                    ;  temp := rb2bus_byte_get()
3759                    ;info   226, 418
3760 01a2 214b          call    rb2bus_byte_get
3761 01a3 00a6          movwf   rb2bus_command__temp
3762                    ; line_number = 227
3763                    ;  if temp != new_address start
3764                    ;info   227, 420
3765                    ; Left minus Right
3766 01a4 0825          movf    rb2bus_command__new_address,w
3767 01a5 0226          subwf   rb2bus_command__temp,w
3768                    ; =>bit_code_emit@symbol(): sym=__z
3769                    ; No 1TEST: true.size=14 false.size=4
3770                    ; No 2TEST: true.size=14 false.size=4
3771                    ; 2GOTO: Single test with two GOTO's
3772 01a6 1d03          btfss   __z___byte, __z___bit
3773 01a7 29b7          goto    rb2bus_command__3
3774                    ; line_number = 232
3775                    ; call rb2bus_eedata_write(new_address)
3776                    ;info   232, 424
3777 01a8 0825          movf    rb2bus_command__new_address,w
3778 01a9 21fc          call    rb2bus_eedata_write
3779                    ; line_number = 233
3780                    ;  temp := rb2bus_eedata_read()
3781                    ;info   233, 426
3782 01aa 21e7          call    rb2bus_eedata_read
3783 01ab 00a6          movwf   rb2bus_command__temp
3784                    ; line_number = 234
3785                    ;  if temp = new_address start
3786                    ;info   234, 428
3787                    ; Left minus Right
3788 01ac 0825          movf    rb2bus_command__new_address,w
3789 01ad 0226          subwf   rb2bus_command__temp,w
3790                    ; =>bit_code_emit@symbol(): sym=__z
3791                    ; No 1TEST: true.size=3 false.size=1
3792                    ; No 2TEST: true.size=3 false.size=1
3793                    ; 2GOTO: Single test with two GOTO's
3794 01ae 1d03          btfss   __z___byte, __z___bit
3795 01af 29b4          goto    rb2bus_command__1
3796                    ; line_number = 235
3797                    ; rb2bus_address := new_address
3798                    ;info   235, 432
3799 01b0 0825          movf    rb2bus_command__new_address,w
3800 01b1 00a0          movwf   rb2bus_address
3801                    ; line_number = 236
3802                    ;  call rb2bus_byte_put(rb2_ok)
3803                    ;info   236, 434
3804 01b2 30a5          movlw   165
3805 01b3 29b5          goto    rb2bus_command__2
3806                    ; 2GOTO: Starting code 2
3807   01b4 :   rb2bus_command__1:
3808                    ; line_number = 238
3809                    ; call rb2bus_byte_put(0)
3810                    ;info   238, 436
3811 01b4 3000          movlw   0
3812   01b5 :   rb2bus_command__2:
3813                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3814                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3815                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3816 01b5 216d          call    rb2bus_byte_put
3817                    ; line_number = 234
3818                    ;  if temp = new_address done
3819 01b6 29bb          goto    rb2bus_command__4
3820                    ; 2GOTO: Starting code 2
3821   01b7 :   rb2bus_command__3:
3822                    ; line_number = 228
3823                    ; call rb2bus_byte_put(0)
3824                    ;info   228, 439
3825 01b7 3000          movlw   0
3826 01b8 216d          call    rb2bus_byte_put
3827                    ; line_number = 229
3828                    ;  rb2bus_error := _true
3829                    ;info   229, 441
3830 01b9 14ef          bsf     rb2bus_error___byte, rb2bus_error___bit
3831                    ; line_number = 230
3832                    ;  rb2bus_selected := _false
3833                    ;info   230, 442
3834 01ba 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
3835   01bb :   rb2bus_command__4:
3836                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3837                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3838                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3839                    ; line_number = 227
3840                    ;  if temp != new_address done
3841   01bb :   rb2bus_command__7:
3842                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3843                    ; 2GOTO: code2 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3844                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3845                    ; &&||: index=0 true_delay=4294967295 false_delay=4294967295 goto_delay=4294967295
3846                    ; &&||:: index=0 new_delay=4294967295 goto_delay=4294967295
3847                    ; 2GOTO: No goto needed; true=rb2bus_command__5 false= true_size=1 false_size=36
3848                    ; 2GOTO: code1 final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3849                    ; 2GOTO: code2 final bitstates:(data:XX=cc=>XX code:XX=cc=>XX)
3850                    ; 2GOTO: code final bitstates:(data:00=uu=>00 code:XX=cc=>XX)
3851                    ; line_number = 217
3852                    ;  if new_address = 0 || new_address = rb2bus_address done
3853 01bb 29c8          goto    rb2bus_command__14
3854                    ; line_number = 239
3855                    ; case 5
3856   01bc :   rb2bus_command__10:
3857                    ; # 1111 1101 (Id_next):
3858                    ; line_number = 241
3859                    ;  if rb2bus_index < id.size start
3860                    ;info   241, 444
3861 01bc 3016          movlw   22
3862 01bd 0221          subwf   rb2bus_index,w
3863                    ; =>bit_code_emit@symbol(): sym=__c
3864                    ; No 1TEST: true.size=0 false.size=4
3865                    ; No 2TEST: true.size=0 false.size=4
3866                    ; 1GOTO: Single test with GOTO
3867 01be 1803          btfsc   __c___byte, __c___bit
3868 01bf 29c4          goto    rb2bus_command__8
3869                    ; line_number = 242
3870                    ; call rb2bus_byte_put(id[rb2bus_index])
3871                    ;info   242, 448
3872 01c0 0821          movf    rb2bus_index,w
3873 01c1 2110          call    id
3874 01c2 216d          call    rb2bus_byte_put
3875                    ; line_number = 243
3876                    ;  rb2bus_index := rb2bus_index + 1
3877                    ;info   243, 451
3878 01c3 0aa1          incf    rb2bus_index,f
3879                    ; #if rb2bus_index >= id.size
3880                    ; #	rb2bus_index := rb2bus_index - 1
3881   01c4 :   rb2bus_command__8:
3882                    ; Recombine size1 = 0 || size2 = 0
3883                    ; line_number = 241
3884                    ;  if rb2bus_index < id.size done
3885 01c4 29c8          goto    rb2bus_command__14
3886                    ; line_number = 246
3887                    ; case 6
3888   01c5 :   rb2bus_command__11:
3889                    ; # 1111 1110 (Id_start):
3890                    ; line_number = 248
3891                    ;  rb2bus_index := 0
3892                    ;info   248, 453
3893 01c5 01a1          clrf    rb2bus_index
3894 01c6 29c8          goto    rb2bus_command__14
3895                    ; line_number = 249
3896                    ; case 7
3897   01c7 :   rb2bus_command__12:
3898                    ; # 1111 1111 (Deselect):
3899                    ; line_number = 251
3900                    ;  call rb2bus_deselect()
3901                    ;info   251, 455
3902 01c7 2149          call    rb2bus_deselect
3903            
3904            
3905   01c8 :   rb2bus_command__14:
3906                    ; line_number = 209
3907                    ;  switch command & 7 done
3908                    ; delay after procedure statements=non-uniform
3909                    ; Implied return
3910 01c8 3400          retlw   0
3911            
3912            
3913            
3914            
3915                    ; buffer = 'rb2bus_pic16f688'
3916                    ; line_number = 18
3917                    ;info   18, 457
3918                    ; procedure rb2bus_initialize
3919   01c9 :   rb2bus_initialize:
3920                    ; Last argument is sitting in W; save into argument variable
3921 01c9 00a8          movwf   rb2bus_initialize__address
3922                    ; delay=4294967295
3923                    ; line_number = 19
3924                    ; argument address byte
3925 00000028 = rb2bus_initialize__address equ globals___0+8
3926                    ; line_number = 20
3927                    ;  returns_nothing
3928            
3929                    ; # This procedure is responsibile for initializing the UART
3930                    ; # connected to the bus.  {address} is the address of this
3931                    ; # slave module.  This code is specific to the PIC16F688.
3932            
3933                    ; # Warm up the UART:
3934                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
3935                    ; line_number = 27
3936                    ;  _trisc@5 := _true
3937                    ;info   27, 458
3938 00000087 = rb2bus_initialize__select__1___byte equ _trisc
3939 00000005 = rb2bus_initialize__select__1___bit equ 5
3940 01ca 1683          bsf     __rp0___byte, __rp0___bit
3941 01cb 1687          bsf     rb2bus_initialize__select__1___byte, rb2bus_initialize__select__1___bit
3942                    ; line_number = 28
3943                    ;  _trisc@4 := _true
3944                    ;info   28, 460
3945 00000087 = rb2bus_initialize__select__2___byte equ _trisc
3946 00000004 = rb2bus_initialize__select__2___bit equ 4
3947 01cc 1607          bsf     rb2bus_initialize__select__2___byte, rb2bus_initialize__select__2___bit
3948            
3949                    ; # Initialize the {_txsta} register:
3950                    ; line_number = 31
3951                    ;  _txsta := 0
3952                    ;info   31, 461
3953 01cd 1283          bcf     __rp0___byte, __rp0___bit
3954 01ce 0196          clrf    _txsta
3955                    ; line_number = 32
3956                    ;  _tx9 := _true
3957                    ;info   32, 463
3958 01cf 1716          bsf     _tx9___byte, _tx9___bit
3959                    ; #_tx9 := _false
3960                    ; line_number = 34
3961                    ;  _txen := _true
3962                    ;info   34, 464
3963 01d0 1696          bsf     _txen___byte, _txen___bit
3964                    ; line_number = 35
3965                    ;  _brgh := _true
3966                    ;info   35, 465
3967 01d1 1516          bsf     _brgh___byte, _brgh___bit
3968            
3969                    ; # Initialize the {_rcsta} register:
3970                    ; line_number = 38
3971                    ;  _rcsta := 0
3972                    ;info   38, 466
3973 01d2 0197          clrf    _rcsta
3974                    ; line_number = 39
3975                    ;  _spen := _true
3976                    ;info   39, 467
3977 01d3 1797          bsf     _spen___byte, _spen___bit
3978                    ; line_number = 40
3979                    ;  _rx9 := _true
3980                    ;info   40, 468
3981 01d4 1717          bsf     _rx9___byte, _rx9___bit
3982                    ; line_number = 41
3983                    ;  _cren := _true
3984                    ;info   41, 469
3985 01d5 1617          bsf     _cren___byte, _cren___bit
3986                    ; #_adden := _true
3987                    ; line_number = 43
3988                    ;  _adden := _false
3989                    ;info   43, 470
3990 01d6 1197          bcf     _adden___byte, _adden___bit
3991            
3992                    ; # Set up the baud rate generator:
3993                    ; line_number = 46
3994                    ;  _baudctl := 0
3995                    ;info   46, 471
3996 01d7 0191          clrf    _baudctl
3997                    ; line_number = 47
3998                    ;  _brg16 := _true
3999                    ;info   47, 472
4000 01d8 1591          bsf     _brg16___byte, _brg16___bit
4001                    ; line_number = 48
4002                    ;  _spbrg := _eusart_500000_low
4003                    ;info   48, 473
4004 01d9 3009          movlw   9
4005 01da 0093          movwf   _spbrg
4006                    ; line_number = 49
4007                    ;  _spbrgh := _eusart_500000_high
4008                    ;info   49, 475
4009 01db 0192          clrf    _spbrgh
4010            
4011                    ; line_number = 51
4012                    ;  rb2bus_selected := _false
4013                    ;info   51, 476
4014 01dc 106f          bcf     rb2bus_selected___byte, rb2bus_selected___bit
4015                    ; line_number = 52
4016                    ;  rb2bus_error := _false
4017                    ;info   52, 477
4018 01dd 10ef          bcf     rb2bus_error___byte, rb2bus_error___bit
4019                    ; line_number = 53
4020                    ;  rb2bus_index := 0
4021                    ;info   53, 478
4022 01de 01a1          clrf    rb2bus_index
4023            
4024                    ; # Deal with setting {rb2bus_address} from EEData memory:
4025                    ; line_number = 56
4026                    ;  rb2bus_address := rb2bus_eedata_read()
4027                    ;info   56, 479
4028 01df 21e7          call    rb2bus_eedata_read
4029 01e0 00a0          movwf   rb2bus_address
4030                    ; line_number = 57
4031                    ;  if rb2bus_address = 0 start
4032                    ;info   57, 481
4033                    ; Left minus Right
4034 01e1 0820          movf    rb2bus_address,w
4035                    ; =>bit_code_emit@symbol(): sym=__z
4036                    ; No 1TEST: true.size=2 false.size=0
4037                    ; No 2TEST: true.size=2 false.size=0
4038                    ; 1GOTO: Single test with GOTO
4039 01e2 1d03          btfss   __z___byte, __z___bit
4040 01e3 29e6          goto    rb2bus_initialize__3
4041                    ; # EE data not set, so use {address} passed in as a argument:
4042                    ; line_number = 59
4043                    ;  rb2bus_address := address
4044                    ;info   59, 484
4045 01e4 0828          movf    rb2bus_initialize__address,w
4046 01e5 00a0          movwf   rb2bus_address
4047            
4048            
4049                    ; Recombine size1 = 0 || size2 = 0
4050   01e6 :   rb2bus_initialize__3:
4051                    ; line_number = 57
4052                    ;  if rb2bus_address = 0 done
4053                    ; delay after procedure statements=non-uniform
4054                    ; Implied return
4055 01e6 3400          retlw   0
4056            
4057            
4058            
4059            
4060                    ; line_number = 64
4061                    ;info   64, 487
4062                    ; procedure rb2bus_eedata_read
4063   01e7 :   rb2bus_eedata_read:
4064                    ; arguments_none
4065                    ; line_number = 66
4066                    ;  returns byte
4067            
4068                    ; # This procedure will return the address stored in EEData.  If
4069                    ; # there is no data, 0 is returned.
4070            
4071                    ; line_number = 71
4072                    ;  local temp1 byte
4073 00000029 = rb2bus_eedata_read__temp1 equ globals___0+9
4074                    ; line_number = 72
4075                    ;  local temp2 byte
4076 0000002a = rb2bus_eedata_read__temp2 equ globals___0+10
4077            
4078                    ; # Read the first byte (the address):
4079                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
4080                    ; line_number = 75
4081                    ;  _eecon1 := 0
4082                    ;info   75, 487
4083 01e7 1683          bsf     __rp0___byte, __rp0___bit
4084 01e8 019c          clrf    _eecon1
4085                    ; line_number = 76
4086                    ;  _eeadr := rb2bus_eedata_address
4087                    ;info   76, 489
4088 01e9 30fe          movlw   254
4089 01ea 009b          movwf   _eeadr
4090                    ; line_number = 77
4091                    ;  _rd := _true
4092                    ;info   77, 491
4093 01eb 141c          bsf     _rd___byte, _rd___bit
4094                    ; line_number = 78
4095                    ;  temp1 := _eedat
4096                    ;info   78, 492
4097 01ec 081a          movf    _eedat,w
4098 01ed 1283          bcf     __rp0___byte, __rp0___bit
4099 01ee 00a9          movwf   rb2bus_eedata_read__temp1
4100            
4101                    ; # Read the second byte (the 1'z complement)
4102                    ; line_number = 81
4103                    ;  _eeadr := _eeadr + 1
4104                    ;info   81, 495
4105 01ef 1683          bsf     __rp0___byte, __rp0___bit
4106 01f0 0a9b          incf    _eeadr,f
4107                    ; line_number = 82
4108                    ;  _rd := _true
4109                    ;info   82, 497
4110 01f1 141c          bsf     _rd___byte, _rd___bit
4111                    ; line_number = 83
4112                    ;  temp2 := _eedat
4113                    ;info   83, 498
4114 01f2 081a          movf    _eedat,w
4115 01f3 1283          bcf     __rp0___byte, __rp0___bit
4116 01f4 00aa          movwf   rb2bus_eedata_read__temp2
4117            
4118                    ; # If they are 1's complement of one another, they are valid:
4119                    ; line_number = 86
4120                    ;  if temp1 = (0xff ^ temp2) start
4121                    ;info   86, 501
4122                    ; Left minus Right
4123 01f5 092a          comf    rb2bus_eedata_read__temp2,w
4124 01f6 0229          subwf   rb2bus_eedata_read__temp1,w
4125                    ; =>bit_code_emit@symbol(): sym=__z
4126                    ; No 1TEST: true.size=2 false.size=0
4127                    ; No 2TEST: true.size=2 false.size=0
4128                    ; 1GOTO: Single test with GOTO
4129 01f7 1d03          btfss   __z___byte, __z___bit
4130 01f8 29fb          goto    rb2bus_eedata_read__1
4131                    ; # Return the valid address:
4132                    ; line_number = 88
4133                    ;  return temp1 start
4134                    ; line_number = 88
4135                    ;info   88, 505
4136 01f9 0829          movf    rb2bus_eedata_read__temp1,w
4137 01fa 0008          return  
4138                    ; line_number = 88
4139                    ;  return temp1 done
4140            
4141                    ; Recombine size1 = 0 || size2 = 0
4142   01fb :   rb2bus_eedata_read__1:
4143                    ; line_number = 86
4144                    ;  if temp1 = (0xff ^ temp2) done
4145                    ; # They are not 1's complement, so return 0 as an error:
4146                    ; line_number = 91
4147                    ;  return 0 start
4148                    ; line_number = 91
4149                    ;info   91, 507
4150 01fb 3400          retlw   0
4151                    ; line_number = 91
4152                    ;  return 0 done
4153            
4154            
4155                    ; delay after procedure statements=non-uniform
4156            
4157            
4158            
4159            
4160                    ; line_number = 94
4161                    ;info   94, 508
4162                    ; procedure rb2bus_eedata_write
4163   01fc :   rb2bus_eedata_write:
4164                    ; Last argument is sitting in W; save into argument variable
4165 01fc 00ab          movwf   rb2bus_eedata_write__address
4166                    ; delay=4294967295
4167                    ; line_number = 95
4168                    ; argument address byte
4169 0000002b = rb2bus_eedata_write__address equ globals___0+11
4170                    ; line_number = 96
4171                    ;  returns_nothing
4172            
4173                    ; # This procedure will write {address} into the EEData.  The
4174                    ; # microcontroll pauses while the EEData is written.
4175            
4176                    ; # Clear out the {_eecon1} register
4177                    ; before procedure statements delay=non-uniform, bit states=(data:00=uu=>00 code:XX=cc=>XX)
4178                    ; line_number = 102
4179                    ;  _eecon1 := 0
4180                    ;info   102, 509
4181 01fd 1683          bsf     __rp0___byte, __rp0___bit
4182 01fe 019c          clrf    _eecon1
4183                    ; line_number = 103
4184                    ;  _eeadr := rb2bus_eedata_address
4185                    ;info   103, 511
4186 01ff 30fe          movlw   254
4187 0200 009b          movwf   _eeadr
4188                    ; line_number = 104
4189                    ;  _eedat := address
4190                    ;info   104, 513
4191 0201 1283          bcf     __rp0___byte, __rp0___bit
4192 0202 082b          movf    rb2bus_eedata_write__address,w
4193 0203 1683          bsf     __rp0___byte, __rp0___bit
4194 0204 009a          movwf   _eedat
4195            
4196                    ; # Write 2 bytes ({address} followed by {address}^0xff):
4197                    ; line_number = 107
4198                    ;  loop_exactly 2 start
4199                    ;info   107, 517
4200 00000031 = rb2bus_eedata_write__1 equ globals___0+17
4201 0205 3002          movlw   2
4202 0206 1283          bcf     __rp0___byte, __rp0___bit
4203 0207 00b1          movwf   rb2bus_eedata_write__1
4204   0208 :   rb2bus_eedata_write__2:
4205                    ; # Set the data to write:
4206            
4207                    ; # Set up the for the write:
4208                    ; line_number = 111
4209                    ;  _wren := _true
4210                    ;info   111, 520
4211 0208 1683          bsf     __rp0___byte, __rp0___bit
4212 0209 151c          bsf     _wren___byte, _wren___bit
4213                    ; line_number = 112
4214                    ;  _gie := _false
4215                    ;info   112, 522
4216 020a 138b          bcf     _gie___byte, _gie___bit
4217                    ; line_number = 113
4218                    ;  _eecon2 := 0x55
4219                    ;info   113, 523
4220 020b 3055          movlw   85
4221 020c 009d          movwf   _eecon2
4222                    ; line_number = 114
4223                    ;  _eecon2 := 0xaa
4224                    ;info   114, 525
4225 020d 30aa          movlw   170
4226 020e 009d          movwf   _eecon2
4227                    ; # Start the write:
4228                    ; line_number = 116
4229                    ;  _wr := _true
4230                    ;info   116, 527
4231 020f 149c          bsf     _wr___byte, _wr___bit
4232            
4233                    ; # Wait for write to complete:
4234                    ; line_number = 119
4235                    ;  while _wr start
4236   0210 :   rb2bus_eedata_write__3:
4237                    ;info   119, 528
4238                    ; =>bit_code_emit@symbol(): sym=_wr
4239                    ; 1TEST: Single test with code in skip slot
4240 0210 189c          btfsc   _wr___byte, _wr___bit
4241                    ; line_number = 120
4242                    ; do_nothing
4243                    ;info   120, 529
4244            
4245 0211 2a10          goto    rb2bus_eedata_write__3
4246                    ; Recombine size1 = 0 || size2 = 0
4247                    ; line_number = 119
4248                    ;  while _wr done
4249                    ; # Disable writing:
4250                    ; line_number = 123
4251                    ;  _wren := _false
4252                    ;info   123, 530
4253 0212 111c          bcf     _wren___byte, _wren___bit
4254            
4255                    ; # Prepare the second byte of data:
4256                    ; line_number = 126
4257                    ;  _eeadr := _eeadr + 1
4258                    ;info   126, 531
4259 0213 0a9b          incf    _eeadr,f
4260                    ; line_number = 127
4261                    ;  _eedat := address ^ 0xff
4262                    ;info   127, 532
4263 0214 1283          bcf     __rp0___byte, __rp0___bit
4264 0215 092b          comf    rb2bus_eedata_write__address,w
4265 0216 1683          bsf     __rp0___byte, __rp0___bit
4266 0217 009a          movwf   _eedat
4267            
4268 0218 1283          bcf     __rp0___byte, __rp0___bit
4269                    ; line_number = 107
4270                    ;  loop_exactly 2 wrap-up
4271 0219 0bb1          decfsz  rb2bus_eedata_write__1,f
4272 021a 2a08          goto    rb2bus_eedata_write__2
4273                    ; line_number = 107
4274                    ;  loop_exactly 2 done
4275                    ; delay after procedure statements=non-uniform
4276                    ; Implied return
4277 021b 3400          retlw   0
4278            
4279            
4280            
4281            
4282                    ; Configuration bits
4283                    ; address = 0x2007, fill = 0x3000
4284                    ; fcmen = off (0x0)
4285                    ; ieso = off (0x0)
4286                    ; boden = off (0x0)
4287                    ; cpd = off (0x80)
4288                    ; cp = off (0x40)
4289                    ; mclre = off (0x0)
4290                    ; pwrte = off (0x10)
4291                    ; wdte = off (0x0)
4292                    ; fosc = hs (0x2)
4293                    ; 12498 = 0x30d2
4294   30d2 =           __config 12498
4295                    ; Define start addresses for data regions
4296                    ; Region="shared___globals" Address=112" Size=16 Bytes=0 Bits=0 Available=16
4297                    ; Region="globals___0" Address=32" Size=80 Bytes=18 Bits=4 Available=61
4298                    ; Region="globals___1" Address=160" Size=80 Bytes=0 Bits=0 Available=80
4299                    ; Region="globals___2" Address=288" Size=80 Bytes=0 Bits=0 Available=80
4300                    ; Region="shared___globals" Address=112" Size=16 Bytes=0 Bits=0 Available=16
4301                    end
