dioscuri.module.cpu
Class Instruction_CMPS_XvYv

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

public class Instruction_CMPS_XvYv
extends java.lang.Object
implements Instruction

Intel opcode A7
Compare string word 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_XvYv()
          Class constructor
Instruction_CMPS_XvYv(CPU processor)
          Class constructor specifying processor reference
 
Method Summary
 void execute()
          Compare word 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_XvYv

public Instruction_CMPS_XvYv()
Class constructor


Instruction_CMPS_XvYv

public Instruction_CMPS_XvYv(CPU processor)
Class constructor specifying processor reference

Parameters:
processor - Reference to CPU class
Method Detail

execute

public void execute()
Compare word 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