jmce - 1_02

jmce.sim.cpu
Class RuntimeOpcode

java.lang.Object
  extended by jmce.sim.cpu.AbstractOpcode
      extended by jmce.sim.cpu.RuntimeOpcode
All Implemented Interfaces:
Opcode
Direct Known Subclasses:
OpcodeRuntime8086

public abstract class RuntimeOpcode
extends AbstractOpcode

Opcode with Runtime

This type of opcode is used when the instructions require a runtime. For example the intel 8086 require a runtime to track istruction prefix and segment override.

Version:
1.00
Author:
Mario Viara

Field Summary
 
Fields inherited from class jmce.sim.cpu.AbstractOpcode
desc, length, multiOpcode, opcode, opcodes, prefixOpcode, runtimeOpcode, times
 
Constructor Summary
RuntimeOpcode(int opcode, int length, int times, java.lang.String desc)
           
 
Method Summary
abstract  void decode(CPU cpu, CpuRuntime r)
           
abstract  int exec(CpuRuntime r)
           
 int exec(int pc)
          Exec the specific opcode
 
Methods inherited from class jmce.sim.cpu.AbstractOpcode
clearCounter, getCounter, getDescription, getLength, getMaxLength, getOpcode, getOpcode, getOpcodeCount, getTimes, incCounter, isMultiOpcode, setDescription, setOpcode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuntimeOpcode

public RuntimeOpcode(int opcode,
                     int length,
                     int times,
                     java.lang.String desc)
Method Detail

exec

public final int exec(int pc)
               throws SIMException
Description copied from interface: Opcode
Exec the specific opcode

Throws:
SIMException

decode

public abstract void decode(CPU cpu,
                            CpuRuntime r)
                     throws SIMException
Throws:
SIMException

exec

public abstract int exec(CpuRuntime r)
                  throws SIMException
Throws:
SIMException

jmce - 1_02