From 26168e675295ac29fa9194c2677ff2fa00ffa604 Mon Sep 17 00:00:00 2001 From: marcobaye Date: Tue, 28 Jul 2020 13:13:26 +0000 Subject: [PATCH] small change in tests, improved 65816 register length checking git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@285 4df02467-bbd4-4a76-a152-e7ce94205b78 --- testing/cpus/expected-65816.o | Bin 661 -> 665 bytes testing/cpus/test-65816.a | 52 ++++++++++++++++++---------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/testing/cpus/expected-65816.o b/testing/cpus/expected-65816.o index 56b5af84fb8b790ac67c8d8efec249adbc15b9ea..f76b3dacbabaa304dd7cc4a59c69eba283fe8f7f 100644 GIT binary patch delta 39 xcmV+?0NDSP1(^k~`T-ll!ovf{2g}b74-eB5)YR7(+uYpT-ya_z;^LDL0)%m$67v86 delta 35 tcmV+;0NnqX1(gM``T-Zi1IGu;&kqj|(-YLx*B9H|+}z(EA0Lwy0)!S(532wG diff --git a/testing/cpus/test-65816.a b/testing/cpus/test-65816.a index b58503b..db8c1ab 100644 --- a/testing/cpus/test-65816.a +++ b/testing/cpus/test-65816.a @@ -63,7 +63,7 @@ lda [$17], y ; b7 tyx ; bb lda $1f1f1f, x ; bf -; rep #$c2 ; c2, see below + rep #$c2 ; c2, see below cmp $03, s ; c3 cmp [$07] ; c7 wai ; cb @@ -74,7 +74,7 @@ stp ; db jmp [$dcdc] ; dc cmp $1f1f1f, x ; df -; sep #$e2 ; e2, see below + sep #$e2 ; e2, see below sbc $03, s ; e3 sbc [$07] ; e7 xba ; eb @@ -86,31 +86,33 @@ jsr ($fcfc, x) ; fc sbc $1f1f1f, x ; ff -; immediate addressing for register length checks: +; check sizes of immediate arguments: !macro immediates { + ; arg size depends on: ; from 6502: - ora #$09 ; 09, a - and #$09 ; 29, a - eor #$09 ; 49, a - adc #$09 ; 69, a - ldy #$09 ; a0, r - ldx #$09 ; a2, r - lda #$09 ; a9, a - cpy #$09 ; c0, r - cmp #$09 ; c9, a - cpx #$09 ; e0, r - sbc #$09 ; e9, a + ora #$09 ; 09 accumulator size + and #$09 ; 29 accumulator size + eor #$09 ; 49 accumulator size + adc #$09 ; 69 accumulator size + ldy #$09 ; a0 index register size + ldx #$09 ; a2 index register size + lda #$09 ; a9 accumulator size + cpy #$09 ; c0 index register size + cmp #$09 ; c9 accumulator size + cpx #$09 ; e0 index register size + sbc #$09 ; e9 accumulator size ; from 65c02: - bit #$89 ; 89, a + bit #$89 ; 89 accumulator size ; from 65816: - rep #$c2 ; c2, always 8 bits - sep #$e2 ; e2, always 8 bits + rep #$c2 ; c2 always 8 bits + sep #$e2 ; e2 always 8 bits } - !al - +immediates - !as - !rl - +immediates - !al - !rl - +immediates + ; before this, all sizes were 8 bits + !al + +immediates ; now repeat immediates with long accumulator + !as + !rl + +immediates ; repeat immediates with short A and long index regs + !al + !rl + +immediates ; repeat immediates with long A and long index regs