I am trying to write a program to check what processor is used to execute my program. Since this is intended to be used on a number of historic PC-clones, I want to be able to tell an 8086 from an 80186 just in case the computer is one of the rare machines that ship with an 80186. How can I do this in assembly?
© 2022 - 2024 — McMap. All rights reserved.
CCNEW.ASM
, label$cpu_ndptst
in my old program COMPTEST, distributed asCTEST260.ZIP
(e.g. here). From looking at the code, a 8018x is detected as a CPU that updates the stack pointer before aPUSH
(like the 8086), but masks the shift count ofSHL reg, CL
(unlike the 8086). – Kimmelbound
instruction, I think, so maybe try to execute something like this and have an ISR ready for undefined instructions. – Decontrol