1                       radix   dec
2                       ; Code bank 0; Start address: 0; End address: 1023
3      0000 :           org     0
4                       ; #pin 12 = vref
5               
6                       ; Define start addresses for data regions
7    00000020 = shared___globals equ 32
8    00000000 = __indf equ 0
9    00000002 = __pcl equ 2
10   00000003 = __status equ 3
11   00000004 = __fsr equ 4
12   00000003 = __c___byte equ 3
13   00000000 = __c___bit equ 0
14   00000003 = __z___byte equ 3
15   00000002 = __z___bit equ 2
16   00000003 = __rp0___byte equ 3
17   00000005 = __rp0___bit equ 5
18   00000003 = __rp1___byte equ 3
19   00000006 = __rp1___bit equ 6
20   00000003 = __irp___byte equ 3
21   00000007 = __irp___bit equ 7
22   0000000a = __pclath equ 10
23   0000000a = __cb0___byte equ 10
24   00000003 = __cb0___bit equ 3
25   0000000a = __cb1___byte equ 10
26   00000004 = __cb1___bit equ 4
27              
28                      ; # Copyright (c) 2005 by Wayne C. Gramlich
29                      ; # All rights reserved.
30              
31                      ; buffer = 'full_step'
32                      ; line_number = 6
33                      ; library _pic16f676 entered
34                      ; # Copyright (c) 2004 by Wayne C. Gramlich
35                      ; # All rights reserved.
36              
37                      ; buffer = '_pic16f676'
38                      ; line_number = 5
39                      ; processor pic16f676
40                      ; line_number = 6
41                      ; configure_address 0x2007
42                      ; line_number = 7
43                      ;  configure_fill 0x0000
44                      ; line_number = 8
45                      ;  configure_option bg: bg11 = 0x3000
46                      ; line_number = 9
47                      ;  configure_option bg: bg10 = 0x2000
48                      ; line_number = 10
49                      ;  configure_option bg: bg01 = 0x1000
50                      ; line_number = 11
51                      ;  configure_option bg: bg00 = 0x0000
52                      ; line_number = 12
53                      ;  configure_option cpd: on = 0x000
54                      ; line_number = 13
55                      ;  configure_option cpd: off = 0x100
56                      ; line_number = 14
57                      ;  configure_option cp: on = 0x00
58                      ; line_number = 15
59                      ;  configure_option cp: off = 0x80
60                      ; line_number = 16
61                      ;  configure_option boden: on = 0x40
62                      ; line_number = 17
63                      ;  configure_option boden: off = 0x00
64                      ; line_number = 18
65                      ;  configure_option mclre: on = 0x20
66                      ; line_number = 19
67                      ;  configure_option mclre: off = 0x00
68                      ; line_number = 20
69                      ;  configure_option pwrte: on = 0x00
70                      ; line_number = 21
71                      ;  configure_option pwrte: off = 0x10
72                      ; line_number = 22
73                      ;  configure_option wdte: on = 8
74                      ; line_number = 23
75                      ;  configure_option wdte: off = 0
76                      ; line_number = 24
77                      ;  configure_option fosc: rc_clk = 7
78                      ; line_number = 25
79                      ;  configure_option fosc: rc_no_clk = 6
80                      ; line_number = 26
81                      ;  configure_option fosc: int_clk = 5
82                      ; line_number = 27
83                      ;  configure_option fosc: int_no_clk = 4
84                      ; line_number = 28
85                      ;  configure_option fosc: ec = 3
86                      ; line_number = 29
87                      ;  configure_option fosc: hs = 2
88                      ; line_number = 30
89                      ;  configure_option fosc: xt = 1
90                      ; line_number = 31
91                      ;  configure_option fosc: lp = 0
92                      ; line_number = 32
93                      ;  code_bank 0x0 : 0x3ff
94                      ; line_number = 33
95                      ;  data_bank 0x0 : 0x7f
96                      ; line_number = 34
97                      ;  data_bank 0x80 : 0xff
98                      ; line_number = 35
99                      ;  shared_region 0x20 : 0x5f
100                     ; line_number = 36
101                     ;  interrupts_possible
102                     ; line_number = 37
103                     ;  osccal_register_symbol _osccal
104                     ; line_number = 38
105                     ;  osccal_at_address 0x3ff
106                     ; line_number = 39
107                     ;  packages pdip=14, soic=14, tssop=14
108                     ; line_number = 40
109                     ;  pin vdd, power_supply
110                     ; line_number = 41
111                     ; pin_bindings pdip=1, soic=1, tssop=1
112                     ; line_number = 42
113                     ; pin ra5_in, ra5_out, t1cki, osc1, clkin
114                     ; line_number = 43
115                     ; pin_bindings pdip=2, soic=2, tssop=2
116                     ; line_number = 44
117                     ;  bind_to _porta@5
118                     ; line_number = 45
119                     ;  or_if ra5_in _trisa 32
120                     ; line_number = 46
121                     ;  or_if ra5_out _trisa 0
122                     ; line_number = 47
123                     ; pin ra4_in, ra4_out, t1g, osc2, an3, clkout
124                     ; line_number = 48
125                     ; pin_bindings pdip=3, soic=3, tssop=3
126                     ; line_number = 49
127                     ;  bind_to _porta@4
128                     ; line_number = 50
129                     ;  or_if ra4_in _trisa 16
130                     ; line_number = 51
131                     ;  or_if ra4_out _trisa 0
132                     ; line_number = 52
133                     ;  or_if an3 _trisa 16
134                     ; line_number = 53
135                     ;  or_if an3 _ansel 8
136                     ; line_number = 54
137                     ;  or_if an3 _adcon0 1
138                     ; line_number = 55
139                     ; pin ra3_in, mclr, vpp
140                     ; line_number = 56
141                     ; pin_bindings pdip=4, soic=4, tssop=4
142                     ; line_number = 57
143                     ;  bind_to _porta@4
144                     ; line_number = 58
145                     ;  or_if ra3_in _trisa 8
146                     ; line_number = 59
147                     ; pin rc5_in, rc5_out
148                     ; line_number = 60
149                     ; pin_bindings pdip=5, soic=5, tssop=5
150                     ; line_number = 61
151                     ;  bind_to _portc@5
152                     ; line_number = 62
153                     ;  or_if rc5_in _trisc 32
154                     ; line_number = 63
155                     ;  or_if rc5_out _trisc 0
156                     ; line_number = 64
157                     ; pin rc4_in, rc4_out
158                     ; line_number = 65
159                     ; pin_bindings pdip=6, soic=6, tssop=6
160                     ; line_number = 66
161                     ;  bind_to _portc@4
162                     ; line_number = 67
163                     ;  or_if rc4_in _trisc 16
164                     ; line_number = 68
165                     ;  or_if rc4_out _trisc 0
166                     ; line_number = 69
167                     ; pin rc3_in, rc3_out, an7
168                     ; line_number = 70
169                     ; pin_bindings pdip=7, soic=7, tssop=7
170                     ; line_number = 71
171                     ;  bind_to _portc@3
172                     ; line_number = 72
173                     ;  or_if rc3_in _trisc 8
174                     ; line_number = 73
175                     ;  or_if rc3_out _trisc 0
176                     ; line_number = 74
177                     ;  or_if an7 _trisc 8
178                     ; line_number = 75
179                     ;  or_if an7 _ansel 128
180                     ; line_number = 76
181                     ;  or_if an7 _adcon0 1
182                     ; line_number = 77
183                     ; pin rc2_in, rc2_out, an6
184                     ; line_number = 78
185                     ; pin_bindings pdip=8, soic=8, tssop=8
186                     ; line_number = 79
187                     ;  bind_to _portc@2
188                     ; line_number = 80
189                     ;  or_if rc2_in _trisc 4
190                     ; line_number = 81
191                     ;  or_if rc2_out _trisc 0
192                     ; line_number = 82
193                     ;  or_if an6 _trisc 4
194                     ; line_number = 83
195                     ;  or_if an6 _ansel 64
196                     ; line_number = 84
197                     ;  or_if an6 _adcon0 1
198                     ; line_number = 85
199                     ; pin rc1_in, rc1_out, an5
200                     ; line_number = 86
201                     ; pin_bindings pdip=9, soic=9, tssop=9
202                     ; line_number = 87
203                     ;  bind_to _portc@1
204                     ; line_number = 88
205                     ;  or_if rc1_in _trisc 2
206                     ; line_number = 89
207                     ;  or_if rc1_out _trisc 0
208                     ; line_number = 90
209                     ;  or_if an5 _trisc 2
210                     ; line_number = 91
211                     ;  or_if an5 _ansel 32
212                     ; line_number = 92
213                     ;  or_if an5 _adcon0 1
214                     ; line_number = 93
215                     ; pin rc0_in, rc0_out, an4
216                     ; line_number = 94
217                     ; pin_bindings pdip=10, soic=10, tssop=10
218                     ; line_number = 95
219                     ;  bind_to _portc@0
220                     ; line_number = 96
221                     ;  or_if rc0_in _trisc 1
222                     ; line_number = 97
223                     ;  or_if rc0_out _trisc 0
224                     ; line_number = 98
225                     ;  or_if an4 _trisc 1
226                     ; line_number = 99
227                     ;  or_if an4 _ansel 16
228                     ; line_number = 100
229                     ;  or_if an4 _adcon0 1
230                     ; line_number = 101
231                     ; pin ra2_in, ra2_out, an2, cout, t0cki, int
232                     ; line_number = 102
233                     ; pin_bindings pdip=11, soic=11, tssop=11
234                     ; line_number = 103
235                     ;  bind_to _porta@2
236                     ; line_number = 104
237                     ;  or_if ra2_in _trisa 4
238                     ; line_number = 105
239                     ;  or_if ra2_out _trisa 0
240                     ; line_number = 106
241                     ;  or_if an2 _trisa 4
242                     ; line_number = 107
243                     ;  or_if an2 _ansel 4
244                     ; line_number = 108
245                     ;  or_if an2 _adcon0 1
246                     ; line_number = 109
247                     ; pin ra1_in, ra1_out, an1, cin_minus, vref, icspclk
248                     ; line_number = 110
249                     ; pin_bindings pdip=12, soic=12, tssop=12
250                     ; line_number = 111
251                     ;  bind_to _porta@1
252                     ; line_number = 112
253                     ;  or_if ra1_in _trisa 2
254                     ; line_number = 113
255                     ;  or_if ra1_out _trisa 0
256                     ; line_number = 114
257                     ;  or_if an1 _trisa 2
258                     ; line_number = 115
259                     ;  or_if an1 _ansel 2
260                     ; line_number = 116
261                     ;  or_if an1 _adcon0 1
262                     ; line_number = 117
263                     ;  or_if vref _trisa 2
264                     ; line_number = 118
265                     ;  or_if vref _ansel 2
266                     ; line_number = 119
267                     ;  or_if vref _adcon0 33
268                     ; line_number = 120
269                     ; pin ra0_in, ra0_out, an0, cin_plus, icspdat
270                     ; line_number = 121
271                     ; pin_bindings pdip=13, soic=13, tssop=13
272                     ; line_number = 122
273                     ;  bind_to _porta@0
274                     ; line_number = 123
275                     ;  or_if ra0_in _trisa 1
276                     ; line_number = 124
277                     ;  or_if ra0_out _trisa 0
278                     ; line_number = 125
279                     ;  or_if an0 _trisa 1
280                     ; line_number = 126
281                     ;  or_if an0 _ansel 1
282                     ; line_number = 127
283                     ;  or_if an0 _adcon0 1
284                     ; line_number = 128
285                     ; pin vss, ground
286                     ; line_number = 129
287                     ; pin_bindings pdip=14, soic=14, tssop=14
288             
289             
290                     ; line_number = 134
291                     ; library _pic16f630_676 entered
292                     ; # Copyright (c) 2004 by Wayne C. Gramlich
293                     ; # All rights reserved.
294             
295                     ; # Shared register definitions for the PIC16F630 and PIC16F676.
296             
297                     ; buffer = '_pic16f630_676'
298                     ; line_number = 7
299                     ; register _indf = 
300  00000000 = _indf equ 0
301             
302                     ; line_number = 9
303                     ; register _tmr0 = 
304  00000001 = _tmr0 equ 1
305             
306                     ; line_number = 11
307                     ; register _pcl = 
308  00000002 = _pcl equ 2
309             
310                     ; line_number = 13
311                     ; register _status = 
312  00000003 = _status equ 3
313                     ; line_number = 14
314                     ; bind _rp0 = _status@5
315  00000003 = _rp0___byte equ _status
316  00000005 = _rp0___bit equ 5
317                     ; line_number = 15
318                     ; bind _to = _status@4
319  00000003 = _to___byte equ _status
320  00000004 = _to___bit equ 4
321                     ; line_number = 16
322                     ; bind _pd = _status@3
323  00000003 = _pd___byte equ _status
324  00000003 = _pd___bit equ 3
325                     ; line_number = 17
326                     ; bind _z = _status@2
327  00000003 = _z___byte equ _status
328  00000002 = _z___bit equ 2
329                     ; line_number = 18
330                     ; bind _dc = _status@1
331  00000003 = _dc___byte equ _status
332  00000001 = _dc___bit equ 1
333                     ; line_number = 19
334                     ; bind _c = _status@0
335  00000003 = _c___byte equ _status
336  00000000 = _c___bit equ 0
337             
338                     ; line_number = 21
339                     ; register _fsr = 
340  00000004 = _fsr equ 4
341             
342                     ; line_number = 23
343                     ; register _porta = 
344  00000005 = _porta equ 5
345                     ; line_number = 24
346                     ; register _ra = 
347  00000005 = _ra equ 5
348                     ; line_number = 25
349                     ; bind _ra5 = _porta@5
350  00000005 = _ra5___byte equ _porta
351  00000005 = _ra5___bit equ 5
352                     ; line_number = 26
353                     ; bind _ra4 = _porta@4
354  00000005 = _ra4___byte equ _porta
355  00000004 = _ra4___bit equ 4
356                     ; line_number = 27
357                     ; bind _ra3 = _porta@3
358  00000005 = _ra3___byte equ _porta
359  00000003 = _ra3___bit equ 3
360                     ; line_number = 28
361                     ; bind _ra2 = _porta@2
362  00000005 = _ra2___byte equ _porta
363  00000002 = _ra2___bit equ 2
364                     ; line_number = 29
365                     ; bind _ra1 = _porta@1
366  00000005 = _ra1___byte equ _porta
367  00000001 = _ra1___bit equ 1
368                     ; line_number = 30
369                     ; bind _ra0 = _porta@0
370  00000005 = _ra0___byte equ _porta
371  00000000 = _ra0___bit equ 0
372             
373                     ; line_number = 32
374                     ; register _portc = 
375  00000007 = _portc equ 7
376                     ; line_number = 33
377                     ; register _rc = 
378  00000007 = _rc equ 7
379                     ; line_number = 34
380                     ; bind _rc5 = _portc@5
381  00000007 = _rc5___byte equ _portc
382  00000005 = _rc5___bit equ 5
383                     ; line_number = 35
384                     ; bind _rc4 = _portc@4
385  00000007 = _rc4___byte equ _portc
386  00000004 = _rc4___bit equ 4
387                     ; line_number = 36
388                     ; bind _rc3 = _portc@3
389  00000007 = _rc3___byte equ _portc
390  00000003 = _rc3___bit equ 3
391                     ; line_number = 37
392                     ; bind _rc2 = _portc@2
393  00000007 = _rc2___byte equ _portc
394  00000002 = _rc2___bit equ 2
395                     ; line_number = 38
396                     ; bind _rc1 = _portc@1
397  00000007 = _rc1___byte equ _portc
398  00000001 = _rc1___bit equ 1
399                     ; line_number = 39
400                     ; bind _rc0 = _portc@0
401  00000007 = _rc0___byte equ _portc
402  00000000 = _rc0___bit equ 0
403             
404                     ; line_number = 41
405                     ; register _pclath = 
406  0000000a = _pclath equ 10
407             
408                     ; line_number = 43
409                     ; register _intcon = 
410  0000000b = _intcon equ 11
411                     ; line_number = 44
412                     ; bind _gie = _intcon@7
413  0000000b = _gie___byte equ _intcon
414  00000007 = _gie___bit equ 7
415                     ; line_number = 45
416                     ; bind _peie = _intcon@6
417  0000000b = _peie___byte equ _intcon
418  00000006 = _peie___bit equ 6
419                     ; line_number = 46
420                     ; bind _t0ie = _intcon@5
421  0000000b = _t0ie___byte equ _intcon
422  00000005 = _t0ie___bit equ 5
423                     ; line_number = 47
424                     ; bind _inte = _intcon@4
425  0000000b = _inte___byte equ _intcon
426  00000004 = _inte___bit equ 4
427                     ; line_number = 48
428                     ; bind _raie = _intcon@3
429  0000000b = _raie___byte equ _intcon
430  00000003 = _raie___bit equ 3
431                     ; line_number = 49
432                     ; bind _t0if = _intcon@2
433  0000000b = _t0if___byte equ _intcon
434  00000002 = _t0if___bit equ 2
435                     ; line_number = 50
436                     ; bind _intf = _intcon@1
437  0000000b = _intf___byte equ _intcon
438  00000001 = _intf___bit equ 1
439                     ; line_number = 51
440                     ; bind _raif = _intcon@0
441  0000000b = _raif___byte equ _intcon
442  00000000 = _raif___bit equ 0
443             
444                     ; line_number = 53
445                     ; register _pir1 = 
446  0000000c = _pir1 equ 12
447                     ; line_number = 54
448                     ; bind _eeif = _pir1@7
449  0000000c = _eeif___byte equ _pir1
450  00000007 = _eeif___bit equ 7
451                     ; line_number = 55
452                     ; bind _cmif = _pir1@3
453  0000000c = _cmif___byte equ _pir1
454  00000003 = _cmif___bit equ 3
455                     ; line_number = 56
456                     ; bind _tmr1if = _pir1@0
457  0000000c = _tmr1if___byte equ _pir1
458  00000000 = _tmr1if___bit equ 0
459             
460                     ; line_number = 58
461                     ; register _tmr1l = 
462  0000000e = _tmr1l equ 14
463             
464                     ; line_number = 60
465                     ; register _tmr1h = 
466  0000000f = _tmr1h equ 15
467             
468                     ; line_number = 62
469                     ; register _t1con = 
470  00000010 = _t1con equ 16
471                     ; line_number = 63
472                     ; bind _t1ge = _t1con@6
473  00000010 = _t1ge___byte equ _t1con
474  00000006 = _t1ge___bit equ 6
475                     ; line_number = 64
476                     ; bind _t1ckps1 = _t1con@5
477  00000010 = _t1ckps1___byte equ _t1con
478  00000005 = _t1ckps1___bit equ 5
479                     ; line_number = 65
480                     ; bind _t1ckps0 = _t1con@4
481  00000010 = _t1ckps0___byte equ _t1con
482  00000004 = _t1ckps0___bit equ 4
483                     ; line_number = 66
484                     ; bind _t1oscen = _t1con@3
485  00000010 = _t1oscen___byte equ _t1con
486  00000003 = _t1oscen___bit equ 3
487                     ; line_number = 67
488                     ; bind _t1sync = _t1con@2
489  00000010 = _t1sync___byte equ _t1con
490  00000002 = _t1sync___bit equ 2
491                     ; line_number = 68
492                     ; bind _tmr1cs = _t1con@1
493  00000010 = _tmr1cs___byte equ _t1con
494  00000001 = _tmr1cs___bit equ 1
495                     ; line_number = 69
496                     ; bind _tmr1on = _t1con@0
497  00000010 = _tmr1on___byte equ _t1con
498  00000000 = _tmr1on___bit equ 0
499             
500                     ; line_number = 71
501                     ; register _cmcon = 
502  00000019 = _cmcon equ 25
503                     ; line_number = 72
504                     ; bind _cout = _cmcon@6
505  00000019 = _cout___byte equ _cmcon
506  00000006 = _cout___bit equ 6
507                     ; line_number = 73
508                     ; bind _cinv = _cmcon@4
509  00000019 = _cinv___byte equ _cmcon
510  00000004 = _cinv___bit equ 4
511                     ; line_number = 74
512                     ; bind _cis = _cmcon@3
513  00000019 = _cis___byte equ _cmcon
514  00000003 = _cis___bit equ 3
515                     ; line_number = 75
516                     ; bind _cm2 = _cmcon@2
517  00000019 = _cm2___byte equ _cmcon
518  00000002 = _cm2___bit equ 2
519                     ; line_number = 76
520                     ; bind _cm1 = _cmcon@1
521  00000019 = _cm1___byte equ _cmcon
522  00000001 = _cm1___bit equ 1
523                     ; line_number = 77
524                     ; bind _cm0 = _cmcon@0
525  00000019 = _cm0___byte equ _cmcon
526  00000000 = _cm0___bit equ 0
527             
528                     ; # Data bank 1 (0x80-0xff):
529             
530                     ; line_number = 81
531                     ; register _option_reg = 
532  00000080 = _option_reg equ 128
533                     ; line_number = 82
534                     ; bind _rapu = _option_reg@7
535  00000080 = _rapu___byte equ _option_reg
536  00000007 = _rapu___bit equ 7
537                     ; line_number = 83
538                     ; bind _intedg = _option_reg@6
539  00000080 = _intedg___byte equ _option_reg
540  00000006 = _intedg___bit equ 6
541                     ; line_number = 84
542                     ; bind _t0cs = _option_reg@5
543  00000080 = _t0cs___byte equ _option_reg
544  00000005 = _t0cs___bit equ 5
545                     ; line_number = 85
546                     ; bind _t0se = _option_reg@4
547  00000080 = _t0se___byte equ _option_reg
548  00000004 = _t0se___bit equ 4
549                     ; line_number = 86
550                     ; bind _psa = _option_reg@3
551  00000080 = _psa___byte equ _option_reg
552  00000003 = _psa___bit equ 3
553                     ; line_number = 87
554                     ; bind _ps2 = _option_reg@2
555  00000080 = _ps2___byte equ _option_reg
556  00000002 = _ps2___bit equ 2
557                     ; line_number = 88
558                     ; bind _ps1 = _option_reg@1
559  00000080 = _ps1___byte equ _option_reg
560  00000001 = _ps1___bit equ 1
561                     ; line_number = 89
562                     ; bind _ps0 = _option_reg@0
563  00000080 = _ps0___byte equ _option_reg
564  00000000 = _ps0___bit equ 0
565             
566                     ; line_number = 91
567                     ; register _trisa = 
568  00000085 = _trisa equ 133
569                     ; line_number = 92
570                     ; bind _trisa5 = _trisa@5
571  00000085 = _trisa5___byte equ _trisa
572  00000005 = _trisa5___bit equ 5
573                     ; line_number = 93
574                     ; bind _trisa4 = _trisa@4
575  00000085 = _trisa4___byte equ _trisa
576  00000004 = _trisa4___bit equ 4
577                     ; line_number = 94
578                     ; bind _trisa3 = _trisa@3
579  00000085 = _trisa3___byte equ _trisa
580  00000003 = _trisa3___bit equ 3
581                     ; line_number = 95
582                     ; bind _trisa2 = _trisa@2
583  00000085 = _trisa2___byte equ _trisa
584  00000002 = _trisa2___bit equ 2
585                     ; line_number = 96
586                     ; bind _trisa1 = _trisa@1
587  00000085 = _trisa1___byte equ _trisa
588  00000001 = _trisa1___bit equ 1
589                     ; line_number = 97
590                     ; bind _trisa0 = _trisa@0
591  00000085 = _trisa0___byte equ _trisa
592  00000000 = _trisa0___bit equ 0
593             
594                     ; line_number = 99
595                     ; register _trisc = 
596  00000087 = _trisc equ 135
597                     ; line_number = 100
598                     ; bind _trisc5 = _trisc@5
599  00000087 = _trisc5___byte equ _trisc
600  00000005 = _trisc5___bit equ 5
601                     ; line_number = 101
602                     ; bind _trisc4 = _trisc@4
603  00000087 = _trisc4___byte equ _trisc
604  00000004 = _trisc4___bit equ 4
605                     ; line_number = 102
606                     ; bind _trisc3 = _trisc@3
607  00000087 = _trisc3___byte equ _trisc
608  00000003 = _trisc3___bit equ 3
609                     ; line_number = 103
610                     ; bind _trisc2 = _trisc@2
611  00000087 = _trisc2___byte equ _trisc
612  00000002 = _trisc2___bit equ 2
613                     ; line_number = 104
614                     ; bind _trisc1 = _trisc@1
615  00000087 = _trisc1___byte equ _trisc
616  00000001 = _trisc1___bit equ 1
617                     ; line_number = 105
618                     ; bind _trisc0 = _trisc@0
619  00000087 = _trisc0___byte equ _trisc
620  00000000 = _trisc0___bit equ 0
621             
622                     ; line_number = 107
623                     ; register _pie1 = 
624  0000008c = _pie1 equ 140
625                     ; line_number = 108
626                     ; bind _eeie = _pie1@7
627  0000008c = _eeie___byte equ _pie1
628  00000007 = _eeie___bit equ 7
629                     ; line_number = 109
630                     ; bind _adie = _pie1@6
631  0000008c = _adie___byte equ _pie1
632  00000006 = _adie___bit equ 6
633                     ; line_number = 110
634                     ; bind _cmie = _pie1@3
635  0000008c = _cmie___byte equ _pie1
636  00000003 = _cmie___bit equ 3
637                     ; line_number = 111
638                     ; bind _tmr1ie = _pie1@0
639  0000008c = _tmr1ie___byte equ _pie1
640  00000000 = _tmr1ie___bit equ 0
641             
642                     ; line_number = 113
643                     ; register _pcon = 
644  0000008e = _pcon equ 142
645                     ; line_number = 114
646                     ; bind _por = _pcon@1
647  0000008e = _por___byte equ _pcon
648  00000001 = _por___bit equ 1
649                     ; line_number = 115
650                     ; bind _bor = _pcon@0
651  0000008e = _bor___byte equ _pcon
652  00000000 = _bor___bit equ 0
653             
654                     ; line_number = 117
655                     ; register _osccal = 
656  00000090 = _osccal equ 144
657                     ; line_number = 118
658                     ; bind _cal5 = _osccal@7
659  00000090 = _cal5___byte equ _osccal
660  00000007 = _cal5___bit equ 7
661                     ; line_number = 119
662                     ; bind _cal4 = _osccal@6
663  00000090 = _cal4___byte equ _osccal
664  00000006 = _cal4___bit equ 6
665                     ; line_number = 120
666                     ; bind _cal3 = _osccal@5
667  00000090 = _cal3___byte equ _osccal
668  00000005 = _cal3___bit equ 5
669                     ; line_number = 121
670                     ; bind _cal2 = _osccal@4
671  00000090 = _cal2___byte equ _osccal
672  00000004 = _cal2___bit equ 4
673                     ; line_number = 122
674                     ; bind _cal1 = _osccal@3
675  00000090 = _cal1___byte equ _osccal
676  00000003 = _cal1___bit equ 3
677                     ; line_number = 123
678                     ; bind _cal0 = _osccal@2
679  00000090 = _cal0___byte equ _osccal
680  00000002 = _cal0___bit equ 2
681                     ; line_number = 124
682                     ; constant _osccal_lsb = 4
683  00000004 = _osccal_lsb equ 4
684             
685                     ; line_number = 126
686                     ; register _wpua = 
687  00000095 = _wpua equ 149
688                     ; line_number = 127
689                     ; bind _wpua5 = _wpua@5
690  00000095 = _wpua5___byte equ _wpua
691  00000005 = _wpua5___bit equ 5
692                     ; line_number = 128
693                     ; bind _wpua4 = _wpua@4
694  00000095 = _wpua4___byte equ _wpua
695  00000004 = _wpua4___bit equ 4
696                     ; line_number = 129
697                     ; bind _wpua2 = _wpua@2
698  00000095 = _wpua2___byte equ _wpua
699  00000002 = _wpua2___bit equ 2
700                     ; line_number = 130
701                     ; bind _wpua1 = _wpua@1
702  00000095 = _wpua1___byte equ _wpua
703  00000001 = _wpua1___bit equ 1
704                     ; line_number = 131
705                     ; bind _wpua0 = _wpua@0
706  00000095 = _wpua0___byte equ _wpua
707  00000000 = _wpua0___bit equ 0
708             
709                     ; line_number = 133
710                     ; register _ioca = 
711  00000096 = _ioca equ 150
712                     ; line_number = 134
713                     ; bind _ioca5 = _ioca@5
714  00000096 = _ioca5___byte equ _ioca
715  00000005 = _ioca5___bit equ 5
716                     ; line_number = 135
717                     ; bind _ioca4 = _ioca@4
718  00000096 = _ioca4___byte equ _ioca
719  00000004 = _ioca4___bit equ 4
720                     ; line_number = 136
721                     ; bind _ioca3 = _ioca@3
722  00000096 = _ioca3___byte equ _ioca
723  00000003 = _ioca3___bit equ 3
724                     ; line_number = 137
725                     ; bind _ioca2 = _ioca@2
726  00000096 = _ioca2___byte equ _ioca
727  00000002 = _ioca2___bit equ 2
728                     ; line_number = 138
729                     ; bind _ioca1 = _ioca@1
730  00000096 = _ioca1___byte equ _ioca
731  00000001 = _ioca1___bit equ 1
732                     ; line_number = 139
733                     ; bind _ioca0 = _ioca@0
734  00000096 = _ioca0___byte equ _ioca
735  00000000 = _ioca0___bit equ 0
736             
737                     ; line_number = 141
738                     ; register _vrcon = 
739  00000099 = _vrcon equ 153
740                     ; line_number = 142
741                     ; bind _vren = _vrcon@7
742  00000099 = _vren___byte equ _vrcon
743  00000007 = _vren___bit equ 7
744                     ; line_number = 143
745                     ; bind _vrr = _vrcon@5
746  00000099 = _vrr___byte equ _vrcon
747  00000005 = _vrr___bit equ 5
748                     ; line_number = 144
749                     ; bind _vr3 = _vrcon@3
750  00000099 = _vr3___byte equ _vrcon
751  00000003 = _vr3___bit equ 3
752                     ; line_number = 145
753                     ; bind _vr2 = _vrcon@2
754  00000099 = _vr2___byte equ _vrcon
755  00000002 = _vr2___bit equ 2
756                     ; line_number = 146
757                     ; bind _vr1 = _vrcon@1
758  00000099 = _vr1___byte equ _vrcon
759  00000001 = _vr1___bit equ 1
760                     ; line_number = 147
761                     ; bind _vr0 = _vrcon@0
762  00000099 = _vr0___byte equ _vrcon
763  00000000 = _vr0___bit equ 0
764             
765                     ; line_number = 149
766                     ; register _eedata = 
767  0000009a = _eedata equ 154
768             
769                     ; line_number = 151
770                     ; register _eeadr = 
771  0000009b = _eeadr equ 155
772             
773                     ; line_number = 153
774                     ; register _eecon1 = 
775  0000009c = _eecon1 equ 156
776                     ; line_number = 154
777                     ; bind _wrerr = _eecon1@3
778  0000009c = _wrerr___byte equ _eecon1
779  00000003 = _wrerr___bit equ 3
780                     ; line_number = 155
781                     ; bind _wren = _eecon1@2
782  0000009c = _wren___byte equ _eecon1
783  00000002 = _wren___bit equ 2
784                     ; line_number = 156
785                     ; bind _wr = _eecon1@1
786  0000009c = _wr___byte equ _eecon1
787  00000001 = _wr___bit equ 1
788                     ; line_number = 157
789                     ; bind _rd = _eecon1@0
790  0000009c = _rd___byte equ _eecon1
791  00000000 = _rd___bit equ 0
792             
793                     ; line_number = 159
794                     ; register _eecon2 = 
795  0000009d = _eecon2 equ 157
796             
797             
798                     ; buffer = '_pic16f676'
799                     ; line_number = 134
800                     ; library _pic16f630_676 exited
801             
802                     ; # The only difference between the PIC16F676 and the PIC16F630 is that
803                     ; # the 'F676 has 8 channels of A/D and the 'F630 does not.
804             
805                     ; line_number = 139
806                     ; register _adresh = 
807  0000001e = _adresh equ 30
808             
809                     ; # The {_adif} flag is only avaiable for the PIC16F676:
810                     ; line_number = 142
811                     ; bind _adif = _pir1@6
812  0000000c = _adif___byte equ _pir1
813  00000006 = _adif___bit equ 6
814             
815                     ; line_number = 144
816                     ; register _adcon0 = 
817  0000001f = _adcon0 equ 31
818                     ; line_number = 145
819                     ; bind _adfm = _adcon0@7
820  0000001f = _adfm___byte equ _adcon0
821  00000007 = _adfm___bit equ 7
822                     ; line_number = 146
823                     ; bind _vcfg = _adcon0@5
824  0000001f = _vcfg___byte equ _adcon0
825  00000005 = _vcfg___bit equ 5
826                     ; line_number = 147
827                     ; bind _chs2 = _adcon0@4
828  0000001f = _chs2___byte equ _adcon0
829  00000004 = _chs2___bit equ 4
830                     ; line_number = 148
831                     ; bind _chs1 = _adcon0@3
832  0000001f = _chs1___byte equ _adcon0
833  00000003 = _chs1___bit equ 3
834                     ; line_number = 149
835                     ; bind _chs0 = _adcon0@2
836  0000001f = _chs0___byte equ _adcon0
837  00000002 = _chs0___bit equ 2
838                     ; line_number = 150
839                     ; bind _go = _adcon0@1
840  0000001f = _go___byte equ _adcon0
841  00000001 = _go___bit equ 1
842                     ; line_number = 151
843                     ; bind _adon = _adcon0@0
844  0000001f = _adon___byte equ _adcon0
845  00000000 = _adon___bit equ 0
846             
847                     ; line_number = 153
848                     ; register _ansel = 
849  00000091 = _ansel equ 145
850                     ; line_number = 154
851                     ; bind _ans7 = _ansel@7
852  00000091 = _ans7___byte equ _ansel
853  00000007 = _ans7___bit equ 7
854                     ; line_number = 155
855                     ; bind _ans6 = _ansel@6
856  00000091 = _ans6___byte equ _ansel
857  00000006 = _ans6___bit equ 6
858                     ; line_number = 156
859                     ; bind _ans5 = _ansel@5
860  00000091 = _ans5___byte equ _ansel
861  00000005 = _ans5___bit equ 5
862                     ; line_number = 157
863                     ; bind _ans4 = _ansel@4
864  00000091 = _ans4___byte equ _ansel
865  00000004 = _ans4___bit equ 4
866                     ; line_number = 158
867                     ; bind _ans3 = _ansel@3
868  00000091 = _ans3___byte equ _ansel
869  00000003 = _ans3___bit equ 3
870                     ; line_number = 159
871                     ; bind _ans2 = _ansel@2
872  00000091 = _ans2___byte equ _ansel
873  00000002 = _ans2___bit equ 2
874                     ; line_number = 160
875                     ; bind _ans1 = _ansel@1
876  00000091 = _ans1___byte equ _ansel
877  00000001 = _ans1___bit equ 1
878                     ; line_number = 161
879                     ; bind _ans0 = _ansel@0
880  00000091 = _ans0___byte equ _ansel
881  00000000 = _ans0___bit equ 0
882             
883                     ; line_number = 163
884                     ; register _adresl = 
885  0000009e = _adresl equ 158
886             
887                     ; line_number = 165
888                     ; register _adcon1 = 
889  0000009f = _adcon1 equ 159
890                     ; line_number = 166
891                     ; bind _adcs2 = _adcon1@6
892  0000009f = _adcs2___byte equ _adcon1
893  00000006 = _adcs2___bit equ 6
894                     ; line_number = 167
895                     ; bind _adcs1 = _adcon1@5
896  0000009f = _adcs1___byte equ _adcon1
897  00000005 = _adcs1___bit equ 5
898                     ; line_number = 168
899                     ; bind _adcs0 = _adcon1@4
900  0000009f = _adcs0___byte equ _adcon1
901  00000004 = _adcs0___bit equ 4
902             
903             
904                     ; buffer = 'full_step'
905                     ; line_number = 6
906                     ; library _pic16f676 exited
907             
908                     ; line_number = 8
909                     ; package pdip
910                     ; line_number = 9
911                     ; pin 1 = power_supply
912                     ; line_number = 10
913                     ;  pin 2 = clkin
914                     ; line_number = 11
915                     ;  pin 3 = an3, name=coil0_in
916  00000005 = coil0_in___byte equ _porta
917  00000004 = coil0_in___bit equ 4
918                     ; line_number = 12
919                     ;  pin 4 = mclr
920                     ; line_number = 13
921                     ;  pin 5 = rc5_out, name=coil0a, mask=coil0a_mask
922  00000007 = coil0a___byte equ _portc
923  00000005 = coil0a___bit equ 5
924  00000020 = coil0a_mask equ 32
925                     ; line_number = 14
926                     ;  pin 6 = rc4_out, name=coil0b, mask=coil0b_mask
927  00000007 = coil0b___byte equ _portc
928  00000004 = coil0b___bit equ 4
929  00000010 = coil0b_mask equ 16
930                     ; line_number = 15
931                     ;  pin 7 = rc3_out, name=coil1a, mask=coil1a_mask
932  00000007 = coil1a___byte equ _portc
933  00000003 = coil1a___bit equ 3
934  00000008 = coil1a_mask equ 8
935                     ; line_number = 16
936                     ;  pin 8 = rc2_out, name=coil1b, mask=coil1b_mask
937  00000007 = coil1b___byte equ _portc
938  00000002 = coil1b___bit equ 2
939  00000004 = coil1b_mask equ 4
940                     ; line_number = 17
941                     ;  pin 9 = rc1_in, name=step
942  00000007 = step___byte equ _portc
943  00000001 = step___bit equ 1
944                     ; line_number = 18
945                     ;  pin 10 = rc0_in, name=dir
946  00000007 = dir___byte equ _portc
947  00000000 = dir___bit equ 0
948                     ; line_number = 19
949                     ;  pin 11 = ra2_in, name=mode
950  00000005 = mode___byte equ _porta
951  00000002 = mode___bit equ 2
952                     ; #pin 12 = vref
953                     ; line_number = 21
954                     ;  pin 12 = ra1_in
955                     ; line_number = 22
956                     ;  pin 13 = an0, name=coil1_in
957  00000005 = coil1_in___byte equ _porta
958  00000000 = coil1_in___bit equ 0
959                     ; line_number = 23
960                     ;  pin 14 = ground
961             
962             
963                     ; line_number = 27
964                     ; constant microsecond = 5
965  00000005 = microsecond equ 5
966             
967                     ; # Current sense resistor is .50 Ohms.
968                     ; # Voltage across resistor is I * R = I * (1/2)
969                     ; # A/D measures voltage between 0 an 5 volts between 0 and 255.
970                     ; # Thus, the A/D result is A = (255/5) * I * R.
971                     ; # Converting I into milliamps: A = (255 / 5) * I/1000 * (1/2)
972                     ; # Reworking: A = (I * 255) / (5 * 1000 * 2)
973                     ; # More rework: A = (I * 255) / 10000
974                     ; # More Rework: A = (I * 51) / 2000
975             
976                     ; line_number = 38
977                     ; constant coil0_current = 1500
978  000005dc = coil0_current equ 1500
979                     ; line_number = 39
980                     ; constant coil0_a2d = (coil0_current * 51) / 2000
981  00000026 = coil0_a2d equ 38
982                     ; line_number = 40
983                     ; constant coil1_current = 1500
984  000005dc = coil1_current equ 1500
985                     ; line_number = 41
986                     ; constant coil1_a2d = (coil1_current * 51) / 2000
987  00000026 = coil1_a2d equ 38
988             
989                     ; # A/D acquistion time is:
990                     ; #
991                     ; #    Tacq = Tamp + Tc + Tcoff
992                     ; #
993                     ; # where
994                     ; #
995                     ; #    Tamp = 2uS
996                     ; #    Tc = Chold x (Ric + Rss + Rs) x In(1/2047)
997                     ; #    Tcoff = (T - 25) x .005  (T measured in degrees Centigrade)
998                     ; #
999                     ; # For T = 50, Tcoff = 1.25uS
1000                    ; # Worst case, Ric = 1K, Rss=7K, Rs=10K, Chold=120pf
1001                    ; # So, Tc ~= 16.47usec.
1002                    ; #
1003                    ; # Finally, Tacp = 2 + 16.47 + 1.25 = 19.72uS, call it 20uS.
1004            
1005                    ; line_number = 59
1006                    ; origin 0
1007   0000 :           org     0
1008            
1009                    ; line_number = 61
1010                    ; procedure main
1011   0000 :   main:
1012                    ; Need to calibrate the oscillator
1013 0000 23ff          call    1023
1014 0001 1683          bsf     __rp0___byte, __rp0___bit
1015 0002 0090          movwf   _osccal
1016                    ; Initialize some registers
1017 0003 3001          movlw   1
1018 0004 1283          bcf     __rp0___byte, __rp0___bit
1019 0005 009f          movwf   _adcon0
1020 0006 3009          movlw   9
1021 0007 1683          bsf     __rp0___byte, __rp0___bit
1022 0008 0091          movwf   _ansel
1023 0009 3017          movlw   23
1024 000a 0085          movwf   _trisa
1025 000b 3003          movlw   3
1026 000c 0087          movwf   _trisc
1027                    ; arguments_none
1028                    ; line_number = 63
1029                    ;  returns_nothing
1030            
1031                    ; line_number = 65
1032                    ;  local index byte
1033 00000020 = main__index equ shared___globals
1034                    ; line_number = 66
1035                    ;  local previous bit
1036 0000005f = main__previous___byte equ shared___globals+63
1037 00000000 = main__previous___bit equ 0
1038                    ; line_number = 67
1039                    ;  local pulse byte
1040 00000021 = main__pulse equ shared___globals+1
1041                    ; line_number = 68
1042                    ;  local coil0_mask byte
1043 00000022 = main__coil0_mask equ shared___globals+2
1044                    ; line_number = 69
1045                    ;  local coil1_mask byte
1046 00000023 = main__coil1_mask equ shared___globals+3
1047                    ; line_number = 70
1048                    ;  local coil0_current byte
1049 00000024 = main__coil0_current equ shared___globals+4
1050                    ; line_number = 71
1051                    ;  local coil0_limit byte
1052 00000025 = main__coil0_limit equ shared___globals+5
1053                    ; line_number = 72
1054                    ;  local coil1_current byte
1055 00000026 = main__coil1_current equ shared___globals+6
1056                    ; line_number = 73
1057                    ;  local coil1_limit byte
1058 00000027 = main__coil1_limit equ shared___globals+7
1059            
1060                    ; # Set A/D clock source to Tad = 32 x Tocs = 32 x .2uS = 6.4uS.
1061                    ; # A/D time = 11 x TAd = 11 x 6.4uS = 70.4uS.
1062                    ; before procedure statements delay=non-uniform, bit states=(data:X0=>X1 code:XX=>XX)
1063                    ; line_number = 77
1064                    ;  _adcon1 := 0x20
1065 000d 3020          movlw   32
1066 000e 009f          movwf   _adcon1
1067            
1068                    ; line_number = 79
1069                    ;  pulse := 0
1070 000f 3000          movlw   0
1071 0010 1283          bcf     __rp0___byte, __rp0___bit
1072 0011 00a1          movwf   main__pulse
1073                    ; line_number = 80
1074                    ;  coil0_limit:= coil0_a2d
1075 0012 3026          movlw   38
1076 0013 00a5          movwf   main__coil0_limit
1077                    ; line_number = 81
1078                    ;  coil0_mask := coil0a_mask
1079 0014 3020          movlw   32
1080 0015 00a2          movwf   main__coil0_mask
1081                    ; line_number = 82
1082                    ;  coil1_limit := coil1_a2d
1083 0016 3026          movlw   38
1084 0017 00a7          movwf   main__coil1_limit
1085                    ; line_number = 83
1086                    ;  coil1_mask := coil1a_mask
1087 0018 3008          movlw   8
1088 0019 00a3          movwf   main__coil1_mask
1089                    ; line_number = 84
1090                    ;  previous := 0
1091 001a 105f          bcf     main__previous___byte, main__previous___bit
1092                    ; line_number = 85
1093                    ;  index := 0
1094 001b 3000          movlw   0
1095 001c 00a0          movwf   main__index
1096                    ; line_number = 86
1097                    ;  _rc := 0
1098 001d 3000          movlw   0
1099 001e 0087          movwf   _rc
1100            
1101                    ; # Set ADCS<2:0> to 010 = Fosc/32:
1102                    ; line_number = 89
1103                    ;  _adcs0 := 0
1104 001f 1683          bsf     __rp0___byte, __rp0___bit
1105 0020 121f          bcf     _adcs0___byte, _adcs0___bit
1106                    ; line_number = 90
1107                    ;  _adcs1 := 1
1108 0021 169f          bsf     _adcs1___byte, _adcs1___bit
1109                    ; line_number = 91
1110                    ;  _adcs2 := 0
1111 0022 131f          bcf     _adcs2___byte, _adcs2___bit
1112            
1113                    ; # Right justify the 10-bit value into ADR
1114                    ; line_number = 94
1115                    ;  _adfm := 1
1116 0023 1283          bcf     __rp0___byte, __rp0___bit
1117 0024 179f          bsf     _adfm___byte, _adfm___bit
1118                    ; line_number = 95
1119                    ;  _adon := 1
1120 0025 141f          bsf     _adon___byte, _adon___bit
1121                    ; line_number = 96
1122                    ;  loop_forever start
1123   0026 :   main__1:
1124                    ; # Step/Dir process:
1125                    ; line_number = 98
1126                    ;  if step start
1127                    ; =>bit_code_emit@symbol(): sym=step
1128                    ; CASE: true.size>1 false.size=1; no GOTO's
1129 0026 1c87          btfss   step___byte, step___bit
1130 0027 2830          goto    main__3
1131                    ; line_number = 99
1132                    ; if !previous start
1133                    ; =>bit_code_emit@symbol(): sym=main__previous
1134                    ; CASE: true.size=0 && false.size>1
1135 0028 185f          btfsc   main__previous___byte, main__previous___bit
1136 0029 282e          goto    main__2
1137                    ; # We have a positive step edge:
1138                    ; line_number = 101
1139                    ;  if dir start
1140                    ; =>bit_code_emit@symbol(): sym=dir
1141                    ; CASE: true_size=1 && false_size=1
1142 002a 1807          btfsc   dir___byte, dir___bit
1143                    ; line_number = 102
1144                    ; index := index + 1
1145 002b 0aa0          incf    main__index,f
1146 002c 1c07          btfss   dir___byte, dir___bit
1147                    ; line_number = 104
1148                    ; index := index - 1
1149 002d 03a0          decf    main__index,f
1150                    ; <=bit_code_emit@symbol; sym=dir (data:00=>00 code:XX=>XX)
1151                    ; line_number = 101
1152                    ;  if dir done
1153   002e :   main__2:
1154                    ; Recombine size1 = 0 || size2 = 0
1155                    ; <=bit_code_emit@symbol; sym=main__previous (data:00=>00 code:XX=>XX)
1156                    ; line_number = 99
1157                    ; if !previous done
1158                    ; line_number = 105
1159                    ; previous := 1
1160 002e 145f          bsf     main__previous___byte, main__previous___bit
1161 002f 2831          goto    main__4
1162   0030 :   main__3:
1163                    ; line_number = 107
1164                    ; previous := 0
1165 0030 105f          bcf     main__previous___byte, main__previous___bit
1166            
1167            
1168   0031 :   main__4:
1169                    ; <=bit_code_emit@symbol; sym=step (data:00=>00 code:XX=>XX)
1170                    ; line_number = 98
1171                    ;  if step done
1172                    ; # Full step table:
1173                    ; line_number = 111
1174                    ;  if index@1 start
1175 00000020 = main__select__7___byte equ main__index
1176 00000001 = main__select__7___bit equ 1
1177                    ; =>bit_code_emit@symbol(): sym=main__select__7
1178                    ; CASE: true_code_size > 1 && false_code_size > 1
1179 0031 1ca0          btfss   main__select__7___byte, main__select__7___bit
1180 0032 283a          goto    main__8
1181                    ; line_number = 112
1182                    ; if index@0 start
1183 00000020 = main__select__6___byte equ main__index
1184 00000000 = main__select__6___bit equ 0
1185                    ; =>bit_code_emit@symbol(): sym=main__select__6
1186                    ; # index & 3 = 3:
1187                    ; line_number = 114
1188                    ;  coil0_mask := coil0a_mask
1189 0033 3020          movlw   32
1190 0034 00a2          movwf   main__coil0_mask
1191                    ; # index & 3 = 2:
1192                    ; line_number = 118
1193                    ;  coil0_mask := coil0a_mask
1194                    ; CASE: true_size=1 && false_size=1
1195 0035 1820          btfsc   main__select__6___byte, main__select__6___bit
1196                    ; line_number = 115
1197                    ;  coil1_mask := coil1a_mask
1198 0036 3008          movlw   8
1199 0037 1c20          btfss   main__select__6___byte, main__select__6___bit
1200                    ; line_number = 119
1201                    ;  coil1_mask := coil1b_mask
1202 0038 3004          movlw   4
1203 0039 2840          goto    main__9
1204   003a :   main__8:
1205                    ; line_number = 121
1206                    ; if index@0 start
1207 00000020 = main__select__5___byte equ main__index
1208 00000000 = main__select__5___bit equ 0
1209                    ; =>bit_code_emit@symbol(): sym=main__select__5
1210                    ; # index & 3 = 1:
1211                    ; line_number = 123
1212                    ;  coil0_mask := coil0b_mask
1213 003a 3010          movlw   16
1214 003b 00a2          movwf   main__coil0_mask
1215                    ; # index & 3 = 0:
1216                    ; line_number = 127
1217                    ;  coil0_mask := coil0b_mask
1218                    ; CASE: true_size=1 && false_size=1
1219 003c 1820          btfsc   main__select__5___byte, main__select__5___bit
1220                    ; line_number = 124
1221                    ;  coil1_mask := coil1b_mask
1222 003d 3004          movlw   4
1223 003e 1c20          btfss   main__select__5___byte, main__select__5___bit
1224                    ; line_number = 128
1225                    ;  coil1_mask := coil1a_mask
1226 003f 3008          movlw   8
1227   0040 :   main__9:
1228 0040 00a3          movwf   main__coil1_mask
1229                    ; <=bit_code_emit@symbol; sym=main__select__6 (data:00=>00 code:XX=>XX)
1230                    ; line_number = 112
1231                    ; if index@0 done
1232            
1233                    ; <=bit_code_emit@symbol; sym=main__select__5 (data:00=>00 code:XX=>XX)
1234                    ; line_number = 121
1235                    ; if index@0 done
1236                    ; <=bit_code_emit@symbol; sym=main__select__7 (data:00=>00 code:XX=>XX)
1237                    ; line_number = 111
1238                    ;  if index@1 done
1239                    ; # The sense resistor for coil 1 is on RA0/AN0, the we set
1240                    ; # CHS2<2:0> in ADCON0 to 000 (i.e. AN0):
1241                    ; line_number = 132
1242                    ;  _chs0 := 0
1243 0041 111f          bcf     _chs0___byte, _chs0___bit
1244                    ; line_number = 133
1245                    ;  _chs1 := 0
1246 0042 119f          bcf     _chs1___byte, _chs1___bit
1247                    ; line_number = 134
1248                    ;  _chs2 := 0
1249 0043 121f          bcf     _chs2___byte, _chs2___bit
1250            
1251                    ; # Wait 20uS for the sample and hold to settle out:
1252                    ; # The loop overhead is 3 cycles (=.6uS) and the minimum
1253                    ; # time through the loop is 4 cycles = (.8us). Total = 1.2uS.
1254                    ; # 20/1.2 = 16.66.  17 is the minimum:
1255                    ; line_number = 140
1256                    ;  loop_exactly 17 start
1257 00000028 = main__10 equ shared___globals+8
1258 0044 3011          movlw   17
1259 0045 00a8          movwf   main__10
1260   0046 :   main__11:
1261                    ; # Step/Dir process:
1262                    ; line_number = 142
1263                    ;  if step start
1264                    ; =>bit_code_emit@symbol(): sym=step
1265                    ; CASE: true.size>1 false.size=1; no GOTO's
1266 0046 1c87          btfss   step___byte, step___bit
1267 0047 2850          goto    main__13
1268                    ; line_number = 143
1269                    ; if !previous start
1270                    ; =>bit_code_emit@symbol(): sym=main__previous
1271                    ; CASE: true.size=0 && false.size>1
1272 0048 185f          btfsc   main__previous___byte, main__previous___bit
1273 0049 284e          goto    main__12
1274                    ; # We have a positive step edge:
1275                    ; line_number = 145
1276                    ;  if dir start
1277                    ; =>bit_code_emit@symbol(): sym=dir
1278                    ; CASE: true_size=1 && false_size=1
1279 004a 1807          btfsc   dir___byte, dir___bit
1280                    ; line_number = 146
1281                    ; index := index + 1
1282 004b 0aa0          incf    main__index,f
1283 004c 1c07          btfss   dir___byte, dir___bit
1284                    ; line_number = 148
1285                    ; index := index - 1
1286 004d 03a0          decf    main__index,f
1287                    ; <=bit_code_emit@symbol; sym=dir (data:00=>00 code:XX=>XX)
1288                    ; line_number = 145
1289                    ;  if dir done
1290   004e :   main__12:
1291                    ; Recombine size1 = 0 || size2 = 0
1292                    ; <=bit_code_emit@symbol; sym=main__previous (data:00=>00 code:XX=>XX)
1293                    ; line_number = 143
1294                    ; if !previous done
1295                    ; line_number = 149
1296                    ; previous := 1
1297 004e 145f          bsf     main__previous___byte, main__previous___bit
1298 004f 2851          goto    main__14
1299   0050 :   main__13:
1300                    ; line_number = 151
1301                    ; previous := 0
1302 0050 105f          bcf     main__previous___byte, main__previous___bit
1303            
1304   0051 :   main__14:
1305                    ; <=bit_code_emit@symbol; sym=step (data:00=>00 code:XX=>XX)
1306                    ; line_number = 142
1307                    ;  if step done
1308                    ; line_number = 140
1309                    ;  loop_exactly 17 wrap-up
1310 0051 0ba8          decfsz  main__10,f
1311 0052 2846          goto    main__11
1312                    ; line_number = 140
1313                    ;  loop_exactly 17 done
1314                    ; # Trigger the A/D conversion:
1315                    ; line_number = 154
1316                    ;  _go := 1
1317 0053 149f          bsf     _go___byte, _go___bit
1318                    ; line_number = 155
1319                    ;  while _go start
1320   0054 :   main__15:
1321                    ; =>bit_code_emit@symbol(): sym=_go
1322                    ; CASE: true_code.size = 0 && false_code.size > 1
1323 0054 1c9f          btfss   _go___byte, _go___bit
1324 0055 2862          goto    main__19
1325                    ; # Step/Dir process:
1326                    ; line_number = 157
1327                    ;  if step start
1328                    ; =>bit_code_emit@symbol(): sym=step
1329                    ; CASE: true.size>1 false.size=1; no GOTO's
1330 0056 1c87          btfss   step___byte, step___bit
1331 0057 2860          goto    main__17
1332                    ; line_number = 158
1333                    ; if !previous start
1334                    ; =>bit_code_emit@symbol(): sym=main__previous
1335                    ; CASE: true.size=0 && false.size>1
1336 0058 185f          btfsc   main__previous___byte, main__previous___bit
1337 0059 285e          goto    main__16
1338                    ; # We have a positive step edge:
1339                    ; line_number = 160
1340                    ;  if dir start
1341                    ; =>bit_code_emit@symbol(): sym=dir
1342                    ; CASE: true_size=1 && false_size=1
1343 005a 1807          btfsc   dir___byte, dir___bit
1344                    ; line_number = 161
1345                    ; index := index + 1
1346 005b 0aa0          incf    main__index,f
1347 005c 1c07          btfss   dir___byte, dir___bit
1348                    ; line_number = 163
1349                    ; index := index - 1
1350 005d 03a0          decf    main__index,f
1351                    ; <=bit_code_emit@symbol; sym=dir (data:00=>00 code:XX=>XX)
1352                    ; line_number = 160
1353                    ;  if dir done
1354   005e :   main__16:
1355                    ; Recombine size1 = 0 || size2 = 0
1356                    ; <=bit_code_emit@symbol; sym=main__previous (data:00=>00 code:XX=>XX)
1357                    ; line_number = 158
1358                    ; if !previous done
1359                    ; line_number = 164
1360                    ; previous := 1
1361 005e 145f          bsf     main__previous___byte, main__previous___bit
1362 005f 2861          goto    main__18
1363   0060 :   main__17:
1364                    ; line_number = 166
1365                    ; previous := 0
1366 0060 105f          bcf     main__previous___byte, main__previous___bit
1367            
1368   0061 :   main__18:
1369                    ; <=bit_code_emit@symbol; sym=step (data:00=>00 code:XX=>XX)
1370                    ; line_number = 157
1371                    ;  if step done
1372 0061 2854          goto    main__15
1373                    ; Recombine size1 = 0 || size2 = 0
1374   0062 :   main__19:
1375                    ; <=bit_code_emit@symbol; sym=_go (data:00=>00 code:XX=>XX)
1376                    ; line_number = 155
1377                    ;  while _go done
1378                    ; # Read out the A/D value:
1379                    ; line_number = 169
1380                    ;  coil1_current := 255
1381 0062 30ff          movlw   255
1382 0063 00a6          movwf   main__coil1_current
1383                    ; line_number = 170
1384                    ;  if _adresh = 0 start
1385                    ; Left minus Right
1386 0064 081e          movf    _adresh,w
1387                    ; =>bit_code_emit@symbol(): sym=__z
1388 0065 1683          bsf     __rp0___byte, __rp0___bit
1389                    ; CASE: true_code.size = 0 && false_code.size > 1
1390 0066 1d03          btfss   __z___byte, __z___bit
1391 0067 286b          goto    main__20
1392                    ; line_number = 171
1393                    ; coil1_current := _adresl
1394 0068 081e          movf    _adresl,w
1395 0069 1283          bcf     __rp0___byte, __rp0___bit
1396 006a 00a6          movwf   main__coil1_current
1397            
1398                    ; Recombine size1 = 0 || size2 = 0
1399   006b :   main__20:
1400                    ; <=bit_code_emit@symbol; sym=__z (data:00=>0? code:XX=>XX)
1401                    ; line_number = 170
1402                    ;  if _adresh = 0 done
1403                    ; # Process the current values:
1404                    ; line_number = 174
1405                    ;  pulse := 0
1406 006b 3000          movlw   0
1407 006c 1283          bcf     __rp0___byte, __rp0___bit
1408 006d 00a1          movwf   main__pulse
1409                    ; line_number = 175
1410                    ;  if coil0_current < coil0_limit start
1411 006e 0825          movf    main__coil0_limit,w
1412 006f 0224          subwf   main__coil0_current,w
1413                    ; =>bit_code_emit@symbol(): sym=__c
1414                    ; CASE: true.size=0 && false.size>1
1415 0070 1803          btfsc   __c___byte, __c___bit
1416 0071 2874          goto    main__21
1417                    ; line_number = 176
1418                    ; pulse := coil0_mask
1419 0072 0822          movf    main__coil0_mask,w
1420 0073 00a1          movwf   main__pulse
1421   0074 :   main__21:
1422                    ; Recombine size1 = 0 || size2 = 0
1423                    ; <=bit_code_emit@symbol; sym=__c (data:00=>00 code:XX=>XX)
1424                    ; line_number = 175
1425                    ;  if coil0_current < coil0_limit done
1426                    ; line_number = 177
1427                    ; if coil1_current < coil1_limit start
1428 0074 0827          movf    main__coil1_limit,w
1429 0075 0226          subwf   main__coil1_current,w
1430                    ; =>bit_code_emit@symbol(): sym=__c
1431                    ; CASE: true.size=0 && false.size>1
1432 0076 1803          btfsc   __c___byte, __c___bit
1433 0077 287a          goto    main__22
1434                    ; line_number = 178
1435                    ; pulse := pulse | coil1_mask
1436 0078 0823          movf    main__coil1_mask,w
1437 0079 04a1          iorwf   main__pulse,f
1438   007a :   main__22:
1439                    ; Recombine size1 = 0 || size2 = 0
1440                    ; <=bit_code_emit@symbol; sym=__c (data:00=>00 code:XX=>XX)
1441                    ; line_number = 177
1442                    ; if coil1_current < coil1_limit done
1443                    ; line_number = 179
1444                    ; _rc := pulse
1445 007a 0821          movf    main__pulse,w
1446 007b 0087          movwf   _rc
1447            
1448                    ; # The sense resistor for coil 0 is on RA4/AN3, the we set
1449                    ; # CHS2<2:0> in ADCON0 to 011 (i.e. AN3):
1450                    ; line_number = 183
1451                    ;  _chs0 := 1
1452 007c 151f          bsf     _chs0___byte, _chs0___bit
1453                    ; line_number = 184
1454                    ;  _chs1 := 1
1455 007d 159f          bsf     _chs1___byte, _chs1___bit
1456                    ; line_number = 185
1457                    ;  _chs2 := 0
1458 007e 121f          bcf     _chs2___byte, _chs2___bit
1459            
1460                    ; # Wait 20uS for the sample and hold to settle out:
1461                    ; line_number = 188
1462                    ;  loop_exactly 17 start
1463 00000028 = main__23 equ shared___globals+8
1464 007f 3011          movlw   17
1465 0080 00a8          movwf   main__23
1466   0081 :   main__24:
1467                    ; line_number = 189
1468                    ; if step start
1469                    ; =>bit_code_emit@symbol(): sym=step
1470                    ; CASE: true.size>1 false.size=1; no GOTO's
1471 0081 1c87          btfss   step___byte, step___bit
1472 0082 288b          goto    main__26
1473                    ; line_number = 190
1474                    ; if !previous start
1475                    ; =>bit_code_emit@symbol(): sym=main__previous
1476                    ; CASE: true.size=0 && false.size>1
1477 0083 185f          btfsc   main__previous___byte, main__previous___bit
1478 0084 2889          goto    main__25
1479                    ; # We have a positive step edge:
1480                    ; line_number = 192
1481                    ;  if dir start
1482                    ; =>bit_code_emit@symbol(): sym=dir
1483                    ; CASE: true_size=1 && false_size=1
1484 0085 1807          btfsc   dir___byte, dir___bit
1485                    ; line_number = 193
1486                    ; index := index + 1
1487 0086 0aa0          incf    main__index,f
1488 0087 1c07          btfss   dir___byte, dir___bit
1489                    ; line_number = 195
1490                    ; index := index - 1
1491 0088 03a0          decf    main__index,f
1492                    ; <=bit_code_emit@symbol; sym=dir (data:00=>00 code:XX=>XX)
1493                    ; line_number = 192
1494                    ;  if dir done
1495   0089 :   main__25:
1496                    ; Recombine size1 = 0 || size2 = 0
1497                    ; <=bit_code_emit@symbol; sym=main__previous (data:00=>00 code:XX=>XX)
1498                    ; line_number = 190
1499                    ; if !previous done
1500                    ; line_number = 196
1501                    ; previous := 1
1502 0089 145f          bsf     main__previous___byte, main__previous___bit
1503 008a 288c          goto    main__27
1504   008b :   main__26:
1505                    ; line_number = 198
1506                    ; previous := 0
1507 008b 105f          bcf     main__previous___byte, main__previous___bit
1508            
1509   008c :   main__27:
1510                    ; <=bit_code_emit@symbol; sym=step (data:00=>00 code:XX=>XX)
1511                    ; line_number = 189
1512                    ; if step done
1513                    ; line_number = 188
1514                    ;  loop_exactly 17 wrap-up
1515 008c 0ba8          decfsz  main__23,f
1516 008d 2881          goto    main__24
1517                    ; line_number = 188
1518                    ;  loop_exactly 17 done
1519                    ; # Trigger the AN3 A/D conversion:
1520                    ; line_number = 201
1521                    ;  _go := 1
1522 008e 149f          bsf     _go___byte, _go___bit
1523                    ; line_number = 202
1524                    ;  while _go start
1525   008f :   main__28:
1526                    ; =>bit_code_emit@symbol(): sym=_go
1527                    ; CASE: true_code.size = 0 && false_code.size > 1
1528 008f 1c9f          btfss   _go___byte, _go___bit
1529 0090 289d          goto    main__32
1530                    ; line_number = 203
1531                    ; if step start
1532                    ; =>bit_code_emit@symbol(): sym=step
1533                    ; CASE: true.size>1 false.size=1; no GOTO's
1534 0091 1c87          btfss   step___byte, step___bit
1535 0092 289b          goto    main__30
1536                    ; line_number = 204
1537                    ; if !previous start
1538                    ; =>bit_code_emit@symbol(): sym=main__previous
1539                    ; CASE: true.size=0 && false.size>1
1540 0093 185f          btfsc   main__previous___byte, main__previous___bit
1541 0094 2899          goto    main__29
1542                    ; # We have a positive step edge:
1543                    ; line_number = 206
1544                    ;  if dir start
1545                    ; =>bit_code_emit@symbol(): sym=dir
1546                    ; CASE: true_size=1 && false_size=1
1547 0095 1807          btfsc   dir___byte, dir___bit
1548                    ; line_number = 207
1549                    ; index := index + 1
1550 0096 0aa0          incf    main__index,f
1551 0097 1c07          btfss   dir___byte, dir___bit
1552                    ; line_number = 209
1553                    ; index := index - 1
1554 0098 03a0          decf    main__index,f
1555                    ; <=bit_code_emit@symbol; sym=dir (data:00=>00 code:XX=>XX)
1556                    ; line_number = 206
1557                    ;  if dir done
1558   0099 :   main__29:
1559                    ; Recombine size1 = 0 || size2 = 0
1560                    ; <=bit_code_emit@symbol; sym=main__previous (data:00=>00 code:XX=>XX)
1561                    ; line_number = 204
1562                    ; if !previous done
1563                    ; line_number = 210
1564                    ; previous := 1
1565 0099 145f          bsf     main__previous___byte, main__previous___bit
1566 009a 289c          goto    main__31
1567   009b :   main__30:
1568                    ; line_number = 212
1569                    ; previous := 0
1570 009b 105f          bcf     main__previous___byte, main__previous___bit
1571            
1572   009c :   main__31:
1573                    ; <=bit_code_emit@symbol; sym=step (data:00=>00 code:XX=>XX)
1574                    ; line_number = 203
1575                    ; if step done
1576 009c 288f          goto    main__28
1577                    ; Recombine size1 = 0 || size2 = 0
1578   009d :   main__32:
1579                    ; <=bit_code_emit@symbol; sym=_go (data:00=>00 code:XX=>XX)
1580                    ; line_number = 202
1581                    ;  while _go done
1582                    ; # Read out the A/D value for AN3:
1583                    ; line_number = 215
1584                    ;  coil0_current := 255
1585 009d 30ff          movlw   255
1586 009e 00a4          movwf   main__coil0_current
1587                    ; line_number = 216
1588                    ;  if _adresh = 0 start
1589                    ; Left minus Right
1590 009f 081e          movf    _adresh,w
1591                    ; =>bit_code_emit@symbol(): sym=__z
1592 00a0 1683          bsf     __rp0___byte, __rp0___bit
1593                    ; CASE: true_code.size = 0 && false_code.size > 1
1594 00a1 1d03          btfss   __z___byte, __z___bit
1595 00a2 28a6          goto    main__33
1596                    ; line_number = 217
1597                    ; coil0_current := _adresl
1598 00a3 081e          movf    _adresl,w
1599 00a4 1283          bcf     __rp0___byte, __rp0___bit
1600 00a5 00a4          movwf   main__coil0_current
1601            
1602                    ; Recombine size1 = 0 || size2 = 0
1603   00a6 :   main__33:
1604                    ; <=bit_code_emit@symbol; sym=__z (data:00=>0? code:XX=>XX)
1605                    ; line_number = 216
1606                    ;  if _adresh = 0 done
1607                    ; # Process the current values:
1608                    ; line_number = 220
1609                    ;  pulse := 0
1610 00a6 3000          movlw   0
1611 00a7 1283          bcf     __rp0___byte, __rp0___bit
1612 00a8 00a1          movwf   main__pulse
1613                    ; line_number = 221
1614                    ;  if coil0_current < coil0_limit start
1615 00a9 0825          movf    main__coil0_limit,w
1616 00aa 0224          subwf   main__coil0_current,w
1617                    ; =>bit_code_emit@symbol(): sym=__c
1618                    ; CASE: true.size=0 && false.size>1
1619 00ab 1803          btfsc   __c___byte, __c___bit
1620 00ac 28af          goto    main__34
1621                    ; line_number = 222
1622                    ; pulse := coil0_mask
1623 00ad 0822          movf    main__coil0_mask,w
1624 00ae 00a1          movwf   main__pulse
1625   00af :   main__34:
1626                    ; Recombine size1 = 0 || size2 = 0
1627                    ; <=bit_code_emit@symbol; sym=__c (data:00=>00 code:XX=>XX)
1628                    ; line_number = 221
1629                    ;  if coil0_current < coil0_limit done
1630                    ; line_number = 223
1631                    ; if coil1_current < coil1_limit start
1632 00af 0827          movf    main__coil1_limit,w
1633 00b0 0226          subwf   main__coil1_current,w
1634                    ; =>bit_code_emit@symbol(): sym=__c
1635                    ; CASE: true.size=0 && false.size>1
1636 00b1 1803          btfsc   __c___byte, __c___bit
1637 00b2 28b5          goto    main__35
1638                    ; line_number = 224
1639                    ; pulse := pulse | coil1_mask
1640 00b3 0823          movf    main__coil1_mask,w
1641 00b4 04a1          iorwf   main__pulse,f
1642   00b5 :   main__35:
1643                    ; Recombine size1 = 0 || size2 = 0
1644                    ; <=bit_code_emit@symbol; sym=__c (data:00=>00 code:XX=>XX)
1645                    ; line_number = 223
1646                    ; if coil1_current < coil1_limit done
1647                    ; line_number = 225
1648                    ; _rc := pulse
1649 00b5 0821          movf    main__pulse,w
1650 00b6 0087          movwf   _rc
1651            
1652                    ; line_number = 96
1653                    ;  loop_forever wrap-up
1654 00b7 2826          goto    main__1
1655                    ; line_number = 96
1656                    ;  loop_forever done
1657                    ; delay after procedure statements=non-uniform
1658            
1659            
1660            
1661            
1662            
1663                    ; Configuration bits
1664                    ; address = 0x2007, fill = 0x0
1665                    ; bg = bg11 (0x3000)
1666                    ; cpd = off (0x100)
1667                    ; cp = off (0x80)
1668                    ; boden = off (0x0)
1669                    ; mclre = on (0x20)
1670                    ; pwrte = off (0x10)
1671                    ; wdte = off (0x0)
1672                    ; fosc = hs (0x2)
1673                    ; 12722 = 0x31b2
1674   31b2 =           __config 12722
1675                    ; Define start addresses for data regions
1676                    ; Region="shared___globals" Address=32" Size=64 Bytes=9 Bits=1 Available=54
1677                    ; Region="shared___globals" Address=32" Size=64 Bytes=9 Bits=1 Available=54
1678                    ; Region="shared___globals" Address=32" Size=64 Bytes=9 Bits=1 Available=54
1679                    end
