From ee3bd8f39c05c31a7b22161f2928073101f77ae9 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Tue, 16 Jun 2020 10:26:10 +0200 Subject: [PATCH] IMLAC: Fix two minor bugs. - Display PC masked to be inside core memory. - Do not sign extend characters read from TTY. --- imlac/imlac_dp.c | 4 ++-- imlac/imlac_tty.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/imlac/imlac_dp.c b/imlac/imlac_dp.c index 9696b516..2265b9bc 100644 --- a/imlac/imlac_dp.c +++ b/imlac/imlac_dp.c @@ -148,8 +148,8 @@ dp_iot (uint16 insn, uint16 AC) DPC = 0; } if ((insn & 0772) == 0002) { /* DLA */ - sim_debug (DBG, &dp_dev, "DPC set to %06o\n", AC); - DPC |= AC; + sim_debug (DBG, &dp_dev, "DPC set to %06o\n", AC & memmask); + DPC |= AC & memmask; } if ((insn & 0771) == 0011) { /* CTB */ ; diff --git a/imlac/imlac_tty.c b/imlac/imlac_tty.c index 6d4d6d1c..c33dc485 100644 --- a/imlac/imlac_tty.c +++ b/imlac/imlac_tty.c @@ -124,7 +124,7 @@ tty_r_svc(UNIT *uptr) return SCPE_OK; if (uptr->fileref != NULL) { - char buf; + unsigned char buf; if (sim_fread (&buf, 1, 1, uptr->fileref) == 1) { sim_debug (DBG, &tty_dev, "Received character %03o\n", buf); RBUF = buf;