Well acording to IA 32 manual this should look like this:
Segment register CS,DS, ES
000 sreg2 111
and CS is 01 in this case
so it should look like this:
000 01 111
and that is 0F (2 byte long opcode)
and segment registers FS, GS should be encoded as:
0000 1111? 10 sreg3 001...
Is it possible that IA32 manual is wrong on this issue, or such instruction doesn't exist or is it encoded as 2 byte long opcode?
Any help would be appriciate, thanks
Best regards...
Segment register CS,DS, ES
000 sreg2 111
and CS is 01 in this case
so it should look like this:
000 01 111
and that is 0F (2 byte long opcode)
and segment registers FS, GS should be encoded as:
0000 1111? 10 sreg3 001...
Is it possible that IA32 manual is wrong on this issue, or such instruction doesn't exist or is it encoded as 2 byte long opcode?
Any help would be appriciate, thanks
Best regards...
segment fs and gs were added later so they were encoded as 2byte opcodes (those opcodes that begins with 0fh)
nah I asked about pop cs because it should be, acording to IA32 manual, assembled as 000 01 111b and that is 0F (0F 2 byte opcode), so I'm not sure if? IA32 manual is wrong on this issue b/c it is imposible that pop cs is 0F, it has to be something else
It might be assembled as 2byte opcode and that is the only normal solution, or maybe such instruction doesn't exist :(
It might be assembled as 2byte opcode and that is the only normal solution, or maybe such instruction doesn't exist :(
My applogies for misunderstanding you.
pop cs does not exist
pop cs does not exist
thanks :)
In Volume 2, it is explicitly mentioned:
"The POP instruction cannot pop a value into the CS register. To load the CS register from the stack, use the RET instruction."
It might have been because of what you found. :)
"The POP instruction cannot pop a value into the CS register. To load the CS register from the stack, use the RET instruction."
It might have been because of what you found. :)
POP CS is DB 0Fh
But it is supported only by 8086.
So it's now used as a prefix for 2 bytes opcode.
But it is supported only by 8086.
So it's now used as a prefix for 2 bytes opcode.
In Volume 2, it is explicitly mentioned:
"The POP instruction cannot pop a value into the CS register. To load the CS register from the stack, use the RET instruction."
It might have been because of what you found.? :)
ahhh :( I didn't see that :)