src/bins/decode.cc
/*
 * Queues a zero page read-write instruction using the given micro operation.
 */
Queues a zero page read-write instruction using the given micro operation.
Queues a zero page read - write instruction using the given micro operation .
void Decode::DecodeRwZp(CpuOperation op) {
  state_->AddCycle(MEM_READZP | MEM_OP1(REG_ADDRL) | MEM_ADDR(REG_PCL)
                 | PC_INC);
  state_->AddCycle(MEM_READ | MEM_OP1(REG_TMP1) | MEM_ADDR(REG_ADDRL));
  state_->AddCycle(MEM_WRITE | MEM_OP1(REG_TMP1) | MEM_ADDR(REG_ADDRL) | op);
  state_->AddCycle(MEM_WRITE | MEM_OP1(REG_TMP1) | MEM_ADDR(REG_ADDRL));
  state_->AddCycle(MEM_FETCH | PC_INC);
  return;
}
void Decode :: DecodeRwZp ( CpuOperation op ) { state_ -> AddCycle ( MEM_READZP | MEM_OP1 ( REG_ADDRL ) | MEM_ADDR ( REG_PCL ) | PC_INC ) ; state_ -> AddCycle ( MEM_READ | MEM_OP1 ( REG_TMP1 ) | MEM_ADDR ( REG_ADDRL ) ) ; state_ -> AddCycle ( MEM_WRITE | MEM_OP1 ( REG_TMP1 ) | MEM_ADDR ( REG_ADDRL ) | op ) ; state_ -> AddCycle ( MEM_WRITE | MEM_OP1 ( REG_TMP1 ) | MEM_ADDR ( REG_ADDRL ) ) ; state_ -> AddCycle ( MEM_FETCH | PC_INC ) ; return ; }
Queues a zero page read-write instruction using the given micro operation.
Queues a zero page read - write instruction using the given micro operation .