Bit Transfer Instructions; Arithmetic/Logical Instructions - NEC PD750004 User Manual

4 bit single-chip microcomputer
Table of Contents

Advertisement

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
MOV
MOV1 CY,@H+FLAG
MOV1 PORT3.2,CY

11.4.4 Arithmetic/Logical Instructions

ADDS A,#n4
Function: A <– A+n4 ; Skip if carry.
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.)
MB0
H,#FLAG SHR6
; H <– high-order 4 bits of FLAG
; CY <– FLAG
; P32 <– CY
n4 = I
CHAPTER 11 INSTRUCTION SET
: 0-FH
3-0
273

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd750006Pd750008Pd75p0016

Table of Contents