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

Subversion Repositories plasma

[/] [plasma/] [trunk/] [tools/] [boot.asm] - Blame information for rev 20

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

Line No. Rev Author Line
1 20 rhoads
##################################################################
2
# TITLE: Boot Up Code
3
# AUTHOR: Steve Rhoads (rhoadss@yahoo.com)
4
# DATE CREATED: 1/12/02
5
# FILENAME: boot.asm
6
# PROJECT: MIPS CPU core
7
# COPYRIGHT: Software placed into the public domain by the author.
8
#    Software 'as is' without warranty.  Author liable for nothing.
9
# DESCRIPTION:
10
#    Initializes the stack pointer and jumps to main2().
11
##################################################################
12
        .text
13
        .align  2
14
        .globl  entry
15
        .ent    entry
16
entry:
17
   .set noreorder
18
 
19
   ori   $sp,$0,0x8000     #initialize stack pointer
20
   ori   $4,$0,1
21
   mtc0  $4,$12            #STATUS=1; enable interrupts
22
        jal     main2
23
   nop
24
$L1:
25
   j $L1
26
   nop
27
   nop
28
 
29
isr_storage:        #address 0x20
30
   nop
31
   nop
32
   nop
33
   nop
34
 
35
   #address 0x30
36
interrupt_service_routine:
37
   sw $4,-4($sp)
38
 
39
   sw $5,-8($sp)
40
   ori $5,$0,0xffff
41
   ori $4,$0,46
42
   sb $4,0($5)      #echo out '.'
43
   lw $5,-8($sp)
44
 
45
   #normally clear the interrupt source here
46
   #re-enable interrupts
47
   ori $4,$0,0x1
48
   mtc0 $4,$12      #STATUS=1; enable interrupts
49
 
50
   #FIXME there is a small race condition here!
51
 
52
   mfc0 $4,$14      #C0_EPC=14
53
   j $4
54
   lw $4,-4($sp)
55
 
56
   .set reorder
57
        .end    entry
58
 

powered by: WebSVN 2.1.0

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