Showing posts with label cs401. Show all posts
Showing posts with label cs401. Show all posts

CS401 Mid Term Past Papers / Notes

By: // No comments:

CS401 Mid Term Past Papers/Notes 

Here are CS401 Computer Architecture and Assembly Language Programming Mid Term Notes. we also offer CS401 Past PapersCS401 midterm papers, Handouts, Lecture Slides, Assignments, Quiz and MCQs Download. You can download CS401 Assignments Computer Architecture and Assembly Language Past Assignments, Past Final Term Papers, Lecture notes CS401 Solved Papers and Assignments.

CS401 Solved Subjective Midterm Papers For Midterm Exam:

CS401 Solved Objective Midterm Papers For Midterm Exam:

CS401 Midterm Paper Fall 2015

CS401 MIdterm paper Total Questions : 26
CS401 MIdterm paperTotal Marks : 40
CS401 Midterm Paper Time : 60 Mints

  • Total 1 Marks Mcqs : 20 
  • Total 2 Marks Short : 2 
  • Total 3 Marks Short : 2 
  • Total 5 Marks Short : 2

You should also Read:

2 questions of 2 marks

1) a list was given and we have to select only bitwise operators

2) what will be the result of execution of the instruction of the instruction” LDS IS [BP +4]”?

2 questions of 3 marks

1) How many BYTES will be move by each of the following block of codes?

a) MOV cx,384 REP movsb

b) MOV cx,384 REP movsw

2) which instruction is used to swap the values?and what is the only limitation in this instruction?

2 questions of 5 marks

1) procedure about intrrupt

2)Replace the following invalid instruction with the single valid instruction

a. (a)mov IP
b. (b)mov IP,L5

c. sub sp, 2
mov [ss:sp], ax

CS401 Assignment no.1 Solution 2016

By: // 2 comments:

Cs401 Assignment Fall 2016 

Here is the Cs401 Assignment no. 1 Solution and Discussion. Due date 14 nov 2016.Computer Architecture and Assembly Language Programming (CS401). Solution has been added below:

Cs401 Assignment no. 1:

Assignment # 01
Total marks = 20
Cs401 Assignment no.1 Deadline Date:
14th of November, 2016
Download Assignment: Fall 2016_CS401_Assignment_1.doc
Please carefully read the following instructions before attempting assignment.

You should Also Read:

ENG101 Assignment No 1 Solution Fall 2016
MTH202 Assignment No 01 2016 - Solution
MGT101 Assignment No 01 Fall 2016
CS101 Assignment No. 01 Fall 2016 - Introduction To Computing
STA301 Assignment No.1 Solution 2016

CS401 Assignment RULES FOR MARKING

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 submitted solution is copied from any other student or from the internet.

You should consult 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.

Topic Covered in CS401 Assignment:

Registers
Intel Architecture
Register Architecture
Data Declaration
Addressing Modes

CS401 Assignment important 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 etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.

If you people find any mistake or confusion in assignment (Question statement), please consult with 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

CS401 Assignment Questions No 01

Marks: 10
Write a complete assembly language code for the following pseudo code:

Initialize a variable named NUM1 with 04 as a Hexadecimal Number
Initialize a variable named NUM2 with 08 as a Hexadecimal Number
Initialize a variable named NUM3 with 12 as a Hexadecimal Number
Initialize a variable named NUM4 with 00 as a Hexadecimal Number

Initialize AX with zero 0
Initialize BX with zero 0

Move NUM1 into AX
Move NUM2 into BX
Add BX into AX

Move NUM3 into BX
Add BX into AX

Store AX into NUM4

CS401 Assignment Questions No 02 :

Marks: 10
Suppose, we have the following register values:
AX
0150

BX
AB5D

CX
FF0A

DX
1234

DS
CC20

CS
EF10

ES
225F

SS
E25F

SI
1212

SP
CD0F

BP
95F8

DI
BDEF

You are required to calculate the physical address generated by each of the following instructions.

ADD [bx+Di], CX
MOV DX, [SP+1652H]

Note: Each provided instruction is independent.

CS401 Assignment Solution:

CS401 Assignment Questions No 01 Solution:

[org  0x0100]
mov bx,  0
mov ax ,[num1]
mov bx ,[num2]
add ax, bx
mov bx, [num3]
add ax, bx
mov [num4], ax
mov ax, 0x4c00
Int 0x21
num1:      dw   4
num2:       dw   8
num 3:      dw   12
num 4:      dw    00

CS401 Assignment Questions No 02 Solution:

