Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

x86 Instruction set - CMP

3 views
Skip to first unread message

WillofIrony

unread,
Oct 17, 2007, 9:29:41 AM10/17/07
to
I know that the Pentium chip will process comparing 32/16/8 bit
immediate values with any of the general purpose registers and (I
infer) 32/16 bit values with the index registers. However the
instruction sets that I find on the net for older x86 chips are a
little vaige about the size allowed for immediate comparison. All that
I have found so far simply refer to 'reg,imm'.

Does anybody know how far back (in x86 model terms) I can go back with
an instruction using 'CMP esi,32bitValue ... ?

Thanks in anticipation.

Michael

ArarghMail710NOSPAM

unread,
Oct 17, 2007, 4:03:32 PM10/17/07
to
On 17 Oct 2007 06:29:41 -0700, WillofIrony <spam...@crayne.org>
wrote:

A 80386, obviously. 'esi' didn't exist on any previous processor.
--
ArarghMail710 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the extra stuff from the reply address.

ArarghMail710NOSPAM

unread,
Oct 17, 2007, 5:39:19 PM10/17/07
to
On Wed, 17 Oct 2007 15:03:32 -0500, ArarghMail710NOSPAM
<spam...@crayne.org> wrote:

>On 17 Oct 2007 06:29:41 -0700, WillofIrony <spam...@crayne.org>
>wrote:
>
>>I know that the Pentium chip will process comparing 32/16/8 bit
>>immediate values with any of the general purpose registers and (I
>>infer) 32/16 bit values with the index registers. However the
>>instruction sets that I find on the net for older x86 chips are a
>>little vaige about the size allowed for immediate comparison. All that
>>I have found so far simply refer to 'reg,imm'.
>>
>>Does anybody know how far back (in x86 model terms) I can go back with
>>an instruction using 'CMP esi,32bitValue ... ?
>>
>A 80386, obviously. 'esi' didn't exist on any previous processor.

Now, if you had asked the more generic question, the answer would be:
always:

.8086
0000 3C 01 cmp al,1

0002 83 F8 01 cmp ax,1
0005 83 FE 01 cmp si,1
.386
0008 66| 83 F8 01 cmp eax,1
000C 66| 83 FE 01 cmp esi,1

Bill Marcum

unread,
Oct 18, 2007, 12:53:54 AM10/18/07
to
Probably no further back than 386...

0 new messages