blob: d6f7e68eced74fa3d38e3f7ce13315e8db4b8e6a [file] [log] [blame] [raw]
# To build with GNU assembler and AIX LD:
# as -a64 -m regnames -m ppc64 hello-powerpc64-aix.s -o hello-powerpc64-aix.o
# ld -b 64 -b noautoimp -b textro hello-powerpc64-aix.o -o hello-powerpc64-aix
.data
.global __start
__start:
.llong .__start
.text
helloworld:
.byte "Hello world"
.byte 10
sc:
crorc cr6, cr6, cr6
sc
# It will automatically be branched to the return address stored in lr, when the system call returns
.global .__start
.__start:
bl _start
_start:
li r5, 12
mflr r4
addi r4, r4, helloworld - .__start - 4
li r3, 1
li r2, 298
bl sc
li r3, 0
li r2, 50
bl sc