mirror of
https://github.com/fachat/xa65.git
synced 2025-04-20 02:37:46 +00:00
update to official xa-2.3.11
This commit is contained in:
parent
8becb7ecea
commit
eff641bcff
11
xa/ChangeLog
11
xa/ChangeLog
@ -352,3 +352,14 @@ xa-2.3.10
|
||||
|
||||
-- Cameron Kaiser <ckaiser@floodgap.com> 9 November 2019
|
||||
|
||||
xa-2.3.11
|
||||
|
||||
* Compilation fix for gcc 10 (thanks Dan Horak).
|
||||
* Allow pointer arithmetic in relocating mode within the same segment, since
|
||||
the result is segmentless (thanks Andre for the report).
|
||||
* .dsb with negative quantities shouldn't work (thanks Andre for the report).
|
||||
* Stop a divide-by-zero floating point exception (thanks Frederic Cambus).
|
||||
* Testsuite expanded.
|
||||
|
||||
-- Cameron Kaiser <ckaiser@floodgap.com> 4 May 2020
|
||||
|
||||
|
@ -63,7 +63,7 @@ install: xa uncpk
|
||||
#$(MKDIR) $(DOCDIR)/xa65
|
||||
|
||||
dist: clean
|
||||
cd .. ; tar cvf xa-2.3.10.tar xa-2.3.10 ; gzip xa-2.3.10.tar
|
||||
cd .. ; tar cvf xa-2.3.11.tar xa-2.3.11 ; gzip xa-2.3.11.tar
|
||||
|
||||
test: xa uncpk
|
||||
cd tests && ./harness -make="$(MAKE)" -cc="$(CC)" -cflags="$(CFLAGS)"
|
||||
|
@ -55,9 +55,9 @@
|
||||
#define ANZWARN 13
|
||||
|
||||
#define programname "xa"
|
||||
#define progversion "v2.3.10"
|
||||
#define progversion "v2.3.11"
|
||||
#define authors "Written by Andre Fachat, Jolse Maginnis, David Weinehall and Cameron Kaiser"
|
||||
#define copyright "Copyright (C) 1989-2019 Andre Fachat, Jolse Maginnis, David Weinehall\nand Cameron Kaiser."
|
||||
#define copyright "Copyright (C) 1989-2020 Andre Fachat, Jolse Maginnis, David Weinehall\nand Cameron Kaiser."
|
||||
|
||||
/* exported globals */
|
||||
int ncmos, cmosfl, w65816, n65816;
|
||||
|
25
xa/src/xaa.c
25
xa/src/xaa.c
@ -98,7 +98,9 @@ static int ag_term(signed char *s, int p, int *v, int *nafl, int *label)
|
||||
|
||||
afl = 0;
|
||||
|
||||
/*printf("ag_term(%02x %02x %02x %02x %02x %02x\n",s[0],s[1],s[2],s[3],s[4],s[5]);*/
|
||||
/*
|
||||
printf("ag_term(%02x %02x %02x %02x %02x %02x\n",s[0],s[1],s[2],s[3],s[4],s[5]);
|
||||
*/
|
||||
while(s[pp]=='-')
|
||||
{
|
||||
pp++;
|
||||
@ -119,8 +121,10 @@ static int ag_term(signed char *s, int p, int *v, int *nafl, int *label)
|
||||
if(s[pp]==T_LABEL)
|
||||
{
|
||||
er=l_get(cval(s+pp+1),v, &afl);
|
||||
/* printf("label: er=%d, seg=%d, afl=%d, nolink=%d, fundef=%d\n",
|
||||
er, segment, afl, nolink, fundef); */
|
||||
/*
|
||||
printf("label: er=%d, seg=%d, afl=%d, nolink=%d, fundef=%d\n",
|
||||
er, segment, afl, nolink, fundef);
|
||||
*/
|
||||
if(er==E_NODEF && segment != SEG_ABS && fundef ) {
|
||||
if( nolink || (afl==SEG_UNDEF)) {
|
||||
er = E_OK;
|
||||
@ -136,7 +140,9 @@ static int ag_term(signed char *s, int p, int *v, int *nafl, int *label)
|
||||
{
|
||||
*v=lval(s+pp+1);
|
||||
pp+=4;
|
||||
/* printf("value: v=%04x\n",*v); */
|
||||
/*
|
||||
printf("value: v=%04x\n",*v);
|
||||
*/
|
||||
}
|
||||
else
|
||||
if(s[pp]==T_POINTER)
|
||||
@ -144,7 +150,9 @@ static int ag_term(signed char *s, int p, int *v, int *nafl, int *label)
|
||||
afl = s[pp+1];
|
||||
*v=cval(s+pp+2);
|
||||
pp+=4;
|
||||
/* printf("pointer: v=%04x, afl=%04x\n",*v,afl); */
|
||||
/*
|
||||
printf("pointer: v=%04x, afl=%04x\n",*v,afl);
|
||||
*/
|
||||
}
|
||||
else
|
||||
if(s[pp]=='*')
|
||||
@ -178,9 +186,10 @@ static int ag_term(signed char *s, int p, int *v, int *nafl, int *label)
|
||||
if((afl && !*nafl) && o==2) {
|
||||
afl=(afl | *nafl); /* substract constant from pointer */
|
||||
} else {
|
||||
if(segment!=SEG_ABS) {
|
||||
/* allow math in the same segment */
|
||||
if(segment!=SEG_ABS && segment != afl) {
|
||||
if(!dsb_len) {
|
||||
er=E_ILLPOINTER;
|
||||
er=E_ILLSEGMENT;
|
||||
}
|
||||
}
|
||||
afl=0;
|
||||
@ -224,7 +233,7 @@ static int do_op(int *w,int w2,int o)
|
||||
*w *=w2;
|
||||
break;
|
||||
case 4:
|
||||
if (w!=0)
|
||||
if (w2!=0)
|
||||
*w /=w2;
|
||||
else
|
||||
er =E_DIV;
|
||||
|
@ -35,7 +35,7 @@ int gm_pp(void);
|
||||
long gm_ppm(void);
|
||||
long ga_ppm(void);
|
||||
|
||||
Datei *filep;
|
||||
char s[MAXLINE];
|
||||
extern Datei *filep;
|
||||
extern char s[MAXLINE];
|
||||
|
||||
#endif /* __XA65_XAP_H__ */
|
||||
|
@ -1205,6 +1205,9 @@ fprintf(stderr, "mvn mvp: %i %i %i %i %i\n", t[0], t[i], wide, i, j);
|
||||
dsb_len = 1;
|
||||
if(!(er=a_term(t+1,&j,&i,pc[segment],&afl,&label,0)))
|
||||
{
|
||||
if (j<0)
|
||||
er=E_SYNTAX;
|
||||
else
|
||||
/*
|
||||
if(t[i+1]!=',')
|
||||
er=E_SYNTAX;
|
||||
|
@ -30,7 +30,7 @@ incerr/ 1) .xl/.al should error without -w 2) error should be in
|
||||
the correct file ('816)
|
||||
binclude/ Binary include code with some weird casing
|
||||
ppstrings/ Don't substitute inside strings (unless -S)
|
||||
neg_offset/ Test handling of negative offsets with/without relocation
|
||||
neg_offset/ Test negative offsets/values with/without relocation
|
||||
chppch/ Changing preprocessor characters (-p)
|
||||
charset/ Tests of when charsets should be honoured and when not
|
||||
mvnmvp/ Test MVN MVP unusual addressing mode ('816)
|
||||
@ -41,6 +41,8 @@ branch/ Branch range test
|
||||
masmcom/ Another test for -M that generates totally valid code
|
||||
quotch/ Test quoting problematic characters (thanks Simon Rowe)
|
||||
linkr/ Test linking using .dsb and generated code
|
||||
csapiec/ Test on pointer arithmetic in relocating mode
|
||||
math/ Math tests (currently divide by zero, thanks Frederic Cambus)
|
||||
|
||||
Cameron Kaiser, André Fachat
|
||||
|
||||
|
12
xa/tests/csapiec/Makefile
Normal file
12
xa/tests/csapiec/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
default:
|
||||
# xa should not allow this to happen. if it does, this test is no good.
|
||||
../../xa -DBUG=1 -o test.o test.s || exit 0 && exit 1
|
||||
../../xa -R -DBUG=1 -o testseg.o test.s || exit 0 && exit 1
|
||||
# xa *should* allow this to happen.
|
||||
../../xa -o test.o test.s
|
||||
../hextool -cmp=test.ok < test.o
|
||||
../../xa -R -o testseg.o test.s
|
||||
../hextool -cmp=testseg.ok < testseg.o
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
BIN
xa/tests/csapiec/test.ok
Normal file
BIN
xa/tests/csapiec/test.ok
Normal file
Binary file not shown.
32
xa/tests/csapiec/test.s
Normal file
32
xa/tests/csapiec/test.s
Normal file
@ -0,0 +1,32 @@
|
||||
.text
|
||||
|
||||
c0 =*-1
|
||||
|
||||
#ifdef BUG
|
||||
.data
|
||||
#endif
|
||||
|
||||
cmdt .asc "$",0
|
||||
cow .asc "@",0
|
||||
c2 .asc "rename",0
|
||||
c3 .asc "scratch",0
|
||||
c4 .asc "copy",0
|
||||
c5 .asc "new",0
|
||||
c6 .asc "validate",0
|
||||
c7 .asc "initialize",0
|
||||
;c8 .asc "rmdir",0
|
||||
;c9 .asc "mkdir",0
|
||||
;c10 .asc "chdir",0
|
||||
c11 .asc "assign",0
|
||||
c12 .asc "cd",0
|
||||
c13 .asc "rd",0
|
||||
c14 .asc "md",0
|
||||
c15 .asc "drv",0 ; iec-bus-unit
|
||||
|
||||
cmda .byt cmdt-c0
|
||||
.byt <c0
|
||||
.byt <cow-c0
|
||||
.word <cow-c0
|
||||
.byt c2-c0, c3-c0, c4-c0, c5-c0, c6-c0, c7-c0 /*,c8-c0*/
|
||||
.byt /*c9-c0,c10-c0,*/ c11-c0, c12-c0, c13-c0, c14-c0, c15-c0, 0
|
||||
|
BIN
xa/tests/csapiec/testseg.ok
Normal file
BIN
xa/tests/csapiec/testseg.ok
Normal file
Binary file not shown.
7
xa/tests/math/Makefile
Normal file
7
xa/tests/math/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
default:
|
||||
# xa should not allow this to happen. if it does, this test is no good.
|
||||
../../xa -o divzero.o divzero.s || exit 0 && exit 1
|
||||
../../xa -o divzero2.o divzero2.s || exit 0 && exit 1
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
3
xa/tests/math/divzero.s
Normal file
3
xa/tests/math/divzero.s
Normal file
@ -0,0 +1,3 @@
|
||||
.word $
|
||||
* = $0/00
|
||||
|
6
xa/tests/math/divzero2.s
Normal file
6
xa/tests/math/divzero2.s
Normal file
@ -0,0 +1,6 @@
|
||||
.word $
|
||||
xyz = 2
|
||||
zyx = xyz - xyz
|
||||
|
||||
* = $0/zyx
|
||||
|
@ -1,4 +1,8 @@
|
||||
default: test1 test2 test3 test4 test5 test6 test7 test8
|
||||
default: test0 test1 test2 test3 test4 test5 test6 test7 test8
|
||||
|
||||
test0:
|
||||
# this test must fail.
|
||||
../../xa -o test0.o test0.s || exit 0 && exit 1
|
||||
|
||||
test1:
|
||||
../../xa -R -LLIB6502 test1.s -o test1.o
|
||||
|
2
xa/tests/neg_offset/test0.s
Normal file
2
xa/tests/neg_offset/test0.s
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
.dsb -10, 32
|
Loading…
x
Reference in New Issue
Block a user