RosettaCodeData/Task/Hello-world-Text/SPARC-Assembly/hello-world-text.sparc

17 lines
283 B
Text
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
.section ".text"
.global _start
_start:
mov 4,%g1 ! 4 is SYS_write
mov 1,%o0 ! 1 is stdout
set .msg,%o1 ! pointer to buffer
mov (.msgend-.msg),%o2 ! length
ta 8
mov 1,%g1 ! 1 is SYS_exit
clr %o0 ! return status is 0
ta 8
.msg:
2015-11-18 06:14:39 +00:00
.ascii "Hello world!\n"
2015-02-20 00:35:01 -05:00
.msgend: