From: "IBM Mainframe Assembler List" <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Sent:Fri, 2 Feb 2018 00:49:57 -0600
Subject:Re: Pascal (was : comparison C vs HLASM)
> On Feb 1, 2018, at 9:13 PM, Robin Vowels <robi...@dodo.com.au>
>> From: "Paul Gilmartin"
>> Sent: Friday, February 02, 2018 2:16 AM
>> On 2018-02-01, at 06:55:29, Paul Raulerson wrote:
>>> It also explains one of the reasons why strings in C are null
terminated. There were two modes of thought back in those days,
‘Pascal’ strings, which have the string size encoded in a single
byte at the start of the string, and ‘C’ strings, which terminate
a string with a NULL.
>>> Pascal string length was obviously limited by the max value of a
>>> Who made that moronic "single byte" rule!?
>> The implementer.
> A few very smart implementors actually. :)
>> o It should be two pointers, first byte and last byte + 1.
> The address of the start of the string and the length are probably
In machines with 4K of memory or less?
Indeed. As we have said, substrings require only a pointer (an
and a length (one or two bytes), resulting in considerable saving of
> Well, a PDP-7 had 18bit word lengths, and that 4K was in words.
> I think it was about $70K for a PDP-7 in those days,
The DEUCE, with 384 words of memory, ran ALGOL.
The drum was 8192 words.
> wire wrapped beastie that it was. Engineering changes were made with
wire wrap tools.
> And yet, a full multi-user UNIX ran on the thing, with a C compiler
that could compile itself. That’s amazing…
>>> o And having the length contiguous meant that substrings
>>> could not be created without copying.
>> It's startling how difficult it can be to shift paradigm
>> beyond "two modes of thought" and invent another.
>> BTW, those "'Pascal' strings" were not in Wirth's specification
>> of Pascal; they came later with, e.g. UCSD.
> Actually - they were there on ancient old C/PM machines. PIP PIP
and all that.
> What actually does amaze me is that anyone would call what those
people did “Moronic”.
> It makes me seriously wonder.