Article View: alt.lang.asm
Article #151Setting of flags by "Shr" on different processors.
From: Morten Welinder
Date: Thu, 07 Jan 1993 15:44
Date: Thu, 07 Jan 1993 15:44
26 lines
1454 bytes
1454 bytes
The Intel 486 programmer's reference manual very clearly states that the shift operations -- except for "Shrd" and "Shld" -- always set the basic flags. The code: Mov Ax,0 Mov Cl,0 Cmp Ax,-1 ; Clear zero flag Shr Ax,Cl ; Result is zero. should leave you with the zero flag set. However, tests on my i486 shows that this is not true. The shift is executed as a "Nop". I would like to know how other processors respond to this piece of code. Please try it and email the result to "terra@diku.dk" stating the processor type, of course. Also if you have a manual for another processor, please look up the description of the shifts. I would like to know if there are any differences. I will post a summary in a week or so. -- ------------------------------------------------------------------------ Visit the lyrics archive at ftp.cs.uwp (mirrored to nic.funet.fi, a site in Finland). All kinds of lyrics available -- upload "yours" and join. ------------------------------------------Morten Welinder, terra@diku.dk
Technical Details
Message-ID:
<1993Jan7.154426.3421@odin.diku.dk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!dkuug!diku!terraShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!dkuug!diku!terra From: terra@diku.dk (Morten Welinder) Newsgroups: alt.lang.asm,comp.sys.intel Subject: Setting of flags by "Shr" on different processors. Keywords: shr, intel, flags Message-ID: <1993Jan7.154426.3421@odin.diku.dk> Date: 7 Jan 93 15:44:26 GMT Sender: terra@embla.diku.dk Organization: Department of Computer Science, U of Copenhagen Lines: 26