Revision: 61421ab9ae
Author: David Anderson <da...@natulte.net>
Date: Thu May 28 16:17:14 2009
Log: Implement the op_print_ret opcode.
http://code.google.com/p/zvm/source/detail?r=61421ab9ae
Revision: 688f4ec5da
Author: David Anderson <da...@natulte.net>
Date: Thu May 28 16:20:45 2009
Log: Implement the get_parent and get_child opcodes.
http://code.google.com/p/zvm/source/detail?r=688f4ec5da
==============================================================================
Revision: 61421ab9ae
Author: David Anderson <da...@natulte.net>
Date: Thu May 28 16:17:14 2009
Log: Implement the op_print_ret opcode.
http://code.google.com/p/zvm/source/detail?r=61421ab9ae
Modified:
/zvm/zcpu.py
=======================================
--- /zvm/zcpu.py Thu May 28 16:13:32 2009
+++ /zvm/zcpu.py Thu May 28 16:17:14 2009
@@ -442,9 +442,10 @@
zstr_address = self._opdecoder.get_zstring()
self._ui.screen.write(self._string.get(zstr_address))
- def op_print_ret(self, *args):
+ def op_print_ret(self):
"""TODO: Write docstring here."""
- raise ZCpuNotImplemented
+ self.op_print()
+ self.op_rtrue()
def op_nop(self, *args):
"""TODO: Write docstring here."""
==============================================================================
Revision: 688f4ec5da
Author: David Anderson <da...@natulte.net>
Date: Thu May 28 16:20:45 2009
Log: Implement the get_parent and get_child opcodes.
http://code.google.com/p/zvm/source/detail?r=688f4ec5da
Modified:
/zvm/zcpu.py
=======================================
--- /zvm/zcpu.py Thu May 28 16:17:14 2009
+++ /zvm/zcpu.py Thu May 28 16:20:45 2009
@@ -341,13 +341,15 @@
"""TODO: Write docstring here."""
raise ZCpuNotImplemented
- def op_get_child(self, *args):
- """TODO: Write docstring here."""
- raise ZCpuNotImplemented
-
- def op_get_parent(self, *args):
- """TODO: Write docstring here."""
- raise ZCpuNotImplemented
+ def op_get_child(self, object_num):
+ """Get and store the first child of the given object."""
+ self._write_result(
+ self._objects.get_child(object_num))
+
+ def op_get_parent(self, object_num):
+ """Get and store the parent of the given object."""
+ self._write_result(
+ self._objects.get_parent(object_num))
def op_get_prop_len(self, *args):
"""TODO: Write docstring here."""