|
From: Alexander F. <af...@en...> - 2005-10-17 11:41:26
|
Here's a rough list of potential opcodes for the Emerson virtual machine. What are your thoughts? Arithmetic: add subtract multiply divide remainder negate shift AND OR XOR increment decrement compare Classes, Arrays: new class new instance of class new array get object reference from array of objects store object reference in array of objects get value from array store value in array get array length what about type conversions? float-to-integer, etc? Execution: goto throw expection set breakpoint jump if equal jump if not equal jump if greater than jump if less than jump if greater than or equal to jump if less than or equal to jump if null (how are we defining "null" within the namespace, by the way? is it just zero, or some magical voidness?) temporarily lock object (let's say you're sorting an array; you don't want another thread to access it) unlock object call static method call instance method branch to address? Stack manipulation: Push value onto stack Pop value off stack Swap top two values on the stack There's a whole crapload I'm probably forgetting or neglecting. Change whatever you like and add whatever you like! Regards. -Alex. ---------------------------------------- This mail sent through www.mywaterloo.ca |