This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re[2]: Is it possible to do this using GAS
- To: <binutils at sources dot redhat dot com>
- Subject: Re[2]: Is it possible to do this using GAS
- From: "Robert-Margaret Hunt"<robert-margaret_hunt at sil dot org>
- Date: Sat, 24 Mar 2001 13:14:00 -0500
Hi,
Thanks so much. I can't wait to start assembling my AVR programs.
Thanks you all you GNUs.
But I have one more question. Is there a version of binutils for
an 8051. I looked for one using google and I found emails
archives mentioning an 8051 version of GAS but I couldn't find
one anywhere.
Thanks,
Jonathan Hunt
<jhuntnz@users.sourceforge.net>
______________________________ Reply Separator _________________________________
Subject: Re: Is it possible to do this using GAS
Author: <nickc@redhat.com> at Internet
Date: 3/23/2001 2:42 PM
Hi Robert-Margaret,
> .macro test2 regpair
>
> ldi \regpairL, 0x0a
> ldi \regpairH, 0x0a
> .endm
>
> ; This doesn't work
> test2 abc
> ; I can't find a way to combine a parameter
> ; without adding whitespace
> ; ie I want \regpairL to end up as
> ; abcL which would be equated to 16.
You need to use nested macros, like this:
.macro test-sub regpair letter1 letter2
ldi \regpair\letter1, 0x0a
ldi \regpair\letter2, 0x0a
.endm
.macro test2 regpair
test-sub \regpair L H
.endm
test2 abc
Cheers
Nick