.TITLE TRNTBL - EBCDIC AND ASCII TRANSLATION TABLES .IDENT /1.1/ .ENABL LC ;+ ; ; Free software BY ; Project Software & Development, Inc. ; ; This software is furnished for free and may be used and copied as ; desired. This software or any other copies thereof may be provided ; or otherwise made available to any other person. No title to and ; ownership of the software is hereby transferred or allowed. ; ; The information in this software is subject to change without notice ; and should not be construed as a commitment by PROJECT SOFTWARE ; AND DEVELOPMENT, INC. ; ; PROJECT SOFTWARE assumes no responsibility for the use or reliability ; of this software on any equipment whatsoever. ; ; Project Software & Development, Inc. ; 14 Story St. ; Cambridge, Ma. 02138 ; 617-661-1444 ; ; ; Title: TRNTBL.MAC ; Author: Robin Miller ; Date: October 1981 ; ; Description: ; ; These tables are used for the translation of ASCII to EBCDIC and ; EBCDIC to ASCII data. They are based on the ANSI X3.26 - 1970 standard. ; This is the same standard which VAX/VMS V2.0 uses. ; ;- .ENABL AMA .SBTTL E2ATBL - EBCDIC TO ASCII TRANSLATE TABLE. ;+ ; ; E2ATBL - EBCDIC to ASCII Translate Table. ; ; This EBCDIC to ASCII translation table is based on ; ANSI X3.26 - 1970. All EBCDIC graphics are translated ; to the identical ASCII except for: ; ; EBCDIC graphic ASCII graphic ; -------------- ------------- ; cents sign [ (left square bracket) ; short vertical bar ! (exclamation point) ; logical not ^ (circumflex) ; ! (exclamation point) ] (right square bracket) ; ; Untranslatable codes map into 5C (hex) (the ASCII character "\"). ; Mapping them to 1A (hex) (the ASCII substitute character) would ; be more desirable, but would cause trouble with the file control ; system which recognizes 1A (hex) as a CTRL/Z signifying end-of-file. ; ;- .LIST BEX .ENABL LC E2ATBL:: ; 00, 01, 02, 03, 5C, 09, 5C, 7F .BYTE 00, 01, 02, 03, '\, 11, '\,177 ;X'00' - X'07' ; 5C, 5C, 5C, 0B, 0C, 0D, 0E, 0F .BYTE '\, '\, '\, 13, 14, 15, 16, 17 ;X'08' - X'0F' ; 10, 11, 12, 13, 5C, 5C, 08, 5C .BYTE 20, 21, 22, 23, '\, '\, 10, '\ ;X'10' - X'17' ; 18, 19, 5C, 5C, 1C, 1D, 1E, 1F .BYTE 30, 31, '\, '\, 34, 35, 36, 37 ;X'18' - X'1F' ; 5C, 5C, 5C, 5C, 5C, 0A, 17, 1B .BYTE '\, '\, '\, '\, '\, 12, 27, 33 ;X'20' - X'27' ; 5C, 5C, 5C, 5C, 5C, 05, 06, 07 .BYTE '\, '\, '\, '\, '\, 05, 06, 07 ;X'28' - X'2F' ; 5C, 5C, 16, 5C, 5C, 5C, 5C, 04 .BYTE '\, '\, 26, '\, '\, '\, '\, 04 ;X'30' - X'37' ; 5C, 5C, 5C, 5C, 14, 15, 5C, 1A .BYTE '\, '\, '\, '\, 24, 25, '\, 32 ;X'38' - X'3F' ; 20, 5C, 5C, 5C, 5C, 5C, 5C, 5C .BYTE 40, '\, '\, '\, '\, '\, '\, '\ ;X'40' - X'47' ; 5C, 5C, 5B, 2E, 3C, 28, 2B, 21 .BYTE '\, '\, '[, '., '<, '(, '+, '! ;X'48' - X'4F' ; 26, 5C, 5C, 5C, 5C, 5C, 5C, 5C .BYTE '&, '\, '\, '\, '\, '\, '\, '\ ;X'50' - X'57' ; 5C, 5C, 5D, 24, 2A, 29, 3B, 5E .BYTE '\, '\, '], '$, '*, '), ';, '^ ;X'58' - X'5F' ; 2D, 2F, 5C, 5C, 5C, 5C, 5C, 5C .BYTE '-, '/, '\, '\, '\, '\, '\, '\ ;X'60' - X'67' ; 5C, 5C, 7C, 2C, 25, 5F, 3E, 3F .BYTE '\, '\, '|, ',, '%, '_, '>, '? ;X'68' - X'6F' ; 5C, 5C, 5C, 5C, 5C, 5C, 5C, 5C .BYTE '\, '\, '\, '\, '\, '\, '\, '\ ;X'70' - X'77' ; 5C, 60, 3A, 23, 40, 27, 3D, 22 .BYTE '\, '`, ':, '#, '@, '', '=, '" ;X'78' - X'7F' ; 5C, 61, 62, 63, 64, 65, 66, 67 .BYTE '\, 'a, 'b, 'c, 'd, 'e, 'f, 'g ;X'80' - X'87' ; 68, 69, 5C, 5C, 5C, 5C, 5C, 5C .BYTE 'h, 'i, '\, '\, '\, '\, '\, '\ ;X'88' - X'8F' ; 5C, 6A, 6B, 6C, 6D, 6E, 6F, 70 .BYTE '\, 'j, 'k, 'l, 'm, 'n, 'o, 'p ;X'90' - X'97' ; 71, 72, 5C, 5C, 5C, 5C, 5C, 5C .BYTE 'q, 'r, '\, '\, '\, '\, '\, '\ ;X'98' - X'9F' ; 5C, 7E, 73, 74, 75, 76, 77, 78 .BYTE '\, '~, 's, 't, 'u, 'v, 'w, 'x ;X'A0' - X'A7' ; 79, 7A, 5C, 5C, 5C, 5C, 5C, 5C .BYTE 'y, 'z, '\, '\, '\, '\, '\, '\ ;X'A8' - X'AF' ; 5C, 5C, 5C, 5C, 5C, 5C, 5C, 5C .BYTE '\, '\, '\, '\, '\, '\, '\, '\ ;X'B0' - X'B7' ; 5C, 5C, 5C, 5C, 5C, 5C, 5C, 5C .BYTE '\, '\, '\, '\, '\, '\, '\, '\ ;X'B8' - X'BF' ; 7B, 41, 42, 43, 44, 45, 46, 47 .BYTE '{, 'A, 'B, 'C, 'D, 'E, 'F, 'G ;X'C0' - X'C7' ; 48, 49, 5C, 5C, 5C, 5C, 5C, 5C .BYTE 'H, 'I, '\, '\, '\, '\, '\, '\ ;X'C8' - X'CF' ; 7D, 4A, 4B, 4C, 4D, 4E, 4F, 50 .BYTE '}, 'J, 'K, 'L, 'M, 'N, 'O, 'P ;X'D0' - X'D7' ; 51, 52, 5C, 5C, 5C, 5C, 5C, 5C .BYTE 'Q, 'R, '\, '\, '\, '\, '\, '\ ;X'D8' - X'DF' ; 5C, 5C, 53, 54, 55, 56, 57, 58 .BYTE '\, '\, 'S, 'T, 'U, 'V, 'W, 'X ;X'E0' - X'E7' ; 59, 5A, 5C, 5C, 5C, 5C, 5C, 5C .BYTE 'Y, 'Z, '\, '\, '\, '\, '\, '\ ;X'E8' - X'EF' ; 30, 31, 32, 33, 34, 35, 36, 37 .BYTE '0, '1, '2, '3, '4, '5, '6, '7 ;X'F0' - X'F7' ; 38, 39, 5C, 5C, 5C, 5C, 5C, 5C .BYTE '8, '9, '\, '\, '\, '\, '\, '\ ;X'F8' - X'FF' .SBTTL A2ETBL - ASCII TO EBCDIC TRANSLATE TABLE. ;+ ; ; A2ETBL - ASCII to EBCDIC Translate Table. ; ; This ASCII to EBCDIC translation table is based on ; ANSI X3.26 - 1970. All ASCII graphics translate to ; their equivalent EBCDIC graphic except for: ; ; ASCII graphic EBCDIC graphic ; ------------- -------------- ; [ (left square bracket) cents sign ; ! (exclamation point) short vertical bar ; ^ (circumflex) logical not ; ] (right square bracket) ! (exclamation point) ; ; Untranslatable codes map into 3F (hex) (the EBCDIC ; character substitute (last 128. codes). ; ;- .NLIST BEX,MEB A2ETBL:: ; NUL,SOH,STX,ETX,EOT,ENQ,ACK,BEL ; 00, 01, 02, 03, 37, 2D, 2E, 2F .BYTE 000,001,002,003,067,055,056,057 ;000 - 007 ; BS, HT, LF, VT, FF, CR, SO, SI ; 16, 05, 25, 0B, 0C, 0D, 0E, 0F .BYTE 026,005,045,013,014,015,016,017 ;010 - 017 ; DLE,DC1,DC2, TM,DC4,NAK,SYN,ETB ; 10, 11, 12, 13, 3C, 3D, 32, 26 .BYTE 020,021,022,023,074,075,062,046 ;020 - 027 ; CAN, EM,SUB,ESC,IFS,IGS,IRS,IUS ; 18, 19, 3F, 27, 1C, 1D, 1E, 1F .BYTE 030,031,077,047,034,035,036,037 ;030 - 037 ; SP, |, ", #, $, %, &, ' ; 40, 4F, 7F, 7B, 5B, 6C, 50, 7D .BYTE 100,117,177,173,133,154,120,175 ;040 - 047 ; (, ), *, +, ,, -, ., / ; 4D, 5D, 5C, 4E, 6B, 60, 4B, 61 .BYTE 115,135,134,116,153,140,113,141 ;050 - 057 ; 0, 1, 2, 3, 4, 5, 6, 7 ; F0, F1, F2, F3, F4, F5, F6, F7 .BYTE 360,361,362,363,364,365,366,367 ;060 - 067 ; 8, 9, :, ;, <, =, >, ? ; F8, F9, 7A, 5E, 4C, 7E, 6E, 6F .BYTE 370,371,172,136,114,176,156,157 ;070 - 077 ; @, A, B, C, D, E, F, G ; 7C, C1, C2, C3, C4, C5, C6, C7 .BYTE 174,301,302,303,304,305,306,307 ;100 - 107 ; H, I, J, K, L, M, N, O ; C8, C9, D1, D2, D3, D4, D5, D6 .BYTE 310,311,321,322,323,324,325,326 ;110 - 117 ; P, Q, R, S, T, U, V, W ; D7, D8, D9, E2, E3, E4, E5, E6 .BYTE 327,330,331,342,343,344,345,346 ;120 - 127 ; X, Y, Z,cents,\, !, ^, _ ; E7, E8, E9, 4A, E0, 5A, 5F, 6D .BYTE 347,350,351,112,340,132,137,155 ;130 - 137 ; `, a, b, c, d, e, f, g ; 79, 81, 82, 83, 84, 85, 86, 87 .BYTE 171,201,202,203,204,205,206,207 ;140 - 147 ; h, i, j, k, l, m, n, o ; 88, 89, 91, 92, 93, 94, 95, 96 .BYTE 210,211,221,222,223,224,225,226 ;150 - 157 ; p, q, r, s, t, u, v, w ; 97, 98, 99, A2, A3, A4, A5, A6 .BYTE 227,230,231,242,243,244,245,246 ;160 - 167 ; x, y, z, {, |, }, ~,DEL ; A7, A8, A9, C0, 6A, D0, A1, 07 .BYTE 247,250,251,300,152,320,241,007 ;170 - 177 .REPT 128. ;200 - 377 .BYTE 77 ;HEX 3F = SUB .ENDR .LIST MEB .END