decChk method

void decChk()

Implementation

void decChk() {
  //Debugger.verbose('${pcHex(-1)} [dec_chk]');

  final operands = mem.loadb(programCounter- 1) < 193
      ? visitOperandsLongForm()
      : visitOperandsVar(2, false);

  final value = MathHelper.toSigned(readVariable(operands[0].rawValue!)) - 1;

  //(ref http://www.gnelson.demon.co.uk/zspec/sect14.html notes #5)
  writeVariable(operands[0].rawValue!, value);

  branch(value < MathHelper.toSigned(operands[1].value!));
}