mirror of
https://github.com/fachat/xa65.git
synced 2024-06-08 23:29:30 +00:00
create error on negative dsb offsets
This commit is contained in:
parent
a98b3770ee
commit
663b94a281
|
@ -1213,7 +1213,9 @@ fprintf(stderr, "mvn mvp: %i %i %i %i %i\n", t[0], t[i], wide, i, j);
|
|||
er=E_ILLPOINTER;
|
||||
else
|
||||
*/
|
||||
{
|
||||
if (j < 0) {
|
||||
er = E_ILLQUANT;
|
||||
} else {
|
||||
dsb_len = 0;
|
||||
|
||||
if(t[i+1]==',') {
|
||||
|
|
12
xa/tests/dsb/Makefile
Normal file
12
xa/tests/dsb/Makefile
Normal file
|
@ -0,0 +1,12 @@
|
|||
default: test1 test2
|
||||
|
||||
test1:
|
||||
../../xa -R -LLIB6502 test1.s -o test1.o
|
||||
../hextool -cmp=ok1 < test1.o
|
||||
|
||||
test2:
|
||||
# this test must fail.
|
||||
../../xa -R -LLIB6502 test2.s -o test2.o || exit 0 && exit 1
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
BIN
xa/tests/dsb/ok1
Normal file
BIN
xa/tests/dsb/ok1
Normal file
Binary file not shown.
BIN
xa/tests/dsb/test1.o
Normal file
BIN
xa/tests/dsb/test1.o
Normal file
Binary file not shown.
9
xa/tests/dsb/test1.s
Normal file
9
xa/tests/dsb/test1.s
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
.text
|
||||
|
||||
.dsb 10, 32
|
||||
|
||||
.dsb 5, 'a'
|
||||
|
||||
|
||||
|
9
xa/tests/dsb/test2.s
Normal file
9
xa/tests/dsb/test2.s
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
.text
|
||||
|
||||
.dsb -10, 32
|
||||
|
||||
.dsb 5, 'a'
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user