Showing posts with label SS. Show all posts
Showing posts with label SS. Show all posts

Sunday, August 31, 2014

UNIT V - TEXT EDITORS

1. What is error handler? 
The error handler is used to check if there is an error in the program. If any error, it should warn the programmer by instructions to proceed from phase to phase.

 2. Name some of text editors.
 line editors
 stream editors
 screen editors
 word processors
 structure editors

3. What for debug monitors are used? 
Debug monitors are used in obtaining information for localization of errors. 

4. Mention the features of word processors.
 moving text from one place to another
 merging of text
 searching
 word replacement

5. What are the phases in performing editing process?
 Traveling phase
 Filtering phase
 Formatting phase
 Editing phase

6. Define traveling phase. 
The phase specifies the region of interest. Traveling is achieved using operations such as next screenful, bottom, find pattern.

7. Filtering phase.
 The selection of what is to be viewed and manipulated in given by filtering.

 8. Editing phase 
In this phase, the target document is altered with the set of operations such as insert, delete, replace, move and copy. 

Saturday, August 30, 2014

UNIT V - TEXT EDITORS

1. Define interactive editor?
 An interactive editor is a computer program that allows a user to create and revise a target document. The term document includes objects such as computer programs, text, equations, tables, diagrams, line art, and photographs anything that one might find on a printed page. 

2. What are the tasks performed in the editing process? 
4 tasks
 Select the part of the target document to be viewed and manipulated.
 Determine how to format this view on-line and how to display it.
 Specify and execute operations that modify the target document.
 Update the view appropriately.

3. What are the three categories of editor’s devices?
 Text device/ String devices
 Button device/Choice devices
 Locator device

4. What is the function performed in editing phase? 
In the actual editing phase, the target document is created or altered with a set of operations such as insert, delete, replace, move and copy.

5. Define Locator device? 
Locator devices are two-dimensional analog-to-digital converters that position a cursor symbol on the screen by observing the user‟s movement of the device. The most common such devices for editing applications are the mouse and the data tablet.

6. What is the function performed in voice input device?
 Voice-input devices, which translate spoken words to their textual equivalents, may prove to be the text input devices of the future. Voice recognizers are currently available for command input on some systems.

Friday, August 29, 2014

UNIT IV - MACRO PROCESSORS

1. How the macro is processed using two passes? 
Pass 1: processing of definitions
Pass 2:actual-macro expansion.

2. Give the advantage of line by line processors.
 It avoids the extra pass over the source program during assembling.
 It may use some of the utility that can be used by language translators so that can be loaded once.

3. What is meant by line by line processor?
 This macro processor reads the source program statements, process the statements and then the output lines are passed to the language translators as they are generated, instead of being written in an expanded file.

4. Give the advantages of general-purpose macro processors.
 The programmer does not need to learn about a macro facility for each compiler.
 Overall saving in software development cost and maintenance cost.

5. What is meant by general-purpose macro processors? 
The macro processors that are not dependent on any particular programming language, but can be used with a variety of different languages are known as general purpose macro processors. Eg. The ELENA macro processor.

Thursday, August 28, 2014

UNIT IV - MACRO PROCESSORS

1. Define macro processor.
Macro processor is system software that replaces each macro instruction with the corresponding group of source language statements. This is also called as expanding of macros.


2. What do macro expansion statements mean?
 These statements give the name of the macroinstruction being invoked and the arguments to be used in expanding the macros. These statements are also known as macro call.

 3. What are the directives used in macro definition?
MACRO - it identifies the beginning of the macro definition
 MEND - it marks the end of the macro definition

4. What are the data structures used in macro processor? 
DEFTAB – the macro definitions are stored in a definition table i.e. it contains a macro prototype and the statements that make up the macro body. NAMTAB – it is used to store the macro names and it contains two pointers for each macro instruction which indicate the starting and end location of macro definition DEFTAB. it also serves as an index to DEFTAB ARGTAB – it is used to store the arguments during the expansion of macro invocations

5. Define conditional macro expansion.
If the macro is expanded depends upon some conditions in macro definition (depending on the arguments supplied in the macro expansion) then it is called as conditional macro expansion. 

