Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7d948cdcd | ||
|
|
dcd8c56c0d | ||
|
|
a52e5d3426 | ||
|
|
b0068336cd | ||
|
|
3be08736b4 | ||
| cfae69c0c2 | |||
| d7d5be6949 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/cmd/creature/creature
|
||||||
41
README.md
41
README.md
@ -16,6 +16,11 @@ Each documented instruction has a list of what is pushed, and what is popped.
|
|||||||
the items are listed in chronological order, from first pushed/popped to last
|
the items are listed in chronological order, from first pushed/popped to last
|
||||||
pushed/popped.
|
pushed/popped.
|
||||||
|
|
||||||
|
You'll notice that words specifying an address are always at the top of the
|
||||||
|
stack. This helps increse security and reduce the likelihood of bugs. When
|
||||||
|
writing functions to extend creature, it is highly advised that you follow this
|
||||||
|
principle when deciding on an order to pop arguments off of the stack in.
|
||||||
|
|
||||||
### 0x0 PUSH
|
### 0x0 PUSH
|
||||||
|
|
||||||
Pushes the next word in program memory onto the stack.
|
Pushes the next word in program memory onto the stack.
|
||||||
@ -53,8 +58,8 @@ Pops:
|
|||||||
Adds two words. Tip: this can be used as a logical OR.
|
Adds two words. Tip: this can be used as a logical OR.
|
||||||
|
|
||||||
Pops:
|
Pops:
|
||||||
1. left operand
|
1. right operand
|
||||||
2. right operand
|
2. left operand
|
||||||
|
|
||||||
Pushes:
|
Pushes:
|
||||||
1. left operand + right operand
|
1. left operand + right operand
|
||||||