Rev. 1.60 226 August 20, 2019 Rev. 1.60 227 August 20, 2019
BS66F340/BS66F350/BS66F360/BS66F370
Touch A/D Flash MCU with LED Driver
BS66F340/BS66F350/BS66F360/BS66F370
Touch A/D Flash MCU with LED Driver
RRCA [m]
Rotate Data Memory right through Carry with result in ACC
Description Data in the specied Data Memory and the carry ag are rotated right by 1 bit. Bit 0 replaces
the Carry bit and the original carry ag is rotated into bit 7. The rotated result is stored in the
Accumulator and the contents of the Data Memory remain unchanged.
Operation ACC.i ← [m].(i+1); (i=0~6)
ACC.7 ← C
C ← [m].0
Affected ag(s) C
SBC A,[m]
Subtract Data Memory from ACC with Carry
Description The contents of the specied Data Memory and the complement of the carry ag are
subtracted from the Accumulator. The result is stored in the Accumulator. Note that if the
result of subtraction is negative, the C ag will be cleared to 0, otherwise if the result is
positive or zero, the C ag will be set to 1.
Operation ACC ← ACC − [m] − C
Affected ag(s) OV, Z, AC, C, SC, CZ
SBC A, x
Subtract immediate data from ACC with Carry
Description The immediate data and the complement of the carry ag are subtracted from the
Accumulator. The result is stored in the Accumulator. Note that if the result of subtraction is
negative, the C ag will be cleared to 0, otherwise if the result is positive or zero, the C ag
will be set to 1.
Operation ACC ← ACC – [m] – C
Affected ag(s) OV, Z, AC, C, SC, CZ
SBCM A,[m]
Subtract Data Memory from ACC with Carry and result in Data Memory
Description The contents of the specied Data Memory and the complement of the carry ag are
subtracted from the Accumulator. The result is stored in the Data Memory. Note that if the
result of subtraction is negative, the C ag will be cleared to 0, otherwise if the result is
positive or zero, the C ag will be set to 1.
Operation [m] ← ACC − [m] − C
Affected ag(s) OV, Z, AC, C, SC, CZ
SDZ [m]
Skip if decrement Data Memory is 0
Description The contents of the specied Data Memory are rst decremented by 1. If the result is 0 the
following instruction is skipped. As this requires the insertion of a dummy instruction while
the next instruction is fetched, it is a two cycle instruction. If the result is not 0 the program
proceeds with the following instruction.
Operation [m] ← [m] − 1
Skip if [m]=0
Affected ag(s) None
SDZA [m]
Skip if decrement Data Memory is zero with result in ACC
Description The contents of the specied Data Memory are rst decremented by 1. If the result is 0, the
following instruction is skipped. The result is stored in the Accumulator but the specied
Data Memory contents remain unchanged. As this requires the insertion of a dummy
instruction while the next instruction is fetched, it is a two cycle instruction. If the result is not 0,
the program proceeds with the following instruction.
Operation ACC ← [m] − 1
Skip if ACC=0
Affected ag(s) None