Wednesday, August 27, 2014

UNIT III - LOADERS AND LINKERS

1. Write the two passes of a linking loader
Pass1: assigns address to all external symbols 
Pass2: it performs actual loading, relocation and linking. 

2. Define automatic library search.
 In many linking loaders the subroutines called by the program being loaded are automatically fetched from the library, linked with the main program and loaded. This feature is referred to as automatic library search.

3. List the loader options INCLUDE &DELETE
The general format of INCLUDE is INCLUDE program_name (library name) 
This command directs the loader to read the designated object program from a library and treat it as the primary loader input.
 The general format of DELETE command is DELETE Csect-name 
It instructs the loader to delete the named control sections from the sets of programs loaded. 

4. Give the functions of the linking loader.
 The linking loader performs the process of linking and relocation. It includes the operation of automatic library search and the linked programs are directly loaded into the memory.

 5. Define dynamic linking
If the subroutine is loaded and linked to the program during its first call (run time), then it is called as dynamic loading or dynamic linking. 

Tuesday, August 26, 2014

UNIT III - LOADERS AND LINKERS

1. What are the basic functions of loaders?
 Loading – brings the object program into memory for execution
 Relocation – modifies the object program so that it can be loaded at an address different from the location originally specified
 Linking – combines two or more separate object programs and also supplies the information needed to reference them.

2. Define absolute loader. 
The loader, which is used only for loading, is known as absolute loader. e.g. Bootstrap loader

3. What is meant by bootstrap loader? 
This is a special type of absolute loader which loads the first program to be run by the computer. (usually an operating system) 

4. What are relative (relocative) loaders?
 Loaders that allow for program relocation are called relocating (relocative) loaders.

5. What is the use of modification record? 
Modification record is used for program relocation. Each modification record specifies the starting address and the length of the field whose value is to be altered and also describes the modification to be performed.

Monday, August 25, 2014

System Software - Unit 2

1. What is the use of base register table in AIX assembler?
 A base register table is used to remember which of the general purpose registers are currently available as base registers and also the base addresses they contain. USING statement causes entry to the table and .DROP statement removes the corresponding table entry. 

2. Differentiate the assembler directives RESW and RESB.
 RESW –It reserves the indicated number of words for data area. Eg: 10 1003 THREE RESW 1 In this instruction one word area (3 bytes) is reserved for the symbol THREE. If the memory is byte addressable then the address assigned for the next symbol is 1006.
 RESB –It reserves the indicated number of bytes for data area. Eg: 10 1008 INPUT RESB 1 In this instruction one byte area is reserved for the symbol INPUT .Hence the address assigned for the next symbol is 1009.

3. Define modification record and give its format.
This record contains the information about the modification in the object code during program relocation. The general format is Col 1 M Col 2-7 Starting location of the address field to be modified relative to the beginning of the program Col 8-9 length of the address field to be modified in half bytes. 

4. Write down the pass numbers (PASS 1/ PASS 2) of the following activities that occur in a two pass assembler: 
a. Object code generation 
b. Literals added to literal table 
c. Listing printed 
d. Address location of local symbols 

Answer: a. Object code generation - PASS 2 b. Literals added to literal table – PASS 1 c. Listing printed – PASS2 d. Address location of local symbols – PASS1 

5. What is meant by machine independent assembler features? 
The assembler features that do not depend upon the machine architecture are known as machine independent assembler features. Eg: program blocks, Literals.

6. How the register to register instructions are translated in assembler? 
In the case of register to register instructions the operand field contains the register name. During the translation first the object code is converted into its corresponding machine language equivalent with the help of OPTAB. Then the SYMTAB is searched for the numeric equivalent of register and that value is inserted into the operand field. Eg: 125 1036 RDREC CLEAR X B410 B4-macine equivalent of the opcode CLEAR 10-numeric equivalent of the register X. 

Sunday, August 24, 2014

System Software - Unit 2

1. Define the basic functions of assembler.
 * Translating mnemonic operation codes to their machine language equivalents.
* Assigning machine addresses to symbolic labels used by the programmer.

 2. What is meant by assembler directives? 
