Motorola HC12 Refrence Manual page 245

Table of Contents

Advertisement

SEX
If r1 bit 7 = 0, then $00 : (r1) ⇒ r2
Operation:
If r1 bit 7 = 1, then $FF : (r1) ⇒ r2
Description:
This instruction is an alternate mnemonic for the TFR r1,r2 instruction,
where r1 is an 8-bit register and r2 is a 16-bit register. The result in r2 is
the 16-bit sign extended representation of the original two's complement
number in r1. The content of r1 is unchanged in all cases except that of
SEX A,D (D is A : B).
Condition Codes and Boolean Formulas:
S
None affected.
Addressing Modes, Machine Code, and Execution Times:
Source Form
SEX abc,dxys
Notes:
1. Legal coding for eb is summarized in the following table. Columns represent the high-order digit, and rows rep-
resent the low-order digit in hexadecimal (MSB is a don't-care).
CPU12
REFERENCE MANUAL
Sign Extend into 16-bit Register
X
H
I
N
Z
Address Mode
INH
B7 eb
0
sex:A ⇒ TMP2
sex:B ⇒ TMP2
3
sex:A ⇒ D
sex:B ⇒ D
4
SEX A,D
SEX B,D
sex:A ⇒ X
sex:B ⇒ X
5
SEX A,X
SEX B,X
sex:A ⇒ Y
sex:B ⇒ Y
6
SEX A,Y
SEX B,Y
sex:A ⇒ SP
sex:B ⇒ SP
7
SEX A,SP
SEX B,SP
INSTRUCTION GLOSSARY
V
C
1
Object Code
1
2
sex:CCR ⇒ TMP2
sex:CCR ⇒ D
SEX CCR,D
sex:CCR ⇒ X
SEX CCR,X
sex:CCR ⇒ Y
SEX CCR,Y
sex:CCR ⇒ SP
SEX CCR,SP
SEX
Cycles
Access Detail
1
P
MOTOROLA
6-185

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents