summaryrefslogtreecommitdiff
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lexer.c b/lexer.c
index 4c398a4..77dff16 100644
--- a/lexer.c
+++ b/lexer.c
@@ -16,10 +16,12 @@ uint16_t mksymbol(const char *name, uint64_t val, uint8_t def, uint8_t useid, ui
uint8_t flag = 0;
for (; i < sym_count; i++) {
if (useid) {
- flag = id == symbols[i]->id;
+ flag = (id == symbols[i]->id);
} else {
if (name[0] == symbols[i]->name[0]) {
flag = !strcmp(name, symbols[i]->name);
+ } else {
+ continue;
}
}
if (flag) {
@@ -199,7 +201,7 @@ uint16_t reslv_fixups(struct line *l, uint8_t dbg) {
for (; fixups[j]; j++) {
if (fixups[j]->s->def) {
if (dbg) {
- printf("reslv_fixups(): Symbol ID: $%X, Symbol Name: %s.\n", fixups[j]->s->id, fixups[j]->s->name);
+ printf("reslv_fixups(): Symbol ID: $%X, Symbol Name: %s, Symbol Value: $%X.\n", fixups[j]->s->id, fixups[j]->s->name, fixups[j]->s->val);
}
l[fixups[j]->ln].sym = fixups[j]->s->id;
} else {
@@ -550,6 +552,7 @@ uint64_t lex(char *str, struct line *l, uint64_t address, uint8_t dbg) {
}
if (l[line].dir == DIR_INCLUDE) {
l[line].incl = strid;
+ incl[inc_file++] = strid;
}
lex_type = TOK_STRING;
break;