SDS: Fix clock pulse interrupt bug

The single-instruction Clock Pulse interrupt (75 octal) may be a MIN or SKR instruction. The function rtc_inst increments (MIN) or decrements (SKR) the operand and tests for zero and generates a Clock Sync interrupt (74 octal) if so. However, the SDS 940 reference manual is incorrect; in the SKR case, the test should be if the result is negative.
This commit is contained in:
Mark Emmer 2014-03-02 22:22:20 -06:00
parent 5270c44117
commit d5acbc6f7a

View file

@ -1589,7 +1589,7 @@ if ((r = Read (va, &dat))) /* get operand */
dat = AddM24 (dat, val); /* mem +/- 1 */
if ((r = Write (va, dat))) /* rewrite */
return r;
if (dat == 0) /* set clk sync int */
if ((op == MIN && dat == 0) || (dat & SIGN)) /* set clk sync int */
int_req = int_req | INT_RTCS;
return SCPE_OK;
}