SPARC Architecture, Assembly Language Programming, and C (2nd Edition)

Info icon This preview shows pages 1–2. Sign up to view the full content.

Sample Exercises for Quiz 5 Sample Exercises for Quiz 5 Runtime Segments & Linking, SPARC machine instructions, I/O, Memory Management, Traps/Exceptions If we have not covered a particular set of topics in class, you will not be help responsible for them on this Quiz, but probably for the Final. Recursion! Name the 5 basic Unix C Runtime sections and describe the function of each section. What sections are part of the executable file on disk. Starting with a C source file, list the order of each of the main parts of the compilation and loading process through to the point of execution of the program. What are the main functions of the linkage editor/linker? the loader? Given the following program, name where each variable/constant/memory allocation is stored in the C Runtime environment. What is the scope/visibility and lifetime of each? extern int external_global; int global1 = 5; int global2; static int external_static1 = 7; static int external_static2; extern int foo( int * ); /* function prototype */ int main( int argc, char *argv[] ) { char *chPtr = NULL; int *iPtr; int (*ptf)( int * ); static int internal_static1 = 11; static int internal_static2; iPtr = (int *) malloc( 40 ); chPtr = "Hello World"; ptf = foo; /* (*ptf)( iPtr ); to make the function call */ (1 of 4) [2/8/2008 1:43:32 PM]
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Winter '08
  • Ord
  • static variable, SPARC Assembly, approximate virtual memory, virtual memory location

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern