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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20808 invoked from network); 18 Sep 2023 23:08:15 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 18 Sep 2023 23:08:15 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id A752540294; Tue, 19 Sep 2023 09:08:11 +1000 (AEST) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by minnie.tuhs.org (Postfix) with ESMTPS id 0679C40293 for ; Tue, 19 Sep 2023 09:08:04 +1000 (AEST) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2c012232792so20843291fa.0 for ; Mon, 18 Sep 2023 16:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695078481; x=1695683281; darn=tuhs.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=MB2gRAYPI8RTEghyQwWHbPDZ+L2BXj4F6+m+FIaSAtc=; b=EaIbmg6K+XRvfTarDMWRAcPr1aUgWlGypVhBQTXfZnKjAxwh5ntAZkrBrC3Jbxx7Gc ZSywC8ZCvfiVzjEbnvMry8h0M93YFTldjwpJb0M1+v1jTDFT8j8IRe2e9NFTsqBMFi8r JdU5d7DUHsP5uuymvDt+hTNpMVLbWSRKAvvWJCc8hVxuy2CDNmwwYaLvsQ/Pm9/It8a6 /ywsMUq14PcuTXASFsLmVuZXAQR0zRicXiOYrDSJcxEwTqdkMzMZxq3o9w9uqc2zf0uJ 30p/i5CgPL6x/L9y+WKE1EQ4uI04g5f6RSre8of/boEq8TLJvoZkEFR5lAoZQlyu9j+l /uzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695078481; x=1695683281; h=content-transfer-encoding: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=MB2gRAYPI8RTEghyQwWHbPDZ+L2BXj4F6+m+FIaSAtc=; b=YPImVysov10RiQ3Tgj1QUbiRLwX2VXjz+ERg+GiAwAyy3C0gp58n5pSIkPGjng4JTD vII5UyngBbSgJtZ/0/gq47TSLxBP/biwWf+ljy6lZrY8NVduS5YZY90YuWkLrPkcXWtr x0n96NPk6jX6Re9F7/SyPaYQEgaZ49Wm0xA/ayDeIFNjLIZyMPOphYq4iv2Wrzv6xIsZ WXlIT8bvkJP+l6maT6oZeZm5m17PgfjxvNn2iCde4UX5kArfRt4FkZWitk0qhT/Qx4Bu reFz4s60FgyxlTB181aGLEJo4HSfJ4dvNdZjg5cg0Vm4fJS4aIgP54EFg4JBoKoxWzyt gFPQ== X-Gm-Message-State: AOJu0YzUM9VoOTB3uXE1dSb5b+YC1EWbGHTjh/do65BDXwTrUudlGh1m 9lj+B4lXTvYHC4hn6H/6wJzDdHAX/DzFj6vtp0DuF57L X-Google-Smtp-Source: AGHT+IHZ2czCazoCb3LdzEb+3zZBYIy0P+AQQElPPnp/OKeubJ4V528QUuoFPx6BeiFbSZGIirIzkGGMRu+xlBgDttI= X-Received: by 2002:a2e:9656:0:b0:2be:4d40:f833 with SMTP id z22-20020a2e9656000000b002be4d40f833mr8930758ljh.18.1695078481258; Mon, 18 Sep 2023 16:08:01 -0700 (PDT) MIME-Version: 1.0 References: <81B4F221-C3EF-4543-84CD-78E52ABF0E67@planet.nl> In-Reply-To: <81B4F221-C3EF-4543-84CD-78E52ABF0E67@planet.nl> From: Dan Cross Date: Mon, 18 Sep 2023 19:07:25 -0400 Message-ID: To: Paul Ruizendaal Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 6S2RBQFUM7EKO4UCLHJLUPCDKAI657CY X-Message-ID-Hash: 6S2RBQFUM7EKO4UCLHJLUPCDKAI657CY X-MailFrom: crossd@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: "tuhs@tuhs.org" X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: x/y/zmodem on Unix List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, Sep 18, 2023 at 6:31=E2=80=AFPM Paul Ruizendaal wro= te: > Last december Matt brought up xmodem and recently I needed it for an almo= st identical use case. Studied it a bit and in the context of Unix, it is a= n interesting piece of software history. > > Although xmodem originated on CP/M in 1977, it seems to have arrived on U= nix soon thereafter. The first Unix implementation seems to have gone by th= e name of =E2=80=9Crbsb=E2=80=9D and must have originated when V7 was preva= lent: it uses alarm() to simulate non-blocking I/O. Over the course of the = 80=E2=80=99s ymodem and zmodem were added and the package became lrzsz; the= source continued to have a very V7-ish feel to it at least to the early 90= =E2=80=99s. In the mid-90=E2=80=99s it was converted to ansi-C and had some= other modernization, but it looks like it would still have run on SysIII (= apart from the ansi).The last update to the upstream source package appears= to be from 1998, i.e. 25 years ago. > > It is still packaged today for FreeBSD and major Linux distros. On Unix i= t must be one the oldest code bases still in regular use, with the 1980 sou= rce still recognizable in its current incarnation. Any other contenders com= e to mind? > > I had always associated x/y/zmodem with CP/M and MSDOS, not so much with = Unix. Last December Clem already pointed out that it was popular for file e= xchange in the Unix scene as well, along with several other similar tools. = Also, the ymodem approach to file metadata is very unix oriented, suggestin= g it originated on Unix or at least that Unix users were an important user = demographic. Yet, I could find little trace of x/y/zmodem in the TUHS Unix = Tree. The search tool finds it in 2.11BSD, in Minix 1.5 and 2.0 and in V10.= Kermit is in those as well, and in 4.3BSD and 4.4BSD on top. > > Maybe these programs were commonly pulled from a bulletin board and hence= not on distribution media. Not sure how that would be bootstrapped, althou= gh the 2.11BSD files for x/y/zmodem include =E2=80=9Cminirb.c=E2=80=9D, a 1= 75 line implementation to receive files using the ymodem protocol. It is po= ssible that this was transferred as plain text as a first step, or even ret= yped. > > Any recollections? xmodem was an outgrowth of Christensen's MODEM.ASM for CP/M, and is almost criminally simple: a small block of data coupled with a little bit of header information, wait for an acknowledgement, and repeat. Metadata was small (a start byte, a block number, inverse block number, and a single checksum byte), but there was no total byte count, so it was assumed that the final block would be padded with a throwaway character. Chuck Forsberg did YMODEM and ZMODEM; YMODEM is sort of a super-XMODEM: it adds a 16-bit CRC, increases the block size, and adds a "0 block" with some metadata (total file size and file name); thus, it no longer needed a padding byte removed from the final packet. Otherwise, it retains most of the overall structure of XMODEM. ZMODEM was, as I understood it, designed for transfers across telenet, which was pretty reliable; instead of the highly synchronous send/wait-for-ack cycle of xmodem and ymodem, zmodem relies on error detection and correction and is basically a streaming protocol: a packet in a sliding window could be NAK'ed, thus rewinding the transfer, but otherwise it basically just sends data until done. lrzsz came kind of later; I remember Forsberg's rzsz package on Unix back in the day, and then there was a GNU reimplementation. For a while, the Omen Technologies BBS was listed in the BSD phone numbers files. xmodem lives on in a lot of embedded applications because of its overall simplicity. We used it to bootstrap kernels onto Oxide computers, for example, while we were doing active development. - Dan C.