summaryrefslogtreecommitdiff
path: root/input
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-04-03 01:06:46 -0400
committerbd <bdunahu@operationnull.com>2025-04-03 01:06:46 -0400
commitca8d176ac7745986c4e3a92ed7cea277e344262d (patch)
tree04b693f6ada68a62a2c109d8073a829577f6158e /input
parent5f010ed3f98ffb82fe94c1a31f3338485dd3fbb7 (diff)
add test files
Diffstat (limited to 'input')
-rw-r--r--input/add-loop.asm22
-rw-r--r--input/simple.asm5
2 files changed, 27 insertions, 0 deletions
diff --git a/input/add-loop.asm b/input/add-loop.asm
new file mode 100644
index 0000000..e24a7e6
--- /dev/null
+++ b/input/add-loop.asm
@@ -0,0 +1,22 @@
+ addi $fp $0 0x200
+ addi $5 $0 0x1
+ store $5 0($fp)
+ addi $5 $0 0x2
+ store $5 1($fp)
+ addi $5 $0 0x3
+ store $5 2($fp)
+ addi $5 $0 0x4
+ store $5 3($fp)
+ addi $5 $0 0x0
+ addi $6 $0 0x3
+ jrl CHECK
+LOOP:
+ add $9 $fp $5
+ load $7 0($9)
+ load $8 1($9)
+ add $7 $7 $8
+ store $7 0($9)
+ addi $5 $5 0x1
+CHECK:
+ cmp $6 $5
+ bgt LOOP
diff --git a/input/simple.asm b/input/simple.asm
new file mode 100644
index 0000000..3e60ee8
--- /dev/null
+++ b/input/simple.asm
@@ -0,0 +1,5 @@
+ addi $sp $0 512
+ addi $5 $0 1
+ store $5 0($sp)
+ addi $5 $0 2
+ store $5 1($sp)