0% found this document useful (0 votes)
16 views2 pages

cs401 Task 1

This document contains an assignment for a computer architecture and assembly language programming course. It provides the student's ID and asks them to complete 5 tasks related to segment and offset addresses, including calculating physical addresses from the pair, finding minimum and maximum physical addresses, and writing assembly code to store data at given addresses.

Uploaded by

shehzadiiram1998
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)
16 views2 pages

cs401 Task 1

This document contains an assignment for a computer architecture and assembly language programming course. It provides the student's ID and asks them to complete 5 tasks related to segment and offset addresses, including calculating physical addresses from the pair, finding minimum and maximum physical addresses, and writing assembly code to store data at given addresses.

Uploaded by

shehzadiiram1998
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/ 2

"Computer Architecture and Assembly Language Programming"

"CS401"
"Assignment No. 1"
"ID = bc220416370"

Task No - 1:

1 - Find out the physical address from your segment: offset pair?

Solution:

Physical Address = Segment + Offset

VU ID = BC220416370

Segment: 2204

Offset: 1637

Physical Address = 22040 + 01637

Physical Address = 23677

2 - What will be the last possible physical address accessible using your segment address?

Solution:

Physical Address = Segment + Max Offset

Max Offset = FFFF

Physical Address = 22040 + 0FFFF

Physical Address = 3203F

3 - What will be the first possible physical address accessible using your segment address?

Solution:

Physical Address = Segment + Min Offset

Min Offset = 0000


Physical Address = 22040 + 00000

Physical Address = 22040

4 - Write assembly language instruction(s) to store any data in your offset address of current code
segment?

Solution:

[org 0x0100]

data: dw 40

mov byte [offset_address], data

mov ax, 0x4c00

int 0x21

5 - Write assembly language instruction(s) to store any data in your segment offset pair?

Solution:

org [0x0100]

data: dw 40

mov ax, 0x1904

mov ds, ax

mov [segment_address], data

mov ax, 0x4c00

int 0x21

You might also like