Microprocessor 8085 Programming
Microprocessor 8085 Programming
KAPOOR
Programming the 8085→ It is the process of developing a program. A program is a sequence
of instructions operating on certain data items. There are many
possible languages in which program is written but a µ p can understand only instructions
written in binary i.e. 0’s & 1’s. A program written using only 0 & 1 is called machine language
program. Writing machine language program is quiet troublesome and leads to error.
The program can also be written using mnemonic operation codes & symbolic address for
writing instructions & the data using different notations i.e. binary, decimal hexadecimal etc.
This is called assembly language. Program written in assembly language has to be translated
into a machine language. A translator, which translates an assembly language program into a
machine language program is known as assembler.
High Level Languages → Programming Languages that are machine- independent are called
HLL. e.g. FORTRAN -- ( Formula Translation) It is a language that is designed for scientists &
engineers.
COBOL -- Common Business Oriented Language.
BASIC --- Beginner’s All-purpose symbolic instruction Code -- for non- professional programs to
learn & use.
PASCAL -- it is designed to encourage the programmer to adhere to correct programming
practices C & C++ .
These programs which are written in English are converted into binary language using program
called a compiler or interpreter.
Flow Chart→ The steps necessary to write program can be represented in a pictorial format
called a “ flow chart.” Flow charts use graphic symbols ( shapes) to represent different types of
program operations. The specific operation desired is written in the graphic symbols. The
common flow chart symbols are, It shows direction of program execution.
process
Subroutines
Decision
Continuation
The algorithm represented by flow chart is coded into assembly language and then mnemonics
for different steps are written & program is translated into machine language i.e. machine code
is written for each instruction. Each code is then has to be stored in memory location.
( R/W memory ) Thus program has five columns memory add Machine code, opcode, operand
& Comments.
(1) Memory Address→ These are 2 byte R/W users memory in systems where machine code
of program is stored. The beginning address is generally xyoo, Where xy represent page no. of
available R/W memory in µ p & 00 represents line no.
(2) Machine Code→ These are hexadecimal instruction codes that are stored in respective
memory addresses through hexadecimal keyboard of µ p. The monitor program which is stored
in ROM of µ p translates hexadecimal number into binary digits & stores binary digits in the R/W
memory.
(3) Op Code→ It indicates type of operation or function that will be performed by machine code.
(4) Operand→ It specifies the item to be processed. It can be 8 or 16 bit data, a register or a
memory address. Thus a mnemonic instruction is combination of an opcode and operand.
(5) Comment→ It explains the purpose of instruction used. They play a critical role in users
understanding of the logic behind the program.
To enter & execute the program→
1. Push reset key.
2. Enter 16.bit memory address of 1st machine code of programme.
3. Enter and store all the machine codes sequentially using hexadeciml key board on system.
4. Reset the system.
5. Enter memory address where the programme begins and push execute key.
T.Y.EII Microprocessor-IV N.KAPOOR
After executing the programme answer can be found in accumulator by pushing “Examine
register key”.
Program→ Add the two numbers stored in 2100 & 2101 and store the result at 2102.
START
|
HL 2100
HL → A
HL → HL+1
A A+ HL
Store A→2102
END
STOP