وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

OUT

OUT

Usage:  OUT     port,accum                        Modifies flags: None

Transfers byte in AL,word in AX or dword in EAX to the specified hardware port address.  If the port number is in the range of 0-255 it can be specified as an immediate.  If greater than 255 then the port number must be specified in DX.  Since the PC only decodes 10 bits of the port address, values over 1023 can only be decoded by third party vendor equipment and also map to the port range 0-1023.

Output Data to I/O Port


OUT imm8,AL                   ; E6 ib                [8086]

OUT imm8,AX                   ; o16 E7 ib            [8086]

OUT imm8,EAX                  ; o32 E7 ib            [386]

OUT DX,AL                     ; EE                   [8086]

OUT DX,AX                     ; o16 EF               [8086]

OUT DX,EAX                    ; o32 EF               [386]


OUT writes the contents of the given source register to the specified I/O port. The port number may be specified as an immediate value if it is between 0 and 255, and otherwise must be stored in DX. See also IN.


Example:

out 15 eax


OUT

ORPS

ORPS 

Usage:  ORPS    dest,src                        Modifies flags: None

Performs a bitwise logical OR of the four packed single-precision floating-point values from the 'src' (second operand) and the 'dest' (first operand), and stores the result in the 'dest'  operand.

Bit-wise Logical OR of Single-Precision FP Data



ORPS xmm1,xmm2/m128           ; 0F 56 /r        [KATMAI,SSE]


ORPS return a bit-wise logical OR between xmm1 and xmm2/mem, and stores the result in xmm1. If the source operand is a memory location, it must be aligned to a 16-byte boundary.


The 'src' operand can be an XMM register or a 128-bit memory location. The 'dest'  operand is an XMM register.


EXAMPLE:

orps xmm1 Label 


 

ORPD

ORPD 

Usage:  ORPD    dest,src                        Modifies flags: None

Performs a bitwise logical OR of the two packed double-precision floating-point values from the 'src'  (second operand) and the 'dest' (first operand), and stores the result in the 'dest'  operand.

Bit-wise Logical OR of Double-Precision FP Data



ORPD xmm1,xmm2/m128           ; 66 0F 56 /r     [WILLAMETTE,SSE2]


ORPD return a bit-wise logical OR between xmm1 and xmm2/mem, and stores the result in xmm1. If the source operand is a memory location, it must be aligned to a 16-byte boundary.


The 'src' operand can be an XMM register or a 128-bit memory location. The 'dest'  operand is an XMM register.


EXAMPLE:

orpd xmm1 Label 


OR

OR

Usage:  OR      dest,src                             Modifies flags: CF OF PF SF ZF (AF undefined)

Logical inclusive OR of the two operands returning the result in the destination. Any bit set in either operand will be set in the destination.

Bitwise OR


OR r/m8,reg8                  ; 08 /r                [8086]

OR r/m16,reg16                ; o16 09 /r            [8086]

OR r/m32,reg32                ; o32 09 /r            [386]


OR reg8,r/m8                  ; 0A /r                [8086]

OR reg16,r/m16                ; o16 0B /r            [8086]

OR reg32,r/m32                ; o32 0B /r            [386]


OR r/m8,imm8                  ; 80 /1 ib             [8086]

OR r/m16,imm16                ; o16 81 /1 iw         [8086]

OR r/m32,imm32                ; o32 81 /1 id         [386]


OR r/m16,imm8                 ; o16 83 /1 ib         [8086]

OR r/m32,imm8                 ; o32 83 /1 ib         [386]


OR AL,imm8                    ; 0C ib                [8086]

OR AX,imm16                   ; o16 0D iw            [8086]

OR EAX,imm32                  ; o32 0D id            [386]


OR performs a bitwise OR operation between its two operands (i.e. each bit of the result is 1 if and only if at least one of the corresponding bits of the two inputs was 1), and stores the result in the destination (first) operand.


The MMX instruction POR performs the same operation on the 64-bit MMX registers.


EXAMPLE:

mov al 001010

   or al 000101    ; al = 1111 > Fh >15d


OR

NOT

NOT

Usage:  NOT     dest                                Modifies flags: None

Inverts the bits of the 'dest' operand forming the one's complement.

Two's and One's Complement


NEG r/m8                      ; F6 /3                [8086]

NEG r/m16                     ; o16 F7 /3            [8086]

NEG r/m32                     ; o32 F7 /3            [386]


NOT r/m8                      ; F6 /2                [8086]

