Contents | < Browse | Browse >
NAME
EXT, EXTB -- Sign extend
SYNOPSIS
EXT.W Dn Extend byte to word
EXT.L Dn Extend word to long word
EXTB.L Dn Extend byte to long word (68020+)
Size = (Word, Long)
FUNCTION
Extends a byte to a word, or a word to a long word in a data
register by copying the sign bit through the upper bits. If the
operation is from byte to word, bit 7 is copied to bits 8 through
15. If the operation is from word to long word, bit 15 is copied
to bits 16 through 31. The EXTB copies bit 7 to bits 8 through 31.
FORMAT
-----------------------------------------------------------------
|15 |14 |13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|-----------|---|---|---|-----------|
| 0 | 1 | 0 | 0 | 1 | 0 | 0 | OP-MODE | 0 | 0 | 0 | REGISTER |
-----------------------------------------------------------------
"REGISTER" specifies a data register.
OP-MODE
010->Extending from 8 bits to 16 bits.
011->Extending from 16 bits to 32 bits.
111->Extending from 8 bits to 32 bits.
RESULT
X - Not affected
N - Set if the result is negative. Cleared otherwise.
Z - Set if the result is zero. Cleared otherwise.
V - Always cleared
C - Always cleared
SEE ALSO
BFEXTS BFEXTU