[Simh] retargetable assembler

khandy21yo khandy21yo at gmail.com
Wed Sep 6 09:21:35 EDT 2017


Reading the Wikipedia page about Whirlwind, it mentions that the pdp1 is a direct descendent, so would a pdp1 assembler work? Or a tx0 Assembler? I don't know if these already exist or not.
Is the pdp1 a transistorized Whirlwind as the Wikipedia article suggests? We already have an emulator for that.
Anyway, I remember reading about the tx0, and that they were always modifying the instruction set in hardware. For this early machine, was there even an official assembler Format? And which character sets did it use, probably not ascii.


Sent from my Galaxy Tab® A
-------- Original message --------From: Paul Koning <paulkoning at comcast.net> Date: 9/6/17  6:19 AM  (GMT-07:00) To: Timothe Litt <litt at ieee.org> Cc: simh at trailing-edge.com Subject: Re: [Simh] retargetable assembler 

> On Sep 5, 2017, at 9:18 PM, Timothe Litt <litt at 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 at trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20170906/dc3bdff9/attachment-0001.html>


More information about the Simh mailing list