1  
2           ;  Microchip  MPLAB  XC8  C  Compiler  V1.21
3           ;  Copyright  (C)  1984-2013  HI-TECH  Software
4  
5           ;  Auto-generated  runtime  startup  code  for  final  link  stage.
6  
7           ;
8           ;  Compiler  options:
9           ;
10           ;  --chip=18F4550  -G  \
11           ;  -mdist/default/production/Freedom_II_Test_Suite.X.production.map  \
12           ;  --double=32  --float=32  --emi=wordwrite  \
13           ;  --opt=default,+asm,-asmfile,+speed,-space,-debug  --addrqual=ignore  \
14           ;  --mode=free  -P  -N255  \
15           ;  -I../../../Library/LaurTec_PIC_libraries/LaurTec_PIC_libraries_v_3.3.1/conf  \
16           ;  -I../../../Library/LaurTec_PIC_libraries/LaurTec_PIC_libraries_v_3.3.1/src  \
17           ;  -I../../../Library/LaurTec_PIC_libraries/LaurTec_PIC_libraries_v_3.3.1/inc  \
18           ;  -IC:/Program  Files  (x86)/Microchip/xc8/v1.12/include/plib  --warn=0  \
19           ;  --ccmode=cci  --asmlist  \
20           ;  --summary=default,+psect,+class,+mem,+hex,+file  --html  \
21           ;  --output=default,-inhx032  \
22           ;  --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,+plib  \
23           ;  --output=-mcof,+elf  --errformat=%f:%l:  error:  %s  \
24           ;  --warnformat=%f:%l:  warning:  (%n)  %s  \
25           ;  --msgformat=%f:%l:  advisory:  (%n)  %s  \
26           ;  -odist/default/production/Freedom_II_Test_Suite.X.production.elf  \
27           ;  build/default/production/main.p1
28           ;
29  
30  
31           processor       18F4550
32  
33           GLOBAL  _main,start
34           FNROOT  _main
35  
36           pic18cxx        equ     1
37  
38           psect   config,class=CONFIG,delta=1,noexec
39           psect   idloc,class=IDLOC,delta=1,noexec
40           psect   const,class=CODE,delta=1,reloc=2,noexec
41           psect   smallconst,class=SMALLCONST,delta=1,reloc=2,noexec
42           psect   mediumconst,class=MEDIUMCONST,delta=1,reloc=2,noexec
43           psect   rbss,class=COMRAM,space=1,noexec
44           psect   bss,class=RAM,space=1,noexec
45           psect   rdata,class=COMRAM,space=1,noexec
46           psect   irdata,class=CODE,space=0,reloc=2,noexec
47           psect   bss,class=RAM,space=1,noexec
48           psect   data,class=RAM,space=1,noexec
49           psect   idata,class=CODE,space=0,reloc=2,noexec
50           psect   nvrram,class=COMRAM,space=1,noexec
51           psect   nvbit,class=COMRAM,bit,space=1,noexec
52           psect   temp,ovrld,class=COMRAM,space=1,noexec
53           psect   struct,ovrld,class=COMRAM,space=1,noexec
54           psect   rbit,class=COMRAM,bit,space=1,noexec
55           psect   bigbss,class=BIGRAM,space=1,noexec
56           psect   bigdata,class=BIGRAM,space=1,noexec
57           psect   ibigdata,class=CODE,space=0,reloc=2,noexec
58           psect   farbss,class=FARRAM,space=0,reloc=2,delta=1,noexec
59           psect   nvFARRAM,class=FARRAM,space=0,reloc=2,delta=1,noexec
60           psect   fardata,class=FARRAM,space=0,reloc=2,delta=1,noexec
61           psect   ifardata,class=CODE,space=0,reloc=2,delta=1,noexec
62  
63           psect   reset_vec,class=CODE,delta=1,reloc=2
64           psect   powerup,class=CODE,delta=1,reloc=2
65           psect   intcode,class=CODE,delta=1,reloc=2
66           psect   intcode_body,class=CODE,delta=1,reloc=2
67           psect   intcodelo,class=CODE,delta=1,reloc=2
68           psect   intret,class=CODE,delta=1,reloc=2
69           psect   intentry,class=CODE,delta=1,reloc=2
70  
71           psect   intsave_regs,class=BIGRAM,space=1
72           psect   init,class=CODE,delta=1,reloc=2
73           psect   text,class=CODE,delta=1,reloc=2
74   GLOBAL  intlevel0,intlevel1,intlevel2
75   intlevel0:
76   intlevel1:
77   intlevel2:
78   GLOBAL  intlevel3
79   intlevel3:
80           psect   end_init,class=CODE,delta=1,reloc=2
81           psect   clrtext,class=CODE,delta=1,reloc=2
82  
83           psect   eeprom_data,class=EEDATA,delta=1,noexec
84           psect   smallconst
85           GLOBAL  __smallconst
86   __smallconst:
87           psect   mediumconst
88           GLOBAL  __mediumconst
89   __mediumconst:
90   wreg    EQU 0FE8h
91   fsr0l   EQU        0FE9h
92   fsr0h   EQU        0FEAh
93   fsr1l   EQU        0FE1h
94   fsr1h   EQU        0FE2h
95   fsr2l   EQU        0FD9h
96   fsr2h   EQU        0FDAh
97   postinc0        EQU     0FEEh
98   postdec0        EQU     0FEDh
99   postinc1        EQU     0FE6h
100   postdec1        EQU     0FE5h
101   postinc2        EQU     0FDEh
102   postdec2        EQU     0FDDh
103   tblptrl EQU      0FF6h
104   tblptrh EQU      0FF7h
105   tblptru EQU      0FF8h
106   tablat    EQU       0FF5h
107  
108           PSECT   ramtop,class=RAM,noexec
109           GLOBAL  __S1                  ;  top  of  RAM  usage
110           GLOBAL  __ramtop
111           GLOBAL  __LRAM,__HRAM
112   __ramtop:
113  
114           psect   reset_vec
115   reset_vec:
116           ;  No  powerup  routine
117           ;  No  interrupt  routine
118           GLOBAL  __accesstop
119   __accesstop  EQU  96
120  
121  
122           psect   init
123   start:
124           psect   end_init
125           global  start_initialization
126           goto  start_initialization       ;jump  to  C  runtime  clear  &  initialization
127  
128   ;  Config  register  IDLOC0  @  0x200000
129   ;       unspecified  using  default  value
130  
131           psect   idloc,class=IDLOC,delta=1,noexec
132                   org  0x0
133                   db  0xFF
134  
135   ;  Config  register  IDLOC1  @  0x200001
136   ;       unspecified  using  default  value
137  
138           psect   idloc,class=IDLOC,delta=1,noexec
139                   org  0x1
140                   db  0xFF
141  
142   ;  Config  register  IDLOC2  @  0x200002
143   ;       unspecified  using  default  value
144  
145           psect   idloc,class=IDLOC,delta=1,noexec
146                   org  0x2
147                   db  0xFF
148  
149   ;  Config  register  IDLOC3  @  0x200003
150   ;       unspecified  using  default  value
151  
152           psect   idloc,class=IDLOC,delta=1,noexec
153                   org  0x3
154                   db  0xFF
155  
156   ;  Config  register  IDLOC4  @  0x200004
157   ;       unspecified  using  default  value
158  
159           psect   idloc,class=IDLOC,delta=1,noexec
160                   org  0x4
161                   db  0xFF
162  
163   ;  Config  register  IDLOC5  @  0x200005
164   ;       unspecified  using  default  value
165  
166           psect   idloc,class=IDLOC,delta=1,noexec
167                   org  0x5
168                   db  0xFF
169  
170   ;  Config  register  IDLOC6  @  0x200006
171   ;       unspecified  using  default  value
172  
173           psect   idloc,class=IDLOC,delta=1,noexec
174                   org  0x6
175                   db  0xFF
176  
177   ;  Config  register  IDLOC7  @  0x200007
178   ;       unspecified  using  default  value
179  
180           psect   idloc,class=IDLOC,delta=1,noexec
181                   org  0x7
182                   db  0xFF
183  
184   ;  Config  register  CONFIG1L  @  0x300000
185   ;       System  Clock  Postscaler  Selection  bits
186   ;       CPUDIV  =  OSC1_PLL2,  [Primary  Oscillator  Src:  /1][96  MHz  PLL  Src:  /2]
187   ;       PLL  Prescaler  Selection  bits
188   ;       PLLDIV  =  1,  No  prescale  (4  MHz  oscillator  input  drives  PLL  directly)
189   ;       USB  Clock  Selection  bit  (used  in  Full-Speed  USB  mode  only;  UCFG:FSEN  =  1)
190   ;       USBDIV  =  2,  USB  clock  source  comes  from  the  96  MHz  PLL  divided  by  2
191  
192           psect   config,class=CONFIG,delta=1,noexec
193                   org  0x0
194                   db  0x20
195  
196   ;  Config  register  CONFIG1H  @  0x300001
197   ;       Internal/External  Oscillator  Switchover  bit
198   ;       IESO  =  OFF,  Oscillator  Switchover  mode  disabled
199   ;       Oscillator  Selection  bits
200   ;       FOSC  =  HS,  HS  oscillator  (HS)
201   ;       Fail-Safe  Clock  Monitor  Enable  bit
202   ;       FCMEN  =  OFF,  Fail-Safe  Clock  Monitor  disabled
203  
204           psect   config,class=CONFIG,delta=1,noexec
205                   org  0x1
206                   db  0xC
207  
208   ;  Config  register  CONFIG2L  @  0x300002
209   ;       USB  Voltage  Regulator  Enable  bit
210   ;       VREGEN  =  OFF,  USB  voltage  regulator  disabled
211   ;       Brown-out  Reset  Enable  bits
212   ;       BOR  =  OFF,  Brown-out  Reset  disabled  in  hardware  and  software
213   ;       Brown-out  Reset  Voltage  bits
214   ;       BORV  =  0,  Maximum  setting
215   ;       Power-up  Timer  Enable  bit
216   ;       PWRT  =  ON,  PWRT  enabled
217  
218           psect   config,class=CONFIG,delta=1,noexec
219                   org  0x2
220                   db  0x0
221  
222   ;  Config  register  CONFIG2H  @  0x300003
223   ;       Watchdog  Timer  Postscale  Select  bits
224   ;       WDTPS  =  1,  1:1
225   ;       Watchdog  Timer  Enable  bit
226   ;       WDT  =  OFF,  WDT  disabled  (control  is  placed  on  the  SWDTEN  bit)
227  
228           psect   config,class=CONFIG,delta=1,noexec
229                   org  0x3
230                   db  0x0
231  
232   ;  Padding  undefined  space
233           psect   config,class=CONFIG,delta=1,noexec
234                   org  0x4
235                   db  0xFF
236  
237   ;  Config  register  CONFIG3H  @  0x300005
238   ;       CCP2  MUX  bit
239   ;       CCP2MX  =  ON,  CCP2  input/output  is  multiplexed  with  RC1
240   ;       PORTB  A/D  Enable  bit
241   ;       PBADEN  =  OFF,  PORTB&lsaquo 4:0&rsaquo   pins  are  configured  as  digital  I/O  on  Reset
242   ;       Low-Power  Timer  1  Oscillator  Enable  bit
243   ;       LPT1OSC  =  OFF,  Timer1  configured  for  higher  power  operation
244   ;       MCLR  Pin  Enable  bit
245   ;       MCLRE  =  ON,  MCLR  pin  enabled;  RE3  input  pin  disabled
246  
247           psect   config,class=CONFIG,delta=1,noexec
248                   org  0x5
249                   db  0x81
250  
251   ;  Config  register  CONFIG4L  @  0x300006
252   ;       Background  Debugger  Enable  bit
253   ;       DEBUG  =  OFF,  Background  debugger  disabled,  RB6  and  RB7  configured  as  general  purpose  I/O  pins
254   ;       Stack  Full/Underflow  Reset  Enable  bit
255   ;       STVREN  =  ON,  Stack  full/underflow  will  cause  Reset
256   ;       Dedicated  In-Circuit  Debug/Programming  Port  (ICPORT)  Enable  bit
257   ;       ICPRT  =  OFF,  ICPORT  disabled
258   ;       Extended  Instruction  Set  Enable  bit
259   ;       XINST  =  OFF,  Instruction  set  extension  and  Indexed  Addressing  mode  disabled  (Legacy  mode)
260   ;       Single-Supply  ICSP  Enable  bit
261   ;       LVP  =  OFF,  Single-Supply  ICSP  disabled
262  
263           psect   config,class=CONFIG,delta=1,noexec
264                   org  0x6
265                   db  0x81
266  
267   ;  Padding  undefined  space
268           psect   config,class=CONFIG,delta=1,noexec
269                   org  0x7
270                   db  0xFF
271  
272   ;  Config  register  CONFIG5L  @  0x300008
273   ;       Code  Protection  bit
274   ;       CP0  =  OFF,  Block  0  (000800-001FFFh)  is  not  code-protected
275   ;       Code  Protection  bit
276   ;       CP1  =  OFF,  Block  1  (002000-003FFFh)  is  not  code-protected
277   ;       Code  Protection  bit
278   ;       CP2  =  OFF,  Block  2  (004000-005FFFh)  is  not  code-protected
279   ;       Code  Protection  bit
280   ;       CP3  =  OFF,  Block  3  (006000-007FFFh)  is  not  code-protected
281  
282           psect   config,class=CONFIG,delta=1,noexec
283                   org  0x8
284                   db  0xF
285  
286   ;  Config  register  CONFIG5H  @  0x300009
287   ;       Data  EEPROM  Code  Protection  bit
288   ;       CPD  =  OFF,  Data  EEPROM  is  not  code-protected
289   ;       Boot  Block  Code  Protection  bit
290   ;       CPB  =  OFF,  Boot  block  (000000-0007FFh)  is  not  code-protected
291  
292           psect   config,class=CONFIG,delta=1,noexec
293                   org  0x9
294                   db  0xC0
295  
296   ;  Config  register  CONFIG6L  @  0x30000A
297   ;       Write  Protection  bit
298   ;       WRT0  =  OFF,  Block  0  (000800-001FFFh)  is  not  write-protected
299   ;       Write  Protection  bit
300   ;       WRT1  =  OFF,  Block  1  (002000-003FFFh)  is  not  write-protected
301   ;       Write  Protection  bit
302   ;       WRT2  =  OFF,  Block  2  (004000-005FFFh)  is  not  write-protected
303   ;       Write  Protection  bit
304   ;       WRT3  =  OFF,  Block  3  (006000-007FFFh)  is  not  write-protected
305  
306           psect   config,class=CONFIG,delta=1,noexec
307                   org  0xA
308                   db  0xF
309  
310   ;  Config  register  CONFIG6H  @  0x30000B
311   ;       Boot  Block  Write  Protection  bit
312   ;       WRTB  =  OFF,  Boot  block  (000000-0007FFh)  is  not  write-protected
313   ;       Configuration  Register  Write  Protection  bit
314   ;       WRTC  =  OFF,  Configuration  registers  (300000-3000FFh)  are  not  write-protected
315   ;       Data  EEPROM  Write  Protection  bit
316   ;       WRTD  =  OFF,  Data  EEPROM  is  not  write-protected
317  
318           psect   config,class=CONFIG,delta=1,noexec
319                   org  0xB
320                   db  0xE0
321  
322   ;  Config  register  CONFIG7L  @  0x30000C
323   ;       Table  Read  Protection  bit
324   ;       EBTR0  =  OFF,  Block  0  (000800-001FFFh)  is  not  protected  from  table  reads  executed  in  other  blocks
325   ;       Table  Read  Protection  bit
326   ;       EBTR1  =  OFF,  Block  1  (002000-003FFFh)  is  not  protected  from  table  reads  executed  in  other  blocks
327   ;       Table  Read  Protection  bit
328   ;       EBTR2  =  OFF,  Block  2  (004000-005FFFh)  is  not  protected  from  table  reads  executed  in  other  blocks
329   ;       Table  Read  Protection  bit
330   ;       EBTR3  =  OFF,  Block  3  (006000-007FFFh)  is  not  protected  from  table  reads  executed  in  other  blocks
331  
332           psect   config,class=CONFIG,delta=1,noexec
333                   org  0xC
334                   db  0xF
335  
336   ;  Config  register  CONFIG7H  @  0x30000D
337   ;       Boot  Block  Table  Read  Protection  bit
338   ;       EBTRB  =  OFF,  Boot  block  (000000-0007FFh)  is  not  protected  from  table  reads  executed  in  other  blocks
339  
340           psect   config,class=CONFIG,delta=1,noexec
341                   org  0xD
342                   db  0x40
343  
344  
345   psect  comram,class=COMRAM,space=1
346   psect  abs1,class=ABS1,space=1
347   psect  bigram,class=BIGRAM,space=1
348   psect  ram,class=RAM,space=1
349   psect  bank0,class=BANK0,space=1
350   psect  bank1,class=BANK1,space=1
351   psect  bank2,class=BANK2,space=1
352   psect  bank3,class=BANK3,space=1
353   psect  bank4,class=BANK4,space=1
354   psect  bank5,class=BANK5,space=1
355   psect  bank6,class=BANK6,space=1
356   psect  bank7,class=BANK7,space=1
357   psect  sfr,class=SFR,space=1
358  
359  
360           end     start