From 3bd25d75bcad68055bb616dcc29dde8a2965965e Mon Sep 17 00:00:00 2001 From: borutr Date: Mon, 23 Feb 2009 22:05:06 +0000 Subject: [PATCH] * as/z80/z80mch.c: fixed bug #1704376: missing as-z80 errors git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5388 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 1 + as/z80/z80mch.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4717f92e..ab0d8b32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * as/z80/asexpr.c: fixed bug #1829678: Z-80 CP A, assembly it is already fixed for mcs51 and hc08 targets + * as/z80/z80mch.c: fixed bug #1704376: missing as-z80 errors 2009-02-22 Borut Razem diff --git a/as/z80/z80mch.c b/as/z80/z80mch.c index 9a8014f5..d9609938 100644 --- a/as/z80/z80mch.c +++ b/as/z80/z80mch.c @@ -549,10 +549,16 @@ struct mne *mp; case S_DJNZ: case S_JR: if ((v1 = admode(CND)) != 0 && rf != S_DJNZ) { + if ((v1 &= 0xFF) <= 0x18 && v1 != PO && v1 != PE && v1 != P && v1 != M) { + op += (v1+1)<<3; + } else { + aerr(); + } + comma(); + } #else /* GAMEBOY */ case S_JR: if ((v1 = admode(CND)) != 0) { -#endif /* GAMEBOY */ if ((v1 &= 0xFF) <= 0x18) { op += (v1+1)<<3; } else { @@ -560,6 +566,7 @@ struct mne *mp; } comma(); } +#endif /* GAMEBOY */ expr(&e2, 0); outab(op); if (e2.e_base.e_ap == NULL || e2.e_base.e_ap == dot.s_area) { -- 2.30.2