You are on page 1of 2

PCO0165 – Introduction to Computer Architecture and Operating System

Assignment 2: Assembly Language Programming in 8085 Microprocessor


Due date: 07/12/2023 (Thursday)
 Write your answers in this file.
 Save this file as yourid_yourname_assignment2.docx.
 Submit this file to MMLS.

Student Name : ______________________


Student ID : ______________________
Section : _________ T3A_________

Part A: Write an assembly language program based on the following steps. Write them as
one complete program. Provide a screenshot of your 8085 simulator.
(10 marks)

1. Assign value 1012H into register BC.


2. Load a number 38H into register A.
3. Store the content of register A into memory location pointed by register pair BC.
4. Decrement the register A by 1.
5. Assign value 1013H to register pair DE.
6. Store the content of register A into memory location pointed by register pair DE.
7. Assign value 1014H to register pair HL.
8. Store the content of register A to location pointed by register pair HL.
9. Decrement the memory content pointed by register pair HL by 1.
10. Load the content of memory pointed by pair BC.
11. Store the content of register A to memory content 1015H.
12. Terminate the program.

Answer:
Part B: Write an assembly language program to rearrange the contents of memory to the
new locations as shown in the result. Write them as one complete program. Provide a
screenshot of your 8085 simulator.
(10 marks)

1. Set the memory locations with the following numbers:


(6052H) = 24H
(6053H) = 23H
(6054H) = 22H
(6055H) = 21H
2. Reset all registers (A, B, C, D, E, H, L) with number 00H.
3. Rearrange the numbers stored in the memory locations so that the result is shown as
below:
(6052H) = 22H
(6053H) = 21H
(6054H) = 23H
(6055H) = 24H
4. Terminate the program.

Answer:

You might also like