Give example. These are the statements that are not translated into machine instructions, but they provide instructions to assembler itself. 
example START,END,BYTE,WORD,RESW and RESB

3. What are forward references? 
It is a reference to a label that is defined later in a program.
 Consider the statement 
10 1000 STL RETADR 
. . . . . . . . 
80 1036 RETADR RESW 1 
The first instruction contains a forward reference RETADR. If we attempt to translate the program line by line, we will unable to process the statement in line10 because we do not know the address that will be assigned to RETADR .The address is assigned later(in line 80) in the program. 

4. What are the three different records used in object program? 
The header record, text record and the end record are the three different records used in object program.
 (i)The header record contains the program name, starting address and length of the program. 
(ii)Text record contains the translated instructions and data of the program. 
(iii) End record marks the end of the object program and specifies the address in the program where execution is to begin.

5. What is the need of SYMTAB (symbol table) in assembler? 
The symbol table includes the name and value for each symbol in the source program, together with flags to indicate error conditions. Some times it may contain details about the data area. SYMTAB is usually organized as a hash table for efficiency of insertion and retrieval.

6. What is the need of OPTAB (operation code table) in assembler? 
The operation code table contains the mnemonic operation code and its machine language equivalent. Some assemblers it may also contain information about instruction format and length. OPTAB is usually organized as a hash table, with mnemonic operation code as the key.

7. What are the symbol defining statements generally used in assemblers? 
„EQU‟-it allows the programmer to define symbols and specify their values directly. 
The general format is 
Symbol EQU value „ORG‟-it is used to indirectly assign values to symbols. When this statement is encountered the assembler resets its location counter to the specified value. The general format is ORG value In the above two statements value is a constant or an expression involving constants and previously defined symbols.

Saturday, August 23, 2014

System Software Unit 1

1. Differentiate trailing numeric and leading separate numeric. 
The numeric format is used to represent numeric values with one digit per byte. In the numeric format if the sign appears in the last byte it is known as the trailing numeric. If the sign appears in a separate byte preceding the first digit then it is called as leading separate numeric.

2. What are the addressing modes used in VAX architecture? 
Register direct; register deferred, auto increment and decrement, program counter relative, base relative, index register mode and indirect addressing are the various addressing modes in VAX architecture. 

3. How do you calculate the actual address in the case of register indirect with immediate index mode? 
Here the target address is calculated using the formula T.A =(register) + displacement.

4. Write the sequence of instructions to perform the operation BETA = ALPHA + 1 using SIC instructions.
LDA          ALPHA
ADD        ONE 
STA          BETA
 …. …. 

ALPHA         RESW 1 
BETA           RESW 1 
ONE             RESW 1

5. Write the sequence of instructions to perform the operation BETA = ALPHA+5 using SIC/XE instructions.
LDA          ALPHA 
ADD          #1 
STA         BETA 
…. …. 
ALPHA      RESW       1
 BETA       RESW   1

6. What is the use of TD instruction in SIC architecture?
 The test device (TD) instruction tests whether the addressed device is ready to send or receive a byte of data. The condition code is set to indicate the result of this test. Setting of < means the device is ready to send or receive, and = means the device is not ready.

Friday, August 22, 2014

System Software - Unit 1

1. Define system software. 
It consists of variety of programs that supports the operation of the computer. This software makes it possible for the user to focus on the other problems to be solved without needing to know how the machine works internally. Eg: operating system, assembler, loader. 

2. Give some applications of operating system.
 to make the computer easier to use
 to manage the resources in computer
 process management
 data and memory management
 to provide security to the user.
 Operating system acts as an interface between the user and the system
Eg: windows, linux, unix, dos

3. Define compiler and interpreter. 
Compiler is a set of program which converts the whole high level language program to machine language program. Interpreter is a set of programs which converts high level language program to machine language program line by line

4. Define loader. 
Loader is a set of program that loads the machine language translated by the translator into the main memory and makes it ready for execution. 

5. What is the need of MAR register?
 MAR (memory address register) is used to store the address of the memory from which the data is to be read or to which the data is to be written.