source: trunk/Softwares/Test/Test_021/src/sys/crt0.s @ 100

Last change on this file since 100 was 100, checked in by rosiere, 15 years ago

1) Bug fix (Operation, Instruction)
2) Modif Return Address Stack
3) Add Soft Test
4) Add Soc Test

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1/*
2 * Test_021
3 *
4 * end_ko : infinite_loop
5 * end_ok : Write in R1 the stop address and stop an data
6 *          The store in the destination of an jump
7 * start  : Test l.j
8 */
9       
10        .file   "crt0.s"
11        /*
12        .section .vector
13        */
14        .section .text
15        .align  4       
16
17/* ---[ 0x0  : Print a error ]------------------------------------------- */
18
19        .org 0x0
20_end_ko        :       
21_infinite_loop :       
22        l.j     _infinite_loop
23        l.nop
24
25_end_ok :
26        l.movhi r1,     hi(_tty)
27        l.ori   r1, r1, lo(_tty)
28        l.sw    4(r1), r1 /* stop address */
29
30
31/* ---[ 0x100: RESET exception ]----------------------------------------- */
32        .org 0x100
33        .global _start
34_start:
35        l.and r1, r0, r0 /* counter 1 */
36        l.ori r2, r0, 10 /* limit */
37       
38
39_go0    :
40        l.j     _go1
41        l.nop
42        l.j     _end_ko
43        l.nop
44
45_go2    :       
46        l.j     _go3
47        l.nop
48        l.j     _end_ko
49        l.nop
50
51_go1    :
52        l.j     _go2
53        l.nop
54        l.j     _end_ko
55        l.nop
56
57_go3    :
58        l.j     _go4
59        l.nop
60        l.j     _end_ko
61        l.nop
62       
63_go4    :
64        l.addi  r1, r1, 1
65        l.sfeq  r1, r2
66        l.bf    _end_ok
67        l.nop
68        l.j     _go0
69        l.nop
70        l.j     _end_ko
71        l.nop
Note: See TracBrowser for help on using the repository browser.