Capital University of Science and Technology
Department of Computer Science
CS 2523: Computer Organization and Assembly Language (3): Spring 2021
Assignment 5: Illegal Instructions in Assembly Language, Logical to Physical Address Calculation
CLO 1 Define concepts in the design of microprocessor as state machine and designing its data path and its
controller.
CLO 3 Implement assembly programs of intermediate complexity using the intel 8088 architecture. The student
should also be able to convert intermediate complexity program in high level language into assembly code.
Maximum Marks: 10 Instructor: Ms. Tayyaba Zaheer
Announcement Date: 07th June 2021 Due Date: 17th June 2021 till 02:15 PM via MicrosoftTeams
Guidelines:
You are required to submit the assignment file (word or pdf) as
courseCode_studentReg#_studenName via MicrosoftTeams (\Assignments\COAL-
CS2523(1)\Assignment 5).
Important Note:
Must not copy from other students, so do it all yourself.
Assignment should be hand written. Then take pictures of your solution, after that paste
pictures in word document and then submit word or pdf file.
Tools/Software Requirement (Optional):
1. Microsoft Word.
2. emu8086.
Important Note:
1) Must not copy from other students, so do it all yourself.
Description:
Emu8086 is an 8086-microprocessor emulator and disassembler. Emu8086 permits to assemble,
emulate and debug 8086 programs (16bit/DOS).
Tasks: [Hint: you can take help from lectures]
Task#1: Logical to Physical Address Calculation: (06
marks)
Question: Calculate the physical memory address generated by the following segment offset pairs (both
are hexadecimal values).
a) 0010:0000
16-bit Segment Address: 0010
16-bit Offset Address: 0000
Solution:
b) 5432:FFFF
16-bit Segment Address: 5432
16-bit Offset Address: FFFF
Solution:
c) FEFF:4241
16-bit Segment Address: FEFF
Page 1 of 2
16-bit Offset Address: 4241
Solution:
Task#2: Illegal Instructions in Assembly Language: (04
marks)
Question: Identify the problems in the following instructions and correct them by replacing them with
one or two instruction having the same effect.
i. mov [05], [ 24]
Solution:
ii. mov bx, al
Solution:
iii. mov ax, [si+di+100]
Solution:
iv. mov bx,[bs+bp+200]
Solution:
Page 2 of 2