mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-20 10:17:05 +00:00
Implement STR.
This commit is contained in:
@@ -244,4 +244,12 @@ void ltr(
|
||||
context.registers.set_task_state(source);
|
||||
}
|
||||
|
||||
template <typename ContextT>
|
||||
void str(
|
||||
write_t<uint16_t> destination,
|
||||
ContextT &context
|
||||
) {
|
||||
destination = context.registers.task_state();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -581,8 +581,9 @@ template <
|
||||
assert(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case Operation::LTR:
|
||||
if constexpr (ContextT::model >= Model::i80286) {
|
||||
if constexpr (ContextT::model >= Model::i80286 && std::is_same_v<IntT, uint16_t>) {
|
||||
if(is_real(context.cpu_control.mode())) {
|
||||
throw Exception::exception<Vector::InvalidOpcode>();
|
||||
return;
|
||||
@@ -592,6 +593,17 @@ template <
|
||||
assert(false);
|
||||
}
|
||||
break;
|
||||
case Operation::STR:
|
||||
if constexpr (ContextT::model >= Model::i80286 && std::is_same_v<IntT, uint16_t>) {
|
||||
if(is_real(context.cpu_control.mode())) {
|
||||
throw Exception::exception<Vector::InvalidOpcode>();
|
||||
return;
|
||||
}
|
||||
Primitive::str(destination_w(), context);
|
||||
} else {
|
||||
assert(false);
|
||||
}
|
||||
break;
|
||||
|
||||
// TODO to reach a full 80286:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user