CS401 CURRENT FINALTERM PAPER FALL 2020
Provide by VU Answer
Cs401
Mcqs past papers sa tha
3masks questions:
Diff between serial and parallel port communication.
How to speed up multitasking.
Ik program code aya tha for cant remember the condition.
Subjectives Question and its Answers of my Final Tearm CS401 on 12-Sep-2020
Q) Format of DOS input buffer:
Answer:-
Offset Size Description
00 1 maximum characters buffer can hold
01 1 number of chars from last input which may be recalled OR number of characters actually read, excluding CR
02 n actual characters read, including the final carriage return
Q) Describe MOVS instructions
Answer:- (Page 92) MOVS MOVS transfers a byte or word from the source location DS:SI to the destination ES:DI and updates SI and DI to point to the next locations. MOVS is used to move a block of memory. The DF is important in the case of overlapping blocks.
Q) How interrupts are handled in protected mode & IDTR.
Answer:- (Page 182)
Handling interrupts in protected mode is also different. Instead of the IVT at physical address 0 there is the IDT
(interrupt descriptor table) located at physical address stored in IDTR, a special purpose register. The IDTR is
also a 48bit register similar in structure to the GDTR and loaded with another special instruction LGDT.
Q) VESA service "INT 10 – VESA – Get SuperVGA Information" uses which registers to return the result?
Answer:- (Page 180) To return the result,
"INT 10 – VESA – Get SuperVGA Information” uses: Return: AL = 4Fh if function supported AH = status
INT 10 – VESA – Get SuperVGA Infromation
AX = 4F00h
ES:DI -> buffer for SuperVGA information
Return:
AL = 4Fh if function supported
AH = status
Q) define interrupt INT 0*80
Answer:-
int 0x80 ; multitasking kernel interrupt
Q)Define HOOKING And Unhooking
HOOKING AN INTERRUPT
To hook an interrupt we change the vector corresponding to that interrupt. As soon as the interrupt vector changes, that interrupt will be routed to the new handler. By hooking this interrupt a debugger can get control after every instruction and display the registers etc
Unhooking Interrupt
We now add the interrupt restoring part to our program. This code resets the interrupt vector to the value it had before the start of our program.
Q) How interrupts are handled in protected mode.
Answer:-
Handling interrupts in protected mode is also different. Instead of the IVT at physical address 0 there is the IDT (interrupt descriptor table) located at physical address stored in IDTR, a special purpose register. The IDTR is also a 48bit register similar in structure to the GDTR and loaded with another special instruction LGDT.
Q) INT 14 READ OPERATION from SERIAL PORT
Answer:-
The BIOS INT 14 provides serial port services. We will use a mix of BIOS services and direct port access for our example. A major limitation in using BIOS is that it does not allows interrupt driven data transfer, i.e. we are interrupted whenever a byte is ready to be read or a byte can be transferred since the previous transmission has completed. To achieve this we have to resort to direct port access. Important BIOS services regarding the serial port
INT 14 - SERIAL - READ CHARACTER FROM PORT
AH = 02h
DX = port number (00h-03h)
Return:
AH = line status
AL = received character if AH bit 7 clear
Q) What is EAX
AX register is extended 32 bit register is renamed as EAX
Q) Define multitasking, its environment and conditions
Answer:-
Multitasking:
*A multitasking environment allows applications to be constructed as a set of independent tasks, each with a separate thread of execution and its own set of system resources. The inter-task communication facilities allow these tasks to synchronize and coordinate their activity.
*Multitasking provides the fundamental mechanism for an application to control and react to multiple, discrete real-world events and is therefore essential for many real-time applications.
*Multitasking creates the appearance of many threads of execution running concurrently when, in fact, the kernel interleaves their execution on the basis of a scheduling algorithm. This also leads to efficient utilization of the CPU time and is essential for many embedded applications where processors are limited in computing speed due to cost, power, silicon area and other constraints.
To realize such a system, the following major functional conditions are to be carried out.
A.Process Management
• interrupt handling
• Task scheduling and dispatch
• create/delete, suspend/resume task
• manage scheduling information – priority, scheduling policy, etc
B.Inter-process Communication and Synchronization
• Code, data and device sharing
• Synchronization, coordination and data exchange mechanisms
• Deadlock and Live-lock detection
C.Memory Management
• Dynamic memory allocation
• Memory locking
• Services for file creation, deletion, reposition and protection
D.Input/Output Management
• Handles request and release functions and read, write functions for a variety of peripherals
Q) write a program add 10 numbers using register + offset addressing mode in assembly language
Cs401
50 questions
40 mcqs 80% from past papers
1. In truncated file service which register read service and file attributes
2.SACS instruction works?
3.which interrupt is called scheduler.which main purpose of that.
4.which interrupt interrupt and control back to dos.write name of interrupt and service number.
5.serial port intiziltaion service number and also write attributes of it with service number those initialize them.
6.physical address btna tha
7.data movment instruction de v thi un ka btna tha k kon sy processor me use hoti hain.
8.code dia hua tha btna tha k instruction kya kam kr rhi us me.
9.code likhna tha apna name on top of screen show krny ka.
10.code likhna tha aik array ka jis me 128 elements ho har element 4 byte ka ho or har element ki value 0 ho.
Overall paper bhut easy tha..
#CS401 Final Term Current Paper FALL 2020-21
27-FEB-2021
9:30 am paper
Esc by hooking code..
Attribute of changing video service to information about font color...
Which service is used with int 13 for rea data write data and gatting data...
Difference between 16bit and 32bit DIV
Mcqs past papers or handouts sy ay thy
Cs401 2:30 06-03-2021
Mcqs past se thy or ak or file se..
Short long question
1 two name system operation computer strt krny k ly..
2 real mode ko protected mode me kasy krty is trha ka tha question.
3 code dia tha( int x int y) c me is ko assembly me likhna tha..
4 ak so acha us me error btana tha just..
5 detail from likhna thi 5:6:5 ki video me use hota wo btana tha..5 red 6 green 5 blue tha ans iska..
6 ak code ki line skip thi w/o likhna thi..
7 ak program bnana tha k physically output btani thi us ki..
8 is me code dia tha k segment line ko physically kasy krty AH =01h AH =09h ye tha...
Note:
Papers shared by VU Answer or Students.
We Shared only to get an Idea and Prepare these important questions or MCQs about final term papers.
Current Paper and Important thoughts are recommended there will be higher chance to ask for exams in repeated questions.
0 Comments