[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.6

Binary Bomb Phase 2

Asked by ruevaughn in Assembly Programming Language

Tags: machine language

Hello, I am needing help with the Binary Bomb Assignment. I have completed phase one by using the x /s command. I am now stuck on phase 2.

 From what I understand, the the function call read_six_numbers will take in my entered string (six numbers with spaces) and scanf will extract that string into an array of integers.

If the string I have entered is equal to six, it will jump back to phase_2, correct?

Once in phase_2, it will check using a loop to see if my int[x] = the correct int, and that is being checked at  8048f81:       39 c3                   cmp    %eax,%ebx, correct?

Now my question is, how am I able to find what numbers it's checking for?

Any help would be appreciated, thanks in advance!

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
08048f41 <phase_2>:
 8048f41:       55                        push   %ebp
 8048f42:       89 e5                   mov    %esp,%ebp
 8048f44:       83 ec 38              sub    $0x38,%esp
 8048f47:       89 5d f4                mov    %ebx,-0xc(%ebp)
 8048f4a:       89 75 f8                mov    %esi,-0x8(%ebp)
 8048f4d:       89 7d fc                mov    %edi,-0x4(%ebp)
 8048f50:       8d 45 dc                lea    -0x24(%ebp),%eax
 8048f53:       89 44 24 04             mov    %eax,0x4(%esp)
 8048f57:       8b 45 08                mov    0x8(%ebp),%eax
 8048f5a:       89 04 24                mov    %eax,(%esp)
 8048f5d:       e8 5e 04 00 00          call   80493c0 <read_six_numbers>
 8048f62:       bf 00 00 00 00          mov    $0x0,%edi
 8048f67:       8d 5d e8                lea    -0x18(%ebp),%ebx
 8048f6a:       89 de                   mov    %ebx,%esi
 8048f6c:       8b 43 f4                mov    -0xc(%ebx),%eax
 8048f6f:       3b 03                   cmp    (%ebx),%eax
 8048f71:       74 05                   je     8048f78 <phase_2+0x37>
 8048f73:       e8 06 04 00 00          call   804937e <explode_bomb>
 8048f78:       03 7e f4                add    -0xc(%esi),%edi
 8048f7b:       83 c3 04                add    $0x4,%ebx
 8048f7e:       8d 45 f4                lea    -0xc(%ebp),%eax
 8048f81:       39 c3                   cmp    %eax,%ebx
 8048f83:       75 e5                   jne    8048f6a <phase_2+0x29>
 8048f85:       85 ff                   test   %edi,%edi
 8048f87:       75 05                   jne    8048f8e <phase_2+0x4d>
 8048f89:       e8 f0 03 00 00          call   804937e <explode_bomb>
 8048f8e:       8b 5d f4                mov    -0xc(%ebp),%ebx
 8048f91:       8b 75 f8                mov    -0x8(%ebp),%esi
 8048f94:       8b 7d fc                mov    -0x4(%ebp),%edi
 8048f97:       89 ec                   mov    %ebp,%esp
 8048f99:       5d                      pop    %ebp
 8048f9a:       c3                      ret
 
080493c0 <read_six_numbers>:
 80493c0:       55                      push   %ebp
 80493c1:       89 e5                   mov    %esp,%ebp
 80493c3:       83 ec 28                sub    $0x28,%esp
 80493c6:       8b 55 0c                mov    0xc(%ebp),%edx
 80493c9:       8d 42 14                lea    0x14(%edx),%eax
 80493cc:       89 44 24 1c             mov    %eax,0x1c(%esp)
 80493d0:       8d 42 10                lea    0x10(%edx),%eax
 80493d3:       89 44 24 18             mov    %eax,0x18(%esp)
 80493d7:       8d 42 0c                lea    0xc(%edx),%eax
 80493da:       89 44 24 14             mov    %eax,0x14(%esp)
 80493de:       8d 42 08                lea    0x8(%edx),%eax
 80493e1:       89 44 24 10             mov    %eax,0x10(%esp)
 80493e5:       8d 42 04                lea    0x4(%edx),%eax
 80493e8:       89 44 24 0c             mov    %eax,0xc(%esp)
 80493ec:       89 54 24 08             mov    %edx,0x8(%esp)
 80493f0:       c7 44 24 04 79 9c 04    movl   $0x8049c79,0x4(%esp)
 80493f7:       08
 80493f8:       8b 45 08                mov    0x8(%ebp),%eax
 80493fb:       89 04 24                mov    %eax,(%esp)
 80493fe:       e8 35 f5 ff ff          call   8048938 <sscanf@plt>
 8049403:       83 f8 05                cmp    $0x5,%eax
 8049406:       7f 05                   jg     804940d <read_six_numbers+0x4d>
 8049408:       e8 71 ff ff ff          call   804937e <explode_bomb>
 804940d:       c9                      leave
 804940e:       89 f6                   mov    %esi,%esi
 8049410:       c3                      ret
 
Related Solutions
Keywords: Binary Bomb Phase 2
 
Loading Advertisement...
 
[+][-]02/01/09 01:54 AM, ID: 23520745Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Assembly Programming Language
Tags: machine language
Sign Up Now!
Solution Provided By: Infinity08
Participating Experts: 1
Solution Grade: A
 
[+][-]02/01/09 04:16 PM, ID: 23523691Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/01/09 08:52 PM, ID: 23524423Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/02/09 02:01 AM, ID: 23525506Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/02/09 12:44 PM, ID: 23531126Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/02/09 01:22 PM, ID: 23531519Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/02/09 04:55 PM, ID: 23533206Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/03/09 01:54 AM, ID: 23535560Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625