وو

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

وو

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

PAVGUSB

PAVGUSB 

Usage: PAVGUSB  dest,src                                         Modifies flags: None

The PAVGUSB instruction produces the rounded averages of the eight unsigned 8-bit integer values in the 'src' operand (an MMX register or a 64-bit memory location) and the eight corresponding unsigned 8-bit integer values in the 'dest'  operand (an MMX register). It does so by adding the 'src' and 'dest'  byte values and then adding a 001h to the 9-bit intermediate value. The intermediate value is then divided by 2 (shifted right one place) and the eight unsigned 8-bit results are stored in the MMX register specified as the destination operand.

Average of unsigned packed 8-bit values


PAVGUSB mm1,mm2/m64           ; 0F 0F /r BF          [PENT,3DNOW]


PAVGUSB adds the unsigned data elements of the source operand to the unsigned data elements of the destination register, then adds 1 to the temporary results. The results of the add are then each independently right-shifted by one bit position. The high order bits of each element are filled with the carry bits of the corresponding sum.


This instruction performs exactly the same operations as the PAVGB  MMX instruction.


Example:

pavgusb mm1 mm2