Professional Documents
Culture Documents
MC190406115
Computer Architecture and Deadline Date
December 09, 2021
Assembly Language Programming
(CS401)
Assignment No. 1
NOTE
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 assignment in the last hour of the
deadline. It is recommended to upload 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 cs401@vu.edu.pk
Q. Write an assembly language program to swap the first four digits of your VUID with the last
four digits leaving the middle one intact. For example, if the digits in your VUID are 1423 5
0986, then the VUID should be converted to 0986 5 1423.
Note: Make it sure to use the last 5 digits of your own VUID as name of the .asm file, otherwise
zero marks will be awarded.
Requirements:
[org 0x0100]
Jmp start
iafad: dw 1,9,0,4,0,6,1,1,5
start
Mov bx,0
Mov ax,0
firstloop:
Mov ax,[id+bx]
Mov dx,[id+bx+10]
Mov [id+bx+10], ax
Add bx, 2
Cmp bx, 8
Jne firstloop
MOV AX , 4C00h
INT21h
Best of luck!