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