diff --git a/examples/stacks.csn b/examples/stacks.csn new file mode 100644 index 0000000..c2f5111 --- /dev/null +++ b/examples/stacks.csn @@ -0,0 +1,15 @@ +( + (stack r0) + + (push @r0 1) + (push @r0 2) + + (pop r1 @r0) + (cmp r1 2 (ne? (fault))) + + (pop r1 @r0) + (cmp r1 1 (ne? (fault))) + + (drop @r0) + (halt) +)