Mike Chambers
Veteran Member
- Joined
- Sep 2, 2006
- Messages
- 2,621
thanks for the fast testing pearce_jj!!!
Ok, it has at least detected the cpu correctly !!!
That's fine.
The Bug: I used the SMSW (Store Machine Status Word) Instruction, which is not available on your V20.
I will solve the problem, tomorrow.
Good Night !
it looks like your main program code for checking everything out will ALWAYS call the IsInV86 routine. it will always cause a lock up on an 80186 as well, because starting with that CPU, interrupt 6 is called on illegal opcodes so it's not just the V20/30 that will effect. (i learned this while doing research when writing Fake86) basically anything between the 8086/8088 and the 80286 will be hung by that if interrupt 6 isn't hooked by something to handle that. an 8086/8088 will just pass the offending instructions and execute the next byte so that's why there's no problem there.
so yeah, either skip the call to that function if the CPU is less than a 286, or hook int 6 before the call.