Page 1 of 1

Undocumented opcodes

Posted: Fri Nov 28, 2008 11:31 am
by inflater
Some non-documented opcodes that I've found in my holy ASM programming e-book AThelp:

PUSH IP: db 0E8h, db 0, db 0
POP CS (only 8086): db 0Fh
LOADALL (386): db 0Fh, db 07h
db 0D6h: This will set AL to 0 when CF=0, otherwise AL = 0FFh

I didn't test them, but have fun. Also you are free to expand this article by yours, if you found any :)

Re: Undocumented opcodes

Posted: Fri Nov 28, 2008 11:39 am
by JamesM
PUSH IP: db 0E8h, db 0, db 0
There's a reason this is undocumented. What does this actually expand to when it's de-microcoded? What is IP? With an architecture such as the x86 "IP" can hold one of 30-more different values depending whereabouts in the pipeline you are. At what point in the pipeline is the value of IP taken? :)

As I said, there's a reason it's undocumented. Expect strange behaviour.

Re: Undocumented opcodes

Posted: Fri Nov 28, 2008 12:27 pm
by quirck
afaik

Code: Select all

db 0xE8,0,0
is equivalent to

Code: Select all

call @F
@@:
So it seems to be a fully documented instruction, and there must be nothing strange in its behaviour.

Re: Undocumented opcodes

Posted: Fri Nov 28, 2008 5:00 pm
by Combuster
If you want that SALC instruction legally, just use SBB AL, AL :wink: