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

CS401 Assignment No 1 Solution Spring 2017

By: // No comments:

CS401 Assignment No 1 Spring 2017

Here we have CS401 - Computer Architecture and Assembly Language Programming Assignment No. 1 Solution and Discussion Spring 2017. CS401 Assignment Due Date: May 02, 2017. Assignment Total marks = 20.
CS401 Assignment No 1 Spring 2017 Solution and Discussion
CS401 Assignment No 1 Spring 2017 Solution and Discussion

Recommended : CS401 Mid Term Past Papers / Notes

You Can Also Download CS401 Mid Term Papers, CS401 Short Notes, CS401 Assignment Solutions, CS401 Lecture Wise Questions Answers Files,CS401 Solved MCQs, CS401 Solved Quiz , CS401 Mid Term Subjective Papers , CS401 Mid Term Objective Papers from Virtual Study Solutions For Preparation of Mid Term Papers.

CS401 Assignment Instructions

Please carefully read the following instructions before attempting assignment.

CS401 Assignment Rules of 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.
Recommended : DevC++ Installation and Usage Complete Guidelines

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.

Topics Covered in CS401 Assignment no 1 :


  • 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

Recommended: What is Network Topology and its Types - Complete Tutorial

CS401 Assignment Questions No 01 

marks = 10

Write an assembly language code that will:
Initialize an array named as “Even”, which contain first ten EVEN numbers.

Even = 0,2,4,6,8,10,12,14,16,18
Initialize an array named as “Odd”, which contain first ten ODD numbers.

Odd=1,3,5,7,9,11,13,15,17,19,21
Add Both arrays (index wise) into a third array named as “Sum”.

SUM [0] = Even [0] + Odd [0]

SUM [1] = Even [1] + Odd [1]

Up to

SUM [n] = Even [n] + Odd [n]

Please Note: You cannot use LOOP or any other repetitive structure to solve this questions.

CS401 Assignment Questions No 02 

marks = 10

Suppose, we have the following register values:


AX
FA10
DS
32FA
SI
222A
BX
050C
CS
6FDE
SP
6D6E
CX
1202
ES
E9A2
BP
FF21
DX
FFEF
SS
CD33
DI
2829

You are required to calculate the physical address generated by each of the following instructions.
  1. MOV [bP+Fa21], AX
  2. ADD CX, [SP+FaFa]
Please Note: Each provided instruction is independent & all numbers are stated in Hexadecimal number system.

Recommended : All Mid term Paper Solved By Moaaz

CS401 Assignment Helping Material

Arrays in Assembly Language

There are two ways to define an array in assembly language.

12.4.1. Initialized Lists

An initialized array is defined in the same way as a scalar variable, but with multiple initial values. scores: .word 100, 78, 63, 88, 52, 91, 75

MAL also provides a mechanism for defining a large array with all elements initialized to the same value: scores: .word 0:100

12.4.2. Uninitialized Memory Blocks

Uninitialized arrays are defined using the .space directive.

Caution The .space directive allocates the specified number of bytes. Specifying the desired number of array elements is a common mistake. scores: .space 400

12.4.3. Working with Arrays
To access an array in assembly language, we use a pointer. A pointer is simply a register or variable that contains a memory address.

The value in the pointer is computed as shown in the previous sections by adding the base address of the array and the offset of the desired element.


CS401 Assignment No 1 Solution discussion idea
CS401 Assignment No 1 Solution and discussion idea

CS401 Assignment No 1 Solution Spring 2017

CS401 Assignment Solution will be uploaded Soon.

If you want to receive the Solution file of CS401 Assignment in your mail box. Subscribe us below We will inform you as soon as solution is updated.

Join Our Facebook Page and Like Us @ Virtual Study Solutions.

CS401 All Final Term Past Papers

By: // No comments:

CS401 All Final Term Past Papers

Here You can Download CS401 All Final Term Papers And Past Final Term Papers at One Place from 20 August 2016 to 2 September 2016.

You Can Also Download CS401 Solved Final Term Papers, Short Notes, Assignment Solutions, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quiz , CS401 Solved Final Term Subjective Papers , CS401 Solved Final Term Objective Papers From Virtual Study Solutions For Preparation of Final Term Papers.

Also Read: CS101 Introduction to Computing Final term Papers

CS401 Final Term Paper Sample 1:

In final term Exam 95% MCQs were from moaz file.

Subjective.

1-What is highest priority? 2 marks.

2-Where you can see IRT instead of IRET at the end of the IRS? 2 marks

3-What is the uses of Disk system? How to reset it? 2 Marks

4- Write assembly language program attribute using int 21 for program flag. 2 Marks.

5-Write the uses of REP prefix with an example? 3 Marks.

6-“Int subtract(int x, int y)” write this in assembly code. 3 Marks

7-What is triple fault? 3 Marks

8-Which flags are unaffected in mathematical operation? 3 Marks

9-Explain the term “Interrupt Hooking”.Also give example? 3+2=5 Marks

10-At which location interrupt gate descriptor table is stored? And describe the structure of this with an example. 5 Marks

11-Location screen half line from left to right.5 Marks.

12-How to read Disk system?Mention only Four attributes. 5 Marks.


Also Read: All Final term Paper Solved By Moaaz

CS401 Final Term Paper Sample 2:

Marks 2
1. Interrupts are asynchronous what does it mean
2. Name the Standard format for sending data through serial port.
3. How local thread variable are created and accessed.
4. Write any four characteristics of SUN SPARC processor.


Marks 3
1. How local thread variable are created and accessed.
2. In 88 processor which pins are reserved for real time interrupts give their names.
3. Difference between stack clearance of pascal and C.
4. Describe these instructions.
Mov dx, buffer
Mov ah, 0x0A
Int 0x21

Marks 5
1. Explain purpos and functionality of a programmable interrupt controller.
2. Write assembly language program attribute for loading program using int 21 service.
3. Explain these instruction
Mov ax, 0x4f02
Mov bx, 0x 4117
4. Difference between single step interrupt and break point interrupt.


Also Read: ENG101 Final Term Past Papers Collection

CS401 Final Term Paper Sample 3:


  1. With the reference to DB-9 connector, which pin is used as a ring “Indicator” 2 
  2. What kind of information is provided by the segment selector. 2 
  3. What is the proper way of initiating a breakpoints interrupt during the debugging of any program. 2 
  4. When does an IRQ conflict occur in a system. 2 
  5. In context of Disk media how many bytes are reserved for each of the following ports in 32 bytes directory format. 3 
  6. The processor uses I/O ports for communicating with peripheral devices, suppose processor desires to communicate with some peripheral devices. In this scenario, which instruction will be used to read or write I/O ports. 3 
  7. What is the functionality of CLI instruction. 3 
  8. In assembly language programming which service is used for getting VESA mode information? Also mention the status of concerned registers before and after the service execution. 3 
  9. Write and Assembly program which uses BIOS video service to display the string. “Introduction to Assembly” in the top left corner of the screen. 5 
  10. Write a program by making use of BIOS interrupt INT 10 to display your name on top left corner of the screen. 5 
  11. Which assembly instruction is used to clear a tap flag? Also explain the procedure to clear this flag. 5 
  12. At which location interrupt gate descriptor table is stored? And describe the structure of this with an example.
Also Read: cs201 final term solved paper mega File

CS401 MCQs File for Final Term Papers

You should prepare for  Final term papers from the file below. i m sure 80% to 90% will be from this file.

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