Subject: Re: NetBSD/pdp10 ?
To: None <dpeschel@eskimo.com>
From: M. Warner Losh <imp@village.org>
List: tech-kern
Date: 03/07/2002 01:30:50
In message: <20020306165438.A15936@eskimo.eskimo.com>
            Derek Peschel <dpeschel@eskimo.com> writes:
: On Wed, Mar 06, 2002 at 01:42:38AM -0500, der Mouse wrote:
: > > how cross compiler generate 36-bit code on 32-bit machine?
: > 
: > Same way any foreign code is generated - mostly up to the assembler and
: > linker.  Define a way of representing 36-bit words (as, say, 5 8-bit
: > bytes with 4 bits wasted, or two 36-bit words in 9 8-bit bytes, or even
: > in extremis one 36-bit word stored in a 64-bit space with 28 bits of
: > padding).  Setting up the first boot may be a bit interesting,
: > depending on the boot methods and media, but that's about it.
: 
: The designers of FTP already solved that problem.  If a file contains
: 8-bit bytes, you can transfer it between a 16- or 32-bit machine and a 36-bit
: machine.  Probably the same is true for files containing 36-bit words.
: And it may even be true for word sizes other than 36.

The 36-bit ftp clients/servers did things special.  They knew if you
were dealing with text (stored 5 bytes per 36bit word (7-bit bytes))
or images (which had their own whacked out format that I can't even
begin to remember, but may have been 4 bytes per 36 bit word (8-bit
bytes)) or pages (the ftp protocol of yore had ascii, binary and page
transfer modes (not sure of the page name).

There were a number of ways to pack the bytes into the 36-bit word.
There were some programs that even did 6 6-bit bytes.  A weird vestage
of that survived as radix-20 in the pdp-11 OSes for on disk storage.

Warner