From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5708 invoked from network); 16 Dec 2022 21:15:04 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2022 21:15:04 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 698F4423E5; Sat, 17 Dec 2022 07:14:40 +1000 (AEST) Received: from mail-vk1-f176.google.com (mail-vk1-f176.google.com [209.85.221.176]) by minnie.tuhs.org (Postfix) with ESMTPS id E7471423E0 for ; Sat, 17 Dec 2022 07:14:32 +1000 (AEST) Received: by mail-vk1-f176.google.com with SMTP id q7so1712734vka.7 for ; Fri, 16 Dec 2022 13:14:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccc.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PaBX/NN0Z9+0itW2i0niUCtT5fFD31oy+PvNci9RFoQ=; b=TZIDa64pMO3w925Cc5dZwoqNRDjTrMO6Aqbpsd2TWSNE2LqSKqKKApcy+Xvexyevj8 wO4XQKZZ7O7ccd7+37uifk+9BGD+IKbNap3KYy0iuVSKBSk1xC/IiJLFAeXsD8FYX32U QMl1FNndpfgjc6Kq2jBXId/QDDYFQ3oTk7K6c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PaBX/NN0Z9+0itW2i0niUCtT5fFD31oy+PvNci9RFoQ=; b=MsIVRh+RfV1VQogR1WXOhWGhVIgIWK0RNWolabHbriAWHjYdSa59Ad8g0FBiHd1vij J+E2mAvEguam/yf1qP3z1kuidJzVfpYViagvW9/EDvOzz5nr42fuohBs0U0z6GFJg6/B 2BQjZXJs435rUuzGzuNTrILgGPgXrk8XxLZCq01tjn5qMXsXtXvWVDRwjyoh6YCaQzRT zgQF3ofQuQW5V8SLVLn/4wpEo7QuEQkjYnjfxvepKEHPbbePRDEwiYS1F2WJ6LwEYI4S oI2DSdmOcD7qrP3gIFYixNu/eGQwry8QyAVt8/OP0nmKfXRcMh2dbs4gCC+tj1EcB6hs 8s8Q== X-Gm-Message-State: AFqh2kozmyhqHmkrfcAtCr/eGAXRWNvudCgSYSnUBJpLRYF2BLglw/Ki jafwl6y0Tfa3uMN4D+iydoiccJOBsM0rggVvnM214w== X-Google-Smtp-Source: AMrXdXsUbmPlqh2Y7a1KMIm86FNoqpviVrdfR0wiWTUTzkOxakJkFfs5OIg5YKTUR+aX1Dt0WiXKT86SDbP9epOezlA= X-Received: by 2002:ac5:c65d:0:b0:39f:c1eb:85fe with SMTP id j29-20020ac5c65d000000b0039fc1eb85femr891865vkl.32.1671225211836; Fri, 16 Dec 2022 13:13:31 -0800 (PST) MIME-Version: 1.0 References: <78A69F72-788E-4A31-B750-A39C97F77C75@csp-partnership.co.uk> In-Reply-To: From: Clem Cole Date: Fri, 16 Dec 2022 16:13:05 -0500 Message-ID: To: Warner Losh Content-Type: multipart/alternative; boundary="00000000000017746205eff87137" Message-ID-Hash: ODMWKCOW7YO7DA52YOH3TA6JWO7MMPSP X-Message-ID-Hash: ODMWKCOW7YO7DA52YOH3TA6JWO7MMPSP X-MailFrom: clemc@ccc.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: The Eunuchs Hysterical Society X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: origin of null-terminated strings List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --00000000000017746205eff87137 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable So I went to the oracle on much of DEC history ... -- this explains why Ken never heard it. ---------- Forwarded message --------- From: Timothe Litt Date: Fri, Dec 16, 2022 at 3:40 PM Subject: Re: Origin of ASCIZ / null terminated char arrays. To: Clem Cole On 16-Dec-22 15:04, Clem Cole wrote: Do either of you know when it showed up in DEC assemblers? I remember it in Macro11 and Macro10, but I have to believe it was in the earlier machines? So far I have not found a reference to it in any of my PDP-8 stuff (which is small) and I never had the docs for 6, 7 or 9 -- I assume Al K. has them on bitsavers - so I'm going to go poking around - but I thought I'd ask you two if you knew. Ken Thompson says he had never heard of it before, but he never used the DEC assemblers -- (he wrote their own on the Honeywell originally I believe). FWIW: B did not use null-terminated char arrays originally, but by the time dmr morphed B into newB then C, they had become standard. Like many, I had always thought Dennis picked them from the DEC assembler, but as Ken says - they never really used it. I was trying to figure out when they (null terminate char arrays) started to become more standard and specifically the pdeudo OP ASCIZ to create them= . Tx Clem It depends on if you require ASCII, or just character strings terminated by a stop code... The -11 has .asciz (as does VMS Macro,...); the -10 has ASCIZ. SIXBIT 0 is a space, so you needed to know the length, oftentimes in words, so strip trailing 00s. The basic 8 assembler (PAL) didn't even have ASCII data. http://www.bitsavers.org/pdf/dec/pdp8/software/DEC-08-ASAC-D_PAL-III_Symbol= ic_Assembler_Programming_Manual.pdf Macro-8 does; the TEXT pseudo-op uses 00 as a stop code. (It also uses a 6-bit ASCII code). " is a single character ASCII constant, but not used for strings. https://www.grc.com/pdp-8/docs/macro-8_programming_manual.pdf The -15 has .ASCII and .SIXBIT, but no .ASCIZ. http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/pdp15/DEC-15-AMZA-D_MA= CRO15.pdf Probably of most interest to the Unix history, the PDP-7 assembler's TEXT pseudo-op 'in order to separate the string from other data following it, a termination code determined by the character mode is inserted automatically after the last character code of the string"/... http://www.bitsavers.org/pdf/dec/pdp7/PDP-7_AsmMan.pdf I don't remember and/or didn't use the earlier assemblers, but many of the manuals are on bitsavers. Both NUL and RUBOUT (a.k.a. DELETE) were used as fill characters to cover the time teletypes take to execute and . you couldn't represent the NUL version with ASCIZ, and RUBOUT was picked for the ability to overpunch paper tape typos. Neither function, nor the use of NUL as an end of string marker is in the ASCII standard, IIRC. =E1=90=A7 > =E1=90=A7 --00000000000017746205eff87137 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
So I went to the oracle on much of DEC= history ... -- this explains why Ken never heard it.

