diff --git a/xa/ChangeLog b/xa/ChangeLog index cf3110f..56431f7 100644 --- a/xa/ChangeLog +++ b/xa/ChangeLog @@ -316,3 +316,11 @@ xa-2.3.7 * Testsuite expanded. -- Cameron Kaiser 29 December 2014 + +xa-2.3.8 + + * Fixed issue with colons in string literals being treated as separators + (thanks Simon Rowe). + * Testsuite expanded. + + -- Cameron Kaiser 29 June 2017 diff --git a/xa/Makefile b/xa/Makefile index df6cb4e..0cda4d6 100644 --- a/xa/Makefile +++ b/xa/Makefile @@ -63,8 +63,8 @@ install: xa uncpk #$(MKDIR) $(DOCDIR)/xa65 dist: clean - #cd .. ; tar cvf xa-2.3.7A.tar xa-2.3.7 ; gzip xa-2.3.7A.tar - cd .. ; tar cvf xa-2.3.7.tar xa-2.3.7 ; gzip xa-2.3.7.tar + #cd .. ; tar cvf xa-2.3.8A.tar xa-2.3.8 ; gzip xa-2.3.8A.tar + cd .. ; tar cvf xa-2.3.8.tar xa-2.3.8 ; gzip xa-2.3.8.tar test: xa uncpk cd tests && ./harness -make="$(MAKE)" -cc="$(CC)" -cflags="$(CFLAGS)" diff --git a/xa/README.1st b/xa/README.1st index 03775ef..4b61439 100644 --- a/xa/README.1st +++ b/xa/README.1st @@ -3,7 +3,7 @@ derivatives). xa is a small, fast, portable two-pass assembler that compiles under most ANSI C compilers. It is distributed under the GNU Public License (see COPYING). -The current version is 2.3.7, a bug fix to the long-lived 2.3.0, itself with +The current version is 2.3.8, a bug fix to the long-lived 2.3.0, itself with compatibility improvements and new man-based documentation. It also completed the merge of the 65816 and 6502/R65C02 versions and thus the current xa can generate code for all targets now. diff --git a/xa/man/xa.1 b/xa/man/xa.1 index 3d91da0..26a58bd 100644 --- a/xa/man/xa.1 +++ b/xa/man/xa.1 @@ -1,4 +1,4 @@ -.TH XA "1" "7 February 2009" +.TH XA "1" "29 June 2017" .SH NAME xa \- 6502/R65C02/65816 cross-assembler @@ -840,7 +840,7 @@ This manual page was written by David Weinehall , Andre Fachat and Cameron Kaiser . Original xa package (C)1989-1997 Andre Fachat. Additional changes -(C)1989-2015 Andre Fachat, Jolse Maginnis, David Weinehall, +(C)1989-2017 Andre Fachat, Jolse Maginnis, David Weinehall, Cameron Kaiser. The official maintainer is Cameron Kaiser. .SH WEBSITE diff --git a/xa/src/xa.c b/xa/src/xa.c index 287873b..431b15c 100644 --- a/xa/src/xa.c +++ b/xa/src/xa.c @@ -55,9 +55,9 @@ #define ANZWARN 13 #define programname "xa" -#define progversion "v2.3.7" +#define progversion "v2.3.8" #define authors "Written by Andre Fachat, Jolse Maginnis, David Weinehall and Cameron Kaiser" -#define copyright "Copyright (C) 1989-2015 Andre Fachat, Jolse Maginnis, David Weinehall\nand Cameron Kaiser." +#define copyright "Copyright (C) 1989-2017 Andre Fachat, Jolse Maginnis, David Weinehall\nand Cameron Kaiser." /* exported globals */ int ncmos, cmosfl, w65816, n65816; @@ -1054,8 +1054,10 @@ static int xa_getline(char *s) do { c=s[j]=l[i++]; - if (c=='\"') + if (!(hkfl&2) && c=='\"') hkfl^=1; + if (!comcom && !(hkfl&1) && c=='\'') + hkfl^=2; if (c==';' && !hkfl) comcom = 1; if (c=='\0') diff --git a/xa/tests/README b/xa/tests/README index 3490ae2..be85077 100644 --- a/xa/tests/README +++ b/xa/tests/README @@ -9,6 +9,8 @@ unless 'make test' fails. If you do, use harness: If -tests is omitted, all tests are run. Don't run the makefiles directly, if they exist; they may not work properly. +If a Makefile is not present, then the test harness assembles "test.s" and +compares it with "ok". adrm/ Addressing mode test (especially the optimizer and quantity prefixes) @@ -32,6 +34,8 @@ dos51/ Regression test, label scoping, "real world code" cpktest/ Regression test, label listing, "real world code" op816/ Regression test for '816 opcodes (thanks Alessandro Gatti) branch/ Branch range test +masmcom/ Another test for -M that generates totally valid code +quotch/ Test quoting problematic characters (thanks Simon Rowe) Cameron Kaiser, André Fachat diff --git a/xa/tests/masmcom/Makefile b/xa/tests/masmcom/Makefile new file mode 100644 index 0000000..6e85604 --- /dev/null +++ b/xa/tests/masmcom/Makefile @@ -0,0 +1,10 @@ +default: + # compile with masm mode on. + ../../xa -M -o test.o test.s + ../hextool -cmp=okmasm < test.o + # compile without + ../../xa -o test.o test.s + ../hextool -cmp=oknomasm < test.o + +clean: + rm -f *.o diff --git a/xa/tests/masmcom/okmasm b/xa/tests/masmcom/okmasm new file mode 100644 index 0000000..6d63e97 Binary files /dev/null and b/xa/tests/masmcom/okmasm differ diff --git a/xa/tests/masmcom/oknomasm b/xa/tests/masmcom/oknomasm new file mode 100644 index 0000000..35c248d Binary files /dev/null and b/xa/tests/masmcom/oknomasm differ diff --git a/xa/tests/masmcom/test.s b/xa/tests/masmcom/test.s new file mode 100644 index 0000000..392a50e --- /dev/null +++ b/xa/tests/masmcom/test.s @@ -0,0 +1,3 @@ +/* when assembled with/without -M, we get two different objects */ + + lda #00 ; and this: lda #01 ; is why : lda #":" diff --git a/xa/tests/quotch/ok b/xa/tests/quotch/ok new file mode 100644 index 0000000..81665ae Binary files /dev/null and b/xa/tests/quotch/ok differ diff --git a/xa/tests/quotch/test.s b/xa/tests/quotch/test.s new file mode 100644 index 0000000..aed472e --- /dev/null +++ b/xa/tests/quotch/test.s @@ -0,0 +1,11 @@ + .word $9000 + * = $9000 + +; test specific single characters can be quoted + + LDA #';' + CMP #':' + AND #'"' + SBC #";" + ORA #":" + EOR #"'"