stacks example

floats
Ondřej Hruška 4 years ago
parent 651ffcb888
commit 8d585d765b
Signed by untrusted user: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 15
      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)
)
Loading…
Cancel
Save