Motorola CPU32 Reference Manual page 137

M68300 series central processor unit
Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

II
EXT
EXTB
Operation:
Assembler
Syntax:
Attributes:
Sign Extend
Destination Sign-extended => Destination
EXT.WDn
EXT.L Dn
EXTB.L Dn
extend byte to word
extend word to long word
extend byte to long word
Size
=
(Word, Long)
EXT
EXTB
Description:
Extends a byte in a data register to a word or a long word, or a word in a data register to a
long word, by replicating the sign bit to the left. If the operation extends a byte to a word, bit [7] of
the designated data register is copied to bits [15:8] of that data register. If the operation extends a
word to a long word, bit [15] of the designated data register is copied to bits [31 :16] of the data
register. The EXTB form copies bit [7] of the designated register to bits [31 :8] of the data register.
Condition Codes:
x
N
z
v
c
o
0
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.
Instruction Format:
15
14
13
12
11
10
9
8 7 6
o
1
0
0
o
I
0
OPMODE
Instruction Fields:
5
o
Opmode field -
Specifies the size of the sign-extension operation:
010 - Sign-extend low-order byte of data register to word.
011 - Sign-extend low-order word of data register to long.
111 -
Sign-extend low-order byte of data register to long.
Register field - Specifies the data register is to be sign-extended.
4
3
2
0
o
I
0
REGISTER
MOTOROLA
4-84
INSTRUCTION SET
CPU32 REFERENCE MANUAL

Advertisement

Table of Contents
loading

Table of Contents