Path: utzoo!attcan!uunet!mcsun!ukc!servax0!sundist!peter From: peter@sundist.essex.ac.uk (Allott P) Newsgroups: comp.misc Subject: Re: Looking for information on the RAD-50 standard Message-ID: <1521@servax0.essex.ac.uk> Date: 24 Aug 89 12:47:51 GMT References: <1076@taurus.BITNET> Sender: news@servax0.essex.ac.uk Reply-To: peter@essex.ac.uk (Allott P) Organization: University of Essex, Colchester, UK Lines: 40 In article <1076@taurus.BITNET> adiro%math.tau.ac.il@CUNYVM.CUNY.EDU (Rosen Adi) writes: > > I am looking for information regarding the RAD-50 standard, which is >apparently a character encoding standard used on old PDP-11 machines. This bit of code takes a PDP-11 RAD-50 word (16 bits) and generates the 3 ASCII characters that the word represents. Its writen in BCPL (NOT C) and was designed to run on a DECSystem-10 It should be easy to rewrite the BITOR line to convert the characters from sixbit to normal ascii (add ascii space) instead of packing in DECSystem-10 sixbit. Hope this is of help ----------------------------------------------------------------------- LET H50(R50) = VALOF { LET S,T=VEC 2,0 FOR I = 0 TO 2 DO { S!(2-I) _ R50 REM #50 R50/ _ #50 } FOR I = 0 TO 2 DO { SWITCHON S!I INTO { CASE #33: S!I_#04 ENDCASE CASE #34: S!I_#16 ENDCASE CASE #36 ... #47: S!I-_#16 ENDCASE CASE 1 ... #32: S!I+_#40 CASE 0 : ENDCASE DEFAULT: ERMESS(3,$6"BR5","Bad RADIX50 value", "The RADIX50 value is invalid and cannot be converted to SIXBIT.") ABORT.RUN() } } FOR I = 0 TO 2 DO T BITOR _ S!I << (6*(2-I)) RESULTIS T }