SPARC Assembly Language Reference Manual

Exit Print View

Updated: July 2014
 
 

3.5.4 Example 4: “Hello World”

The pseudo-ops shown in this example are .section, .ascii, and .align. The example calls the printf function to output the string "hello world".

	.section			".data1"
	.align		4
.L16:
	.ascii   "hello world\n\0"

	.section  ".text"
	.global  main
main:
	save  %sp,-96,%sp
	set  .L16,%o0
	call  printf,1
	nop
	restore