1 package jrre.instructionset.math;
2
3 import jrre.*;
4 import jrre.types.*;
5
6 public class ISub extends jrre.instructionset.Instruction {
7
8 public ISub(){
9
10 name = "isub";
11 description = "foo foo moo poo";
12 length = 0;
13 }
14
15 /***
16 * Executes the <strong><code>isub</code></strong> instruction.
17 *
18 */
19 public void execute(){
20
21 int rightSide = ((PrimitiveType)Stack.popOperand()).getValue();
22 int leftSide = ((PrimitiveType)Stack.popOperand()).getValue();
23
24 Stack.pushOperand(new PrimitiveType(leftSide-rightSide));
25
26 }
27
28 public String toString(){
29 return "isub";
30 }
31 }
This page was automatically generated by Maven