The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: segaloco via TUHS <tuhs@tuhs.org>
To: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: .globl directive -- is this a 35-bit constant?
Date: Thu, 28 Mar 2024 20:59:36 +0000	[thread overview]
Message-ID: <-13YF6AYi-bCPeVZIGwdZ4X9AxH2HtZ_oOzHOoaarkMi3tULcsRWeqd2AJ_S6FomRNk2dWpcsQSYUyKFww-_xhm17hD_QH_NR2Mu5Jp9a1s=@protonmail.com> (raw)
In-Reply-To: <CAP6exYJATjcxcs7K22shHLKaZ9hYGsocnTJ6kc6BAOvLEFkOiA@mail.gmail.com>

On Thursday, March 28th, 2024 at 12:44 PM, ron minnich <rminnich@gmail.com> wrote:

> ACPI has 4-byte identifiers (guess why!), but I just wondered, writing some assembly:is it globl, not global, or glbl, because globl would be a one-word constant on the PDP-10 (5 7-bit bytes)?
> 
> Not entirely off track, netbsd at some point (still does?) ran on the PDP-10.

Note any page references below are in reference to the linked PDF, not the original document page numbers.

Many facts folks here know better than I, but being through for completeness, as(I) derives syntactically from PAL-11R.  Section 8.2 of the May 1971 PAL-11R manual[1] describes the .GLOBL directive (p. 35).  Looking forward just a bit, .GLOBL survives into MACRO-11 in June 1972[2], described in section 6.10 (p. 89).

Looking then over the fence to MACRO-10 as of June 1972[3], I couldn't find a reference to a .GLOBL or comparably named pseudo-op, with the table being found in Appendix A(pp. 111-112).  There are plenty of pseudo-ops ranging in name lengths from two (e.g. IF) to nine (e.g. UNIVERSAL) characters, it doesn't seem there was any strong preference in character length for psuedo-ops in MACRO-10.

I found some references to a "PAL-10" online but could not locate a manual, but the references I did see indicated this may be referring to a cross-assembler for PDP-8.  Taking one more look back to the MACRO-9 assembler for PDP-9, circa November 1968[4], this assembler does have a .GLOBL pseudo-op defined in section 3.9 (pp. 38-39).  It seems .GLOBL skipped PDP-10.  I'm sure further analysis could pinpoint the earliest PDP assembler to utilize ".GLOBL" but from the looks of things it never touched the PDP-10, at least in the native assembler.

- Matt G.

P.S. As an aside, I use the cc65 toolkit for 6502 projects I tinker on, it's in some ways modeled after the UNIX cc/as/ld environment but exhibits enough differences that I sometimes wonder what they were thinking.  I don't mean too much criticism, it's a free tool I get to use all I want, and I'm grateful for that, but a relevant instance here is that there is no .globl.  Rather the pseudo-op is ".export", and there are several things like that where it could've been nice and even with how the standard UNIX commands and syntax work, but missed the mark by just that much.  I fear given that cc65 has been around for a while, any attempts I'd make to wrangle the syntax and CLI options to be closer to UNIX would be unwelcome as so much code is already extant with the differences.  On the flip side, if I produce my own fork and write my code against that fork, nobody else will be able to use my code without it :(

[1] - http://bitsavers.org/pdf/dec/pdp11/dos-batch/DEC-11-ASDB-D_PAL-11R_Assembler_Programmers_Manual_May71.pdf
[2] - http://bitsavers.org/pdf/dec/pdp11/dos-batch/DEC-11-OMACA-A-D_DOS_MACRO-11_Assembler_Programmers_Manual_Jun72.pdf
[3] - http://bitsavers.org/pdf/dec/pdp10/TOPS10/1973_Assembly_Language_Handbook/02_1973AsmRef_macro.pdf
[4] - http://bitsavers.org/pdf/dec/pdp9/DEC-9A-AMZA-D_MACRO9.pdf

      parent reply	other threads:[~2024-03-28 20:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 19:44 [TUHS] " ron minnich
2024-03-28 19:48 ` [TUHS] " Tom Lyon
2024-03-28 19:55   ` ron minnich
2024-03-28 19:56 ` Henry Bent
2024-03-28 20:59 ` segaloco via TUHS [this message]

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='-13YF6AYi-bCPeVZIGwdZ4X9AxH2HtZ_oOzHOoaarkMi3tULcsRWeqd2AJ_S6FomRNk2dWpcsQSYUyKFww-_xhm17hD_QH_NR2Mu5Jp9a1s=@protonmail.com' \
    --to=tuhs@tuhs.org \
    --cc=segaloco@protonmail.com \
    /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).