|
S3CK318 Datasheet, PDF (101/254 Pages) Samsung semiconductor – CalmRISC 8-Bit CMOS MICROCONTROLLER | |||
|
◁ |
S3CK318/FK318
INSTRUCTION SET
BITC â Bit Complement
Format:
Operation:
Flags:
NOTE:
Example:
BITC adr:8.bs
bs: 3-digit bit specifier
R3 â ((adr:8) ^ (2**bs)) if (TF == 0)
(adr:8) â ((adr:8) ^ (2**bs)) if (TF == 1)
BITC complements the specified bit of a value read from memory and stores the result in R3 or
back into memory, depending on the value of TF. TF is set or clear by BMS/BMC instruction.
Z: set if result is zero. Reset if not.
Since the destination register R3 is fixed, it is not specified explicitly.
Given: IDH = 01, DM[0180h] = FFh, eid = 1
BMC
BITC
80h.0
// TF â 0
// R3 â FEh, DM[0180h] = FFh
BMS
BITC
80h.1
// TF â 1
// DM[0180h] â FDh
7-35
|
▷ |