5

I don't recall where from but at some point I was under the impression that the Intel 186 processor used interrupt 6 for invalid opcodes.

However, there's the HP 95LX that uses a NEC V20. NEC V20/V30 are compatible to the Intel 188/186 in that all the Intel instruction set is supported by the NECs. There are some differences however, including that the shift count masking with 1Fh is done on the i186 but not on the NECs, and the NECs do not properly implement a long-form pop r16 instruction. (I use these in my init to detect the 186 and the NECs.)

Relevant to the question is that the 95LX uses interrupt 6 for some other software interface in its DOS. So it seems unlikely that it is used for undefined opcodes as well. In fact, the NEC user's manual in https://archive.org/details/bitsavers_necV20V30U_11351331/page/n25/mode/1up on page 6-1 (page 26 of the PDF) lists interrupt 6 as reserved / unused.

What is the situation for other 186-class processors?

3
  • By the time of the 386, Microsoft apparently figured out that executing an invalid instruction could get you into kernel mode faster than any other method, and used it as the syscall trap. Is it possible that HP was doing something similar?
    – Kevin
    Feb 3 at 22:52
  • @Kevin I don't think so, the calls to interrupt 6 I have noticed while tracing the MS-DOS in the 95LX's ROM used int 6 instructions to call the handler. And there is no "kernel mode" on the NEC V20, so.
    – ecm
    Feb 4 at 8:21
  • Ralf Brown's Interrupt List does list both int 6 being used by the HP 95LX in some way and the "80186+" use as an invalid opcode handler.
    – ecm
    Feb 14 at 8:37

1 Answer 1

13

Here's the "80186/188, 80C186/C188 Hardware Reference Manual": https://www.ardent-tool.com/CPU/docs/Intel/8018x/manuals/270788-001.pdf

This states on page 9-3:

UNUSED OPCODE EXCEPTION - TYPE 6:

Attempted execution of undefined opcodes generates this interrupt.

So the hunch was correct, the i186 does use interrupt 6 for invalid opcodes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .