Professional Documents
Culture Documents
As
Ad
d/s
Register
Syntax
00
01
10
11
0
1
-
ds
ds
s
s
n3
n 0, 2, 3
n 0, 2, 3
n 0, 2, 3
Rn
x(Rn)
@Rn
@Rn+
01
11
1
-
ds
s
01
10
11
00
01
10
11
1
-
ds
s
s
s
s
s
s
Description
opcode
B/W
As
register
B/W
As
register
As
register
B/W
As
register
As
register
B/W
As
register
As
register
0 0 0
0
0
0
0
1
1
condition
0 0 0
JN Jump if negative
JL Jump if less
opcode
5 4 3
Instruction
Single-operand arithmetic
source
Ad B/W
As
destination
Two-operand arithmetic
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
source
Ad B/W
As
destination
Operation
Emulation
Description
ADC(.Bor.W)dst
dst+Cdst
ADDC(.Bor.W)#0,dst
Addcarrytodestination
DADC(.Bor.W)dst
dst+Cdst(decimally)
DADD(.Bor.W)#0,dst
Decimaladdcarrytodestination
DEC(.Bor.W)dst
DECD(.Bor.W)dst
INC(.Bor.W)dst
INCD(.Bor.W)dst
SBC(.Bor.W)dst
dst1dst
dst2dst
dst+1dst
dst+2dst
dst+0FFFFh+Cdst
dst+0FFhdst
SUB(.Bor.W)#1,dst
SUB(.Bor.W)#2,dst
ADD(.Bor.W)#1,dst
ADD(.Bor.W)#2,dst
SUBC(.Bor.W)#0,dst
Decrementdestination
Decrementdestinationtwice
Incrementdestination
Incrementdestinationtwice
Subtractsourceandborrow/.NOT.carry
fromdest.
Mnemonic
Operation
LogicalandRegisterControlInstructions
Emulation
Description
INV(.Bor.W)dst
.NOT.dstdst
XOR(.Bor.W)#0(FF)FFh,dst
Invertbitsindestination
RLA(.Bor.W)dst
CMSBMSB1
LSB+1LSB0
CMSBMSB1
LSB+1LSBC
ADD(.Bor.W)dst,dst
Rotateleftarithmetically
ADDC(.Bor.W)dst,dst
Rotateleftthroughcarry
dstPC
0GIE
1GIE
None
@SPPCSP+2SP
MOVdst,PC
BIC#8,SR
BIS#8,SR
MOV#0,R3
MOV@SP+,PC
Branchtodestination
Disable(general)interrupts
Enable(general)interrupts
Nooperation
Returnfromsubroutine
RLC(.Bor.W)dst
ProgramFlowControl
BRdst
DINT
EINT
NOP
RET
Mnemonic
DataInstructions
CLR(.Bor.W)dst
CLRC
CLRN
CLRZ
POP(.Bor.W)dst
SETC
SETN
SETZ
TST(.Bor.W)dst
Operation
0dst
0C
0N
0Z
@SPtemp
SP+2SP
tempdst
1C
1N
1Z
dst+0FFFFh+1
dst+0FFh+1
Emulation
Description
MOV(.Bor.W)#0,dst
BIC#1,SR
BIC#4,SR
BIC#2,SR
MOV(.Bor.W)@SP+,dst
Cleardestination
Clearcarryflag
Clearnegativeflag
Clearzeroflag
Popbyte/wordfromstacktodestination
BIS#1,SR
BIS#4,SR
BIS#2,SR
CMP(.Bor.W)#0,dst
Setcarryflag
Setnegativeflag
Setzeroflag
Testdestination