1 /* Startup code for M68HC11/M68HC12.
2 * Copyright (C) 1999, 2000, 2001, 2002 Stephane Carrez (stcarrez@nerim.fr)
4 * The authors hereby grant permission to use, copy, modify, distribute,
5 * and license this software and its documentation for any purpose, provided
6 * that existing copyright notices are retained in all copies and that this
7 * notice is included verbatim in any distributions. No written agreement,
8 * license, or royalty fee is required for any of the authorized uses.
9 * Modifications to this software may be copyrighted by their authors
10 * and need not follow the licensing terms described here, provided that
11 * the new terms are clearly indicated on the first page of each file where
15 ;-----------------------------------------
17 ;-----------------------------------------
22 ;; The linker concatenate the .install* sections in the following order:
24 ;; .install0 Setup the stack pointer
25 ;; .install1 Place holder for applications
26 ;; .install2 Optional installation of data section in memory
27 ;; .install3 Place holder for applications
28 ;; .install4 Invokes the main
30 .sect .install0,"ax",@progbits
35 ;; At this step, the stack is not initialized and interrupts are masked.
36 ;; Applications only have 64 cycles to initialize some registers.
38 ;; To have a generic/configurable startup, initialize the stack to
39 ;; the end of some memory region. The _stack symbol is defined by
44 .sect .install2,"ax",@progbits
46 ;; Call a specific initialization operation. The default is empty.
47 ;; It can be overriden by applications. It is intended to initialize
48 ;; the 68hc11 registers. Function prototype is:
50 ;; int __premain(void);
57 .sect .install4,"ax",@progbits
63 ;-----------------------------------------
65 ;-----------------------------------------
66 ;; Force loading of data section mapping and bss clear
67 .globl __map_data_section
68 .globl __init_bss_section