summaryrefslogtreecommitdiff
path: root/lib/assembler.c
diff options
context:
space:
mode:
authorPixel <>2001-04-16 19:31:22 +0000
committerPixel <>2001-04-16 19:31:22 +0000
commit9608fc23272222a5472444514c044b736108e33d (patch)
tree115fad27c37ef138c6d5f3cb9fae50696a2c77fd /lib/assembler.c
parent7a31dae61cabad2e6e237948b7b88e4d795dbb1a (diff)
Bleh
Diffstat (limited to 'lib/assembler.c')
-rw-r--r--lib/assembler.c40
1 files changed, 34 insertions, 6 deletions
diff --git a/lib/assembler.c b/lib/assembler.c
index 4abdb62..3fda135 100644
--- a/lib/assembler.c
+++ b/lib/assembler.c
@@ -1812,6 +1812,40 @@ void asm_eof(FILE * f)
break;
}
}
+ if (ttext->Expr->op == OP_DECAL) {
+ if ((ttext->Expr->child->e_subtype == E_LABEL) && (ttext->Expr->child->next->e_subtype == E_VALUE)) {
+ a = ttext->Expr->child->next->avalue;
+ nbsymbols++;
+ writeword(1, f2, 1);
+ writeword(ttext->offset, f2, 1);
+ writeword(strlen(ttext->Expr->child->symbol), f2, 1);
+ writestring(ttext->Expr->child->symbol, f2);
+ nbe++;
+ break;
+ }
+ }
+ if (ttext->Expr->op == OP_PLUS) {
+ if (((ttext->Expr->child->e_subtype == E_LABEL) && (ttext->Expr->child->next->e_subtype == E_VALUE)) || ((ttext->Expr->child->e_subtype == E_VALUE) && (ttext->Expr->child->next->e_subtype == E_LABEL))) {
+ if (ttext->Expr->child->e_subtype == E_LABEL) {
+ a = ttext->Expr->child->next->avalue;
+ nbsymbols++;
+ writeword(1, f2, 1);
+ writeword(ttext->offset, f2, 1);
+ writeword(strlen(ttext->Expr->child->symbol), f2, 1);
+ writestring(ttext->Expr->child->symbol, f2);
+ nbe++;
+ } else {
+ a = ttext->Expr->child->avalue;
+ nbsymbols++;
+ writeword(1, f2, 1);
+ writeword(ttext->offset, f2, 1);
+ writeword(strlen(ttext->Expr->child->next->symbol), f2, 1);
+ writestring(ttext->Expr->child->next->symbol, f2);
+ nbe++;
+ }
+ break;
+ }
+ }
if (ttext->Expr->op != OP_FUNC_CALL) {
exception(1, _("Can't evaluate expression for a direct value"));
}
@@ -1890,12 +1924,6 @@ void asm_eof(FILE * f)
nbe++;
break;
case E_OPERATION:
- if (tdata->Expr->op == OP_DIRECT) {
- if (tdata->Expr->child->e_subtype == E_VALUE) {
- a = tdata->Expr->child->avalue;
- break;
- }
- }
if (tdata->Expr->op != OP_FUNC_CALL) {
exception(1, _("Can't evaluate expression for a direct value"));
}