You are on page 1of 8

1. Define system software: System software consist of a variety of programs that support the operat ion of a computer.

This software makes it possible for the user to focus on the application or other problem to be solved without needing to know the details of how the machine works internally. 2. What is the purpose of test device instruction? The test device (TD) instruction tests whether the addressed device is r eady to send or receive a byte of data. 3. What is meant by index addressing? The index addressing can be calculated by the formula Effective address (EA)=1000+ [X] =1000+ content of the index register X For eg: STCH BUFFER,X

0101 1100 1 001 0000 0

0000

0000 5 Opcode

4 x

0 BUFFER

4. Following is a memory configuration: Address value Register R

5 1 5 6 7 What is the result of the above? ADD 6 (immediate) to R (indirect) result: 6+7=13 5 7 5 7

5. How are floating point value represented using exponent in SIC/XE? The exponent has value e and the fraction has value f, the absolute valu e of the number represented is f*2^(e-1024) The sign of the floating point number is indicated by the value of s. 6. Explain the use of SVC instruction in SIC/XE? SVC->supervisor call instruction. Executing SVC instruction generates an interrupt that can be used for co mmunication with the operating system. 7. What are the additional registers in SIC/XE?

Mnemonic Number Special use B S T F 3 4 5 6 Base register; used for addressing General working register-no special use General working register-no special use Floating-point accumulator(48 bits) 8. Following is a memory configuration Address value Register R

6 A 5 6 7 What is the result of the following statement ADD 6 (immediate) to R (indirect) result: 6+B=17(decimal)=11(hexa decimal) 1 6 B 8

9. Illustrate how the input and output operations are performed in SIC. Input and output are preformed by transferring 1 byte at a time t o or from the rightmost 8 bits of register A.Each device is assigned a unique 8 -bit code. * The test device (TD) instruction test whether the addressed device is ready to send or receive a byte of data. *A program to transfer data must wait unit the device is ready, then execute re ad data (RD) or writ data (WD). 10. What is the data format used in the SIC system? Integers are stored as 24-bit binary number; 2s complement representation is used for negative values. Characters are stored using their *-bit ASCII codes. There is no floating point hardware on the standard version of SIC. 11. Distinguish between direct and indexed addressing. Mode Indication Target address calculation Example Direct X = 0 TA = address LDA TEN Indexed X = 1 TA = address + (x) BUFF ER,X (x)->contents of register x. 12. What are the different registers used in SIC? Registers:A(Accumlator) I Indexed register L Linkage register PC Program counter SW status word

13. What is base relative addressing? For base relative addressing, the displacement filed disp in a format 3 instruction is interpreted as a 12-bit unsigned integer . Target address is ca lculated by adding displacement with content of base register. Base relative: b=1,p=0 Target address ( TA)=( B) +disp (0<disp< 4095 ) ( B) content registe r B 14. What is meant by application software? An application software is primarily concerned with the solution of some problem , using computer as a tool. The focus is on the application not on the computing system. 15. Define system program: A system program is a program which aides in effective execution of a ge neral use computational requirements on a computer system. 16. Give the examples of system software: Assembler, compiler, loader, linker, microprocessor, text editor, debugg er. 17. What is operating system? It is the main example of system software which consist of a set of syst em software. 18. What is instruction? Instruction is a command to a microprocessor which initiates some intern al and external operations. 19. Define instruction set? A set of all instructions for a particular processor is called instructi on set for that processor. 20. Define assembly language? Instructions are supplied to a processor in binary form. A program in t his form is called machine language program. For human understanding each machin e instruction is coded into English. This type of mnemonic coding is called ass embly coding. A program in which instructions are in assembly coding is called a ssembly language program. 21. What is assembler? Assembler is a software which converts assembly language program into ma chine language program. 22. What is compiler? Compiler is a system software which converts high level language program into machine language program. 23. Define linker? Linker links the subprograms or procedures of an object file, if a file sum.obj is input for linker then the output file will be sum.exe.

