errors.c 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #include "syshead.h"
  2. #include "const.h"
  3. #include "errors.h"
  4. /* Error codes. */
  5. /* Syntax errors. */
  6. PUBLIC char COMEXP[] = "comma expected";
  7. PUBLIC char DELEXP[] = "delimiter expected";
  8. PUBLIC char FACEXP[] = "factor expected";
  9. PUBLIC char IREGEXP[] = "index register expected";
  10. PUBLIC char LABEXP[] = "label expected";
  11. PUBLIC char LPEXP[] = "left parentheses expected";
  12. PUBLIC char OPEXP[] = "opcode expected";
  13. PUBLIC char RBEXP[] = "right bracket expected";
  14. PUBLIC char REGEXP[] = "register expected";
  15. PUBLIC char RPEXP[] = "right parentheses expected";
  16. PUBLIC char SPEXP[] = "space expected";
  17. /* Expression errors. */
  18. PUBLIC char ABSREQ[] = "absolute expression required";
  19. PUBLIC char NONIMPREQ[] = "non-imported expression required";
  20. PUBLIC char RELBAD[] = "relocation impossible";
  21. /* Label errors. */
  22. PUBLIC char ILLAB[] = "illegal label";
  23. PUBLIC char MACUID[] = "MACRO used as identifier";
  24. PUBLIC char MISLAB[] = "missing label";
  25. PUBLIC char MNUID[] = "opcode used as identifier";
  26. PUBLIC char REGUID[] = "register used as identifier";
  27. PUBLIC char RELAB[] = "redefined label";
  28. PUBLIC char UNBLAB[] = "unbound label";
  29. PUBLIC char UNLAB[] = "undefined label";
  30. PUBLIC char VARLAB[] = "variable used as label";
  31. /* Addressing errors. */
  32. PUBLIC char ABOUNDS[] = "address out of bounds";
  33. PUBLIC char DBOUNDS[] = "data out of bounds";
  34. PUBLIC char ILLMOD[] = "illegal address mode";
  35. PUBLIC char ILLREG[] = "illegal register";
  36. /* Control structure errors. */
  37. PUBLIC char ELSEBAD[] = "no matching IF";
  38. PUBLIC char ENDBBAD[] = "no matching BLOCK";
  39. PUBLIC char EOFBLOCK[] = "end of file in BLOCK";
  40. PUBLIC char EOFIF[] = "end of file in IF";
  41. PUBLIC char EOFLC[] = "location counter was undefined at end";
  42. PUBLIC char EOFMAC[] = "end of file in MACRO";
  43. PUBLIC char FAILERR[] = "user-generated error";
  44. /* Overflow errors. */
  45. PUBLIC char BLOCKOV[] = "BLOCK stack overflow";
  46. PUBLIC char BWRAP[] = "binary file wrap-around";
  47. PUBLIC char COUNTOV[] = "counter overflow";
  48. PUBLIC char COUNTUN[] = "counter underflow";
  49. PUBLIC char GETOV[] = "GET stack overflow";
  50. PUBLIC char IFOV[] = "IF stack overflow";
  51. PUBLIC char LINLONG[] = "line too long";
  52. PUBLIC char MACOV[] = "MACRO stack overflow";
  53. PUBLIC char OBJSYMOV[] = "object symbol table overflow";
  54. PUBLIC char OWRITE[] = "program overwrite";
  55. PUBLIC char PAROV[] = "parameter table overflow";
  56. PUBLIC char SYMOV[] = "symbol table overflow";
  57. PUBLIC char SYMOUTOV[] = "output symbol table overflow";
  58. /* I/O errors. */
  59. PUBLIC char OBJOUT[] = "error writing object file";
  60. /* Miscellaneous errors. */
  61. PUBLIC char AL_AX_EAX_EXP[] = "al ax or eax expected";
  62. PUBLIC char CTLINS[] = "control character in string";
  63. PUBLIC char FURTHER[] = "futher errors suppressed";
  64. PUBLIC char ILL_IMM_MODE[] = "illegal immediate mode";
  65. PUBLIC char ILL_IND_TO_IND[] = "illegal indirect to indirect";
  66. PUBLIC char ILL_IND[] = "illegal indirection";
  67. PUBLIC char ILL_IND_PTR[] = "illegal indirection from previous 'ptr'";
  68. PUBLIC char ILL_SCALE[] = "illegal scale";
  69. PUBLIC char ILL_SECTION[] = "illegal section";
  70. PUBLIC char ILL_SEG_REG[] = "illegal segment register";
  71. PUBLIC char ILL_SOURCE_EA[] = "illegal source effective address";
  72. PUBLIC char ILL_SIZE[] = "illegal size";
  73. PUBLIC char IMM_REQ[] = "immediate expression expected";
  74. PUBLIC char INDEX_REG_EXP[] = "index register expected";
  75. PUBLIC char IND_REQ[] = "indirect expression required";
  76. PUBLIC char MISMATCHED_SIZE[] = "mismatched size";
  77. PUBLIC char NOIMPORT[] = "no imports with binary file output";
  78. PUBLIC char REENTER[] = "multiple ENTER pseudo-ops";
  79. PUBLIC char REL_REQ[] = "relative expression required";
  80. PUBLIC char REPEATED_DISPL[] = "repeated displacement";
  81. PUBLIC char SEGREL[] = "segment or relocatability redefined";
  82. PUBLIC char SEG_REG_REQ[] = "segment register required";
  83. PUBLIC char SIZE_UNK[] = "size unknown";
  84. PUBLIC char UNKNOWN_ESCAPE_SEQUENCE[] = "unknown escape sequence";
  85. PUBLIC char FP_REG_REQ[] = "FP register required";
  86. PUBLIC char FP_REG_NOT_ALLOWED[] = "FP register not allowed";
  87. PUBLIC char ILL_FP_REG[] = "illegal FP register";
  88. PUBLIC char ILL_FP_REG_PAIR[] = "illegal FP register pair";
  89. PUBLIC char JUNK_AFTER_OPERANDS[] = "junk after operands";
  90. PUBLIC char ALREADY[] = "already defined";
  91. PUBLIC char UNSTABLE_LABEL[] = "label moved in last pass add -O?";
  92. PUBLIC char REPNE_STRING[] = "CMPS or SCAS expected";
  93. PUBLIC char REP_STRING[] = "string instruction expected";
  94. /* Warnings. */
  95. PUBLIC char CPUCLASH[] = "instruction illegal for current cpu";
  96. PUBLIC char SHORTB[] = "short branch would do";