New Microsoft Word Document

advertisement
Current Papers of cs401
Q:what is the role of segment descriptor?(2)
Q:what is the purpose of multithreading?(2)
Q:what is the purpose of Abort?(2)
Q:why conflict IRQ occur in a system?
Q:Inturrupt for extended read disk,mention all attributes..
Q:what inturrupt is used for Disk file system?
Q:1 question was from SPARC processor?
Q:1 question was from video services?
Q:1 question was from (PIC) of 5 marks?
Q:1 question was like for which output device we use
ACK pin..is trhan se tha kuch..
Q:the following code is written in C language write the
code in assembly language
"Int multiply (int x,int y);"
1)after executing what is the effect on MSB of
accumulator.
2)Purpose of Abort
.??
3)write in assembly int add(int x int y)
4)initialization of break point interrupt
5)about context switching (5)
6)debugger using break point interrupt and single point
interrupt..(5)
7)how many pins serial ports have and what type of
communication it is,.? (5)
8)write assembly instruction to call the function int
multiply(int x int y)(5)
1. In assembly language programming, we use "INT 21"
to open existing file. What will be the effect on Most
Significant Byte of accumulator register after this
interrupt being executed?
1. Write a single instruction that can be used as an
alternative of the following two instructions?
DEC CX
JNZ NextChar
1. Write an assembly instruction that will allocate space
for 32 PCBs?
2. In C language naming convention, which symbol is
appended to every function or variable?
3. Write the functionality of following bits in IDTR



P
DPL
S
1. What is the format of input buffer of DOS?
1. Why are device drivers necessary, given that the
BIOS already has code that communicates with the
computer's hardware?
2. Which logical operation can be used to see whether a
bit is 1 or 0?
3. Write an assembly language code for a bubble sort
subroutine taking parameters from stack.
4. Which interrupt is used to read Disk System and how
can we read this system? Also mention (any four)
attributes which are used in this service.
1. Write an assembly program attributes for loading
program using INT 21 Service.
2. Keeping the VESA services into view, describe the
purpose of following two instructions.
mov ax, 0x4f02
mov bx, 0x4117
Why a segment start cannot start from the physical
address 55555 ???
This assumes that your target OS is greater than 8 bits.
The code and data segments must align to OS resolution.
For example if you're using a 32 bit OS, the segments
must start on addresses that are multiples of 32.
How to process Chargen services?
Ans:
INT 10 - TEXT-MODE CHARGEN
AX = 1110h
ES:BP -> user table
CX = count of patterns to store
DX = character offset into map 2 block
BL = block to load in map 2
BH = number of bytes per character pattern
Draw a diagram of serial port and write the name of all
componet?
6
1
7
2
8
3
9
4
5
1 = Carrier Detect (CD)
2 = Received Data (RD)
3 = Transmitted Data (TD)
4 = Data Terminal Ready (DTR)
5 = Signal Ground
6 = Data Set Ready (DSR)
7 = Request to Send (RTS)
8 = Clear to Send (CTS)
9 = Ring Indicator (RI)
push function ?
Ans:
text mode main int 10 service main kon kon se register
used hoty hain?write the name of 3?
write the used of com 1?
Its primary purpose is to serve as a communications port,
either to an internal or external modem, or as a connection
into a mainframe computer. some times it use as a general
purpose expansion port and been used to attach mouse,
printers, and cameras to a computer.
1. How many bytes floppy root directory entry has? (2)
Floppy root directory entry has 512 bytes of data.
1. How many calling conversion also tell the names? (2)
2. Which register is used as thread local variable? (2)
3. Write down the operations of CMP instruction? (2)
1. It is the part of Multitasking TSR caller, what will do
these instructions comment against them (3)
Mov al, [chars+bx]…………… read the next shape
Mov [es:40],al………………… print at specified place
Inc bx ………………………. increment to next shape
Ans:
Mov al, [chars+bx]…………… read current shape
Mov [es:40],al………………… print at specified place
Inc bx ………………………. increment to next shape
1. Differentiate synchronous transmission and
asynchronous transmission? (3)
Ans:
In synch transmission, the two units
share a common clock
frequency and bits are transmitted
continuously at the rate
directed by the clock pulse. in long
distant serial
transmission , each unit is driven by
separate clock of
the same frequency. synchronization
signals are transmitted
periodically b/w the two units to keep
there clocks in step
with each other.
A serial asynchronous data
transmission technique used in
many interactive terminals employs
special bits that are
inserted at both ends of the character
code. with this
technique , each character consists of
three parts ;a start
bit , the character bit, and stop
bits.
1. List some architecture? (3)



