8085 Micro Processor Architecture Explanation-Easy-Lang&Full-Detail

Shivam Rai
12 min readMay 29, 2020

Hi Guys, I am Shivam Rai an Ethical Hacker, Today I will explain to you the introduction part of Microprocessor as well as 8085 Architecture.

I know you would be thinking about why I should read about the Microprocessor.?

What’s the use of learning Microprocessor’s

Its the foundation principles, around which modern x86 based processors are architectured.

You want to learn 0’s and 1’s, and hack on some assembly level code, for optimizing critical sections of your program. You can easily extend your knowledge of writing assembly code, for the x86 assembly language thereafter.

You want to understand how a machine interprets instructions at low level.

You want to learn how `loops`, that we use in higher level languages is implemented. (the jmp instructions)

In everyday life, we use Micro Processor in one another way. In Programming which you have written or you will be writing in future it will be executed by a microprocessor like AC remote is programming involved, Yes because the program is involved which takes input which keys are pressed then send the appropriates data through serial wireless communication. the condition receives the data, understands it in which buttons are pressed, and then take the appropriate action to do. so both AC remote and Conditioner required microprocessor to send and understand what’s going on. Billion of Billions are the Examples Present Like the Traffic Light. look at the science the program behind it. It’s simple programming which shows red, green, yellow in a particular time, seconds, and Washing Machine is a great example !.

The commercially successful processor was 8085 developed by INTEL. Before that, there were various attempts like 8080 it does not have stable voltage so it turned to 8085. 8085 was not too much powerful processor it was just beginning by intel. 8086 was the Remarkable Processor which change the planet in the way in 8086 both IBM and Intel designed this awesome processor and also developed the first IBM PC then it took off ! then big companies like Apple, Microsoft, Google Came into Picture and Designed the More Powerful OS and Microprocessor.

You Might be thinking the way to start from 8085 why can’t i7,i9,i10 latest processor. Remember You can’t learn poetry until your grammar is strong. because if your basics are cleared then you will catch up very fast!

By Reading you will have the full knowledge about the microprocessor at the beginning you will find very basic, yes but the level will be increased ;)

You will be reading this article on your Computer, I pad, Phone, etc. so think the computer has many objects like keyboard, Monitor, Printer. well, do you think the keyboard is required? well yes to give inputs to the number, like that monitor is used for the output for our request. and the Microprocessor is Inside the CPU(Central Processing Unit) on the motherboard is allocated. So Let’s Understand the Computer through a simple diagram first.

As you can see I/O is simply Input/output purpose. it’s not doing any processing. there is a big section in our PC where the Instruction and Data are Stored is Called Memory. Memory Can not do any processing please remember. it will just store the programs(a set of instructions) and data. e.g. the WhatsApp application is a program in your phone, the message you send is the data, the song player. Memory is of many types like Cache Memory, Hard Drive, ROM, RAM, etc.

We will only talk about RAM and ROM in 8085 Processor Please be clear when I will be talking about Memory in other Sections.

RAM >> RAM stands for Random Access Memory. It is also called temporary memory coz as you switch off the computer the data will be gone or erased. There are two types of RAM, Static RAM, and Dynamic Ram. and Static Ram is must faster than DRAM because it takes time to charge and discharge. SRAM stores the data in flip flops where DRAM stores the Data in Capacitors.

ROM >> ROM stands for reading Only Memory. It is also called Permanent memory. used for reading/write operations. the content will be permanent there. nothing will be lost from ROM.ROM is used for few purposes like BIOS.

So Memory does what ? it stores the program and data. but how’s the data look like and how it’s stored. number, text, images are data but it’s stored? well if you are thinking about how to store images, songs. You are Wrong !! A song is never stored as the song, a Image is never stored as the Image. Everything is stored in the form of millions and billions of 0’s and 1’s. Everything is Stored in the form of 0’s and 1’s. Images on your phone which you see in your daily life are stored in the form of 0’s and 1’s in your Phone Memory. if you want to know how to store anything first know how to store a bit. then you will automatically master it!

Let’s Come back to our block-diagram. as you can see three objects are there: Processor, Memory, I/O. and Processor Links both Memory and I/O. Processor Controls Memory and I/O both. the main work of the Processor to Execute the Programs. What is the Program? The program is simply a set of instructions stored in memory.

E.g. Adding Two Numbers

Now Suppose your Program is stored in Memory and Ready to execute.

