/bin/as
Mike "Ford" Ditto
ford at elgar.UUCP
Fri Jun 17 14:18:20 AEST 1988
In article <1018 at umbc3.UMD.EDU> alex at umbc3.UMD.EDU (Alex S. Crain) writes:
>
> ARRRGGGGGG! Has anyone ever managed to get the %!*$# assembler to
>take rel-rel expressions? Ie: some thing like
>
> mov.w L2-L1(%pc,%d0.w),%d0
Although the manual does that they can be used ("with caution"),
trying to use them quickly shows that this is not true. There is one
way to make them work (and even with no "caution" required): use the
swbeg statement. This is an incredibly bogus "feature" of the
assembler, which is used like so:
L1:
swbeg &3 # the 3 is the number of rel-rel short's which follow
short L2-L1
short L3-L1
short L4-L1
L2:
mov.l &42,%d0
bra L5
L3:
mov.l &99,%d0
bra L5
L4:
etc...
Obviously, this is only helpful if you want to store the rel-rel
expressions in a table.
That is what is output by the SGS C compiler, and the assembler takes
it just fine. I couldn't make GNU CC output the swbeg statement, so
I just had it never generate switch tables until I figure out a way
around it.
>or
>
> set arf,.+1 # or ~+1, or any other syntax that you like
> ^^^
~ is the proper symbol for location counter, and I have used it
successfully, although not in a "set" directive.
-=] Ford [=-
"Once there were parking lots, (In Real Life: Mike Ditto)
now it's a peaceful oasis. ford at kenobi.cts.com
This was a Pizza Hut, ...!sdcsvax!crash!kenobi!ford
now it's all covered with daisies." -- Talking Heads
More information about the Unix-pc.general
mailing list