From 581f7f8dc38423ecaa181bdb73a965bf55624ad2 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Fri, 19 Feb 2016 13:12:15 -0800 Subject: [PATCH] Open question about whether fnINT() should use pushData() instead of pushWord()... --- modules/pcjs/lib/x86func.js | 9 +++++++++ pubs/pc/reference/intel/80286/loadall/README.md | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/pcjs/lib/x86func.js b/modules/pcjs/lib/x86func.js index 99919c724..362c1bf6e 100644 --- a/modules/pcjs/lib/x86func.js +++ b/modules/pcjs/lib/x86func.js @@ -1377,6 +1377,15 @@ X86.fnINT = function(nIDT, nError, nCycles) var oldIP = this.getIP(); var addr = this.segCS.loadIDT(nIDT); if (addr !== X86.ADDR_INVALID) { + /* + * TODO: Determine if we should use pushData() instead of pushWord() for oldCS and nError, to deal with + * the same 32-bit 80386 compatibility issue that fnCALLF(), opPUSHCS(), et al must deal with; namely, that + * 32-bit segment register writes (and, reportedly, 32-bit error codes) don't modify the upper 16 bits. + * + * Also, note that fnCALLF() is using the OPERAND size in effect *before* CS is loaded, whereas here we're + * using the OPERAND size in effect *after* CS is loaded. Is that correct? And does an explicit OPERAND + * size override on an "INT" instruction have any effect on that behavior? Is that even allowed? + */ this.pushWord(oldPS); this.pushWord(oldCS); this.pushWord(oldIP); diff --git a/pubs/pc/reference/intel/80286/loadall/README.md b/pubs/pc/reference/intel/80286/loadall/README.md index 1033d776c..c2f3238fc 100644 --- a/pubs/pc/reference/intel/80286/loadall/README.md +++ b/pubs/pc/reference/intel/80286/loadall/README.md @@ -1,10 +1,10 @@ --- layout: page -title: "Intel 80286 CPU: LOADALL" +title: "Intel 80286 LOADALL Instruction" permalink: /pubs/pc/reference/intel/80286/loadall/ --- -Intel 80286 CPU: LOADALL +Intel 80286 LOADALL Instruction --- [The following information is from an undated 15-page Intel document titled "Undocumented iAPX 286 Test Instruction",