From: Justin Carlson <justin@cs.cmu.edu>
To: "Bradley D. LaRonde" <brad@ltc.com>
Cc: Balakrishnan Ananthanarayanan <balakris_ananth@email.com>,
linux-mips@oss.sgi.com
Subject: Re: Code error - why?
Date: 18 Jun 2002 09:14:09 -0700 [thread overview]
Message-ID: <1024416849.1182.10.camel@xyzzy.rlson.org> (raw)
In-Reply-To: <00bd01c21618$4e714ef0$4c00a8c0@prefect>
After preprocessing, the assembler needs to see $<number> as
register specifiers, so typically your choices are to do either:
#define a0 $4 // See include/asm-mips/regdef.h for these
#define v0 $2
...
la a0, quest
li v0, 4
Or to just use the register numbers, e.g.
la $4, quest
li $2, 4
-Justin
> ----- Original Message -----
> From: "Balakrishnan Ananthanarayanan" <balakris_ananth@email.com>
> To: <linux-mips@oss.sgi.com>; <linux-kernel@vger.kernel.org>;
> <redhat-list@redhat.com>
> Sent: Monday, June 17, 2002 5:48 AM
> Subject: Code error - why?
>
>
> > I wrote a SAMPLE CODE - Hello.S to work for a cross-assembler
> mips-linux-as - but this is giving me an error message:
> > ".data
> > quest: .asciiz "Hello World!"
> > .text
> > _start:
> > la $a0, quest
> > li $v0, 4
> > syscall "
> >
> > The error messages are:
> > " Hello.S line 5: illegal operands 'la'
> > Hello.S line 6: illegal operands 'li'"
> >
> > Can anyone help? What is wrong?
next prev parent reply other threads:[~2002-06-18 22:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-17 9:48 Code error - why? Balakrishnan Ananthanarayanan
2002-06-17 16:01 ` Bradley D. LaRonde
2002-06-17 16:01 ` Bradley D. LaRonde
2002-06-18 16:14 ` Justin Carlson [this message]
2002-06-19 16:18 ` Maciej W. Rozycki
2002-06-17 16:29 ` Justin Wojdacki
2002-06-17 16:55 ` Thiemo Seufer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1024416849.1182.10.camel@xyzzy.rlson.org \
--to=justin@cs.cmu.edu \
--cc=balakris_ananth@email.com \
--cc=brad@ltc.com \
--cc=linux-mips@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox