1                       radix   dec
2                       ; Code bank 0; Start address: 0; End address: 1023
3      0000 :           org     0
4               
5                       ; Define start addresses for data regions
6    00000020 = shared___globals equ 32
7    00000000 = __indf equ 0
8    00000002 = __pcl equ 2
9    00000003 = __status equ 3
10   00000004 = __fsr equ 4
11   00000003 = __c___byte equ 3
12   00000000 = __c___bit equ 0
13   00000003 = __z___byte equ 3
14   00000002 = __z___bit equ 2
15   00000003 = __rp0___byte equ 3
16   00000005 = __rp0___bit equ 5
17   00000003 = __rp1___byte equ 3
18   00000006 = __rp1___bit equ 6
19   00000003 = __irp___byte equ 3
20   00000007 = __irp___bit equ 7
21   0000000a = __pclath equ 10
22   0000000a = __cb0___byte equ 10
23   00000003 = __cb0___bit equ 3
24   0000000a = __cb1___byte equ 10
25   00000004 = __cb1___bit equ 4
26                      ; # #############################################################################
27                      ; #
28                      ; # Copyright (c) 2000-2004 by Wayne C. Gramlich & William T. Benson.
29                      ; # All rights reserved.
30                      ; #
31                      ; # This is the code that implements the IREdge4 RoboBrick.  Basically
32                      ; # it just waits for commands that come in at 2400 baud and responds
33                      ; # to them.  See
34                      ; #
35                      ; #   http://web.gramlich.net/projects/robobricks/iredge4/index.html
36                      ; #
37                      ; # for more details.
38                      ; #
39                      ; # #############################################################################
40              
41                      ; buffer = 'iredge4'
42                      ; line_number = 16
43                      ; library _pic16f676 entered
44                      ; # Copyright (c) 2004 by Wayne C. Gramlich
45                      ; # All rights reserved.
46              
47                      ; buffer = '_pic16f676'
48                      ; line_number = 5
49                      ; processor pic16f676
50                      ; line_number = 6
51                      ; configure_address 0x2007
52                      ; line_number = 7
53                      ;  configure_fill 0x0000
54                      ; line_number = 8
55                      ;  configure_option bg: bg11 = 0x3000
56                      ; line_number = 9
57                      ;  configure_option bg: bg10 = 0x2000
58                      ; line_number = 10
59                      ;  configure_option bg: bg01 = 0x1000
60                      ; line_number = 11
61                      ;  configure_option bg: bg00 = 0x0000
62                      ; line_number = 12
63                      ;  configure_option cpd: on = 0x000
64                      ; line_number = 13
65                      ;  configure_option cpd: off = 0x100
66                      ; line_number = 14
67                      ;  configure_option cp: on = 0x00
68                      ; line_number = 15
69                      ;  configure_option cp: off = 0x80
70                      ; line_number = 16
71                      ;  configure_option boden: on = 0x40
72                      ; line_number = 17
73                      ;  configure_option boden: off = 0x00
74                      ; line_number = 18
75                      ;  configure_option mclre: on = 0x20
76                      ; line_number = 19
77                      ;  configure_option mclre: off = 0x00
78                      ; line_number = 20
79                      ;  configure_option pwrte: on = 0x00
80                      ; line_number = 21
81                      ;  configure_option pwrte: off = 0x10
82                      ; line_number = 22
83                      ;  configure_option wdte: on = 8
84                      ; line_number = 23
85                      ;  configure_option wdte: off = 0
86                      ; line_number = 24
87                      ;  configure_option fosc: rc_clk = 7
88                      ; line_number = 25
89                      ;  configure_option fosc: rc_no_clk = 6
90                      ; line_number = 26
91                      ;  configure_option fosc: int_clk = 5
92                      ; line_number = 27
93                      ;  configure_option fosc: int_no_clk = 4
94                      ; line_number = 28
95                      ;  configure_option fosc: ec = 3
96                      ; line_number = 29
97                      ;  configure_option fosc: hs = 2
98                      ; line_number = 30
99                      ;  configure_option fosc: xt = 1
100                     ; line_number = 31
101                     ;  configure_option fosc: lp = 0
102                     ; line_number = 32
103                     ;  code_bank 0x0 : 0x3ff
104                     ; line_number = 33
105                     ;  data_bank 0x0 : 0x7f
106                     ; line_number = 34
107                     ;  data_bank 0x80 : 0xff
108                     ; line_number = 35
109                     ;  shared_region 0x20 : 0x5f
110                     ; line_number = 36
111                     ;  interrupts_possible
112                     ; line_number = 37
113                     ;  osccal_register_symbol _osccal
114                     ; line_number = 38
115                     ;  osccal_at_address 0x3ff
116                     ; line_number = 39
117                     ;  packages pdip=14, soic=14, tssop=14
118                     ; line_number = 40
119                     ;  pin vdd, power_supply
120                     ; line_number = 41
121                     ; pin_bindings pdip=1, soic=1, tssop=1
122                     ; line_number = 42
123                     ; pin ra5_in, ra5_out, t1cki, osc1, clkin
124                     ; line_number = 43
125                     ; pin_bindings pdip=2, soic=2, tssop=2
126                     ; line_number = 44
127                     ;  bind_to _porta@5
128                     ; line_number = 45
129                     ;  or_if ra5_in _trisa 16
130                     ; line_number = 46
131                     ;  or_if ra5_out _trisa 0
132                     ; line_number = 47
133                     ; pin ra4_in, ra4_out, t1g, osc2, an3, clkout
134                     ; line_number = 48
135                     ; pin_bindings pdip=3, soic=3, tssop=3
136                     ; line_number = 49
137                     ;  bind_to _porta@4
138                     ; line_number = 50
139                     ;  or_if ra4_in _trisa 8
140                     ; line_number = 51
141                     ;  or_if ra4_out _trisa 0
142                     ; line_number = 52
143                     ;  or_if an3 _trisa 8
144                     ; line_number = 53
145                     ;  or_if an3 _ansel 8
146                     ; line_number = 54
147                     ;  or_if an3 _adcon0 1
148                     ; line_number = 55
149                     ; pin ra3_in, mclr, vpp
150                     ; line_number = 56
151                     ; pin_bindings pdip=4, soic=4, tssop=4
152                     ; line_number = 57
153                     ;  bind_to _porta@4
154                     ; line_number = 58
155                     ;  or_if ra3_in _trisa 4
156                     ; line_number = 59
157                     ; pin rc5_in, rc5_out
158                     ; line_number = 60
159                     ; pin_bindings pdip=5, soic=5, tssop=5
160                     ; line_number = 61
161                     ;  bind_to _portc@5
162                     ; line_number = 62
163                     ;  or_if rc5_in _trisc 32
164                     ; line_number = 63
165                     ;  or_if rc5_out _trisc 0
166                     ; line_number = 64
167                     ; pin rc4_in, rc4_out
168                     ; line_number = 65
169                     ; pin_bindings pdip=6, soic=6, tssop=6
170                     ; line_number = 66
171                     ;  bind_to _portc@4
172                     ; line_number = 67
173                     ;  or_if rc4_in _trisc 16
174                     ; line_number = 68
175                     ;  or_if rc4_out _trisc 0
176                     ; line_number = 69
177                     ; pin rc3_in, rc3_out, an7
178                     ; line_number = 70
179                     ; pin_bindings pdip=7, soic=7, tssop=7
180                     ; line_number = 71
181                     ;  bind_to _portc@3
182                     ; line_number = 72
183                     ;  or_if rc3_in _trisc 8
184                     ; line_number = 73
185                     ;  or_if rc3_out _trisc 0
186                     ; line_number = 74
187                     ;  or_if an7 _trisc 8
188                     ; line_number = 75
189                     ;  or_if an7 _ansel 128
190                     ; line_number = 76
191                     ;  or_if an7 _adcon0 1
192                     ; line_number = 77
193                     ; pin rc2_in, rc2_out, an6
194                     ; line_number = 78
195                     ; pin_bindings pdip=8, soic=8, tssop=8
196                     ; line_number = 79
197                     ;  bind_to _portc@2
198                     ; line_number = 80
199                     ;  or_if rc2_in _trisc 4
200                     ; line_number = 81
201                     ;  or_if rc2_out _trisc 0
202                     ; line_number = 82
203                     ;  or_if an6 _trisc 4
204                     ; line_number = 83
205                     ;  or_if an6 _ansel 64
206                     ; line_number = 84
207                     ;  or_if an6 _adcon0 1
208                     ; line_number = 85
209                     ; pin rc1_in, rc1_out, an5
210                     ; line_number = 86
211                     ; pin_bindings pdip=9, soic=9, tssop=9
212                     ; line_number = 87
213                     ;  bind_to _portc@1
214                     ; line_number = 88
215                     ;  or_if rc1_in _trisc 2
216                     ; line_number = 89
217                     ;  or_if rc1_out _trisc 0
218                     ; line_number = 90
219                     ;  or_if an5 _trisc 2
220                     ; line_number = 91
221                     ;  or_if an5 _ansel 32
222                     ; line_number = 92
223                     ;  or_if an5 _adcon0 1
224                     ; line_number = 93
225                     ; pin rc0_in, rc0_out, an4
226                     ; line_number = 94
227                     ; pin_bindings pdip=10, soic=10, tssop=10
228                     ; line_number = 95
229                     ;  bind_to _portc@0
230                     ; line_number = 96
231                     ;  or_if rc0_in _trisc 1
232                     ; line_number = 97
233                     ;  or_if rc0_out _trisc 0
234                     ; line_number = 98
235                     ;  or_if an4 _trisc 1
236                     ; line_number = 99
237                     ;  or_if an4 _ansel 16
238                     ; line_number = 100
239                     ;  or_if an4 _adcon0 1
240                     ; line_number = 101
241                     ; pin ra2_in, ra2_out, an2, cout, t0cki, int
242                     ; line_number = 102
243                     ; pin_bindings pdip=11, soic=11, tssop=11
244                     ; line_number = 103
245                     ;  bind_to _porta@2
246                     ; line_number = 104
247                     ;  or_if ra2_in _trisa 4
248                     ; line_number = 105
249                     ;  or_if ra2_out _trisa 0
250                     ; line_number = 106
251                     ;  or_if an2 _trisa 4
252                     ; line_number = 107
253                     ;  or_if an2 _ansel 4
254                     ; line_number = 108
255                     ;  or_if an2 _adcon0 1
256                     ; line_number = 109
257                     ; pin ra1_in, ra1_out, an1, cin_minus, vref, icspclk
258                     ; line_number = 110
259                     ; pin_bindings pdip=12, soic=12, tssop=12
260                     ; line_number = 111
261                     ;  bind_to _porta@1
262                     ; line_number = 112
263                     ;  or_if ra1_in _trisa 2
264                     ; line_number = 113
265                     ;  or_if ra1_out _trisa 0
266                     ; line_number = 114
267                     ;  or_if an1 _trisa 2
268                     ; line_number = 115
269                     ;  or_if an1 _ansel 2
270                     ; line_number = 116
271                     ;  or_if an1 _adcon0 1
272                     ; line_number = 117
273                     ; pin ra0_in, ra0_out, an0, cin_plus, icspdat
274                     ; line_number = 118
275                     ; pin_bindings pdip=13, soic=13, tssop=13
276                     ; line_number = 119
277                     ;  bind_to _porta@0
278                     ; line_number = 120
279                     ;  or_if ra0_in _trisa 1
280                     ; line_number = 121
281                     ;  or_if ra0_out _trisa 0
282                     ; line_number = 122
283                     ;  or_if an0 _trisa 1
284                     ; line_number = 123
285                     ;  or_if an0 _ansel 1
286                     ; line_number = 124
287                     ;  or_if an0 _adcon0 1
288                     ; line_number = 125
289                     ; pin vss, ground
290                     ; line_number = 126
291                     ; pin_bindings pdip=14, soic=14, tssop=14
292             
293             
294                     ; line_number = 131
295                     ; library _pic16f630_676 entered
296                     ; # Copyright (c) 2004 by Wayne C. Gramlich
297                     ; # All rights reserved.
298             
299                     ; # Shared register definitions for the PIC16F630 and PIC16F676.
300             
301                     ; buffer = '_pic16f630_676'
302                     ; line_number = 7
303                     ; register _indf = 
304  00000000 = _indf equ 0
305             
306                     ; line_number = 9
307                     ; register _tmr0 = 
308  00000001 = _tmr0 equ 1
309             
310                     ; line_number = 11
311                     ; register _pcl = 
312  00000002 = _pcl equ 2
313             
314                     ; line_number = 13
315                     ; register _status = 
316  00000003 = _status equ 3
317                     ; line_number = 14
318                     ; bind _rp0 = _status@5
319  00000003 = _rp0___byte equ _status
320  00000005 = _rp0___bit equ 5
321                     ; line_number = 15
322                     ; bind _to = _status@4
323  00000003 = _to___byte equ _status
324  00000004 = _to___bit equ 4
325                     ; line_number = 16
326                     ; bind _pd = _status@3
327  00000003 = _pd___byte equ _status
328  00000003 = _pd___bit equ 3
329                     ; line_number = 17
330                     ; bind _z = _status@2
331  00000003 = _z___byte equ _status
332  00000002 = _z___bit equ 2
333                     ; line_number = 18
334                     ; bind _dc = _status@1
335  00000003 = _dc___byte equ _status
336  00000001 = _dc___bit equ 1
337                     ; line_number = 19
338                     ; bind _c = _status@0
339  00000003 = _c___byte equ _status
340  00000000 = _c___bit equ 0
341             
342                     ; line_number = 21
343                     ; register _fsr = 
344  00000004 = _fsr equ 4
345             
346                     ; line_number = 23
347                     ; register _porta = 
348  00000005 = _porta equ 5
349                     ; line_number = 24
350                     ; register _ra = 
351  00000005 = _ra equ 5
352                     ; line_number = 25
353                     ; bind _ra5 = _porta@5
354  00000005 = _ra5___byte equ _porta
355  00000005 = _ra5___bit equ 5
356                     ; line_number = 26
357                     ; bind _ra4 = _porta@4
358  00000005 = _ra4___byte equ _porta
359  00000004 = _ra4___bit equ 4
360                     ; line_number = 27
361                     ; bind _ra3 = _porta@3
362  00000005 = _ra3___byte equ _porta
363  00000003 = _ra3___bit equ 3
364                     ; line_number = 28
365                     ; bind _ra2 = _porta@2
366  00000005 = _ra2___byte equ _porta
367  00000002 = _ra2___bit equ 2
368                     ; line_number = 29
369                     ; bind _ra1 = _porta@1
370  00000005 = _ra1___byte equ _porta
371  00000001 = _ra1___bit equ 1
372                     ; line_number = 30
373                     ; bind _ra0 = _porta@0
374  00000005 = _ra0___byte equ _porta
375  00000000 = _ra0___bit equ 0
376             
377                     ; line_number = 32
378                     ; register _portc = 
379  00000007 = _portc equ 7
380                     ; line_number = 33
381                     ; register _rc = 
382  00000007 = _rc equ 7
383                     ; line_number = 34
384                     ; bind _rc5 = _portc@5
385  00000007 = _rc5___byte equ _portc
386  00000005 = _rc5___bit equ 5
387                     ; line_number = 35
388                     ; bind _rc4 = _portc@4
389  00000007 = _rc4___byte equ _portc
390  00000004 = _rc4___bit equ 4
391                     ; line_number = 36
392                     ; bind _rc3 = _portc@3
393  00000007 = _rc3___byte equ _portc
394  00000003 = _rc3___bit equ 3
395                     ; line_number = 37
396                     ; bind _rc2 = _portc@2
397  00000007 = _rc2___byte equ _portc
398  00000002 = _rc2___bit equ 2
399                     ; line_number = 38
400                     ; bind _rc1 = _portc@1
401  00000007 = _rc1___byte equ _portc
402  00000001 = _rc1___bit equ 1
403                     ; line_number = 39
404                     ; bind _rc0 = _portc@0
405  00000007 = _rc0___byte equ _portc
406  00000000 = _rc0___bit equ 0
407             
408                     ; line_number = 41
409                     ; register _pclath = 
410  0000000a = _pclath equ 10
411             
412                     ; line_number = 43
413                     ; register _intcon = 
414  0000000b = _intcon equ 11
415                     ; line_number = 44
416                     ; bind _gie = _intcon@7
417  0000000b = _gie___byte equ _intcon
418  00000007 = _gie___bit equ 7
419                     ; line_number = 45
420                     ; bind _peie = _intcon@6
421  0000000b = _peie___byte equ _intcon
422  00000006 = _peie___bit equ 6
423                     ; line_number = 46
424                     ; bind _t0ie = _intcon@5
425  0000000b = _t0ie___byte equ _intcon
426  00000005 = _t0ie___bit equ 5
427                     ; line_number = 47
428                     ; bind _inte = _intcon@4
429  0000000b = _inte___byte equ _intcon
430  00000004 = _inte___bit equ 4
431                     ; line_number = 48
432                     ; bind _raie = _intcon@3
433  0000000b = _raie___byte equ _intcon
434  00000003 = _raie___bit equ 3
435                     ; line_number = 49
436                     ; bind _t0if = _intcon@2
437  0000000b = _t0if___byte equ _intcon
438  00000002 = _t0if___bit equ 2
439                     ; line_number = 50
440                     ; bind _intf = _intcon@1
441  0000000b = _intf___byte equ _intcon
442  00000001 = _intf___bit equ 1
443                     ; line_number = 51
444                     ; bind _raif = _intcon@0
445  0000000b = _raif___byte equ _intcon
446  00000000 = _raif___bit equ 0
447             
448                     ; line_number = 53
449                     ; register _pir1 = 
450  0000000c = _pir1 equ 12
451                     ; line_number = 54
452                     ; bind _eeif = _pir1@7
453  0000000c = _eeif___byte equ _pir1
454  00000007 = _eeif___bit equ 7
455                     ; line_number = 55
456                     ; bind _cmif = _pir1@3
457  0000000c = _cmif___byte equ _pir1
458  00000003 = _cmif___bit equ 3
459                     ; line_number = 56
460                     ; bind _tmr1if = _pir1@0
461  0000000c = _tmr1if___byte equ _pir1
462  00000000 = _tmr1if___bit equ 0
463             
464                     ; line_number = 58
465                     ; register _tmr1l = 
466  0000000e = _tmr1l equ 14
467             
468                     ; line_number = 60
469                     ; register _tmr1h = 
470  0000000f = _tmr1h equ 15
471             
472                     ; line_number = 62
473                     ; register _t1con = 
474  00000010 = _t1con equ 16
475                     ; line_number = 63
476                     ; bind _t1ge = _t1con@6
477  00000010 = _t1ge___byte equ _t1con
478  00000006 = _t1ge___bit equ 6
479                     ; line_number = 64
480                     ; bind _t1ckps1 = _t1con@5
481  00000010 = _t1ckps1___byte equ _t1con
482  00000005 = _t1ckps1___bit equ 5
483                     ; line_number = 65
484                     ; bind _t1ckps0 = _t1con@4
485  00000010 = _t1ckps0___byte equ _t1con
486  00000004 = _t1ckps0___bit equ 4
487                     ; line_number = 66
488                     ; bind _t1oscen = _t1con@3
489  00000010 = _t1oscen___byte equ _t1con
490  00000003 = _t1oscen___bit equ 3
491                     ; line_number = 67
492                     ; bind _t1sync = _t1con@2
493  00000010 = _t1sync___byte equ _t1con
494  00000002 = _t1sync___bit equ 2
495                     ; line_number = 68
496                     ; bind _tmr1cs = _t1con@1
497  00000010 = _tmr1cs___byte equ _t1con
498  00000001 = _tmr1cs___bit equ 1
499                     ; line_number = 69
500                     ; bind _tmr1on = _t1con@0
501  00000010 = _tmr1on___byte equ _t1con
502  00000000 = _tmr1on___bit equ 0
503             
504                     ; line_number = 71
505                     ; register _cmcon = 
506  00000019 = _cmcon equ 25
507                     ; line_number = 72
508                     ; bind _cout = _cmcon@6
509  00000019 = _cout___byte equ _cmcon
510  00000006 = _cout___bit equ 6
511                     ; line_number = 73
512                     ; bind _cinv = _cmcon@4
513  00000019 = _cinv___byte equ _cmcon
514  00000004 = _cinv___bit equ 4
515                     ; line_number = 74
516                     ; bind _cis = _cmcon@3
517  00000019 = _cis___byte equ _cmcon
518  00000003 = _cis___bit equ 3
519                     ; line_number = 75
520                     ; bind _cm2 = _cmcon@2
521  00000019 = _cm2___byte equ _cmcon
522  00000002 = _cm2___bit equ 2
523                     ; line_number = 76
524                     ; bind _cm1 = _cmcon@1
525  00000019 = _cm1___byte equ _cmcon
526  00000001 = _cm1___bit equ 1
527                     ; line_number = 77
528                     ; bind _cm0 = _cmcon@0
529  00000019 = _cm0___byte equ _cmcon
530  00000000 = _cm0___bit equ 0
531             
532                     ; # Data bank 1 (0x80-0xff):
533             
534                     ; line_number = 81
535                     ; register _option_reg = 
536  00000080 = _option_reg equ 128
537                     ; line_number = 82
538                     ; bind _rapu = _option_reg@7
539  00000080 = _rapu___byte equ _option_reg
540  00000007 = _rapu___bit equ 7
541                     ; line_number = 83
542                     ; bind _intedg = _option_reg@6
543  00000080 = _intedg___byte equ _option_reg
544  00000006 = _intedg___bit equ 6
545                     ; line_number = 84
546                     ; bind _t0cs = _option_reg@5
547  00000080 = _t0cs___byte equ _option_reg
548  00000005 = _t0cs___bit equ 5
549                     ; line_number = 85
550                     ; bind _t0se = _option_reg@4
551  00000080 = _t0se___byte equ _option_reg
552  00000004 = _t0se___bit equ 4
553                     ; line_number = 86
554                     ; bind _psa = _option_reg@3
555  00000080 = _psa___byte equ _option_reg
556  00000003 = _psa___bit equ 3
557                     ; line_number = 87
558                     ; bind _ps2 = _option_reg@2
559  00000080 = _ps2___byte equ _option_reg
560  00000002 = _ps2___bit equ 2
561                     ; line_number = 88
562                     ; bind _ps1 = _option_reg@1
563  00000080 = _ps1___byte equ _option_reg
564  00000001 = _ps1___bit equ 1
565                     ; line_number = 89
566                     ; bind _ps0 = _option_reg@0
567  00000080 = _ps0___byte equ _option_reg
568  00000000 = _ps0___bit equ 0
569             
570                     ; line_number = 91
571                     ; register _trisa = 
572  00000085 = _trisa equ 133
573                     ; line_number = 92
574                     ; bind _trisa5 = _trisa@5
575  00000085 = _trisa5___byte equ _trisa
576  00000005 = _trisa5___bit equ 5
577                     ; line_number = 93
578                     ; bind _trisa4 = _trisa@4
579  00000085 = _trisa4___byte equ _trisa
580  00000004 = _trisa4___bit equ 4
581                     ; line_number = 94
582                     ; bind _trisa3 = _trisa@3
583  00000085 = _trisa3___byte equ _trisa
584  00000003 = _trisa3___bit equ 3
585                     ; line_number = 95
586                     ; bind _trisa2 = _trisa@2
587  00000085 = _trisa2___byte equ _trisa
588  00000002 = _trisa2___bit equ 2
589                     ; line_number = 96
590                     ; bind _trisa1 = _trisa@1
591  00000085 = _trisa1___byte equ _trisa
592  00000001 = _trisa1___bit equ 1
593                     ; line_number = 97
594                     ; bind _trisa0 = _trisa@0
595  00000085 = _trisa0___byte equ _trisa
596  00000000 = _trisa0___bit equ 0
597             
598                     ; line_number = 99
599                     ; register _trisc = 
600  00000087 = _trisc equ 135
601                     ; line_number = 100
602                     ; bind _trisc5 = _trisc@5
603  00000087 = _trisc5___byte equ _trisc
604  00000005 = _trisc5___bit equ 5
605                     ; line_number = 101
606                     ; bind _trisc4 = _trisc@4
607  00000087 = _trisc4___byte equ _trisc
608  00000004 = _trisc4___bit equ 4
609                     ; line_number = 102
610                     ; bind _trisc3 = _trisc@3
611  00000087 = _trisc3___byte equ _trisc
612  00000003 = _trisc3___bit equ 3
613                     ; line_number = 103
614                     ; bind _trisc2 = _trisc@2
615  00000087 = _trisc2___byte equ _trisc
616  00000002 = _trisc2___bit equ 2
617                     ; line_number = 104
618                     ; bind _trisc1 = _trisc@1
619  00000087 = _trisc1___byte equ _trisc
620  00000001 = _trisc1___bit equ 1
621                     ; line_number = 105
622                     ; bind _trisc0 = _trisc@0
623  00000087 = _trisc0___byte equ _trisc
624  00000000 = _trisc0___bit equ 0
625             
626                     ; line_number = 107
627                     ; register _pie1 = 
628  0000008c = _pie1 equ 140
629                     ; line_number = 108
630                     ; bind _eeie = _pie1@7
631  0000008c = _eeie___byte equ _pie1
632  00000007 = _eeie___bit equ 7
633                     ; line_number = 109
634                     ; bind _adie = _pie1@6
635  0000008c = _adie___byte equ _pie1
636  00000006 = _adie___bit equ 6
637                     ; line_number = 110
638                     ; bind _cmie = _pie1@3
639  0000008c = _cmie___byte equ _pie1
640  00000003 = _cmie___bit equ 3
641                     ; line_number = 111
642                     ; bind _tmr1ie = _pie1@0
643  0000008c = _tmr1ie___byte equ _pie1
644  00000000 = _tmr1ie___bit equ 0
645             
646                     ; line_number = 113
647                     ; register _pcon = 
648  0000008e = _pcon equ 142
649                     ; line_number = 114
650                     ; bind _por = _pcon@1
651  0000008e = _por___byte equ _pcon
652  00000001 = _por___bit equ 1
653                     ; line_number = 115
654                     ; bind _bor = _pcon@0
655  0000008e = _bor___byte equ _pcon
656  00000000 = _bor___bit equ 0
657             
658                     ; line_number = 117
659                     ; register _osccal = 
660  00000090 = _osccal equ 144
661                     ; line_number = 118
662                     ; bind _cal5 = _osccal@7
663  00000090 = _cal5___byte equ _osccal
664  00000007 = _cal5___bit equ 7
665                     ; line_number = 119
666                     ; bind _cal4 = _osccal@6
667  00000090 = _cal4___byte equ _osccal
668  00000006 = _cal4___bit equ 6
669                     ; line_number = 120
670                     ; bind _cal3 = _osccal@5
671  00000090 = _cal3___byte equ _osccal
672  00000005 = _cal3___bit equ 5
673                     ; line_number = 121
674                     ; bind _cal2 = _osccal@4
675  00000090 = _cal2___byte equ _osccal
676  00000004 = _cal2___bit equ 4
677                     ; line_number = 122
678                     ; bind _cal1 = _osccal@3
679  00000090 = _cal1___byte equ _osccal
680  00000003 = _cal1___bit equ 3
681                     ; line_number = 123
682                     ; bind _cal0 = _osccal@2
683  00000090 = _cal0___byte equ _osccal
684  00000002 = _cal0___bit equ 2
685                     ; line_number = 124
686                     ; constant _osccal_lsb = 4
687  00000004 = _osccal_lsb equ 4
688             
689                     ; line_number = 126
690                     ; register _wpua = 
691  00000095 = _wpua equ 149
692                     ; line_number = 127
693                     ; bind _wpua5 = _wpua@5
694  00000095 = _wpua5___byte equ _wpua
695  00000005 = _wpua5___bit equ 5
696                     ; line_number = 128
697                     ; bind _wpua4 = _wpua@4
698  00000095 = _wpua4___byte equ _wpua
699  00000004 = _wpua4___bit equ 4
700                     ; line_number = 129
701                     ; bind _wpua2 = _wpua@2
702  00000095 = _wpua2___byte equ _wpua
703  00000002 = _wpua2___bit equ 2
704                     ; line_number = 130
705                     ; bind _wpua1 = _wpua@1
706  00000095 = _wpua1___byte equ _wpua
707  00000001 = _wpua1___bit equ 1
708                     ; line_number = 131
709                     ; bind _wpua0 = _wpua@0
710  00000095 = _wpua0___byte equ _wpua
711  00000000 = _wpua0___bit equ 0
712             
713                     ; line_number = 133
714                     ; register _ioca = 
715  00000096 = _ioca equ 150
716                     ; line_number = 134
717                     ; bind _ioca5 = _ioca@5
718  00000096 = _ioca5___byte equ _ioca
719  00000005 = _ioca5___bit equ 5
720                     ; line_number = 135
721                     ; bind _ioca4 = _ioca@4
722  00000096 = _ioca4___byte equ _ioca
723  00000004 = _ioca4___bit equ 4
724                     ; line_number = 136
725                     ; bind _ioca3 = _ioca@3
726  00000096 = _ioca3___byte equ _ioca
727  00000003 = _ioca3___bit equ 3
728                     ; line_number = 137
729                     ; bind _ioca2 = _ioca@2
730  00000096 = _ioca2___byte equ _ioca
731  00000002 = _ioca2___bit equ 2
732                     ; line_number = 138
733                     ; bind _ioca1 = _ioca@1
734  00000096 = _ioca1___byte equ _ioca
735  00000001 = _ioca1___bit equ 1
736                     ; line_number = 139
737                     ; bind _ioca0 = _ioca@0
738  00000096 = _ioca0___byte equ _ioca
739  00000000 = _ioca0___bit equ 0
740             
741                     ; line_number = 141
742                     ; register _vrcon = 
743  00000099 = _vrcon equ 153
744                     ; line_number = 142
745                     ; bind _vren = _vrcon@7
746  00000099 = _vren___byte equ _vrcon
747  00000007 = _vren___bit equ 7
748                     ; line_number = 143
749                     ; bind _vrr = _vrcon@5
750  00000099 = _vrr___byte equ _vrcon
751  00000005 = _vrr___bit equ 5
752                     ; line_number = 144
753                     ; bind _vr3 = _vrcon@3
754  00000099 = _vr3___byte equ _vrcon
755  00000003 = _vr3___bit equ 3
756                     ; line_number = 145
757                     ; bind _vr2 = _vrcon@2
758  00000099 = _vr2___byte equ _vrcon
759  00000002 = _vr2___bit equ 2
760                     ; line_number = 146
761                     ; bind _vr1 = _vrcon@1
762  00000099 = _vr1___byte equ _vrcon
763  00000001 = _vr1___bit equ 1
764                     ; line_number = 147
765                     ; bind _vr0 = _vrcon@0
766  00000099 = _vr0___byte equ _vrcon
767  00000000 = _vr0___bit equ 0
768             
769                     ; line_number = 149
770                     ; register _eedata = 
771  0000009a = _eedata equ 154
772             
773                     ; line_number = 151
774                     ; register _eeadr = 
775  0000009b = _eeadr equ 155
776             
777                     ; line_number = 153
778                     ; register _eecon1 = 
779  0000009c = _eecon1 equ 156
780                     ; line_number = 154
781                     ; bind _wrerr = _eecon1@3
782  0000009c = _wrerr___byte equ _eecon1
783  00000003 = _wrerr___bit equ 3
784                     ; line_number = 155
785                     ; bind _wren = _eecon1@2
786  0000009c = _wren___byte equ _eecon1
787  00000002 = _wren___bit equ 2
788                     ; line_number = 156
789                     ; bind _wr = _eecon1@1
790  0000009c = _wr___byte equ _eecon1
791  00000001 = _wr___bit equ 1
792                     ; line_number = 157
793                     ; bind _rd = _eecon1@0
794  0000009c = _rd___byte equ _eecon1
795  00000000 = _rd___bit equ 0
796             
797                     ; line_number = 159
798                     ; register _eecon2 = 
799  0000009d = _eecon2 equ 157
800             
801             
802                     ; buffer = '_pic16f676'
803                     ; line_number = 131
804                     ; library _pic16f630_676 exited
805             
806                     ; # The only difference between the PIC16F676 and the PIC16F630 is that
807                     ; # the 'F676 has 8 channels of A/D and the 'F630 does not.
808             
809                     ; line_number = 136
810                     ; register _adresh = 
811  0000001e = _adresh equ 30
812             
813                     ; # The {_adif} flag is only avaiable for the PIC16F676:
814                     ; line_number = 139
815                     ; bind _adif = _pir1@6
816  0000000c = _adif___byte equ _pir1
817  00000006 = _adif___bit equ 6
818             
819                     ; line_number = 141
820                     ; register _adcon0 = 
821  0000001f = _adcon0 equ 31
822                     ; line_number = 142
823                     ; bind _adfm = _adcon0@7
824  0000001f = _adfm___byte equ _adcon0
825  00000007 = _adfm___bit equ 7
826                     ; line_number = 143
827                     ; bind _vcfg = _adcon0@5
828  0000001f = _vcfg___byte equ _adcon0
829  00000005 = _vcfg___bit equ 5
830                     ; line_number = 144
831                     ; bind _chs2 = _adcon0@4
832  0000001f = _chs2___byte equ _adcon0
833  00000004 = _chs2___bit equ 4
834                     ; line_number = 145
835                     ; bind _chs1 = _adcon0@3
836  0000001f = _chs1___byte equ _adcon0
837  00000003 = _chs1___bit equ 3
838                     ; line_number = 146
839                     ; bind _chs0 = _adcon0@2
840  0000001f = _chs0___byte equ _adcon0
841  00000002 = _chs0___bit equ 2
842                     ; line_number = 147
843                     ; bind _go = _adcon0@1
844  0000001f = _go___byte equ _adcon0
845  00000001 = _go___bit equ 1
846                     ; line_number = 148
847                     ; bind _adon = _adcon0@0
848  0000001f = _adon___byte equ _adcon0
849  00000000 = _adon___bit equ 0
850             
851                     ; line_number = 150
852                     ; register _adsel = 
853  00000091 = _adsel equ 145
854                     ; line_number = 151
855                     ; bind _ans7 = _adsel@7
856  00000091 = _ans7___byte equ _adsel
857  00000007 = _ans7___bit equ 7
858                     ; line_number = 152
859                     ; bind _ans6 = _adsel@6
860  00000091 = _ans6___byte equ _adsel
861  00000006 = _ans6___bit equ 6
862                     ; line_number = 153
863                     ; bind _ans5 = _adsel@5
864  00000091 = _ans5___byte equ _adsel
865  00000005 = _ans5___bit equ 5
866                     ; line_number = 154
867                     ; bind _ans4 = _adsel@4
868  00000091 = _ans4___byte equ _adsel
869  00000004 = _ans4___bit equ 4
870                     ; line_number = 155
871                     ; bind _ans3 = _adsel@3
872  00000091 = _ans3___byte equ _adsel
873  00000003 = _ans3___bit equ 3
874                     ; line_number = 156
875                     ; bind _ans2 = _adsel@2
876  00000091 = _ans2___byte equ _adsel
877  00000002 = _ans2___bit equ 2
878                     ; line_number = 157
879                     ; bind _ans1 = _adsel@1
880  00000091 = _ans1___byte equ _adsel
881  00000001 = _ans1___bit equ 1
882                     ; line_number = 158
883                     ; bind _ans0 = _adsel@0
884  00000091 = _ans0___byte equ _adsel
885  00000000 = _ans0___bit equ 0
886             
887                     ; line_number = 160
888                     ; register _adresl = 
889  0000009e = _adresl equ 158
890             
891                     ; line_number = 162
892                     ; register _adcon1 = 
893  0000009f = _adcon1 equ 159
894                     ; line_number = 163
895                     ; bind _adcs2 = _adcon1@6
896  0000009f = _adcs2___byte equ _adcon1
897  00000006 = _adcs2___bit equ 6
898                     ; line_number = 164
899                     ; bind _adcs1 = _adcon1@5
900  0000009f = _adcs1___byte equ _adcon1
901  00000005 = _adcs1___bit equ 5
902                     ; line_number = 165
903                     ; bind _adcs0 = _adcon1@4
904  0000009f = _adcs0___byte equ _adcon1
905  00000004 = _adcs0___bit equ 4
906             
907             
908                     ; buffer = 'iredge4'
909                     ; line_number = 16
910                     ; library _pic16f676 exited
911                     ; line_number = 17
912                     ; library clock4mhz entered
913                     ; # Copyright (c) 2004 by Wayne C. Gramlich
914                     ; # All rights reserved.
915             
916                     ; # This library defines the contstants {clock_rate}, {instruction_rate},
917                     ; # and {clocks_per_instruction}.
918             
919                     ; # Define processor constants:
920                     ; buffer = 'clock4mhz'
921                     ; line_number = 9
922                     ; constant clock_rate = 4000000
923  003d0900 = clock_rate equ 4000000
924                     ; line_number = 10
925                     ; constant clocks_per_instruction = 4
926  00000004 = clocks_per_instruction equ 4
927                     ; line_number = 11
928                     ; constant instruction_rate = clock_rate / clocks_per_instruction
929  000f4240 = instruction_rate equ 1000000
930             
931             
932                     ; buffer = 'iredge4'
933                     ; line_number = 17
934                     ; library clock4mhz exited
935                     ; line_number = 18
936                     ; library bit_bang entered
937                     ; # Copyright (c) 2004 by Wayne C. Gramlich
938                     ; # All rights reserved.
939             
940                     ; # This library provides bit bang routines for sending and receiving
941                     ; # serial data at 2400 baud in 8N1 format (1 start bit, 8 data bits,
942                     ; # No parity bit, 1 stop stop bit.)
943                     ; #
944                     ; # This library requires that the pins {serial_in} and {serial_out}
945                     ; # be defined.  In addition, the variable {instruction_rate} needs
946                     ; # to be defined.  Lastly, there needs to be a {delay} procedure
947                     ; # with an "exact_delay delay_instructions" clause in it.  The {delay}
948                     ; # routine should invoke "watch_dog_reset" so that the watch dog time
949                     ; # can be set.
950             
951                     ; # Define some constants that we will be needing:
952                     ; buffer = 'bit_bang'
953                     ; line_number = 17
954                     ; constant baud_rate = 2400
955  00000960 = baud_rate equ 2400
956                     ; line_number = 18
957                     ; constant instructions_per_bit = instruction_rate / baud_rate
958  000001a0 = instructions_per_bit equ 416
959                     ; line_number = 19
960                     ; constant delays_per_bit = 3
961  00000003 = delays_per_bit equ 3
962                     ; line_number = 20
963                     ; constant instructions_per_delay = instructions_per_bit / delays_per_bit
964  0000008a = instructions_per_delay equ 138
965                     ; line_number = 21
966                     ; constant extra_instructions = 5
967  00000005 = extra_instructions equ 5
968                     ; line_number = 22
969                     ; constant delay_instructions = instructions_per_delay - extra_instructions
970  00000085 = delay_instructions equ 133
971             
972                     ; # The {receiving} bit is sent when data is being received.
973                     ; # It gets cleared whenever data gets sent.  It is used to
974                     ; # determine whether additional delay is needed to turn a
975                     ; # line around for slow interpretted chips like the Basic
976                     ; # Stamp 2 and the OOPIC.
977             
978                     ; line_number = 30
979                     ; global receiving bit
980  0000005f = receiving___byte equ shared___globals+63
981  00000000 = receiving___bit equ 0
982                     ; line_number = 31
983                     ; global waiting bit
984  0000005f = waiting___byte equ shared___globals+63
985  00000001 = waiting___bit equ 1
986             
987                     ; Delaying code generation for procedure  byte_get
988                     ; Delaying code generation for procedure  byte_put
989             
990                     ; buffer = 'iredge4'
991                     ; line_number = 18
992                     ; library bit_bang exited
993             
994                     ; line_number = 20
995                     ; package pdip
996                     ; line_number = 21
997                     ; pin 1 = power_supply
998                     ; line_number = 22
999                     ;  pin 2 = ra5_out, name = serial_out
1000 00000005 = serial_out___byte equ _porta
1001 00000005 = serial_out___bit equ 5
1002                    ; line_number = 23
1003                    ;  pin 3 = ra4_out, name = led1
1004 00000005 = led1___byte equ _porta
1005 00000004 = led1___bit equ 4
1006                    ; line_number = 24
1007                    ;  pin 4 = ra3_in, name = serial_in
1008 00000005 = serial_in___byte equ _porta
1009 00000004 = serial_in___bit equ 4
1010                    ; line_number = 25
1011                    ;  pin 5 = rc5_out, name = led2
1012 00000007 = led2___byte equ _portc
1013 00000005 = led2___bit equ 5
1014                    ; line_number = 26
1015                    ;  pin 6 = rc4_out, name = led3
1016 00000007 = led3___byte equ _portc
1017 00000004 = led3___bit equ 4
1018                    ; line_number = 27
1019                    ;  pin 7 = rc3_out, name = led4
1020 00000007 = led4___byte equ _portc
1021 00000003 = led4___bit equ 3
1022                    ; line_number = 28
1023                    ;  pin 8 = rc2_out, name = debug_out
1024 00000007 = debug_out___byte equ _portc
1025 00000002 = debug_out___bit equ 2
1026                    ; line_number = 29
1027                    ;  pin 9 = an5, name = in0
1028 00000007 = in0___byte equ _portc
1029 00000001 = in0___bit equ 1
1030                    ; line_number = 30
1031                    ;  pin 10 = an4, name = in1
1032 00000007 = in1___byte equ _portc
1033 00000000 = in1___bit equ 0
1034                    ; line_number = 31
1035                    ;  pin 11 = an2, name = cal
1036 00000005 = cal___byte equ _porta
1037 00000002 = cal___bit equ 2
1038                    ; line_number = 32
1039                    ;  pin 12 = an1, name = in2
1040 00000005 = in2___byte equ _porta
1041 00000001 = in2___bit equ 1
1042                    ; line_number = 33
1043                    ;  pin 13 = an0, name = in3
1044 00000005 = in3___byte equ _porta
1045 00000000 = in3___bit equ 0
1046                    ; line_number = 34
1047                    ;  pin 14 = ground
1048            
1049                    ; line_number = 36
1050                    ; constant analogs_size = 4
1051 00000004 = analogs_size equ 4
1052                    ; line_number = 37
1053                    ; constant io_mask = 0xf
1054 0000000f = io_mask equ 15
1055                    ; line_number = 38
1056                    ; constant threshold_default = 0x80
1057 00000080 = threshold_default equ 128
1058            
1059                    ; line_number = 40
1060                    ; global analogs[analogs_size] array[byte]
1061 00000024 = analogs equ shared___globals+4
1062                    ; line_number = 41
1063                    ; global thresholds_low[analogs_size] array[byte]
1064 00000028 = thresholds_low equ shared___globals+8
1065                    ; line_number = 42
1066                    ; global thresholds_high[analogs_size] array[byte]
1067 0000002c = thresholds_high equ shared___globals+12
1068                    ; line_number = 43
1069                    ; global delay_counter byte
1070 00000030 = delay_counter equ shared___globals+16
1071                    ; line_number = 44
1072                    ; global channel byte
1073 00000031 = channel equ shared___globals+17
1074                    ; line_number = 45
1075                    ; global glitch byte
1076 00000032 = glitch equ shared___globals+18
1077                    ; line_number = 46
1078                    ; global id_index byte
1079 00000033 = id_index equ shared___globals+19
1080                    ; line_number = 47
1081                    ; global debug_character byte
1082 00000034 = debug_character equ shared___globals+20
1083                    ; line_number = 48
1084                    ; global debug_phase byte
1085 00000035 = debug_phase equ shared___globals+21
1086                    ; line_number = 49
1087                    ; global debug_counter byte
1088 00000036 = debug_counter equ shared___globals+22
1089                    ; line_number = 50
1090                    ; global debug_next bit
1091 0000005f = debug_next___byte equ shared___globals+63
1092 00000002 = debug_next___bit equ 2
1093            
1094                    ; line_number = 52
1095                    ; constant vars_size = 17
1096 00000011 = vars_size equ 17
1097                    ; line_number = 53
1098                    ; global vars[vars_size] byte
1099 00000037 = vars equ shared___globals+23
1100                    ; line_number = 54
1101                    ; bind threshold_trim_pot = vars[0]
1102 00000037 = threshold_trim_pot equ shared___globals+23
1103                    ; line_number = 55
1104                    ; bind inputs = vars[1]
1105 00000038 = inputs equ shared___globals+24
1106                    ; line_number = 56
1107                    ; bind complement = vars[2]
1108 00000039 = complement equ shared___globals+25
1109                    ; line_number = 57
1110                    ; bind command = vars[3]
1111 0000003a = command equ shared___globals+26
1112                    ; line_number = 58
1113                    ; bind last_sent = vars[4]
1114 0000003b = last_sent equ shared___globals+27
1115                    ; line_number = 59
1116                    ; bind last_received =vars[5]
1117 0000003c = last_received equ shared___globals+28
1118                    ; line_number = 60
1119                    ; bind raw_inputs = vars[6]
1120 0000003d = raw_inputs equ shared___globals+29
1121                    ; line_number = 61
1122                    ; bind interrupt_bits = vars[7]
1123 0000003e = interrupt_bits equ shared___globals+30
1124                    ; line_number = 62
1125                    ; bind falling = vars[8]
1126 0000003f = falling equ shared___globals+31
1127                    ; line_number = 63
1128                    ; bind high = vars[9]
1129 00000040 = high equ shared___globals+32
1130                    ; line_number = 64
1131                    ; bind low = vars[10]
1132 00000041 = low equ shared___globals+33
1133                    ; line_number = 65
1134                    ; bind raising = vars[11]
1135 00000042 = raising equ shared___globals+34
1136                    ; line_number = 66
1137                    ; bind threshold_enables = vars[12]
1138 00000043 = threshold_enables equ shared___globals+35
1139                    ; line_number = 67
1140                    ; bind command_previous = vars[13]
1141 00000044 = command_previous equ shared___globals+36
1142                    ; line_number = 68
1143                    ; bind command_last = vars[14]
1144 00000045 = command_last equ shared___globals+37
1145                    ; line_number = 69
1146                    ; bind sent_previous = vars[15]
1147 00000046 = sent_previous equ shared___globals+38
1148                    ; line_number = 70
1149                    ; bind sent_last = vars[16]
1150 00000047 = sent_last equ shared___globals+39
1151            
1152                    ; line_number = 72
1153                    ; bind interrupt_enable = interrupt_bits@1
1154 0000003e = interrupt_enable___byte equ shared___globals+30
1155 00000001 = interrupt_enable___bit equ 1
1156                    ; line_number = 73
1157                    ; bind interrupt_pending = interrupt_bits@0
1158 0000003e = interrupt_pending___byte equ shared___globals+30
1159 00000000 = interrupt_pending___bit equ 0
1160            
1161                    ; line_number = 75
1162                    ; procedure main
1163   0000 :   main:
1164                    ; Need to calibrate the oscillator
1165 0000 23ff          call    1023
1166 0001 1683          bsf     __rp0___byte, __rp0___bit
1167 0002 0090          movwf   _osccal
1168                    ; Initialize some registers
1169 0003 3001          movlw   1
1170 0004 1283          bcf     __rp0___byte, __rp0___bit
1171 0005 009f          movwf   _adcon0
1172 0006 3007          movlw   7
1173 0007 1683          bsf     __rp0___byte, __rp0___bit
1174 0008 0085          movwf   _trisa
1175 0009 3003          movlw   3
1176 000a 0087          movwf   _trisc
1177                    ; arguments_none
1178                    ; line_number = 77
1179                    ;  returns_nothing
1180            
1181                    ; line_number = 79
1182                    ;  local bit byte
1183 00000048 = main__bit equ shared___globals+40
1184                    ; line_number = 80
1185                    ;  local temporary byte
1186 00000049 = main__temporary equ shared___globals+41
1187            
1188                    ; before procedure statements delay=non-uniform, bit states=(data:X0=>X1 code:XX=>XX)
1189                    ; line_number = 82
1190                    ;  call reset()
1191 000b 1283          bcf     __rp0___byte, __rp0___bit
1192 000c 2227          call    reset
1193            
1194                    ; # Set the direction:
1195                    ; line_number = 85
1196                    ;  loop_forever start
1197   000d :   main__1:
1198                    ; # Wait for a command:
1199                    ; line_number = 87
1200                    ;  command := byte_get()
1201 000d 22b7          call    byte_get
1202 000e 00ba          movwf   command
1203            
1204                    ; # Dispatch on command:
1205                    ; line_number = 90
1206                    ;  switch command >> 6 start
1207 000f 3000          movlw   main__80>>8
1208 0010 008a          movwf   __pclath
1209 00000056 = main__81 equ shared___globals+54
1210 0011 0e3a          swapf   command,w
1211 0012 00d6          movwf   main__81
1212 0013 0cd6          rrf     main__81,f
1213 0014 0c56          rrf     main__81,w
1214 0015 3903          andlw   3
1215 0016 3e18          addlw   main__80
1216 0017 0082          movwf   __pcl
1217                    ; page_group 4
1218   0018 :   main__80:
1219 0018 281c          goto    main__76
1220 0019 289e          goto    main__77
1221 001a 28b7          goto    main__78
1222 001b 28cd          goto    main__79
1223                    ; line_number = 91
1224                    ; case 0
1225   001c :   main__76:
1226                    ; # Command = 00xx xxxx:
1227                    ; line_number = 93
1228                    ;  switch command >> 3 start
1229 001c 3000          movlw   main__33>>8
1230 001d 008a          movwf   __pclath
1231 00000056 = main__34 equ shared___globals+54
1232 001e 0c3a          rrf     command,w
1233 001f 00d6          movwf   main__34
1234 0020 0cd6          rrf     main__34,f
1235 0021 0c56          rrf     main__34,w
1236 0022 391f          andlw   31
1237 0023 3e25          addlw   main__33
1238 0024 0082          movwf   __pcl
1239                    ; page_group 8
1240   0025 :   main__33:
1241 0025 282d          goto    main__28
1242 0026 284c          goto    main__29
1243 0027 286a          goto    main__30
1244 0028 286a          goto    main__30
1245 0029 2899          goto    main__31
1246 002a 2899          goto    main__31
1247 002b 289d          goto    main__32
1248 002c 289d          goto    main__32
1249                    ; line_number = 94
1250                    ; case 0
1251   002d :   main__28:
1252                    ; # Command = 0000 0xxx:
1253                    ; line_number = 96
1254                    ;  switch command & 7 start
1255 002d 3000          movlw   main__7>>8
1256 002e 008a          movwf   __pclath
1257 002f 3007          movlw   7
1258 0030 053a          andwf   command,w
1259 0031 3e33          addlw   main__7
1260 0032 0082          movwf   __pcl
1261                    ; page_group 8
1262   0033 :   main__7:
1263 0033 283b          goto    main__2
1264 0034 283b          goto    main__2
1265 0035 283b          goto    main__2
1266 0036 283b          goto    main__2
1267 0037 2841          goto    main__3
1268 0038 2844          goto    main__4
1269 0039 2847          goto    main__5
1270 003a 284a          goto    main__6
1271                    ; line_number = 97
1272                    ; case 0, 1, 2, 3
1273   003b :   main__2:
1274                    ; # Read Pin (Command = 0000 00bb):
1275                    ; line_number = 99
1276                    ;  call byte_put(analogs[command])
1277 003b 083a          movf    command,w
1278 003c 3e24          addlw   analogs
1279 003d 0084          movwf   __fsr
1280 003e 0800          movf    __indf,w
1281 003f 22e0          call    byte_put
1282 0040 284b          goto    main__8
1283                    ; line_number = 100
1284                    ; case 4
1285   0041 :   main__3:
1286                    ; # Read Binary Values (Command = 0000 0100):
1287                    ; line_number = 102
1288                    ;  call byte_put(inputs)
1289 0041 0838          movf    inputs,w
1290 0042 22e0          call    byte_put
1291 0043 284b          goto    main__8
1292                    ; line_number = 103
1293                    ; case 5
1294   0044 :   main__4:
1295                    ; # Read Raw Binary (Command = 0000 0101):
1296                    ; line_number = 105
1297                    ;  call byte_put(raw_inputs)
1298 0044 083d          movf    raw_inputs,w
1299 0045 22e0          call    byte_put
1300 0046 284b          goto    main__8
1301                    ; line_number = 106
1302                    ; case 6
1303   0047 :   main__5:
1304                    ; # Read Threshold Enables (Command = 0000 0110):
1305                    ; line_number = 108
1306                    ;  call byte_put(threshold_enables)
1307 0047 0843          movf    threshold_enables,w
1308 0048 22e0          call    byte_put
1309 0049 284b          goto    main__8
1310                    ; line_number = 109
1311                    ; case 7
1312   004a :   main__6:
1313                    ; # Reset (Command = 0000 0111):
1314                    ; line_number = 111
1315                    ;  call reset()
1316 004a 2227          call    reset
1317   004b :   main__8:
1318                    ; switch end:(data:X0=>X0 code:XX=>XX)
1319                    ; line_number = 96
1320                    ;  switch command & 7 done
1321 004b 289d          goto    main__35
1322                    ; line_number = 112
1323                    ; case 1
1324   004c :   main__29:
1325                    ; # Command = 0000 1xxx:
1326                    ; line_number = 114
1327                    ;  switch command & 7 start
1328 004c 3000          movlw   main__15>>8
1329 004d 008a          movwf   __pclath
1330 004e 3007          movlw   7
1331 004f 053a          andwf   command,w
1332 0050 3e52          addlw   main__15
1333 0051 0082          movwf   __pcl
1334                    ; page_group 8
1335   0052 :   main__15:
1336 0052 285a          goto    main__9
1337 0053 285d          goto    main__10
1338 0054 2860          goto    main__11
1339 0055 2863          goto    main__12
1340 0056 2866          goto    main__13
1341 0057 2869          goto    main__14
1342 0058 2869          goto    main__14
1343 0059 2869          goto    main__14
1344                    ; line_number = 115
1345                    ; case 0
1346   005a :   main__9:
1347                    ; # Read Complement Mask(Command = 0000 1000):
1348                    ; line_number = 117
1349                    ;  call byte_put(complement)
1350 005a 0839          movf    complement,w
1351 005b 22e0          call    byte_put
1352 005c 2869          goto    main__16
1353                    ; line_number = 118
1354                    ; case 1
1355   005d :   main__10:
1356                    ; # Read High Mask (Command = 0000 1001):
1357                    ; line_number = 120
1358                    ;  call byte_put(high)
1359 005d 0840          movf    high,w
1360 005e 22e0          call    byte_put
1361 005f 2869          goto    main__16
1362                    ; line_number = 121
1363                    ; case 2
1364   0060 :   main__11:
1365                    ; # Read Low Mask (Command = 0000 1010):
1366                    ; line_number = 123
1367                    ;  call byte_put(low)
1368 0060 0841          movf    low,w
1369 0061 22e0          call    byte_put
1370 0062 2869          goto    main__16
1371                    ; line_number = 124
1372                    ; case 3
1373   0063 :   main__12:
1374                    ; # Read Raising Mask (Command = 0000 1011):
1375                    ; line_number = 126
1376                    ;  call byte_put(raising)
1377 0063 0842          movf    raising,w
1378 0064 22e0          call    byte_put
1379 0065 2869          goto    main__16
1380                    ; line_number = 127
1381                    ; case 4
1382   0066 :   main__13:
1383                    ; # Read Falling Mask (Command = 0000 1100):
1384                    ; line_number = 129
1385                    ;  call byte_put(falling)
1386 0066 083f          movf    falling,w
1387 0067 22e0          call    byte_put
1388 0068 2869          goto    main__16
1389                    ; line_number = 130
1390                    ; case 5, 6, 7
1391   0069 :   main__14:
1392                    ; # Undefined command:
1393                    ; line_number = 132
1394                    ;  do_nothing
1395   0069 :   main__16:
1396                    ; switch end:(data:X0=>X? code:XX=>XX)
1397                    ; line_number = 114
1398                    ;  switch command & 7 done
1399 0069 289d          goto    main__35
1400                    ; line_number = 133
1401                    ; case 2, 3
1402   006a :   main__30:
1403                    ; # Command = 0001 xxxx:
1404                    ; line_number = 135
1405                    ;  bit := command & 3
1406 006a 3003          movlw   3
1407 006b 053a          andwf   command,w
1408 006c 00c8          movwf   main__bit
1409                    ; line_number = 136
1410                    ;  switch (command >> 2) & 3 start
1411 006d 3000          movlw   main__25>>8
1412 006e 008a          movwf   __pclath
1413 00000056 = main__26 equ shared___globals+54
1414 006f 0c3a          rrf     command,w
1415 0070 00d6          movwf   main__26
1416 0071 0c56          rrf     main__26,w
1417 0072 3903          andlw   3
1418 0073 3e75          addlw   main__25
1419 0074 0082          movwf   __pcl
1420                    ; page_group 4
1421   0075 :   main__25:
1422 0075 2879          goto    main__21
1423 0076 287f          goto    main__22
1424 0077 2885          goto    main__23
1425 0078 288f          goto    main__24
1426                    ; line_number = 137
1427                    ; case 0
1428   0079 :   main__21:
1429                    ; # Read High Threshold (Command = 0001 00bb):
1430                    ; line_number = 139
1431                    ;  call byte_put(thresholds_high[bit])
1432 0079 0848          movf    main__bit,w
1433 007a 3e2c          addlw   thresholds_high
1434 007b 0084          movwf   __fsr
1435 007c 0800          movf    __indf,w
1436 007d 22e0          call    byte_put
1437 007e 2898          goto    main__27
1438                    ; line_number = 140
1439                    ; case 1
1440   007f :   main__22:
1441                    ; # Read Low Threshold (Command = 0001 01bb):
1442                    ; line_number = 142
1443                    ;  call byte_put(thresholds_low[bit])
1444 007f 0848          movf    main__bit,w
1445 0080 3e28          addlw   thresholds_low
1446 0081 0084          movwf   __fsr
1447 0082 0800          movf    __indf,w
1448 0083 22e0          call    byte_put
1449 0084 2898          goto    main__27
1450                    ; line_number = 143
1451                    ; case 2
1452   0085 :   main__23:
1453                    ; # Set High Threshold (Command = 0001 10bb):
1454                    ; line_number = 145
1455                    ;  thresholds_high[bit] := byte_get()
1456                    ; index_temporary_first
1457 00000056 = main__17 equ shared___globals+54
1458 00000057 = main__18 equ shared___globals+55
1459 0085 0848          movf    main__bit,w
1460 0086 00d6          movwf   main__17
1461 0087 22b7          call    byte_get
1462 0088 00d7          movwf   main__18
1463 0089 0856          movf    main__17,w
1464 008a 3e2c          addlw   thresholds_high
1465 008b 0084          movwf   __fsr
1466 008c 0857          movf    main__18,w
1467 008d 0080          movwf   __indf
1468 008e 2898          goto    main__27
1469                    ; line_number = 146
1470                    ; case 3
1471   008f :   main__24:
1472                    ; # Set Low Threshold (Command = 0001 11bb):
1473                    ; line_number = 148
1474                    ;  thresholds_low[bit] := byte_get()
1475                    ; index_temporary_first
1476 00000056 = main__19 equ shared___globals+54
1477 00000057 = main__20 equ shared___globals+55
1478 008f 0848          movf    main__bit,w
1479 0090 00d6          movwf   main__19
1480 0091 22b7          call    byte_get
1481 0092 00d7          movwf   main__20
1482 0093 0856          movf    main__19,w
1483 0094 3e28          addlw   thresholds_low
1484 0095 0084          movwf   __fsr
1485 0096 0857          movf    main__20,w
1486 0097 0080          movwf   __indf
1487   0098 :   main__27:
1488                    ; switch end:(data:X0=>X0 code:XX=>XX)
1489                    ; line_number = 136
1490                    ;  switch (command >> 2) & 3 done
1491 0098 289d          goto    main__35
1492                    ; line_number = 149
1493                    ; case 4, 5
1494   0099 :   main__31:
1495                    ; # Set Complement Mask (Command = 0010 cccc):
1496                    ; line_number = 151
1497                    ;  complement := command & io_mask
1498 0099 300f          movlw   15
1499 009a 053a          andwf   command,w
1500 009b 00b9          movwf   complement
1501 009c 289d          goto    main__35
1502                    ; line_number = 152
1503                    ; case 6, 7
1504   009d :   main__32:
1505                    ; line_number = 153
1506                    ; do_nothing
1507   009d :   main__35:
1508                    ; switch end:(data:X0=>X? code:XX=>XX)
1509                    ; line_number = 93
1510                    ;  switch command >> 3 done
1511 009d 2938          goto    main__82
1512                    ; line_number = 154
1513                    ; case 1
1514   009e :   main__77:
1515                    ; # Command = 01xx xxxx:
1516                    ; line_number = 156
1517                    ;  temporary := command & io_mask
1518 009e 300f          movlw   15
1519 009f 053a          andwf   command,w
1520 00a0 00c9          movwf   main__temporary
1521                    ; line_number = 157
1522                    ;  switch (command >> 4) & 3 start
1523 00a1 3000          movlw   main__40>>8
1524 00a2 008a          movwf   __pclath
1525 00000056 = main__41 equ shared___globals+54
1526 00a3 0e3a          swapf   command,w
1527 00a4 3903          andlw   3
1528 00a5 3ea7          addlw   main__40
1529 00a6 0082          movwf   __pcl
1530                    ; page_group 4
1531   00a7 :   main__40:
1532 00a7 28ab          goto    main__36
1533 00a8 28ae          goto    main__37
1534 00a9 28b1          goto    main__38
1535 00aa 28b4          goto    main__39
1536                    ; line_number = 158
1537                    ; case 0
1538   00ab :   main__36:
1539                    ; # Set High Mask (Command = 0100 hhhh):
1540                    ; line_number = 160
1541                    ;  high := temporary
1542 00ab 0849          movf    main__temporary,w
1543 00ac 00c0          movwf   high
1544 00ad 28b6          goto    main__42
1545                    ; line_number = 161
1546                    ; case 1
1547   00ae :   main__37:
1548                    ; # Set Low Mask (Command = 0101 llll):
1549                    ; line_number = 163
1550                    ;  low := temporary
1551 00ae 0849          movf    main__temporary,w
1552 00af 00c1          movwf   low
1553 00b0 28b6          goto    main__42
1554                    ; line_number = 164
1555                    ; case 2
1556   00b1 :   main__38:
1557                    ; # Set Raising Mask (Command = 0110 rrrr):
1558                    ; line_number = 166
1559                    ;  raising := temporary
1560 00b1 0849          movf    main__temporary,w
1561 00b2 00c2          movwf   raising
1562 00b3 28b6          goto    main__42
1563                    ; line_number = 167
1564                    ; case 3
1565   00b4 :   main__39:
1566                    ; # Set Falling Mask (Command = 0111 ffff):
1567                    ; line_number = 169
1568                    ;  falling := temporary
1569 00b4 0849          movf    main__temporary,w
1570 00b5 00bf          movwf   falling
1571   00b6 :   main__42:
1572                    ; switch end:(data:X0=>X0 code:XX=>XX)
1573                    ; line_number = 157
1574                    ;  switch (command >> 4) & 3 done
1575 00b6 2938          goto    main__82
1576                    ; line_number = 170
1577                    ; case 2
1578   00b7 :   main__78:
1579                    ; # Do nothing (Command = 10xx xxxx):
1580                    ; line_number = 172
1581                    ;  switch (command >> 3) & 7 start
1582 00b7 3000          movlw   main__45>>8
1583 00b8 008a          movwf   __pclath
1584 00000056 = main__46 equ shared___globals+54
1585 00b9 0c3a          rrf     command,w
1586 00ba 00d6          movwf   main__46
1587 00bb 0cd6          rrf     main__46,f
1588 00bc 0c56          rrf     main__46,w
1589 00bd 3907          andlw   7
1590 00be 3ec0          addlw   main__45
1591 00bf 0082          movwf   __pcl
1592                    ; page_group 8
1593   00c0 :   main__45:
1594 00c0 28c8          goto    main__43
1595 00c1 28c8          goto    main__43
1596 00c2 28cc          goto    main__44
1597 00c3 28cc          goto    main__44
1598 00c4 28cc          goto    main__44
1599 00c5 28cc          goto    main__44
1600 00c6 28cc          goto    main__44
1601 00c7 28cc          goto    main__44
1602                    ; line_number = 173
1603                    ; case 0, 1
1604   00c8 :   main__43:
1605                    ; # Set Threshold Enables (1000 eeee):
1606                    ; line_number = 175
1607                    ;  threshold_enables := command & 0xf
1608 00c8 300f          movlw   15
1609 00c9 053a          andwf   command,w
1610 00ca 00c3          movwf   threshold_enables
1611 00cb 28cc          goto    main__47
1612                    ; line_number = 176
1613                    ; case 2, 3, 4, 5, 6, 7
1614   00cc :   main__44:
1615                    ; # Others:
1616                    ; line_number = 178
1617                    ;  do_nothing
1618   00cc :   main__47:
1619                    ; switch end:(data:X0=>X? code:XX=>XX)
1620                    ; line_number = 172
1621                    ;  switch (command >> 3) & 7 done
1622 00cc 2938          goto    main__82
1623                    ; line_number = 179
1624                    ; case 3
1625   00cd :   main__79:
1626                    ; # Command = 11xx xxxx:
1627                    ; line_number = 181
1628                    ;  switch (command >> 3) & 7 start
1629 00cd 3000          movlw   main__73>>8
1630 00ce 008a          movwf   __pclath
1631 00000056 = main__74 equ shared___globals+54
1632 00cf 0c3a          rrf     command,w
1633 00d0 00d6          movwf   main__74
1634 00d1 0cd6          rrf     main__74,f
1635 00d2 0c56          rrf     main__74,w
1636 00d3 3907          andlw   7
1637 00d4 3ed6          addlw   main__73
1638 00d5 0082          movwf   __pcl
1639                    ; page_group 8
1640   00d6 :   main__73:
1641 00d6 28de          goto    main__69
1642 00d7 28de          goto    main__69
1643 00d8 28de          goto    main__69
1644 00d9 28de          goto    main__69
1645 00da 28de          goto    main__69
1646 00db 28df          goto    main__70
1647 00dc 28e7          goto    main__71
1648 00dd 2904          goto    main__72
1649                    ; line_number = 182
1650                    ; case 0, 1, 2, 3, 4
1651   00de :   main__69:
1652                    ; # Command = 1100 xxxx or 1110 0xxx:
1653                    ; line_number = 184
1654                    ;  do_nothing
1655 00de 2938          goto    main__75
1656                    ; line_number = 185
1657                    ; case 5
1658   00df :   main__70:
1659                    ; # Read Interrupt Bits (Command = 1110 1111):
1660                    ; line_number = 187
1661                    ;  if (command & 7) = 7 start
1662                    ; Left minus Right
1663 00df 3007          movlw   7
1664 00e0 053a          andwf   command,w
1665 00e1 3ef9          addlw   249
1666                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
1667                    ; CASE: true_code.size = 0 && false_code.size > 1
1668                    ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=0 (non-uniform delay)
1669 00e2 1d03          btfss   __z___byte, __z___bit
1670 00e3 28e6          goto    main__48
1671                    ; # Return Interrupt Bits:
1672                    ; line_number = 189
1673                    ;  call byte_put(interrupt_bits)
1674 00e4 083e          movf    interrupt_bits,w
1675 00e5 22e0          call    byte_put
1676                    ; Recombine size1 = 0 || size2 = 0
1677   00e6 :   main__48:
1678                    ; code.delay=4294967295 back_code.delay=4294967295
1679                    ; <=bit_code_emit@symbol; sym=__z (data:X0=>X0 code:XX=>XX)
1680                    ; line_number = 187
1681                    ;  if (command & 7) = 7 done
1682 00e6 2938          goto    main__75
1683                    ; line_number = 190
1684                    ; case 6
1685   00e7 :   main__71:
1686                    ; # Shared Interrupt commands (Command = 1111 0xxx):
1687                    ; line_number = 192
1688                    ;  switch command & 7 start
1689 00e7 3000          movlw   main__56>>8
1690 00e8 008a          movwf   __pclath
1691 00e9 3007          movlw   7
1692 00ea 053a          andwf   command,w
1693 00eb 3eed          addlw   main__56
1694 00ec 0082          movwf   __pcl
1695                    ; page_group 8
1696   00ed :   main__56:
1697 00ed 28f5          goto    main__53
1698 00ee 28f5          goto    main__53
1699 00ef 28f5          goto    main__53
1700 00f0 28f5          goto    main__53
1701 00f1 28fc          goto    main__54
1702 00f2 28fc          goto    main__54
1703 00f3 2900          goto    main__55
1704 00f4 2900          goto    main__55
1705                    ; line_number = 193
1706                    ; case 0, 1, 2, 3
1707   00f5 :   main__53:
1708                    ; # Set interrupt bits (Command = 1111 10ep):
1709                    ; line_number = 195
1710                    ;  interrupt_enable := command@1
1711 00f5 10be          bcf     interrupt_enable___byte, interrupt_enable___bit
1712 0000003a = main__select__49___byte equ command
1713 00000001 = main__select__49___bit equ 1
1714                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
1715                    ; CASE: True.size=1 False.size=0
1716 00f6 18ba          btfsc   main__select__49___byte, main__select__49___bit
1717 00f7 14be          bsf     interrupt_enable___byte, interrupt_enable___bit
1718                    ; Recombine size1 = 0 || size2 = 0
1719                    ; code.delay=4294967295 back_code.delay=4294967295
1720                    ; <=bit_code_emit@symbol; sym=main__select__49 (data:X0=>X0 code:XX=>XX)
1721                    ; line_number = 196
1722                    ;  interrupt_pending := command@0
1723 00f8 103e          bcf     interrupt_pending___byte, interrupt_pending___bit
1724 0000003a = main__select__50___byte equ command
1725 00000000 = main__select__50___bit equ 0
1726                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
1727                    ; CASE: True.size=1 False.size=0
1728 00f9 183a          btfsc   main__select__50___byte, main__select__50___bit
1729 00fa 143e          bsf     interrupt_pending___byte, interrupt_pending___bit
1730                    ; Recombine size1 = 0 || size2 = 0
1731                    ; code.delay=4294967295 back_code.delay=4294967295
1732                    ; <=bit_code_emit@symbol; sym=main__select__50 (data:X0=>X0 code:XX=>XX)
1733 00fb 2903          goto    main__57
1734                    ; line_number = 197
1735                    ; case 4, 5
1736   00fc :   main__54:
1737                    ; # Set Interrupt Pending (Command = 1111 110p):
1738                    ; line_number = 199
1739                    ;  interrupt_pending := command@0
1740 00fc 103e          bcf     interrupt_pending___byte, interrupt_pending___bit
1741 0000003a = main__select__51___byte equ command
1742 00000000 = main__select__51___bit equ 0
1743                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
1744                    ; CASE: True.size=1 False.size=0
1745 00fd 183a          btfsc   main__select__51___byte, main__select__51___bit
1746 00fe 143e          bsf     interrupt_pending___byte, interrupt_pending___bit
1747                    ; Recombine size1 = 0 || size2 = 0
1748                    ; code.delay=4294967295 back_code.delay=4294967295
1749                    ; <=bit_code_emit@symbol; sym=main__select__51 (data:X0=>X0 code:XX=>XX)
1750 00ff 2903          goto    main__57
1751                    ; line_number = 200
1752                    ; case 6, 7
1753   0100 :   main__55:
1754                    ; # Set Interrupt Enable (Command = 1110 111e):
1755                    ; line_number = 202
1756                    ;  interrupt_enable := command@0
1757 0100 10be          bcf     interrupt_enable___byte, interrupt_enable___bit
1758 0000003a = main__select__52___byte equ command
1759 00000000 = main__select__52___bit equ 0
1760                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
1761                    ; CASE: True.size=1 False.size=0
1762 0101 183a          btfsc   main__select__52___byte, main__select__52___bit
1763 0102 14be          bsf     interrupt_enable___byte, interrupt_enable___bit
1764                    ; Recombine size1 = 0 || size2 = 0
1765                    ; code.delay=4294967295 back_code.delay=4294967295
1766                    ; <=bit_code_emit@symbol; sym=main__select__52 (data:X0=>X0 code:XX=>XX)
1767   0103 :   main__57:
1768                    ; switch end:(data:X0=>X0 code:XX=>XX)
1769                    ; line_number = 192
1770                    ;  switch command & 7 done
1771 0103 2938          goto    main__75
1772                    ; line_number = 203
1773                    ; case 7
1774   0104 :   main__72:
1775                    ; # Shared commands (Command = 1111 1xxx):
1776                    ; line_number = 205
1777                    ;  switch command & 7 start
1778 0104 3001          movlw   main__67>>8
1779 0105 008a          movwf   __pclath
1780 0106 3007          movlw   7
1781 0107 053a          andwf   command,w
1782 0108 3e0a          addlw   main__67
1783 0109 0082          movwf   __pcl
1784                    ; page_group 8
1785   010a :   main__67:
1786 010a 2912          goto    main__59
1787 010b 2916          goto    main__60
1788 010c 291a          goto    main__61
1789 010d 291f          goto    main__62
1790 010e 2922          goto    main__63
1791 010f 292d          goto    main__64
1792 0110 2930          goto    main__65
1793 0111 2935          goto    main__66
1794                    ; line_number = 206
1795                    ; case 0
1796   0112 :   main__59:
1797                    ; This case body wants this bit set
1798 0112 1683          bsf     __rp0___byte, __rp0___bit
1799                    ; # Clock Decrement (Command = 1111 1000):
1800                    ; line_number = 208
1801                    ;  _osccal := _osccal - _osccal_lsb
1802 0113 30fc          movlw   252
1803 0114 0790          addwf   _osccal,f
1804 0115 2938          goto    main__68
1805                    ; line_number = 209
1806                    ; case 1
1807   0116 :   main__60:
1808                    ; This case body wants this bit set
1809 0116 1683          bsf     __rp0___byte, __rp0___bit
1810                    ; # Clock Increment (Command = 1111 1001):
1811                    ; line_number = 211
1812                    ;  _osccal := _osccal + _osccal_lsb
1813 0117 3004          movlw   4
1814 0118 0790          addwf   _osccal,f
1815 0119 2938          goto    main__68
1816                    ; line_number = 212
1817                    ; case 2
1818   011a :   main__61:
1819                    ; This case body wants this bit set
1820 011a 1683          bsf     __rp0___byte, __rp0___bit
1821                    ; # Clock Read (Command = 1111 1010):
1822                    ; line_number = 214
1823                    ;  call byte_put(_osccal)
1824 011b 0810          movf    _osccal,w
1825 011c 1283          bcf     __rp0___byte, __rp0___bit
1826 011d 22e0          call    byte_put
1827 011e 2938          goto    main__68
1828                    ; line_number = 215
1829                    ; case 3
1830   011f :   main__62:
1831                    ; # Clock Pulse (Command = 1111 1011):
1832                    ; line_number = 217
1833                    ;  call byte_put(0)
1834 011f 3000          movlw   0
1835 0120 22e0          call    byte_put
1836 0121 2938          goto    main__68
1837                    ; line_number = 218
1838                    ; case 4
1839   0122 :   main__63:
1840                    ; # ID Next (Command = 1111 1100):
1841                    ; line_number = 220
1842                    ;  call byte_put(id[id_index])
1843 0122 0833          movf    id_index,w
1844 0123 226d          call    id
1845 0124 22e0          call    byte_put
1846                    ; line_number = 221
1847                    ;  id_index := id_index + 1
1848 0125 0ab3          incf    id_index,f
1849                    ; line_number = 222
1850                    ;  if id_index >= id.size start
1851 0126 302f          movlw   47
1852 0127 0233          subwf   id_index,w
1853                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
1854                    ; CASE: true_code.size = 0 && false_code.size > 1
1855                    ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=0 (non-uniform delay)
1856 0128 1c03          btfss   __c___byte, __c___bit
1857 0129 292c          goto    main__58
1858                    ; line_number = 223
1859                    ; id_index := 0
1860 012a 3000          movlw   0
1861 012b 00b3          movwf   id_index
1862                    ; Recombine size1 = 0 || size2 = 0
1863   012c :   main__58:
1864                    ; code.delay=4294967295 back_code.delay=4294967295
1865                    ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX)
1866                    ; line_number = 222
1867                    ;  if id_index >= id.size done
1868 012c 2938          goto    main__68
1869                    ; line_number = 224
1870                    ; case 5
1871   012d :   main__64:
1872                    ; # ID Reset (Command = 1111 1101):
1873                    ; line_number = 226
1874                    ;  id_index := 0
1875 012d 3000          movlw   0
1876 012e 00b3          movwf   id_index
1877 012f 2938          goto    main__68
1878                    ; line_number = 227
1879                    ; case 6
1880   0130 :   main__65:
1881                    ; # Glitch Read (Command = 1111 1110):
1882                    ; line_number = 229
1883                    ;  call byte_put(glitch)
1884 0130 0832          movf    glitch,w
1885 0131 22e0          call    byte_put
1886                    ; line_number = 230
1887                    ;  glitch := 0
1888 0132 3000          movlw   0
1889 0133 00b2          movwf   glitch
1890 0134 2938          goto    main__68
1891                    ; line_number = 231
1892                    ; case 7
1893   0135 :   main__66:
1894                    ; # Glitch (Command = 1111 1111):
1895                    ; line_number = 233
1896                    ;  if glitch != 0xff start
1897                    ; Left minus Right
1898 0135 0a32          incf    glitch,w
1899                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
1900                    ; CASE: true_code.size=0 && false_code.size=1
1901 0136 1d03          btfss   __z___byte, __z___bit
1902                    ; line_number = 234
1903                    ; glitch := glitch + 1
1904 0137 0ab2          incf    glitch,f
1905            
1906                    ; Recombine size1 = 0 || size2 = 0
1907                    ; code.delay=4294967295 back_code.delay=4294967295
1908                    ; <=bit_code_emit@symbol; sym=__z (data:X0=>X0 code:XX=>XX)
1909                    ; line_number = 233
1910                    ;  if glitch != 0xff done
1911   0138 :   main__68:
1912                    ; switch end:(data:X0=>X? code:XX=>XX)
1913                    ; line_number = 205
1914                    ;  switch command & 7 done
1915   0138 :   main__75:
1916                    ; switch end:(data:X0=>X? code:XX=>XX)
1917                    ; line_number = 181
1918                    ;  switch (command >> 3) & 7 done
1919   0138 :   main__82:
1920                    ; switch end:(data:X0=>X? code:XX=>XX)
1921                    ; line_number = 90
1922                    ;  switch command >> 6 done
1923                    ; line_number = 85
1924                    ;  loop_forever wrap-up
1925                    ; Need to adjust code banks to match front of loop
1926 0138 1283          bcf     __rp0___byte, __rp0___bit
1927 0139 280d          goto    main__1
1928                    ; line_number = 85
1929                    ;  loop_forever done
1930                    ; delay after procedure statements=non-uniform
1931            
1932            
1933            
1934            
1935                    ; line_number = 236
1936                    ; procedure delay
1937   013a :   delay:
1938                    ; arguments_none
1939                    ; line_number = 238
1940                    ;  returns_nothing
1941                    ; line_number = 239
1942                    ;  exact_delay delay_instructions
1943            
1944                    ; line_number = 241
1945                    ;  local chan byte
1946 0000004a = delay__chan equ shared___globals+42
1947                    ; line_number = 242
1948                    ;  local changed byte
1949 0000004b = delay__changed equ shared___globals+43
1950                    ; line_number = 243
1951                    ;  local current byte
1952 0000004c = delay__current equ shared___globals+44
1953                    ; line_number = 244
1954                    ;  local hexify bit
1955 0000005f = delay__hexify___byte equ shared___globals+63
1956 00000003 = delay__hexify___bit equ 3
1957                    ; line_number = 245
1958                    ;  local index byte
1959 0000004d = delay__index equ shared___globals+45
1960                    ; line_number = 246
1961                    ;  local mask byte
1962 0000004e = delay__mask equ shared___globals+46
1963                    ; line_number = 247
1964                    ;  local not_current byte
1965 0000004f = delay__not_current equ shared___globals+47
1966                    ; line_number = 248
1967                    ;  local previous byte
1968 00000050 = delay__previous equ shared___globals+48
1969                    ; line_number = 249
1970                    ;  local temp byte
1971 00000051 = delay__temp equ shared___globals+49
1972                    ; line_number = 250
1973                    ;  local thresholds_index byte
1974 00000052 = delay__thresholds_index equ shared___globals+50
1975                    ; line_number = 251
1976                    ;  local high byte
1977 00000053 = delay__high equ shared___globals+51
1978                    ; line_number = 252
1979                    ;  local low byte
1980 00000054 = delay__low equ shared___globals+52
1981            
1982                    ; before procedure statements delay=0, bit states=(data:X0=>X0 code:XX=>XX)
1983                    ; line_number = 254
1984                    ;  watch_dog_reset done
1985                    ; Delay at watch_dog_reset is 0
1986 013a 0064          clrwdt  
1987            
1988                    ; line_number = 256
1989                    ;  switch delay_counter start
1990 013b 3001          movlw   delay__49>>8
1991 013c 008a          movwf   __pclath
1992 013d 0830          movf    delay_counter,w
1993 013e 3e40          addlw   delay__49
1994 013f 0082          movwf   __pcl
1995                    ; page_group 4
1996   0140 :   delay__49:
1997 0140 2944          goto    delay__45
1998 0141 2968          goto    delay__46
1999 0142 29d5          goto    delay__47
2000 0143 2a1a          goto    delay__48
2001                    ; case_data[0] delay=89{0 }
2002                    ; case_data[1] delay=93{1 }
2003                    ; case_data[2] delay=58{2 }
2004                    ; case_data[3] delay=0{3 }
2005                    ; Maximum Case Delay = 93
2006                    ; line_number = 257
2007                    ; case 0
2008   0144 :   delay__45:
2009                    ; # Perform A/D:
2010                    ; line_number = 259
2011                    ;  chan := chans[channel]
2012                    ; Delay at assignment is 0
2013 0144 0831          movf    channel,w
2014 0145 22a2          call    chans
2015 0146 00ca          movwf   delay__chan
2016            
2017                    ; # Acquiring the signal takes approximately 20uS.
2018                    ; # We'll pad that out a little to 30uS to be safe:
2019                    ; line_number = 263
2020                    ;  _adcon0 := (chan << 2) | 1
2021                    ; Delay at assignment is 13
2022 00000058 = delay__1 equ shared___globals+56
2023 0147 0d4a          rlf     delay__chan,w
2024 0148 00d8          movwf   delay__1
2025 0149 0d58          rlf     delay__1,w
2026 014a 39fc          andlw   252
2027 014b 3801          iorlw   1
2028 014c 009f          movwf   _adcon0
2029                    ; Delay at delay is 19
2030                    ; line_number = 264
2031                    ;  delay 30 start
2032                    ; Delay expression evaluates to 30
2033                    ; line_number = 265
2034                    ; do_nothing
2035            
2036                    ; Delay 30 cycles
2037                    ; Delay loop takes 7 * 4 = 28 cycles
2038 014d 3007          movlw   7
2039   014e :   delay__2:
2040 014e 3eff          addlw   255
2041 014f 1d03          btfss   __z___byte, __z___bit
2042 0150 294e          goto    delay__2
2043 0151 2952          goto    delay__3
2044   0152 :   delay__3:
2045                    ; line_number = 264
2046                    ;  delay 30 done
2047                    ; # Getting the value takes 11 & Tad, where Tad = 2uS = 22uS.
2048                    ; # We'll add 5uS for a little pad:
2049                    ; line_number = 269
2050                    ;  _go := 1
2051                    ; Delay at assignment is 49
2052 0152 149f          bsf     _go___byte, _go___bit
2053                    ; Delay at delay is 50
2054                    ; line_number = 270
2055                    ;  delay 28 start
2056                    ; Delay expression evaluates to 28
2057                    ; line_number = 271
2058                    ; do_nothing
2059            
2060                    ; Delay 28 cycles
2061                    ; Delay loop takes 7 * 4 = 28 cycles
2062 0153 3007          movlw   7
2063   0154 :   delay__4:
2064 0154 3eff          addlw   255
2065 0155 1d03          btfss   __z___byte, __z___bit
2066 0156 2954          goto    delay__4
2067                    ; line_number = 270
2068                    ;  delay 28 done
2069                    ; # A/D result is ready:
2070                    ; line_number = 274
2071                    ;  temp := 0xff - _adresh
2072                    ; Delay at assignment is 78
2073 0157 091e          comf    _adresh,w
2074 0158 00d1          movwf   delay__temp
2075            
2076                    ; # Store the result away:
2077                    ; line_number = 277
2078                    ;  if channel@2 start
2079                    ; Delay at if is 80
2080 00000031 = delay__select__5___byte equ channel
2081 00000002 = delay__select__5___bit equ 2
2082                    ; (after recombine) true_delay=2, false_delay=5 uniform_delay=true
2083                    ; CASE: true_code_size > 1 && false_code_size > 1
2084                    ; true_code_size=2 false_code_size=5
2085 0159 1d31          btfss   delay__select__5___byte, delay__select__5___bit
2086 015a 295f          goto    delay__6
2087                    ; # Deal with threshold trim pot:
2088                    ; line_number = 279
2089                    ;  threshold_trim_pot := temp
2090                    ; Delay at assignment is 0
2091 015b 0851          movf    delay__temp,w
2092 015c 00b7          movwf   threshold_trim_pot
2093                    ; Delay 2 cycles
2094 015d 295e          goto    delay__8
2095   015e :   delay__8:
2096 015e 2964          goto    delay__7
2097   015f :   delay__6:
2098                    ; line_number = 281
2099                    ; analogs[channel] := temp
2100                    ; Delay at assignment is 0
2101                    ; index_fsr_first
2102 015f 0831          movf    channel,w
2103 0160 3e24          addlw   analogs
2104 0161 0084          movwf   __fsr
2105 0162 0851          movf    delay__temp,w
2106 0163 0080          movwf   __indf
2107            
2108   0164 :   delay__7:
2109                    ; code.delay=88 back_code.delay=0
2110                    ; <=bit_code_emit@symbol; sym=delay__select__5 (data:X0=>X0 code:XX=>XX)
2111                    ; if final true delay=2 false delay=5 code delay=88
2112                    ; line_number = 277
2113                    ;  if channel@2 done
2114                    ; # Next time around, do case 1:
2115                    ; line_number = 284
2116                    ;  delay_counter := delay_counter + 1
2117                    ; Delay at assignment is 88
2118 0164 0ab0          incf    delay_counter,f
2119                    ; Delay 4 cycles
2120 0165 2966          goto    delay__51
2121   0166 :   delay__51:
2122 0166 2967          goto    delay__52
2123   0167 :   delay__52:
2124 0167 2a20          goto    delay__50
2125                    ; line_number = 285
2126                    ; case 1
2127   0168 :   delay__46:
2128                    ; #  Process A/D result
2129                    ; line_number = 287
2130                    ;  if !(channel@2) start
2131                    ; Delay at if is 0
2132 00000031 = delay__select__16___byte equ channel
2133 00000002 = delay__select__16___bit equ 2
2134                    ; (after recombine) true_delay=0, false_delay=39 uniform_delay=true
2135                    ; CASE: true.size=0 && false.size>1
2136                    ; bit_code_emit_helper1: body_code.size=37 true_test=false body_code.delay=39 (uniform delay)
2137 0168 1d31          btfss   delay__select__16___byte, delay__select__16___bit
2138 0169 2970          goto    delay__17
2139                    ; Delay 38 cycles
2140                    ; Delay loop takes 9 * 4 = 36 cycles
2141 016a 3009          movlw   9
2142   016b :   delay__19:
2143 016b 3eff          addlw   255
2144 016c 1d03          btfss   __z___byte, __z___bit
2145 016d 296b          goto    delay__19
2146 016e 296f          goto    delay__20
2147   016f :   delay__20:
2148 016f 2995          goto    delay__18
2149   0170 :   delay__17:
2150                    ; line_number = 288
2151                    ; mask := masks[channel]
2152                    ; Delay at assignment is 0
2153 0170 0831          movf    channel,w
2154 0171 22ad          call    masks
2155 0172 00ce          movwf   delay__mask
2156                    ; line_number = 289
2157                    ;  temp := analogs[channel]
2158                    ; Delay at assignment is 13
2159 0173 0831          movf    channel,w
2160 0174 3e24          addlw   analogs
2161 0175 0084          movwf   __fsr
2162 0176 0800          movf    __indf,w
2163 0177 00d1          movwf   delay__temp
2164                    ; line_number = 290
2165                    ;  if (temp >= thresholds_high[channel]) start
2166                    ; Delay at if is 18
2167 0178 0831          movf    channel,w
2168 0179 3e2c          addlw   thresholds_high
2169 017a 0084          movwf   __fsr
2170 017b 0800          movf    __indf,w
2171 017c 0251          subwf   delay__temp,w
2172                    ; (after recombine) true_delay=2, false_delay=13 uniform_delay=true
2173                    ; CASE: true_code_size > 1 && false_code_size > 1
2174                    ; true_code_size=2 false_code_size=14
2175 017d 1c03          btfss   __c___byte, __c___bit
2176 017e 2987          goto    delay__12
2177                    ; line_number = 291
2178                    ; raw_inputs := raw_inputs | mask
2179                    ; Delay at assignment is 0
2180 017f 084e          movf    delay__mask,w
2181 0180 04bd          iorwf   raw_inputs,f
2182                    ; Delay 10 cycles
2183                    ; Delay loop takes 2 * 4 = 8 cycles
2184 0181 3002          movlw   2
2185   0182 :   delay__14:
2186 0182 3eff          addlw   255
2187 0183 1d03          btfss   __z___byte, __z___bit
2188 0184 2982          goto    delay__14
2189 0185 2986          goto    delay__15
2190   0186 :   delay__15:
2191 0186 2995          goto    delay__13
2192   0187 :   delay__12:
2193                    ; line_number = 292
2194 0187 0831          movf    channel,w
2195 0188 3e28          addlw   thresholds_low
2196 0189 0084          movwf   __fsr
2197 018a 0800          movf    __indf,w
2198 018b 0251          subwf   delay__temp,w
2199 018c 1903          btfsc   __z___byte, __z___bit
2200 018d 1003          bcf     __c___byte, __c___bit
2201                    ; (after recombine) true_delay=0, false_delay=3 uniform_delay=true
2202                    ; CASE: true.size=0 && false.size>1
2203                    ; bit_code_emit_helper1: body_code.size=3 true_test=false body_code.delay=3 (uniform delay)
2204 018e 1c03          btfss   __c___byte, __c___bit
2205 018f 2992          goto    delay__9
2206                    ; Delay 2 cycles
2207 0190 2991          goto    delay__11
2208   0191 :   delay__11:
2209 0191 2995          goto    delay__10
2210   0192 :   delay__9:
2211                    ; line_number = 293
2212                    ; raw_inputs := raw_inputs & (0xff ^ mask)
2213                    ; Delay at assignment is 0
2214 0192 30ff          movlw   255
2215 0193 064e          xorwf   delay__mask,w
2216 0194 05bd          andwf   raw_inputs,f
2217            
2218   0195 :   delay__10:
2219                    ; code.delay=13 back_code.delay=0
2220                    ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX)
2221                    ; Uniform delay broke in relation_code_emit
2222   0195 :   delay__13:
2223                    ; code.delay=39 back_code.delay=0
2224                    ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX)
2225                    ; Uniform delay broke in relation_code_emit
2226                    ; if final true delay=2 false delay=13 code delay=39
2227                    ; line_number = 290
2228                    ;  if (temp >= thresholds_high[channel]) done
2229   0195 :   delay__18:
2230                    ; code.delay=42 back_code.delay=0
2231                    ; <=bit_code_emit@symbol; sym=delay__select__16 (data:X0=>X0 code:XX=>XX)
2232                    ; if final true delay=39 false delay=0 code delay=42
2233                    ; line_number = 287
2234                    ;  if !(channel@2) done
2235                    ; # Bump to next channel:
2236                    ; line_number = 296
2237                    ;  channel := channel + 1
2238                    ; Delay at assignment is 42
2239 0195 0ab1          incf    channel,f
2240                    ; line_number = 297
2241                    ;  if channel >= chans.size start
2242                    ; Delay at if is 43
2243 0196 3005          movlw   5
2244 0197 0231          subwf   channel,w
2245                    ; (after recombine) true_delay=2, false_delay=0 uniform_delay=true
2246                    ; CASE: true_code.size = 0 && false_code.size > 1
2247                    ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=2 (uniform delay)
2248 0198 1803          btfsc   __c___byte, __c___bit
2249 0199 299c          goto    delay__21
2250                    ; Delay 1 cycles
2251 019a 0000          nop     
2252 019b 299e          goto    delay__22
2253   019c :   delay__21:
2254                    ; line_number = 298
2255                    ; channel := 0
2256                    ; Delay at assignment is 0
2257 019c 3000          movlw   0
2258 019d 00b1          movwf   channel
2259            
2260   019e :   delay__22:
2261                    ; code.delay=50 back_code.delay=0
2262                    ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX)
2263                    ; Uniform delay broke in relation_code_emit
2264                    ; if final true delay=2 false delay=0 code delay=50
2265                    ; line_number = 297
2266                    ;  if channel >= chans.size done
2267                    ; # Light up the LED's:
2268                    ; line_number = 301
2269                    ;  inputs := raw_inputs ^ complement
2270                    ; Delay at assignment is 50
2271 019e 083d          movf    raw_inputs,w
2272 019f 0639          xorwf   complement,w
2273 01a0 00b8          movwf   inputs
2274                    ; line_number = 302
2275                    ;  led1 := inputs@0
2276                    ; Delay at assignment is 53
2277 01a1 1205          bcf     led1___byte, led1___bit
2278 00000038 = delay__select__23___byte equ inputs
2279 00000000 = delay__select__23___bit equ 0
2280                    ; (after recombine) true_delay=1, false_delay=0 uniform_delay=true
2281                    ; CASE: True.size=1 False.size=0
2282 01a2 1838          btfsc   delay__select__23___byte, delay__select__23___bit
2283 01a3 1605          bsf     led1___byte, led1___bit
2284                    ; code.delay=56 back_code.delay=0
2285                    ; <=bit_code_emit@symbol; sym=delay__select__23 (data:X0=>X0 code:XX=>XX)
2286                    ; line_number = 303
2287                    ;  led2 := inputs@1
2288                    ; Delay at assignment is 56
2289 01a4 1287          bcf     led2___byte, led2___bit
2290 00000038 = delay__select__24___byte equ inputs
2291 00000001 = delay__select__24___bit equ 1
2292                    ; (after recombine) true_delay=1, false_delay=0 uniform_delay=true
2293                    ; CASE: True.size=1 False.size=0
2294 01a5 18b8          btfsc   delay__select__24___byte, delay__select__24___bit
2295 01a6 1687          bsf     led2___byte, led2___bit
2296                    ; code.delay=59 back_code.delay=0
2297                    ; <=bit_code_emit@symbol; sym=delay__select__24 (data:X0=>X0 code:XX=>XX)
2298                    ; line_number = 304
2299                    ;  led3 := inputs@2
2300                    ; Delay at assignment is 59
2301 01a7 1207          bcf     led3___byte, led3___bit
2302 00000038 = delay__select__25___byte equ inputs
2303 00000002 = delay__select__25___bit equ 2
2304                    ; (after recombine) true_delay=1, false_delay=0 uniform_delay=true
2305                    ; CASE: True.size=1 False.size=0
2306 01a8 1938          btfsc   delay__select__25___byte, delay__select__25___bit
2307 01a9 1607          bsf     led3___byte, led3___bit
2308                    ; code.delay=62 back_code.delay=0
2309                    ; <=bit_code_emit@symbol; sym=delay__select__25 (data:X0=>X0 code:XX=>XX)
2310                    ; line_number = 305
2311                    ;  led4 := inputs@3
2312                    ; Delay at assignment is 62
2313 01aa 1187          bcf     led4___byte, led4___bit
2314 00000038 = delay__select__26___byte equ inputs
2315 00000003 = delay__select__26___bit equ 3
2316                    ; (after recombine) true_delay=1, false_delay=0 uniform_delay=true
2317                    ; CASE: True.size=1 False.size=0
2318 01ab 19b8          btfsc   delay__select__26___byte, delay__select__26___bit
2319 01ac 1587          bsf     led4___byte, led4___bit
2320                    ; code.delay=65 back_code.delay=0
2321                    ; <=bit_code_emit@symbol; sym=delay__select__26 (data:X0=>X0 code:XX=>XX)
2322            
2323                    ; # Setup for interrupts:
2324                    ; line_number = 308
2325                    ;  previous := current
2326                    ; Delay at assignment is 65
2327 01ad 084c          movf    delay__current,w
2328 01ae 00d0          movwf   delay__previous
2329                    ; # Read the I/O port once:
2330                    ; line_number = 310
2331                    ;  current := inputs ^ complement
2332                    ; Delay at assignment is 67
2333 01af 0838          movf    inputs,w
2334 01b0 0639          xorwf   complement,w
2335 01b1 00cc          movwf   delay__current
2336                    ; line_number = 311
2337                    ;  not_current := current ^ 0xf
2338                    ; Delay at assignment is 70
2339 01b2 300f          movlw   15
2340 01b3 064c          xorwf   delay__current,w
2341 01b4 00cf          movwf   delay__not_current
2342                    ; line_number = 312
2343                    ;  changed := current ^ previous
2344                    ; Delay at assignment is 73
2345 01b5 084c          movf    delay__current,w
2346 01b6 0650          xorwf   delay__previous,w
2347 01b7 00cb          movwf   delay__changed
2348            
2349                    ; # See about triggering the interrupt_pending flag:
2350                    ; line_number = 315
2351                    ;  if (low & not_current) | (high & current) | (changed & current & raising) | (changed & not_current & falling) != 0 start
2352                    ; Delay at if is 76
2353                    ; Left minus Right
2354 00000058 = delay__27 equ shared___globals+56
2355 01b8 0854          movf    delay__low,w
2356 01b9 054f          andwf   delay__not_current,w
2357 01ba 00d8          movwf   delay__27
2358 01bb 0853          movf    delay__high,w
2359 01bc 054c          andwf   delay__current,w
2360 01bd 04d8          iorwf   delay__27,f
2361 01be 084b          movf    delay__changed,w
2362 01bf 054c          andwf   delay__current,w
2363 01c0 0542          andwf   raising,w
2364 01c1 04d8          iorwf   delay__27,f
2365 01c2 084b          movf    delay__changed,w
2366 01c3 054f          andwf   delay__not_current,w
2367 01c4 053f          andwf   falling,w
2368 01c5 0458          iorwf   delay__27,w
2369                    ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true
2370                    ; CASE: true_code.size=0 && false_code.size=1
2371 01c6 1d03          btfss   __z___byte, __z___bit
2372                    ; line_number = 318
2373                    ; interrupt_pending := 1
2374                    ; Delay at assignment is 0
2375 01c7 143e          bsf     interrupt_pending___byte, interrupt_pending___bit
2376            
2377                    ; code.delay=92 back_code.delay=0
2378                    ; <=bit_code_emit@symbol; sym=__z (data:X0=>X0 code:XX=>XX)
2379                    ; Uniform delay broke in relation_code_emit
2380                    ; if final true delay=1 false delay=0 code delay=92
2381                    ; line_number = 315
2382                    ;  if (low & not_current) | (high & current) | (changed & current & raising) | (changed & not_current & falling) != 0 done
2383            
2384                    ; # Send an interrupt if interrupts are enabled:
2385                    ; line_number = 321
2386                    ;  if interrupt_pending && interrupt_enable start
2387                    ; Delay at if is 92
2388                    ; (after recombine) true_delay=5, false_delay=2 uniform_delay=true
2389                    ; CASE: true.size>1 false.size=1; false=GOTO
2390                    ; Uniform delay
2391 01c8 183e          btfsc   interrupt_pending___byte, interrupt_pending___bit
2392 01c9 29cd          goto    delay__31
2393 01ca 29d3          goto    delay__28
2394                    ; Delay 2 cycles
2395 01cb 29cc          goto    delay__33
2396   01cc :   delay__33:
2397 01cc 29d3          goto    delay__32
2398   01cd :   delay__31:
2399                    ; &&||: index=1 true_delay=2 false_delay=0 goto_delay=2
2400                    ; (after recombine) true_delay=2, false_delay=0 uniform_delay=true
2401                    ; CASE: true_code.size = 0 && false_code.size > 1
2402                    ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=2 (uniform delay)
2403 01cd 18be          btfsc   interrupt_enable___byte, interrupt_enable___bit
2404 01ce 29d1          goto    delay__29
2405                    ; Delay 1 cycles
2406 01cf 0000          nop     
2407 01d0 29d3          goto    delay__30
2408   01d1 :   delay__29:
2409                    ; # Shove serial out to low:
2410                    ; line_number = 323
2411                    ;  interrupt_enable := 0
2412                    ; Delay at assignment is 0
2413 01d1 10be          bcf     interrupt_enable___byte, interrupt_enable___bit
2414                    ; line_number = 324
2415                    ;  serial_out := 0
2416                    ; Delay at assignment is 1
2417 01d2 1285          bcf     serial_out___byte, serial_out___bit
2418            
2419   01d3 :   delay__30:
2420   01d3 :   delay__28:
2421                    ; code.delay=5 back_code.delay=0
2422                    ; <=bit_code_emit@symbol; sym=interrupt_enable (data:X0=>X0 code:XX=>XX)
2423                    ; &&||: index=0 true_delay=2 false_delay=0 goto_delay=2
2424                    ; &&||:: index=0 new_delay=5 goto_delay=2
2425   01d3 :   delay__32:
2426                    ; code.delay=4294967295 back_code.delay=0
2427                    ; <=bit_code_emit@symbol; sym=interrupt_pending (data:X0=>X0 code:XX=>XX)
2428                    ; if final true delay=2 false delay=0 code delay=92
2429                    ; line_number = 321
2430                    ;  if interrupt_pending && interrupt_enable done
2431                    ; # Next time around, perform case 2:
2432                    ; line_number = 327
2433                    ;  delay_counter := delay_counter + 1
2434                    ; Delay at assignment is 92
2435 01d3 0ab0          incf    delay_counter,f
2436 01d4 2a20          goto    delay__50
2437                    ; line_number = 328
2438                    ; case 2
2439   01d5 :   delay__47:
2440                    ; # Process threshold trim pot:
2441                    ; line_number = 330
2442                    ;  thresholds_index := (thresholds_index + 1) & 3
2443                    ; Delay at assignment is 0
2444 01d5 0a52          incf    delay__thresholds_index,w
2445 01d6 3903          andlw   3
2446 01d7 00d2          movwf   delay__thresholds_index
2447                    ; line_number = 331
2448                    ;  mask := masks[thresholds_index]
2449                    ; Delay at assignment is 3
2450 01d8 0852          movf    delay__thresholds_index,w
2451 01d9 22ad          call    masks
2452 01da 00ce          movwf   delay__mask
2453                    ; line_number = 332
2454                    ;  if threshold_enables & mask != 0 start
2455                    ; Delay at if is 16
2456                    ; Left minus Right
2457 01db 0843          movf    threshold_enables,w
2458 01dc 054e          andwf   delay__mask,w
2459                    ; (after recombine) true_delay=0, false_delay=36 uniform_delay=true
2460                    ; CASE: true.size=0 && false.size>1
2461                    ; bit_code_emit_helper1: body_code.size=44 true_test=false body_code.delay=36 (uniform delay)
2462 01dd 1d03          btfss   __z___byte, __z___bit
2463 01de 29e6          goto    delay__41
2464                    ; Delay 35 cycles
2465                    ; Delay loop takes 8 * 4 = 32 cycles
2466 01df 3008          movlw   8
2467   01e0 :   delay__43:
2468 01e0 3eff          addlw   255
2469 01e1 1d03          btfss   __z___byte, __z___bit
2470 01e2 29e0          goto    delay__43
2471 01e3 29e4          goto    delay__44
2472   01e4 :   delay__44:
2473 01e4 0000          nop     
2474 01e5 2a12          goto    delay__42
2475   01e6 :   delay__41:
2476                    ; line_number = 333
2477                    ; low := thresholds_low[thresholds_index]
2478                    ; Delay at assignment is 0
2479 01e6 0852          movf    delay__thresholds_index,w
2480 01e7 3e28          addlw   thresholds_low
2481 01e8 0084          movwf   __fsr
2482 01e9 0800          movf    __indf,w
2483 01ea 00d4          movwf   delay__low
2484                    ; line_number = 334
2485                    ;  high := thresholds_high[thresholds_index]
2486                    ; Delay at assignment is 5
2487 01eb 0852          movf    delay__thresholds_index,w
2488 01ec 3e2c          addlw   thresholds_high
2489 01ed 0084          movwf   __fsr
2490 01ee 0800          movf    __indf,w
2491 01ef 00d3          movwf   delay__high
2492                    ; line_number = 335
2493                    ;  if threshold_trim_pot > low start
2494                    ; Delay at if is 10
2495 01f0 0854          movf    delay__low,w
2496 01f1 0237          subwf   threshold_trim_pot,w
2497 01f2 1903          btfsc   __z___byte, __z___bit
2498 01f3 1003          bcf     __c___byte, __c___bit
2499                    ; (after recombine) true_delay=4, false_delay=9 uniform_delay=true
2500                    ; CASE: true_code_size > 1 && false_code_size > 1
2501                    ; true_code_size=4 false_code_size=11
2502 01f4 1c03          btfss   __c___byte, __c___bit
2503 01f5 29fd          goto    delay__37
2504                    ; line_number = 336
2505                    ; low := low + 1
2506                    ; Delay at assignment is 0
2507 01f6 0ad4          incf    delay__low,f
2508                    ; line_number = 337
2509                    ;  if high != 255 start
2510                    ; Delay at if is 1
2511                    ; Left minus Right
2512 01f7 0a53          incf    delay__high,w
2513                    ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true
2514                    ; CASE: true_code.size=0 && false_code.size=1
2515 01f8 1d03          btfss   __z___byte, __z___bit
2516                    ; line_number = 338
2517                    ; high := high + 1
2518                    ; Delay at assignment is 0
2519 01f9 0ad3          incf    delay__high,f
2520                    ; code.delay=4 back_code.delay=0
2521                    ; <=bit_code_emit@symbol; sym=__z (data:X0=>X0 code:XX=>XX)
2522                    ; Uniform delay broke in relation_code_emit
2523                    ; if final true delay=1 false delay=0 code delay=4
2524                    ; line_number = 337
2525                    ;  if high != 255 done
2526                    ; Delay 4 cycles
2527 01fa 29fb          goto    delay__39
2528   01fb :   delay__39:
2529 01fb 29fc          goto    delay__40
2530   01fc :   delay__40:
2531 01fc 2a08          goto    delay__38
2532   01fd :   delay__37:
2533                    ; line_number = 339
2534 01fd 0851          movf    delay__temp,w
2535 01fe 0237          subwf   threshold_trim_pot,w
2536                    ; (after recombine) true_delay=0, false_delay=4 uniform_delay=true
2537                    ; CASE: true.size=0 && false.size>1
2538                    ; bit_code_emit_helper1: body_code.size=4 true_test=false body_code.delay=4 (uniform delay)
2539 01ff 1c03          btfss   __c___byte, __c___bit
2540 0200 2a04          goto    delay__34
2541                    ; Delay 3 cycles
2542 0201 2a02          goto    delay__36
2543   0202 :   delay__36:
2544 0202 0000          nop     
2545 0203 2a08          goto    delay__35
2546   0204 :   delay__34:
2547                    ; line_number = 340
2548                    ; low := low - 1
2549                    ; Delay at assignment is 0
2550 0204 03d4          decf    delay__low,f
2551                    ; line_number = 341
2552                    ;  if high != 0 start
2553                    ; Delay at if is 1
2554                    ; Left minus Right
2555 0205 0853          movf    delay__high,w
2556                    ; (after recombine) true_delay=0, false_delay=1 uniform_delay=true
2557                    ; CASE: true_code.size=0 && false_code.size=1
2558 0206 1d03          btfss   __z___byte, __z___bit
2559                    ; line_number = 342
2560                    ; high := high - 1
2561                    ; Delay at assignment is 0
2562 0207 03d3          decf    delay__high,f
2563                    ; code.delay=4 back_code.delay=0
2564                    ; <=bit_code_emit@symbol; sym=__z (data:X0=>X0 code:XX=>XX)
2565                    ; Uniform delay broke in relation_code_emit
2566                    ; if final true delay=1 false delay=0 code delay=4
2567                    ; line_number = 341
2568                    ;  if high != 0 done
2569   0208 :   delay__35:
2570                    ; code.delay=9 back_code.delay=0
2571                    ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX)
2572                    ; Uniform delay broke in relation_code_emit
2573   0208 :   delay__38:
2574                    ; code.delay=26 back_code.delay=0
2575                    ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX)
2576                    ; Uniform delay broke in relation_code_emit
2577                    ; if final true delay=4 false delay=9 code delay=26
2578                    ; line_number = 335
2579                    ;  if threshold_trim_pot > low done
2580                    ; line_number = 343
2581                    ; thresholds_low[thresholds_index] := low
2582                    ; Delay at assignment is 26
2583                    ; index_fsr_first
2584 0208 0852          movf    delay__thresholds_index,w
2585 0209 3e28          addlw   thresholds_low
2586 020a 0084          movwf   __fsr
2587 020b 0854          movf    delay__low,w
2588 020c 0080          movwf   __indf
2589                    ; line_number = 344
2590                    ;  thresholds_high[thresholds_index] := high
2591                    ; Delay at assignment is 31
2592                    ; index_fsr_first
2593 020d 0852          movf    delay__thresholds_index,w
2594 020e 3e2c          addlw   thresholds_high
2595 020f 0084          movwf   __fsr
2596 0210 0853          movf    delay__high,w
2597 0211 0080          movwf   __indf
2598            
2599   0212 :   delay__42:
2600                    ; code.delay=57 back_code.delay=0
2601                    ; <=bit_code_emit@symbol; sym=__z (data:X0=>X0 code:XX=>XX)
2602                    ; Uniform delay broke in relation_code_emit
2603                    ; if final true delay=36 false delay=0 code delay=57
2604                    ; line_number = 332
2605                    ;  if threshold_enables & mask != 0 done
2606                    ; # Next time around, perform case 3:
2607                    ; line_number = 347
2608                    ;  delay_counter := delay_counter + 1
2609                    ; Delay at assignment is 57
2610 0212 0ab0          incf    delay_counter,f
2611                    ; Delay 35 cycles
2612                    ; Delay loop takes 8 * 4 = 32 cycles
2613 0213 3008          movlw   8
2614   0214 :   delay__53:
2615 0214 3eff          addlw   255
2616 0215 1d03          btfss   __z___byte, __z___bit
2617 0216 2a14          goto    delay__53
2618 0217 2a18          goto    delay__54
2619   0218 :   delay__54:
2620 0218 0000          nop     
2621 0219 2a20          goto    delay__50
2622                    ; line_number = 348
2623                    ; case 3
2624   021a :   delay__48:
2625                    ; line_number = 349
2626                    ; do_nothing
2627            
2628            
2629                    ; Delay 93 cycles
2630                    ; Delay loop takes 23 * 4 = 92 cycles
2631 021a 3017          movlw   23
2632   021b :   delay__55:
2633 021b 3eff          addlw   255
2634 021c 1d03          btfss   __z___byte, __z___bit
2635 021d 2a1b          goto    delay__55
2636 021e 0000          nop     
2637 021f 2a20          goto    delay__50
2638   0220 :   delay__50:
2639                    ; switch end:(data:X0=>X? code:XX=>XX)
2640                    ; line_number = 256
2641                    ;  switch delay_counter done
2642                    ; delay after procedure statements=104
2643 0220 1283          bcf     __rp0___byte, __rp0___bit
2644                    ; Delay 26 cycles
2645                    ; Delay loop takes 6 * 4 = 24 cycles
2646 0221 3006          movlw   6
2647   0222 :   delay__56:
2648 0222 3eff          addlw   255
2649 0223 1d03          btfss   __z___byte, __z___bit
2650 0224 2a22          goto    delay__56
2651 0225 2a26          goto    delay__57
2652   0226 :   delay__57:
2653                    ; Implied return
2654 0226 3400          retlw   0
2655                    ; Final delay = 133
2656            
2657            
2658            
2659            
2660                    ; line_number = 352
2661                    ; procedure reset
2662   0227 :   reset:
2663                    ; arguments_none
2664                    ; line_number = 354
2665                    ;  returns_nothing
2666            
2667                    ; # This procedure will initialize all of the registers:
2668            
2669                    ; line_number = 358
2670                    ;  local index byte
2671 00000055 = reset__index equ shared___globals+53
2672            
2673                    ; # Initialize the A/D module:
2674                    ; # A/D Conversion clock is Fosc/8 (Tad=2uS) and AD is on:
2675                    ; before procedure statements delay=non-uniform, bit states=(data:X0=>X0 code:XX=>XX)
2676                    ; line_number = 362
2677                    ;  _adcon0 := 1
2678 0227 3001          movlw   1
2679 0228 009f          movwf   _adcon0
2680                    ; line_number = 363
2681                    ;  _adcon1 := 0
2682 0229 3000          movlw   0
2683 022a 1683          bsf     __rp0___byte, __rp0___bit
2684 022b 009f          movwf   _adcon1
2685                    ; line_number = 364
2686                    ;  _adcs0 := 1
2687 022c 161f          bsf     _adcs0___byte, _adcs0___bit
2688                    ; line_number = 365
2689                    ;  _adif := 0
2690 022d 1283          bcf     __rp0___byte, __rp0___bit
2691 022e 130c          bcf     _adif___byte, _adif___bit
2692                    ; line_number = 366
2693                    ;  _adie := 0
2694 022f 1683          bsf     __rp0___byte, __rp0___bit
2695 0230 130c          bcf     _adie___byte, _adie___bit
2696                    ; line_number = 367
2697                    ;  _gie := 0
2698 0231 1283          bcf     __rp0___byte, __rp0___bit
2699 0232 138b          bcf     _gie___byte, _gie___bit
2700                    ; #ansel := 0
2701                    ; #ans0 := 1
2702                    ; #ans1 := 1
2703                    ; #ans2 := 1
2704                    ; #ans4 := 1
2705                    ; #ans5 := 1
2706                    ; line_number = 374
2707                    ;  _adsel := (1 | 2 | 4 | 16 | 32)
2708                    ; Expression is strictly a constant
2709 0233 3037          movlw   55
2710 0234 1683          bsf     __rp0___byte, __rp0___bit
2711 0235 0091          movwf   _adsel
2712            
2713                    ; line_number = 376
2714                    ;  channel := 0
2715 0236 3000          movlw   0
2716 0237 1283          bcf     __rp0___byte, __rp0___bit
2717 0238 00b1          movwf   channel
2718                    ; line_number = 377
2719                    ;  complement := 0
2720 0239 3000          movlw   0
2721 023a 00b9          movwf   complement
2722                    ; line_number = 378
2723                    ;  command := 0
2724 023b 3000          movlw   0
2725 023c 00ba          movwf   command
2726                    ; line_number = 379
2727                    ;  debug_phase := 0
2728 023d 3000          movlw   0
2729 023e 00b5          movwf   debug_phase
2730                    ; line_number = 380
2731                    ;  debug_counter := 0
2732 023f 3000          movlw   0
2733 0240 00b6          movwf   debug_counter
2734                    ; line_number = 381
2735                    ;  delay_counter := 0
2736 0241 3000          movlw   0
2737 0242 00b0          movwf   delay_counter
2738                    ; line_number = 382
2739                    ;  falling := 0
2740 0243 3000          movlw   0
2741 0244 00bf          movwf   falling
2742                    ; line_number = 383
2743                    ;  glitch := 0
2744 0245 3000          movlw   0
2745 0246 00b2          movwf   glitch
2746                    ; line_number = 384
2747                    ;  high := 0
2748 0247 3000          movlw   0
2749 0248 00c0          movwf   high
2750                    ; line_number = 385
2751                    ;  id_index := 0
2752 0249 3000          movlw   0
2753 024a 00b3          movwf   id_index
2754                    ; line_number = 386
2755                    ;  interrupt_bits := 0
2756 024b 3000          movlw   0
2757 024c 00be          movwf   interrupt_bits
2758                    ; line_number = 387
2759                    ;  last_received := 0
2760 024d 3000          movlw   0
2761 024e 00bc          movwf   last_received
2762                    ; line_number = 388
2763                    ;  last_sent := 0
2764 024f 3000          movlw   0
2765 0250 00bb          movwf   last_sent
2766                    ; line_number = 389
2767                    ;  low := 0
2768 0251 3000          movlw   0
2769 0252 00c1          movwf   low
2770                    ; line_number = 390
2771                    ;  raising := 0
2772 0253 3000          movlw   0
2773 0254 00c2          movwf   raising
2774                    ; line_number = 391
2775                    ;  raw_inputs := 0
2776 0255 3000          movlw   0
2777 0256 00bd          movwf   raw_inputs
2778            
2779                    ; # Initialize threshold vectors:
2780                    ; line_number = 394
2781                    ;  index := 0
2782 0257 3000          movlw   0
2783 0258 00d5          movwf   reset__index
2784                    ; line_number = 395
2785                    ;  while index < 4 start
2786   0259 :   reset__1:
2787 0259 3004          movlw   4
2788 025a 0255          subwf   reset__index,w
2789                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
2790                    ; CASE: true.size=0 && false.size>1
2791                    ; bit_code_emit_helper1: body_code.size=12 true_test=false body_code.delay=0 (non-uniform delay)
2792 025b 1803          btfsc   __c___byte, __c___bit
2793 025c 2a69          goto    reset__2
2794                    ; line_number = 396
2795                    ; thresholds_high[index] := threshold_default
2796                    ; index_fsr_first
2797 025d 0855          movf    reset__index,w
2798 025e 3e2c          addlw   thresholds_high
2799 025f 0084          movwf   __fsr
2800 0260 3080          movlw   128
2801 0261 0080          movwf   __indf
2802                    ; line_number = 397
2803                    ;  thresholds_low[index] := threshold_default
2804                    ; index_fsr_first
2805 0262 0855          movf    reset__index,w
2806 0263 3e28          addlw   thresholds_low
2807 0264 0084          movwf   __fsr
2808 0265 3080          movlw   128
2809 0266 0080          movwf   __indf
2810                    ; line_number = 398
2811                    ;  index := index + 1
2812 0267 0ad5          incf    reset__index,f
2813            
2814 0268 2a59          goto    reset__1
2815   0269 :   reset__2:
2816                    ; Recombine size1 = 0 || size2 = 0
2817                    ; code.delay=4294967295 back_code.delay=4294967295
2818                    ; <=bit_code_emit@symbol; sym=__c (data:X0=>X0 code:XX=>XX)
2819                    ; line_number = 395
2820                    ;  while index < 4 done
2821                    ; # Bit resets:
2822                    ; line_number = 401
2823                    ;  debug_next := 0
2824 0269 115f          bcf     debug_next___byte, debug_next___bit
2825                    ; line_number = 402
2826                    ;  serial_out := 1
2827 026a 1685          bsf     serial_out___byte, serial_out___bit
2828                    ; line_number = 403
2829                    ;  debug_out := 1
2830 026b 1507          bsf     debug_out___byte, debug_out___bit
2831            
2832            
2833                    ; delay after procedure statements=non-uniform
2834                    ; Implied return
2835 026c 3400          retlw   0
2836            
2837            
2838            
2839            
2840                    ; line_number = 406
2841                    ; constant zero8 = "\0,0,0,0,0,0,0,0\"
2842                    ; zero8 = '\0,0,0,0,0,0,0,0\'
2843                    ; line_number = 407
2844                    ; constant module_name = "\8\IREdge4C"
2845                    ; module_name = '\8\IREdge4C'
2846                    ; line_number = 408
2847                    ; constant vendor_name = "\13\Mondo-tronics"
2848                    ; vendor_name = '\13\Mondo-tronics'
2849                    ; line_number = 409
2850                    ; string id = "\1,0,25,2,0,0,0,0\" ~ zero8 ~ zero8 ~ module_name ~ vendor_name start
2851                    ; id = '\1,0,25,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8\IREdge4C\13\Mondo-tronics'
2852   026d :   id:
2853                    ; Temporarily save index into FSR
2854 026d 0084          movwf   __fsr
2855                    ; Initialize PCLATH to point to this code page
2856 026e 3002          movlw   id___base>>8
2857 026f 008a          movwf   __pclath
2858                    ; Restore index from FSR
2859 0270 0804          movf    __fsr,w
2860 0271 3e73          addlw   id___base
2861                    ; Index to the correct return value
2862 0272 0082          movwf   __pcl
2863                    ; page_group 47
2864   0273 :   id___base:
2865 0273 3401          retlw   1
2866 0274 3400          retlw   0
2867 0275 3419          retlw   25
2868 0276 3402          retlw   2
2869 0277 3400          retlw   0
2870 0278 3400          retlw   0
2871 0279 3400          retlw   0
2872 027a 3400          retlw   0
2873 027b 3400          retlw   0
2874 027c 3400          retlw   0
2875 027d 3400          retlw   0
2876 027e 3400          retlw   0
2877 027f 3400          retlw   0
2878 0280 3400          retlw   0
2879 0281 3400          retlw   0
2880 0282 3400          retlw   0
2881 0283 3400          retlw   0
2882 0284 3400          retlw   0
2883 0285 3400          retlw   0
2884 0286 3400          retlw   0
2885 0287 3400          retlw   0
2886 0288 3400          retlw   0
2887 0289 3400          retlw   0
2888 028a 3400          retlw   0
2889 028b 3408          retlw   8
2890 028c 3449          retlw   73
2891 028d 3452          retlw   82
2892 028e 3445          retlw   69
2893 028f 3464          retlw   100
2894 0290 3467          retlw   103
2895 0291 3465          retlw   101
2896 0292 3434          retlw   52
2897 0293 3443          retlw   67
2898 0294 340d          retlw   13
2899 0295 344d          retlw   77
2900 0296 346f          retlw   111
2901 0297 346e          retlw   110
2902 0298 3464          retlw   100
2903 0299 346f          retlw   111
2904 029a 342d          retlw   45
2905 029b 3474          retlw   116
2906 029c 3472          retlw   114
2907 029d 346f          retlw   111
2908 029e 346e          retlw   110
2909 029f 3469          retlw   105
2910 02a0 3463          retlw   99
2911 02a1 3473          retlw   115
2912                    ; line_number = 409
2913                    ; string id = "\1,0,25,2,0,0,0,0\" ~ zero8 ~ zero8 ~ module_name ~ vendor_name start
2914            
2915                    ; line_number = 411
2916                    ; string chans = "\4,1,0,2,5\" start
2917                    ; chans = '\4,1,0,2,5\'
2918   02a2 :   chans:
2919                    ; Temporarily save index into FSR
2920 02a2 0084          movwf   __fsr
2921                    ; Initialize PCLATH to point to this code page
2922 02a3 3002          movlw   chans___base>>8
2923 02a4 008a          movwf   __pclath
2924                    ; Restore index from FSR
2925 02a5 0804          movf    __fsr,w
2926 02a6 3ea8          addlw   chans___base
2927                    ; Index to the correct return value
2928 02a7 0082          movwf   __pcl
2929                    ; page_group 5
2930   02a8 :   chans___base:
2931 02a8 3404          retlw   4
2932 02a9 3401          retlw   1
2933 02aa 3400          retlw   0
2934 02ab 3402          retlw   2
2935 02ac 3405          retlw   5
2936                    ; line_number = 411
2937                    ; string chans = "\4,1,0,2,5\" start
2938                    ; line_number = 412
2939                    ; string masks = "\1,2,4,8\" start
2940                    ; masks = '\1,2,4,8\'
2941   02ad :   masks:
2942                    ; Temporarily save index into FSR
2943 02ad 0084          movwf   __fsr
2944                    ; Initialize PCLATH to point to this code page
2945 02ae 3002          movlw   masks___base>>8
2946 02af 008a          movwf   __pclath
2947                    ; Restore index from FSR
2948 02b0 0804          movf    __fsr,w
2949 02b1 3eb3          addlw   masks___base
2950                    ; Index to the correct return value
2951 02b2 0082          movwf   __pcl
2952                    ; page_group 4
2953   02b3 :   masks___base:
2954 02b3 3401          retlw   1
2955 02b4 3402          retlw   2
2956 02b5 3404          retlw   4
2957 02b6 3408          retlw   8
2958                    ; line_number = 412
2959                    ; string masks = "\1,2,4,8\" start
2960            
2961            
2962            
2963                    ; Appending 2 delayed procedures to code bank 0
2964                    ; buffer = 'bit_bang'
2965                    ; line_number = 33
2966                    ; procedure byte_get
2967   02b7 :   byte_get:
2968                    ; arguments_none
2969                    ; line_number = 35
2970                    ;  returns byte
2971            
2972                    ; # This procedure will wait for a byte to be received from
2973                    ; # serial_in_bit.  It calls the delay procedure for all delays.
2974                    ; # This procedure will keep calling the {delay} routine until
2975                    ; # data is received.
2976            
2977                    ; line_number = 42
2978                    ;  local count byte
2979 00000020 = byte_get__count equ shared___globals
2980                    ; line_number = 43
2981                    ;  local byte byte
2982 00000021 = byte_get__byte equ shared___globals+1
2983            
2984                    ; # Why does the delay procedure wait for a third of bit?  Well, it
2985                    ; # has to do with the loop immediately below.  If we catch the
2986                    ; # start bit at the beginning of a 1/3 bit time, we will be
2987                    ; # sampling data at approximately 1/3 of the way into each bit.
2988                    ; # Conversely, if we catch the start near the end of a 1/3 bit
2989                    ; # bit time, we will be sampling data at approximately 2/3 of the
2990                    ; # way into each bit.  So, what this means is that our bit sample
2991                    ; # times will be somewhere between 1/3 and 2/3 of bit (i.e. in
2992                    ; # the middle of the bit.
2993            
2994                    ; # It would be nice to tweak the code to shorter delay times
2995                    ; # (1/4 bit, 1/5 bit, etc.) but then it gets too hard to get
2996                    ; # the bookeeping done in the delay routine.  A PIC running at
2997                    ; # 4MHz (=1MIPS), only has 138 instructions available for the
2998                    ; # delay routine when at 1/3 of bit.
2999            
3000                    ; # Wait for a start bit:
3001                    ; before procedure statements delay=non-uniform, bit states=(data:X0=>X0 code:XX=>XX)
3002                    ; line_number = 62
3003                    ;  waiting := 1
3004 02b7 14df          bsf     waiting___byte, waiting___bit
3005                    ; line_number = 63
3006                    ;  receiving := 1
3007 02b8 145f          bsf     receiving___byte, receiving___bit
3008                    ; line_number = 64
3009                    ;  while serial_in start
3010   02b9 :   byte_get__1:
3011                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
3012                    ; CASE: true_code.size = 0 && false_code.size > 1
3013                    ; bit_code_emit_helper1: body_code.size=2 true_test=true body_code.delay=0 (non-uniform delay)
3014 02b9 1e05          btfss   serial_in___byte, serial_in___bit
3015 02ba 2abd          goto    byte_get__2
3016                    ; line_number = 65
3017                    ; delay instructions_per_delay - 3 start
3018                    ; Delay expression evaluates to 135
3019                    ; line_number = 66
3020                    ; call delay()
3021                    ; Delay at call is 0
3022 02bb 213a          call    delay
3023                    ; line_number = 65
3024                    ; delay instructions_per_delay - 3 done
3025 02bc 2ab9          goto    byte_get__1
3026                    ; Recombine size1 = 0 || size2 = 0
3027   02bd :   byte_get__2:
3028                    ; code.delay=4294967295 back_code.delay=4294967295
3029                    ; <=bit_code_emit@symbol; sym=serial_in (data:X0=>X0 code:XX=>XX)
3030                    ; line_number = 64
3031                    ;  while serial_in done
3032                    ; line_number = 67
3033                    ; waiting := 0
3034 02bd 10df          bcf     waiting___byte, waiting___bit
3035            
3036                    ; # Clear out any preceeding interrupt condition:
3037                    ; line_number = 70
3038                    ;  serial_out := 1
3039 02be 1685          bsf     serial_out___byte, serial_out___bit
3040            
3041                    ; # Skip over start bit:
3042                    ; line_number = 73
3043                    ;  delay instructions_per_bit - 2 start
3044                    ; Delay expression evaluates to 414
3045                    ; # There are two instructions of set-up for following loop_exactly:
3046                    ; line_number = 75
3047                    ;  call delay()
3048                    ; Delay at call is 0
3049 02bf 213a          call    delay
3050                    ; line_number = 76
3051                    ;  call delay()
3052                    ; Delay at call is 135
3053 02c0 213a          call    delay
3054                    ; line_number = 77
3055                    ;  call delay()
3056                    ; Delay at call is 270
3057 02c1 213a          call    delay
3058                    ; line_number = 78
3059                    ;  byte := 0
3060                    ; Delay at assignment is 405
3061 02c2 3000          movlw   0
3062 02c3 00a1          movwf   byte_get__byte
3063            
3064                    ; Delay 7 cycles
3065 02c4 2ac5          goto    byte_get__3
3066   02c5 :   byte_get__3:
3067 02c5 2ac6          goto    byte_get__4
3068   02c6 :   byte_get__4:
3069 02c6 2ac7          goto    byte_get__5
3070   02c7 :   byte_get__5:
3071 02c7 0000          nop     
3072                    ; line_number = 73
3073                    ;  delay instructions_per_bit - 2 done
3074                    ; # Read in 8 bits of data:
3075                    ; line_number = 81
3076                    ;  loop_exactly 8 start
3077 00000059 = byte_get__6 equ shared___globals+57
3078 02c8 3008          movlw   8
3079 02c9 00d9          movwf   byte_get__6
3080   02ca :   byte_get__7:
3081                    ; # There are 3 instrucitons of loop_exactly overhead:
3082                    ; line_number = 83
3083                    ;  delay instructions_per_bit - 3 start
3084                    ; Delay expression evaluates to 413
3085                    ; line_number = 84
3086                    ; call delay()
3087                    ; Delay at call is 0
3088 02ca 213a          call    delay
3089                    ; line_number = 85
3090                    ;  byte := byte >> 1
3091                    ; Delay at assignment is 135
3092                    ; Assignment of variable to self (no code needed)
3093 02cb 0ca1          rrf     byte_get__byte,f
3094 02cc 13a1          bcf     byte_get__byte, 7
3095                    ; line_number = 86
3096                    ;  if serial_in start
3097                    ; Delay at if is 137
3098                    ; (after recombine) true_delay=1, false_delay=0 uniform_delay=true
3099                    ; CASE: True.size=1 False.size=0
3100 02cd 1a05          btfsc   serial_in___byte, serial_in___bit
3101                    ; line_number = 87
3102                    ; byte@7 := 1
3103                    ; Delay at assignment is 0
3104 00000021 = byte_get__select__8___byte equ byte_get__byte
3105 00000007 = byte_get__select__8___bit equ 7
3106 02ce 17a1          bsf     byte_get__select__8___byte, byte_get__select__8___bit
3107                    ; code.delay=139 back_code.delay=0
3108                    ; <=bit_code_emit@symbol; sym=serial_in (data:X0=>X0 code:XX=>XX)
3109                    ; if final true delay=1 false delay=0 code delay=139
3110                    ; line_number = 86
3111                    ;  if serial_in done
3112                    ; line_number = 88
3113                    ; call delay()
3114                    ; Delay at call is 139
3115 02cf 213a          call    delay
3116                    ; line_number = 89
3117                    ;  call delay()
3118                    ; Delay at call is 274
3119 02d0 213a          call    delay
3120            
3121                    ; Delay 4 cycles
3122 02d1 2ad2          goto    byte_get__9
3123   02d2 :   byte_get__9:
3124 02d2 2ad3          goto    byte_get__10
3125   02d3 :   byte_get__10:
3126                    ; line_number = 83
3127                    ;  delay instructions_per_bit - 3 done
3128                    ; line_number = 81
3129                    ;  loop_exactly 8 wrap-up
3130 02d3 0bd9          decfsz  byte_get__6,f
3131 02d4 2aca          goto    byte_get__7
3132                    ; line_number = 81
3133                    ;  loop_exactly 8 done
3134                    ; # Skip over 2/3's of stop bit; 3 cycles for return:
3135                    ; line_number = 92
3136                    ;  delay instructions_per_delay*2 - 3 start
3137                    ; Delay expression evaluates to 273
3138                    ; line_number = 93
3139                    ; call delay()
3140                    ; Delay at call is 0
3141 02d5 213a          call    delay
3142                    ; line_number = 94
3143                    ;  call delay()
3144                    ; Delay at call is 135
3145 02d6 213a          call    delay
3146                    ; Delay 3 cycles
3147 02d7 2ad8          goto    byte_get__11
3148   02d8 :   byte_get__11:
3149 02d8 0000          nop     
3150                    ; line_number = 92
3151                    ;  delay instructions_per_delay*2 - 3 done
3152                    ; line_number = 95
3153                    ; command_previous := command_last
3154 02d9 0845          movf    command_last,w
3155 02da 00c4          movwf   command_previous
3156                    ; line_number = 96
3157                    ;  command_last := byte
3158 02db 0821          movf    byte_get__byte,w
3159 02dc 00c5          movwf   command_last
3160                    ; line_number = 97
3161                    ;  serial_out := 1
3162 02dd 1685          bsf     serial_out___byte, serial_out___bit
3163                    ; line_number = 98
3164                    ;  return byte start
3165                    ; line_number = 98
3166 02de 0821          movf    byte_get__byte,w
3167 02df 0008          return  
3168                    ; line_number = 98
3169                    ;  return byte done
3170            
3171            
3172                    ; delay after procedure statements=non-uniform
3173            
3174            
3175            
3176            
3177                    ; line_number = 101
3178                    ; procedure byte_put
3179   02e0 :   byte_put:
3180                    ; Last argument is sitting in W; save into argument variable
3181 02e0 00a3          movwf   byte_put__byte
3182                    ; delay=4294967295
3183                    ; line_number = 102
3184                    ; argument byte byte
3185 00000023 = byte_put__byte equ shared___globals+3
3186                    ; line_number = 103
3187                    ;  returns_nothing
3188            
3189                    ; # This procedure will send {byte} to {serial_out} pin.  The {delay}
3190                    ; # procedure is called to provide the appropriate bit timing.
3191            
3192                    ; line_number = 108
3193                    ;  local count byte
3194 00000022 = byte_put__count equ shared___globals+2
3195            
3196                    ; # {receiving} will be 1 if the last get/put routine was a get.
3197                    ; # Before we start transmitting a response back, we want to ensure
3198                    ; # that there has been enough time to turn the line around.
3199                    ; # We delay the first 1/3 of a bit to pad out the 9-2/3 bits
3200                    ; # from get_byte to 10 bits.  We delay another 3 bits just to
3201                    ; # ensure that slow interpreters do not get overrun.
3202                    ; before procedure statements delay=non-uniform, bit states=(data:X0=>X0 code:XX=>XX)
3203                    ; line_number = 116
3204                    ;  sent_previous := sent_last
3205 02e1 0847          movf    sent_last,w
3206 02e2 00c6          movwf   sent_previous
3207                    ; line_number = 117
3208                    ;  sent_last := byte
3209 02e3 0823          movf    byte_put__byte,w
3210 02e4 00c7          movwf   sent_last
3211                    ; line_number = 118
3212                    ;  if receiving start
3213                    ; (after recombine) true_delay=non-uniform, false_delay=non-uniform
3214                    ; CASE: true_code.size = 0 && false_code.size > 1
3215                    ; bit_code_emit_helper1: body_code.size=4 true_test=true body_code.delay=0 (non-uniform delay)
3216 02e5 1c5f          btfss   receiving___byte, receiving___bit
3217 02e6 2aed          goto    byte_put__3
3218                    ; line_number = 119
3219                    ; receiving := 0
3220 02e7 105f          bcf     receiving___byte, receiving___bit
3221                    ; # 10 = 1 + 3*3 = 3-1/3 extra bits of delay:
3222                    ; line_number = 121
3223                    ;  loop_exactly 10 start
3224 0000005a = byte_put__1 equ shared___globals+58
3225 02e8 300a          movlw   10
3226 02e9 00da          movwf   byte_put__1
3227   02ea :   byte_put__2:
3228                    ; line_number = 122
3229                    ; call delay()
3230 02ea 213a          call    delay
3231            
3232                    ; line_number = 121
3233                    ;  loop_exactly 10 wrap-up
3234 02eb 0bda          decfsz  byte_put__1,f
3235 02ec 2aea          goto    byte_put__2
3236                    ; line_number = 121
3237                    ;  loop_exactly 10 done
3238                    ; Recombine size1 = 0 || size2 = 0
3239   02ed :   byte_put__3:
3240                    ; code.delay=4294967295 back_code.delay=4294967295
3241                    ; <=bit_code_emit@symbol; sym=receiving (data:X0=>X0 code:XX=>XX)
3242                    ; line_number = 118
3243                    ;  if receiving done
3244                    ; # Send the start bit:
3245                    ; line_number = 125
3246                    ;  delay instructions_per_bit - 2 start
3247                    ; Delay expression evaluates to 414
3248                    ; # The loop_exactly setup after this is 2 instructions:
3249                    ; line_number = 127
3250                    ;  serial_out := 0
3251                    ; Delay at assignment is 0
3252 02ed 1285          bcf     serial_out___byte, serial_out___bit
3253                    ; line_number = 128
3254                    ;  call delay()
3255                    ; Delay at call is 1
3256 02ee 213a          call    delay
3257                    ; line_number = 129
3258                    ;  call delay()
3259                    ; Delay at call is 136
3260 02ef 213a          call    delay
3261                    ; line_number = 130
3262                    ;  call delay()
3263                    ; Delay at call is 271
3264 02f0 213a          call    delay
3265            
3266                    ; Delay 8 cycles
3267                    ; Delay loop takes 2 * 4 = 8 cycles
3268 02f1 3002          movlw   2
3269   02f2 :   byte_put__4:
3270 02f2 3eff          addlw   255
3271 02f3 1d03          btfss   __z___byte, __z___bit
3272 02f4 2af2          goto    byte_put__4
3273                    ; line_number = 125
3274                    ;  delay instructions_per_bit - 2 done
3275                    ; # Send the data:
3276                    ; line_number = 133
3277                    ;  loop_exactly 8 start
3278 0000005a = byte_put__5 equ shared___globals+58
3279 02f5 3008          movlw   8
3280 02f6 00da          movwf   byte_put__5
3281   02f7 :   byte_put__6:
3282                    ; # Loop_exactly overhead is 3 instructions:
3283                    ; line_number = 135
3284                    ;  delay instructions_per_bit - 3 start
3285                    ; Delay expression evaluates to 413
3286                    ; line_number = 136
3287                    ; if byte@0 start
3288                    ; Delay at if is 0
3289 00000023 = byte_put__select__7___byte equ byte_put__byte
3290 00000000 = byte_put__select__7___bit equ 0
3291                    ; (after recombine) true_delay=1, false_delay=1 uniform_delay=true
3292                    ; CASE: true_size=1 && false_size=1
3293                    ; SUBCASE: Double test; true, then false
3294 02f7 1823          btfsc   byte_put__select__7___byte, byte_put__select__7___bit
3295                    ; line_number = 137
3296                    ; serial_out := 1
3297                    ; Delay at assignment is 0
3298 02f8 1685          bsf     serial_out___byte, serial_out___bit
3299 02f9 1c23          btfss   byte_put__select__7___byte, byte_put__select__7___bit
3300                    ; line_number = 139
3301                    ; serial_out := 0
3302                    ; Delay at assignment is 0
3303 02fa 1285          bcf     serial_out___byte, serial_out___bit
3304                    ; code.delay=4 back_code.delay=0
3305                    ; <=bit_code_emit@symbol; sym=byte_put__select__7 (data:X0=>X0 code:XX=>XX)
3306                    ; if final true delay=1 false delay=1 code delay=4
3307                    ; line_number = 136
3308                    ; if byte@0 done
3309                    ; line_number = 140
3310                    ; byte := byte >> 1
3311                    ; Delay at assignment is 4
3312                    ; Assignment of variable to self (no code needed)
3313 02fb 0ca3          rrf     byte_put__byte,f
3314 02fc 13a3          bcf     byte_put__byte, 7
3315                    ; line_number = 141
3316                    ;  call delay()
3317                    ; Delay at call is 6
3318 02fd 213a          call    delay
3319                    ; line_number = 142
3320                    ;  call delay()
3321                    ; Delay at call is 141
3322 02fe 213a          call    delay
3323                    ; line_number = 143
3324                    ;  call delay()
3325                    ; Delay at call is 276
3326 02ff 213a          call    delay
3327            
3328                    ; Delay 2 cycles
3329 0300 2b01          goto    byte_put__8
3330   0301 :   byte_put__8:
3331                    ; line_number = 135
3332                    ;  delay instructions_per_bit - 3 done
3333                    ; line_number = 133
3334                    ;  loop_exactly 8 wrap-up
3335 0301 0bda          decfsz  byte_put__5,f
3336 0302 2af7          goto    byte_put__6
3337                    ; line_number = 133
3338                    ;  loop_exactly 8 done
3339                    ; # Send the stop bit:
3340                    ; line_number = 146
3341                    ;  delay instructions_per_bit start
3342                    ; Delay expression evaluates to 416
3343                    ; line_number = 147
3344                    ; serial_out := 1
3345                    ; Delay at assignment is 0
3346 0303 1685          bsf     serial_out___byte, serial_out___bit
3347                    ; line_number = 148
3348                    ;  call delay()
3349                    ; Delay at call is 1
3350 0304 213a          call    delay
3351                    ; line_number = 149
3352                    ;  call delay()
3353                    ; Delay at call is 136
3354 0305 213a          call    delay
3355                    ; line_number = 150
3356                    ;  call delay()
3357                    ; Delay at call is 271
3358 0306 213a          call    delay
3359            
3360            
3361                    ; Delay 10 cycles
3362                    ; Delay loop takes 2 * 4 = 8 cycles
3363 0307 3002          movlw   2
3364   0308 :   byte_put__9:
3365 0308 3eff          addlw   255
3366 0309 1d03          btfss   __z___byte, __z___bit
3367 030a 2b08          goto    byte_put__9
3368 030b 2b0c          goto    byte_put__10
3369   030c :   byte_put__10:
3370                    ; line_number = 146
3371                    ;  delay instructions_per_bit done
3372                    ; delay after procedure statements=non-uniform
3373                    ; Implied return
3374 030c 3400          retlw   0
3375            
3376            
3377            
3378            
3379                    ; Configuration bits
3380                    ; fill = 0x0
3381                    ; bg = bg11 (0x3000)
3382                    ; cpd = off (0x100)
3383                    ; cp = off (0x80)
3384                    ; boden = off (0x0)
3385                    ; mclre = off (0x0)
3386                    ; pwrte = off (0x10)
3387                    ; wdte = off (0x0)
3388                    ; fosc = int_no_clk (0x4)
3389                    ; 12692 = 0x3194
3390   3194 =           __config 12692
3391                    ; Define start addresses for data regions
3392                    ; Region="shared___globals" Address=32" Size=64 Bytes=59 Bits=4 Available=4
3393                    ; Region="shared___globals" Address=32" Size=64 Bytes=59 Bits=4 Available=4
3394                    ; Region="shared___globals" Address=32" Size=64 Bytes=59 Bits=4 Available=4
3395                    end
