OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [sys/] [h8300hms/] [crt0.S] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
; h8/300 and h8/300h start up file.
2
 
3
#ifdef __H8300__
4
 
5
        .section .text
6
        .global _start
7
_start:
8
        mov.w   #_stack,sp
9
        mov.w   #_edata,r0
10
        mov.w   #_end,r1
11
        mov.w   #0,r2
12
.loop:  mov.w   r2,@r0
13
        adds    #2,r0
14
        cmp     r1,r0
15
        blo     .loop
16
        jsr     @___main
17
        jsr     @_main
18
        jsr     @_exit
19
 
20
        .section .stack
21
_stack: .word   1
22
 
23
#endif
24
 
25
#ifdef __H8300H__
26
 
27
        .h8300h
28
        .section .text
29
        .global _start
30
_start:
31
        mov.l   #_stack,sp
32
        mov.l   #_edata,er0
33
        mov.l   #_end,er1
34
        mov.w   #0,r2           ; not sure about alignment requirements
35
.loop:  mov.w   r2,@er0         ; playing it safe for now
36
        adds    #2,er0
37
        cmp.l   er1,er0
38
        blo     .loop
39
        jsr     @___main
40
        jsr     @_main
41
        jsr     @_exit
42
 
43
        .section .stack
44
_stack: .long   1
45
 
46
#endif
47
 
48
#ifdef __H8300S__
49
 
50
        .h8300s
51
        .section .text
52
        .global _start
53
_start:
54
        mov.l   #_stack,sp
55
        mov.l   #_edata,er0
56
        mov.l   #_end,er1
57
        mov.w   #0,r2           ; not sure about alignment requirements
58
.loop:  mov.w   r2,@er0         ; playing it safe for now
59
        adds    #2,er0
60
        cmp.l   er1,er0
61
        blo     .loop
62
        jsr     @___main
63
        jsr     @_main
64
        jsr     @_exit
65
 
66
        .section .stack
67
_stack: .long   1
68
 
69
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.