lkml.org 
[lkml]   [1998]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectNOP instruction

>I've always wondered... A much used NOP "instruction" is
>OR AX,AX (or similar);
>But doesn't this, as well as MOV DI,DI, set the zero flag???
>As a NOP instruction is supposed to do nothing, would this then be wrong?
>(Nothing meaning not setting any flags?)

>Hmmm... Where's the time from the good ol' Z80 when you HAD a real NOP
>instruction? *Sigh* :-)

From my very old TASM quick reference:

OR AX,AX -> Sets flags
MOV DI,DI -> Doesn't set flags (ALL MOV's doesn't affect the status)

XCHG AX, AX (opcode 0x90) was used as a synonym of NOP (NOP was/is
accepted as NOP -- at least by TASM and is assembled as XCHG AX,AX)
XCHG doesn't set flags so it's good

BUT, something should be wrong in my manual: XCHG is rated for 3 clock
ticks on a 486 (Pentium weren't invented yet...) but his 'synonym' NOP
is rated for only 1 tick....
--
Lorenzo 'Caffeine' Marcantonio <lomarcan@tin.it>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.040 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site