Any position independent code is best written using which of
Any position independent code is best written using which of the following addressing modes ?
Any position independent code is best written using which of the following addressing modes ?
Akilesh Kharvi ? Dec 8 '2016 at 21:52
Answer:Relative.
Explanation:
The relative addressing mode permits the writing of "position-independent code," programs which will be properly executed by the processor regardless of where they are located in memory.
The entire program (together with any necessary data) may be picked up from one region of memory and moved to another with no adverse effect. In order to be location-independent a program may not refer to any specific location by address. All references to memory must be through the use of relative addressing.
All compilers are designed to be
Akilesh Kharvi ? Dec 8 '2016 at 21:48
Answer: re-entrant
Explanation:
Compilers and other programs were often written to be reentrant, so a single copy of the tool lived in memory, yet was shared by perhaps a hundred users. Each person had his or her own data area, yet everyone running the compiler quite literally executed identical code. As the operating system changed contexts from user to user it swapped data areas so one person's work didn't effect any other. Share the code, but not the data.
In the embedded world a routine must satisfy the following conditions to be reentrant:
->It uses all shared variables in an atomic way, unless each is allocated to a specific instance of the function.
->It does not call non-reentrant functions.
->It does not use the hardware in a non-atomic way.
Generation of intermediate code based on an abstract machine model is useful in compilers because
Recursive descent parsing is an example of
Akilesh Kharvi ? Dec 8 '2016 at 21:45
Answer : top down parsing
Explanation:
One of the most straightforward forms of parsing is recursive descent parsing. This is a top-down process in which the parser attempts to verify that the syntax of the input stream is correct as it is read from left to right.
Compiler Design, Computer Organization Architecture, Operating System, PGCET CSE Exam (Karnataka) 2011, UnSolved
In an absolute loading scheme, the assembler, in addition to its normal functions, should also perform