The following problem was taken from Computer Systems: A Programmer’s Perspective, Third Edition; Bryant, O’Hallaron.
Practice 3.1
Assume the following memory addresses and registers hold the values listed next to them.
Address | Value | Register | Value |
0x100 | 0xFF | %rax | 0x100 |
0x104 | 0xAB | %rcx | 0x1 |
0x108 | 0x13 | %rdx | 0x3 |
0x10C | 0x11 |
Compute the value of each of the following operands.
Operand | Value | Computation |
%rax | ||
0x104 | ||
$0x108 | ||
(%rax) | ||
4(%rax) | ||
9(%rax, %rdx) | ||
260(%rcx,%rdx) | ||
0xFC(,%rcx,4) | ||
(%rax,%rdx,4) |
© 2017, Eric. All rights reserved.