Consider the following block of operations that might be found inside a loop. Explain what the instructions do and what operation is being performed on the data.


MOVQ MM1,A ;move 8 pixels of image A
MOVQ MM2,B ;move 8 pixels of image B
MOVQ MM3,MM1
PSUBSB MM1,MM2
PSUBSB MM2,MM3
POR MM1,MM2


The following contains the commented code.


MOVQ MM1,A ;move 8 pixels of image A
MOVQ MM2,B ;move 8 pixels of image B
MOVQ MM3,MM1 ;save copy of A in MM3
PSUBSB MM1,MM2 ;subtract A - B using saturating arithmetic
PSUBSB MM2,MM3 ;subtract B - A using saturating arithmetic
POR MM1,MM2 ;OR (A - B) with (B - A)


The effect of saturating arithmetic is to clamp a result at its minimum or maximum. In this case, the operation is
subtraction and one of A ? B or B ? A must be negative and will therefore be clamped at 0. ORing the two results
together will OR (A ? B) with 0 or (B ? A) with 0. Consequently, the result will be the modulus of the difference
between A and B; that is |A ? B|.

Computer Science & Information Technology

You might also like to view...

The ____ tab menu provides options to change the appearance of the chart labels, data markers, and dimensions.

A. CHARD TOOLS B. GRAPH TOOLS C. IMAGE TOOLS D. GRAPHIC TOOLS

Computer Science & Information Technology

Convert the following segmented addresses into absolute addresses with five hex digits using the simplest method described earlier.

Multiply the segment address by 16 by adding zero at right end. Then add the offset address. 0000:0000 0001:0001 1000:0000 1000:0001 A000:0001 A000:A000

Computer Science & Information Technology

Adjusting the ________ lightens and darkens an overall graphic object

Fill in the blank(s) with correct word

Computer Science & Information Technology

When using Help, describe what happens when you select a search result in the Help Topics section and how can you proceed to your next topic?

What will be an ideal response?

Computer Science & Information Technology