basic: parseExpr --> parseExprDE

This commit is contained in:
Virgil Dupras 2019-12-23 19:01:03 -05:00
parent 476178ee7c
commit 5301200d6f
2 changed files with 9 additions and 6 deletions

View File

@ -131,11 +131,12 @@ parseTruth:
; place their corresponding values in HL and DE.
.parseLeftRight:
; let's start with HL
call parseExpr
ret nz
push ix ; --> lvl 1. save (HL) value in stack.
ex de, hl
push de ; --> lvl 1
call parseExprDE
pop hl ; <-- lvl 1, orig DE
ret nz
pop hl ; <-- lvl 1. restore.
push de ; --> lvl 1. save HL value in stack.
; Now, for DE. (DE) is now in HL
call parseExprDE ; DE in place
pop hl ; <-- lvl 1. restore saved HL
ret

View File

@ -85,11 +85,13 @@ rdWord:
; Read word from HL in SCRATCHPAD and then intepret that word as an expression.
; Put the result in IX.
; Z for success.
; TODO: put result in DE
rdExpr:
ld de, SCRATCHPAD
call rdWord
push hl
ex de, hl
call parseExpr
call parseExprDE
push de \ pop ix
pop hl
ret