mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-28 06:29:37 +00:00
Add STC, STD, STI.
This commit is contained in:
parent
5e830781cc
commit
0412890923
@ -610,6 +610,9 @@ void cwd(IntT &dx, IntT ax) {
|
||||
inline void clc(Status &status) { status.carry = 0; }
|
||||
inline void cld(Status &status) { status.direction = 0; }
|
||||
inline void cli(Status &status) { status.interrupt = 0; } // TODO: quite a bit more in protected mode.
|
||||
inline void stc(Status &status) { status.carry = 1; }
|
||||
inline void std(Status &status) { status.direction = 1; }
|
||||
inline void sti(Status &status) { status.interrupt = 1; } // TODO: quite a bit more in protected mode.
|
||||
inline void cmc(Status &status) { status.carry = !status.carry; }
|
||||
|
||||
}
|
||||
@ -731,6 +734,9 @@ template <
|
||||
case Operation::CLC: Primitive::clc(status); return;
|
||||
case Operation::CLD: Primitive::cld(status); return;
|
||||
case Operation::CLI: Primitive::cli(status); return;
|
||||
case Operation::STC: Primitive::stc(status); return;
|
||||
case Operation::STD: Primitive::std(status); return;
|
||||
case Operation::STI: Primitive::sti(status); return;
|
||||
case Operation::CMC: Primitive::cmc(status); return;
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ enum class Operation: uint8_t {
|
||||
CLI,
|
||||
/// Set carry flag.
|
||||
STC,
|
||||
/// Set decimal flag.
|
||||
/// Set direction flag.
|
||||
STD,
|
||||
/// Set interrupt flag.
|
||||
STI,
|
||||
|
@ -330,6 +330,9 @@ struct FailedExecution {
|
||||
@"F8.json.gz", // CLC
|
||||
@"FC.json.gz", // CLD
|
||||
@"FA.json.gz", // CLI
|
||||
@"F9.json.gz", // STC
|
||||
@"FD.json.gz", // STD
|
||||
@"FB.json.gz", // STI
|
||||
@"F5.json.gz", // CMC
|
||||
]];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user