nl.kbna.dioscuri.module.cpu
Class Instruction_CMP_EbGb

java.lang.Object
  extended by nl.kbna.dioscuri.module.cpu.Instruction_CMP_EbGb
All Implemented Interfaces:
Instruction

public class Instruction_CMP_EbGb
extends java.lang.Object
implements Instruction

Intel opcode 38
Byte-sized comparison (SUB) of memory/register ("destination") with register (source).
The addressbyte determines the source (rrr bits) and "destination" (sss bits).
Flags modified: OF, SF, ZF, AF, PF, CF


Field Summary
(package private)  byte addressByte
           
private  CPU cpu
           
(package private)  byte destinationValue
           
(package private)  byte[] memoryReferenceDisplacement
           
(package private)  byte[] memoryReferenceLocation
           
(package private)  boolean operandWordSize
           
(package private)  byte registerHighLow
           
(package private)  byte sourceValue
           
(package private)  byte tempResult
           
 
Constructor Summary
Instruction_CMP_EbGb()
          Class constructor
Instruction_CMP_EbGb(CPU processor)
          Class constructor specifying processor reference
 
Method Summary
 void execute()
          Byte-sized comparison (SUB) of memory/register with register.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cpu

private CPU cpu

operandWordSize

boolean operandWordSize

addressByte

byte addressByte

memoryReferenceLocation

byte[] memoryReferenceLocation

memoryReferenceDisplacement

byte[] memoryReferenceDisplacement

sourceValue

byte sourceValue

destinationValue

byte destinationValue

registerHighLow

byte registerHighLow

tempResult

byte tempResult
Constructor Detail

Instruction_CMP_EbGb

public Instruction_CMP_EbGb()
Class constructor


Instruction_CMP_EbGb

public Instruction_CMP_EbGb(CPU processor)
Class constructor specifying processor reference

Parameters:
processor - Reference to CPU class
Method Detail

execute

public void execute()
Byte-sized comparison (SUB) of memory/register with register.
Does not update any registers, only sets appropriate flags.

Specified by:
execute in interface Instruction