Xref: utzoo comp.sys.att:3510 unix-pc.general:837 Path: utzoo!utgpu!water!watmath!uunet!lll-winken!lll-lcc!ames!mailrus!purdue!decwrl!hplabs!hp-sdd!ucsdhub!jack!elgar!ford From: ford@elgar.UUCP (Mike "Ford" Ditto) Newsgroups: comp.sys.att,unix-pc.general Subject: Re: /bin/as Summary: REL-REL requires swbeg Keywords: unixpc sgs assembler Message-ID: <185@elgar.UUCP> Date: 17 Jun 88 04:18:20 GMT References: <1018@umbc3.UMD.EDU> Reply-To: ford@kenobi.cts.com (Mike "Ford" Ditto) Organization: Omnicron Data Systems, Bonita, CA Lines: 49 In article <1018@umbc3.UMD.EDU> alex@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@kenobi.cts.com This was a Pizza Hut, ...!sdcsvax!crash!kenobi!ford now it's all covered with daisies." -- Talking Heads