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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [stdalone/] [hello2/] [start.s] - Blame information for rev 67

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

Line No. Rev Author Line
1 18 hellwig
;
2
; start.s -- startup code
3
;
4
 
5
        .import main
6
        .import _ecode
7
        .import _edata
8
        .import _ebss
9
 
10
        .export _bcode
11
        .export _bdata
12
        .export _bbss
13
 
14
        .code
15
_bcode:
16
 
17
        .data
18
_bdata:
19
 
20
        .bss
21
_bbss:
22
 
23
        .code
24
 
25
        ; reset arrives here
26
reset:
27
        j       start
28
 
29
        ; interrupts arrive here
30
intrpt:
31
        j       intrpt
32
 
33
        ; user TLB misses arrive here
34
userMiss:
35
        j       userMiss
36
 
37
start:
38
        mvfs    $8,0
39
        or      $8,$8,1 << 27   ; let vector point to RAM
40
        mvts    $8,0
41
        add     $29,$0,stack     ; set sp
42
        add     $10,$0,_bdata    ; copy data segment
43
        add     $8,$0,_edata
44
        sub     $9,$8,$10
45
        add     $9,$9,_ecode
46
        j       cpytest
47
cpyloop:
48
        ldw     $11,$9,0
49
        stw     $11,$8,0
50
cpytest:
51
        sub     $8,$8,4
52
        sub     $9,$9,4
53
        bgeu    $8,$10,cpyloop
54
        add     $8,$0,_bbss      ; clear bss
55
        add     $9,$0,_ebss
56
        j       clrtest
57
clrloop:
58
        stw     $0,$8,0
59
        add     $8,$8,4
60
clrtest:
61
        bltu    $8,$9,clrloop
62
        jal     main            ; call 'main'
63
start1:
64
        j       start1          ; loop
65
 
66
        .bss
67
 
68
        .align  4
69
        .space  0x800
70
stack:

powered by: WebSVN 2.1.0

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