Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Assembly (http://www.programmingforums.org/forum20.html)
-   -   Quick 80386 question (http://www.programmingforums.org/showthread.php?t=13019)

Lesliect6 Apr 18th, 2007 3:17 PM

Quick 80386 question
 
Hello,

In a couple of months' time I will be having my Assembly exams, and to be well prepared for them , I downloaded a free Assembly resource e-book from the internet. The exam will be about the Intel 80386 processor. In this e-book I found some instructions which we haven't seen wet in class, and I would like to have confirmation that they can be used with the 80386 processor. The instructions are :
-CMOV
-BSWAP
-XADD
-conversion instructions such as CBW CWDE etc...
-SET
-BSF, BSR
-string operations

Thank you

lectricpharaoh Apr 18th, 2007 9:03 PM

Quote:

Originally Posted by Lesliect6
In this e-book I found some instructions which we haven't seen wet in class, and I would like to have confirmation that they can be used with the 80386 processor. The instructions are :
-CMOV
-BSWAP
-XADD
-conversion instructions such as CBW CWDE etc...
-SET
-BSF, BSR
-string operations

You're in luck! My old TASM manual was hiding in (one of) the piles on my desk.

CMOV - not listed, so it's safe to say this isn't available for the 80486 or earlier. My NASM references aren't on this machine, but if I get around to it, I'll check the old 386 paperweight- err, laptop.
BSWAP - 486+
XADD - 486+
The conversion ones are available on the 386. Note the difference between CWD and CWDE. The former uses DX:AX as a destination, and the latter uses EAX.
SETcc - These all work on the 386 (I'm assuming you mean the conditional byte set instructions).
BSF, BSR - The bit scan instructions are 386+. If you care, the bit test instructions (BT, BTC, BTR, and BTS) also work on the 386.
If by string instructions, you mean things like STOS, SCAS, MOVS, and the like, those have worked since the 8086/8088. However, if using the 32-bit forms of the instructions, they are limited to 386 and up (this should be obvious).

Note that these refer to the Intel specs. There are some third-party CPUs that support a few instructions beyond the required instruction set, for example, I've heard of a few 80486 chips that support CPUID, even though that's supposed to be Pentium+.

Lesliect6 Apr 21st, 2007 6:19 AM

Thank you very much!


All times are GMT -5. The time now is 2:09 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC