Detecting 186 CPUs

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Post 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.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post 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
Post Reply