1 |
/* MIPS Hello World for GXemul */ |
/* |
2 |
|
* $Id: hello_mips.c,v 1.3 2005/08/09 18:29:20 debug Exp $ |
3 |
|
* |
4 |
|
* MIPS Hello World for GXemul. |
5 |
|
* |
6 |
|
* Compile: |
7 |
|
* mips64-unknown-elf-gcc -O2 hello_mips.c -mips4 -mabi=64 -c |
8 |
|
* |
9 |
|
* and link: |
10 |
|
* mips64-unknown-elf-ld -Ttext 0xa800000000030000 -e f |
11 |
|
* hello_mips.o -o hello_mips --oformat=elf64-bigmips |
12 |
|
* |
13 |
|
* Run: |
14 |
|
* gxemul -E testmips hello_mips |
15 |
|
*/ |
16 |
|
|
17 |
/* Note: The cast to a signed int causes the address to be sign-extended |
/* Note: The cast to a signed int causes the address to be sign-extended |
18 |
correctly to 0xffffffffb00000xx when compiled in 64-bit mode */ |
correctly to 0xffffffffb00000xx when compiled in 64-bit mode */ |
40 |
printstr("Hello world\n"); |
printstr("Hello world\n"); |
41 |
halt(); |
halt(); |
42 |
} |
} |
43 |
|
|