First post, by guest
I've got numerous trap/fault failures in instruction tests that I've not posted yet. Many deal with the traps generated when an operand spans the end of a segment boundary (ex. loading a word from offset xFFFF).
This is absolutely *NOT* an "odd condition" that occurs only in "buggy" apps. Many apps written for the ABSOLUTE FASTEST performance actually RELIED on these trap behaviors working properly!!!
Here's why: Suppose you're traversing a linked list of hundreds or thousands of items. The cost to check for the end of this list in your traversal loop can run into hundreds or thousands of EXTRA instructions PER traversal of the list! Its FASTER to make sure during initial list creation that the end item in the list is simply a pointer that's going to cause an exception when its referenced. Then you use the exception handler's being hit as the indicator that you are at the end of the list.
Now, if DOSBOX isn't implementing these traps correctly, then the app isn't going to see the end of its list and its just going to die a horrible death due to massive data corruptions and spin off into the weeds until the machine locks up, trashes a drive, or some other unsavory demise.