24. Define loader? Loader is a part of an operating system which loads the exe module from secondary memory into main memory and transfers the control of execution to the

starting of exe program. 25. What is I/O program? I/O programs are system software, part of BIOS or DOS which is responsib le for transfer of input and output data. 26. Define macro processor: If part of a program is repeated many times then a common coding can be used. The macro name and macro definition are defined. 27. Define memory: Memory is the device where the information is stored. 28. Define address: Memory locations are specified by addresses, where each address identif y a specific type, word or character.

29. Define processor: Processor is the device that performs a sequence of operations speci fied by instructions in memory. 30. What is meant by location counter? Location counter is also called as program counter(PC) or instruction co unter(IC) is a hardware memory device which denotes the location of the current instruction being executed. 31. What is meant by instruction register? A copy of the current instruction is stored in the instruction register. 32. What is meant by instruction interpreter? The instruction interpreter is a group of electrical circuits(hardware) that performs the intent of instruction fetched from memory. 33. What is meant by working register? The working registers are the memory devices that serves scratch pads fo r the instruction interpreter. 34. What is meant by general register? The general registers are used by the programmer as storage locations an d for special functions. 35. What is meant by MAR? MAR contains the address of the memory locations i.e to be read from or stored in to. 36. What is meant by MBR? MBR contains the copy of the designated memory locations specified by MA R after a read or write. 37. What are the assembler functions? (i). Translating source/assembly/mnemonics to object code (ii). Assigns machine address to each label or symbol. 38. Define upward compatibility? Upward compatibility means an object program for the standard SIC machine will also execute properly on a SIC/XE system. Such upward compatibility is oft en found on real computers that are closely related to one another.

UNIT II [ASSEMBLERS] 1. What is the data structure used to organize the SYMTAB and OPCODE table in a simple assembler? Why it is preferred? OPTAB is used to look up mnemonic operation codes and translate them to their ma chine language equivalents. SYMTAB is used to store values (addresses) assigned to labels. 2. Consider the following sequence X EQU Y Y EQU Z Z RESW 1 In a 2-pass assembler can resolve such a sequence of definition. Justify your a nswer. No. The symbol Y cannot be assigned a value when it is encountered during the fi rst pass because Z has not yet been defined. As a result, X cannot be evaluated during the second pass. This means that any assembler that makes only two sequ ential passes over the source program cannot resolve such a sequence of definiti ons. 3. What is SYMTAB? How it is useful? The Symbol table (SYMTAB) includes the name and value (addresses) for each label in the source program, together with flags to indicate error conditions. SYMTAB is usually organized as a hash table for efficiency of insertion and retr ieval. 4. List out the machine independent assembler features The machine independent assembler features are 1. Literals 2. Symbol defining statements 3. Expressions 4. Program blocks 5. Control Sections and Program Linking. 5. What is the need for an assembler directive? In addition to translating the instructions of the source program, the assembler must process statements called assembler directives or pseudo-instructions. The se statements are not translated into machine instructions. Instead, they provid e instructions to the assembler itself.

Examples: 1. BYTE and WORD direct the assembler to generate constants as part of the object program. 2. RESB and RESW instruct the assembler to reserve memory locations without generating data values. 3. START specifies the starting memory address for the object program. 4. END marks the end of the program. 6. What is the use of location counter? LOCCTR is initialized to the beginning address specified in the START statement. After each source statement is processed, the length of the assembled instruct ion or data area to be generated is added to LOCCTR. Thus whenever we reach a l abel in the source program, the current value of LOCCTR gives the address to be associated with that label. 7. What does an assembler perform when it encounters LTORG assembler directive.

When the assembler encounters a LTORG statement, it creates a literal pool that contains all of the literal operands used since the previous LTORG (or the begin ning of the program). This literal pool is placed in the object program at the location where the LTORG directive was encountered. 8. Write down the pass numbers either (Pass 1 or Pass 2) of the following activ ities that occur in a 2-pass assembler. i) object code generation ii) Literals added to literal table iii) Printing assembly listing iv) address resolution of local symbols 9. 1. 2. 3. List the types of assembler one pass assembler two pass assembler multipass assembler.

