mirror of
https://github.com/rcornwell/sims.git
synced 2026-02-27 00:59:57 +00:00
IBM360: Fix bug in subtract instruction. Misc fixes.
This commit is contained in:
@@ -103,7 +103,7 @@ struct dib con_dib = { 0xFF, 1, NULL, con_startcmd, con_haltio, con_unit, con_in
|
||||
DEVICE con_dev = {
|
||||
"INQ", con_unit, NULL, con_mod,
|
||||
NUM_DEVS_CON, 8, 15, 1, 8, 8,
|
||||
NULL, NULL, NULL, NULL, NULL, con_detach,
|
||||
NULL, NULL, NULL, NULL, NULL, &con_detach,
|
||||
&con_dib, DEV_UADDR | DEV_DISABLE | DEV_DEBUG, 0, dev_debug,
|
||||
NULL, NULL, &con_help, NULL, NULL, &con_description
|
||||
};
|
||||
|
||||
@@ -1761,12 +1761,17 @@ set_cc:
|
||||
dest = src1 + src2;
|
||||
if ((((src1 & src2 & ~dest) |
|
||||
(~src1 & ~src2 & dest)) & MSIGN) != 0) {
|
||||
if ((op & 0x1f) == 0x1b && src1 == MSIGN && src2 == MSIGN) {
|
||||
dest = 0;
|
||||
goto set_cc;
|
||||
}
|
||||
set_cc3:
|
||||
regs[reg1] = dest;
|
||||
per_mod |= 1 << reg1;
|
||||
cc = 3;
|
||||
if (pmsk & FIXOVR)
|
||||
if (pmsk & FIXOVR) {
|
||||
storepsw(OPPSW, IRC_FIXOVR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
goto set_cc;
|
||||
@@ -2185,8 +2190,9 @@ save_dbl:
|
||||
if (cc != 3 && (src1 | src1h) != 0)
|
||||
cc = (src1 & MSIGN) ? 1 : 2;
|
||||
#endif
|
||||
if (cc == 3 && (pmsk & FIXOVR))
|
||||
if (cc == 3 && (pmsk & FIXOVR)) {
|
||||
storepsw(OPPSW, IRC_FIXOVR);
|
||||
}
|
||||
dest = regs[reg1];
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -941,7 +941,7 @@ sense_end:
|
||||
if ((uptr->CCH >> 8) == data->cyl) {
|
||||
uptr->LCMD = cmd;
|
||||
uptr->CMD &= ~(0xff);
|
||||
set_devattn(addr, SNS_CHNEND | SNS_DEVEND);
|
||||
set_devattn(addr, SNS_DEVEND);
|
||||
sim_debug(DEBUG_DETAIL, dptr, "seek end unit=%d %d %d %x\n", unit,
|
||||
uptr->CCH >> 8, data->cyl, data->state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user