273
CHAPTER 11 INSTRUCTION SET
11.4.3 Bit Transfer Instructions
MOV1 CY,fmem.bit
MOV1 CY,pmem.@l
MOV1 CY,@H+mem.bit
Function: CY <– (bit specified in operand)
Transfers the data memory bit specified by bit manipulation addressing (fmem.bit, pmem.@L, @H+mem.bit)
to the carry flag (CY).
MOV1 fmem.bit,CY
MOV1 pmem.@L,CY
MOV1 @H+mem.bit,CY
Function: (bit specified in operand) <– CY
Transfers the carry flag (CY) bit to the data memory bit specified by bit manipulation addressing (fmem.bit,
pmem.@L,@H+mem.bit)
Example The flag (bit 3 at address 3FH) in data memory is set in bit 2 of port 3.
FLAG EQU 3FH.3
SEL MB0
MOV H,#FLAG SHR6 ; H <– high-order 4 bits of FLAG
MOV1 CY,@H+FLAG ; CY <– FLAG
MOV1 PORT3.2,CY ; P32 <– CY
11.4.4 Arithmetic/Logical Instructions
ADDS A,#n4
Function: A <– A+n4 ; Skip if carry. n4 = I3-0: 0-FH
Adds the 4-bit immediate data n4 to the contents of the A register in binary, then skips the next instruction
if the addition generates a carry. The carry flag is not affected.
This instruction, when combined with the ADDC A,@HL or SUBC A,@HL instruction, functions as a number
system conversion instruction. (See Section 11.1.)