From 1434385517dab2c2786a4ad8662131a6d43b3546 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 15 Nov 2017 23:06:48 +0000 Subject: [PATCH] as: Fix RST handling The old code expected the Intel 8080 syntax for RST not the Z80 one. --- Applications/MWC/cmd/asz80/as1.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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: -- 2.34.1