[Simh] Fwd: retargetable assembler

Timothe Litt litt at ieee.org
Tue Sep 5 21:18:30 EDT 2017


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.

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.

Disassemblers - it's pretty easy to write a trivial one.  It gets
complicated if you want to tease out subroutines, create a symbol table
& data.  But with only 2KW - a simple dump (e.g. address + octal +
instruction decode  + text decode in fixed columns) probably suffices. 
An editor (like emacs) that will do rectangular cut and paste is likely
less trouble than creating a fancy disassembler.  (Again, due to the
small memory and word size.)

You can invest arbitrary amounts of time to create better tools;
worthwhile for larger machines, but I would go for 'good enough' for
something as small and simple as Whirlwind...

On 05-Sep-17 20:54, Bob Supnik wrote:
> Guy is looking to build a Whirlwind simulator, eventually.
>
> I don't know of any assemblers like that. All the cross-assemblers
> I've seen are purpose built, nowadays mostly in Python.
>
>
> -------- Forwarded Message --------
> Subject:     retargetable assembler
> Date:     Fri, 1 Sep 2017 10:38:08 -0400
> From:     Guy Fedorkow <guy.fedorkow at gmail.com>
> To:     Bob Supnik <bob at supnik.org>
>
>
>
> hi Bob,
>   I'm continuing to explore the Whirlwind world, one tiny step at a time.
>   I thought I'd look around for retargetable cross-assemblers and
> disassemblers that might work with the machine's instruction set...
> this must come up in the simh world...  do you have a favorite package?
>
>   Thanks
> /guy fedorkow
>
>
> _______________________________________________
> 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/20170905/4251636a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4577 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20170905/4251636a/attachment.bin>


More information about the Simh mailing list