aboutsummaryrefslogtreecommitdiff
path: root/examples/o.s
diff options
context:
space:
mode:
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