1 /* 2 * Copyright (c) 1988 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that this notice is preserved and that due credit is given 7 * to the University of California at Berkeley. The name of the University 8 * may not be used to endorse or promote products derived from this 9 * software without specific prior written permission. This software 10 * is provided ``as is'' without express or implied warranty. 11 */ 12 13 #ifndef lint 14 static char sccsid[] = "@(#)asc_ebc.c 3.2 (Berkeley) 03/28/88"; 15 #endif /* not lint */ 16 17 /* 18 * Ascii<->Ebcdic translation tables. 19 */ 20 21 #include "asc_ebc.h" 22 23 unsigned char asc_ebc[NASCII] = { 24 25 /* 00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 26 /* 08 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 27 /* 10 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 /* 18 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 29 /* 20 */ 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 30 /* 28 */ 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, 31 /* 30 */ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 32 /* 38 */ 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, 33 /* 40 */ 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 34 /* 48 */ 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 35 /* 50 */ 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 36 /* 58 */ 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D, 37 /* 60 */ 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 38 /* 68 */ 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 39 /* 70 */ 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 40 /* 78 */ 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x00, 41 42 }; 43 44 /* 45 * ebcdic to ascii translation tables 46 */ 47 48 unsigned char ebc_asc[NEBC] = { 49 /* 00 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 50 /* 08 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 51 /* 10 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 52 /* 18 */ ' ', ' ', ' ', ' ', '*', ' ', ';', ' ', 53 /* 20 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 54 /* 28 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 55 /* 30 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 56 /* 38 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 57 /* 40 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 58 59 /* 48 */ ' ', ' ', 60 #if !defined(MSDOS) 61 /* 4A */ '\\', 62 #else /* !defined(MSDOS) */ 63 /* 4A */ '\233', /* PC cent sign */ 64 #endif /* !defined(MSDOS) */ 65 /* 4B */ '.', '<', '(', '+', '|', 66 67 /* 50 */ '&', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 68 /* 58 */ ' ', ' ', '!', '$', '*', ')', ';', '^', 69 /* 60 */ '-', '/', ' ', ' ', ' ', ' ', ' ', ' ', 70 /* 68 */ ' ', ' ', '|', ',', '%', '_', '>', '?', 71 /* 70 */ ' ', '^', ' ', ' ', ' ', ' ', ' ', ' ', 72 /* 78 */ ' ', '`', ':', '#', '@', '\'', '=', '"', 73 /* 80 */ ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 74 /* 88 */ 'h', 'i', ' ', ' ', ' ', ' ', ' ', ' ', 75 /* 90 */ ' ', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 76 /* 98 */ 'q', 'r', ' ', ' ', ' ', ' ', ' ', ' ', 77 /* A0 */ ' ', '~', 's', 't', 'u', 'v', 'w', 'x', 78 /* A8 */ 'y', 'z', ' ', ' ', ' ', '[', ' ', ' ', 79 /* B0 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 80 /* B8 */ ' ', ' ', ' ', ' ', ' ', ']', ' ', ' ', 81 /* C0 */ '{', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 82 /* C8 */ 'H', 'I', ' ', ' ', ' ', ' ', ' ', ' ', 83 /* D0 */ '}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 84 /* D8 */ 'Q', 'R', ' ', ' ', ' ', ' ', ' ', ' ', 85 /* E0 */ '\\', ' ', 'S', 'T', 'U', 'V', 'W', 'X', 86 /* E8 */ 'Y', 'Z', ' ', ' ', ' ', ' ', ' ', ' ', 87 /* F0 */ '0', '1', '2', '3', '4', '5', '6', '7', 88 /* F8 */ '8', '9', ' ', ' ', ' ', ' ', ' ', ' ', 89 }; 90