How to extract the opcode and the data form the instruction
Expand Post »
How to extract the opcode and the data form the instruction? "instruction" is inst below in decimal. For some values of "??", I should be able to extract the opCode and data???
opCode = inst >>??;
data = inst & ??;
It is done on a x86 processor using C.
It is 16 bit in total.
Starting from 0 from the right to left.
11th to 15th bit is OpCode.
0 to 9th bit is Data.
Is there a shortcut using hexadecimal notation?
Last edited by sciconf; Oct 2nd, 2006 at 11:39 pm.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.