home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: 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
-
- $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 |
-