From: Alan Cox Date: Wed, 15 Nov 2017 23:06:48 +0000 (+0000) Subject: as: Fix RST handling X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1434385517dab2c2786a4ad8662131a6d43b3546;p=FUZIX.git as: Fix RST handling The old code expected the Intel 8080 syntax for RST not the Z80 one. --- diff --git a/Applications/MWC/cmd/asz80/as1.c b/Applications/MWC/cmd/asz80/as1.c index 74b444f6..83400181 100644 --- a/Applications/MWC/cmd/asz80/as1.c +++ b/Applications/MWC/cmd/asz80/as1.c @@ -248,11 +248,10 @@ loop: case TRST: getaddr(&a1); istuser(&a1); - if (a1.a_value < 8) { - outab(OPRST|(a1.a_value<<3)); - break; - } - aerr(INVALID_CONST); + if ((a1.a_value & 7) || a1.a_value < 0 || a1.a_value > 0x38) + aerr(INVALID_CONST); + else + outab(OPRST|a1.a_value); break; case TREL: