BP45F0044
Wireless Charger Flash MCU
Subtract Data Memory from ACC with result in Data Memory
SUBM A,[m]
Description
The specified Data Memory is subtracted from the contents of the Accumulator. The result is
stored in the Data Memory. Note that if the result of subtraction is negative, the C flag will be
cleared to 0, otherwise if the result is positive or zero, the C flag will be set to 1.
Operation
[m] ← ACC − [m]
OV, Z, AC, C
Affected flag(s)
Subtract immediate data from ACC
SUB A,x
Description
The immediate data specified by the code is subtracted from the contents of the Accumulator.
The result is stored in the Accumulator. Note that if the result of subtraction is negative, the C
flag will be cleared to 0, otherwise if the result is positive or zero, the C flag will be set to 1.
Operation
ACC ← ACC − x
OV, Z, AC, C
Affected flag(s)
Swap nibbles of Data Memory
SWAP [m]
Description
Operation
The low-order and high-order nibbles of the specified Data Memory are interchanged.
[m].3~[m].0 ↔ [m].7~[m].4
None
Affected flag(s)
Swap nibbles of Data Memory with result in ACC
SWAPA [m]
Description
The low-order and high-order nibbles of the specified Data Memory are interchanged. The
result is stored in the Accumulator. The contents of the Data Memory remain unchanged.
Operation
ACC.3~ACC.0 ← [m].7~[m].4
ACC.7~ACC.4 ← [m].3~[m].0
Affected flag(s)
None
Skip if Data Memory is 0
SZ [m]
Description
If the contents of the specified Data Memory 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
Skip if [m]=0
None
Affected flag(s)
Skip if Data Memory is 0 with data movement to ACC
SZA [m]
Description
The contents of the specified Data Memory are copied to the Accumulator. If the value is zero,
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
ACC ← [m]
Skip if [m]=0
Affected flag(s)
None
Skip if bit i of Data Memory is 0
SZ [m].i
Description
If bit i of the specified Data Memory 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
Skip if [m].i=0
None
Affected flag(s)
Rev. 1.00
72
March 17, 2020