aboutsummaryrefslogtreecommitdiff
path: root/tests/stack_machine_multiinstructions_load_store
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-09-01 10:54:59 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-09-01 11:04:22 +0200
commitee1f6c47e1eff920068f4bceaf604f9535a2e8a9 (patch)
tree580eb001a72601d254bb29cc348a529490f84808 /tests/stack_machine_multiinstructions_load_store
parentcd02ddff8886aa1db29f80d3cc5cf99a349d8258 (diff)
downloadAGH-engineering-thesis-ee1f6c47e1eff920068f4bceaf604f9535a2e8a9.tar.gz
AGH-engineering-thesis-ee1f6c47e1eff920068f4bceaf604f9535a2e8a9.zip
start anew
Diffstat (limited to 'tests/stack_machine_multiinstructions_load_store')
-rwxr-xr-xtests/stack_machine_multiinstructions_load_store/instructions.s.tcl32
l---------tests/stack_machine_multiinstructions_load_store/test.v1
l---------tests/stack_machine_multiinstructions_load_store/words_to_verify.mem1
3 files changed, 34 insertions, 0 deletions
diff --git a/tests/stack_machine_multiinstructions_load_store/instructions.s.tcl b/tests/stack_machine_multiinstructions_load_store/instructions.s.tcl
new file mode 100755
index 0000000..58792d3
--- /dev/null
+++ b/tests/stack_machine_multiinstructions_load_store/instructions.s.tcl
@@ -0,0 +1,32 @@
+#!/usr/bin/env tclsh
+
+source tclasm.tcl
+
+### do the same as in stack_machine_2 test, but use higher level instructions
+
+## set sp to h7FFFC
+set_sp h7FFFC
+## get value h01010202 into r1
+const h01010202
+## get value h03030404 into r1
+stack down
+const h03030404
+## get value h05050606 into r1
+stack down
+const h05050606
+## get value h07070808 into r1
+stack down
+const h07070808
+## write r1 to address h57574
+store@ h57574
+stack up
+## write r1 to address h57578
+store@ h57578
+stack up
+## write r1 to address h5757C
+store@ h5757C
+stack up
+## write r1 to address h57580
+store@ h57580
+## finish test
+halt
diff --git a/tests/stack_machine_multiinstructions_load_store/test.v b/tests/stack_machine_multiinstructions_load_store/test.v
new file mode 120000
index 0000000..f5b6a59
--- /dev/null
+++ b/tests/stack_machine_multiinstructions_load_store/test.v
@@ -0,0 +1 @@
+../stack_machine_store/test.v \ No newline at end of file
diff --git a/tests/stack_machine_multiinstructions_load_store/words_to_verify.mem b/tests/stack_machine_multiinstructions_load_store/words_to_verify.mem
new file mode 120000
index 0000000..b2e490b
--- /dev/null
+++ b/tests/stack_machine_multiinstructions_load_store/words_to_verify.mem
@@ -0,0 +1 @@
+../stack_machine_load_store/words_to_verify.mem \ No newline at end of file