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

Microprocessor Lab

This document describes experiments performed on a microprocessor lab to add and subtract hexadecimal numbers. It provides the assembly language instructions used to add and subtract numbers in registers and store the results in memory locations. Notes are included to explain how multi-byte results are stored.

Uploaded by

VarunKant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Microprocessor Lab

This document describes experiments performed on a microprocessor lab to add and subtract hexadecimal numbers. It provides the assembly language instructions used to add and subtract numbers in registers and store the results in memory locations. Notes are included to explain how multi-byte results are stored.

Uploaded by

VarunKant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Microprocesso

r Lab File
Submitted to Submitted by:

Prof. Amita Kumari Raghav Gautam

SID: 16104100

GROUP: EE4

1|Page
EXPERIMENT 1
AIM: To perform addition of 2 hexadecimal
numbers in 8086 microprocessor

 Press Reset button on the microprocessor, press Enter key and press A on
the keyboard.

ADDITION OF NUMBERS CODING

 A 0000:0400. Press Enter key


 MOV AL, C0. Press Enter key
 MOV BL, 05. Press Enter key
 ADD AL,BL. Press Enter key
 MOV[2000],AL. Press Enter key
 HLT. Press Enter key
 Press Reset button and G on the keyboard.
 G 0000:0400
 To see the result press Reset button and D on keyboard.
 D 0000:2000
 Result: C5
 Press Reset button on the microprocessor, press Enter key and press A on
the keyboard.

ADDITION OF NUMBERS CODING

2|Page
 A 0000:0400. Press Enter key
 MOV AX, EE00. Press Enter key
 MOV BX, 0055. Press Enter key
 ADD AX,BX. Press Enter key
 MOV [2000], AX. Press Enter key
 HLT. Press Enter key
 Press Reset button and G on the keyboard.
 G 0000:0400
 To see the result press Reset button and D on keyboard.
 D 0000:2000
 Result: EE55

Note: Sum comes as 55EE IN case (ii) because [2000] address is 8 bit only
therefore EE is stored at location [2001].

EXPERIMENT 2

3|Page
AIM: To perform subtraction of 2 hexadecimal
numbers in 8086 microprocessor

 Press Reset button on the microprocessor, press Enter key and press A on
the keyboard.

SUBTRACTION OF NUMBERS CODING

 A 0000:0400. Press Enter key


 MOV AL,AB. Press Enter key
 MOV BL, 11. Press Enter key
 SUB AL,BL. Press Enter key
 MOV[2000],AL. Press Enter key
 HLT. Press Enter key
 Press Reset button and G on the keyboard.
 G 0000:0400
 To see the result press Reset button and D on keyboard.
 D 0000:2000
 Result: 9A
 Press Reset button on the microprocessor, press Enter key and press A on
the keyboard.

SUBTRACTION OF NUMBERS CODING

 A 0000:0400. Press Enter key


 MOV AX, ABCD. Press Enter key
 MOV BX, 1111. Press Enter key
 SUB AX,BX. Press Enter key
4|Page
 MOV[2000],AL. Press Enter key
 HLT. Press Enter key
 Press Reset button and G on the keyboard.
 G 0000:0400
 To see the result press Reset button and D on keyboard.
 D 0000:2000
 Result: 9ABC

Note: Difference comes as BC9A in case (ii) because [2000] address is 8-bit
therefore 9A is stored in location [2001].

5|Page

You might also like