Assembly Language Program With 8085 Microprocessor
Assembly Language Program With 8085 Microprocessor
Assembly Language Program With 8085 Microprocessor
Program Counter
Temporary register
• It is an 8-bit register, which holds the temporary data of arithmetic and logical operations.
Sign flag (S)-Sign flag is set, if the result of the operation of the instruction is negative, otherwise
it is reset for the positive result
Zero flag (Z)-The zero flag is set if the result of the operation of the instruction is zero otherwise
this flag is reset.
Carry flag (CY)-The carry flag is set to 1, if there exist a carry (or borrow) to the
highest order bit If there is no carry (or borrow) to the higher order bit, the carry
flag is reset.
Parity flag (P) -If the result has even number of 1s, then parity bit is set. If the result
has odd number of 1s, the parity flag is reset.
Data Transfer Group used to transfer data from one register to another MOV,MVI,LXI,LDA,STA
register, from memory to register or register to
memory
Arithmetic Group perform arithmetic operations such as addition, ADD,SUB,INR,DCR
subtraction; increment or decrement of the
content of a register or memory.
Branch Control Group includes the instructions for conditional and JMP,JC,JZ,CALL
unconditional jump, subroutine call and return,
and restart.
I/O and Machine Control includes the instructions for input/output ports, IN,OUT,PUSH,POP,HLT
Group stack and machine control.
Addition of two 8 bit numbers
Code Description
MVI C,00 Initialize the register ‘C’ as ‘Zero’
LDA 4000 Load the 8 bit data in memory location 4000H to the
accumulator
MOV B,A Transfer the contents of accumulator into the register ‘B’
LDA 4001 Load the 8 bit data in memory location 4001H to the
accumulator
MOV B,A Move the contents of accumulator into the register ‘B’
LDA 4001 Load the 8 bit data in memory location 4001H to the accumulator
LDA 4001 Load the 8 bit data in memory location 4001H to the accumulator
MOV D,A Move the contents of accumulator into the register ‘D’
JNz LOOP Jump on loop until value of the register ‘B’ becomes zero
MOV B,A Copy the contents of accumulator into the register ‘B’
LDA 4001 Load the 8 bit data in memory location 4001H to the accumulator
NEXT: CMP B Compare value in accumulator with the value in register ‘B’
JC LOOP Jump if divider is greater than dividend
SUB B Subtract the dividend value by divider value
INR C increment the register “c” by 1
JMP NEXT Jump to step 6, till the dividend becomes zero
LOOP: STA 4002 Store the result in accumulator to memory location 4002H
• Now a days microprocessors are being used for Monitoring, controlling and many
other sort of purposes in following systems in electrical engineering field
• Voltage Control
• Automatic Switching Sequence
• Automatic reclosing
• generator sequence control
• generator efficiency monitoring
• revenue metering collection
• alarm logging
• fault level monitoring.
• To utilities such as power, Oil & Gas, water and waste management
• saturation curves
• over excitation
• gas content
• partial discharges
• insulation damages.
Types of embedded systems used in engineering field
Embedded systems Description Example
general purpose designer only needs to program the 8085,8086, AMD64, Intel 64
processor processor’s memory to carry out the
required functionality
single purpose processor designed to execute exactly one program 7400 series,4000 series.
application specific designed for a particular class of Texas Instruments C6000 series,
instruction-set applications with common Freescale MSC81xx, XMOS
processor (ASIP) characteristics
Programmable Logic inputs from switches and sensors, SIMENS, Allen-Bradley, ABB
Controller (PLC) evaluating these based on a program MITSUBISHI,HITACHI
(logic) and changing the state of outputs
to control a machine or process
Microcontroller Microcontroller is like a mini computer Atmega8, 16, 32, Arduino
with a CPU along with RAM, ROM, serial Community, PIC
ports, timers, and IO peripherals all
embedded on a single chip
Thank you