diff --git a/Interdata/id16_cpu.c b/Interdata/id16_cpu.c index 1b762541..4352a892 100644 --- a/Interdata/id16_cpu.c +++ b/Interdata/id16_cpu.c @@ -1,6 +1,6 @@ /* id16_cpu.c: Interdata 16b CPU simulator - Copyright (c) 2000-2008, Robert M. Supnik + Copyright (c) 2000-2017, Robert M. Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -25,6 +25,7 @@ cpu Interdata 16b CPU + 09-Mar-17 RMS OC to display testing wrong argument (COVERITY) 28-Apr-07 RMS Removed clock initialization 27-Oct-06 RMS Added idle support Removed separate PASLA clock @@ -1725,12 +1726,12 @@ switch (op) { return BY; /* byte only */ case IO_OC: /* command */ - op = op & 0xC0; - if (op == 0x40) { /* x40 = inc */ + dat = dat & 0xC0; + if (dat == 0x40) { /* x40 = inc */ drmod = 1; drpos = srpos = 0; /* init cntrs */ } - else if (op == 0x80) /* x80 = norm */ + else if (dat == 0x80) /* x80 = norm */ drmod = 0; break; diff --git a/Interdata/id32_cpu.c b/Interdata/id32_cpu.c index 1927f8ec..ff3a9cbf 100644 --- a/Interdata/id32_cpu.c +++ b/Interdata/id32_cpu.c @@ -1,6 +1,6 @@ /* id32_cpu.c: Interdata 32b CPU simulator - Copyright (c) 2000-2008, Robert M. Supnik + Copyright (c) 2000-2017, Robert M. Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -25,6 +25,7 @@ cpu Interdata 32b CPU + 09-Mar-17 RMS OC to display testing wrong argument (COVERITY) 28-Apr-07 RMS Removed clock initialization 27-Oct-06 RMS Added idle support Removed separate PASLA clock @@ -1989,12 +1990,12 @@ switch (op) { return BY; /* byte only */ case IO_OC: /* command */ - op = op & 0xC0; - if (op == 0x40) { /* x40 = inc */ + dat = dat & 0xC0; + if (dat == 0x40) { /* x40 = inc */ drmod = 1; drpos = srpos = 0; /* init cntrs */ } - else if (op == 0x80) /* x80 = norm */ + else if (dat == 0x80) /* x80 = norm */ drmod = 0; break;