3 operand forms operands can denote immediate

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: naging procedure calls and returns, and blocks of memory allocated by the user, (for example, by using the malloc library procedure). The program memory is addressed using virtual addresses. At any given time, only limited subranges of virtual addresses are considered valid. For example, although the 32-bit addresses of IA32 potentially span a 4-gigabyte range of address values, a typical program will only have access to a few megabytes. The operating system manages this virtual address space, translating virtual addresses into the physical addresses of values in the actual processor memory. A single machine instruction performs only a very elementary operation. For example, it might add two numbers stored in registers, transfer data between memory and a register, or conditionally branch to a new 94 CHAPTER 3. MACHINE-LEVEL REPRESENTATION OF C PROGRAMS instruction address. The compiler must generate sequences of such instructions to implement program constructs such as arithmetic expression evaluation, loops, or procedure calls and returns. 3.2.2 Code Examples Suppose we write a C code file code.c containing the following pro...
View Full Document

Ask a homework question - tutors are online