Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!wuarchive!udel!princeton!notecnirp!nfs From: nfs@notecnirp.Princeton.EDU (Norbert Schlenker) Newsgroups: comp.arch Subject: Re: PUSH on i8088/i80x86 Summary: Let's finish this now - this is getting boring! Message-ID: <22918@princeton.Princeton.EDU> Date: 9 Jan 90 18:09:15 GMT References: <182DAVISTD@MSU> <5524@bd.sei.cmu.edu> <10190@microsoft.UUCP> <5550@bd.sei.cmu.edu> Sender: news@princeton.Princeton.EDU Reply-To: nfs@notecnirp.UUCP (Norbert Schlenker) Organization: Dept. of Computer Science, Princeton University Lines: 48 In article <5550@bd.sei.cmu.edu| firth@sei.cmu.edu (Robert Firth) writes: |In article <5524@bd.sei.cmu.edu>, firth@sei.cmu.edu I wrote: | |> Well, I just checked my manuals for the 8086, 8088, 80286 and 80386. |> As best I can determine, all of them agree on this | ..... |> . There is no difference among the 80xxx processors in the semantics |> of the PUSH instruction | |In article <10190@microsoft.UUCP> gordonl@microsoft.UUCP (Gordon LETWIN) writes: | |>This is totally wrong. It's a fact that the handling of "push sp" differs |>between some of these processors. I forget which does what and am too |>lazy to look it up, but this is *fer sure* listed in a difference table |>that Intel has somewhere. And I've seen it used as part of a "identify |>processor" subroutine. | |It may well, indeed, be totally wrong. However, given that I went to |the trouble actually to extract the documents, reread them, and post to |the net their citations, including title, date, and order number, it |seems to me that it would be a matter of simple courtesy, both to me |and to the net, if you would take the same trouble before issuing a |public contradiction. Our opinions, even our FER SURE opinions, are |pretty useless otherwise. This is verbatim from Intel's 80386 Programmer's Reference Manual. The book is Intel order number 230985-001. Intel's number is 800-548-4725. Section 14.7. Differences from 8086 ... 4. Value written by PUSH SP. The 80386 pushes a different value on the stack for PUSH SP than the 8086/8088. The 80386 pushes the value of SP before SP is incremented as part of the push operation; the 8086/8088 pushes the value of SP after it is incremented. If the value pushed is important, replace PUSH SP instructions with the following three instructions: PUSH BP MOV BP, SP XCHG BP, [BP] This code functions as the 8086/8088 PUSH SP instruction on the 80386. There are similar sections in both the 80186 and 80286 programmer's reference manuals. Look for "Differences" in the table of contents. Norbert