From c282d1dcdd53b123edf03102db5d852d660f598e Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Sun, 26 Mar 2023 11:15:03 +0200 Subject: [PATCH] Allow BIC-files to be terminated with ^e. --- debugger.cpp | 6 ++++-- tty.cpp | 11 ----------- tty.h | 3 --- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index d9b996e..43a7bd1 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -505,9 +505,9 @@ void run_bic(console *const cnsl, bus *const b, std::atomic_uint32_t *const stop c->setRegister(7, start_addr); - tty *const t = b->getTty(); + *cnsl->get_running_flag() = true; - while(*stop_event == EVENT_NONE && t->get_reset_0x0a() == false) { + while(*stop_event == EVENT_NONE) { c->step_a(); if (tracing) @@ -515,4 +515,6 @@ void run_bic(console *const cnsl, bus *const b, std::atomic_uint32_t *const stop c->step_b(); } + + *cnsl->get_running_flag() = false; } diff --git a/tty.cpp b/tty.cpp index 9672987..688f16b 100644 --- a/tty.cpp +++ b/tty.cpp @@ -26,15 +26,6 @@ tty::~tty() { } -bool tty::get_reset_0x0a() -{ - bool temp = had_0x0a; - - had_0x0a = false; - - return temp; -} - uint8_t tty::readByte(const uint16_t addr) { uint16_t v = readWord(addr & ~1); @@ -112,8 +103,6 @@ void tty::writeWord(const uint16_t addr, uint16_t v) DOLOG(debug, true, "PDP11TTY print '%c'", ch); c->put_char(ch); - - had_0x0a |= ch == 0x0a; // for diagnostics } DOLOG(debug, true, "set register %o to %o", addr, v); diff --git a/tty.h b/tty.h index 53542d2..abe6090 100644 --- a/tty.h +++ b/tty.h @@ -25,14 +25,11 @@ private: bool have_char_1 { false }; // RCVR BUSY bit high (11) bool have_char_2 { false }; // RCVR DONE bit high (7) uint16_t registers[4] { 0 }; - bool had_0x0a { false }; // used for diagnostics public: tty(console *const c); virtual ~tty(); - bool get_reset_0x0a(); - uint8_t readByte(const uint16_t addr); uint16_t readWord(const uint16_t addr);