4
Contributors
3
Replies
4
Views
4 Years
Discussion Span
Last Post by Fix_It
Featured Replies
  • 1

    You're aware that this is the very first program anyone learning assembly will have to write, and it's **ALWAYS** provided in toto by the teaching resource (ie. book, website, or course notes), right? So either you're lazy to the point that shocks even me, or you need to ask a … Read More

1

You're aware that this is the very first program anyone learning assembly will have to write, and it's ALWAYS provided in toto by the teaching resource (ie. book, website, or course notes), right?

So either you're lazy to the point that shocks even me, or you need to ask a more specific question.

0
     .global helloWorld
     .section ".data"

str: asciz "hello world!"

     .section ".text"

helloWorld:

     save %sp, -96, %sp

     set str, %o0

     call printf, 1
     nop

     ret
     restore

Edited by deceptikon: Fixed code block

0

Which assembler and compiler do you use and do you want a 16 program or 32 bit?

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.