Suppose, we have the following register values: 
 
AX 0150   
BX AB5D   
CX FF0A   
DX 1234   
DS CC20   
CS EF10   
ES 225F   
SS E25F   
SI 1212   
SP CD0F   
BP 95F8   
DI BDEF  

You are required to calculate the physical address generated by each of the following instructions. 

ADD [bx+Di], CX
MOV DX, [SP+1652H]

Note: Each provided instruction is independent.
Solution:
Answer i:
Effective Address EA= Base +Index +Offset
=0x AB5D +0x BDEF +0x0000
=0x 1694c
Physical Address = segment*0x10+Effective Address
= 0x000*0x10+0x0110
=0x120
ANSWER ii:
Effective Address EA = Base + Index + Offset
=0x AB5D + 0x000 +0x1652
=0xC1AF
Physical Address = segment * 0x10 + Effective Address
= 0x0000 * 0x10 + 0xc1AF
=0xC1BF

Download CS401 Assignment#01 Solution

Don’t wait for Solution post your problems in Comments Below and discuss after discussion a perfect solution will come in a result.

CS401 Assignment no 3 - Graded assignment

By: // No comments:

CS401 Assignment no 3 

CS401 Graded Assignment no 3 Computer Architecture & Assembly Language

Download Attachment:


Computer Architecture & Assembly Language (CS401)
Assignment # 3(Graded)
Total marks = 20
                                                                                  Deadline Date = July22, 2015
Please carefully read the following instructions before attempting assignment.
Rules for Marking
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 submitted solution is copied from any other student or from the internet.

1)      You should concern the recommended books to clarify your concepts as handouts are not sufficient.
2)      You are supposed to submit your assignment in .ppt or pptxformat. Any other formats like scan images, PDF, zip, rar, doc and bmp etc will not be accepted.
Topic Covered:
  • Display Memory
  • String Instruction
  • Software Interrupt
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 etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.
For any query, feel free to email at:


Question Statement:
You are required to write an assembly language program that prints your FULL NAME along with your VU-ID.
You have to use simple Display Memory addressing instructions and attribute setting mechanism (no need to use any subroutine) to print above in the following pattern.

CS401 Assignment No 1 Solution

By: // No comments:
CS401 - Computer Architecture and Assembly Language Programming Assignment No. 1

Attachment:
Spring%202015_CS401_1.doc



CS401 Assignment  Solution


CS401 Assignment Part 1.

You are required to calculate Physical Addresses for the following two combinations:
1.      BX+SI+0xFF00
2.      BP+DI+0xA000

Answer

      BX+SI+0xFF00
First of all wo calculate the Effective Address(EF).
In snapshot the value of BX = 0000 and SI = 01A2
Effective Address =  BX + SI + 0x0FF00
EF = 0000 + 01A2 + 0x0FF00
EF = 100A2
Now we compute the Physical Address
For BX and SI the default segment is DS
In snapshot the value of DS = 0A2E

Physical Address = DS * 10H + EF
Physical Address = 0A2E*10H + 100A2
Physical Address = A2E0 + 100A2
Physical Address = 1A382H


CS401 Assignment Part 2.

Question 2:
Assume the following Pseudo Code and convert it into proper assembly language instructions that should be assembled and debugged using NASM.

1.      Declare an array named as P_NUM of 5 elements that contains first five prime numbers.
2.      Set CX to 5 in decimal.
3.      Move the first element of P_NUM array to the AX.
4.      Move the fourth element of P_NUM array to the BX.
5.      Move last element from P_NUM array to the DX.
6.      Add the values of AX and BX and store the result in AX.
7.      Add the values of new AX and DX and store the result in BX.

Answer
  1. BP+DI+0xA000
In snapshot the value of BP = 0000 and DI = 000A
Now the calculate the Effective Address(EF).

Effective Address = BP+DI+0xA000
EF = 0000 + 000A + 0x0A000
EF = A00A
Now we compute the Physical Address
In snapshot the Default segment of  BP is SS
The value of SS is given in snapshot SS = 12A1

Physical Address = SS*10H + EF
Physical Address = 12A1*10 + A00A
Physical Address = 12A10 + A00A
Physical Address = 1CA1A
Answer 2.

[org 0x100]

mov cx, 5
mov ax, [P_NUM]
mov bx, [P_NUM+6]
mov dx, [P_NUM+8]

add ax,bx
add ax,dx

mov bx, ax

mov ax, 0x4c00
int 0x21

P_NUM:   dw 2,3,5,7,11