
224 Compilers – Principles and Practice
store_loop:
movl (%ebp, %esi, 4), %eax
movl %eax, cmd_tbl( , %edi, 4)
incl %esi
incl %edi
loop store_loop // decr ecx, Loop if Not Zero
// access the command-line arguments
_exit:
movl $1, %eax
movl $0, %ebx
int $0x80
EXERCISES
1. Give a layout of the Activation Record for the legacy C compiler function calling
conventions discussed in Section 7.1.2. Compare it with the theoretical Activation Record
layout. Is there a static links area in this AR? Why? Is it possible to access identifier in the
outer block? If yes, how can that be arranged?
2. Write a C program divided in two source files to ...