1 | /* |
---|
2 | * $Id$ |
---|
3 | * |
---|
4 | * Re-written the gen68302 start-up code. |
---|
5 | * |
---|
6 | * Uses gas syntax only, removed the OAR asm.h. |
---|
7 | * |
---|
8 | * Supplies a complete vector table in ROM. |
---|
9 | * |
---|
10 | * Manages all vectors with seperate handlers to trap unhandled |
---|
11 | * execptions. |
---|
12 | * |
---|
13 | * Uses the target specific header file to get the runtime |
---|
14 | * configuration |
---|
15 | * |
---|
16 | * COPYRIGHT (c) 1996 |
---|
17 | * Objective Design Systems Pty Ltd (ODS) |
---|
18 | * |
---|
19 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
20 | * On-Line Applications Research Corporation (OAR). |
---|
21 | * |
---|
22 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
23 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
24 | * notice must appear in all copies of this file and its derivatives. |
---|
25 | * |
---|
26 | */ |
---|
27 | |
---|
28 | | |
---|
29 | | Entry from debugger |
---|
30 | | |
---|
31 | .sect .text |
---|
32 | |
---|
33 | | |
---|
34 | | Start |
---|
35 | | |
---|
36 | | Entered from a hardware reset. |
---|
37 | | |
---|
38 | |
---|
39 | .global start | Default entry point for GNU |
---|
40 | start: |
---|
41 | |
---|
42 | move.w #0x2700,%sr | Disable all interrupts |
---|
43 | |
---|
44 | | |
---|
45 | | zero out uninitialized data area |
---|
46 | | |
---|
47 | |
---|
48 | zerobss: |
---|
49 | moveal #_clear_end,%a0 | find end of .bss |
---|
50 | moveal #_clear_start,%a1 | find beginning of .bss |
---|
51 | moveq #0,%d0 |
---|
52 | |
---|
53 | zerobss_loop: |
---|
54 | |
---|
55 | movel %d0,%a1@+ | to zero out uninitialized |
---|
56 | cmpal %a0,%a1 |
---|
57 | jlt zerobss_loop | loop until end reached |
---|
58 | |
---|
59 | movel %d0,_stack_init | load stack top |
---|
60 | |
---|
61 | movw #0x3700,%sr | SUPV MODE,INTERRUPTS OFF!!! |
---|
62 | movel %d0,%a7 | set master stack pointer |
---|
63 | movel %d0,%a6 | set base pointer |
---|
64 | |
---|
65 | jsr boot_phase_3 |
---|
66 | |
---|
67 | | |
---|
68 | | Initialised data |
---|
69 | | |
---|
70 | |
---|
71 | .sect .data |
---|
72 | |
---|
73 | .global start_frame |
---|
74 | |
---|
75 | start_frame: |
---|
76 | .space 4,0 |
---|
77 | |
---|
78 | | |
---|
79 | | Uninitialised data |
---|
80 | | |
---|
81 | |
---|
82 | .sect .bss |
---|
83 | |
---|
84 | .global environ |
---|
85 | .align 2 |
---|
86 | |
---|
87 | environ: |
---|
88 | .long 0 |
---|
89 | |
---|
90 | .global heap_size |
---|
91 | .set heap_size,0x2000 |
---|
92 | |
---|
93 | .global stack_size |
---|
94 | .set stack_size,0x1000 |
---|
95 | |
---|
96 | |
---|