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