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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [hwtests/] [irqtest/] [irqtest.s] - Blame information for rev 27

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

Line No. Rev Author Line
1 14 hellwig
;
2
; irqtest.s -- test interrupts
3
;
4
 
5
        .set    stacktop,0xC0001000
6
        .set    tmr_base,0xF0000000
7
        .set    io_base,0xF0300000
8
 
9
reset:
10
        j       start
11
 
12
interrupt:
13
        j       tmrisr
14
 
15
userMiss:
16
        j       userMiss
17
 
18
start:
19
        add     $29,$0,stacktop
20
        add     $8,$0,tmr_base
21
        add     $9,$0,1000
22
        stw     $9,$8,4
23
        add     $9,$0,0x02
24
        stw     $9,$8,0
25
        add     $9,$0,0x00804000
26
        mvts    $9,0
27
        add     $7,$0,'a'-10
28
loop:
29
        j       loop
30
 
31
tmrisr:
32
        add     $7,$7,1
33
        add     $9,$0,'z'+1
34
        bne     $7,$9,noinit
35
        add     $7,$0,'a'
36
noinit:
37
        add     $4,$7,$0
38
        jal     out
39
        add     $8,$0,tmr_base
40
        add     $9,$0,0x02
41
        stw     $9,$8,0
42
        add     $4,$0,' '
43
        jal     out
44
        add     $4,$0,' '
45
        jal     out
46
        mvfs    $5,0
47
        add     $6,$0,'S'
48
        jal     show
49
        add     $4,$0,' '
50
        jal     out
51
        add     $4,$0,' '
52
        jal     out
53
        add     $5,$30,$0
54
        add     $6,$0,'R'
55
        jal     show
56
        add     $4,$0,0x0D
57
        jal     out
58
        add     $4,$0,0x0A
59
        jal     out
60
        rfx
61
 
62
show:
63
        sub     $29,$29,4
64
        stw     $31,$29,0
65
        add     $4,$6,$0
66
        jal     out
67
        add     $4,$0,' '
68
        jal     out
69
        add     $16,$0,32
70
digit:
71
        and     $17,$5,0x80000000
72
        bne     $17,$0,one
73
zero:
74
        add     $4,$0,'0'
75
        jal     out
76
        j       next
77
one:
78
        add     $4,$0,'1'
79
        jal     out
80
next:
81
        sll     $5,$5,1
82
        sub     $16,$16,1
83
        bne     $16,$0,digit
84
        ldw     $31,$29,0
85
        add     $29,$29,4
86
        jr      $31
87
 
88
out:
89
        add     $8,$0,io_base
90
out1:
91
        ldw     $9,$8,8
92
        and     $9,$9,1
93
        beq     $9,$0,out1
94
        stw     $4,$8,12
95
        jr      $31

powered by: WebSVN 2.1.0

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