also in disassembler mode it would throw exceptions

This commit is contained in:
folkert van heusden 2024-04-05 15:00:45 +02:00
parent 20f5f7b4bd
commit a6003698a6
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1
3 changed files with 8 additions and 12 deletions

View file

@ -1,11 +0,0 @@
#! /bin/sh
pdpy11 --lst tester.mac
if [ ! -e raw_to_simh_bin ] ; then
g++ -Ofast raw_to_simh_bin.cpp -o raw_to_simh_bin
fi
./raw_to_simh_bin tester 512 512 tester.bin
ls -la tester*

View file

@ -407,7 +407,6 @@ uint16_t bus::read(const uint16_t addr_in, const word_mode_t word_mode, const rm
DOLOG(debug, true, "READ-I/O UNHANDLED read %08o (%c), (base: %o)", m_offset, word_mode ? 'B' : ' ', get_io_base());
c->trap(004); // no such i/o
throw 1;
}
@ -422,6 +421,11 @@ uint16_t bus::read(const uint16_t addr_in, const word_mode_t word_mode, const rm
}
if (m_offset >= n_pages * 8192) {
if (peek_only) {
DOLOG(debug, true, "READ from %06o - out of range!", addr_in);
return 0;
}
c->trap(004); // no such RAM
throw 1;
}

View file

@ -563,6 +563,9 @@ void debugger(console *const cnsl, bus *const b, std::atomic_uint32_t *const sto
catch(const std::exception & e) {
cnsl->put_string_lf(format("Exception caught: %s", e.what()));
}
catch(const int ei) {
cnsl->put_string_lf(format("Problem: %d", ei));
}
catch(...) {
cnsl->put_string_lf("Unspecified exception caught");
}