Intel APX 88 architecture
Sun SPARC…….(scalable processor architecture)
Motorola 68K
Subjective (every question has 5 marks)
1.
What information is required to be provided for
the service “INT14-SERIAL WRITE CHARACTER TO
PORT” in the following registers?
AH=___________
AL=___________
DX=___________
Ans:
INT 14 - SERIAL - WRITE CHARACTER TO PORT
AH = 01h
AL = character to write
DX = port number (00h-03h)
Return:
AH bit 7 = error flag
AH bits 6-0 = port status
2.
Write into C language
[section.txt]
Global swap
swap:
mov ecx,[esp+4]
copy parameters p1 to ecx
mov edx[esp+8]
copy parameters p2 to
edx
mov eax,[ecx]
copy *p1 to eax
xchg eax,[edx]
exchange eax to
mov [ecx],eax
copy eax to *p1
*p2
ret
return
Ans:
The above code will assemble in c through this command.
Other aurwise error will occur.
Nasm-f win32 swap .asm
This command will generate swap.obj file.
The code for given program will be as follow.
#include <stdio.h>
Void swap(int* pl, int* p2);
Int main()
{
Int a=10,
Int b= 20;
Print f (“a=%d b=%d\n” , a ,b);
Swap (&a ,&b);
Print f (“a=%d b=%d\n” , a ,b);
System ( “pause”);
Return 0;
}
1. Which instruction makes trap flag zero? If there is
not any then how we make it zero?
There is no instruction to set or clear the trap flag like
there are
instructions for the interrupt and direction flags. We use
two special
instructions


PUSHF and
POPF
to push and pop the flag from the stack. We use PUSHF
to place flags on the stack, change TF in this image on the
stack and then reload into the flags register with POPF.
The single step interrupt will come after the first
instruction after POPF. The interrupt mechanism
automatically clears IF and TF otherwise there would an
infinite recursion of the single step interrupt. The TF is set
in the flags on the stack so another
interrupt will comes after one more instruction is executed
after the return of the interrupt. the current value of
FLAGS is pushed on
the stack, then the current code segment is pushed, then
the offset of the next instruction is pushed. After this it
automatically clears the trap flag and the interrupt flag to
disallow further interrupts until the current routine
finishes.
All the mcqs were from past papers solved by moaaz ..
and subjective part is here 1) For which purpose INT 1 is
used & describe the functionality of this interrupt
2) write the four main character of sun SPARC processor
3) write the interrupt number for BIOS disk service
4) which two I/O ports are designated for interrupt
controller
5) The following code is written in C program write it in
assembly language
"Int subtract (int x,int y)"
6)how many routines required to be defined by a device
driver write their names also.
7) why INT and flags are cleared?
8) in order to terminate program we can use 4C or
service 31 of INT , explain how it works.
9) write the different register setting for memory
allocation using int 21 service
10) write the service following codes providing
Mov si,12
Mov al ,[cs:si]
Mov [opcode],al
Mov byte [cs:si],0*CC
11) write the code for disable sound card of system using
PIC post in assembly language
12)the following code is written in C language write the
code in assembly language
"Int multiply (int x,int y);"
85% above mcqs paper was from moaz file:
jo long yaad hain wo ye hain:
Q:what is the role of segment descriptor?(2)
Q:what is the purpose of multithreading?(2)
Q:what is the purpose of Abort?(2)
Q:why conflict IRQ occur in a system?
Q:Inturrupt for extended read disk,mention all attributes..
Q:what inturrupt is used for Disk file system?
Q:1 question was from SPARC processor?
Q:1 question was from video services?
Q:1 question was from (PIC) of 5 marks?
Q:1 question was like for which output device we use
ACK pin..is trhan se tha kuch..
Q:the following code is written in C language write the
code in assembly language
"Int multiply (int x,int y);"
PIC ka function and its working 5 marks
code lehna tha line drawing ka yeh moazz ki file sy tha.
int21 services keh attribute wala lehna tha.bahqi 3 marks
keh question easy thy protected modes wala chapter
zeroar and conserteration sy kerna 3 marsk waly is
chapter sy ahy thy .
CS401 Paper 01-03-2014
1)after executing what is the effect on MSB of
accumulator.
2)Purpose of Abort.??
3)write in assembly int add(int x int y)
4)initialization of break point interrupt
5)about context switching (5)
6)debugger using break point interrupt and single point
interrupt..(5)
7)how many pins serial ports have and what type of
communication it is,.? (5)
8)write assembly instruction to call the function int
multiply(int x int y)(5)
MCQ from DB9 and INT, technical
Q: motorola p tha aik question
Q: explain INterrupts in computers
Q : BIOS video k INT 10 services di thi first three wali wo
servies k fuction likhny thy
Q: what happen if program is terminated by usind INT 21
service 31????
Q: modes ki types
Q: request header ka fromat
Q: Startegy routines ka function in device drivers
Q: SPARC me dada movement ki examples
Q: Motorola ki dada movement istructions di thi un ko
expalin krna tha
Q: write int , servies fro graphic pixel
Q: which int and registers are use to inilialize the threads
Q: write the service following codes providing
Mov si,12
Mov al ,[cs:si]
Mov [opcode],al
Mov byte [cs:si],0*CC
CS401 Paper 01-03-2014
1)after executing what is the effect on MSB of
accumulator.
2)Purpose of Abort.??
3)write in assembly int add(int x int y)
4)initialization of break point interrupt
5)about context switching (5)
6)debugger using break point interrupt and single point
interrupt..(5)
7)how many pins serial ports have and what type of
communication it is,.? (5)
8)write assembly instruction to call the function int
multiply(int x int y)(5)
Download