linux-mips
[Top] [All Lists]

Re: Code error - why?

To: Balakrishnan Ananthanarayanan <balakris_ananth@email.com>
Subject: Re: Code error - why?
From: Justin Wojdacki <justin.wojdacki@analog.com>
Date: Mon, 17 Jun 2002 09:29:15 -0700
Cc: linux-mips@oss.sgi.com
Organization: Analog Devices, Communications Processors Group
References: <20020617094851.30730.qmail@email.com>
Reply-to: justin.wojdacki@analog.com
Sender: owner-linux-mips@oss.sgi.com
Balakrishnan Ananthanarayanan wrote:
> 
> 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?
> 

$a0 and $v0 are what's probably giving you grief. Are you relying on
the assembler to know these symbols or are you including a file that
defines them. 

Just to be sure, try replacing $a0 with $4 and $v0 with $2 and see if
the code builds.

-- 
-------------------------------------------------
Justin Wojdacki        
justin.wojdacki@analog.com         (408) 350-5032
Communications Processors Group -- Analog Devices

<Prev in Thread] Current Thread [Next in Thread>