hex-value.c 2.1 KB

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