source: trunk/Softwares/Test/Test_033/src/sys/crt0.s @ 102

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

Previous commit with new files :P

  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1/*
2 * Test_033
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.ori
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        l.movhi r1,     hi(_tty)
22        l.ori   r1, r1, lo(_tty)
23        l.sw    4(r1), r1 /* stop address */
24_infinite_loop :       
25        l.j     _infinite_loop
26        l.nop
27
28_end_ok :
29        l.movhi r1,     hi(_tty)
30        l.ori   r1, r1, lo(_tty)
31        l.sw    4(r1), r0 /* stop address */
32
33
34/* ---[ 0x100: RESET exception ]----------------------------------------- */
35        .org 0x100
36        .global _start
37_start:
38        /*
39             A (r1)     B (I)  - D (r3 wait)
40                                       (r4)     
41          1) 0x0f0f0f0f 0x00ff - 0x0f0f0fff 
42          1) 0x0f0f0f0f 0xff00 - 0x0f0fff0f 
43          */
44
45        /**********/
46        /* Test 1 */
47        /**********/
48        l.movhi r1,     hi(0x0f0f0f0f) /* RA */
49        l.ori   r1, r1, lo(0x0f0f0f0f)
50        l.movhi r3,     hi(0x0f0f0fff) /* RD wait */
51        l.ori   r3, r3, lo(0x0f0f0fff)
52       
53        l.ori   r4, r1, 0x00ff
54
55        /* Test result */
56        l.sfeq  r3, r4
57        l.bnf   _end_ko
58        l.nop
59
60        /**********/
61        /* Test 2 */
62        /**********/
63        l.movhi r1,     hi(0x0f0f0f0f) /* RA */
64        l.ori   r1, r1, lo(0x0f0f0f0f)
65        l.movhi r3,     hi(0x0f0fff0f) /* RD wait */
66        l.ori   r3, r3, lo(0x0f0fff0f)
67       
68        l.ori   r4, r1, 0xff00
69
70        /* Test result */
71        l.sfeq  r3, r4
72        l.bnf   _end_ko
73        l.nop
74       
75        /**********/
76        /* End */
77        /**********/
78
79        l.j     _end_ok
80        l.nop
Note: See TracBrowser for help on using the repository browser.