Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Improved Fault Handling

Compare
Choose a tag to compare
@jeffpar jeffpar released this 28 Aug 21:59
· 3802 commits to master since this release

One of the more serious PCjs bugs fixed in this release involved fault processing. Instructions that were previously not restartable now are, and instructions that should have triggered multiple faults now do. I'm sure I'll still run into more instructions that are not fully restartable after a fault, but this release takes care of all known problems so far.

For example, an inter-segment CALL requiring a stack-switch will now properly generate an NP fault if the target code segment is not present, as well as an SS fault if the target stack segment is not present. And segments with invalid descriptors will now generate a GP fault instead of an NP fault; both are legitimate, but GP fault conditions apparently take precedence over NP fault conditions (OS/2 didn't seem to really care which was generated first, but Windows definitely cared).

With these changes, IBM OS/2 1.0 runs successfully. There still appear to be some serial port issues to resolve, but overall, OS/2 support is looking much better now.

Also, support for the timer chip's "Read-Back" command has been added, which allows any/all of the counter status and/or counts to be latched. I've performed virtually zero testing of this new command, but I'm happy to report that Windows 95 Setup's hardware detection phase seems to be satisfied now, fixing the issue noted in the previous release.

Last but not least, a somewhat embarrassing bug was fixed in the LOOP opcode handlers: 16-bit LOOP operations now preserve the upper 16 bits of ECX.