summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-08-06 01:17:25 +0300
committerOxore <oxore@protonmail.com>2023-08-06 01:17:25 +0300
commitd9edff0cdc1792401e5a0b7fb556463a7637fbf0 (patch)
tree2f63378c1171dabee98130d23637f3021e563ced
parent04e380b927ee78f5474d1d87fa59383771c720aa (diff)
Add tests
-rwxr-xr-xtest.sh14
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/test1.S55
3 files changed, 71 insertions, 0 deletions
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..399f65e
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+dosbuild_dir='tests'
+
+mkdir -p "$dosbuild_dir"
+cat <<END >"$dosbuild_dir/build.bat"
+path d:\\dosemu;e:\\sierra\\bin
+set INCLUDE68=e:\\sierra\\include
+set TEMP=c:\\tmp
+END
+echo "asm68 -l -Q -o test1.o test1.S" >>"$dosbuild_dir/build.bat"
+dosemu -quiet -K "$dosbuild_dir" -E'build.bat'
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..11e4f73
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,2 @@
+*.bat
+SIERRA
diff --git a/tests/test1.S b/tests/test1.S
new file mode 100644
index 0000000..05420ab
--- /dev/null
+++ b/tests/test1.S
@@ -0,0 +1,55 @@
+move d1,d1
+move a1,d1
+move (a1),d1
+move (a1)+,d1
+move -(a1),d1
+
+move 32767(a1),d1
+move (32767,a1),d1
+move (a1,32767),d1
+
+move 32767(pc),d1
+move (32767,pc),d1
+move (pc,32767),d1
+
+move 127(a1,d1),d1
+move 127(a1,d1.l),d1
+move 127(d1,a1),d1
+move 127(d1.l,a1),d1
+
+move 127(pc,d1),d1
+move 127(pc,d1.l),d1
+move 127(d1,pc),d1
+move 127(d1.l,pc),d1
+
+move (a1,d1,127),d1
+move (a1,d1.l,127),d1
+move (d1,a1,127),d1
+move (d1.l,a1,127),d1
+move (a1,127,d1),d1
+move (a1,127,d1.l),d1
+move (d1,127,a1),d1
+move (d1.l,127,a1),d1
+
+move (pc,d1,127),d1
+move (pc,d1.l,127),d1
+move (d1,pc,127),d1
+move (d1.l,pc,127),d1
+move (pc,127,d1),d1
+move (pc,127,d1.l),d1
+move (d1,127,pc),d1
+move (d1.l,127,pc),d1
+
+loc:
+move 0.l,d1
+move loc.l,d1
+move #127,d1
+move #-128,d1
+move #255,d1
+move #-256,d1
+move #32767,d1
+move #-32768,d1
+move #65535,d1
+move #-65536,d1
+move #65536,d1
+move #-65537,d1