R5ASC

Convert a RAD50 word into ASCII

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall R5ASC(rad50, ascii)

Arguments

rad50

A variable whose first two characters are treated as a single RAD50 word to be converted. (a)

ascii

The variable that will be loaded with three ASCII characters, loaded left-justified over blanks. (a)

Discussion

The R5ASC subroutine converts a two-character RAD50 word into three ASCII characters. (RAD50 was a compression technique used on PDP-11 systems.)

The R5ASC subroutine complements the ASCR5 subroutine.

RAD50-to-ASCII conversions are valid for the following ASCII characters:

See also

ASCR5 routine

Examples

The following example prompts the user to enter three ASCII characters. It converts those characters to two RAD50 characters, converts the RAD50 characters back to ASCII, and displays the results to the screen.

.define TTCHN   ,1
record
    rad50       ,a2
    ascii       ,a3
proc
    open(TTCHN, i, "tt:")
    display(TTCHN, "Enter 3 characters: ")
    reads(TTCHN, ascii)
    xcall ascr5(ascii, rad50)
    xcall r5asc(rad50, ascii)
    writes(TTCHN, "After applying the ASCR5 subroutine")
    writes(TTCHN, "and then the R5ASC subroutine, your")
    display(TTCHN, 'characters appear as "', ascii, '"')
    stop
end