ADDING AND SUBTRACTING The purpose of this assignment is to become familiar with the add and sub instructions. Addin' 'n Subtractin' 1. Assume the following values are stored at the indicated memory...


ADDING AND SUBTRACTING<br>The purpose of this assignment is to become familiar with the add and sub instructions.<br>Addin' 'n Subtractin'<br>1. Assume the following values are stored at the indicated memory addresses and registers:<br>Register<br>%eax<br>Address<br>Value<br>Value<br>Ox500<br>ØX93FA1C9C<br>Ox500<br>OXED<br>Ox504<br>Ox7B<br>%ebx<br>Ox508<br>Ox79<br>%ecx<br>Ox7<br>Ox50C<br>OXF1<br>%edx<br>OxA<br>Fill in the following table, showing the effects of the indicated instructions, and showing what<br>register (state the smallest unit that is affected) or memory location that would be changed and<br>its new value. Also, show the OF and CF values AFTER the instruction executes. Assume each<br>instruction is independent of the others. In other words, the initial conditions specified above<br>hold for each of the instructions shown below. SHOW ALL VALUES IN HEXADECIMAL.<br>What Changed?<br>(list address or register)<br>Instruction<br>New Value (in hex)<br>OF CF<br>1. subb $0xA, 12(%eax)<br>2. subb 8(%eax), %dl<br>3. addl %ebx, %ebx<br>4. addl %eсx, (%еаx)<br>5. addb %d1, 8(%eax)<br>6. subl %edx, 4(%eax)<br>7. subl %edx, Жесх<br>8. subb %bl, %bh<br>9. subb %bh, %bl<br>10. addb %bl, %bh<br>11. addb %bh, %bl<br>12. subl %eax, %eax<br>

Extracted text: ADDING AND SUBTRACTING The purpose of this assignment is to become familiar with the add and sub instructions. Addin' 'n Subtractin' 1. Assume the following values are stored at the indicated memory addresses and registers: Register %eax Address Value Value Ox500 ØX93FA1C9C Ox500 OXED Ox504 Ox7B %ebx Ox508 Ox79 %ecx Ox7 Ox50C OXF1 %edx OxA Fill in the following table, showing the effects of the indicated instructions, and showing what register (state the smallest unit that is affected) or memory location that would be changed and its new value. Also, show the OF and CF values AFTER the instruction executes. Assume each instruction is independent of the others. In other words, the initial conditions specified above hold for each of the instructions shown below. SHOW ALL VALUES IN HEXADECIMAL. What Changed? (list address or register) Instruction New Value (in hex) OF CF 1. subb $0xA, 12(%eax) 2. subb 8(%eax), %dl 3. addl %ebx, %ebx 4. addl %eсx, (%еаx) 5. addb %d1, 8(%eax) 6. subl %edx, 4(%eax) 7. subl %edx, Жесх 8. subb %bl, %bh 9. subb %bh, %bl 10. addb %bl, %bh 11. addb %bh, %bl 12. subl %eax, %eax

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here