There are some excellent articles at IBM developerWorks dealing with this subject, and thanks to the first one in an introductory series to PPC64 I've been able to write the typical hello world program :-)
Without further ado, here is the code!
#You can build it with the following commands:
# The program's static data
#
.data
msg: .string "Hello, world!n"
length = . - msg
#
# Special section needed by the linker due to the C calling
# conventions in this platform.
#
.section ".opd", "aw" # aw = allocatable/writable
.global _start
_start:
.quad ._start, .TOC.@tocbase, 0
#
# The program's code
#
.text
._start:
li 0, 4 # write(2)
li 3, 1 # stdout file descriptor
lis 4, msg@highest # load 64-bit buffer address
ori 4, 4, msg@higher
rldicr 4, 4, 32, 31
oris 4, 4, msg@h
ori 4, 4, msg@l
li 5, length # buffer length
sc
li 0, 1 # _exit(2)
li 3, 0 # return success
sc
$ as -a64 -o hello.o hello.sI'm curious about as(1)'s -a option; its purpose is pretty obvious, but it is not documented anywhere in the manual page nor in the info files.
$ ld -melf64ppc -o hello hello.o
Anyway, back to coding! I guess I'll post more about this subject if I find interesting and/or non-obvious things that are not already documented clearly anywhere. But for beginner's stuff you already have the articles linked above.