Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE Show how you solve the PROBLEM!! Learning Objectives Can understand simple x86 machine instructions Can interpret arithmetic and shift operators Can interpret conditional jump

PLEASE Show how you solve the PROBLEM!!

Learning Objectives

  • Can understand simple x86 machine instructions
  • Can interpret arithmetic and shift operators
  • Can interpret conditional jump statements
  • Can interpret looping constructs

Directions

  • Show the contents of the registers and memory after each of these short programs executes.
  • See https://www.felixcloutier.com/x86/ for unfamiliar instructions.
  • See https://www.calculator.net/hex-calculator.html for a hex calculator

Problem #2:

  1. Assume rbp initially holds address 0x48000

  1. IDA set up these symbols for you

var_C = dword ptr -0Ch

var_8 = dword ptr -8

var_4 = dword ptr -4

  1. Interpret this code

mov [rbp+var_C], 0Ah

mov [rbp+var_4], 6

mov [rbp+var_8], 1Eh

mov edx, [rbp+var_C]

mov eax, [rbp+var_4]

add eax, edx

cmp [rbp+var_8], eax

jle short loc_40159D

mov edx, [rbp+var_4]

mov eax, edx

add eax, eax

add eax, edx

mov [rbp+var_4], eax

jmp short loc_4015BB

loc_40159D:

mov eax, [rbp+var_4]

cmp eax, [rbp+var_8]

jle short loc_4015B0

mov eax, [rbp+var_C]

sub eax, [rbp+var_4]

mov [rbp+var_8], eax

jmp short loc_4015BB

loc_4015B0:

mov edx, [rbp+var_C]

mov eax, [rbp+var_4]

add eax, edx

mov [rbp+var_8], eax

loc_4015BB:

  1. Show the results of executing the code in the registers and memory. Express your answers in hex.

Registers

eax

ebx

ecx

edx

6uh

rbp

0x48000

Memory

0x47FDC

0x47FE0

0x47FE4

05h

0x47FE8

5c2h

0x47FEC

0x47FF0

0Ah

0x47FF4

1Eh

0x47FF8

0x47FFC

0Ah

0x48000

0x48004

0x48008

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Support For Data Mining Applications Discovering Knowledge With Inductive Queries Lnai 2682

Authors: Rosa Meo ,Pier L. Lanzi ,Mika Klemettinen

2004th Edition

3540224793, 978-3540224792

More Books

Students also viewed these Databases questions

Question

Technology. Refer to Case

Answered: 1 week ago