 
 // [8A] ADC A, D
 def op_8A() {
-  *A = om_adc8(*A, *C);
+  *A = om_adc8(*A, *D);
 }
 
 // [8B] ADC A, E

// Shift Right
def om_shr(n: uint8, arithmetic: bool): uint8 {
  let r = if arithmetic {
    ((n & 0x7F) >> 1) | (n & 0x80);
  } else {
    (n >> 1);
  };


// Increment 8-bit Register
def om_inc8(r: uint8): uint8 {
  r += 1;

  flag_set(FLAG_Z, r == 0);
  flag_set(FLAG_N, false);
  flag_set(FLAG_H, r & 0x0F == 0x00);

  return r;
}

// Decrement 8-bit Register
def om_dec8(r: uint8): uint8 {
  r -= 1;

  flag_set(FLAG_Z, r == 0);
  flag_set(FLAG_N, true);
  flag_set(FLAG_H, r & 0x0F == 0x0F);

  return r;
}
