summaryrefslogtreecommitdiff
path: root/asmmon.h
diff options
context:
space:
mode:
Diffstat (limited to 'asmmon.h')
-rw-r--r--asmmon.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/asmmon.h b/asmmon.h
index eadbc83..29924e9 100644
--- a/asmmon.h
+++ b/asmmon.h
@@ -3,7 +3,6 @@
#include <string.h>
#define MAX_TOK 0x1000
-#define TXS_MNE_ID 78 /* Used for a special case in the assembler. */
typedef struct tok token ;
typedef struct ln line ;
@@ -66,8 +65,11 @@ extern line *last_line;
extern token *tokens;
extern token *last_tok;
extern symbol *symbols;
+extern symbol *last_sym;
extern symbol *locals;
+extern symbol *last_loc;
extern fixup *fixups;
+extern fixup *last_fix;
extern uint8_t lex_type;
@@ -77,7 +79,8 @@ enum dir {
DIR_WORD,
DIR_DWORD,
DIR_QWORD,
- DIR_INCLUDE
+ DIR_INCLUDE,
+ DIR_RES
};
enum token {
@@ -161,8 +164,8 @@ static const uint8_t opcodes[OPNUM][10] = {
[CMP] = {0xB1, 0xB6, 0xFF, 0xFF, 0x25, 0x7D, 0x7C, 0xB4, 0xFF, 0xFF}, /* CMP */
[CPB] = {0x2A, 0x2D, 0xFF, 0xFF, 0x55, 0xAD, 0xAC, 0x2C, 0xFF, 0xFF}, /* CPB */
[CPS] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00}, /* CPS */
- [CPX] = {0x3A, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0xFF, 0xFF}, /* CPX */
- [CPY] = {0x4A, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4C, 0xFF, 0xFF}, /* CPY */
+ [CPX] = {0x3A, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0xFF, 0xFF}, /* CPX */
+ [CPY] = {0x4A, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4C, 0xFF, 0xFF}, /* CPY */
[DAB] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA2}, /* DAB */
[DEB] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2}, /* DEB */
[DEC] = {0xFF, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0xFF, 0x0A}, /* DEC */
@@ -227,13 +230,14 @@ static const uint8_t opcodes[OPNUM][10] = {
[XOR] = {0x41, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x44, 0xFF, 0xFF} /* XOR */
};
-static const char *dir_t[6] = {
+static const char *dir_t[7] = {
[0] = "org",
[1] = "byte",
[2] = "word",
[3] = "dword",
[4] = "qword",
- [5] = "include"
+ [5] = "include",
+ [6] = "res"
};
static const char *rs_t[4] = {