This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Is it possible to do this using GAS
- To: <binutils at sources dot redhat dot com>
- Subject: Is it possible to do this using GAS
- From: "Robert-Margaret Hunt"<robert-margaret_hunt at sil dot org>
- Date: Fri, 23 Mar 2001 22:00:00 -0500
Hi,
I am trying to use the binutils for an AVR (The person that made
the AVR port deserves ice cream). However I ran into a little
trouble as I couldn't find any way to combine parameters in a
macro without adding a space. If you look at the attached
example.s you will hopefully see what I mean.
Is there a way to do what I am wanting to do?
Since I am not on the binutils mailing list could you please CC
mail to me.
Thanks,
Jonathan Hunt
<jhuntnz@users.sourceforge.net>
.equ abcL, 16
.equ abcH, 17
; This works
ldi abcL, 0x0a
ldi abcH, 0x0a
.macro test1 regh, regl
ldi \regl, 0x0a
ldi \regh, 0x0a
.endm
; This works
test1 abcH, abcL
.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.
; Here is a few more examples of how I tried to do it
.macro test3 regpair
ldi \regpair&&L, 0x0a
ldi \regpair&&H, 0x0a
.endm
test3 abc
.macro test4 regpair
ldi \regpair\&L, 0x0a
ldi \regpair\&H, 0x0a
.endm
test4 abc