2 * crt0.c - SDCC pic16 port runtime start code
4 * Converted for SDCC and pic16 port
5 * by Vangelis Rokas (vrokas@otenet.gr)
7 * based on Microchip MPLAB-C18 startup files
16 /* external reference to the user's main routine */
17 extern void main (void);
19 /* prototype for the startup function */
20 void _entry (void) _naked interrupt 0;
25 * entry function, placed at interrupt vector 0 (RESET)
28 void _entry (void) _naked interrupt 0
30 _asm goto __startup _endasm;
37 // Initialize the stack pointer
40 clrf _TBLPTRU, 0 // 1st silicon doesn't do this on POR
42 // initialize the flash memory access configuration. this is harmless
43 // for non-flash devices, so we do it on all parts.
49 /* Call the user's main routine */
53 /* return from main will lock up */