Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Roman Mashak" <mrv@tusur.ru>
To: <linux-mips@linux-mips.org>
Subject: simple assembler program
Date: Wed, 21 Jul 2004 14:17:14 +0900	[thread overview]
Message-ID: <002701c46ee1$feeb7fc0$cc20bdd3@roman> (raw)

Hello!

    I tried to compile simple assembler program:

#define a 1
#define b 2

.ent main
.global main
main:
        li $3, a
        li $2, b
        addu $4, $2, $3
.end main

I use SDE-lite kit version 5.03.06 and compile with sde-as:
#sde-as test.S -o testtest.S: Assembler messages:
test.S:9: Error: absolute expression required `li'
test.S:10: Error: absolute expression required `li'

When I eliminate #define and use just 'li $3, 1' and so on - everything is
compiled correctly. Where is my problem?

Thanks in advance!

With best regards, Roman Mashak.  E-mail: mrv@tusur.ru

WARNING: multiple messages have this Message-ID (diff)
From: "Roman Mashak" <mrv@tusur.ru>
To: linux-mips@linux-mips.org
Subject: simple assembler program
Date: Wed, 21 Jul 2004 14:17:14 +0900	[thread overview]
Message-ID: <002701c46ee1$feeb7fc0$cc20bdd3@roman> (raw)
Message-ID: <20040721051714.uIZTH4gr8b2KiMoT0wKfl1q1oq5Yz82qetv1pvTniBc@z> (raw)

Hello!

    I tried to compile simple assembler program:

#define a 1
#define b 2

.ent main
.global main
main:
        li $3, a
        li $2, b
        addu $4, $2, $3
.end main

I use SDE-lite kit version 5.03.06 and compile with sde-as:
#sde-as test.S -o testtest.S: Assembler messages:
test.S:9: Error: absolute expression required `li'
test.S:10: Error: absolute expression required `li'

When I eliminate #define and use just 'li $3, 1' and so on - everything is
compiled correctly. Where is my problem?

Thanks in advance!

With best regards, Roman Mashak.  E-mail: mrv@tusur.ru

             reply	other threads:[~2004-07-21  5:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-21  5:17 Roman Mashak [this message]
2004-07-21  5:17 ` simple assembler program Roman Mashak
2004-07-21  6:56 ` Jan-Benedict Glaw
2004-07-21 13:44   ` Maciej W. Rozycki

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='002701c46ee1$feeb7fc0$cc20bdd3@roman' \
    --to=mrv@tusur.ru \
    --cc=linux-mips@linux-mips.org \
    /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