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