diff options
Diffstat (limited to 'emma.c')
-rw-r--r-- | emma.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -31,6 +31,7 @@ static const char id[]="$Id$"; #include <stdarg.h> #include "z80.h" +#include "expr.h" #define TRUE 1 @@ -202,7 +203,7 @@ static int StrEq(const char *a, const char *b) } -static int Expand(const char *p, long *res) +static int Expand(void *client, const char *p, long *res) { Z80State s; int ok=TRUE; @@ -312,10 +313,8 @@ static Z80Word Address(const char *p) { long e=0; - if (!Expand(p,&e)) - { - e=strtol(p,NULL,0); - } + if (!ExprEval(p,&e,Expand,z80)) + Log("%s\n",ExprError()); return (Z80Word)e; } @@ -331,10 +330,8 @@ static Z80Val Val(const char *p) { long e=0; - if (!Expand(p,&e)) - { - e=strtol(p,NULL,0); - } + if (!ExprEval(p,&e,Expand,z80)) + Log("%s\n",ExprError()); return (Z80Val)e; } @@ -724,8 +721,6 @@ static void DoRun(int no, const char *arg[]) static void DoUntil(int no, const char *arg[]) { - Log("No supported\n"); -#if 0 if (no<2) { Log("Missing arguments\n"); @@ -763,7 +758,6 @@ static void DoUntil(int no, const char *arg[]) } stop=FALSE; -#endif } |