1>> Instructions are stored in memory. so Processor will take the instruction Inside. so this Process is called fetching. the first job of the processor is to do fetching the instruction from the memory.

2>> the next job of the processor is to do decoding the instruction. so what is decoding guys? People think decoding is converting the instruction to 0’s and 1’s. this is wrong !!!. the instructions are already in 0’s and 1’s. See guys decoding simply means understanding 0’s and 1’s which is in binary form also called opcode(machine language) and every instruction has its own opcode.

Decoding Simply Means Understanding the Opcodes.

3. and after Fetching and Decoding the final process will come into action which is Execution.

Note : The Whole Process : Fetching, Decoding & Execution is Called Instruction Cycle.

To Learn More First Make You Concept Clear of Binary Hexadecimal. because we mostly use hexadecimal numbers in these processor’s. I think you know the trick of (8 4 2 1 ) ;). Some Basic things you should know.

1Byte=8 Bits

1 Nibble = 4 Bits

1 Kb = 1024 bytes.

8Bits=00H to FFH

16bits=0000H to FFFFH also called a Word.

1 Opcode = 2hex Char.

2⁴⁰= 1 tb (Learn the power of 2’s very interesting )

Link : https://www.mathsisfun.com/binary-decimal-hexadecimal.html

So let’s come back to the Diagram. So till now you understood that what Memory’s Do, What is function of I/O & Processor. So How they communicate have you ever thought!. Can you see the Arrows Diagram which are attached to Memory and I/o through Processors. they are called buses >> knows as set of lines. you have seen everywhere almost take the example of Pen Drive(USB). the buses (which are set of lines) are clearly visible. see my hp v32 pen drive you can see the buses clearly.

Buses are used for transfer the information. like the instruction comes from memory to processors are due to the buses they required a medium of travel which is bus. 0’s and 1’s are transferred through buses.

Buses are of three types :

  1. Address Bus > An address bus is a computer bus architecture. It is used to transfer data between devices. but you will be thinking how they are identified. please note that they are identified by hardware address of the physical memory (the physical address).

The address is stored in the form of binary numbers to enable the data bus to access memory storage .Address bus can be 8 bit 16 bit, 24 bit etc. the job of address bus is to identify the location of the instruction. e.g. 4000 is the address location for instruction 25. so first Address bus identifies the location.

2. Data Bus > Data bus is used to put the data into the location. Now through diagram you can see it will carry 35 through data bus. You can also say is a group of electrical wires used to send information (data) between two or more components.

3. Control Bus > Control bus will control the operation whether it will do read operation/write operation. there are many control signals. but read/write signals are for most important. so when the processor get’s the data read operation comes into action. when the processor sends the data write operations comes into action.

Now Our Concepts is cleared for Micro Processor, and Computer Architecture.

Let’s Moveee toooooo >>>>>>>>> 8085 Architecture

8085 Micro Processor Architecture

Uff the Giant Architecture now finally came :) . Don’t worry Guys it is very simple. just read my writ up from starting to end everything you will understand in this above architecture of 8085 Micro Processor.

So what’s the use of Micro processor. they simply means to execute the programs(a set of instruction stored in memory).

Let’s first study about the Register. registers are stored in the processor. register is used to store the numbers. if 8 bit register is there then 8 flip flops are there. take the example if you want to add two numbers 02 and 07 so to add two numbers they need some place to store. so here’s the register come into action.

There are total 7 ,8-bit GPR’s(General Purpose Registers). GPR’s they are usually reserved for programmers. register are type of hardware we can’t create it. Register are little bit like Variables but they are not exact same guys. variables can be created as much you want. but register are available in fixed amount to function.

Note : B,C,D,E,H,L,A in the Diagram are General Purpose Register basically used by programmers. there are Special purpose register which is used for special purpose like PC(Program Counter),IR(Instruction Register),ID(Instruction Decoder)

Address bus are of 16-bit & Data bus are of 8-bit.

why PC are of 16-bit. they are of 16 bit because the address stored in the memory are of 16 bit.

We will open the diagram from PC(Program Counter) as you can see clearly in the diagram.

Suppose a instruction has been executed by the processor. then next it need another address to carry out the instruction. so PC has the next address reserved which are of 16 bit. Now the address will move out from the PC(Program Counter) through the address bus.

Pleas Note when the address which will move from the PC will split into two 8 bit-address(A0-A7 and next A8-A15) you can see in the diagram. Address are of 16 bits which means they are in 16 lines basically and those 16 lines are from A0-A15 which splits when the address move from the PC(Program Counter).

