Undocumented opcodes

Programming, for all ages and all languages.
Post Reply
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Undocumented opcodes

Post 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 :)
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Undocumented opcodes

Post 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.
quirck
Member
Member
Posts: 42
Joined: Sun Nov 23, 2008 5:56 am
Location: Russia, Saint-Petersburg

Re: Undocumented opcodes

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Undocumented opcodes

Post by Combuster »

If you want that SALC instruction legally, just use SBB AL, AL :wink:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply