aboutsummaryrefslogtreecommitdiff
path: root/core.go
diff options
context:
space:
mode:
Diffstat (limited to 'core.go')
-rw-r--r--core.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core.go b/core.go
index df89425..72aab2c 100644
--- a/core.go
+++ b/core.go
@@ -100,20 +100,20 @@ func (c *Core) readAt(addr uint16) uint16 {
func (c *Core) Run() {
for {
ins := c.Decode()
- err := c.Eval(ins)
+ err := c.Evaluate(ins)
if err == ErrStop {
return
}
}
}
-// Decode instruction
+// Decode instruction at current program counter position
func (c *Core) Decode() Instruction {
return Decode(c.memory[c.pc])
}
-// Eval instruction
-func (c *Core) Eval(ins Instruction) error {
+// Evaluate instruction
+func (c *Core) Evaluate(ins Instruction) error {
c.pc++
switch v := ins.(type) {
case Literal: