source: trunk/Softwares/Test/Test_022/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.6 KB
Line 
1/*
2 * Test_022
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.jal
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        l.j     _go0
38        l.nop
39        l.j     _end_ko
40        l.nop
41       
42        .org 0x120
43_go0    :
44        l.nop
45        l.nop
46        l.jal   _go1
47        l.sfeqi r9, 0x130
48        l.j     _end_ko
49        l.nop
50
51        .org 0x140
52_go2    :
53        l.bnf   _end_ko
54        l.nop
55        l.jal   _go3
56        l.sfeqi r9, 0x150
57        l.j     _end_ko
58        l.nop
59
60        .org 0x160
61_go1    :
62        l.bnf   _end_ko
63        l.nop
64        l.jal   _go2
65        l.sfeqi r9,0x170
66        l.j     _end_ko
67        l.nop
68
69        .org 0x180
70_go3    :
71        l.bnf   _end_ko
72        l.nop
73        l.jal   _go4
74        l.sfeqi r9,0x190
75        l.j     _end_ko
76        l.nop
77       
78        .org 0x200
79_go4    :
80        l.bnf   _end_ko
81        l.nop
82        l.addi  r1, r1, 1
83        l.sfeq  r1, r2
84        l.bf    _end_ok
85        l.nop
86        l.j     _go0
87        l.nop
88        l.j     _end_ko
89        l.nop
Note: See TracBrowser for help on using the repository browser.