[zvm] 1 new revision pushed by david.jc.anderson on 2009-05-28 22:22 GMT

0 views
Skip to first unread message

codesite...@google.com

unread,
May 28, 2009, 6:22:44 PM5/28/09
to zvm...@googlegroups.com
Revision: 5623d274d0
Author: David Anderson <da...@natulte.net>
Date: Thu May 28 15:19:22 2009
Log: Implement op_push and fix instruction decoding....
http://code.google.com/p/zvm/source/detail?r=5623d274d0

Modified:
/zvm/zcpu.py
/zvm/zopdecoder.py

=======================================
--- /zvm/zcpu.py Thu May 28 14:32:26 2009
+++ /zvm/zcpu.py Thu May 28 15:19:22 2009
@@ -314,7 +314,7 @@
raise ZCpuNotImplemented

def op_call_2s(self, routine_addr, arg1):
- """TODO: Write docstring here."""
+ """Call routine(arg1) and store the result."""
self._call(routine_addr, [arg1], True)

def op_call_2n(self, routine_addr, arg1):
@@ -573,9 +573,9 @@
self._write_result(result)


- def op_push(self, *args):
- """TODO: Write docstring here."""
- raise ZCpuNotImplemented
+ def op_push(self, value):
+ """Push a value onto the current routine's game stack."""
+ self._stackmanager.push_stack(value)

def op_pull(self, *args):
"""TODO: Write docstring here."""
=======================================
--- /zvm/zopdecoder.py Mon May 12 10:00:49 2008
+++ /zvm/zopdecoder.py Thu May 28 15:19:22 2009
@@ -112,7 +112,7 @@
log("Variable opcode of VAR kind")
opcode_type = OPCODE_VAR
else:
- log("Variable opcode of actually of 2OP kind")
+ log("Variable opcode of 2OP kind")
opcode_type = OPCODE_2OP

opcode_num = opcode[0:5]
@@ -121,7 +121,7 @@
operands = self._parse_operands_byte()

# Special case: opcodes 12 and 26 have a second operands byte.
- if opcode_num == 0xC or opcode_num == 0x1A:
+ if opcode[0:7] == 0xC or opcode[0:7] == 0x1A:
log("Opcode has second operand byte")
operands += self._parse_operands_byte()

Reply all
Reply to author
Forward
0 new messages