View Javadoc
1 package jrre.instructionset.math; 2 3 import jrre.*; 4 import jrre.types.*; 5 6 public class DMul extends jrre.instructionset.Instruction { 7 8 public DMul(){ 9 10 name = "dmul"; 11 description = "foo foo moo poo"; 12 length = 0; 13 } 14 15 /*** 16 * Executes the <strong><code>dmul</code></strong> instruction. 17 * 18 */ 19 public void execute(){ 20 21 int valueOneWordOne = ((PrimitiveType)Stack.popOperand()).getValue(); 22 int valueOneWordTwo = ((PrimitiveType)Stack.popOperand()).getValue(); 23 24 int valueTwoWordOne = ((PrimitiveType)Stack.popOperand()).getValue(); 25 int valueTwoWordTwo = ((PrimitiveType)Stack.popOperand()).getValue(); 26 27 //?? 28 int valueOne = (valueOneWordOne << 32) | valueOneWordTwo; 29 int valueTwo = (valueTwoWordOne << 32) | valueTwoWordTwo; 30 31 Stack.pushOperand(new PrimitiveType(valueOne*valueTwo)); 32 33 } 34 35 public String toString(){ 36 return "dmul"; 37 } 38 }

This page was automatically generated by Maven