From 723497af6926142044f01a23f67f5bf19c8ffc64 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sat, 18 May 2019 20:37:34 -0400 Subject: [PATCH] zasm: can now assemble zasm/directive.asm! --- apps/zasm/directive.asm | 9 ++++----- tools/tests/zasm/test7.asm | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/zasm/directive.asm b/apps/zasm/directive.asm index de1dcf4..fee826e 100644 --- a/apps/zasm/directive.asm +++ b/apps/zasm/directive.asm @@ -33,7 +33,8 @@ handleDB: call enterDoubleQuotes jr z, .stringLiteral call parseExpr - ld a, ixl + push ix \ pop hl + ld a, l call ioPutC .stopStrLit: call readComma @@ -91,8 +92,7 @@ handleEQU: call parseExpr jr nz, .error ld hl, DIREC_SCRATCHPAD - ld d, ixh - ld e, ixl + push ix \ pop de call symRegister jr .end .error: @@ -137,7 +137,6 @@ parseDirective: ld de, directiveHandlers call addDE call intoDE - ld ixh, d - ld ixl, e + push de \ pop ix pop de jp (ix) diff --git a/tools/tests/zasm/test7.asm b/tools/tests/zasm/test7.asm index 880b61b..99ddf41 100644 --- a/tools/tests/zasm/test7.asm +++ b/tools/tests/zasm/test7.asm @@ -22,6 +22,8 @@ #include "zasm/parse.asm" .equ TOK_RAMSTART SYM_RAMEND #include "zasm/tok.asm" +.equ DIREC_RAMSTART TOK_RAMEND +#include "zasm/directive.asm" zasmIsFirstPass: nop @@ -32,5 +34,5 @@ zasmIsLocalPass: getInstID: nop -getDirectiveID: +parseExpr: nop