• Please review our updated Terms and Rules here

8086 CPU timing test

reenigne

Veteran Member
Joined
Dec 13, 2008
Messages
717
Location
Cornwall, UK
I've just released a little DOS program for checking if a machine's CPU is cycle-exact with an Intel 8088 or not. You can get it at https://www.reenigne.org/software/acid88.zip . It will likely crash on CPUs that don't implement undocumented instructions in a way that is functionally identical to Intel 8088 ones (in particular the JMP, CALL, JMP FAR and CALL FAR instructions with byte sized operands). This will probably mostly be of interest to the authors of emulators but if you have a physical machine that is almost-but-not-quite a 4.77MHz PC/XT then you might be interested to know its score!
 
A:\ACID88>TYPE WHATSNEW.TXT
2020092616080114:

v1.0: Initial release with 550 tests.

Impressive! I look forward to torturing my 5160 with this next time I pull it down from the shelf.

I took a look through your Github repo, and had a bit of difficulty locating the actual test cases. Are the acid88 tests procedurally generated by the code in xtce/gentests/gentests.cpp?

It feels like we're finally at the point where the 8088 has no more secrets left to hide. Thanks for your efforts in getting to this point! :D
 
I took a look through your Github repo, and had a bit of difficulty locating the actual test cases. Are the acid88 tests procedurally generated by the code in xtce/gentests/gentests.cpp?

Yes. Please excuse the mess - I didn't think of creating Acid88 when I was creating gentests, or I might have arranged things a bit more logically. And this code is all about to be rearranged for the next version of XTCE anyway.

It feels like we're finally at the point where the 8088 has no more secrets left to hide. Thanks for your efforts in getting to this point! :D

You are very welcome!
 
It will likely crash on CPUs that don't implement undocumented instructions in a way that is functionally identical to Intel 8088 ones (in particular the JMP, CALL, JMP FAR and CALL FAR instructions with byte sized operands).

This is very interesting. There are shorter encodings for these instructions available only on 8088/8086? Am I understanding you correctly?
 
This is very interesting. There are shorter encodings for these instructions available only on 8088/8086? Am I understanding you correctly?

They aren't shorter encodings of other (useful) instructions - they are undocumented (and not very useful) instructions FE/4, FE/2, FE/5 and FE/3 respectively. They work similarly to the normal FF instructions but the memory accesses are 1 byte instead of 2 (with the high byte read as FF) and the register accesses are AX, BX, CX and DX with the bytes swapped if the corresponding high byte register is specified.

There's a related problem with JMP FAR and CALL FAR with a register operand (opcodes FE and FF with mod/rm bytes E8-EF and D8-DF respectively) - in those cases the address that the new CS is loaded from is whatever was previously in the IND register plus 2 (I think, off the top of my head).
 
Back
Top