1  
2           ;  Microchip  MPLAB  XC8  C  Compiler  V1.43
3           ;  Copyright  (C)  1984-2017  HI-TECH  Software
4  
5           ;  Auto-generated  runtime  startup  code  for  final  link  stage.
6  
7           ;
8           ;  Compiler  options:
9           ;
10           ;  --chip=18F8720  -G  \
11           ;  -mdist/default/production/FW_PIC18F8720.production.map  --double=24  \
12           ;  --float=24  --emi=wordwrite  --opt=none  --addrqual=ignore  -P  -N255  \
13           ;  --warn=-3  --asmlist  -DXPRJ_default=default  \
14           ;  --summary=default,+psect,+class,+mem,+hex,+file  --html  \
15           ;  --output=default,-inhx032  \
16           ;  --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib  \
17           ;  --output=-mcof,+elf:multilocs  --stack=compiled:auto:auto:auto  \
18           ;  --errformat=%f:%l:  error:  (%n)  %s  \
19           ;  --warnformat=%f:%l:  warning:  (%n)  %s  \
20           ;  --msgformat=%f:%l:  advisory:  (%n)  %s  --summary=+xml  \
21           ;  --summarydir=dist/default/production/memoryfile.xml  \
22           ;  -odist/default/production/FW_PIC18F8720.production.elf  \
23           ;  build/default/production/Main.p1  build/default/production/display.p1  \
24           ;  build/default/production/hsv.p1  build/default/production/i2c.p1  \
25           ;  build/default/production/i2ca.p1  build/default/production/keyboard.p1  \
26           ;  build/default/production/ledI2C.p1  build/default/production/rtc.p1
27           ;
28  
29  
30           processor       18F8720
31  
32   GLOBAL  ___extmem_base
33   ___extmem_base  EQU  131072
34  
35           GLOBAL  _main,start
36           FNROOT  _main
37  
38           pic18cxx        equ     1
39  
40           psect   config,class=CONFIG,delta=1,noexec
41           psect   idloc,class=IDLOC,delta=1,noexec
42           psect   const,class=CONST,delta=1,reloc=2,noexec
43           psect   smallconst,class=SMALLCONST,delta=1,reloc=2,noexec
44           psect   mediumconst,class=MEDIUMCONST,delta=1,reloc=2,noexec
45           psect   rbss,class=COMRAM,space=1,noexec
46           psect   bss,class=RAM,space=1,noexec
47           psect   rdata,class=COMRAM,space=1,noexec
48           psect   irdata,class=CODE,space=0,reloc=2,noexec
49           psect   bss,class=RAM,space=1,noexec
50           psect   data,class=RAM,space=1,noexec
51           psect   idata,class=CODE,space=0,reloc=2,noexec
52           psect   nvrram,class=COMRAM,space=1,noexec
53           psect   nvbit,class=COMRAM,bit,space=1,noexec
54           psect   temp,ovrld,class=COMRAM,space=1,noexec
55           psect   struct,ovrld,class=COMRAM,space=1,noexec
56           psect   rbit,class=COMRAM,bit,space=1,noexec
57           psect   bigbss,class=BIGRAM,space=1,noexec
58           psect   bigdata,class=BIGRAM,space=1,noexec
59           psect   ibigdata,class=CODE,space=0,reloc=2,noexec
60           psect   farbss,class=FARRAM,space=0,reloc=2,delta=1,noexec
61           psect   nvFARRAM,class=FARRAM,space=0,reloc=2,delta=1,noexec
62           psect   fardata,class=FARRAM,space=0,reloc=2,delta=1,noexec
63           psect   ifardata,class=CODE,space=0,reloc=2,delta=1,noexec
64  
65           psect   reset_vec,class=CODE,delta=1,reloc=2
66           psect   powerup,class=CODE,delta=1,reloc=2
67           psect   init,class=CODE,delta=1,reloc=2
68           psect   text,class=CODE,delta=1,reloc=2
69   GLOBAL  intlevel0,intlevel1,intlevel2
70   intlevel0:
71   intlevel1:
72   intlevel2:
73   GLOBAL  intlevel3
74   intlevel3:
75           psect   clrtext,class=CODE,delta=1,reloc=2
76  
77           psect   intcode,class=CODE,delta=1,reloc=2
78           psect   intcode_body,class=CODE,delta=1,reloc=2
79           psect   intcodelo,class=CODE,delta=1,reloc=2
80           psect   intret,class=CODE,delta=1,reloc=2
81           psect   intentry,class=CODE,delta=1,reloc=2
82           psect   intsave_regs,class=BIGRAM,space=1
83  
84           psect   eeprom_data,class=EEDATA,delta=1,noexec
85           psect   smallconst
86           GLOBAL  __smallconst
87   __smallconst:
88           psect   mediumconst
89           GLOBAL  __mediumconst
90   __mediumconst:
91   wreg    EQU 0FE8h
92   fsr0l   EQU        0FE9h
93   fsr0h   EQU        0FEAh
94   fsr1l   EQU        0FE1h
95   fsr1h   EQU        0FE2h
96   fsr2l   EQU        0FD9h
97   fsr2h   EQU        0FDAh
98   postinc0        EQU     0FEEh
99   postdec0        EQU     0FEDh
100   postinc1        EQU     0FE6h
101   postdec1        EQU     0FE5h
102   postinc2        EQU     0FDEh
103   postdec2        EQU     0FDDh
104   tblptrl EQU      0FF6h
105   tblptrh EQU      0FF7h
106   tblptru EQU      0FF8h
107   tablat    EQU       0FF5h
108  
109           PSECT   ramtop,class=RAM,noexec
110           GLOBAL  __S1                  ;  top  of  RAM  usage
111           GLOBAL  __ramtop
112           GLOBAL  __LRAM,__HRAM
113   __ramtop:
114  
115           psect   reset_vec
116   reset_vec:
117           nop     ;  NOP  for  reset  vector  (precedes  GOTO  instruction)
118           ;  No  powerup  routine
119           global  start
120  
121   ;  jump  to  start
122           goto  start
123           GLOBAL  __accesstop
124   __accesstop  EQU  96
125  
126   ;Initialize  the  stack  pointer  (FSR1)
127           global  stacklo,  stackhi
128           stacklo equ      0EEh
129           stackhi equ      0EFFh
130  
131  
132           psect   stack,class=STACK,space=2,noexec
133           global  ___sp,___inthi_sp,___intlo_sp
134   ___sp:
135   ___inthi_sp:
136   ___intlo_sp:
137  
138  
139  
140           psect   init
141   start:
142           global  start_initialization
143           goto  start_initialization       ;jump  to  C  runtime  clear  &  initialization
144  
145   ;  Config  register  IDLOC0  @  0x200000
146   ;       unspecified  using  default  value
147  
148           psect   idloc,class=IDLOC,delta=1,noexec
149                   org  0x0
150                   db  0xFF
151  
152   ;  Config  register  IDLOC1  @  0x200001
153   ;       unspecified  using  default  value
154  
155           psect   idloc,class=IDLOC,delta=1,noexec
156                   org  0x1
157                   db  0xFF
158  
159   ;  Config  register  IDLOC2  @  0x200002
160   ;       unspecified  using  default  value
161  
162           psect   idloc,class=IDLOC,delta=1,noexec
163                   org  0x2
164                   db  0xFF
165  
166   ;  Config  register  IDLOC3  @  0x200003
167   ;       unspecified  using  default  value
168  
169           psect   idloc,class=IDLOC,delta=1,noexec
170                   org  0x3
171                   db  0xFF
172  
173   ;  Config  register  IDLOC4  @  0x200004
174   ;       unspecified  using  default  value
175  
176           psect   idloc,class=IDLOC,delta=1,noexec
177                   org  0x4
178                   db  0xFF
179  
180   ;  Config  register  IDLOC5  @  0x200005
181   ;       unspecified  using  default  value
182  
183           psect   idloc,class=IDLOC,delta=1,noexec
184                   org  0x5
185                   db  0xFF
186  
187   ;  Config  register  IDLOC6  @  0x200006
188   ;       unspecified  using  default  value
189  
190           psect   idloc,class=IDLOC,delta=1,noexec
191                   org  0x6
192                   db  0xFF
193  
194   ;  Config  register  IDLOC7  @  0x200007
195   ;       unspecified  using  default  value
196  
197           psect   idloc,class=IDLOC,delta=1,noexec
198                   org  0x7
199                   db  0xFF
200  
201   ;  Padding  undefined  space
202           psect   config,class=CONFIG,delta=1,noexec
203                   org  0x0
204                   db  0xFF
205  
206   ;  Config  register  CONFIG1H  @  0x300001
207   ;       Oscillator  Selection  bits
208   ;       OSC  =  ECIO,  EC  oscillator  w/  OSC2  configured  as  RA6
209   ;       Oscillator  System  Clock  Switch  Enable  bit
210   ;       OSCS  =  OFF,  Oscillator  system  clock  switch  option  is  disabled  (main  oscillator  is  source)
211  
212           psect   config,class=CONFIG,delta=1,noexec
213                   org  0x1
214                   db  0x25
215  
216   ;  Config  register  CONFIG2L  @  0x300002
217   ;       Power-up  Timer  Enable  bit
218   ;       PWRT  =  OFF,  PWRT  disabled
219   ;       Brown-out  Reset  Enable  bit
220   ;       BOR  =  OFF,  Brown-out  Reset  disabled
221   ;       Brown-out  Reset  Voltage  bits
222   ;       BORV  =  25,  VBOR  set  to  2.5V
223  
224           psect   config,class=CONFIG,delta=1,noexec
225                   org  0x2
226                   db  0xD
227  
228   ;  Config  register  CONFIG2H  @  0x300003
229   ;       Watchdog  Timer  Enable  bit
230   ;       WDT  =  OFF,  WDT  disabled  (control  is  placed  on  the  SWDTEN  bit)
231   ;       Watchdog  Timer  Postscale  Select  bits
232   ;       WDTPS  =  128,  1:128
233  
234           psect   config,class=CONFIG,delta=1,noexec
235                   org  0x3
236                   db  0xE
237  
238   ;  Config  register  CONFIG3L  @  0x300004
239   ;       Processor  Mode  Select  bits
240   ;       MODE  =  MC,  Microcontroller  mode
241   ;       External  Bus  Data  Wait  Enable  bit
242   ;       WAIT  =  OFF,  Wait  selections  unavailable  for  table  reads  and  table  writes
243  
244           psect   config,class=CONFIG,delta=1,noexec
245                   org  0x4
246                   db  0x83
247  
248   ;  Config  register  CONFIG3H  @  0x300005
249   ;       CCP2  Mux  bit
250   ;       CCP2MUX  =  OFF,  CCP2  is  multiplexed  with  RB3  in  Extended  Microcontroller,  Microprocessor  or  Microprocessor  with  Boot  Block  mode.  Or  with  RE7  in  Microcontroller  mode.
251  
252           psect   config,class=CONFIG,delta=1,noexec
253                   org  0x5
254                   db  0x2
255  
256   ;  Config  register  CONFIG4L  @  0x300006
257   ;       Stack  Full/Underflow  Reset  Enable  bit
258   ;       STVR  =  OFF,  Stack  full/underflow  will  not  cause  Reset
259   ;       Low-Voltage  ICSP  Enable  bit
260   ;       LVP  =  OFF,  Low-voltage  ICSP  disabled
261   ;       Background  Debugger  Enable  bit
262   ;       DEBUG  =  OFF,  Background  debugger  disabled.  RB6  and  RB7  configured  as  general  purpose  I/O  pins.
263  
264           psect   config,class=CONFIG,delta=1,noexec
265                   org  0x6
266                   db  0x80
267  
268   ;  Padding  undefined  space
269           psect   config,class=CONFIG,delta=1,noexec
270                   org  0x7
271                   db  0xFF
272  
273   ;  Config  register  CONFIG5L  @  0x300008
274   ;       Code  Protection  bit
275   ;       CP0  =  OFF,  Block  0  (000200-003FFFh)  not  code-protected
276   ;       Code  Protection  bit
277   ;       CP1  =  OFF,  Block  1  (004000-007FFFh)  not  code-protected
278   ;       Code  Protection  bit
279   ;       CP2  =  OFF,  Block  2  (008000-00BFFFh)  not  code-protected
280   ;       Code  Protection  bit
281   ;       CP3  =  OFF,  Block  3  (00C000-00FFFFh)  not  code-protected
282   ;       Code  Protection  bit
283   ;       CP4  =  OFF,  Block  4  (010000-013FFFh)  not  code-protected
284   ;       Code  Protection  bit
285   ;       CP5  =  OFF,  Block  5  (014000-017FFFh)  not  code-protected
286   ;       Code  Protection  bit
287   ;       CP6  =  OFF,  Block  6  (018000-01BFFFh)  not  code-protected
288   ;       Code  Protection  bit
289   ;       CP7  =  OFF,  Block  7  (01C000-01FFFFh)  not  code-protected
290  
291           psect   config,class=CONFIG,delta=1,noexec
292                   org  0x8
293                   db  0xFF
294  
295   ;  Config  register  CONFIG5H  @  0x300009
296   ;       Boot  Block  Code  Protection  bit
297   ;       CPB  =  OFF,  Boot  Block  (000000-0001FFh)  not  code-protected
298   ;       Data  EEPROM  Code  Protection  bit
299   ;       CPD  =  OFF,  Data  EEPROM  not  code-protected
300  
301           psect   config,class=CONFIG,delta=1,noexec
302                   org  0x9
303                   db  0xC0
304  
305   ;  Config  register  CONFIG6L  @  0x30000A
306   ;       Write  Protection  bit
307   ;       WRT0  =  OFF,  Block  0  (000200-003FFFh)  not  write-protected
308   ;       Write  Protection  bit
309   ;       WRT1  =  OFF,  Block  1  (004000-007FFFh)  not  write-protected
310   ;       Write  Protection  bit
311   ;       WRT2  =  OFF,  Block  2  (008000-00BFFFh)  not  write-protected
312   ;       Write  Protection  bit
313   ;       WRT3  =  OFF,  Block  3  (00C000-00FFFFh)  not  write-protected
314   ;       Write  Protection  bit
315   ;       WRT4  =  OFF,  Block  4  (010000-013FFFh)  not  write-protected
316   ;       Write  Protection  bit
317   ;       WRT5  =  OFF,  Block  5  (014000-017FFFh)  not  write-protected
318   ;       Write  Protection  bit
319   ;       WRT6  =  OFF,  Block  6  (018000-01BFFFh)  not  write-protected
320   ;       Write  Protection  bit
321   ;       WRT7  =  OFF,  Block  7  (01C000-01FFFFh)  not  write-protected
322  
323           psect   config,class=CONFIG,delta=1,noexec
324                   org  0xA
325                   db  0xFF
326  
327   ;  Config  register  CONFIG6H  @  0x30000B
328   ;       Configuration  Register  Write  Protection  bit
329   ;       WRTC  =  OFF,  Configuration  registers  (300000-3000FFh)  not  write-protected
330   ;       Boot  Block  Write  Protection  bit
331   ;       WRTB  =  OFF,  Boot  Block  (000000-0001FFh)  not  write-protected
332   ;       Data  EEPROM  Write  Protection  bit
333   ;       WRTD  =  OFF,  Data  EEPROM  not  write-protected
334  
335           psect   config,class=CONFIG,delta=1,noexec
336                   org  0xB
337                   db  0xE0
338  
339   ;  Config  register  CONFIG7L  @  0x30000C
340   ;       Table  Read  Protection  bit
341   ;       EBTR0  =  OFF,  Block  0  (000200-003FFFh)  not  protected  from  table  reads  executed  in  other  blocks
342   ;       Table  Read  Protection  bit
343   ;       EBTR1  =  OFF,  Block  1  (004000-007FFFh)  not  protected  from  table  reads  executed  in  other  blocks
344   ;       Table  Read  Protection  bit
345   ;       EBTR2  =  OFF,  Block  2  (008000-00BFFFh)  not  protected  from  table  reads  executed  in  other  blocks
346   ;       Table  Read  Protection  bit
347   ;       EBTR3  =  OFF,  Block  3  (00C000-00FFFFh)  not  protected  from  table  reads  executed  in  other  blocks
348   ;       Table  Read  Protection  bit
349   ;       EBTR4  =  OFF,  Block  4  (010000-013FFFh)  not  protected  from  table  reads  executed  in  other  blocks
350   ;       Table  Read  Protection  bit
351   ;       EBTR5  =  OFF,  Block  5  (014000-017FFFh)  not  protected  from  table  reads  executed  in  other  blocks
352   ;       Table  Read  Protection  bit
353   ;       EBTR6  =  OFF,  Block  6  (018000-01BFFFh)  not  protected  from  table  reads  executed  in  other  blocks
354   ;       Table  Read  Protection  bit
355   ;       EBTR7  =  OFF,  Block  7  (01C000-01FFFFh)  not  protected  from  table  reads  executed  in  other  blocks
356  
357           psect   config,class=CONFIG,delta=1,noexec
358                   org  0xC
359                   db  0xFF
360  
361   ;  Config  register  CONFIG7H  @  0x30000D
362   ;       Boot  Block  Table  Read  Protection  bit
363   ;       EBTRB  =  OFF,  Boot  Block  (000000-0001FFh)  not  protected  from  table  reads  executed  in  other  blocks
364  
365           psect   config,class=CONFIG,delta=1,noexec
366                   org  0xD
367                   db  0x40
368  
369  
370   psect  comram,class=COMRAM,space=1
371   psect  abs1,class=ABS1,space=1
372   psect  bigram,class=BIGRAM,space=1
373   psect  ram,class=RAM,space=1
374   psect  bank0,class=BANK0,space=1
375   psect  bank1,class=BANK1,space=1
376   psect  bank2,class=BANK2,space=1
377   psect  bank3,class=BANK3,space=1
378   psect  bank4,class=BANK4,space=1
379   psect  bank5,class=BANK5,space=1
380   psect  bank6,class=BANK6,space=1
381   psect  bank7,class=BANK7,space=1
382   psect  bank8,class=BANK8,space=1
383   psect  bank9,class=BANK9,space=1
384   psect  bank10,class=BANK10,space=1
385   psect  bank11,class=BANK11,space=1
386   psect  bank12,class=BANK12,space=1
387   psect  bank13,class=BANK13,space=1
388   psect  bank14,class=BANK14,space=1
389   psect  sfr,class=SFR,space=1
390  
391  
392           end     start