Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

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

Computer Architecture and Assembly Language Programming (CS401)

Assignment No. 2


Total marks = 20                                                                              


Deadline Date:

June 3, 2021


Please carefully read the following instructions before attempting assignment.


It should be clear that your assignment would not get any credit if:

  • The assignment is submitted after the due date.
  • The submitted assignment does not open or file is corrupt.
  • Strict action will be taken if the submitted solution is copied from any other student or from the internet.

You should concern the recommended books to clarify your concepts as handouts are not sufficient.

You are supposed to submit your assignment in .doc or docx format.

Any other formats like scan images, PDF, zip, rar, ppt and bmp etc. will not be accepted.

Lectures covered: 7-14

Topics covered: Addition, Loop, Branching and sorting


No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning). Hence refrain from uploading your assignment in the last hours of the deadline. It is recommended to upload the solution file at least two days before its closing date.

If you find any mistake or confusion in the assignment (Question statement), please contact your instructor before the deadline. After the deadline, no queries will be entertained in this regard.

For any query, feel free to email at


  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: 1097

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 Assignment NO.2 2020





[org 0x0100]        ;  offset

jmp start               ;  jump to start label


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 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',



             mov bx, 0

             mov cx,  13


             mov al, [Array1+bx]

             mov dl, al

             add dl, 32

             mov [Array3+bx], dl

             add  bx, 1

             loop lower_case


             mov bx,0

             mov cx, 13


             mov al, [Array2+bx]

             mov dl, al

             sub dl, 32

             mov [Array3+bx+13], dl

             add  bx, 1

             loop upper_case


             mov bx,0

             mov cx, 26


             mov al, [Array3+bx]

             mov dl, al

             mov ah, 02

             int 21h

             add bx, 1

             loop print_result



            mov ax , 0x4c00       ; terminate

            int 0x21



                          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


© 2022   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service