🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.intel
Article #1573

Re: 386 instruction encoding query

#1573
From: toma
Date: Thu, 12 Feb 1987 22:03
29 lines
2011 bytes
In article <4979@watmath.UUCP> kadorken@watmath.UUCP (Keith A. Dorken) writes:
<
<	The 386 programmers reference manual has for the full encoding of
<the "jo" instruction the following bit pattern: 
<0x0F 0x80 <full displacement>.  The bit encoding for pushing
<a segment register (long form; 3-bit segment register name) is:
<0x0F  10 seg3 000   where seg3 is one of {es, cs, ss, ds, fs or gs}.
<
<
<	Thus the two byte opcode 0x0F 0x80 could be interpreted as
<being either a "jo" instruction or the long form instruction "push es".
<(the 3-bit encoding for es is 000).  Executing this instruction results
<in a jump, not a push.  However, other encodings (using the other 3 bit
<segment register names) do result in a value being pushed on the stack.
<
<	Is the above behaviour just a fluke on our processor or will all
<future '386 processors behave this way?

Well, my copy of the 386 Programmers's Reference Manual does not explicitly
indicate the bit field packing.  The PUSH (or POP) GS and FS instructions are
two bytes long, while those for the 8086 compatible segment registers are
single byte long.  The first byte is an excape sequence to get to the added
instructions push/pop instructions.

There is no reason to assume that the encoding of the instructions are going
to be done with some regularity!

Tom Almy
tektronix!tekgvs!toma
Technical Details
Message-ID: <2077@tekgvs.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!cuae2!ihnp4!ptsfa!lll-lcc!seismo!think!mit-eddie!rutgers!sri-unix!hplabs!cae780!tektronix!tekcrl!tekgvs!toma
References: <4979@watmath.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!cuae2!ihnp4!ptsfa!lll-lcc!seismo!think!mit-eddie!rutgers!sri-unix!hplabs!cae780!tektronix!tekcrl!tekgvs!toma
From: toma@tekgvs.UUCP
Newsgroups: comp.sys.intel
Subject: Re: 386 instruction encoding query
Message-ID: <2077@tekgvs.TEK.COM>
Date: Thu, 12-Feb-87 17:03:11 EST
Article-I.D.: tekgvs.2077
Posted: Thu Feb 12 17:03:11 1987
Date-Received: Sat, 14-Feb-87 15:39:50 EST
References: <4979@watmath.UUCP>
Reply-To: toma@tekgvs.UUCP (Thomas Almy)
Distribution: na
Organization: Tektronix, Inc., Beaverton, OR.
Lines: 29