diff --git a/docs/Changes.txt b/docs/Changes.txt index ca7fb57..5ebfe53 100644 --- a/docs/Changes.txt +++ b/docs/Changes.txt @@ -12,6 +12,14 @@ platform used. There should be another help file in this archive outlining the platform specific changes. +---------------------------------------------------------------------- +Section: New in release 0.94.9 +---------------------------------------------------------------------- + +C-style equality checking ("==" operator) is now recognized (but gives + a warning). Thanks to groepaz for the suggestion. + + ---------------------------------------------------------------------- Section: New in release 0.94.8 ---------------------------------------------------------------------- diff --git a/docs/Errors.txt b/docs/Errors.txt index 1575a79..5f74d3a 100644 --- a/docs/Errors.txt +++ b/docs/Errors.txt @@ -52,6 +52,9 @@ Bug in ACME, code follows A situation has been encountered implying there is a bug in ACME. See the last section in this file. +C-style "==" comparison detected + To check for equality, use a single '=' character instead. + Implicit label definition not in leftmost column. An implicit label definition has blanks before the label name. Imagine this source code: diff --git a/src/acme.c b/src/acme.c index 1a59ae8..b87caa9 100644 --- a/src/acme.c +++ b/src/acme.c @@ -15,9 +15,9 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -#define RELEASE "0.94.8" // update before release (FIXME) +#define RELEASE "0.94.9" // update before release (FIXME) #define CODENAME "Zarquon" // update before release -#define CHANGE_DATE "11 Mar" // update before release +#define CHANGE_DATE "7 May" // update before release #define CHANGE_YEAR "2014" // update before release //#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/" // FIXME #define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME diff --git a/src/alu.c b/src/alu.c index c62807b..c94c18c 100644 --- a/src/alu.c +++ b/src/alu.c @@ -763,7 +763,12 @@ static void expect_dyadic_operator(void) case '=': // is equal operator = &ops_equals; - goto get_byte_and_push_dyadic; + // if it's "==", accept but warn + if (GetByte() == '=') { + Throw_warning("C-style \"==\" comparison detected"); + goto get_byte_and_push_dyadic; + } + goto push_dyadic; case ')': // closing parenthesis operator = &ops_closing; diff --git a/src/mnemo.c b/src/mnemo.c index 03ee198..de83688 100644 --- a/src/mnemo.c +++ b/src/mnemo.c @@ -136,7 +136,7 @@ SCS jump_lind[] = { 0, 0, 0, 0xdc00, 0xdc00, 0, // error message strings static const char exception_illegal_combination[] = "Illegal combination of command and addressing mode."; -static const char exception_highbyte_zero[]= "Using oversized addressing mode."; +static const char exception_highbyte_zero[] = "Using oversized addressing mode."; // Variables @@ -146,7 +146,7 @@ static struct dynabuf *mnemo_dyna_buf; // dynamic buffer for mnemonics static struct node_t *mnemo_6502_tree = NULL; // holds 6502 mnemonics static struct node_t *mnemo_6510_tree = NULL; // holds 6510 extensions static struct node_t *mnemo_65c02_tree = NULL; // holds 65c02 extensions -//static node_t *mnemo_Rockwell65c02_tree = NULL; // Rockwell +//static struct node_t *mnemo_Rockwell65c02_tree = NULL; // Rockwell static struct node_t *mnemo_WDC65c02_tree = NULL; // WDC's "stp"/"wai" static struct node_t *mnemo_65816_tree = NULL; // holds 65816 extensions