/[gxemul]/trunk/doc/hello_mips.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/doc/hello_mips.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2 by dpavlin, Mon Oct 8 16:17:48 2007 UTC revision 12 by dpavlin, Mon Oct 8 16:18:38 2007 UTC
# Line 1  Line 1 
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  */
# Line 26  void f(void) Line 40  void f(void)
40          printstr("Hello world\n");          printstr("Hello world\n");
41          halt();          halt();
42  }  }
43    

Legend:
Removed from v.2  
changed lines
  Added in v.12

  ViewVC Help
Powered by ViewVC 1.1.26