<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 06-Sep-17 08:19, Paul Koning wrote:<br>
    <blockquote type="cite"
      cite="mid:1E5485F9-8D26-42D5-8AA1-0618695A34A0@comcast.net">
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">On Sep 5, 2017, at 9:18 PM, Timothe Litt <a class="moz-txt-link-rfc2396E" href="mailto:litt@ieee.org"><litt@ieee.org></a> wrote:

It's a heavy lift & overkill, but GCC (gas) can be made to cross-compile for/from any reasonable machine.  That gives you a complete toolset - but it's a lot of work.
</pre>
      </blockquote>
      <pre wrap="">
The assembler (gas) is separate from the compiler (gcc and friends).  It's a prerequisite for a complete cross-package but you can certainly do a gas for some new architecture without bothering with the compiler.
</pre>
    </blockquote>
    gdb gives you a disassembler.<br>
    <blockquote type="cite"
      cite="mid:1E5485F9-8D26-42D5-8AA1-0618695A34A0@comcast.net">
      <pre wrap="">
The question is assembler syntax.  If the machine you're after has a standard syntax, then gas is unlikely to help since it uses Unix "as" style syntax.  For example, while you can assemble PDP11 programs with gas, they don't look like familiar Macro-11 programs and if you feed it Macro-11 sources it will complain bitterly.
</pre>
    </blockquote>
    Yes, but presumably this is a bootstrapping exercise - hopefully the
    native assembler can be found and used once the simulator runs.<br>
    <br>
    As noted, this isn't the approach I'd take, but tastes (and energy
    levels) vary.<br>
    <blockquote type="cite"
      cite="mid:1E5485F9-8D26-42D5-8AA1-0618695A34A0@comcast.net">
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">If it were my project, I'd define some macros in MACRO-11 to create a cross-assembler, as IIRC Whirlwind has 16 bit wordsize.  MACRO-11 has a reasonable set of operators and macro pseudo-ops.  Define the Whirlwind instructions as macros, and you're all set.  People have done this for early micros - it's not quite native and can be a bit awkward - but it works and can be put together with minimal effort.  

You can output absolute binary from the assembler - or link/task build if you want psects or libraries.  But with the small memory size, MACRO will do.

If you want 32-bit words, there's always MACRO-32 - pretty much the same macro capabilities.

For a host, you can use a simh PDP-11 or VAX - whatever you're comfortable with.
</pre>
      </blockquote>
      <pre wrap="">
Sure, those are good options.  Others mentioned Python to write one from scratch.  That is very easy.  I've written an Electrologica assembler in Python, which didn't take long, and a more limited assembler is probably just a week or two worth of work.

One complication for using Macro-11 is that Whirlwind is one-s complement, so negative numbers will be wrong.
</pre>
    </blockquote>
    That can be handled with a macro to convert 2's complement to 1's,
    including any end-around carry.<br>
    <br>
    <blockquote type="cite"
      cite="mid:1E5485F9-8D26-42D5-8AA1-0618695A34A0@comcast.net">
      <pre wrap="">
        paul


</pre>
    </blockquote>
    <br>
  </body>
</html>