BS85B12-3/BS85C20-3/BS85C20-5
Touch Key Flash MCU with LCD/LED Driver
Instruction Set Summary
Theꢀfollowingꢀtableꢀdepictsꢀaꢀsummaryꢀofꢀtheꢀinstructionꢀsetꢀcategorisedꢀaccordingꢀtoꢀfunctionꢀandꢀ
canꢀbeꢀconsultedꢀasꢀaꢀbasicꢀinstructionꢀreferenceꢀusingꢀtheꢀfollowingꢀlistedꢀconventions.ꢀ
Table Conventions
x:ꢀBitsꢀimmediateꢀdataꢀ
m:ꢀDataꢀMemoryꢀaddressꢀ
A:ꢀAccumulatorꢀ
i:ꢀ0~7ꢀnumberꢀofꢀbitsꢀ
addr:ꢀProgramꢀmemoryꢀaddress
Mnemonic
Description
Cycles Flag Affected
Arithmetic
�DD �ꢂ[m]
�DDM �ꢂ[m]
�DD �ꢂx
�dd Data Memory to �CC
�dd �CC to Data Memory
�dd immediate data to �CC
1
1Note
1
Zꢂ Cꢂ �Cꢂ OV
Zꢂ Cꢂ �Cꢂ OV
Zꢂ Cꢂ �Cꢂ OV
Zꢂ Cꢂ �Cꢂ OV
Zꢂ Cꢂ �Cꢂ OV
Zꢂ Cꢂ �Cꢂ OV
Zꢂ Cꢂ �Cꢂ OV
Zꢂ Cꢂ �Cꢂ OV
Zꢂ Cꢂ �Cꢂ OV
Zꢂ Cꢂ �Cꢂ OV
C
�DC �ꢂ[m]
�DCM �ꢂ[m]
SUB �ꢂx
�dd Data Memory to �CC with Carry
1
1Note
�dd �CC to Data memory with Carry
Sꢀbtract immediate data from the �CC
1
SUB �ꢂ[m]
SUBM �ꢂ[m]
SBC �ꢂ[m]
SBCM �ꢂ[m]
D�� [m]
Sꢀbtract Data Memory from �CC
1
1Note
Sꢀbtract Data Memory from �CC with resꢀlt in Data Memory
Sꢀbtract Data Memory from �CC with Carry
Sꢀbtract Data Memory from �CC with Carryꢂ resꢀlt in Data Memory
Decimal adjꢀst �CC for �ddition with resꢀlt in Data Memory
1
1Note
1Note
Logic Operation
�ND �ꢂ[m]
OR �ꢂ[m]
Loꢁical �ND Data Memory to �CC
Loꢁical OR Data Memory to �CC
Loꢁical XOR Data Memory to �CC
Loꢁical �ND �CC to Data Memory
Loꢁical OR �CC to Data Memory
Loꢁical XOR �CC to Data Memory
Loꢁical �ND immediate Data to �CC
Loꢁical OR immediate Data to �CC
Loꢁical XOR immediate Data to �CC
Complement Data Memory
1
1
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
XOR �ꢂ[m]
�NDM �ꢂ[m]
ORM �ꢂ[m]
XORM �ꢂ[m]
�ND �ꢂx
1
1Note
1Note
1Note
1
OR �ꢂx
1
XOR �ꢂx
1
1Note
CPL [m]
CPL� [m]
Complement Data Memory with resꢀlt in �CC
1
Increment & Decrement
INC� [m]
INC [m]
DEC� [m]
DEC [m]
Rotate
Increment Data Memory with resꢀlt in �CC
1
Z
Z
Z
Z
Increment Data Memory
1Note
Decrement Data Memory with resꢀlt in �CC
Decrement Data Memory
1
1Note
RR� [m]
RR [m]
Rotate Data Memory riꢁht with resꢀlt in �CC
Rotate Data Memory riꢁht
1
1Note
1
None
None
C
RRC� [m]
RRC [m]
RL� [m]
RL [m]
Rotate Data Memory riꢁht throꢀꢁh Carry with resꢀlt in �CC
Rotate Data Memory riꢁht throꢀꢁh Carry
Rotate Data Memory left with resꢀlt in �CC
Rotate Data Memory left
1Note
C
1
None
None
C
1Note
1
RLC� [m]
RLC [m]
Rotate Data Memory left throꢀꢁh Carry with resꢀlt in �CC
Rotate Data Memory left throꢀꢁh Carry
1Note
C
Rev. 1.20
160
�ꢀꢁꢀst 10ꢂ 2012