dioscuri.module.cpu
Class Instruction_CMPS_XbYb

java.lang.Object
  extended by dioscuri.module.cpu.Instruction_CMPS_XbYb
All Implemented Interfaces:
Instruction

public class Instruction_CMPS_XbYb
extends java.lang.Object
implements Instruction

Intel opcode A6
Compare string byte at address DS:(E)SI with address ES:(E)DI.
After compare, contents of SI and DI are incremented or decremented based on DF flag:
Byte: +/- 1, word: +/- 2, doubleword: +/-4.
Flags modified: CF, OF, SF, ZF, AF, and PF


Constructor Summary
Instruction_CMPS_XbYb()
          Class constructor
Instruction_CMPS_XbYb(CPU processor)
          Class constructor specifying processor reference
 
Method Summary
 void execute()
          Compare byte at address DS:(E)SI with address ES:(E)DI; set flags accordingly.
Increment/decrement both registers depending on DF flag.
Flags modified: CF, OF, SF, ZF, AF, and PF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Instruction_CMPS_XbYb

public Instruction_CMPS_XbYb()
Class constructor


Instruction_CMPS_XbYb

public Instruction_CMPS_XbYb(CPU processor)
Class constructor specifying processor reference

Parameters:
processor - Reference to CPU class
Method Detail

execute

public void execute()
Compare byte at address DS:(E)SI with address ES:(E)DI; set flags accordingly.
Increment/decrement both registers depending on DF flag.
Flags modified: CF, OF, SF, ZF, AF, and PF

Specified by:
execute in interface Instruction