> On Sep 5, 2017, at 9:18 PM, Timothe Litt <l...@ieee.org> 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.

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.

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.

> 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.

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.

        paul


_______________________________________________
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to