ID16, ID32: Added mask on EXE repeat count (COVERITY)

This commit is contained in:
Bob Supnik 2017-03-09 19:49:01 -08:00 committed by Mark Pizzolato
parent 9048245287
commit 6f036bb6aa
2 changed files with 10 additions and 8 deletions

View file

@ -1,6 +1,6 @@
/* id16_cpu.c: Interdata 16b CPU simulator /* 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 Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
cpu Interdata 16b CPU cpu Interdata 16b CPU
09-Mar-17 RMS OC to display testing wrong argument (COVERITY)
28-Apr-07 RMS Removed clock initialization 28-Apr-07 RMS Removed clock initialization
27-Oct-06 RMS Added idle support 27-Oct-06 RMS Added idle support
Removed separate PASLA clock Removed separate PASLA clock
@ -1725,12 +1726,12 @@ switch (op) {
return BY; /* byte only */ return BY; /* byte only */
case IO_OC: /* command */ case IO_OC: /* command */
op = op & 0xC0; dat = dat & 0xC0;
if (op == 0x40) { /* x40 = inc */ if (dat == 0x40) { /* x40 = inc */
drmod = 1; drmod = 1;
drpos = srpos = 0; /* init cntrs */ drpos = srpos = 0; /* init cntrs */
} }
else if (op == 0x80) /* x80 = norm */ else if (dat == 0x80) /* x80 = norm */
drmod = 0; drmod = 0;
break; break;

View file

@ -1,6 +1,6 @@
/* id32_cpu.c: Interdata 32b CPU simulator /* 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 Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,7 @@
cpu Interdata 32b CPU cpu Interdata 32b CPU
09-Mar-17 RMS OC to display testing wrong argument (COVERITY)
28-Apr-07 RMS Removed clock initialization 28-Apr-07 RMS Removed clock initialization
27-Oct-06 RMS Added idle support 27-Oct-06 RMS Added idle support
Removed separate PASLA clock Removed separate PASLA clock
@ -1989,12 +1990,12 @@ switch (op) {
return BY; /* byte only */ return BY; /* byte only */
case IO_OC: /* command */ case IO_OC: /* command */
op = op & 0xC0; dat = dat & 0xC0;
if (op == 0x40) { /* x40 = inc */ if (dat == 0x40) { /* x40 = inc */
drmod = 1; drmod = 1;
drpos = srpos = 0; /* init cntrs */ drpos = srpos = 0; /* init cntrs */
} }
else if (op == 0x80) /* x80 = norm */ else if (dat == 0x80) /* x80 = norm */
drmod = 0; drmod = 0;
break; break;