Commit | Line | Data |
---|---|---|
fecd2382 | 1 | /* hex_value.c - char=>radix-value - |
5a051773 | 2 | Copyright (C) 1987, 1990, 1991, 1992, 1994 Free Software Foundation, Inc. |
6efd877d | 3 | |
a39116f1 | 4 | This file is part of GAS, the GNU Assembler. |
6efd877d | 5 | |
a39116f1 RP |
6 | GAS is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
6efd877d | 10 | |
a39116f1 RP |
11 | GAS is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
6efd877d | 15 | |
a39116f1 RP |
16 | You should have received a copy of the GNU General Public License |
17 | along with GAS; see the file COPYING. If not, write to | |
18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
fecd2382 | 19 | |
fecd2382 RP |
20 | /* |
21 | * Export: Hex_value[]. Converts digits to their radix-values. | |
22 | * As distributed assumes 8 bits per char (256 entries) and ASCII. | |
23 | */ | |
24 | ||
25 | #define __ (42) /* blatently illegal digit value */ | |
a39116f1 | 26 | /* exceeds any normal radix */ |
3340f7e5 | 27 | |
5a051773 SS |
28 | #if (__STDC__ != 1) |
29 | #ifndef const | |
30 | #define const /* empty */ | |
fecd2382 | 31 | #endif |
5a051773 SS |
32 | #endif |
33 | ||
fecd2382 | 34 | const char |
6efd877d KR |
35 | hex_value[256] = |
36 | { /* for fast ASCII -> binary */ | |
37 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
38 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
39 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
40 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, __, __, __, __, __, __, | |
41 | __, 10, 11, 12, 13, 14, 15, __, __, __, __, __, __, __, __, __, | |
42 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
43 | __, 10, 11, 12, 13, 14, 15, __, __, __, __, __, __, __, __, __, | |
44 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
45 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
46 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
47 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
48 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
49 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
50 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
51 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, | |
52 | __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __ | |
53 | }; | |
fecd2382 | 54 | |
b9419dd2 | 55 | #ifdef VMS |
6efd877d | 56 | dummy2 () |
fecd2382 RP |
57 | { |
58 | } | |
6efd877d | 59 | |
fecd2382 | 60 | #endif |
8b228fe9 RP |
61 | |
62 | /* end of hex_value.c */ |