mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Implement LEA.
This commit is contained in:
parent
3c1c4f89e9
commit
4279ce87ea
@ -163,6 +163,7 @@ enum ExecutionState: int {
|
||||
|
||||
DIVU_DIVS,
|
||||
MULU_MULS,
|
||||
LEA,
|
||||
};
|
||||
|
||||
// MARK: - The state machine.
|
||||
@ -701,6 +702,12 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
StdCASE(MULU, perform_state_ = MULU_MULS);
|
||||
StdCASE(MULS, perform_state_ = MULU_MULS);
|
||||
|
||||
StdCASE(LEA, {
|
||||
post_ea_state_ = LEA;
|
||||
next_operand_ = 0;
|
||||
MoveToStateSpecific(CalcEffectiveAddress);
|
||||
});
|
||||
|
||||
default:
|
||||
assert(false);
|
||||
}
|
||||
@ -1875,6 +1882,14 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
|
||||
MoveToStateSpecific(Decode);
|
||||
|
||||
//
|
||||
// LEA
|
||||
//
|
||||
BeginState(LEA):
|
||||
registers_[8 + instruction_.reg(1)].l = effective_address_[0];
|
||||
Prefetch();
|
||||
MoveToStateSpecific(Decode);
|
||||
|
||||
//
|
||||
// Various states TODO.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user