Sponsored Links


Results 1 to 2 of 2

Thread: CS401 Midterm Paper May 2010

  1. #1
    Senior Member Guru's Avatar
    Join Date
    May 2010
    Location
    Jhelum
    Posts
    117

    99 CS401 Midterm Paper May 2010

    Sponsored Links1


    MIDTERM EXAMINATION
    Spring 2010
    CS401 Computer Architecture and Assembly Language Programming (Session - 2)


    Question No: 1 ( Marks: 1 ) - Please choose one
    The physical address of the stack is obtained by


    ► SS:SI combination
    ► SS:SP combination
    ► ES:BP combination
    ► ES:SP combination


    Question No: 2 ( Marks: 1 ) - Please choose one
    After the execution of instruction “RET ”


    ► SP is incremented by 2
    ► SP is decremented by 2
    ► SP is incremented by 1
    ► SP is decremented by 1


    Question No: 3 ( Marks: 1 ) - Please choose one
    The second byte in the word designated for one screen location holds


    ► The dimensions of the screen
    ► Character position on the screen
    ► Character color on the screen
    ► ASCII code of the character


    Question No: 4 ( Marks: 1 ) - Please choose one
    REP will always


    ► Increment CX by 1
    ► Increment CX by 2
    ► Decrement CX by 1
    ► Decrement CX by 2


    Question No: 5 ( Marks: 1 ) - Please choose one
    The basic function of SCAS instruction is to


    ► Compare
    ► Scan
    ► Sort
    ► Move data


    Question No: 6 ( Marks: 1 ) - Please choose one
    Index registers are used to store __________

    
    ►Data
    ►Intermediate result
    ►Address
    ►Both data and addresses

    Question No: 7 ( Marks: 1 ) - Please choose one
    The bits of the _____________ work independently and individually

    
    ►index register
    ►base register
    ►flags register
    ►accumulator

    Question No: 8 ( Marks: 1 ) - Please choose one
    To convert any digit to its ASCII representation



    ► Add 0x30 in the digit
    ► Subtract 0x30 from the digit
    ► Add 0x61 in the digit
    ► Subtract 0x61 from the digit


    Question No: 9 ( Marks: 1 ) - Please choose one
    When a 32 bit number is divided by a 16 bit number, the quotient is of



    ► 32 bits
    ► 16 bits
    ► 8 bits
    ► 4 bits

    Question No: 10 ( Marks: 1 ) - Please choose one
    When a 16 bit number is divided by an 8 bit number, the quotient will be in


    ► AX
    ► AL
    ► AH
    ► DX

    Question No: 11 ( Marks: 1 ) - Please choose one
    Which mathematical operation is dominant during the execution of SCAS instruction


    ► Division
    ► Multiplication
    ► Addition
    ► Subtraction


    Question No: 12 ( Marks: 1 ) - Please choose one
    If AX contains decimal -2 and BX contains decimal 2 then after the execution of instructions:
    CMP AX, BX
    JA label


    ► Jump will be taken
    ► Zero flag will set
    ► ZF will contain value -4
    ► Jump will not be taken


    Question No: 13 ( Marks: 1 ) - Please choose one
    The execution of the instruction “mov word [ES : 160], 0x1230” will print a character “0” on the screen at



    ► Second column of first row
    ► First column of second row
    ► Second column of second row
    ► First column of third row

    Question No: 14 ( Marks: 1 ) - Please choose one
    If the direction of the processing of a string is from higher addresses towards lower addresses then


    ► ZF is cleared
    ► DF is cleared
    ► ZF is set
    ► DF is set


    Question No: 15 ( Marks: 1 ) - Please choose one
    The instruction ADC has________ Operand(s)


    ► 0
    ► 1
    ► 2
    ► 3

    Question No: 16 ( Marks: 1 ) - Please choose one
    Which bit of the attributes byte represents the red component of background color ?


    ► 3
    ► 4
    ► 5
    ► 6

    Question No: 17 ( Marks: 2 )
    What is difference between SHR and SAR instructions?

    SHR
    The SHR inserts a zero from the left and moves every bit one position to the right and copy the rightmost bit in the carry flag.
    SAR
    The SAR shift every bit one place to the right with a copy of the most significant bit left at the most significant place. The bit dropped from the right is caught in the carry basket. The sign bit is retained in this operation.


    Question No: 18 ( Marks: 2 )
    For what purpose "INT 1" is reserved ?

    Question No: 19 ( Marks: 2 )
    Define implied operand?

    It is always in a particular register say the accumulator. It needs to not be mentioned in the instruction.

    Question No: 20 ( Marks: 3 )
    Describe the working of the CALL instruction with the reference of Stack.


    Question No: 21 ( Marks: 3 )
    Tell the Formula to scroll up the screen



    rep movsw scroll up

    scrollup: push bp
    mov bp,sp
    push ax
    push cx
    push si
    push di
    push es
    push ds
    mov ax, 80 ; load chars per row in ax
    mul byte [bp+4] ; calculate source position
    mov si, ax ; load source position in si
    push si ; save position for later use
    shl si, 1 ; convert to byte offset
    mov cx, 2000 ; number of screen locations
    sub cx, ax ; count of words to move
    mov ax, 0xb800
    mov es, ax ; point es to video base
    mov ds, ax ; point ds to video base
    xor di, di ; point di to top left column
    cld ; set auto increment mode
    rep movsw ; scroll up
    mov ax, 0x0720 ; space in normal attribute
    pop cx ; count of positions to clear
    rep stosw ; clear the scrolled space
    pop ds
    pop es
    pop di
    pop si
    pop cx
    pop ax
    pop bp
    ret 2

    Question No: 22 ( Marks: 5 )
    What is the difference between LES and LDS instructions ?


    The string instructions need source and destination in the form of a segment offset pair. LES and LDS load a segment register and a general purpose register from two consecutive memory locations. LES loads ES while LDS loads DS. Both instructions has two parameters, one is the general purpose register to be loaded and the other is the memory location from which to load these registers. The major application of these instructions is when a subroutine receives a segment offset pair as an argument and the pair is to be loaded in a segment and an offset register.

    Question No: 23 ( Marks: 5 )
    Explain the process of ADC?


    Normal addition has two operands and the second operand is added to the first operand. However ADC has three operands. The third implied operand is the carry flag. The ADC instruction is specifically placed for extending the capability of ADD. Further more consider an instruction “ADC AX, BX.” Normal addition would have just added BX to AX, however ADC first adds the carry flag to AX and then adds BX to AX. Therefore the last carry is also included in the result. The lower halves of the two numbers to be added are first added with a normal addition. For the upper halves a normal addition would lose track of a possible carry from the lower halves and the answer would be wrong. If a carry was generated it should go to the upper half. Therefore the upper halves are added with an addition with carry instruction.

  2. #2
    Senior Member viki's Avatar
    Join Date
    May 2010
    Posts
    2,132

    99 CS401- Computer Architecture MAY 2010

    CS401- Computer Architecture Solved


    1.JPG

    Sponsored Links
    :o:o--------------------------------------------------------------------------------------:o:o
    [B]The more knowledge you have, the greater will be your fear of Allah.[/B]

    Please Join My [B]Group Vuhelp[/B][B], Birthday Wishing, Daily Hadees[/B] [CODE][B]http://vuhelp.net/groups/vuhelp.html[/B]
    [B]http://vuhelp.net/groups/birthday-wishing.html[/B]
    [B]http://vuhelp.net/groups/daily-hadees.html[/B][/CODE]
    [CENTER][B][COLOR="Red"][SIZE="4"]Email: [email]viki@vuhelp.net[/email][/SIZE][/COLOR][/B][/CENTER]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. cs401 midterm paper november2011
    By thewaqasyaqoob in forum Current paper 2011
    Replies: 1
    Last Post: 11-30-2011, 12:10 AM
  2. CS401 midterm current paper 20 May 2011
    By Vuhelper in forum Current paper 2011
    Replies: 0
    Last Post: 05-22-2011, 01:12 AM
  3. Replies: 0
    Last Post: 05-13-2011, 03:55 AM
  4. cs401 current paper solved midterm fall 2010
    By Xpert in forum Current Papers 2010
    Replies: 2
    Last Post: 12-10-2010, 08:58 PM
  5. cs401 unsolved midterm paper download
    By Xpert in forum Unsolved Papers
    Replies: 0
    Last Post: 12-04-2010, 03:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft