1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-03 11:30:02 +00:00

Improves debugging printout.

This commit is contained in:
Thomas Harte 2019-04-12 13:45:03 -04:00
parent 1098cd0c6b
commit 9ce48953c1

View File

@ -59,10 +59,12 @@ template <class T, bool dtack_is_implicit> void Processor<T, dtack_is_implicit>:
std::cerr << "68000 Abilities exhausted; can't manage instruction " << std::hex << decoded_instruction_ << " from " << (program_counter_.full - 4) << std::endl;
return;
} else {
std::cout << "Performing " << std::hex << decoded_instruction_ << " from " << (program_counter_.full - 4) << '\t';
for(int c = 0; c < 8; ++ c) std::cout << "d" << c << ":" << data_[c].full << " ";
for(int c = 0; c < 8; ++ c) std::cout << "a" << c << ":" << address_[c].full << " ";
std::cout << std::endl;
std::cout << std::hex << (program_counter_.full - 4) << ": " << decoded_instruction_ << '\t';
std::cout << (extend_flag_ ? 'x' : '-') << (negative_flag_ ? 'n' : '-') << (zero_result_ ? '-' : 'z');
std::cout << (overflow_flag_ ? 'v' : '-') << (carry_flag_ ? 'c' : '-') << '\t';
}
active_program_ = &instructions[decoded_instruction_];