summaryrefslogtreecommitdiff
path: root/2019/rust/day09/programs/test-add_position_position_position.iac
diff options
context:
space:
mode:
authorcos <cos>2019-12-09 21:16:35 +0100
committercos <cos>2019-12-09 21:22:43 +0100
commit4c6c41b055d857f7dc2599262720a83da8d215be (patch)
tree6ebf781da98bf4f1cffa6045651e184468a771b4 /2019/rust/day09/programs/test-add_position_position_position.iac
parent7c464db6ffb3872f46a422f7ee0345f46bffbeae (diff)
downloadadventofcode-4c6c41b055d857f7dc2599262720a83da8d215be.zip
Add day09, 2019
Diffstat (limited to '2019/rust/day09/programs/test-add_position_position_position.iac')
-rw-r--r--2019/rust/day09/programs/test-add_position_position_position.iac32
1 files changed, 32 insertions, 0 deletions
diff --git a/2019/rust/day09/programs/test-add_position_position_position.iac b/2019/rust/day09/programs/test-add_position_position_position.iac
new file mode 100644
index 0000000..c68d932
--- /dev/null
+++ b/2019/rust/day09/programs/test-add_position_position_position.iac
@@ -0,0 +1,32 @@
+# ABCDE
+# 210xx
+#
+# DE - two-digit opcode, xx == opcode x
+# C - mode of 1st parameter, 0 == position mode
+# B - mode of 2nd parameter, 1 == immediate mode
+# A - mode of 3rd parameter, 0 == relative mode,
+#
+# 1 (3) Add
+# 2 (3) Mul
+# 7 (3) LessThan
+# 8 (3) Equals
+# 3 (1) In
+# 4 (1) Out
+# 5 (2) JmpTrue
+# 6 (2) JmpFalse
+# 9 (1) BaseMod
+# 99 (0) Halt
+
+# Add
+1,8,9,7
+
+4,7
+
+# Halt
+99
+
+# Result
+0, 11, 81
+
+# Halt
+99