A microprocessor is a multipurpose, programmable, semiconductor device consisting of electronic and logical circuits which accepts the input,fetches,decodes and executes the instructions and processes the data according to that instruction.
Programming in Microprocessor 8085:
- Microprocessor can only understand the language of 0's and 1's vaguely known as machine level language.
Let's take an example of instruction in microprocessor 8085:
01001111 - It is an instruction which copies the content of one internal register to another.
A 8085 microprocessor program to add two numbers:
00111110 ;copies value 02H in register A
00000010 ; value 02H
00000110 ;copies value 04H in register B
00000100 ; value 04H
10000000 ; A= A+B
Note: 02H is hexadecimal representation of 00000010.
A= A+B is also an instruction.
There are 246 instruction sets in 8085 and to perform more fun and complex programs it might be tiring...
To make this easier to the users, 8085 embraces the assembly level language which uses mnemonics (short hand form of instructions) instead of machine level language.
Examples:
- MOV :indicates data transfer
- ADD :to add two values
- SUB :to subtract two values
MVI A,02H ;copies the value 02H in the register A
MVI B, 04H ; copies the value 04H in register B
ADD B ; A = A+B
In this way we successfully add two numbers 02H and 04H and store it to register A.
Stop again!! But does 8085 understands Assembly level language too?
No, not at all. No, microprocessor can understand languages other than machine level language.
To, make microprocessor understand Assembly level language we use Assembler. Assembler converts assembly level language to processor's native machine level code i.e 0's and 1's.
This is an architecture of microprocessor 8085:
To, learn more about registers, flags and more follow the next blog:
No comments:
Post a Comment