This action might not be possible to undo. Are you sure you want to continue?
NAVIS NAYAGAM Assistant Professor UNIT I INTRODUCTION 1. Define System Software. It consists of variety of programs that supports the operation of the computer. It makes it possible for the user to focus on the other problems to be solved without needing to know how the machine works internally. 2. Distinguish between System Software & application software.
3. Define hypothetical computer model. Hypothetical computer is an imaginary computer that has been designed to include the hardware features mostly found on real machines Eg: SIC, SIC-XE 4. Give the instructions format of SIC. All machine instructions on the standard version of SIC have the following 24-bit format: The flag bit X is used to indicate the indexed addressing mode 5. Give the instruction set of SIC. Load and store instructions (LDA, LDX, STA, STX) Integer arithmetic operations (ADD, SUB, MUL, DIV) Comparison operation (COMP) Conditional Jump operations (JLT, JEQ, JGT) Jump to Subroutine instruction (JSUB) Return to Subroutine (RSUB)
Status word – contains Condition Code (CC) information. Interpreter is a set of programs which converts high level language program to machine language program line by line.6. Write down the use of the status word (SW) register. . The result of a comparison operation affects the condition codes in the status register. Give any two differences between base relative addressing and program counter relative addressing used in SIC/XE. Base Relative Addressing Program Counter Relative Addressing Target address is calculated using the Target address is calculated using the formula formula TA = Displacement + Contents of base TA= Displacement + contents of register Program Counter register Displacement lies between 0 to 4095 Displacement lies between -2048 to 2047 10. Each register is 24 bits in length 8. Define compiler and interpreter. Condition code is also used to check whether a device is ready or busy. Compiler is a set of program which converts the whole high level language program to machine language program. What are the registers used in SIC/XE? 9. 7. What are the registers used in SIC? There are 5 registers in SIC machine.
Setting of < means the device is ready to send or receive. on the other hand. The condition code is set to indicate the result of this test. 15. Define immediate addressing. rather than any particular application. the target address is calculated by adding displacement and the content of program counter. are intended to support the operation and use of the computer itself. An application program is primarily concerned with the solution to some problem. The focus is on the application. using computer as a tool. There is no need to refer memory. and = means the device is not ready. Define program counter relative mode of addressing. How floating-point data type is represented in SIC/XE version? The floating point data type size is 48 bits and it is represented as follows The fraction is interpreted as a value between 0 and 1. 12. immediate addressing and indirect addressing modes 17. In this addressing mode the operand value is given directly as a part of the instruction itself. The exponent is an unsigned binary number between 0 and 2047. 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. System programs. List any four addressing modes of SIC/XE Base relative addressing mode. 13.11. The immediate addressing is indicated by the prefix ‘#’. They are usually related to the architecture of the machine on which they are to run. 14. Program counter relative addressing mode. The value contained in this word is then taken as the address of the operand value Eg: J @ RETADR 16. How system software is different from Application Software? The most important characteristic in which most system software differs from application software is machine dependency. In Program-counter mode of addressing. (0=Positive and 1 = Negative) . The sign of the floating point number is represented by S. Define indirect addressing mode in SIC/XE. Eg: ADD #5 In this instruction one operand is in accumulator and the second operand is an immediate value the value 5 is directly added with the accumulator content and the result is stored in accumulator. In the case of indirect addressing word at the given location given by the target address is fetched. not on the application system.
g. Such upward compatibility is found in real world computers which are closely related to one another. 20. which when executed generates an interrupt that can be used for communicating with the operating system. What is the use of SVC instruction in SIC/XE? A special supervisor call instruction is provided by SIC XE. An object program for the standard SIC machine will also execute on a SIC XE system. Pentium Pro CISC It contains more No of Instructions It has less registers Complex Instruction set Computer E. Compare RISC and CISC machines. Define upward compatibility in systems.18.g. Power PC . VAX. What are the important machine structures used in the design of system software? Memory structure Registers Data formats Instruction formats Addressing modes Instruction set 21. RISC It contains less No of Instructions It has more registers Reduced Instruction set Computer E. Ultra SPARC. 19. This is known as upward compatibility.
END.2~7 Address of first executable instruction (hex) 5. 2-7 Program name Col. Example 10 STL RETADR • RETADR is not yet defined when we encounter STL instruction • So it is called forward reference 6. What is an Assembler? An assembler is a program that accepts an assembly language program as input and produces its machine language equivalent along with information for the loader 2. WORD.2-7 Starting address in this record (hex) Col. RETADR -> 1033 • Build the machine instructions in the proper format • Convert the data constants to internal machine representations E. but they provide instructions to assembler itself. What is forward reference? Forward reference is a reference to a label that is defined later in the program.1 T Col. BYTE. 1 H Col. What are the Data Structures used in an Assembler? . The assembler directives are not translated into machine instructions.g.g.g. Eg: START. What is meant by assembler directives? Give example. 14-19 Length of object program in bytes (hex) Text record: Col. 8-13 Starting address (hex) Col.1 E Col. 10-69 Object code (hex) (2 columns per byte) End record: Col. What is the format of the Object Program generated by the Assembler? Contains 3 types of records: Header record: Col. 8-9 Length of object code in this record in bytes (hex) Col. RESW and RESB. EOF -> 454F46 • Write the object program and the assembly listing 4. What are the basic functions of an assembler? • Convert mnemonic operation codes to their machine language equivalents E. 3. STL -> 14 • Convert symbolic operands to their equivalent machine addresses E.UNIT II ASSEMBLERS 1.
OPTAB is usually organized as a hash table. What is Location Counter? Location Counter is a variable used to help in assignment of addresses. Define re-locatable program.g. 10. 8.: BUFEND – BUFFER If the result of the expression is relative to the beginning of the program then it is known as relative expression. Some assemblers may also contain information about instruction format and length. SYMTAB is usually organized as a hash table for efficiency of insertion and retrieval. 9. E. An object program that contains the information necessary to perform required modification in the object code depends on the starting location of the program during load time is known as re-locatable program. 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. Sometimes it may contains details about the data area. 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. This kind of sharing of the machine between programs is called multiprogramming • Load programs into memory wherever there is room • There is no need to assign a fixed address at assembly time 12. If the result of the expression is an absolute value (constant) then it is known as absolute expression.g. with mnemonic operation code as the key. Differentiate absolute expression and relative expression.: BUFEND + BUFFER .Operation Code Table (OPTAB) Symbol Table (SYMTAB) Location Counter (LOCCTR) 7. It is initialized to the beginning address specified in the START statement. Label on instructions and data areas and references to the location counter values are relative terms. • Several programs can be loaded and run at the same time. together with flags to indicate error conditions. 11. What are the advantages of program relocation? The advantages of program relocation are as follows. It is incremented based on the size of the instruction in bytes. E.
Eg: 10 1008 INPUT RESB 1 In this instruction one byte area is reserved for the symbol INPUT . Control sections are most often used for subroutines. Define control section. What are the two different types of jump statements used in MASM assembler? Near jump A near jump is a jump to a target in the same segment and it is assembled by using a current code segment CS. each control section can be loaded and relocated independently of the others. If the memory is byte addressable then the address assigned for the next symbol is 1006. Far jump A far jump is a jump to a target in a different code segment and it is assembled by using different segment registers. Such references between control sections are called external references. 15. Define modification record and give its format The modification record contains the information about the modification in the object code during program relocation. 16. Define load and go assembler. Here no object programmer is written out and hence there is no need for loader. The major benefit of using control sections is to increase flexibility. 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. RESW –It reserves the indicated number of words for data area. the assembler is unable to process these references in normal way. 18. One pass assembler that generates their object code in memory for immediate execution is known as load and go assembler. What is meant by external references? Assembler program can be divided into many sections known as control sections and each control section can be loaded and relocated independently of the others. Eg: 10 1003 THREE RESW 1 In this instruction one word area(3 bytes) is reserved for the symbol THREE.Hence the address assigned for the next symbol is 1009. 14. RESB –It reserves the indicated number of bytes for data area. . Differentiate the assembler directives RESW and RESB. A control section is a part of the program that maintain its identity after assembly. 17. If the instruction in one control section needs to refer instruction or data in another control section.13.
This record gives information about external symbols that are defined in a particular control section. What is the difference between the assembler directive EXTREF and EXTDEF EXTDEF names external symbols that are defined in a particular control section and may be used by other sections. 20. The format is Col 1 D Col 2-7 Name of external symbol defined in this control section Col 8-13 Relative address of the symbol with in this control section Col 14-73 Name and relative address for other external symbols. What is a multi-pass assembler? A multi-pass assembler is an assembler that can make as many passes that are needed to process the definitions of symbols. Give the general format of define record. . EXTREF names external symbols that are referred in a particular control section and defined in another control section. 21.19.
What are re-locatable loaders? What are the different methods for specifying relocation? Loaders that allow for program relocation are called relocating loaders. the bit mask FFC (111111111100) specifies that the first 10 words of object code are to be modified during relocation. Loading brings the object program into memory for execution Linking combines two or more separate object programs and supplies the information needed to reference them Relocation modifies the object program so that it can be loaded at an address different from the location originally specified 2. . It also indicates in which control section the symbol is defined. 3. 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. 7. the standard SIC machine) 5. What is the use of modification record? Modification record is used for program relocation. What is the need of ESTAB? It is used to store the name and address of the each external symbol. It is not capable of performing relocation. Define absolute loader The loader which is used only for loading an absolute object program to a fixed address is called an absolute loader.g. Modification records. For e. which is called the bit mask. the bootstrap loader loads the first program (usually Operating System) to be run into memory 4.UNIT III LOADERS AND LINKERS 1.Suitable for a large number of relocations required when only direct addressing mode can be used in a machine with fixed instruction format (e. What is a bootstrap loader? When a computer is first tuned on or restarted.Suitable for a small number of relocations required when relative or immediate addressing modes are extensively used Relocation bits. 6.g. Linking and Relocation. What do you mean by a bitmask? The relocation bits are gathered following the length indicator field in the text record. Define Loading. a special type of absolute loader.
This feature is referred to as automatic library search. The starting address is obtained from the operating system. Give the difference between linking loader and linkage editors. Pass1: assigns address to all external symbols Pass2: it performs actual loading. What is the use of the variable PROGADDR? It gives the beginning address in memory where the linked program is to be loaded. 14. It becomes the address of the first control section. Give the two passes of a linking loader. In many linking loaders the subroutines called by the program being loaded are automatically fetched from the library. 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. It includes the operation of automatic library search and the linked programs are directly loaded into the memory. Define automatic library search. 11. Give the functions of the linking loader. 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. 13. List the loader options INCLUDE &DELETE. The linking loader performs the process of linking and relocation. linked with the main program and loaded. Linking Loader relocation and linking is performed each time the program is loaded Two passes are required Linkage Editor produces a linked version of a program and which is written in a file for later execution Here the loading can be accomplished in a single pass . relocation and linking.8. What is the use of the variable CSADDR? CSADDR contains the starting address assigned to the control section currently being scanned by the loader 10. 9. 12.
it is not possible to load just the required subroutines alone. called a load module or an executable image. a simple relocating loader can be used to load the program into memory. A linkage editor produces a linked version of the program. The loading can be achieved in a single pass. Define Linkage Editor. 19. which is written to a file or library for later execution. a) It has the ability to load the routine only when they are needed b) The dynamic linking avoids the loading of entire library for each execution c) It saves substantial time and memory space d) Allow several executing programs to share one copy of a subroutine or library 17. Also. The values for code modification can be obtained by simply indexing into an array of these values. . 18. When the user is ready to run the linked program. The advantage of this mechanism is that it avoids multiple searches of ESTAB for the same symbol during the loading of a control section. MS-DOS Linker is a linkage editor that combines one or more object modules to produce a complete executable program. Define MS-DOS Linker. the address at which the program is to be loaded must be specified beforehand. This reference number is used in modification records. List the disadvantages of absolute loader. 20. For an absolute loader. Give the advantages of dynamic linking. What is the advantage of reference-number mechanism? The reference-number mechanism assigns a reference number to each external symbol referred to in a control section. An external reference symbol can be looked up in ESTAB once for each control section that uses it. Thus it is disadvantageous as it is inefficient in terms of both space and execution time. If the subroutine is loaded and linked to the program during its first call (run time). the linking function is postponed until execution time. then it is called as dynamic loading or dynamic linking.15. Define dynamic linking or dynamic loading. 16. In dynamic linking.
6. What is a macro time variable? Macro time variable can be used to store working values during the macro expansion. Macro Body . 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. it contains a macro prototype and the statements that make up the macro body. Statement A MEND 4. 5. This is also called as expanding of macros. 2.UNIT IV MACRO PROCESSORS 1. The statements inside these directives called as MACRO body that is defined with the macro name. What are the data structures used in macro processor? DEFTAB – the macro definitions are stored in a definition table i. Macro processor is system software that replaces each macroinstruction with the corresponding group of source language statements. It also serves as an index to DEFTAB ARGTAB – it is used to store the arguments during the expansion of macro invocations. Define macro processor.. What do you mean by a macro? A macro represents the commonly used group of statements in the source programming language. The structure of macro definition is Macroname MACRO Parameters Statement 1 Statement 2 . Any symbol that begins with the character & and then is not a macro instruction parameter is assumed to be a macro time variable. 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 in DEFTAB. It allows the programmer to write a short hand version of the program. Give the general structure of a Macro Definition? MACROS are defined using two assembler directives MACRO and MEND. . Define conditional macro expansion.e. 3.
regardless of how many times the subroutine is called. the call is done by outer macro and the macro called is the inner macro. Eg. process the statements and then the output lines are passed to the language translators as they are generated. 8. What is meant by general-purpose macro processors? The macro processors that are not dependent on any particular programming language. What is meant by line by line processor? This macro processor reads the source program statements. Statements in a subroutine appear only once. then these parameters in macro definitions are called as positional parameters. but can be used with a variety of different languages are known as general purpose macro processors. What is a nested macro call? The statement in which a macro calls on another macro is called nested macro call. In the nested macro call. In case of nested macro calls the expansion of the latest macro call is completed first. 12.EXPR) Expand the macro instruction DISPLAY (X). What is the difference between a Macro and a subroutine? The statements that form the body of the macro are generated each time a macro is expanded. What is the symbol used to generate unique labels? $ Symbol is used in macro definition to generate unique symbols. 11. How the nested macro calls are executed? The execution of nested macro call is done using a stack using the Last in First out rule. How the macro is processed using two passes? Pass1: processing of definitions Pass 2: actual-macro expansion. Each macro expansion the $ symbol is replaced by $XX. Consider the macro definition #Define DISPLAY (EXPR) Printf(“EXPR = %d\n”.7.The ELENA macro processor. 13. . where XX is the alpha numeric character. 14. Ans: Printf (“EXPR = %d\n”. 15. instead of being written in an expanded file. 10. X) 9. What is meant by positional parameters? If the parameters and arguments were associated with each other according to their positions in the macro prototype and the macro invocation statement.
DATA2.g. The end of the macro is marked by ENDM. . What is the purpose of conditional compilation statement in ANSI C preprocessor? These statements can be used to be sure that a macro is defined at least once.. DIRECT. a1= DATA3 GENER TYPE = DIRECT. 19. with each other according to their positions in the macro prototype and the macro invocation statement.g.. CHANNEL = 3. What are positional parameters? How do they differ from keyword parameters? Positional parameters are the one that are supplied with MACRO directive in the macro definition. a2= DATA2. The macro parameters in MASM need not begin with & or any other special character. In MASM macro processor the conditional macro expansion statements are called CONDITIONAL ASSEMBLY statements.3 Keyword Argument STRG a3 = DATA1 . 20. The body of the macro definition might contain a statement like: LDA X&ID in which the parameter &ID is concatenated after the character string X.16. In keyword parameter. Here the parameters and arguments (given in macro call ) were associated. The macro processor of MASM is integrated with Pass 1 of the assembler. DATA3 GENER .. Arguments may be any order here. Macros may be redefined within the program without causing an error. 18.. Positional Argument STRG DATA1. Suppose that the parameter to such a macroinstruction is named &ID. #ifndef Buffer-size #define Buffer-size 1024 #endif The statements will be processed only if buffer-size has not already been defined. List the features of MASM macro processor. What are the machine independent features of macro processors? Concatenation of macro parameters Generation of unique labels Conditional macro expansion Keyword Macro Parameters 17. the argument value is written with a keyword that names the corresponding parameter. E. E. What is meant by concatenation of macro parameter? Most macro processors allow parameters to be concatenated with other character string.
What is the function performed in editing phase? In the actual editing phase. What is a 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. Determine how to format this view on-line and how to display it. 2. Specify and execute operations that modify the target document. Text device/ String devices 2. move and copy. 7. equations. and photographs any thing that one might find on a printed page. 4. diagrams. 6. Locator device 4. The most common such devices for editing applications are the mouse and the data tablet. delete. 5. replace.V 1. constants. 3. operators and punctuation symbols such as commas and parentheses are typical tokens. 3.UNIT. Identifiers. line art. Name some of typical tokens. the target document is created or altered with a set of operations such as insert. Select the part of the target document to be viewed and manipulated. tables. The term document includes objects such as computer programs. What are the tasks performed in the editing process? 1. Define interactive editor? An interactive editor is a computer program that allows a user to create and revise a target document. . 2. What are called tokens? The lexical analyzer tracks the source program one character at a time by making the source program into sequence of atomic units is called tokens. text. Update the view appropriately. keywords. Button device/Choice devices 3. What are the three categories of editor’s devices? 1.
Name some of text editors. a) Moving text from one place to another b) Merging of text c) Searching d) Word replacement 15. bottom. Editing phase 16. Filtering phase c.8. 14. If any error. a) line editors b) stream editors c) screen editors d) word processors e) structure editors 13. . 10. The phase specifies the region of interest. Traveling is achieved using operations such as next screenful. What for debug monitors are used? Debug monitors are used in obtaining information for localization of errors. Mention the features of word processors. What is error handler? The error handler is used to check if there is an error in the program. Define traveling phase. it should warn the programmer by instructions to proceed from phase to phase. What is meant by code optimization? The code optimization is designed to improve the intermediate code. Formatting phase d. 12. The main disadvantage of interpreter is that the execution time of interpreted program is slower than that of a corresponding compiled object program. which helps the object program to run faster and takes less space. What is meant by lexeme? The character that forms a token is said to be a lexeme. 9. Traveling phase b. find pattern. 11. What are the phases in performing editing process? a. Mention the main disadvantage of interpreter.
which accepts data from the outside world and translates them into a form. The command language processor accepts input from the users input devices and analyzes the tokens and syntactic structure of the commands. delete. Typing –oriented or text command oriented method b. Define interactive debugging systems An interactive debugging system provides programmers with facilities that aid in the testing and debugging of programs. Time sharing b. 18. Define input device? Input device is an electromechanical device. replace. The selection of what is to be viewed and manipulated in given by filtering. 24. Define Filtering phase. Define output devices Output devices are used to view the elements being edited and the results of the editing operations. Menu oriented method 23. 22. What are the basic types of computing environments used in editor’s functions? Editor function in three basic types of computing environments a. Define Editing phase In this phase. User interface is generally designed in a computer to make it easier to use. 19. 25. the target document is altered with the set of operations such as insert. Stand-alone c. which the computer can interpret. 20. which allows the user to communicate with the system in order to perform certain tasks. move and copy. What are the methods in Interaction language of a text editor? a. Define editor structure.17. Define user interface? User interface is one. 21. Function key interfaces c. Distributed .
the start area to be viewed is determined by the current viewing pointer. 28. 27. This pointer is maintained by viewing component of the editor. What is the function of command language processor? It accepts inputs from the users and analyses tokens and syntactic structure of commands. . 27. Write about viewing component of the editor. Define tracing? Tracing is a debugging technique used to track the flow of execution logic and data modifications. In viewing a document.26. Viewing component is a collection of modules responsible for determining the next view. Define Trace back? Trace back is a debugging technique used to Show the path by which the current statement was reached.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.