Page 2 of 2
Posted: Wed Feb 06, 2008 2:31 pm
by mathematician
XCHG wrote:How did it crash? Didn't you just PUSH SP into the stack and POP it into a 16-bit register? How could it crash?(
I wasn't trying to detect the presence of an 8086/80186, but I discovered by accident that they could be detected in that way.
Posted: Thu Feb 07, 2008 8:12 am
by jal
Cemre wrote:so by your detection method, if you conclude that cpu is not 286, you might simply try using those new instructions and check for an error by using CPU unknown-opcode interrupt handler to determine if it is a 8086 or 80186.
No you can't, since if it's a 8086, it'll hang (there's no exception handling in the 8086).
An additional issue with the 80186 is that it is still being made, in different flavours, for the embedded industry. I don't think it's very useful detecting it though, if you're not planning on going embedded.
JAL