The 8085A contains a set of six general-purpose 8bit registers: B, C, D, E, H and L. These registers are called general purpose because they can be used in any manner by the person programming the microprocessor. The general-purpose registers hold numeric data, BDC data, ASCII data, or any other type of information required. They are flexible enough to be used as six 8-bit registers or as theree 16-bit register pairs.
The legitimate register pairs are
BC, DE, and HL. Register pairs hold 16-bit numeric data or any other 16-bit
coded information. Besides holding 16 bits of data, register pairs also
address memory data. A memory address, placed into a register pair, allows
the contents of the location address by the register pair to be manipulated.
This last function makes a register pair an importand part of the programming
model. Register pair memory addressing is called indirect addressing.
UP
The special-purpose registers (A, F, SP, and PC) accumulate results from arithmetic and logic operations and provide house keeping for the microprocessor. The term "housekeeping" refers to tasks and to registers required for normal operation of the programmer, making them transparent to the programmer. Housekeeping registers are not normally programmed with an instruction, they are used by the microprocessor.
The accumulator
register (A).
All microprocessors contain an
accumulator register that accumulates results. The accumulator is a very
important register in the 8085A microprocessor. The accumulator resigter
accumulates the answer after almost every arithmetic and all logic operations.
The flag register
(F).
The flag register contains 5 bits
used as flags or indicators for the ALU. The flags change whenever the
8085A executes most arithmetic and all logic instructions. the results,
reflected by the flags bits, indicate the condition of the answer provided
by the ALU. The flag register connects to the ALU. The 5 flag bits include
:
1.
The sign bit (S) shows whether the result of an arithmetic or logic operation is positive or negative. A logic 1 indicates a negative result, while a logic 0 indicates a positive result. The S-flag bit is identical to the leftmost bit position of the result, because this bit is considered the sign of the result. |
The zero flag bit (Z) shows whether the aftermath of an ALU operation is zero or not zero. A logic 1 indicates a zero result and a logic 0 indicates a non-zero result. Note that a logic 1 in this bit shows a zero result, which may be confusing. |
The auxiliary carry flag bit (AC) holds any carry that occurs between tha least significant and most significant half-byte result from the ALU. (This flag is only used by the DAA command.) |
4.
The parity flag bit (P) shows the parity of the result from the ALU. A logic 1 indicates even parity and a logic 0 indicates odd parity. (Parity is a count of the number of 1s in a number expressed as even or odd. |
5.
The carry flag bit (C) holds any carry that occurs out of the most significant bit of the accumulator after an addition. It also holds a borrow after a subtraction. If a logic instruction executes, the carry flag is a logic zero. |
The program counter
(PC).
The program counter does not count
programs. It locates the next instruction executed by the microprocessor.
Why is it called a counter?
Because it counts. It counts up
through the memory, allowing the microprocessor to execute the next sequential
instruction in a program. Programs must be stored in sequential memory
locations beginning at a lower address and progressing toward higher addresses.
The Stack Pointer
(SP).
The stack pointer allows the 8085A
to track its last-in, first-out (LIFO) stack. The stack processes data
so that the first data into the stack are the last data out of the stack.
For example, if a 2, 3, 4 are placed on the stack, they come off the stack
in reverse order, as a 4, 3, and 2.
UP