Re: Code error - why?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux