Freescale Semiconductor SC140 specifications Clear a Data Register Dalu, Clr d1, → Dn, CLR Dn

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 429
Image 429

CLR

CLR

Clear a Data Register (DALU)

Operation

Assembler Syntax

0 → Dn

CLR Dn

CLR

Description

CLR Dn

Clears a data register (Dn).

Note: CLR Dn is assembler mapped to SUB Da,Da,Dn where Dn is the register being cleared and Da is an arbitrary register assigned by the assembler for programming rule G.G.5. Any (Da-Da) results in zero being stored in Dn. Da assignment uses the low data registers (D0-D7) where possible to avoid using a prefix.

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

Ln

L

Clears the Ln bit in the destination register.

SR[0]

C

Clears the carry bit.

Example

clr d1

Register/Memory Address

SR

L1:D1

Before

$00E0 0001

$0:$00 0000 0040

After

$00E0 0000

$0:$00 0000 0000

Instruction Formats and Opcodes

Instruction

Words

Cycles

Type

Opcode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15

 

 

 

 

 

 

8

7

 

 

 

 

 

 

0

CLR

Dn (Da even)

1

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

*

1

0

1

1

F

F

F

0

0

J

J

J

J

J

CLR

Dn (Da odd)

1

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

*

1

0

0

0

F

F

F

1

1

0

0

1

j

j

Note:

** indicates serial grouping encoding.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SC140 DSP Core Reference Manual

A-115

Page 429
Image 429
Freescale Semiconductor SC140 specifications Clear a Data Register Dalu, Clr d1, → Dn, CLR Dn