Ldb — Load Bit - Samsung S3F84B8 User Manual

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00
6.3.37 LDB — LOAD BIT
dst,src.b
LDB
dst.b,src
LDB
dst(0)  src(b)
Operation:
dst(b)  src(0)
The specified bit of source is loaded into bit zero (LSB) of destination, or bit zero of source is
loaded into the specified bit of destination. No other bits of the destination are affected. The
source remains unaffected.
No flags are affected.
Flags:
Format:
opc
opc
In the second byte of instruction formats, the destination (or source) address is four bits, the bit address 'b' is
NOTE:
three bits, and the LSB address value is one bit in length.
Given R0 = 06H and general register 00H = 05H:
Examples:
LDB
LDB
In the first example, destination working register R0 contains the value 06H and the source
general register 00H contains the value 05H. The statement "LD R0,00H.2" loads the bit two
value of 00H register into bit zero of the R0 register, leaving the value 07H in register R0.
In the second example, 00H is the destination register. The statement "LD 00H.0,R0" loads bit
zero of register R0 to the specified bit (bit zero) of destination register, leaving 04H in general
register 00H.
or
dst | b | 0
src
src | b | 1
dst
R0,00H.2
00H.0,R0
Bytes
3
3
R0 = 07H, register 00H = 05H
R0 = 06H, register 00H = 04H
6-50
6 INSTRUCTION SET
Cycles
Opcode
(Hex)
6
47
6
47
Addr Mode
dst
src
r0
Rb
Rb
r0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents