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.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29576 invoked from network); 18 May 2020 12:25:50 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 18 May 2020 12:25:50 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id EB0B89C1E6; Mon, 18 May 2020 22:25:47 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id E92699C160; Mon, 18 May 2020 22:25:25 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id B18B39C160; Mon, 18 May 2020 22:25:22 +1000 (AEST) Received: from ppsw-41.csi.cam.ac.uk (ppsw-41.csi.cam.ac.uk [131.111.8.141]) by minnie.tuhs.org (Postfix) with ESMTPS id A99689C15F for ; Mon, 18 May 2020 22:25:21 +1000 (AEST) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://help.uis.cam.ac.uk/email-scanner-virus Received: from grey.csi.cam.ac.uk ([131.111.57.57]:44216) by ppsw-41.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.139]:25) with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1jaepb-000ZpW-RQ (Exim 4.92.3) (return-path ); Mon, 18 May 2020 13:25:19 +0100 Date: Mon, 18 May 2020 13:25:19 +0100 From: Tony Finch To: Paul Winalski In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Paul Winalski wrote: > > Why did the implementers of the Unix ABI for ARM decide to have char > be unsigned? Was there an architectural reason for it? The early ARM didn't have a sign-extended byte load instruction. I learned C with the Norcroft ARM C compiler on the Acorn Archimedes in 1991/2ish. Norcroft C had quite a lot of unix flavour despite running on a system that was not at all unixy. (I didn't get my hands on actual unix until a couple of years later.) Acorn had a BSD port to the Archimedes which I've never seen myself - the R260 was a pretty powerful system for its time which I coveted from afar. I believe the 32 bit ARM ABI evolved from the early 26 bit ABI on the Archimedes. (32 bit word, 26 bit address space.) http://chrisacorns.computinghistory.org.uk/RISCiXComputers.html More recent versions of the instruction set have more features. I believe the arm64 ABI uses signed char to match what everyone is used to. I still think unsigned bytes are more sensible, but that's what I was taught at an impressionable age... Tony. -- f.anthony.n.finch http://dotat.at/ Trafalgar: North 3 or 4, occasionally 5 later. Moderate, occasionally slight in east. Fair. Good.