1 #
2 # Makefile for Hello World on Linux/ARM 920T platform
3 #
4 all:
5 arm-linux-as hello.s -o hello.o
6 arm-linux-ld hello.o -o hello
7
8 clean:
9 rm -rf hello hello.o
1
2 .text
3 .global _start
4 _start:
5
6 mov r0, #1
7 adr r1, msg
8 mov r2, #14
9 swi 0x00900004
10
11 mov r0, #0
12 swi 0x00900001
13
14 msg: .asciz "Hello World\n"
Result...
$ uname -a
Linux ARM 2.6.11.1armzone_linux2.6 #6 Fri Dec 12 12:12:23 CST 2008 armv4tl unknown
$ ./hello
$
Hello World
$
Of Linux on ARM 920T CPU...
In the example of the WRITE() system call
ssize_t write (int __fd, __const void *__buf, size_t __n);
No comments:
Post a Comment