// MATCHES CMP 400, CMP 300
//REGEX[1] - "CMP [0-9]{1,9}"
// MATCHES CMP AX, CMP DX
//REGEX[2] - "CMP [ABCD]X"
FlagCatcher flagCatcher = new FlagCatcher(getMainPanel());
if (RegexMatcher.matches(regex0, getCurrentInstruction().getLineCommand())) {
// Pega o comando na posição definida pelo numero após o @
Instruction dest = getInstructionAt(getCurrentInstruction().getValue());
Value value = ALU.sub(getRegisters().getAx().getValue(), dest.getValue());
// Faz a verificação do valor obtido e liga as flags necessárias
flagCatcher.executeCheck(value);
} else if (RegexMatcher.matches(regex1, getCurrentInstruction().getLineCommand())) {
// Subtrai o valor definido no ADD com o valor atual de AX
Value value = ALU.sub(getRegisters().getAx().getValue(), getCurrentInstruction().getValue());
// Faz a verificação do valor obtido e liga as flags necessárias
flagCatcher.executeCheck(value);
} else if (RegexMatcher.matches(regex2, getCurrentInstruction().getLineCommand())) {
// Subtrai o valor do registrador definido em ADD com o valor de AX
Value value = ALU.sub(getRegisters().getAx().getValue(), getCurrentInstruction().getRegister().getValue());
// Faz a verificação do valor obtido e liga as flags necessárias
flagCatcher.executeCheck(value);
}
}