From 15cab71c69a8d394a4babc68334dac7f405dca8f Mon Sep 17 00:00:00 2001 From: vav Date: Tue, 17 Oct 2000 09:13:24 +0000 Subject: [PATCH] *fixed problem with non-existent error messages about short jumps in assembler *assembler return code is sane now git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@471 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- as/mcs51/asmain.c | 2 +- as/mcs51/i51mch.c | 4 ++-- as/z80/asmain.c | 2 +- as/z80/z80mch.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/as/mcs51/asmain.c b/as/mcs51/asmain.c index 42c70a5d..32cde0eb 100644 --- a/as/mcs51/asmain.c +++ b/as/mcs51/asmain.c @@ -317,7 +317,7 @@ char *argv[]; if (lflag) { lstsym(lfp); } - asexit(aserr); + asexit(aserr != 0); return 0; } diff --git a/as/mcs51/i51mch.c b/as/mcs51/i51mch.c index 9f1ceac4..0446fb26 100644 --- a/as/mcs51/i51mch.c +++ b/as/mcs51/i51mch.c @@ -424,7 +424,7 @@ struct mne *mp; v1 = -3; else v1 = e1.e_addr - dot.s_addr - 1; - if ((v1 < -128) || (v1 > 127)) + if (pass==2 && ((v1 < -128) || (v1 > 127))) aerr(); outab(v1); } else { @@ -443,7 +443,7 @@ struct mne *mp; v1 = -2; else v1 = e1.e_addr - dot.s_addr - 1; - if ((v1 < -128) || (v1 > 127)) + if (pass == 2 && ((v1 < -128) || (v1 > 127))) aerr(); outab(v1); } else { diff --git a/as/z80/asmain.c b/as/z80/asmain.c index a74d7648..e1686ccc 100644 --- a/as/z80/asmain.c +++ b/as/z80/asmain.c @@ -319,7 +319,7 @@ main(int argc, char **argv) if (lflag) { lstsym(lfp); } - asexit(aserr); + asexit(aserr != 0); /* Never reached */ return 0; } diff --git a/as/z80/z80mch.c b/as/z80/z80mch.c index 6758c005..9e45ece7 100644 --- a/as/z80/z80mch.c +++ b/as/z80/z80mch.c @@ -557,7 +557,7 @@ struct mne *mp; outab(op); if (e2.e_base.e_ap == NULL || e2.e_base.e_ap == dot.s_area) { v2 = e2.e_addr - dot.s_addr - 1; - if ((v2 < -128) || (v2 > 127)) + if (pass == 2 && ((v2 < -128) || (v2 > 127))) aerr(); outab(v2); } else { -- 2.30.2