0% found this document useful (0 votes)
24 views

Microprocessor &amp Micro Controller Expt No.5

This document describes an experiment to subtract 40H from 37H using the SUB instruction on an 8085 microprocessor. It involves loading the hex values 37H into the accumulator and 40H into the register C, then using the SUB instruction to subtract the contents of register C from the accumulator. The result is observed to be F7 in the accumulator and flags set accordingly in the flag register.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Microprocessor &amp Micro Controller Expt No.5

This document describes an experiment to subtract 40H from 37H using the SUB instruction on an 8085 microprocessor. It involves loading the hex values 37H into the accumulator and 40H into the register C, then using the SUB instruction to subtract the contents of register C from the accumulator. The result is observed to be F7 in the accumulator and flags set accordingly in the flag register.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

EXPERIMENT No. 5 1.

0 TITLE :
To write a program to subtract 40H from 37H using SUB instruction.

2.0 PRIOR CONCEPTS:


8085 Architecture & Instruction Set

3.0 NEW CONCEPTS:


1. Entering a hex number in the accumulator. 2. Entering a hex number in one of the registers. 3. Subtracting the contents of the register from the contents of the accumulator.

4.0 LEARNING OBJECTIVES:


1. To enter a hex number in the accumulator. 2. To enter a hex number in register C , for example.
3. To subtract the contents of register C from the contents of the accumulator

5.0 APPARATUS:
8085 Microprocessor Kit.
6.0

PROCEDURE & OBSERVATION TABLE :


Memory location 7000 7001 7002 7003 7004 7005 Hex code 3E 37 OE 40 99 CF SUB C RST 1 MVI C , 40 H Instruction MVI A , 37 H

The contents of the various registers including flag register will be : A= F7 E=00

B= 00 C= 00 D= 00 Flag Register F :

F=B1 H=00 L=00

D7 S 1

D6 Z 0

D5 X 1

D4 AC 1

D3 X 0

D2 P 0

D1 X 0

D0 CY 1

You might also like