Download Print this page

ZiLOG Z80 Handbook page 136

Hide thumbs Also See for Z80:

Advertisement

CHAPTER 10
Moving Data-Load, Block
Transfer, and Exchange Groups
This chapter discusses one of the most basic operations in any
computer system, moving data between CPU registers and external
memory, or between two areas of external memory. The moves may
be eight or sixteen bits at a time. The moves may involve transfer-
ring data from one location to another, copying the contents of a
source location to a destination location, or they may involve ex-
changing the contents of both locations. Some of the moves involve
storage and retrieval of data from the portion of external memory
used as a stack. The most sophisticated of the moves transfers up to
64-K bytes in one instruction.
8-BIT MOVES
The 8-bit load group allows data to be moved from a CPU register
to memory or from memory to a CPU register in a variety of ad-
dressing modes. Moving data to, or from, the A register is a special
subset in this group. The A register is given precedence because it
is the primary register used for arithmetic, logical, and shifting op-
erations in the 8080 and 8008; and these uses still carry over to the
Z-80.
Any of the general-purpose CPU registers can be loaded with the
contents of another CPU register or immediate value by a LD R,R'
or LD R,N instruction, respectively. The following code loads A, B,
C, D, and E with 0 through 4, respectively, and then reverses the
order (4 through 0) by LD R,R' instructions.
145

Advertisement

loading
Need help?

Need help?

Do you have a question about the Z80 and is the answer not in the manual?

Questions and answers