Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
3.1 KiB

  1. /* asminptb.c -- microsoft 80x86 assembler
  2. **
  3. ** microsoft (r) macro assembler
  4. ** copyright (c) microsoft corp 1986. all rights reserved
  5. **
  6. ** randy nevin
  7. **
  8. ** 10/90 - Quick conversion to 32 bit by Jeff Spencer
  9. */
  10. #define ASMINP /* prevent external declaration of _asmctype_ */
  11. #include <stdio.h>
  12. #include "asm86.h"
  13. #include "asmfcn.h"
  14. #include "asmctype.h"
  15. #define ID (_AT | _A1 | _AF)
  16. #define IDO (_AT | _A1)
  17. #define DIG (_AT | _AF)
  18. #define TERM (_AL | _AZ)
  19. #define SIGN (_AS | _AF | _AO)
  20. #define DOT (_A1 | _AF | _AO)
  21. #define BAD 0
  22. #define BRK 0
  23. /* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f */
  24. UCHAR _asmctype_[256] = {
  25. TERM, BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, _AB, _AL, BAD, BAD, _AL, BAD, BAD, /* 0x */
  26. BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD, /* 1x */
  27. _AB, BAD, BAD, BAD, IDO, IDO, BAD, BAD, _AO, _AO, _AO,SIGN, BAD,SIGN, DOT, _AO, /* 2x */
  28. DIG, DIG, DIG, DIG, DIG, DIG, DIG, DIG, DIG, DIG, _AO, _AZ, BAD, BAD, BAD, IDO, /* 3x */
  29. IDO, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, /* 4x */
  30. ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, _AO, BAD, _AO, BAD, IDO, /* 5x */
  31. BAD, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, /* 6x */
  32. ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, ID, BAD, BAD, BAD, BAD, BAD /* 7x */
  33. };
  34. /* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f */
  35. char _asmcupper_[] = {
  36. 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, /* 0x */
  37. 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, /* 1x */
  38. ' ', '!', '"', '#', '$', '%', '&','\'', '(', ')', '*', '+', ',', '-', '.', '/', /* 2x */
  39. '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', /* 3x */
  40. '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', /* 4x */
  41. 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[','\\', ']', '^', '_', /* 5x */
  42. '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', /* 6x */
  43. 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~',0x7F /* 7x */
  44. };
  45. /* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f */
  46. char _asmTokenMap_[] = {
  47. BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, /* 0x */
  48. BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, /* 1x */
  49. BRK, BRK, BRK, BRK, '$', '%', BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, BRK, /* 2x */
  50. '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', BRK, BRK, BRK, BRK, BRK, '?', /* 3x */
  51. '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', /* 4x */
  52. 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', BRK, BRK, BRK, BRK, '_', /* 5x */
  53. BRK, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', /* 6x */
  54. 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', BRK, BRK, BRK, BRK, BRK /* 7x */
  55. };