10. How can the assembler overcome the problem of forward reference? The assembler overcome the problem of forward reference through two pass and mul tipass assemblers. The first pass does little more than scan the source program for label definitio ns an assign addresses. The second pass performs most of the actual translation previously described. 11. Write the uses of program relocation 1. Sharing the memory location for the different programs. 2. Avoid the wastage of processing or execution time. 3. Reduce the wastage of memory space. 12. How are jump instructions assembled? Jump instructions are assembled in two different ways, depending on whether the target of the jump is in the same code segment as the jump instruction. A near jump is a jump to a target in the same code segment. A far jump is a jump to a target in a different code segment.

13. What are the functions required to translate source program to object code? It requires the following functions 1. Convert mnemonic operation codes to their machine language equivalents. 2. Convert symbolic operands to their equivalent machine addresses. 3. Build the machine instructions in the proper format. 4. Convert the data constants specified in the source program into their in ternal machine representations. 5. Write the object program and the assembly listing. 14. What is forward reference? A reference to a label (RETADR) that is defined later in the program is called f orward reference. 15. What is object program? The object program is a program written with the generated object codes for an a ssembly language program. 16. What are the records used to write an object program? There are three types of records 1. Header record 2. Text record and 3. End record.

17. What are the functions performed by pass 1 of two pass assembler? 1. Assign addresses to all statements in the program. 2. Save the values (addresses) assign to all labels for use in pass-2. 18. List out various machine dependent features. 1. Instruction formats and addressing modes 2. Program Relocation 19. How can you solve the relocation problem? 1. When the assembler generates the object code for the JSUB instruction ar e considering, it will insert the address of RDREC relative to the start of the program. 2. The assembler will also produce a command for the loader, instructing it to add the beginning address of the program to the address field in the JSUB in struction at load time. 20. What is Modification Record? Modification Record: Col.1 M Col.2-7 Starting location of the address field to be modified, relative to the b eginning of the program. Col.8-9 Length of the address field to be modified, in half-bytes (hexadecimal). 21. What is a literal? It is often convenient for the programmer to be able to write the value of a con stant operand as a part of the instruction that uses it. This avoids having to define the constant elsewhere in the program and makeup a label for it. Such an operand is called a literal because the value is stated literally in the instruct ion. 22. What is literal table and literal pool? For each literal used, literal table contains the literal name, the operand valu e and length, and the address assigned to the operand when it is placed in the l iteral pool. All of the literal operands used in a program are gathered together into one or more literal pools. 23. Compare absolute expression and relative expression

Absolute Relative An expression with only absolute terms is called absolute expressions. It may a lso contain relative terms provided the relative terms occur in pairs and the te rms in such pair have opposite sides. A relative expression is one in which all of the relative terms except one can b e paired, the remaining unpaired relative term must have a positive sign. 24. What are the advantages of MASM Assembler? The object program from MASM may be in several different formats, to allow easy and efficient execution of the program in a variety of operating environments. MASM can also produce an instruction timing listing that shows the number of clo ck cycles required to execute each machine instruction. 25. How the register-to-memory instructions are assembled. The register-to-memory instructions are assembled using either program counter r elative or base relative addressing. The assembler must, in either case, calcul ate a displacement to be assembled as part of the object instruction.

26. Why relative addressing is not possible with external references? Consider the example instruction, 15 0003 CLOOP +JSUB RDREC 4B100000 The operand RDREC is named in the EXTREF statement for the control section, so t his is an external reference. The assembler has no idea where the control sectio n containing RDREC will be loaded, so it cannot assemble the address for this in struction. Instead, the assembler inserts an address of zero and passes informat ion to the loader. The address of RDREC will have no predictable relationship to anything in this control section; therefore relative addressing is not possible .

You might also like