Lab Assignment 1

You might also like

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

University of Okara

Course Title: Microprocessor and Assembly Language


Instructor: Ifrah Pervaz
Semester: 3rd (M,E(A,B))

Instruction:
 Individual Assignment
Lab Assignment 1

1. Write a program to read one character of the Hexa-digit (A-F) and display it in decimal
on next line.
 Example
Enter A hex Digit: A
In decimal it is: 10
2. Write a program that stores the hex numbers 20, 30, 40, and 50 in the memory and
transfers them to AL, AH, BL, and BH registers. Verify the program using Emulator;
specially identify the memory location where the data is stored.

3. Write a program to (a) display a "?", (b) read two decimal digits, (c) display them and
their sum on the next line, with an appropriate message.

Sample execution:
?27
The sum of 7 and 2 is 9

You might also like