[Simh] PDP-11 GCC cross-assembler... possible bug... or is just me?

Larry Baker baker at usgs.gov
Tue Aug 21 20:48:11 EDT 2012


On 17 Aug 2012, at 9:00 AM, simh-request at trailing-edge.com wrote:

> Well, using the DEC notation for PDP-11 assembler language, @(R0) and 
> (R0) are indeed two different things, and you seem to have understood it 
> perfectly right.
> Not sure if gas might have its own ideas about notation though...


See the NOTE at the bottom of page 5-5 in Section 5.8, INDEX DEFERRED MODE, in the PDP-11 MACRO-11 Language Reference Manual on the BitSavers web site (http://www.bitsavers.org/pdf/dec/pdp11/rsx11/RSX11M_V4.1_Apr83/4_ProgramDevelopment/AA-V027A-TC_macro11_Mar83.pdf):

   The expression @(ER) may be used, but it
   will be assembled as if it were written
   @0(ER), and a word will be used to store
   the 0.

GAS has got it wrong.  There really is no addressing mode of the form @(ER).  GAS should either follow MACRO-11 and convert @(ER) to @0(ER), or it should give an error.  It should not convert @(ER) to @ER, which is equivalent to (ER).  That is, it should not be silently eliminating the @ deferred address operator from the operand.

Larry Baker
US Geological Survey
650-329-5608
baker at usgs.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20120821/d9841718/attachment.html>


More information about the Simh mailing list