Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!hao!oddjob!gargoyle!ihnp4!ihdev!pdg From: pdg@ihdev.ATT.COM (Joe Isuzu) Newsgroups: comp.arch Subject: Re: machine word sizes Message-ID: <1502@ihdev.ATT.COM> Date: Mon, 27-Jul-87 18:07:00 EDT Article-I.D.: ihdev.1502 Posted: Mon Jul 27 18:07:00 1987 Date-Received: Tue, 28-Jul-87 07:27:43 EDT References: <2807@phri.UUCP> <565@saturn.ucsc.edu> <1184@k.cs.cmu.edu> <2817@phri.UUCP> Reply-To: pdg@ihdev.UUCP (Joe Isuzu) Organization: American Nasal Amputation Centre Lines: 34 In article <2817@phri.UUCP> roy@phri.UUCP (Roy Smith) writes: >Blech! I don't remember >the exact details of rad-50 to ascii conversion, but I seem to recall it >being about as complex as 4.3's namei :-) Well, you had to ask. Here is the table: Char RAD 50 ---- ------ NULL 0 '0'-'9' 01-012 'A'-'Z' 013-044 '.' 045 '$' 046 '%' 047 And the alg for ASCII to RAD-50: x = 0; for (i=0;i<6;i++) { x=x*050; x+= convert_to_val_in_tab("string"[i]) } and of course RAD-50 to ASCII is just the inverse. I *think* that's about right. No flames for slight inaccuracies - it's been years since I touched on of those beasties. Now, don't we all wish namei() was *that* easy? -- Paul Guthrie "Another day, another Jaguar" ihnp4!ihdev!pdg -- Pat Sajak