Now we have total 16 bit address in our hand which will move into memory. please refer my first diagram of this write up. Now it will move to the memory through address bus.Now we will ask the instruction from the memory for that particular address through read signal. Now carefully note instruction will come out from memory through which ? data bus right !. and you know data bus are of 8-bit and no will be D0-D7. Now I hope you understood (AD7-AD0).

Now the Instruction will move from 8-bit internal data bus. and note that through internal bus data can also come and instruction can also come. the processor know what he is taking :). and if data was coming then it will move into Data Register. but now the instruction are coming so it will come from internal bus and stored into IR(Instruction Register.). and Fetching Process Finished !!..

Now Decoding will happen. so IR will move into ID(Instruction Decoder). Now you know decoding means analysis of opcode what he has to do with that opcodes. Now Decoding Finished.

Now Decoded Information will move to Timing and Control Circuit. and execution will happen in that part.

So Guys what is finished Program or Instruction ? Instruction Got Finished. So now the processor again need the address. and address will be given by PC(program Counter).

Note: During Execution of Instruction the PC got incremented that’s why it has the next address of the Instruction. Increment Happens side by side. now you understood INR(Incrementer.)DCR will come later guys.

Now see in the Diagram and you are detailed familiar with PC, INR/DCR,IR and ID. Let’s Go Ahead.

Timing and Control Circuit releases the control signals which will go to all architecture to tell them what to do. like PC which is used to take address of that instruction, to do stack related options etc.

Timing and Control signal are like our brain. which will tell them to do their respective job. if add operation is there then it will tell ALU to add the number, if stack operation is there then it will tell to do Stack Operation. Most of operation happen on ALU.

Now you might be thinking why A register is on left side and other 6 register are on right side. Hmmm means something special is there on A register. It is the most important register in 8085.

as you know ALU needs two operands. so one operand is take place in A register. no matter the next operand you place into B,H, L register. In 8085 it is fixed that one operand will be reserved in A register.

example : take 2 numbers to add let’s take 05 and 07.then 05 will reserved in A register and 07 you can store in any register. and also the result will stored in A after ALU operation. let’s relate with architecture

As you can see two operand are attached to ALU. one is A register which means one operand will only come from A register. and other will come from any register. let’s take other number you stored in H register then it will move from there and come from internal bus and will stored into temp register. as you value can’t be moved only on bus they need some place to store. so they stored in temporary register. and other A(Accumulator) register is fixed for one operand.Now ALU operation will take place and result will again stored in A register.

Now I think you are familiar with architecture. but one thing is left which is Flag Register.

Flag Register >> will tell the status of the result which is stored in A register.

there are many types of flag register.

  1. Carry Flag >> which will tell us carry was happened in the ALU operation.if yes then CF value will be 1 otherwise 0.
  2. Sign Flag >> sign flag is used to check the whether the result got is positive or negative. If positive then SF value is 1 otherwise value 0.
  3. Zero Flag (Z) — After any arithmetical or logical operation if the result is 0 (00)H, the zero flag becomes set i.e. 1, otherwise it becomes reset i.e. 0.

Please note that B,C,D,E,H,L can also be used in pair. like HL in which H is called Higher Byte and L is called Lower Byte.

Now everything is cleared I think in the Architecture. but wait SP is left which is Stack Pointer.

So What is Stack ?

Stacks are stored in the memory like data and Instructions.So Stack is a Set of Elements which is used to store the Data. and the Data are Stored in the Structured way that's why they are too used and fast.

Stack do Push and Pop Operation.When items are added they are done through Push Operation. when they are removed pop operation is there.So in one way they follow LIFO(Last In First Out).

and For Stack we only need to know one address which is SP(stack Pointer). and other address can be easily traced if you know the address of SP.

So SP is simply the TOP address of top of Stacks.

Example : When you were reading my blog. many messages were coming so form where will you look from the top you will see the messages.So the Structure of the Message is in the form of Stack !!!..

Now You are most familiar with the Structure and now you can move into depth of each structure.

Thank You ! For You Precious Time Guys !!!!. If you have any question contact me on this Email Id : shivamrai242003@gmail.com

Byeeee !

--

--

Shivam Rai

Ethical Hacker | WebAppSec | Google Code-in 2019 Runner Up | Bug bounty Hunter | SCNS(Security Certified Network Specialist) | 15 CVE + | HTB #720 Rank