Parameters x and n are stored at memory locations

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: esp Ê %esp Ë Ë Ë ; Figure 3.4: Data Movement Instructions. register , an index register , and a scale factor ×, where × must be 1, 2, 4, or 8. The effective address is then computed as ÁÑÑ · Ê ·Ê ¡ × This general form is often seen when referencing elements of arrays. The other forms are simply special cases of this general form where some of the components are omitted. As we will see, the more complex addressing modes are useful when referencing array and structure elements. Practice Problem 3.1: Assume the following values are stored at the indicated memory addresses and registers: Address 0x100 0x104 0x108 0x10C Value 0xFF 0xAB 0x13 0x11 Register %eax %ecx %edx Value 0x100 0x1 0x3 Fill in the following table showing the values for the indicated operands Operand %eax 0x104 $0x108 (%eax) 4(%eax) 9(%eax,%edx) 260(%ecx,%edx) 0xFC(,%ecx,4) (%eax,%edx,4) Value 102 CHAPTER 3. MACHINE-LEVEL REPRESENTATION OF C PROGRAMS 3.4.2 Data Movement Instructions Among the most heavily used instructions are those t...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online