Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Experiment 8: Masking of an 8-bit Number.

Student Name: Yash Gautam UID: 20BCS7550


Branch: CSE Section/Group: 718 B
Semester: 4th Date of Performance:08/04/2022
Subject Name: MPI Lab Subject Code:20CSP-153

1. Aim/Overview of the practical: Write two programs to mask lower and higher nibble of
an 8-bit number.

2. Task to be done: We have to write two programs to mask lower and higher nibble of an
8-bit number.

3. Apparatus/Simulator used (For applied/experimental sciences/materials based labs):


 Jubin 8085 Simulator
 Java Language
 JDK
4. Algorithm/Flowchart (For programming based labs):
A. Masking of Lower Nibble:

 Begin.
 Load the 8-bit number in accumulator.
 Perform the AND operation of Accumulator with F0H.
 Store the value of A using STA command.
 Halt the program.

B. Masking of Higher Nibble:


 Begin.
 Load the 8-bit number in accumulator.
 Perform the AND operation of Accumulator with 0FH.
 Store the value of A using STA command.
 Halt the program.
5. Description/ Code:
 Masking of Lower Nibble:

#BEGIN 000H

LDA 1000H
ANI F0H
STA 1001H
HLT

#ORG 1000H
#DB 65H

 Masking of Higher Nibble:

#BEGIN 000H

LDA 1000H
ANI 0FH
STA 1001H
HLT

#ORG 1000H
#DB 65H

6. Result/Output/Writing Summary:

 Masking of Lower Nibble:


 Masking of Higher Nibble:
Learning outcomes (What I have learnt):

1. Learnt ANI command.

2. Learnt LDA and STA commands.


3. Learnt how to mask lower nibble of an 8-bit number.

4. Learnt how to mask higher nibble of an 8-bit number.

5. Learnt basic programming in Jubin Simulator.


Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):

Sr. No. Parameters Marks Obtained Maximum Marks


1.
2.
3.

You might also like