Fixed 32-bit protected-mode test code

This commit is contained in:
Jeff Parsons 2015-05-05 18:26:19 -07:00 • committed by jeffpar
commit 9ab1f92adc
5 changed files with 115 additions and 81 deletions

View file

@ -925,7 +925,18 @@ X86Seg.prototype.updateMode = function(fProt)
this.loadIDT = this.loadIDTReal;
this.checkRead = this.checkReadReal;
this.checkWrite = this.checkWriteReal;
this.limit = 0xffff;
/*
* Like the base, we don't want to mess with the limit, so that features like "Unreal" mode
* (or "Big Real" mode as it's called in the HIMEM source code) will work, at least until the
* next explicit segment load.
*
* See http://www.os2museum.com/wp/himem-sys-unreal-mode-and-loadall/ for more details.
*
* this.limit = 0xffff;
*
* TODO: The checkReadReal() and checkWriteReal() functions need to generate GP faults for offsets
* beyond the current real-mode limit.
*/
this.acc = this.ext = 0;
this.cpl = this.dpl = 0;
this.addrDesc = X86.ADDR_INVALID;