=

---------- Forwarded message ---------
From: Timothe Litt
Da= te: Fri, Dec 16, 2022 at 3:40 PM
Subject: Re: Origin of ASCIZ / null ter= minated char arrays.
To: Clem Cole <= clemc@ccc.com>

On 16-Dec-22 = 15:04, Clem Cole wrote:
D= o either of you know when it showed up in DEC assemblers?=C2=A0 I =C2=A0rem= ember it in Macro11 and Macro10, but I have to believe it was in the earlie= r machines?=C2=A0 So far I have not found a reference to it in any of my PD= P-8 stuff (which is small) and I never had the docs for 6, 7 or 9 -- I assu= me Al K. has them on bitsavers - so I'm going to go poking around - but= I thought I'd ask you two if you knew.
=

Ken Thompson says he had never heard of it before, but he never used the D= EC assemblers -- (he wrote their own on the Honeywell originally I believe)= . FWIW: B did not use null-terminated char arrays originally, but by the ti= me dmr morphed B into newB then C, they had become standard.=C2=A0 Like man= y, I had always thought Dennis picked them from the DEC assembler, but as K= en says - they never really used it.

I was = trying to figure out when they (null terminate char arrays) started to beco= me more standard and specifically the pdeudo OP ASCIZ to create them.

=
=
Tx
Clem
It depends on if you requi= re ASCII, or just character strings terminated by a stop code...
The -11= has .asciz (as does VMS Macro,...); the -10 has ASCIZ.=C2=A0 SIXBIT 0 is a= space, so you needed to know the length, oftentimes in words, so strip tra= iling 00s.
The basic 8 assembler (PAL) didn't even have ASCII data.<= br>http://www.bitsavers.org= /pdf/dec/pdp8/software/DEC-08-ASAC-D_PAL-III_Symbolic_Assembler_Programming= _Manual.pdf

Macro-8 does; the TEXT pseudo-op uses 00 as a stop c= ode. =C2=A0(It also uses a 6-bit ASCII code). =C2=A0" is a single char= acter ASCII constant, but not used for strings.
https://www.grc.com/pdp-8= /docs/macro-8_programming_manual.pdf

The -15 has .ASCII and .SIX= BIT, but no .ASCIZ.

http://bitsavers.informati= k.uni-stuttgart.de/pdf/dec/pdp15/DEC-15-AMZA-D_MACRO15.pdf

Proba= bly of most interest to the Unix history, the PDP-7 assembler's TEXT ps= eudo-op 'in order to separate the string from other data following it, = a termination code determined by the character mode is inserted automatical= ly after the last character code of the string"/...

http://www.bitsaver= s.org/pdf/dec/pdp7/PDP-7_AsmMan.pdf
I don't remember and/or didn= 't use the earlier assemblers, but many of the manuals are on bitsavers= .
Both NUL and RUBOUT (a.k.a. DELETE) were used as fill characters to co= ver the time teletypes take to execute <CR> and <LF>. =C2=A0you= couldn't represent the NUL version with ASCIZ, and RUBOUT was picked f= or the ability to overpunch paper tape typos.=C2=A0 Neither function, nor t= he use of NUL as an end of string marker =C2=A0is in the ASCII standard, II= RC.

=E1=90=A7
3D""=E1=90=A7
--00000000000017746205eff87137--