PROMOTE MY BLOG: JUST CLICK BELOW BUTTON

Search Any Paper On This Blog

Sunday, July 24, 2011

CS401 Finalterm Paper 3



FINAL TERM EXAMINATION SPRING 2010
CS401 COMPUTER ARCHITECTURE AND ASSEMBLY
LANGUAGE PROGRAMMING


1. BL contains 5 decimal then after right shift , BL will become
• 3
• 2.5
• 5
• 10
2. 8 * 16 font is stored in ________ bytes.
• 3
• 4
• 8
• 16
3. In DOS input buffer , number of characters actually read on return is stored in
• First byte
• Second byte
• Third byte
• Fourth byte
4. IRQ 0 has priority
• Low
• High
• Highest
• Medium
5. Thread registration code initialize PCB and add to linked list so that _____ will give it
turn.
• Assembler
• Linker
• Scheduler
• Debugger
6. Traditional calling conventions are in ______ number
• 1
• 2
• 3
• 4
7. VESA VEB 2.0 is standard for
• High Resolution Mode
• Low Resolution Mode
• Very High Resolution Mode
• Medium Resolution Mode
8. To clear direction flag which instruction is used
• Cld
• Clrd
www.allvupastpapers.blogspot.com
• Cl df
• Clr df
9. In STOSW instruction , When DI is cleared , SI is
• Incremented by 1
• Incremented by 2
• Decremented by 1
• Decremented by 2
10. Interrupt that is used in debugging with help of trap flag is
• INT 0
• INT 1
• INT 2
• INT 3
11. INT for arithmetic overflow is
• INT 1
• INT 2
• INT 3
• INT 4
12. IRQ referred as
• Eight Input signals
• One Input signal
• Eight Output signals
• One output signal
13. IRQ for keyboard is ____1_____
14. IRQ for sound card is ______5_______
15. IRQ for floppy disk is ______6_______
16. IRQ with highest priority is
• Keyboard IRQ
• Timer IRQ
• Sound Card
• Floppy Disk
17. Pin for parallel port ground is
• 10-18
• 18-25
• 25-32
• 32-39
18. The physical address of Interrupt Descriptor Table (IDT) is stored in
• GDTR
• IDTR
• IVT
• IDTT
19. Execution of “RET 2” results in?
www.allvupastpapers.blogspot.com
20. CX register is
• Count register
• Data register
• Index register
• Base register
21. OUT instruction uses __AX_____ as source register.
22. IN DB-9 connector the Data Set ready pin is at
• 5
• 6
• 7
• 8
23. If two devices uses same IRQ then there is
• IRQ collision
• IRQ conflict
• IRQ drop
24. VESA organizes 16 bit color for every pixel in ratio
• 5:5:5
• 5:6:5
• 6:5:6
• 5:6:7
25. Division by zero is done by which interrupt.
Interrupt 0.
26. Define Hardware Interrupt & I/O ports (5 marks)
27. Five BIOS video services used in text mode ( 3 marks)
INT 10 - VIDEO - SET TEXT-MODE CURSOR SHAPE
AH = 01h
CH = cursor start and options
CL = bottom scan line containing cursor (bits 0-4)
INT 10 - VIDEO - SET CURSOR POSITION
AH = 02h
BH = page number
0-3 in modes 2&3
0-7 in modes 0&1
0 in graphics modes
DH = row (00h is top)
DL = column (00h is left)
INT 10 - VIDEO - SCROLL UP WINDOW
AH = 06h
AL = number of lines by which to scroll up (00h = clear entire window)
BH = attribute used to write blank lines at bottom of window
CH, CL = row, column of window's upper left corner
DH, DL = row, column of window's lower right corner
INT 10 - VIDEO - SCROLL DOWN WINDOW
AH = 07h
AL = number of lines by which to scroll down (00h=clear entire window)
BH = attribute used to write blank lines at top of window
CH, CL = row, column of window's upper left corner
DH, DL = row, column of window's lower right corner
INT 10 - VIDEO - WRITE CHARACTER AND ATTRIBUTE AT CURSOR
www.allvupastpapers.blogspot.com
POSITION
AH = 09h
AL = character to display
BH = page number
BL = attribute (text mode) or color (graphics mode)
CX = number of times to write character
28. DOS allocate memory for program execution and then de-allocate , explain memory
management in DOS (10 marks)
An important point to understand here is that whenever a program is executed in
DOS all available memory is allocated to it. No memory is available to execute any
new programs. Therefore memory must be freed using explicit calls to DOS for this
purpose before a program is executed.
Important services in this regard are listed below.
INT 21 - ALLOCATE MEMORY
AH = 48h
BX = number of paragraphs to allocate
Return:
CF = error flag
AX = segment of allocated block or error code in case of error
BX = size of largest available block in case of error
INT 21 - FREE MEMORY
AH = 49h
ES = segment of block to free
Return:
CF = error flag
AX = error code
INT 21 - RESIZE MEMORY BLOCK
AH = 4Ah
BX = new size in paragraphs
ES = segment of block to resize
Return:
CF = error flag
AX = error code
BX = maximum paragraphs available for specified memory block
INT 21 - LOAD AND/OR EXECUTE PROGRAM
AH = 4Bh
AL = type of load (0 = load and execute)
DS:DX -> ASCIZ program name (must include extension)
ES:BX -> parameter block
Return:
CF = error flag
AX = error code
The format of parameter block is as follows.
Offset Size Description
00h WORD segment of environment to copy for child process
(copy caller's environment if 0000h)
02h DWORD pointer to command tail to be copied into child's PSP
06h DWORD pointer to first FCB to be copied into child's PSP
0Ah DWORD pointer to second FCB to be copied into child's PSP
0Eh DWORD (AL=01h) will hold subprogram's initial SS:SP on return
12h DWORD (AL=01h) will hold entry point (CS:IP) on return
There was fill in blanks question with 10 marks. The choice was given at bottom.
29. Serial Port is also accessible via I/O ports , COM 1 is accessible via ports
3F8-3FF while COM 2 is accessible via 2F8 -2FF.
www.allvupastpapers.blogspot.com
The first register at 3F8 is the Transmitter holding register if written to and the receiver
buffer register if read from.
Other register of our interest include 3F9 whose Bit 0 must be set to enable received
data available interrupt and Bit 1 must be set to enable transmitter holding register
empty interrupt.
( Transmitter , COM 1, I/O ports , COM2. bit 0 , Buffer , 3FA)
By : ADEEL ABBAS 
www.allvupastpapers.blogspot.com 
AdeelAbbasbk@gmail.com

No comments:

Post a Comment

PLEASE COMMENT ABOUT YOUR VISIT AND MY SITE

Note: Only a member of this blog may post a comment.