From 69b1d8fb7e202f95d2a97e1cb9aa214910464ad1 Mon Sep 17 00:00:00 2001 From: fachat Date: Sun, 29 Jul 2012 19:08:14 +0200 Subject: [PATCH] fixed and added tests for ca65 compatibility --- xa/tests/ca65/Makefile | 22 ++++++++++++++++++---- xa/tests/ca65/escape1.a65 | 6 ++++++ xa/tests/ca65/escape1.out | 1 + xa/tests/ca65/escape2.a65 | 6 ++++++ xa/tests/ca65/escape2.ca65 | 1 + xa/tests/ca65/unnamed1.a65 | 7 ++++--- xa/tests/ca65/unnamed1.ca65 | Bin 0 -> 16 bytes xa/tests/ca65/unnamed1.o | Bin 13 -> 0 bytes xa/tests/ca65/unnamed2.a65 | 11 ++++++----- xa/tests/ca65/unnamed2.ca65 | Bin 0 -> 16 bytes xa/tests/ca65/unnamed2.err | 3 ++- 11 files changed, 44 insertions(+), 13 deletions(-) mode change 100755 => 100644 xa/tests/ca65/Makefile create mode 100644 xa/tests/ca65/escape1.a65 create mode 100644 xa/tests/ca65/escape1.out create mode 100644 xa/tests/ca65/escape2.a65 create mode 100644 xa/tests/ca65/escape2.ca65 mode change 100755 => 100644 xa/tests/ca65/unnamed1.a65 create mode 100644 xa/tests/ca65/unnamed1.ca65 delete mode 100755 xa/tests/ca65/unnamed1.o mode change 100755 => 100644 xa/tests/ca65/unnamed2.a65 create mode 100644 xa/tests/ca65/unnamed2.ca65 mode change 100755 => 100644 xa/tests/ca65/unnamed2.err diff --git a/xa/tests/ca65/Makefile b/xa/tests/ca65/Makefile old mode 100755 new mode 100644 index 1a887a7..79f0b41 --- a/xa/tests/ca65/Makefile +++ b/xa/tests/ca65/Makefile @@ -4,17 +4,31 @@ XA=../../xa -tests: unn1 unn2 +CA65=ca65 +LD65=ld65 + +tests: unnamed1 unnamed2 escape1 escape2 clean -unn1: unnamed1.a65 +unnamed1: unnamed1.a65 + #${CA65} $<; ${LD65} -t none -o unnamed1.ca65 unnamed1.o; rm unnamed1.o ${XA} -XCA65 $< - cmp unnamed1.o a.o65 + cmp unnamed1.ca65 a.o65 -unn2: unnamed2.a65 +unnamed2: unnamed2.a65 + #${CA65} $<; ${LD65} -t none -o unnamed2.ca65 unnamed2.o; rm unnamed2.o ${XA} -XCA65 $< 2>a.err || true cmp unnamed2.err a.err +escape1: escape1.a65 + ${XA} $< + cmp escape1.out a.o65 + +escape2: escape2.a65 + #${CA65} $<; ${LD65} -t none -o escape2.ca65 escape2.o; rm escape2.o + ${XA} -XCA65 $< 2>a.err || true + cmp escape2.ca65 a.o65 + clean: rm -f a.err a.o65 diff --git a/xa/tests/ca65/escape1.a65 b/xa/tests/ca65/escape1.a65 new file mode 100644 index 0000000..74e8c09 --- /dev/null +++ b/xa/tests/ca65/escape1.a65 @@ -0,0 +1,6 @@ + + *=$1000 + + lda #"^^" + + diff --git a/xa/tests/ca65/escape1.out b/xa/tests/ca65/escape1.out new file mode 100644 index 0000000..8943227 --- /dev/null +++ b/xa/tests/ca65/escape1.out @@ -0,0 +1 @@ +©^ \ No newline at end of file diff --git a/xa/tests/ca65/escape2.a65 b/xa/tests/ca65/escape2.a65 new file mode 100644 index 0000000..fce5372 --- /dev/null +++ b/xa/tests/ca65/escape2.a65 @@ -0,0 +1,6 @@ + + .org $1000 + + lda #'^' + + diff --git a/xa/tests/ca65/escape2.ca65 b/xa/tests/ca65/escape2.ca65 new file mode 100644 index 0000000..8943227 --- /dev/null +++ b/xa/tests/ca65/escape2.ca65 @@ -0,0 +1 @@ +©^ \ No newline at end of file diff --git a/xa/tests/ca65/unnamed1.a65 b/xa/tests/ca65/unnamed1.a65 old mode 100755 new mode 100644 index 6e3b745..37f8379 --- a/xa/tests/ca65/unnamed1.a65 +++ b/xa/tests/ca65/unnamed1.a65 @@ -1,7 +1,7 @@ -// test of unnamed labels +; test of unnamed labels -start *=$4000 +start: .org $4000 lda #$00 : iny ; first @@ -9,6 +9,7 @@ start *=$4000 beq :++ ; go to third : ; second jmp :- ; go to second + jmp :++ : ldy #1 ; third - nop +: nop diff --git a/xa/tests/ca65/unnamed1.ca65 b/xa/tests/ca65/unnamed1.ca65 new file mode 100644 index 0000000000000000000000000000000000000000..54ddb553d91e19fa13604066ba2208597a8a581f GIT binary patch literal 16 YcmZ34{Sc{4nF)23m9Jk06_}|?f?J) literal 0 HcmV?d00001 diff --git a/xa/tests/ca65/unnamed1.o b/xa/tests/ca65/unnamed1.o deleted file mode 100755 index af5b9deaa80c8289807dcd75becfc476e1efa1ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13 VcmZ356nL74htAx0RS(H22cP1 diff --git a/xa/tests/ca65/unnamed2.a65 b/xa/tests/ca65/unnamed2.a65 old mode 100755 new mode 100644 index d319caa..4851f06 --- a/xa/tests/ca65/unnamed2.a65 +++ b/xa/tests/ca65/unnamed2.a65 @@ -1,16 +1,17 @@ -// test of unnamed labels +; test of unnamed labels -start *=$4000 +start: .org $4000 lda #$00 : iny ; first bne :- ; go to first beq :++ ; go to third - .block + .scope : ; second jmp :- ; go to second + jmp :++ : ldy #1 ; third - .bend - nop + .endscope +: nop diff --git a/xa/tests/ca65/unnamed2.ca65 b/xa/tests/ca65/unnamed2.ca65 new file mode 100644 index 0000000000000000000000000000000000000000..54ddb553d91e19fa13604066ba2208597a8a581f GIT binary patch literal 16 YcmZ34{Sc{4nF)23m9Jk06_}|?f?J) literal 0 HcmV?d00001 diff --git a/xa/tests/ca65/unnamed2.err b/xa/tests/ca65/unnamed2.err old mode 100755 new mode 100644 index 5d877f6..f89e1d2 --- a/xa/tests/ca65/unnamed2.err +++ b/xa/tests/ca65/unnamed2.err @@ -1,2 +1,3 @@ unnamed2.a65:line 9: 4007:Label '(null)' not defined -Break after 1 errors +unnamed2.a65:line 13: 400e:Label '(null)' not defined +Break after 2 errors