CS401 Assignment 1 Solution Fall 2021

In This Post, Provide the Latest CS401 Assignment 1 Solution Fall 2021. Easy to See Complete Proper Step by Step CS401 Assignment 1 Solution 2021 with PDF File Download Below.


CS401 ASSIGNMENT 1 SOLUTION FALL 2021 

Provide by VU Answer


Due Date: 9 Dec 2021

Total Marks: 20


Upload Instruction:

Following are required in a single MS-Word document:


Question:

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:

1. Assembly language program.

2. Screenshot of the NASM command (assembling the .asm file).

3. Screenshot of AFD debugger showing the final values in memory


Solution:


Step 1:

1. First apny code ko apni local drive ki kisi location mein rakhna h apni file ko save krty huwe uska name khud ki VU ID ky last 5 digit rakhni h

Example 56210.asm


Code Solution


[org 0x0100]


jmp start


num1: dw 1,4,2,3,5,6,2,1,0



start:


mov bx,0

mov ax,0


loop1:

mov ax,[num1+bx]

mov dx, [num1+bx+10]

mov [num1+bx+10],ax


mov [num1+bx],dx


add bx,2

cmp bx,8

 jne loop1


mov AX,4C00h


Step 2:

Screenshot of the NASM command (assembling the .asm file).


Solution:

Implementation in DosBox


Hint

Step 1 m code ko ap save krlien jo oper given h id change krky first 4 digit must change apni id ky.

num1: dw 1,4,2,3,5,6,2,1,0 


Ur code ko save krty huwe apni VU ID ky last 5 digit sy code save krna h remember its most important.


Screenshot:



Step 3:

3. Screenshot of AFD debugger showing the final values in memory.


Solution:

After entering command afd.com and enter you can see this.





Conclusion:

After this, you can enter the array in CMD> m2 ds:103

 

Easily see that my id first 4 digits in the screenshot

Before my Id swap is 1423 5 6210


After swapping its 6210 5 1423


For swapping in DOSBox entering press F2 jha apki id ky first 4 digit last 4 sy swap hujyga ur first per ajyein take screenshot


That is Final and Complete Solution


Download CS401 Assignment 1 Solution Fall 2021 PDF


PLEASE NOTE:

Don't copy the same answer. Make sure you can make some changes to your solution file before submitting the copy solution will be marked zero.

Before submitting an assignment check your assignment requirement file.

If you need some help and question about file and solutions comment below.