--- hatari/src/uae-cpu/readcpu.c 2019/04/01 07:12:19 1.1.1.5 +++ hatari/src/uae-cpu/readcpu.c 2019/04/09 08:55:51 1.1.1.12 @@ -7,10 +7,18 @@ * * Adaptation to Hatari by Thomas Huth * - * This file is distributed under the GNU Public License, version 2 or at - * your option any later version. Read the file gpl.txt for details. + * This file is distributed under the GNU General Public License, version 2 + * or at your option any later version. Read the file gpl.txt for details. */ -char ReadCpu_rcsid[] = "Hatari $Id: readcpu.c,v 1.1.1.5 2019/04/01 07:12:19 root Exp $"; + + +/* 2008/04/26 [NP] Handle sz_byte for Areg as a valid srcmode if current instruction is a MOVE */ +/* (e.g. move.b a1,(a0) ($1089)) (fix Blood Money on Superior 65) */ +/* 2014/08/15 [NP] Cancel change from 2008/04/26, sz_byte for Areg is not valid for MOVE, */ +/* 'move.b a1,(a0)' should give an illegal exception */ + + +const char ReadCpu_fileid[] = "Hatari readcpu.c : " __DATE__ " " __TIME__; #include #include @@ -19,7 +27,7 @@ char ReadCpu_rcsid[] = "Hatari $Id: read int nr_cpuop_funcs; -struct mnemolookup lookuptab[] = { +const struct mnemolookup lookuptab[] = { { i_ILLG, "ILLEGAL" }, { i_OR, "OR" }, { i_CHK, "CHK" }, @@ -292,7 +300,7 @@ static void build_insn (int insn) bitval[bitc] = bitval[bitC]; pos = 0; - while (opcstr[pos] && !isspace(opcstr[pos])) { + while (opcstr[pos] && !isspace((unsigned)opcstr[pos])) { if (opcstr[pos] == '.') { pos++; switch (opcstr[pos]) { @@ -327,7 +335,7 @@ static void build_insn (int insn) mnemonic[mnp] = 0; /* now, we have read the mnemonic and the size */ - while (opcstr[pos] && isspace(opcstr[pos])) + while (opcstr[pos] && isspace((unsigned)opcstr[pos])) pos++; /* A goto a day keeps the D******a away. */