Atmel SAM4S-XPLD Atmel ATSAM4S-XPLD ATSAM4S-XPLD Hoja De Datos

Los códigos de productos
ATSAM4S-XPLD
Descargar
Página de 1125
 127
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
12.6.5.22USAD8
Unsigned Sum of Absolute Differences
Syntax
USAD8{cond}{Rd,} RnRm
where:
cond
Rd
is the destination register.
Rn
is the first operand register.
Rm
is the second operand register.
Operation
The USAD8 instruction:
1.
Subtracts each byte of the second operand register from the corresponding byte of the first operand register.
2.
Adds the absolute values of the differences together.
3.
Writes the result to the destination register.
Restrictions
Do not use SP and do not use PC
.
Condition Flags
These instructions do not change the flags.
Examples
USAD8 R1, R4, R0 ; Subtracts each byte in R0 from corresponding byte of R4
                 ; adds the differences and writes to R1
USAD8 R0, R5     ; Subtracts bytes of R5 from corresponding byte in R0,
                 ; adds the differences and writes to R0.