4.104.114.84.95
Last change
on this file since f8b27df9 was
f8b27df9,
checked in by Joel Sherrill <joel.sherrill@…>, on 03/20/98 at 17:20:45
|
New port from Ralf Corsepius <corsepiu@…>.
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Rev | Line | |
---|
[f8b27df9] | 1 | /* |
---|
| 2 | * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and |
---|
| 3 | * Bernd Becker (becker@faw.uni-ulm.de) |
---|
| 4 | * |
---|
| 5 | * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany |
---|
| 6 | * |
---|
| 7 | * This program is distributed in the hope that it will be useful, |
---|
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
| 10 | * |
---|
| 11 | * |
---|
| 12 | * COPYRIGHT (c) 1998. |
---|
| 13 | * On-Line Applications Research Corporation (OAR). |
---|
| 14 | * Copyright assigned to U.S. Government, 1994. |
---|
| 15 | * |
---|
| 16 | * The license and distribution terms for this file may be |
---|
| 17 | * found in the file LICENSE in this distribution or at |
---|
| 18 | * http://www.OARcorp.com/rtems/license.html. |
---|
| 19 | * |
---|
| 20 | * $Id$ |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | #include "asm.h" |
---|
| 24 | |
---|
| 25 | BEGIN_CODE |
---|
| 26 | PUBLIC(start) |
---|
| 27 | SYM (start): |
---|
| 28 | ! install the stack pointer |
---|
| 29 | mov.l stack_k,r15 |
---|
| 30 | |
---|
| 31 | ! zero out bss |
---|
| 32 | mov.l edata_k,r0 |
---|
| 33 | mov.l end_k,r1 |
---|
| 34 | mov #0,r2 |
---|
| 35 | start_l: |
---|
| 36 | mov.l r2,@r0 |
---|
| 37 | add #4,r0 |
---|
| 38 | cmp/ge r0,r1 |
---|
| 39 | bt start_l |
---|
| 40 | |
---|
| 41 | ! copy the vector table from rom to ram |
---|
| 42 | mov.l vects_k,r7 ! vectab |
---|
| 43 | mov #0,r2 ! address of boot vector table |
---|
| 44 | mov #0,r3 | number of bytes copied |
---|
| 45 | mov.w vects_size,r6 ! size of entries in vectab |
---|
| 46 | 0: |
---|
| 47 | mov.l @r2+,r1 |
---|
| 48 | mov.l r1,@r7 |
---|
| 49 | add #4,r7 |
---|
| 50 | add #1,r3 |
---|
| 51 | cmp/hi r6,r3 |
---|
| 52 | bf 0b |
---|
| 53 | |
---|
| 54 | mov.l vects_k,r8 ! update vbr to point to vectab |
---|
| 55 | ldc r8,vbr |
---|
| 56 | |
---|
| 57 | ! call the mainline |
---|
| 58 | mov.l main_k,r0 |
---|
| 59 | jsr @r0 |
---|
| 60 | or r0,r0 |
---|
| 61 | |
---|
| 62 | ! call exit |
---|
| 63 | mov r0,r4 |
---|
| 64 | mov.l exit_k,r0 |
---|
| 65 | jsr @r0 |
---|
| 66 | or r0,r0 |
---|
| 67 | |
---|
| 68 | END_CODE |
---|
| 69 | |
---|
| 70 | .align 2 |
---|
| 71 | stack_k: |
---|
| 72 | .long _stack |
---|
| 73 | edata_k: |
---|
| 74 | .long _edata |
---|
| 75 | end_k: |
---|
| 76 | .long _end |
---|
| 77 | main_k: |
---|
| 78 | .long _main |
---|
| 79 | exit_k: |
---|
| 80 | .long _exit |
---|
| 81 | |
---|
| 82 | vects_k: |
---|
| 83 | .long _vectab |
---|
| 84 | vects_size: |
---|
| 85 | .word 255 |
---|
| 86 | |
---|
| 87 | #ifdef __ELF__ |
---|
| 88 | .section .stack,"aw" |
---|
| 89 | #else |
---|
| 90 | .section .stack |
---|
| 91 | #endif |
---|
| 92 | _stack: .long 0xdeaddead |
---|
Note: See
TracBrowser
for help on using the repository browser.