Trailing-Edge
-
PDP-10 Archives
-
BB-D351B-SM
-
sources/trntab.p11
There are 8 other files named trntab.p11 in the archive. Click here to see a list.
.SBTTL TRANSLATE TABLES
.REPT 0
COPYRIGHT (c) 1980, 1979
DIGITAL EQUIPMENT CORPORATION, maynard, mass.
THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
TRANSFERRED.
THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.
DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
.ENDR
;
;
; REVISION HISTORY
;
; 3(001) BS NEW MODULE TO HANDLE EBCDIC TO ASCII TRANSLATION
;
;
VTRNTB=001
;
;
VEDIT=VEDIT+VTRNTB
;
;
;
;
;
.IIF NDF,FTTRLS,FTTRLS=1 ;if we got this far, default
;is to make descriptive list
;Translate table definition
.REPT 0
The following macros define the character mapping between EBCDIC
codes (given in hexadecimal) and ASCII codes (given either as
the character itself or its octal code). Each invocation of the
CHAR macro assigns one ASCII characters to the EBCDIC value
given in its first parameter. If there are more ASCII characters,
the CHAR macro assigns them to successively higher EBCDIC values.
(This makes defining a whole string of contiguous characters
very easy.)
The ASCII character(s) that correspond to the hexadecimal value form
the second parameter. It may be represented as the actual character
itself (if it is not a strange character that MACDLX chokes on)
or alternatively as an octal value. Multiple characters are given
as either a string of characters (e.g. ABCDEFGHI) or as a list of octal
values (e.g. <101,102,103,...>).
The third parameter is a description of the character used
when printing the contents of the translate table (see discussion
of FTTRLS below). It can either be omitted (in which
case the characters themselves are used) or is a list of strings
(e.g. <<up-arrow>,colon,period>).
The fourth parameter is a prefix to this description which is
applied to all the characters generated in the current CHAR macro.
Its purpose is to allow some qualification when using the characters
themselves as description (i.e. the third parameter is null).
The fifth parameter is an offset to be added to the octal value
of all the characters in the current CHAR macro (used to make lower
case easier to define).
The sixth parameter is the octal flag -- if it is non-blank the
characters in the second parameter are specified in octal.
The macros EBCTAB and ASCTAB generate the translate tables for
EBCDIC to ASCII and ASCII to EBCDIC, respectively. They both
take as their single argument the tag with which to
name the translate table. The tag for the ASCII to EBCDIC table will
come at its beginning, while the tag for the EBCDIC to ASCII
table will come in the middle (so that the propagated
sign won't have to be masked out before indexing).
These two macros also produce a detailed listing of what is in the
translate table; this listing is, however, costly in CPU time for the
assembler. It is therefore under the feature test switch FTTRLS (for
Feature Test TRanslate table LiSt) which is normally defaulted to 0 (off)
in HDEFIN.P11. If the user wishes to see this list he can either
set FTTRLS to a non-zero value in his configuration file, or simply
assemble this file by itself (together with MACROS.P11).
The translate table generated from the CHAR macros below produces
the same translate tables as the hand-coded version in earlier DN60
products. However, there are a few entries which are commented
to indicate a recommended translate table with some properties perhaps
a bit more desirable for some users, namely mapping EBCDIC exclamation
into ASCII exclamation (instead of a square bracket, which only works on
TN train IBM printers) and EBCDIC solid vertical bar (which is much more
common than the EBCDIC broken vertical bar) into the ASCII broken vertical
bar.
.ENDR;.REPT 0
;
;
;
;
;Uppercase letters
CHAR C1,ABCDEFGHI,,<UPPERCASE >
CHAR D1,JKLMNOPQR,,<UPPERCASE >
CHAR E2,STUVWXYZ,,<UPPERCASE >
;Lowercase letters
CHAR 81,ABCDEFGHI,,<LOWERCASE >,40
CHAR 91,JKLMNOPQR,,<LOWERCASE >,40
CHAR A2,STUVWXYZ,,<LOWERCASE >,40
;Numerals
CHAR F0,0123456789,,<DIGIT >
;Common punctuation
CHAR 40,40,<SPACE>,,,OCTAL
CHAR 4B,^/.<(+/,<PERIOD,<LEFT ANGLE BRACKET>,<LEFT PARENTHESIS>,PLUS>
CHAR 50,&,AMPERSAND
CHAR 5B,^/$*)/,<DOLLAR,ASTERISK,<RIGHT PARENTHESIS>>
CHAR 5E,<73,136>,<<SEMI-COLON>,<NOT-SIGN OR CARAT>>,,,OCTAL
CHAR 60,^!-/!,<DASH,SLASH>
CHAR 6B,54,COMMA,,,OCTAL
CHAR 6C,^!%_>?!,<PERCENT,UNDERSCORE,<RIGHT ANGLE BRACKET>,QUESTION>
CHAR 79,140,<<ACCENT GRAVE>>,,,OCTAL
CHAR 7A,^!:#@!,<COLON,<NUMBER OR POUND SIGN>,ATSIGN>
CHAR 7D,47,<<SINGLE QUOTE>>,,,OCTAL
CHAR 7E,^!="!,<EQUAL,<DOUBLE QUOTE>>
;Uncommon punctuation
CHAR A1,176,TILDE,,,OCTAL
CHAR C0,173,<<LEFT BRACE>>,,,OCTAL
CHAR D0,175,<<RIGHT BRACE>>,,,OCTAL
CHAR E0,^!\!,<<REVERSE SLASH>>
;Special characters
CHAR 7,177,<RUBOUT>,,,OCTAL
CHAR 4A,133,<<LEFT SQUARE BRACKET>>,,,OCTAL
CHAR 4F,!,<<EBCDIC VERTICAL BAR/ASCII EXCLAMATION>>
CHAR 5A,135,<<EBCDIC EXCLAMATION/ASCII RIGHT SQUARE BRACKET>>,,,OCTAL
CHAR 6A,174,<<EBCDIC BROKEN VERTICAL BAR/ASCII VERTICAL BAR>>,,,OCTAL
;Suggested modifications are to take out all the special characters
; above and add the following:
;CHAR 5A,!,<EXCLAMATION>
;CHAR 4F,174,<VERTICAL BAR>,,,OCTAL
.PAGE
.EVEN
EBCTAB EBCASC
.PAGE
ASCTAB ASCEBC
.EVEN