Skip to content

Commit

Permalink
bump version, add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Joeyh021 committed Feb 27, 2022
1 parent e42ab3d commit abe76ac
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "OOLANG"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
authors = ["Joey Harrison <[email protected]>"]
repository= "https://github.com/RNM-Enterprises/oolang"
Expand Down
4 changes: 4 additions & 0 deletions examples/add.oo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# program to compute 5 + 10
O ǾǾǾǾ
O ǾǾǾǾǾǾǾǾǾ
2 changes: 0 additions & 2 deletions examples/add.txt

This file was deleted.

Empty file removed examples/fibonacci-stack.txt
Empty file.
18 changes: 18 additions & 0 deletions examples/fibonacci.oo
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
O
O
O ◯ # store in memory 1
OǾ◯ # store in memory 2

OǾǾǾǾǾ # push 6 (calculate 6th fibonacci number)

O ◎ # load in memory 1
OǾ◎ # load in memory 2
⭕ # add
OǾ◎|O◯ # mov memory 2 to memory 1
OǾ◯ # store in memory 2

OǾǾǾǾǾǾǾǾǾǾǾǾ
𐍉 # jump to char 14 if not equal to 0

OǾ◎ # load in memory 2
16 changes: 16 additions & 0 deletions examples/multiply.oo
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
O ǾǾǾǾǾ # push 6 to stack
O ǾǾǾǾǾǾǾǾ # push 9 to stack
O ◯ # store 9 in memory 1
O ◎ # load 9 back into stack
O Ǿ ◯ # store 9 in memory 2

O ◎ # load in memory 1
O Ǿ ◎ # load in memory 2
O Ǿ ◯ # store result in memory 2
Ꮻ # decrease counter
O ǾǾǾǾǾǾǾǾǾǾǾǾǾǾǾǾǾǾǾǾǾǾ # push 23
𐍉

O Ǿ ◎ # load answer back in from memory 2
29 changes: 0 additions & 29 deletions examples/multiply.txt

This file was deleted.

17 changes: 0 additions & 17 deletions examples/power-of-2.txt

This file was deleted.

0 comments on commit abe76ac

Please sign in to comment.