c018i-custom.c
Go to the documentation of this file.
00001 // $Id: c018i.c,v 1.7 2006/11/15 22:53:12 moshtaa Exp $
00002 // Copyright (c)1999 Microchip Technology
00003 // MPLAB-C18 startup code, including initialized data
00004 // external reference to __init() function
00005 //
00006 //
00007 // Modified by Hugo Elias, Shadow Robot Co Ltd 2011.
00008 // 
00009 
00010 #warning We are using our own startup code
00011 
00012 
00013 extern void main (void);                        // User's main()
00014 
00015 void _entry (void);                             // Startup functions
00016 void _startup (void);
00017 
00018 
00019 
00020 #pragma code _entry_scn=0x000000                // Create goto instruction at 0x000000
00021 void _entry (void)
00022 {
00023     _asm goto _startup _endasm
00024 }
00025 
00026 
00027 #pragma code _startup_scn
00028 void _startup (void)
00029 {
00030     _asm
00031         lfsr 1, _stack                          // Initialize the stack pointer
00032         lfsr 2, _stack
00033         clrf TBLPTRU, 0                         // 1st silicon doesn't do this on POR
00034     _endasm 
00035 
00036 
00037     while(1)
00038         main ();                                // Call user's code.
00039 }
00040 


sr_external_dependencies
Author(s): Ugo Cupcic/ ugo@shadowrobot.com, software@shadowrobot.com
autogenerated on Thu Jan 2 2014 12:01:42