www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# cs 401 assignment 2 spring 2021

1. Write an assembly language program to sort all digits of your VUID. For example, if the VUID is MC190357324, then you need to sort all the digits except the two alphabets using insertion sort. Also, add all the sorted digits and store the sum in memory.

Note: Make it sure to use your own VUID, otherwise zero marks will be awarded.

Submission details

Following are required in a single MS-Word document:

• Assembly language program.
• Screenshot of AFD debugger showing the sorted VUID and the sum of its digits in the memory.

“Best of luck”

Views: 1061

### Replies to This Discussion

Stay touched with this discussion, Solution idea will be uploaded as soon as possible in replies here before the due date.

CS401 One more solution file

CS401_2_2021_Solution.docx

CS401 Assignment NO.2 2020

Name:

STUDENT ID:

[org 0x0100]        ;  offset

Array1:  db 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M'

Array2:  db 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'

Array3:  db ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',

start:

mov bx, 0

mov cx,  13

lower_case:

mov al, [Array1+bx]

mov dl, al

mov [Array3+bx], dl

loop lower_case

mov bx,0

mov cx, 13

upper_case:

mov al, [Array2+bx]

mov dl, al

sub dl, 32

mov [Array3+bx+13], dl

loop upper_case

mov bx,0

mov cx, 26

print_result:

mov al, [Array3+bx]

mov dl, al

mov ah, 02

int 21h

loop print_result

exit:

mov ax , 0x4c00       ; terminate

int 0x21

Asslam_O_Alikum

Dear bro ya ap ny glt ans upload keya howa please kese ko glt ans mat day  plz

#CS401 #Assignment2 #Spring2021
CS401 Assignment 2 Solution Spring 2021 || CS401 Assignment No. 2 Spring 2021 Solution File || CS401

#insertion_sort #CS401 #assignment_2
Solution of CS401 Assignment 2 Spring 2021 - Insertion Sort program

#CS401 assg 2

1

2

3

4

5

## Latest Activity

4 hours ago

### phy101 Assignment 1 Fall 2021. Due Date= 10 December 2021

4 hours ago
4 hours ago
shifa arshad joined + M.Tariq Malik's group

### MGT602 Entrepreneurship

4 hours ago
shifa arshad joined + M.Tariq Malik's group

4 hours ago

### mth401 Assignment 1 Fall 2021. Due Date= 10 December 2021

4 hours ago
shifa arshad and Imran Sarwar joined + M.Tariq Malik's group

### MTH401 Differential Equations

4 hours ago
Adnan Hafeez joined + M.Tariq Malik's group

5 hours ago