
CLR
SC140 DSP Core Reference Manual A-115
CLR Clear a Data Register (DALU) CLR
Description
Status and Conditions that Affect Instruction
None.
Status and Conditions Changed by Instruction
Example
clr d1
Instruction Formats and Opcodes
Note: ** indicates serial grouping encoding.
Operation Assembler Syntax
0 → Dn
CLR Dn
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.
Register Address Bit Name Description
Ln L Clears the Ln bit in the destination register.
SR[0] C Clears the carry bit.
Register/Memory Address Before After
SR
$00E0 0001 $00E0 0000
L1:D1
$0:$00 0000 0040 $0:$00 0000 0000
Instruction Words Cycles Type Opcode
15 8 7 0
CLR Dn (Da even) 1 1 1 0*1011FFF00JJJJJ
CLR Dn (Da odd) 1 1 1 0*1000FFF11001 j j
Comentarios a estos manuales