Jump to the location in program memory given by the instruction's
effective address if the specified if the specified condition is true.
If the specified condition is false, the program counter (PC) is
incremented and the effective address is ignored. However, the address
register specified in the effective address field is always updated
independently of the specified condition. All memory alterable
addressing modes may be used for effective address. A fast Short Jump
addressing mode may also be used. The 12-bit data is zero extended
toform the effectiveaddress. The term "cc" may specify the following
conditions:
"cc" Mnemonic Condition
CC (HS) - carry clear (higher or same) C = 0
CS (LO) - carry set (lower) C = 1
EC - extension clear E = 0
EQ - equal Z = 1
ES - extension set E = 1
GE - greater than or equal N^V = 0
GT - greater than Z+(N^V) = 0
LC - limit clear L = 0
LE - less than or equal Z+(N^V) = 1
LS - limit set L = 1
LT - less than N^V = 1
MI - minus N = 1
NE - not equal Z = 0
NR - normalized Z+(~U & ~E) = 1
PL - plus N = 0
NN - not normalized Z+(~U & ~E) = 0
where
~ denote the logical complement,
+ denotes the logical OR operator,
& denotes the logical AND operator, and
^ denotes the logical Exclusive OR operator.
Restrictions:
A Jcc instruction used within a {DO} loop cannot begin at the address
{LA} within that {DO} loop.
A Jcc instruction cannot be repeated using the {REP} instruction.
Example:
JNN -(R4) ;jump to P:(R4)-1 if not normalized
Explanation of Example:
In this example, program execution is transferred to the address
P:(R4)-1 if the result is not normalized. Note that the contents of
address register R4 are predecremented by 1, and the resulting address
is then loaded into the program counter if the specified condition is
true. If the specified condition is not true, no jump is taken, and the
program counter is incremented by one.
Condition Codes:
The condition codes are not affected by this instruction.
Instruction Format:
Jcc xxx
Jcc ea
xxx = 12-bit Short Jump Adress
ea = (Rn)-Nn
(Rn)+Nn
(Rn)-
(Rn)+
(Rn)
(Rn+Nn)
-(Rn)
Absolute address
Timing: 4 + jx oscillator clock cycles
Memory: 1 + ea program words
{JCLR} Jump if Bit Clear
Operation:
If S[n] = 0, then xxxx -> PC
else PC+1 -> PC
Assembler Syntax:
JCLR #n,X:ea,xxxx
JCLR #n,X:aa,xxxx
JCLR #n,X:pp,xxxx
JCLR #n,Y:ea,xxxx
JCLR #n,Y:aa,xxxx
JCLR #n,Y:pp,xxxx
JCLR #n,S,xxxx
Description:
Jump to the 16-bit absolute address in program memory specified in
the instruction's 24-bit extension word if the nth bit of the source
operand S is clear. The bit tested is selected by an immediate bit
number from 0-23. If the specified memory bit is not clear, the program
counter is incremented and the absolute address in the extension word
is ignored. However, the address register specified in the effective
address field is always updated independently ofthe state of the nth
bit. All address register indirect addressing modes may be used to
reference the source operand S. Absolute Short and I/O Short addressing
modes may also be used.
Restrictions:
A JCLR instruction cannot be repeated using the {REP} instruction.
A JCLR located at {LA}, LA-1, or LA-2 of the {DO} loop cannot specify the
program controller registers SR, SP, SSH, SSL, LA, or LC as its target.
JCLR SSH or JCLR SSL cannot follow an instruction that changes the {SP}.
Example:
JCLR #$5,X:<<$FFF1,$1234 ;go to P:$1234 if bit 5 in SCI SSR is clear
Explanation of Example:
In this example, program execution is transferred to the address
P:$1234 if bit 5 (PE) of the 8-bit read-only X memory location X:$FFF1
(I/O SCI interface status register) is a zero. If the specified bit
is not clear, no jump is taken, and the PC is incremented by one.
Condition Codes:
The condition codes are not affected by this instruction.
Instruction Format:
JCLR #n,X:ea,xxxx
JCLR #n,Y:ea,xxxx
JCLR #n,X:aa,xxxx
JCLR #n,Y:aa,xxxx
JCLR #n,X:pp,xxxx
JCLR #n,Y:pp,xxxx
JCLR #n,S,xxxx
#n = bit number
ea = (Rn)-Nn
(Rn)+Nn
(Rn)-
(Rn)+
(Rn)
(Rn+Nn)
-(Rn)
aa = 6-bit Absolute Short Address
pp = 6-bit I/O Short Address
S = ( X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,
Rn,Nn,Mn,SR,OMR,SP,SSH,SSL,LA,LC)
Timing: 6 + jx oscillator
Memory: 2 program words
{JMP} Jump
Operation: Assembler Syntax:
0xxx -> PC JMP xxx
ea -> PC JMP ea
Description:
Jump to the location in program memory given by the instruction's
effective address. All memory alterable addressing modes may be used
for effective address. A Fast Short Jump addressing modes may also be
used. The 12-bit data is zero extended to form the efective address.
Restriction:
A JMP instruction used within a DO loop cannot begin at the Address
LA within that DO loop.
A JMP instruction cannot be repeated using the REP instruction.
Example:
JMP (R1 + N1) ;jump to program address P:(R1 + N1)
Explanation of Example:
In this example, program execution is transferred to theprogram
address P:(R1 + N1).
Condition Codes:
The condition codes are not affected by this instruction.
Instruction Format:
JMP xxx
JMP ea
xxx = 12-bit Short Jump Address
ea = (Rn)-Nn
(Rn)+Nn
(Rn)-
(Rn)+
(Rn)
(Rn+Nn)
-(Rn)
Absolute address
Timing: 4 + jx oscillator clock cycles
Memory: 1 + ea program words
{JScc} Jump to Subroutine Conditionally{êJSCC}{êJSCS}{êJSEC}{êJSEQ}{êJSES}{êJSGE}{êJSGT}{êJSLC}{êJSLE}{êJSLS}{êJSLT}{êJSMI}{êJSNE}{êJSNR}{êJSPL}{êJSNN}
Operation: Assembler Syntax:
If cc, then SP+1->SP;PC->SSH;SR->SSL;0xxx->PC JScc xxx
else PC+1->PC
If cc, then SP+1->SP;PC->SSH;SR->SSL;ea->PC JScc ea
else PC+1->PC
Description:
Jump to subroutine whose location in program memory is given by
the instruction's effective address if the specified condition is true.
If the specified condition is true, the address of the instruction
immediately following the JScc instruction (PC) and SR are pushed onto
the system stack. Program execution then continues at the specified
effective address in program memory. If the specified condition is
false, the PC is incremented, and any extension word is ignored.
However, the address register specified in the effective address field
is always updated independently of the specified condition. All memory
alterable addressing mods may be used for the effective address. A
fast short jump addressing mode may also be used? The 12-bit data
is zero extended to form the effective address. The term "cc" may
specify the following condition:
"cc" Mnemonic Condition
CC (HS) - carry clear (higher or same) C = 0
CS (LO) - carry set (lower) C = 1
EC - extension clear E = 0
EQ - equal Z = 1
ES - extension set E = 1
GE - greater than or equal N^V = 0
GT - greater than Z+(N^V) = 0
LC - limit clear L = 0
LE - less than or equal Z+(N^V) = 1
LS - limit set L = 1
LT - less than N^V = 1
MI - minus N = 1
NE - not equal Z = 0
NR - normalized Z+(~U & ~E) = 1
PL - plus N = 0
NN - not normalized Z+(~U & ~E) = 0
where
~ denote the logical complement,
+ denotes the logical OR operator,
& denotes the logical AND operator, and
^ denotes the logical Exclusive OR operator.
Restrictions:
A JScc instruction used within a DO loop cannot specify the loop
address (LA) as its target.
A JScc instruction used within in a DO loop cannot begin at the address
LA within that DO loop.
A JScc instruction cannot be repeated using the REP instruction.
Example:
JSLS (R3+N3) ;jump to subroutine at P:(R3+N3) if limit set (L=1)
Explanation of Example:
In this example, program execution is transfered tothe subroutine
at address P:(R3+N3) in program memory if the limit bit is set (L=1).
Both the return address (PC) and SR are pushed onto the system stack
prior to transferring program control to the subroutine if the
specified condition is not true, no jump is taken and the PC is
incremented by 1.
Condition Codes:
The condition codes are not affected by this instruction.
Instruction Format:
JScc xxx
JScc ea
xxx = 12-bit Short Jump Address
ea = (Rn)-Nn
(Rn)+Nn
(Rn)-
(Rn)+
(Rn)
(Rn+Nn)
-(Rn)
Absolute address
Timing: 4 + jx oscillator clock cycles
Memory: 1 + ea program words
{JSCLR} Jump to Subroutine if Bit Clear
Operation:
If S[n]=0,
then SP+1->SP;PC->SSH;SR->SSL;xxxx->PC
else PC+1->PC
Assembler Syntax:
JSCLR #n,X:ea,xxxx
JSCLR #n,X:aa,xxxx
JSCLR #n,X:pp,xxxx
JSCLR #n,Y:ea,xxxx
JSCLR #n,Y:aa,xxxx
JSCLR #n,Y:pp,xxxx
JSCLR #n,S,xxxx
Description:
Jump to subroutine at the 16-bit absolute address in program memory
specified in the instruction's 24-bit extension word if the nth bit of
the source operand S is clear. The bit to be tested is selected by an
immediate bit number from 0-23. if the nth bit of the source operand S
is clear, the address of the instruction immediately following the
JSCLR instruction (PC) and the SR are pushed onto the system stack.
Program execution then contintinues at the specified absolute address
in the instruction's 24-bit extension word. If the specified memory bit
is not clear, the PC is incremented and the extension word is ignored.
However, the adress register specified in the effective address field
is always updated independently of the state of the nth bit. All
address register indirect addressing modes may be used to reference the
source operand S. Absolute short and I/O short adressing modes may also
be used.
Restrictions:
A JSCLR instruction used within a DO lopp cannot specify the loop
address (LA) as its target.
A JSCLR located at LA, LA-1, or LA-2 of a DO loop, cannot specify the
program controller registers SR, SP, SSH, SSL, LA, or LC as its target.
JSCLR SSH or JSCLR SSL cannot follow an instruction that changes the
SP.
A JSCLR instrcuction cannot be repeated using the REP instruction.
Example:
JSCLR #$1,Y:<<$FFE3,$1357 ; go sub. at P:$1357 if bit 1 in
; Y:$FFE3 is clear
Explanation of Example:
In this example, program execution is transferred to the subroutine
at absolute address P:$1357 in program memory if bit 1 of the external
I/O location Y:<<$FFE3 is a zero. If the specified bit is not clear, no
jump is taken and the PC is incremented by 1.
Condition Codes:
The condition codes are not affected by this instruction.
Instruction Format:
JSCLR #n,X:ea,xxxx
JSCLR #n,X:aa,xxxx
JSCLR #n,X:pp,xxxx
JSCLR #n,Y:ea,xxxx
JSCLR #n,Y:aa,xxxx
JSCLR #n,Y:pp,xxxx
JSCLR #n,S,xxxx
xxxx = 16-bit Absolute Address
#n = bit number
ea = (Rn)-Nn
(Rn)+Nn
(Rn)-
(Rn)+
(Rn)
(Rn+Nn)
-(Rn)
aa = 6-bit Absolute Short Address
pp = 6-bit I/O Short Address
S = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,
Rn,Nn,Mn,SR,OMR,SP,SSH,SSL,LA,LC)
Timing: 6 + jx oscillator clock cycles
Memory: 2 program words
{JSET} Jump if Bit Set
Operation:
If S[n] = 1, then xxxx->PC
else PC+1->PC
Assembler Syntax:
JSET #n,X:ea,xxxx
JSET #n,X:aa,xxxx
JSET #n,X:pp,xxxx
JSET #n,Y:ea,xxxx
JSET #n,Y:aa,xxxx
JSET #n,Y:pp,xxxx
JSET #n,S,xxxx
Description:
Jump to the 16-bit absolute address in program memory specified in
the instruction's 24-bit extension word if the nth bit of the source
operand S is set. The bitto be tested is selected by an immediate bit
number from 0-23. If the specified memory bitis not set, the PC is
incremented, and the absolute address in the extension word is ignored.
However, the address register specified in the effective address field
is always updated independently of the state of the nth bit. All
address register indirect addressing modes may be used to reference the
source operand S. Absolute short I/O addressing modes may also be used.
Restrictions:
A JSET instruction used within a DO loop cannot specify the loop address
(LA) as its target.
A JSET located at LA, LA-1, or LA-2 of a DO loop cannot specify the
program controller registers SR, SP, SSH, SSL, LA, or LC as its target.
JSET SSH or JSET SSL cannot follow an instruction that changes the SP.
A JSET instruction cannot be repeated using the REP instruction.
Example:
JSET #12,X:<<$FFF2,$4321 ;$4321 -> (PC) if bit 12 (SCI COD) is set
Explanation of Example:
In this example, pogram execution is transfered to the address
P:$4321 if bit 12 (SCI COD) of the 16-bit read/write I/O register
X:$FFF2 is a one. If the specified bit is not set, no jump is taken and
the program counter (PC) is incremented by 1.
Condition Codes:
The condition codes are not affected by this instruction.
Instruction Format:
JSET #n,X:ea,xxxx
JSET #n,X:aa,xxxx
JSET #n,X:pp,xxxx
JSET #n,Y:ea,xxxx
JSET #n,Y:aa,xxxx
JSET #n,Y:pp,xxxx
JSET #n,S,xxxx
xxxx = 16-bit Absolute Address
#n = bit number
ea = (Rn)-Nn
(Rn)+Nn
(Rn)-
(Rn)+
(Rn)
(Rn+Nn)
-(Rn)
aa = 6-bit Absolute Short Address
pp = 6-bit I/O Short Address
S = (X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,
Rn,Nn,Mn,SR,OMR,SP,SSH,SSL,LA,LC)
Timing: 6 + jx oscillator clock cycles
Memory: 2 program words
{JSR} Jump to Subroutine
Operation: Assembler Syntax:
SP+1->SP;PC->SSH;SR->SSL;0xxx->PC JSR xxx
SP+1->SP;PC->SSH;SR->SSL;ea->PC JSR ea
Description:
Jump to the subroutine whose location in program memory is given by
the instruction's effective address. The address of the instruction
immediately following the JSR instruction (PC) and the SR is pushed
onto the system stack. Program execution then continues at the
specified effective address in program memory. All memory alterable
addressing modes may be used for the effective address. A fast short
jump addressing mode may also be used. the 12-bit data iszero extended
to form the effective address.
Restrictions:
A JSR instruction used within a DO loop cannot specify the loop address
(LA) as its target.
A JSR instruction used within a DO loop cannot begin at the address LA
within that DO loop.
A JSR instruction cannot be repeated using the REP instruction.
Example:
JSR (R5)+ ;jump to subroutine at (R5), update R5
Explanation of Example:
In this example, program execution is transferred to the subroutine
at address P:(R5) in program memory, and the contents of the R5 address
register are then updated.
Condition Codes:
The condition codes are not affected by this instruction.
Instruction Format:
JSR xxx
JSR ea
xxx = 12-bit Short Jump Address
ea = (Rn)-Nn
(Rn)+Nn
(Rn)-
(Rn)+
(Rn)
(Rn+Nn)
-(Rn)
Absolute address
Timing: 4 + jx oscillator clock cycles
Memory: 1 + ea program words
{JSSET} Jump to Subroutine if Bit Set
Operation:
If S[n] = 1,
then SP+1->SP;PC->SSH;SR->SSL;xxxx->PC
else PC+1->PC
Assembler Syntax:
JSSET #n,X:ea,xxxx
JSSET #n,X:aa,xxxx
JSSET #n,X:pp,xxxx
JSSET #n,Y:ea,xxxx
JSSET #n,Y:aa,xxxx
JSSET #n,Y:pp,xxxx
JSSET #n,S,xxxx
Description:
Jump to the subroutine at the 16-bit absolute address in program
memory specified in the instruction's 24-bit extension word if the
nth bit of the source operand S is set. The bit to be tested is
selected by an immediate bit number from 0-23. If the nth bit of the
source operand S is set, the address of the instruction immediately
following the JSSET instruction (PC) and the SR are pushed onto the
system stack. Program execution then continues at the specified
absolute absolute address in the instruction's 24-bit extension word.
If the specified memory bit is not set, the PC is incremented, and
the extension word is ignored. However, the address register specified
in the effective address field is always updated independently of the
state of the nth bit. All address register indirect addressing modes
may be used to reference the source operand S. Absolute short and I/O
short addressing modes may also be used.
Restrictions:
A JSSET instruction used within a DO loop cannot specify the loop
address (LA) as its target.
A JSSET located at LA, LA-1, or LA-2 ofa DO loop, cannot specify the
program controller registers SR, SP, SSH, SSL, LA, or LC as its target.
JSSET SSH or JSSET SSL cannot follow an instruction that changes the
SP.
A JSSET instruction cannot be repeated using the REP instruction.
Example:
JSSET #$17,Y:<$3F,$100 ;go to sub. at P:$0100 if bit 23 in Y:$3F
is set
Explanation of Example:
In this example, program execution is transferred to the subroutine
at absolute address P:$0100 in program memory if bit 23 of Y memory
location Y:$003F is a one. If the specified bit is not set, no jump is
taken and the PC is incremented by 1.
Condition Codes:
The condition codes are notaffected by this instruction.
Instruction Format:
JSSET #n,X:ea,xxxx
JSSET #n,X:aa,xxxx
JSSET #n,X:pp,xxxx
JSSET #n,Y:ea,xxxx
JSSET #n,Y:aa,xxxx
JSSET #n,Y:pp,xxxx
JSSET #n,S,xxxx
xxxx = 16-bit Absolute Address
#n = bit number
ea = (Rn)-Nn
(Rn)+Nn
(Rn)-
(Rn)+
(Rn)
(Rn+Nn)
-(Rn)
aa = 6-bit Absolute Short Address
pp = 6-bit I/O Short Address
S = ( X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,
Rn,Nn,Mn,SR,OMR,SP,SSH,SSL,LA,LC)
Timing: 6 + jx oscillator clock cycles
Memory: 2 program words
{LSL} Logical Shift Left
Operation:
47 24
+------------+
C <-|<-----------|<- 0 (parallel move)
+------------+
Assembler Syntax:
LSL D (parallel move)
Description:
Logical shifts bits 47-24 of the destination operand D one bit to
the left and store the result in the destination accumulator. Prior to
instruction execution, bit 47 of D is shifted into the carry bit C,
and zero is shifted into bit 24 of the destination accumulator D. This
instruction is a 24-bit operation. The remainig bits of the
destination operand E are not affected. If zero shift count is
specified, the carry bit is cleared. The difference between LSL and ASL
is that LSL operates on only A1 or B1 and always clears the V bit.
Example:
LSL B #$7F,R0 ;shift B1 one bit to the left, set up R0
Before execution:
B = $00:F01234:13579B
SR = $0300
After execution:
B = $00:E02468:13579B
SR = $0309
Explanation of Example:
Prior to execution, the 56-bit B accumulator contains the value
$00:F01234:13579B. The execution of the LSL B instruction shifts the
24-bit value in the B1 register one bit to the left and stores the
result back in the B1 register.
Condition Codes:
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|<- {MR} ->|<- {CCR} ->|
{L}- Set if data limiting has occured during parallel move
{N}- Set if bit 47 of A or B result is set
{Z}- Set if bits 47-24 of A or B result are zero
{V}- Always cleared
{C}- Set if bit 47 of A or B was set prior to instruction execution
Instruction Format:
LSL D
D = (A,B)
Timing: 2 + mv oscillator clock cycles
Memory: 1 + mv program words
{LSR} Logical Shift Right
Operation:
47 24
+------------+
0 ->|----------->|-> C (parallel move)
+------------+
Assembler Syntax:
LSR D (parallel move)
Description:
Logically shifts bits 47-24 of the destination operand D one bit to
the right and store the result in the destination accumulator. Prior to
instruction execution, bit 24 of D is shifted into the carry bit C, and
zero is shifted into bit 47 of the destination accumulator D. This
instruction is a 24-bit operation. The remaining bits of the
destination operand D are not affected.
Example:
LSR A A1,N4 ;shift A1 one bit to the right, set up N4
Before execution:
A = $37:444445:828180
SR = $0300
After execution:
A = $37:222222:828180
SR = $0301
Explanation of Example:
Prior to execution, the 56-bit A accumulator countains the value
$37:444445:828180. The execution of the LSR A instruction shifts the
24-bit value in the A1 register one bit tothe right and stores the
result back in the A1 register.
Condition Codes:
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|LF|**| T|**|S1|S0|I1|I0|**| L| E| U| N| Z| V| C|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|<- {MR} ->|<- {CCR} ->|
{L}- Set if data limiting has occured during parallel move
{N}- Always cleared
{Z}- Set if bits 47-24 of A or B result are zero
{V}- Always cleared
{C}- Set if bit 24 of A or B was set prior to instruction execution
Instruction Format:
LSR D
D = (A,B)
Timing: 2 + mv oscillator clock cycles
Memory: 1 + mv program words
{LUA} Load Update Address
Operation:
ea -> D
Assembler Syntax:
LUA ea,D
Description:
Load the updated address into the destination address register D.
The source address register and the update mode used to compute the
updated address are specified by the effective address (ea). Note that
the source address register specified in the effective address is not
updated. All update addressing modes may be used.
NOTE: This instruction is considered to be a move-type instruction.
Due to pipelining, the new contents of the destination address register
(Rn or Nn) will not be available for use during the following
instruction (i.e., there is a single instruction cycle pipeline delay).
Example
LUA (R0)+N0,R1 ;update R1 using (R0)+N0
Before Execution:
R0 = $0003
N0 = $0005
R1 = $0004
After Execution:
R0 = $0003
N0 = $0005
R1 = $0008
Explanation of Example:
Prior to execution, the 16-bit address register R0 contains the
value $0003, the 16-bit address register N0 contains the value $0005,
and the 16-bit address register R1 contains the value $0004. The
execution of the LUA (R0)+N0,R1 instruction adds the contents of the R0
register to the contents of the N0 register and stores the resulting
updated address in R1. The contents of both the R0 and N0 address
registers are not affected.
Condition Codes:
The condition codes are not affected by this instruction.
Instruction Format:
LUA ea,D
ea = (Rn)-Nn
(Rn)+Nn
(Rn)-
(Rn)+
D = (Rn,Nn)
Timing: 4 oscillator clock cycles
Memory: 1 program word
{MAC} Signed Multiply-Accumulate
Operation:
D+-S1*S2 -> D (parallel move)
Assembler Syntax:
MAC (+-)S1,S2,D (parallel move)
Description:
Multiply the two signed 24-bit source operands S1 and S2 and
add/subtract the product to/from the specified 56-bit destination
accumulator D. The "-" sign option is used to negate the specified
product prior to accumulation. The default sign option is "+".
Example:
MAC X0,X0,A X:(R2)+N2,Y1 ;square X0 and store in A, update Y1 and R2
Before Execution:
X0 = $123456
A = $00:100000:000000
After Execution:
X0 = $123456
A = $00:1296CD:9619C8
Explanation of Example:
Prior to execution, the 24-bit X0 register contains the value of
$123456 (0.142222166), and the 56-bit A accumulator contains the value
$00:100000:000000 (0.125). The execution of the MAC X0,X0,A instruction
square the 24-bit signed value in the X0 regsiter and adds the
resulting 48-bit product to the 56-bit A accumulator (X0*X0+A =