aboutsummaryrefslogtreecommitdiffstats
path: root/tests/t_cop8/t_cop8.asm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t_cop8/t_cop8.asm')
-rw-r--r--tests/t_cop8/t_cop8.asm128
1 files changed, 128 insertions, 0 deletions
diff --git a/tests/t_cop8/t_cop8.asm b/tests/t_cop8/t_cop8.asm
new file mode 100644
index 0000000..68573d1
--- /dev/null
+++ b/tests/t_cop8/t_cop8.asm
@@ -0,0 +1,128 @@
+ cpu cop87l84
+
+ macexp off
+
+ include regcop8.inc
+
+ nop
+ ret
+ reti
+ retsk
+ sc
+ rc
+ ifc
+ ifnc
+ vis
+ jid
+ intr
+ laid
+ rpnd
+
+ clr a
+ inc a
+ dec a
+ dcor a
+ rrc a
+ rlc a
+ swap a
+ pop a
+ push a
+
+ adc a,[b]
+ adc a,0x12
+ adc a,#0x12
+
+ subc a,[b]
+ subc a,0x12
+ subc a,#0x12
+
+ add a,[b]
+ add a,0x12
+ add a,#0x12
+
+ ifgt a,[b]
+ ifgt a,0x12
+ ifgt a,#0x12
+
+ and a,[b]
+ and a,0x12
+ and a,#0x12
+
+ xor a,[b]
+ xor a,0x12
+ xor a,#0x12
+
+ or a,[b]
+ or a,0x12
+ or a,#0x12
+
+ ld a,[b]
+ ld a,0x12
+ ld a,#0x12
+ ld a,[x]
+ ld r4,#0x12
+ ld b,#12
+ ld b,#0x12
+ ld a,[b+]
+ ld a,[x+]
+ ld a,[b-]
+ ld a,[x-]
+ ld [b],#0x12
+ ld [b+],#0x12
+ ld [b-],#0x12
+ ld 0x12,#0x12
+
+ x a,[b]
+ x [x],a
+ x a,[b+]
+ x [x+],a
+ x a,[b-]
+ x [x-],a
+ x a,0x12
+
+ andsz a,#0x12
+
+ ifeq a,[b]
+ ifeq a,0x12
+ ifeq a,#0x12
+ ifeq 0x12,#0x12
+
+ ifne a,[b]
+ ifne a,0x12
+ ifne a,#0x12
+
+ ifbit 3,[b]
+ ifbit 5,0x12
+ sbit 3,[b]
+ sbit 5,0x12
+ rbit 3,[b]
+ rbit 5,0x12
+
+ ifbne #7
+ ifbne #0xc
+
+ jmp 0x123
+ jsr 0x987
+
+ jmpl 0x1234
+ jsrl 0x3456
+
+ jp .+6
+ jp .-20
+ jp .+1
+
+ drsz r12
+ drsz r8
+
+reg sfr 10
+
+ addr 1,2,3,4,5
+ addrw 1,2,3,4,5
+ byte 1,2,3,4,5
+ word 1,2,3,4,5
+ dsb 20
+ dsw 20
+ fb 10,20
+ fw 10,20
+
+