mirror of
https://github.com/fachat/xa65.git
synced 2025-02-06 03:29:58 +00:00
update to official xa-2.3.12
This commit is contained in:
parent
eff641bcff
commit
5d66d3a11a
@ -63,7 +63,7 @@ install: xa uncpk
|
||||
#$(MKDIR) $(DOCDIR)/xa65
|
||||
|
||||
dist: clean
|
||||
cd .. ; tar cvf xa-2.3.11.tar xa-2.3.11 ; gzip xa-2.3.11.tar
|
||||
cd .. ; tar cvf xa-2.3.12.tar xa-2.3.12 ; gzip xa-2.3.12.tar
|
||||
|
||||
test: xa uncpk
|
||||
cd tests && ./harness -make="$(MAKE)" -cc="$(CC)" -cflags="$(CFLAGS)"
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH XA "1" "9 November 2019"
|
||||
.TH XA "1" "24 November 2021"
|
||||
|
||||
.SH NAME
|
||||
xa \- 6502/R65C02/65816 cross-assembler
|
||||
@ -298,7 +298,7 @@ shift right (8)
|
||||
.B >= =>
|
||||
greater than or equal to (7)
|
||||
.TP
|
||||
.B <
|
||||
.B >
|
||||
greater than (7)
|
||||
.TP
|
||||
.B <= =<
|
||||
@ -982,7 +982,7 @@ This manual page was written by David Weinehall <tao@acc.umu.se>,
|
||||
Andre Fachat <fachat@web.de>
|
||||
and Cameron Kaiser <ckaiser@floodgap.com>.
|
||||
Original xa package (C)1989-1997 Andre Fachat. Additional changes
|
||||
(C)1989-2019 Andre Fachat, Jolse Maginnis, David Weinehall,
|
||||
(C)1989-2021 Andre Fachat, Jolse Maginnis, David Weinehall,
|
||||
Cameron Kaiser. The official maintainer is Cameron Kaiser.
|
||||
|
||||
.SH 30 YEARS OF XA
|
||||
|
@ -55,9 +55,9 @@
|
||||
#define ANZWARN 13
|
||||
|
||||
#define programname "xa"
|
||||
#define progversion "v2.3.11"
|
||||
#define progversion "v2.3.12"
|
||||
#define authors "Written by Andre Fachat, Jolse Maginnis, David Weinehall and Cameron Kaiser"
|
||||
#define copyright "Copyright (C) 1989-2020 Andre Fachat, Jolse Maginnis, David Weinehall\nand Cameron Kaiser."
|
||||
#define copyright "Copyright (C) 1989-2021 Andre Fachat, Jolse Maginnis, David Weinehall\nand Cameron Kaiser."
|
||||
|
||||
/* exported globals */
|
||||
int ncmos, cmosfl, w65816, n65816;
|
||||
|
23
xa/src/xat.c
23
xa/src/xat.c
@ -139,8 +139,8 @@ static int ktp[]={ 0,3,17,25,28,29,29,29,29,32,34,34,38,40,41,42,58,
|
||||
* opcodes for each addressing mode
|
||||
* high byte: supported architecture (no bits = original NMOS 6502)
|
||||
* bit 1: R65C02
|
||||
* bit 2: 65816
|
||||
* bit 3: 65816 and allows 16-bit quantity (immediate only)
|
||||
* bit 2: 65816 and allows 16-bit quantity (accum only)
|
||||
* bit 3: 65816 and allows 16-bit quantity (index only)
|
||||
* low byte: opcode itself
|
||||
*
|
||||
* each opcode is indexed in this order: *=65816, ^=R65C02
|
||||
@ -1430,8 +1430,8 @@ fprintf(stderr, "Kdsb E_DSB %i\n", j);
|
||||
{
|
||||
#ifdef DEBUG_AM
|
||||
fprintf(stderr,
|
||||
"b4: pc= %d, am = %d and vv[0] = %d, optimize = %d, bitmask = %u, er=%d\n",
|
||||
pc[segment], am, vv[0], fl, (vv[0]&0xffff00), er);
|
||||
"b4: pc= %d, am = %d and vv[0] = %d, optimize = %d, bitmask = %u, er=%d, bl=%d\n",
|
||||
pc[segment], am, vv[0], fl, (vv[0]&0xffff00), er, bl);
|
||||
#endif
|
||||
|
||||
/* terrible KLUDGE!!!! OH NOES!!!1!
|
||||
@ -1444,8 +1444,8 @@ fprintf(stderr,
|
||||
am=opt[am];
|
||||
#ifdef DEBUG_AM
|
||||
fprintf(stderr,
|
||||
"aftaa1: pc= %d, am = %d and vv[0] = %d, optimize = %d, bitmask = %d\n",
|
||||
pc[segment], am, vv[0], fl, (vv[0]&0xffff00));
|
||||
"aftaa1: pc= %d, am = %d and vv[0] = %d, optimize = %d, bitmask = %d, bl = %d\n",
|
||||
pc[segment], am, vv[0], fl, (vv[0]&0xffff00), bl);
|
||||
#endif
|
||||
if(t[*ll-1]!='!') {
|
||||
if(bl && !er && !(vv[0]&0xffff00) && opt[am]>=0) {
|
||||
@ -1460,8 +1460,8 @@ fprintf(stderr,
|
||||
}
|
||||
#ifdef DEBUG_AM
|
||||
fprintf(stderr,
|
||||
"aftaa2: pc=%d, am=%d and vv[0]=%d, optimize=%d, bitmask=%d, op=%d\n",
|
||||
pc[segment], am, vv[0], fl, (vv[0]&0xffff00), ct[n][opt[am]]);
|
||||
"aftaa2: pc=%d, am=%d and vv[0]=%d, optimize=%d, bitmask=%d, op=%d, bl=%d\n",
|
||||
pc[segment], am, vv[0], fl, (vv[0]&0xffff00), ct[n][opt[am]], bl);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1470,17 +1470,16 @@ fprintf(stderr,
|
||||
else
|
||||
{
|
||||
bl=le[am];
|
||||
if( ((ct[n][am]&0x400) && memode) || ((ct[n][am]&0x800) && xmode)) {
|
||||
bl++;
|
||||
}
|
||||
if ((am != 11 && am != 16) && (vv[0] > 255 || vv[0] < -256) && bl == 2) {
|
||||
er = E_OVERFLOW;
|
||||
} else
|
||||
if ((am != 11 && am != 16) && (vv[0] > 65535 || vv[0] < -65536) && (bl == 2 || bl == 3)) {
|
||||
er = E_OVERFLOW;
|
||||
} else
|
||||
if( ((ct[n][am]&0x400) && memode) || ((ct[n][am]&0x800) && xmode)) {
|
||||
bl++;
|
||||
}
|
||||
*ll=bl;
|
||||
|
||||
}
|
||||
|
||||
#ifdef DEBUG_AM
|
||||
|
@ -43,6 +43,7 @@ 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)
|
||||
alxl/ Various '816 width tests (includes Samuel Falvo's test)
|
||||
|
||||
Cameron Kaiser, André Fachat
|
||||
|
||||
|
24
xa/tests/alxl/Makefile
Normal file
24
xa/tests/alxl/Makefile
Normal file
@ -0,0 +1,24 @@
|
||||
default:
|
||||
# xa should not allow this to happen. if it does, this test is no good.
|
||||
../../xa alxl.s || exit 0 && exit 1
|
||||
../../xa alxlo1.s || exit 0 && exit 1
|
||||
../../xa alxlo2.s || exit 0 && exit 1
|
||||
../../xa alxlx1.s || exit 0 && exit 1
|
||||
../../xa alxlx2.s || exit 0 && exit 1
|
||||
../../xa alxlx3.s || exit 0 && exit 1
|
||||
../../xa sizes.s || exit 0 && exit 1
|
||||
../../xa -w alxlx1.s || exit 0 && exit 1
|
||||
../../xa -w alxlx2.s || exit 0 && exit 1
|
||||
../../xa -w alxlx3.s || exit 0 && exit 1
|
||||
# expected-to-fail tests did fail. should be no more errors now.
|
||||
../../xa -w alxl.s -o alxl.o
|
||||
../hextool -cmp=alxl.ok < alxl.o
|
||||
../../xa -w alxlo1.s -o alxlo1.o
|
||||
../hextool -cmp=alxlo1.ok < alxlo1.o
|
||||
../../xa -w alxlo2.s -o alxlo2.o
|
||||
../hextool -cmp=alxlo2.ok < alxlo2.o
|
||||
../../xa -w sizes.s -o sizes.o
|
||||
../hextool -cmp=sizes.ok < sizes.o
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
1
xa/tests/alxl/alxl.ok
Normal file
1
xa/tests/alxl/alxl.ok
Normal file
@ -0,0 +1 @@
|
||||
<EFBFBD><10>4<12>4<12>4
|
13
xa/tests/alxl/alxl.s
Normal file
13
xa/tests/alxl/alxl.s
Normal file
@ -0,0 +1,13 @@
|
||||
; test for the xa .xl opcode that should set the XR handling to 16 bit
|
||||
|
||||
*=$f000
|
||||
|
||||
; set X/Y registers to 16 bit ...
|
||||
rep #%00010000
|
||||
; ... and tell the assembler about it
|
||||
.xl
|
||||
ldx #$1234
|
||||
ldy #$1234
|
||||
|
||||
.al
|
||||
lda #$1234
|
1
xa/tests/alxl/alxlo1.ok
Normal file
1
xa/tests/alxl/alxlo1.ok
Normal file
@ -0,0 +1 @@
|
||||
<EFBFBD><10>4
|
10
xa/tests/alxl/alxlo1.s
Normal file
10
xa/tests/alxl/alxlo1.s
Normal file
@ -0,0 +1,10 @@
|
||||
; test for the xa .xl opcode that should set the XR handling to 16 bit
|
||||
|
||||
*=$f000
|
||||
|
||||
; set X/Y registers to 16 bit ...
|
||||
rep #%00010000
|
||||
; ... and tell the assembler about it
|
||||
|
||||
.al
|
||||
lda #$1234
|
1
xa/tests/alxl/alxlo2.ok
Normal file
1
xa/tests/alxl/alxlo2.ok
Normal file
@ -0,0 +1 @@
|
||||
<EFBFBD><10>4<12>4
|
10
xa/tests/alxl/alxlo2.s
Normal file
10
xa/tests/alxl/alxlo2.s
Normal file
@ -0,0 +1,10 @@
|
||||
; test for the xa .xl opcode that should set the XR handling to 16 bit
|
||||
|
||||
*=$f000
|
||||
|
||||
; set X/Y registers to 16 bit ...
|
||||
rep #%00010000
|
||||
; ... and tell the assembler about it
|
||||
.xl
|
||||
ldx #$1234
|
||||
ldy #$1234
|
12
xa/tests/alxl/alxlx1.s
Normal file
12
xa/tests/alxl/alxlx1.s
Normal file
@ -0,0 +1,12 @@
|
||||
; test for the xa .xl opcode that should set the XR handling to 16 bit
|
||||
|
||||
*=$f000
|
||||
|
||||
; set X/Y registers to 16 bit ...
|
||||
rep #%00010000
|
||||
; ... and tell the assembler about it
|
||||
|
||||
.al
|
||||
ldx #$1234
|
||||
ldy #$1234
|
||||
lda #$1234
|
11
xa/tests/alxl/alxlx2.s
Normal file
11
xa/tests/alxl/alxlx2.s
Normal file
@ -0,0 +1,11 @@
|
||||
; test for the xa .xl opcode that should set the XR handling to 16 bit
|
||||
|
||||
*=$f000
|
||||
|
||||
; set X/Y registers to 16 bit ...
|
||||
rep #%00010000
|
||||
; ... and tell the assembler about it
|
||||
.xl
|
||||
ldx #$1234
|
||||
ldy #$1234
|
||||
lda #$1234
|
10
xa/tests/alxl/alxlx3.s
Normal file
10
xa/tests/alxl/alxlx3.s
Normal file
@ -0,0 +1,10 @@
|
||||
; test for the xa .xl opcode that should set the XR handling to 16 bit
|
||||
|
||||
*=$f000
|
||||
|
||||
; set X/Y registers to 16 bit ...
|
||||
rep #%00010000
|
||||
; ... and tell the assembler about it
|
||||
ldx #$1234
|
||||
ldy #$1234
|
||||
lda #$1234
|
BIN
xa/tests/alxl/sizes.ok
Normal file
BIN
xa/tests/alxl/sizes.ok
Normal file
Binary file not shown.
22
xa/tests/alxl/sizes.s
Normal file
22
xa/tests/alxl/sizes.s
Normal file
@ -0,0 +1,22 @@
|
||||
#define HI(z) (((z) >> 16) & $FFFF)
|
||||
#define LO(z) ((z) & $FFFF)
|
||||
|
||||
.al
|
||||
.xl
|
||||
*=$112233
|
||||
SYM:
|
||||
rts
|
||||
jmp SYM
|
||||
jmp $112233
|
||||
lda $112233
|
||||
lda @$2233
|
||||
lda $2233
|
||||
lda $33
|
||||
|
||||
#print HI(SYM)
|
||||
lda #HI(SYM)
|
||||
pha
|
||||
#print LO(SYM)
|
||||
lda #LO(SYM)
|
||||
pha
|
||||
|
Loading…
x
Reference in New Issue
Block a user