aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-01-09 01:44:31 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-01-09 01:44:31 +0100
commit39560c9ba63bfa43f5fe4691ba0041e3403a6533 (patch)
treefbbbbcd3970ac6d1c2ec3d2b3de6a1dacf1ee150
parent5d8d5479ae86497fb79f8cdab5579e25ba88862d (diff)
...
-rw-r--r--eval.go5
-rw-r--r--stack.go2
2 files changed, 3 insertions, 4 deletions
diff --git a/eval.go b/eval.go
index afc7de1..190287f 100644
--- a/eval.go
+++ b/eval.go
@@ -8,10 +8,7 @@ import (
"io/ioutil"
)
-const (
- memSize = 0x4000
- stackSize = 0x20
-)
+const memSize = 0x4000
// J1 Forth processor VM
type J1 struct {
diff --git a/stack.go b/stack.go
index dc49570..ecae058 100644
--- a/stack.go
+++ b/stack.go
@@ -1,5 +1,7 @@
package j1
+const stackSize = 0x20
+
type stack struct {
data [stackSize]uint16 // stack
sp int8 // 5 bit stack pointer