aboutsummaryrefslogtreecommitdiff
path: root/examples/o.s
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-11-25 18:22:26 +0000
committerDimitri Sokolyuk <demon@dim13.org>2015-11-25 18:22:26 +0000
commita5c6776929cd51f3bf86a126856669a66012b030 (patch)
tree9494f24340583b39e9256fe60ec7771495175bbe /examples/o.s
parent76369877147e77c24e6b56f4a166922959c2f149 (diff)
More examples
Diffstat (limited to 'examples/o.s')
-rw-r--r--examples/o.s34
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/o.s b/examples/o.s
new file mode 100644
index 0000000..5246a41
--- /dev/null
+++ b/examples/o.s
@@ -0,0 +1,34 @@
+;All operand types, presented in various ways
+
+:start set a, 5
+ set a, b
+ set a, [b]
+ set a, [b + 3]
+ set a, [3 + b] ;both ways should be acceptable
+ set a, [b+3] ;spaces should not be forced
+ set a, POP
+ set a, PEEK
+ set PUSH, a
+ set a, start
+ set a, [start]
+ set a, PC
+ set a, SP
+ set a, O
+
+ ;reverse these
+
+ ;set 5, a ;allowable in the spec though
+
+ set b, a
+ set [b], a
+ set [b + 3], a
+ set [3 + b], a
+ set [b+3], a
+ set POP, a
+ set PEEK, a
+ set a, PUSH
+ set start, a
+ set [start], a
+ set PC, a
+ set SP, a
+ set O, a