5

I'm using a Harris CS80C286-20 CPU.

If I set the access rights byte of the Divide Error Exception descriptor to 0x80 (which indicates a present system descriptor of an invalid type), and then execute the instruction:

         XOR   BX,BX
         DIV   BX

This triggers a double fault, but does not push an error code. According to the instructions in the Intel manual (PDF page 172), the 286 processor always pushes an error code (value always zero) on double faults.

I don't understand why this is happening. I don't know if the other 286 is like this.

Michael Karcher
  • 7,941
  • 3
  • 25
  • 49
lgj1107
  • 61
  • 1
  • 1
    It might be helpful to define setup (like what that value of 80h is and what it's supposed to initiate), what result you expect (like what that error code is you're missing). Maybe also word the question more clear for us to understand what exactly you're asking. – Raffzahn Aug 26 '23 at 14:06
  • 3
    Are you aware that the error code is pushed before the flags and the return address? If the stack has been zeroed out before, you might not notice the presence of the error code unless you check how many bytes were pushed. – Michael Karcher Aug 27 '23 at 07:28

0 Answers0