From 6c341b31fc36157be445ad106257a3bba4abc87d Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 9 Jan 2018 01:32:41 +0100 Subject: rename --- eval.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'eval.go') diff --git a/eval.go b/eval.go index 06b350f..8c6e80a 100644 --- a/eval.go +++ b/eval.go @@ -15,11 +15,11 @@ const ( // J1 Forth processor VM type J1 struct { - pc uint16 // 13 bit - st0 uint16 // top of data stack + memory [memSize]uint16 // 0..0x3fff main memory, 0x4000 .. 0x7fff mem-mapped i/o + pc uint16 // 13 bit + st0 uint16 // top of data stack d stack r stack - memory [memSize]uint16 // 0..0x3fff main memory, 0x4000 .. 0x7fff mem-mapped i/o console io.ReadWriter } @@ -124,10 +124,10 @@ func (j1 *J1) eval(ins Instruction) { } case ALU: if v.RtoPC { - j1.pc = j1.r.peek() >> 1 + j1.pc = j1.r.get() >> 1 } if v.NtoAtT { - j1.write(j1.st0, j1.d.peek()) + j1.write(j1.st0, j1.d.get()) } st0 := j1.newST0(v.Opcode) j1.d.move(v.Ddir) @@ -150,7 +150,7 @@ func bool2int(b bool) uint16 { } func (j1 *J1) newST0(opcode uint16) uint16 { - T, N, R := j1.st0, j1.d.peek(), j1.r.peek() + T, N, R := j1.st0, j1.d.get(), j1.r.get() switch opcode { case opT: // T return T -- cgit v1.2.3