commit 315c71ea3d9eb9c3e8b50892939fb04f3b583f84
parent 5cd10237dd040262673cba8660a9a113a8be292a
Author: Pavel Renev <an2qzavok@gmail.com>
Date: Sun, 17 Oct 2021 21:26:28 +0000
fix bad code
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dForth.go b/dForth.go
@@ -49,7 +49,7 @@ func NewForth() *Forth {
NewWord("_read", forth.biRead),
NewWord("_call", forth.biCall),
NewWord("_lit", forth.biLit),
- NewWord("_jump", forth.BiJump),
+ NewWord("_jump", forth.biJump),
NewWord(".", forth.biDot),
NewWord("@", forth.biFetch),
NewWord("!", forth.biStore),
@@ -194,14 +194,14 @@ func (forth *Forth) biLit() error {
return err
}
val, err := forth.memFetch(pc)
- forth.Push(val)
+ forth.Push(stpt, val)
return err
}
func (forth *Forth) biJump() error {
var err error
- cond := forth.Pop()
- addr := forth.Pop()
+ cond := forth.Pop(stpt)
+ addr := forth.Pop(stpt)
if cond == 0 {
err = forth.memStore(pcpt, addr)
}