From: Alan Cox Date: Thu, 2 Nov 2017 18:18:09 +0000 (+0000) Subject: as: bracket or square... X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5fa1e6272a673466f8c20e047418065ac73423f3;p=FUZIX.git as: bracket or square... Z80 and 6502 use () to indicate a layer of indirection, so the assembler uses [] for expressions 6809 uses [] for indirect, so we need to use () for expressions --- diff --git a/Applications/MWC/cmd/asz80/as3.c b/Applications/MWC/cmd/asz80/as3.c index f86da3c5..b448ac77 100644 --- a/Applications/MWC/cmd/asz80/as3.c +++ b/Applications/MWC/cmd/asz80/as3.c @@ -158,12 +158,21 @@ void expr2(ADDR *ap) char id[NCPS]; c = getnb(); +#ifndef TARGET_USES_SQUARE if (c == '[') { expr1(ap, LOPRI, 0); if (getnb() != ']') qerr(SQUARE_EXPECTED); return; } +#else + if (c == '(') { + expr1(ap, LOPRI, 0); + if (getnb() != ')') + qerr(BRACKET_EXPECTED); + return; + } +#endif if (c == '-') { expr1(ap, HIPRI, 0); istuser(ap);