a test can now consist of multiple pdp instructions
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Some checks are pending
CodeQL / Analyze (push) Waiting to run
This commit is contained in:
parent
1bd06643b5
commit
b77c163cac
1 changed files with 11 additions and 5 deletions
8
main.cpp
8
main.cpp
|
@ -144,17 +144,23 @@ int run_cpu_validation(console *const cnsl, const std::string & filename)
|
|||
b->write_unibus_byte(element.first, element.second);
|
||||
}
|
||||
|
||||
int run_n_instructions = test["before"]["run-n-instructions"].as<int>();
|
||||
|
||||
int cur_n_errors = 0;
|
||||
|
||||
// DO!
|
||||
c->emulation_start();
|
||||
for(int k=0; k<run_n_instructions; k++) {
|
||||
disassemble(c, nullptr, c->getPC(), false);
|
||||
if (c->step() == false) {
|
||||
cnsl->put_string_lf("Treated as an invalid instruction");
|
||||
cur_n_errors++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// VERIFY
|
||||
else {
|
||||
if (cur_n_errors == 0) {
|
||||
auto after = test["after"];
|
||||
|
||||
cur_n_errors += !compare_values(cnsl, c->getPC(), get_register_value(after, "PC" ), "PC" );
|
||||
|
|
Loading…
Add table
Reference in a new issue