ok, off topic, but if you've not written assembly language for the pdp-10
in MACRO-10 --- you haven't lived !  Example of awesomeness:  We built a
24-bit AMD2901 bit-slice machine with a simple instruction set for image
processing.  The custom assembly language code was assembled using macros
in MACRO-10.  Just another day in the neighborhood.
https://bitsavers.org/pdf/dec/pdp10/TOPS10_softwareNotebooks/vol13/AA-C780C-TB_Macro_Assembler_Reference_Manual_Apr78.pdf

Fortunately, you can get your own PDP-10 and catch up on the amazing tech
we have (almost) lost:  https://obsolescence.dev/pdp10.html

On Sun, Jul 27, 2025 at 2:22 PM Greg A. Woods <wo...@planix.ca> wrote:

> At Thu, 17 Jul 2025 01:02:21 +0530 (GMT+05:30), Mohan <manms...@gmail.com>
> wrote:
> Subject: unix assembly programming
> >
> > is it common to use m4 with gas? are there examples
> > i can learn from or just general resources for unix asm
> > programming?
>
> In my experience everyone doing assembly language programming in modern
> Unix and Unix-like environments seems to use the C preprocessor for
> anything macro-like.  It's a very poor solution, but it does the basic
> things cleanly enough and is terribly easy to integrate, and is
> generally portable enough.  It can be used to do a lot, e.g.:
>
>         https://github.com/WestfW/structured_gas
>
> I'd somehow never heard of "gasp", but then again I've never used the
> GNU assembler other than maybe once or twice to test if it could
> assemble something I wrote.  It looks useful.
>
> My favourite macro assembler was MACRO-11, for the PDP-11 (my favourite
> machine to write assembler for!).  There's a version of it available in
> ancient BSD archives, however it only knows PDP-11 op codes.  DEC may
> have had a version for VAX, but I only ever used PDP emulation on a VAX
> for assembler -- I don't think I ever wrote any native VAX assembler.  I
> didn't really ever do a lot with it's macro capabilities, but I really
> liked it overall.
>
> I would emphatically NOT use m4 as a macro processor for assembler.  I'm
> sure it would work, and would be able to do "interesting" things, but I
> think it's too general purpose and probably too finicky (too expressive)
> to be actually useful in the things one might want it to do when writing
> assembler.
>
> --
>                                         Greg A. Woods <gwo...@acm.org>
>
> Kelowna, BC     +1 250 762-7675           RoboHack <wo...@robohack.ca>
> Planix, Inc. <wo...@planix.com>     Avoncote Farms <wo...@avoncote.ca>
>

Reply via email to