🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6558

Re: SIMPLE assembly question...

#6558
From: D'Arcy J.M. Cain
Date: Sat, 19 Dec 1992 12:31
25 lines
1363 bytes
$dougn@sasb.byu.edu (Douglas R. Nebeker - MIS_SAS) writes:
>is there ANY difference between  MOV ES,AX
>
>and                              PUSH AX
>                                 POP ES

The biggest difference is that the second form takes two separate
memory accesses while the first takes none.  The "MOV ES, AX" takes
2 clocks on a 386.  The "PUSH AX" takes 2 clocks and "POP ES" takes
7.  (The numbers are 18, 2 and 21 under protected mode.)  This doesn't
include wait states for the PUSH/POP if your system adds them.  Wait
states don't apply to the MOV method (I am ignoring the access for
the instructions themselves.)

Sorry, I don't have the figures for 8088/86/286.

>Does this affect ANY flags?

The effect on the flags is the same in both cases - none.

-- 
D'Arcy J.M. Cain (darcy@druid.com)  |
D'Arcy Cain Consulting              |   There's no government
Toronto, Ontario, Canada            |   like no government!
+1 416 424 2871          DoD#0082   |
Technical Details
Message-ID: <1992Dec19.123132.14222@druid.uucp>
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!geac!lethe!druid!darcy
References: <gn#@byu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!geac!lethe!druid!darcy
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Subject: Re: SIMPLE assembly question...
Message-ID: <1992Dec19.123132.14222@druid.uucp>
Date: Sat, 19 Dec 1992 12:31:32 GMT
References: <gn#@byu.edu>
Organization: D'Arcy Cain Consulting
Keywords: assembly mov asm 
Lines: 25