Compare commits

...

7 Commits
v1.0.1 ... main

Author SHA1 Message Date
Sasha Koshka
c7d948cdcd Added some helpful comments to the creature command 2022-09-08 18:46:59 -04:00
Sasha Koshka
dcd8c56c0d Added basic implementation that executes text files 2022-09-08 16:02:36 -04:00
Sasha Koshka
a52e5d3426 Ran gofmt 2022-09-08 14:43:19 -04:00
Sasha Koshka
b0068336cd Programs are now loaded with a function and not a member var 2022-09-08 14:41:50 -04:00
Sasha Koshka
3be08736b4 Downgraded to go 1.18 so it works on my laptop 2022-09-08 14:36:28 -04:00
cfae69c0c2 Updated readme accordingly 2022-08-29 20:20:46 -04:00
d7d5be6949 Reversed order of comparison and arithmetic operations 2022-08-29 20:15:46 -04:00
10 changed files with 264 additions and 134 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/cmd/creature/creature

View File

@ -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