8085 microprocessor was initially designed by Intel in 1977 using NMOS technology.
So, as it can be seen in this diagram, there are various functional units in its architecture. Let’s look at their functionality one by one:
ALU( Arithmetic and Logical Unit):
It includes; the accumulator, the temporary register, arithmetic circuits, and the five flags. It performs arithmetical and logical operations.
Accumulator: It’s an 8-bit programmable register. All arithmetic and logical operations are performed with the contents of the accumulator and the results are stored in the accumulator itself.
Arithmetic and Logical Unit: Here, numerical and logical operations are performed. It uses data from the accumulator and from memory to perform these operations. AND, OR, EXOR, compare, rotate etc. are the logical operations where addition, subtraction, increment, decrement etc. are the arithmetic operations.
Temporary registers: This register is used to hold the data in between of an operation.
Flags: Flags are a kind of indicator in microprocessors. It can be set to a value 0 or 1 according to the operational results.
There are five flags present in the 8085 processor.
All the flags are present in the Flag register or also called Status Register.
This flag register is 8-bit.
Sign Flag(S):
When any signed operation is done, this flag has its utility.
If D7 is set high(1), the number is negative and if it's set low(0) the number is positive.
Zero Flag (Z): This flag is set when the ALU operation results in 0.
Auxiliary Carry Flag(AC): If a carry is generated by the first nibble i.e. by D3 digit, and passed on to the next nibble i.e. to D4 digit, this flag is set high(1).
Parity Flag(P): After the operation, if the resulted byte carries an even number of 1s or even parity, this fag is set high(1).
Carry Flag(CY): If the arithmetic operation results in a carry or borrow, this flag is set high(1).
Register Array:
It can be divided into three subcategories; Temporary registers, General Purpose registers, Special purpose registers.
General Purpose Registers: They are 6 in total in 8085 microprocessors.
B, C, D, E, H, L are all 8-bit in size. Other than this they also form three 16-bit pairs as BC, DE, and HL pairs.
Temporary Registers: They perform internal operations only during the program execution, they hold the data or address temporarily. W and Z are the two temporary registers in 8085 microprocessors.
Special Purpose Registers: PC and SP
Program counter and stack pointer are the two special purpose registers. These two are 16-bit in size.
Program Counter(PC): It is used for sequencing the execution of programmes. It provides the address of the next instruction to be fetched from the memory for execution.
When a byte is fetched, PC is automatically incremented by 1 to point to the next memory location.
Stack Pointer(SP): It provides the top address of the Stack. Stack grows from bottom to top following LIFO structure and the contents of SP keeps decreasing as the stack grows.
Timing and Control Unit:
It acts as the nerve centre of the Microprocessing Unit.
It synchronizes all the microprocessor operations with the CLK.
Instruction Register and Decoder:
These are the part of ALU.
The instruction register stores the opcode of instruction and it is invisible to the user.
Instruction Decoder decodes the instruction and establishes the sequence of events to follow.
Interrupt Control:
It interrupts a process according to the current requirements.
There are hardware interrupts and eight software interrupts.
A microprocessor temporarily halts the execution of the main program and transfers control to the I/O device. After collecting the input data the control is transferred back to the main program.
Hardware interrupts: Below in the figure, Hardware interrupts of 8085 is shown. TRAP is having the highest priority among all hardware interrupts.
Software interrupts: All eight software interrupts are vector interrupts.
The below figure shows the interrupts with their vectored address:
Some other points regarding 8085:
When a CPU is interrupted, it acknowledges the interrupt and branches to a subroutine.
There are 21 pins for the input in the 8085 microprocessor.
The programming of 8085 microprocessors is done in assembly language.
“Assembler” is used for the translation of a program from Assembly Language to Machine Language.
Comments