Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

Assembly questions

OpenStudy (anonymous):

For a certain program, 2% of the code accounts for 50% of the execution time. Compute the programming time (duration to write entire code) and execution time for following three strategies. Assume that it would take 100 man-months to write it in C, and that assembly language is 10 times slower to write (i.e. it takes 10 times longer duration to write a code in assembly as compared to writing the same code in C) and four times more efficient (i.e. program written in C takes four times as much time as it takes to execute the same code written in assembly language). Also, assume that the time it takes to run the program written entirely in C is T. The three strategies are as follows: a) Entire program is written in C b) Entire program is written in assembly language c) First all program is written in C, then the key 2% is re-written in assembly language What changes need to be made if we want to use the symbols “COPY” to do the operation that is performed by “MOV” in current assembly language? Does it require a new instruction set architecture (ISA)? An assembly language program uses the instructions “MACRO” and “MOV” among other instructions. a) Is it possible to get the same executable binary from the assembler without using the “MOV” instructions? b) Is it possible to get the same executable binary from the assembler without using the “MACRO” instructions? What is the maximum number of comparisons required to search a given number from a sorted list using binary search algorithm. State your answer for a list of size 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10. What is the general formula for the maximum number of comparisons – show all derivation steps? Useful mathematical identities: Floor(x) is equal to largest integer k that is smaller than or equal to number x e.g. Floor(3.9) = 3. Ceil(x) is equal to smallest integer k that is larger than or equal to number x e.g. Ceil(3.1) = 4. If n = 2k, then it means log2(n)= log2(2k) = k * log2(2) = k i.e. log2(n)= k What are the key differences between a macro call and a procedure call? What will happen if a macro calls itself inside the macro definition? During linking, how is the relocation of object modules performed? Describe how object module lengths and order of modules effects the starting addresses of each module. During linking, how are the external references in an object module managed? Can the external references be resolved before starting address of each module is found?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!