From: Paul Winalski <paul.winalski@gmail.com>
To: Aron Insinga <aki@insinga.com>
Cc: coff@tuhs.org
Subject: [COFF] Re: machine code translation,as mental architecture models
Date: Sun, 14 Jul 2024 11:55:19 -0400 [thread overview]
Message-ID: <CABH=_VQvmSyYh8yrVD+3yh3dHyo+Lcn+rU4mCfzACa9StztxdQ@mail.gmail.com> (raw)
In-Reply-To: <3e5e6a68-e557-4b03-96ea-949f4404c517@insinga.com>
[-- Attachment #1.1: Type: text/plain, Size: 2248 bytes --]
On Sat, Jul 13, 2024 at 5:20 PM Aron Insinga <aki@insinga.com> wrote:
> On 7/13/24 13:36, Paul Winalski wrote:
>
> Neither the VAX assembler nor the VAX MACRO compiler treats macros as
> high-level entities. I know of no assembler that would do such a thing.
>
> -Paul W.
>
>
>
> This morning I would have agreed with you but I think I found a
> counter-example. At MIT, there were 2 assemblers written for the TX-0 and
> later ported and retargeted to the PDP-1: MACRO (which DEC adopted) and
> then Midas (which MIT stayed with for the PDP-6 and PDP-10).
>
> The MIDAS assembler manual says that it copies characters from the macro
> body into the source program (as we would expect to happen today for a
> macro, as opposed to an inline procedure):
> http://www.bitsavers.org/pdf/mit/rle_pdp1/memos/PDP-1_MIDAS.pdf
> p 10 in the document says:
>
> When a macro instruction is called, MIDAS reads out the characters which
> form the macro-instruction definition, substitutes the characters of the
> arguments for the dummy arguments, and inserts the resulting characters
> into the source program as if typed there originally.
>
> However, the DEC PDP-1 MACRO assembler manual says that a macro call is
> expanded by copying the *sequence of 'storage words' and advancing the
> current location (.) for each word copied* (although it does replace labels
> with memory addresses):
> https://bitsavers.org/pdf/dec/pdp1/PDP-1_Macro.pdf
> p 19 in the document says:
>
>
> Those two quotes from the documentation are saying the same thing. The
MACRO quote says the process is this:
1. Evaluate the expressions in the argument list of the macro.
2. Substitute these values for the dummy symbols in the macro.
3. Process the resulting text exactly the same way as non-macro input to
the assembler.
4. Place the resulting binary machine words into the object file.
Steps (1) and (2) match what the Midas text says. Steps (3) and (4) are
conventional processing of assembler input.
There is nothing unusual here. MACRO is decidedly NOT treating the macro
calls as higher-level entities. It is doing simple text substitution and
then treating it as it would any other input.
-Paul W.
[-- Attachment #1.2: Type: text/html, Size: 3333 bytes --]
[-- Attachment #2: kLOsHOzErbke14PV.png --]
[-- Type: image/png, Size: 29927 bytes --]
next prev parent reply other threads:[~2024-07-14 15:55 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-13 11:09 Douglas McIlroy
2024-07-13 17:36 ` Paul Winalski
2024-07-13 21:05 ` Aron Insinga
2024-07-14 15:55 ` Paul Winalski [this message]
2024-07-14 17:29 ` G. Branden Robinson
-- strict thread matches above, loose matches on Subject: below --
2024-07-13 22:00 Douglas McIlroy
2024-07-13 23:46 ` John Levine
2024-07-14 0:54 ` Dan Cross
2024-07-14 1:04 ` Aron Insinga
2024-07-14 0:56 ` Aron Insinga
[not found] <20240710203422.284BA18C077@mercury.lcs.mit.edu>
[not found] ` <20240710212641.E24548F5C32C@ary.qy>
2024-07-11 1:29 ` [COFF] Re: [TUHS] " Dan Cross
[not found] ` <18977302-8934-ec96-9154-b3c53824e506@taugh.com>
2024-07-11 2:05 ` Dan Cross
2024-07-11 16:50 ` Paul Winalski
2024-07-12 16:23 ` John R Levine
2024-07-12 16:51 ` [COFF] " Paul Winalski
2024-07-12 17:02 ` John R Levine
2024-07-12 20:52 ` Dave Horsfall
2024-07-12 22:03 ` John Levine
2024-07-13 0:25 ` Aron Insinga
2024-07-13 0:27 ` Dave Horsfall
2024-07-13 1:19 ` Paul Winalski
[not found] ` <CABH=_VS8z6ayJSQab0u5Cxw--hM8px8-eFGjeFCKTXxe <alpine.BSF.2.21.9999.2407131018370.6233@aneurin.horsfall.org>
2024-07-13 2:25 ` John Levine
2024-07-13 9:57 ` [COFF] Re: machine code translation, as " Ralph Corderoy
2024-07-13 14:25 ` Dan Cross
2024-07-13 17:27 ` Aron Insinga
2024-07-12 17:03 ` [COFF] Re: machine code translation,as " Stuff Received
2024-07-12 18:01 ` Paul Winalski
2024-07-12 20:35 ` John Levine
2024-07-13 9:26 ` [COFF] Re: machine code translation, as " Ralph Corderoy
2024-07-12 18:54 ` [COFF] Re: machine code translation,as " Aron Insinga
2024-07-12 21:49 ` Dave Horsfall
[not found] ` <20240710203422.284BA18C077@mercury.lcs. <20240713095708.203D5220C9@orac.inputplus.co.uk>
2024-07-13 18:50 ` [COFF] Re: machine code translation, as " John Levine
2024-07-13 19:27 ` Paul Winalski
2024-07-13 19:42 ` Dan Cross
2024-07-14 1:09 ` Aron Insinga
2024-07-14 1:46 ` Aron Insinga
2024-07-14 16:16 ` Paul Winalski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABH=_VQvmSyYh8yrVD+3yh3dHyo+Lcn+rU4mCfzACa9StztxdQ@mail.gmail.com' \
--to=paul.winalski@gmail.com \
--cc=aki@insinga.com \
--cc=coff@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).