ASSIGNMNTS 1. How is the accumulator different from the 8-bit general-purpose registers of the Z80 microprocessor? 2. Explain the function of the alternate registers. 3. What is a flag, and what is its function? 4. If the Z80 adds 87H and 79H, specify the contents of the accumulator and the status of the S, Z, […]
Continue reading…
Introduction to Z80 Assembly Language Programming
SUMMARY of Introduction to Z80 Assembly Language Programming
SUMMARY This chapter introduced the Z80 programming model and provided an overview of the Z80 instruction set and the capability of the Z80 microprocessor. The important concepts and topics discussed in this chapter can be summarized as follows: · The Z80 microprocessor has six general-purpose 8-bit registers (B, C, D, E, H, and L) as […]
Continue reading…
LIST OF SELECTED Z80 INSTRUCTIONS par 2
Most instructions are compatible with the 8080 instruction set, with a few exceptions. Notations used in the description of the instructions include r = Z80 8-bit Register rp = Register Pair rs = Register Source rx = Index Registers rd = Register Destination d= Displacement Byte m = Memory b = Bit ( ) = […]
Continue reading…
LIST OF SELECTED Z80 INSTRUCTIONS
6.6 LIST OF SELECTED Z80 INSTRUCTIONS The Z80 instruction set includes 158 instructions resulting in 694 machine codes. The following list is a representative sample of each group described in Section "’6.2. The purpose of the list is to show you the overall capability of the Z80 and some logical patterns in its instruction. You […]
Continue reading…
ADDRESSING MODES
6. 5 ADDRESSING MODES The addressing mode is a way of specifying an operand or pointing to a data location. The Z80 microprocessor has ten addressing modes, as shown in Table 6.1. The first three are explained here as illustrations, and the others will be explained in later chapters. In Section 6.2.2, we listed various […]
Continue reading…
FLOWCHARTING
6.4 FLOWCHARTING A flowchart is a graphic representation of the logic and sequence of tasks to be performed. A flowchart should assist in clarifying one’s thinking process and communicate the programmer’s approach and logic in writing the program. Flowcharting is an art; how much detail it should include requires a subjective decision. At one level, […]
Continue reading…
HOW TO WRITE, ASSEMBLE, AND EXECUTE A SIMPLE ASSEMBLY LANGUAGE PROGRAM
6.3 HOW TO WRITE, ASSEMBLE, AND EXECUTE A SIMPLE ASSEMBLY LANGUAGE PROGRAM An assembly language program is a sequence of instructions written in mnemonics to perform a specific task. These instructions are selected from the instruction set of the microprocessor being used. To write a program, we need to divide a given problem into small […]
Continue reading…
6.2 OVERVIEW: Z80 INSTRUCTION SET
6.2 OVERVIEW: Z80 INSTRUCTION SET The instruction set of a microprocessor determines the capability of its operations, the power of its data manipulation, and the ease of programming it. Although it is necessary to have an overall view of the instruction set, our intent here is merely to acquaint you with the overall operations and […]
Continue reading…
6.1 THE Z80 PROGRAMMING MODEL
6.1 THE Z80 PROGRAMMING MODEL In Chapter 2, we developed a model to represent the internal structure of the MPU shown in Figure 2.3. We will now describe a similar model of the Z80 microprocessor; however, we will include only those components necessary for the programmer. Figure 6.1 shows such a model, which includes an […]
Continue reading…
Introduction to Z80 Assembly Language Programming
Introduction to Z80 Assembly Language Programming An assembly language program is a set of instructions, written in the mnemonics of a given microprocessor, and in a sequence appropriate to a specified task. To write such programs, we should be familiar with the programming model (internal registers) of the microprocessor and its instruction set. This chapter […]
Continue reading…