<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
On 7/14/24 14:02, John Levine wrote:<br>
<blockquote type="cite" cite="mid:v713rr$1foh$1@gal.iecc.com">
<pre class="moz-quote-pre" wrap="">According to Aron Insinga <a class="moz-txt-link-rfc2396E" href="mailto:aki@insinga.com"><aki@insinga.com></a>:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On 7/13/24 19:46, John Levine wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">I looked at the manual and I think he's misreading it. The "words" in
question are the tokens in the macro definition. ...
</pre>
</blockquote>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Possibly, but they use 'syllables' for tokens (symbols or integers), and
they say here that they advance the location counter after each word
copied. If they were copying characters into the input stream, they
would not be incrementing the location counter ('.') after each word
transferred.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
If you really want to know what it did, here's the internals manual.
The description of the macro facility starts on page 19 and it is
quite clear that they're storing a tokenized version of the macros, so
they're not copying characters, but they're not just copying assembled
instructions either.
<a class="moz-txt-link-freetext" href="https://bitsavers.org/pdf/dec/pdp1/F36P_PDP1_Macro_Internals.pdf">https://bitsavers.org/pdf/dec/pdp1/F36P_PDP1_Macro_Internals.pdf</a></pre>
</blockquote>
<br>
Thank you!! I found the PDP-1 and TX-0 MACRO sources and was sadly
unsurprised by the lack of comments, so they are difficult reading.<br>
<blockquote><a
href="http://www.bitsavers.org/bits/DEC/pdp1/papertapeImages/20040106/macro_6-63/_text/part2.txt"
class="moz-txt-link-freetext">http://www.bitsavers.org/bits/DEC/pdp1/papertapeImages/20040106/macro_6-63/_text/part2.txt</a><br>
</blockquote>
They are not storing tokens. In fact, the list of 'codes' for items
stored as the macro body on p 20 is:<br>
a storage word,<br>
a dummy symbol specification.<br>
a constant,<br>
a dummy symbol parameter assignment, or<br>
an end marker.<br>
So it is not storing tokens for instructions, just storage words
(instructions or data) as mentioned in the user manual.<br>
<br>
In the discussion in the internals manual, after the paragraph
mentioning the year this was designed (a nice touch), they say that
they are storing the macro body as 'partially assembled' 'words'
into which the dummy symbols are 'inserted'. (And in a
single-address architecture with a small memory address, addition is
enough to do that insertion.) They explain why they did this
instead of storing characters:<br>
<blockquote><img src="cid:part1.m5hUVBD4.4IUecRk0@insinga.com"
alt=""></blockquote>
They do not look at the opcode as I suggested was possible, they
have a more general solution that works for a word containing either
code or data.<br>
<br>
I think that this may be (at least as far as any of us know) a
unique case from the early days of computing where, on the TX-0 and
a port to the PDP-1, a macro body *is* stored as a list of 'machine
words' instead of source text. The macro body is not manipulated
as a 'higher-level construct', it is just used for quite limited
macro expansion.<br>
<br>
This has NO bearing on what DEC/HP/VSI did more than two decades
later for the Alpha, Itanic, and x86_64 (where macros are expanded
by the conventional insertion of characters from the macro body into
the source text stream).<br>
<br>
- Aron<br>
<br>
</body>
</html>