ARITHMETIC OPERATIONS

ARITHMETIC OPERATIONS The Z80 microprocessor performs various arithmetic operations such as addition, subtraction, increment/decrement, and I’s and 2’s complement. Most of these op­erations are concerned, with 8-bit operands. The instruction set also includes some 16-bit operations that will be discussed in later chapters. (See Appendix A for a complete alphabetical listing of the Z80 instruction […]
Continue reading…

 

DATA COPY (LOAD) OPERATIONS

DATA COPY (LOAD) OPERATIONS In this section, we focus on three types of data copy operations: data copy related to microprocessor registers, memory, and I/Os. Instructions frequently used are illustrated below, and the Z80 block transfer instruction will be discussed later in the chapter. In addition, one machine control instructionــــHALTــــis introduced; this instruction is necessary […]
Continue reading…

 

Introduction to Z80 Instructions and Programming Techniques

Introduction to Z80 Instructions and Programming Techniques     When a microcomputer is asked to execute a program stored in its memory, it reads one in­struction at a time and performs the task spec­ified by the instruction. Each instruction in the program is a command, in binary, to the micro­processor to perform an operation. In […]
Continue reading…

 

Summary of Moving Data

Summary The opcodes that move data between locations within the 8051 and between the 8051 and external memory have been discussed. The general form and results of these instructions are as follows. Instruction Type Result MOV destination, source Copy data from the internal RAM source address to the internal RAM destination address MOVC A, source […]
Continue reading…

 

Example Programs

Example Programs Programming is at once a skill and an art. Just as anyone may learn to play a musical instrument after sufficient instruction and practice. so may anyone learn to program a computer. Some individuals. however. have a gift for programming that sets them apart from their peers with the same level of experience. […]
Continue reading…

 

Data Exchanges

Data Exchanges MOV, PUSH, and POP opcodes all involve copying the data found in the source address to the destination address; the original data in the source is not changed. Exchange instruc­tions actually move data in two directions: from source to destination and from destination to source. All addressing modes except immediate may be used […]
Continue reading…