org.zmpp.vm
Class Short0Instruction

java.lang.Object
  extended by org.zmpp.vm.AbstractInstruction
      extended by org.zmpp.vm.Short0Instruction
All Implemented Interfaces:
Instruction

public class Short0Instruction
extends AbstractInstruction

This class represents instructions of type SHORT, 0OP.

Version:
1.0
Author:
Wei-ju Wu

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zmpp.vm.AbstractInstruction
AbstractInstruction.InstructionForm, AbstractInstruction.OperandCount
 
Field Summary
static int OP_NEW_LINE
           
static int OP_NOP
           
static int OP_POP
           
static int OP_QUIT
           
static int OP_RESTART
           
static int OP_RESTORE
           
static int OP_RET_POPPED
           
static int OP_RFALSE
           
static int OP_RTRUE
           
static int OP_SAVE
           
static int OP_SHOW_STATUS
           
static int OP_VERIFY
           
 
Fields inherited from class org.zmpp.vm.AbstractInstruction
FALSE, TRUE
 
Constructor Summary
Short0Instruction(Machine machineState, int opcode)
          Constructor.
 
Method Summary
 void execute()
          Execute the instruction.
 AbstractInstruction.InstructionForm getInstructionForm()
          Returns the instruction's form.
 AbstractInstruction.OperandCount getOperandCount()
          Returns the instruction's operand count type.
 boolean isBranch()
          Returns true, if this instruction is a branch, false, otherwise.
 
Methods inherited from class org.zmpp.vm.AbstractInstruction
addOperand, branchIfTrue, branchOnTest, getBranchOffset, getLength, getMachine, getNumOperands, getOpcode, getOperand, getStoreVariable, getUnsignedValue, getValue, nextInstruction, returnFromRoutine, setBranchIfTrue, setBranchOffset, setLength, setOpcode, setStoreVariable, storeResult, storesResult, throwInvalidOpcode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OP_RTRUE

public static final int OP_RTRUE
See Also:
Constant Field Values

OP_RFALSE

public static final int OP_RFALSE
See Also:
Constant Field Values

OP_NOP

public static final int OP_NOP
See Also:
Constant Field Values

OP_SAVE

public static final int OP_SAVE
See Also:
Constant Field Values

OP_RESTORE

public static final int OP_RESTORE
See Also:
Constant Field Values

OP_RESTART

public static final int OP_RESTART
See Also:
Constant Field Values

OP_RET_POPPED

public static final int OP_RET_POPPED
See Also:
Constant Field Values

OP_POP

public static final int OP_POP
See Also:
Constant Field Values

OP_QUIT

public static final int OP_QUIT
See Also:
Constant Field Values

OP_NEW_LINE

public static final int OP_NEW_LINE
See Also:
Constant Field Values

OP_SHOW_STATUS

public static final int OP_SHOW_STATUS
See Also:
Constant Field Values

OP_VERIFY

public static final int OP_VERIFY
See Also:
Constant Field Values
Constructor Detail

Short0Instruction

public Short0Instruction(Machine machineState,
                         int opcode)
Constructor.

Parameters:
machineState - a reference to the MachineState object
opcode - the instruction's opcode
Method Detail

execute

public void execute()
Execute the instruction.


getInstructionForm

public AbstractInstruction.InstructionForm getInstructionForm()
Returns the instruction's form.

Specified by:
getInstructionForm in class AbstractInstruction
Returns:
the instruction form

getOperandCount

public AbstractInstruction.OperandCount getOperandCount()
Returns the instruction's operand count type.

Specified by:
getOperandCount in class AbstractInstruction
Returns:
the operand count type

isBranch

public boolean isBranch()
Returns true, if this instruction is a branch, false, otherwise.

Overrides:
isBranch in class AbstractInstruction
Returns:
true if branch, false otherwise


Copyright © 2005 . All Rights Reserved.