Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
25 Views

test CPU instructions

Hi,

(Sorry if I posted this in the wrong place, I couldnt find a better place to post this).
Iam working on a x86 emulator written in JavaScript, and I would like to have some tests on this emulator to make sure the validity of the results for instructions. Does anyone know if there is a set of instructions that checks the instructions for correctness with the x86 standard?

Thanks.
0 Kudos
2 Replies
Highlighted
Black Belt
25 Views

Processor will throwinvalid opcode exception.
0 Kudos
Highlighted
Valued Contributor I
25 Views

There are no such instructions.

You can try coding your emulator based on instruction behavior description available in Intel documentation, or you could try writing a test case for the emulation of each instruction and verify the results by executing the same instruction on the CPU (that would require a lot of work though).
0 Kudos