NOT r/m16                     ; o16 F7 /2            [8086]

NOT r/m32                     ; o32 F7 /2            [386]


NEG replaces the contents of its operand by the two's complement negation (invert all the bits and then adds one to the result) of the original value. 


NOT , similarly, performs one's complement (inverts all the bits, but does not add one to the result).


Example:

mov eax 5

not eax ; eax= FFFF FFFA > -6


NOT

NOPE

NOPE 

Dummy Mnemonic


NOPE outputs absolutely nothing into the Code. This is not a regular Mnemonic, and it is particular to RosAsm. This dummy Mnemonic implementation is designed to serve the Macros System. By using it, it is quite easy to define a Macro body that does not output a thing. An example about how a functionality doing nothing at all may be useful:


Say you have a Macro that you use for Developments, with many instances of the evocations of this Macro. Then, when you wish to build the final version, instead of removing all of these Evocations, you can simply replace the Declaration by its dummy version:


Example:

; [MyDebuggingTest | Hexprint #1 | .... | .... ]


[MyDebuggingTest | NOPE]



 

NOP

NOP Usage:  NOP                           Modifies flags: None

This is a do nothing instruction.  It results in occupation of both space and time and is most useful for patching code segments.

No Operation


NOP                           ; 90                   [8086]


NOP performs no operation. Its opcode is the same as that generated by XCHG EAX,EAX (see  XCHG).


EXAMPLE:

nop   

NOP

NEG

NEG

 Usage:  NEG     dest                                Modifies flags: AF CF OF PF SF ZF

 Subtracts the 'dest'  from 0 and saves the two's complement of 'dest' back into 'dest'.

Two's and One's Complement


NEG r/m8                      ; F6 /3                [8086]

NEG r/m16                     ; o16 F7 /3            [8086]

NEG r/m32                     ; o32 F7 /3            [386]


NOT r/m8                      ; F6 /2                [8086]

NOT r/m16                     ; o16 F7 /2            [8086]

NOT r/m32                     ; o32 F7 /2            [386]


NEG replaces the contents of its operand by the two's complement negation (invert all the bits and then add one) of the original value. 


NOT, similarly, performs the one's complement (inverts all the bits, but does not add one).


Example:

mov eax 5

neg eax ; eax = FFFF FFFB > -5


NEG

MWAIT

MWAIT 

Usage:  MWAIT  eax,ecx                                      Modifies flags: None.

A hint that allows the processor to stop instruction execution and enter an implementation-dependent optimized state until occurrence of a class of events; it is architecturally identical to a NOP instruction.

Monitor Wait


MWAIT eax,ecx                   ; 0F 01 C9         [Pent4]


The MWAIT instruction is designed to operate with the MONITOR instruction. The two instructions allow the definition of an address at which to 'wait' (MONITOR). The execution of MWAIT is a hint to the  processor that it can enter an implementation - dependent - optimized state while waiting for an event or a store operation to the address range armed by the preceding MONITOR instruction in program flow.


EXAMPLE:

L1: mov EAX  TriggerAddress

mov ECX 0 ;Hints 

mov EDX 0 ; Hints 

If Trigger_store_happened 

MONITOR 

If Trigger_store_happened  

MWAIT | jmp L1


The MONITOR and MWAIT instructions must be coded in the same loop because execution of the MWAIT  instruction will trigger the monitor hardware. It is not a proper usage to execute MONITOR once and then execute MWAIT in a loop. 


Setting up MONITOR without executing MWAIT has no adverse effects. Typically the MONITOR/MWAIT pair is used in a sequence.


The above code sequence makes sure that a triggering store does not happen between the first check of the trigger and the execution of the monitor instruction. Without the second check that triggering store would go un-noticed. 


MULSS

MULSS 

Usage:  MULSS     src                                Modifies flags: See below

Multiplies the low single-precision floating-point value from the 'src' by the low single-precision floating-point value in the 'dest' and stores the single-precision floating-point result in the 'dest' operand.

Scalar Single-FP Multiply



MULSS xmm1,xmm2/mem32         ; F3 0F 59 /r     [KATMAI,SSE]


MULSS multiplies the lowest single-precision FP values of both operands, and stores the result in the low doubleword of xmm1.


The 'src' operand can be an XMM register or a 32-bit memory location. The 'dest' operand is an XMM register. The three high-order doublewords of the destination operand remain unchanged. 

 

EXAMPLE:

mulss xmm1 xmm2