[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.3

diffusing binary bomb phase_2

Asked by SirakMD in Assembly Programming Language, Unix Systems Programming, Algorithms

I tried several times but couldn't get it, perhaps i missed some point in the loop or keeping track of the stack, here is my disassembled code of phase_2. I don't think i understood clearly how it reads the numbers. I appreciate if anyone can help hep me.
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:
08048e99 <phase_2>:
 8048e99:	55                   	push   %ebp
 8048e9a:	89 e5                	mov    %esp,%ebp
 8048e9c:	56                   	push   %esi
 8048e9d:	53                   	push   %ebx
 8048e9e:	83 ec 30             	sub    $0x30,%esp
 8048ea1:	8d 45 e0             	lea    0xffffffe0(%ebp),%eax
 8048ea4:	89 44 24 04          	mov    %eax,0x4(%esp)
 8048ea8:	8b 45 08             	mov    0x8(%ebp),%eax
 8048eab:	89 04 24             	mov    %eax,(%esp)
 8048eae:	e8 1d 04 00 00       	call   80492d0 <read_six_numbers>
 8048eb3:	bb 02 00 00 00       	mov    $0x2,%ebx
 8048eb8:	8d 75 e0             	lea    0xffffffe0(%ebp),%esi
 8048ebb:	8b 44 9e f8          	mov    0xfffffff8(%esi,%ebx,4),%eax
 8048ebf:	83 c0 05             	add    $0x5,%eax
 8048ec2:	39 44 9e fc          	cmp    %eax,0xfffffffc(%esi,%ebx,4)
 8048ec6:	74 05                	je     8048ecd <phase_2+0x34>
 8048ec8:	e8 c1 03 00 00       	call   804928e <explode_bomb>
 8048ecd:	43                   	inc    %ebx
 8048ece:	83 fb 07             	cmp    $0x7,%ebx
 8048ed1:	75 e8                	jne    8048ebb <phase_2+0x22>
 8048ed3:	83 c4 30             	add    $0x30,%esp
 8048ed6:	5b                   	pop    %ebx
 8048ed7:	5e                   	pop    %esi
 8048ed8:	5d                   	pop    %ebp
 8048ed9:	c3                   	ret    
 
 
080492d0 <read_six_numbers>:
 80492d0:	55                   	push   %ebp
 80492d1:	89 e5                	mov    %esp,%ebp
 80492d3:	83 ec 28             	sub    $0x28,%esp
 80492d6:	8b 55 0c             	mov    0xc(%ebp),%edx
 80492d9:	8d 42 14             	lea    0x14(%edx),%eax
 80492dc:	89 44 24 1c          	mov    %eax,0x1c(%esp)
 80492e0:	8d 42 10             	lea    0x10(%edx),%eax
 80492e3:	89 44 24 18          	mov    %eax,0x18(%esp)
 80492e7:	8d 42 0c             	lea    0xc(%edx),%eax
 80492ea:	89 44 24 14          	mov    %eax,0x14(%esp)
 80492ee:	8d 42 08             	lea    0x8(%edx),%eax
 80492f1:	89 44 24 10          	mov    %eax,0x10(%esp)
 80492f5:	8d 42 04             	lea    0x4(%edx),%eax
 80492f8:	89 44 24 0c          	mov    %eax,0xc(%esp)
 80492fc:	89 54 24 08          	mov    %edx,0x8(%esp)
 8049300:	c7 44 24 04 b9 9a 04 	movl   $0x8049ab9,0x4(%esp)
 8049307:	08 
 8049308:	8b 45 08             	mov    0x8(%ebp),%eax
 804930b:	89 04 24             	mov    %eax,(%esp)
 804930e:	e8 d9 f5 ff ff       	call   80488ec <sscanf@plt>
 8049313:	83 f8 05             	cmp    $0x5,%eax
 8049316:	7f 05                	jg     804931d <read_six_numbers+0x4d>
 8049318:	e8 71 ff ff ff       	call   804928e <explode_bomb>
 804931d:	c9                   	leave  
 804931e:	89 f6                	mov    %esi,%esi
 8049320:	c3                   	ret
[+][-]11/01/09 01:03 AM, ID: 25713071Accepted 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

Zones: Assembly Programming Language, Unix Systems Programming, Algorithms
Sign Up Now!
Solution Provided By: Infinity08
Participating Experts: 1
Solution Grade: A
 
[+][-]10/30/09 06:49 AM, ID: 25702894Expert 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.

 
[+][-]10/31/09 02:35 PM, ID: 25711647Author 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.

 
[+][-]11/01/09 01:09 PM, ID: 25715488Author 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.

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