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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30265 invoked from network); 17 May 2020 16:24:34 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 17 May 2020 16:24:34 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 08C359C99F; Mon, 18 May 2020 02:24:33 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id C817A9C5E0; Mon, 18 May 2020 02:24:16 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qcA1hirs"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 6AA8D9C5E0; Mon, 18 May 2020 02:24:15 +1000 (AEST) Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) by minnie.tuhs.org (Postfix) with ESMTPS id E2B7A9C2EE for ; Mon, 18 May 2020 02:24:14 +1000 (AEST) Received: by mail-vs1-f51.google.com with SMTP id l15so2253498vsr.3 for ; Sun, 17 May 2020 09:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=i3iFUk/3nEDCvoZDWjG0/RleozG3BRbkUrvwWHwfVoc=; b=qcA1hirsokEPbckJtL0SNGr8CLLA6sUapS80pFnz51rpNZxsI9KnwRV2Pe+1L2KUZU 1aO8M7PCiF4Miicq1Vmdou1E0U90yPxRAViiN1MN7/lCNozAxCFq2ys8P4ylKz5u/aYK k/CYrQt7Eat4C67nRKAeW9g2ERGiUBWCg8xH/WVTIskzvirpbyUrNvnS2zDbDrTtb2YU Zkeb0F7sbGF4EigjHrIJ3kXGSAth+fcWhHJgtOxO/5HXeAkBY8hpnqeGzjdA2WApU8OB m/4vpeEVBkyFqoehX/Y2XExvy8Mj9xUtlnjIdn8JDncb3j00lOkq71d7mvN7H99riXRc OLFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=i3iFUk/3nEDCvoZDWjG0/RleozG3BRbkUrvwWHwfVoc=; b=GP7PEho7cAkPSY7kVefSh4JTt1WwoxYguZohkC1l7jyXRECPp08++LcENFQKLPJDfl GxhilkP4v/rtDXJ+W/PbXOvNIkxZe3te4R0v5PHVJaTYSaUTeISRIiTKvJzNiBvePbvU N602zBL/2CFgfI0Z/TPWTofmE17s1PojQUdvEpvTi1+CFAyu3ex3ixZfv4qJewU5u1Zu GPQ9OydmJQ2voyuuRdn7ZI5sdemwpGbqIFwbvOnQD6QD0dXJGOu7t2zWoqFkgYY4wXiV pw8y1FBGN5mQiZc4Egk1lso9JLLkULWCpj2ODT7glp08hO91RICPbg3ErHN3bG8OURDQ gT+A== X-Gm-Message-State: AOAM5322AEh3xSduQQ2iaqHw3Tevv+8MUsSm2fli4jeqJ8IR4uULsNJJ 78J3AeIgv2V4JppXYdP74HWgXPZ/OpFwULyyRFF6FQ== X-Google-Smtp-Source: ABdhPJyB2o9rR5pU2dduO2mE+RfIs58UWeP23Qq2bNa4OxEIDJR2brxviCj1BbgvoS7lqXpz9NfgKtrajZ+hnuICmqA= X-Received: by 2002:a67:2504:: with SMTP id l4mr8065081vsl.228.1589732653779; Sun, 17 May 2020 09:24:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:2b92:0:0:0:0:0 with HTTP; Sun, 17 May 2020 09:24:13 -0700 (PDT) In-Reply-To: <20200516232607.nLiIx%steffen@sdaoden.eu> References: <20200515213138.8E0F72D2D71E@macaroni.inf.ed.ac.uk> <077a01d62b08$e696bee0$b3c43ca0$@ronnatalie.com> <20200515233427.31Vab%steffen@sdaoden.eu> <5DB09C5A-F5DA-4375-AAA5-0711FC6FB1D9@ronnatalie.com> <20200516232607.nLiIx%steffen@sdaoden.eu> From: Paul Winalski Date: Sun, 17 May 2020 12:24:13 -0400 Message-ID: To: The Eunuchs Hysterical Society Content-Type: text/plain; charset="UTF-8" Subject: Re: [TUHS] v7 K&R C X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On 5/16/20, Steffen Nurpmeso wrote: > > Why was there no byte or "mem" type? These days machine architecture has settled on the 8-bit byte as the unit for addressing, but it wasn't always the case. The PDP-10 addressed memory in 36-bit units. The character manipulating instructions could deal with a variety of different byte lengths: you could store six 6-bit BCD characters per machine word, or five ASCII 7-bit characters (with a bit left over), or four 8-bit characters (ASCII plus parity, with four bits left over), or four 9-bit characters. Regarding a "mem" type, take a look at BLISS. The only data type that language has is the machine word. > +getfield(buf) > +char buf[]; > +{ > + int j; > + char c; > + > + j = 0; > + while((c = buf[j] = getc(iobuf)) >= 0) > + if(c==':' || c=='\n') { > + buf[j] =0; > + return(1); > + } else > + j++; > + return(0); > +} > > so here the EOF was different and char was signed 7-bit it seems. That makes perfect sense if you're dealing with ASCII, which is a 7-bit character set. -Paul W.