File: it001.u

package info (click to toggle)
alliance 5.0-20120515-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 70,180 kB
  • sloc: ansic: 350,295; vhdl: 34,227; yacc: 27,122; sh: 12,416; cpp: 9,478; makefile: 7,055; lex: 3,684
file content (56 lines) | stat: -rw-r--r-- 1,271 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
;  ###----------------------------------------------------------------###
;  # file	: it001.u						#
;  # date	: Mar 26 1996						#
;  # descr.	: functional test for mips				#
;  ###----------------------------------------------------------------###

	;  ###--------------------------------------------------------###
	;  #   decrementation loop (with a hardware interrupt)		#
	;  ###--------------------------------------------------------###

timer_0		.equ	0x40000100
timer_1		.equ	0x40000104
timer_2		.equ	0x40000108
timer_3		.equ	0x4000010C
timer_4		.equ	0x40000110
timer_5		.equ	0x40000114
timer_rst	.equ	0x40000118
timer_sts	.equ	0x4000011C

value		.equ	0x0008
v_sts		.equ    0x0002

		.org	0x00400000
		.start	init

init:
                loadi   r31, back_from_int
		loadi	r1 , timer_1
		addiu	r2 , r0 , value
		sw      r2, 0(r1)
		loadi	r1 , timer_sts
		addiu	r2 , r0 , v_sts
		sw      r2, 0(r1)

                addiu   r10, r0 , 0x0001
		lui	r20, 0xffff
		addiu	r16, r0, 0xfffb
		or	r20, r20, r16
loop:	
                addu    r20,r10,r20
        	bne	r20,r10,  loop
                nop
        	j	bad
		nop

back_from_int:
		j	good
		nop

		.org	0x004000d0
good:		j	good
		nop
bad:		j	bad
		nop
		.end