[zvm] 2 new revisions pushed by david.jc.anderson on 2009-05-28 23:22 GMT

0 views
Skip to first unread message

codesite...@google.com

unread,
May 28, 2009, 7:22:23 PM5/28/09
to zvm...@googlegroups.com
2 new revisions:

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."""

Reply all
Reply to author
Forward
0 new messages