Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone translate this assembly code into C or java? I am trying to figure out what sort of sequence this code creates when you

Can someone translate this assembly code into C or java? I am trying to figure out what sort of sequence this code creates when you plug in certain numbers.

0x0000000000400fac <+0>: push %rbp 0x0000000000400fad <+1>: push %rbx 0x0000000000400fae <+2>: sub $0x28,%rsp 0x0000000000400fb2 <+6>: mov %rsp,%rsi 0x0000000000400fb5 <+9>: callq 0x401773 0x0000000000400fba <+14>: cmpl $0x0,(%rsp) 0x0000000000400fbe <+18>: jns 0x400fe4 0x0000000000400fc0 <+20>: callq 0x40173d 0x0000000000400fc5 <+25>: jmp 0x400fe4 0x0000000000400fc7 <+27>: mov %ebx,%eax 0x0000000000400fc9 <+29>: add -0x4(%rbp),%eax 0x0000000000400fcc <+32>: cmp %eax,0x0(%rbp) 0x0000000000400fcf <+35>: je 0x400fd6 0x0000000000400fd1 <+37>: callq 0x40173d 0x0000000000400fd6 <+42>: add $0x1,%ebx 0x0000000000400fd9 <+45>: add $0x4,%rbp 0x0000000000400fdd <+49>: cmp $0x6,%ebx 0x0000000000400fe0 <+52>: jne 0x400fc7 0x0000000000400fe2 <+54>: jmp 0x400ff0 0x0000000000400fe4 <+56>: lea 0x4(%rsp),%rbp 0x0000000000400fe9 <+61>: mov $0x1,%ebx 0x0000000000400fee <+66>: jmp 0x400fc7 0x0000000000400ff0 <+68>: add $0x28,%rsp 0x0000000000400ff4 <+72>: pop %rbx 0x0000000000400ff5 <+73>: pop %rbp 0x0000000000400ff6 <+74>: retq

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

Pro Oracle Fusion Applications Installation And Administration

Authors: Tushar Thakker

1st Edition

1484209834, 9781484209837

More Books

Students also viewed these Databases questions

Question

How are bladder-type fuel tanks repaired? in aircraft

Answered: 1 week ago