rbulus 0 Newbie Poster

08048cf9 <phase_5>:
8048cf9: 55 push %ebp
8048cfa: 89 e5 mov %esp,%ebp
8048cfc: 53 push %ebx
8048cfd: 83 ec 14 sub $0x14,%esp
8048d00: 8d 45 f4 lea 0xfffffff4(%ebp),%eax
8048d03: 50 push %eax
8048d04: 8d 45 f8 lea 0xfffffff8(%ebp),%eax
8048d07: 50 push %eax
8048d08: 68 cc 99 04 08 push $0x80499cc
8048d0d: ff 75 08 pushl 0x8(%ebp)
8048d10: e8 63 fb ff ff call 8048878 <sscanf@plt>
8048d15: 83 c4 10 add $0x10,%esp
8048d18: 83 f8 01 cmp $0x1,%eax
8048d1b: 7f 05 jg 8048d22 <phase_5+0x29>
8048d1d: e8 1e 07 00 00 call 8049440 <explode_bomb>
8048d22: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8048d25: 83 e0 0f and $0xf,%eax
8048d28: 89 45 f8 mov %eax,0xfffffff8(%ebp)
8048d2b: 83 f8 0f cmp $0xf,%eax
8048d2e: 74 2b je 8048d5b <phase_5+0x62>
8048d30: ba 00 00 00 00 mov $0x0,%edx
8048d35: b9 00 00 00 00 mov $0x0,%ecx
8048d3a: bb c0 a5 04 08 mov $0x804a5c0,%ebx
8048d3f: 42 inc %edx
8048d40: 8b 04 83 mov (%ebx,%eax,4),%eax
8048d43: 01 c1 add %eax,%ecx
8048d45: 83 f8 0f cmp $0xf,%eax
8048d48: 75 f5 jne 8048d3f <phase_5+0x46>
8048d4a: c7 45 f8 0f 00 00 00 movl $0xf,0xfffffff8(%ebp)
8048d51: 83 fa 0b cmp $0xb,%edx
8048d54: 75 05 jne 8048d5b <phase_5+0x62>
8048d56: 39 4d f4 cmp %ecx,0xfffffff4(%ebp)
8048d59: 74 05 je 8048d60 <phase_5+0x67>
8048d5b: e8 e0 06 00 00 call 8049440 <explode_bomb>
8048d60: 8b 5d fc mov 0xfffffffc(%ebp),%ebx
8048d63: c9 leave
8048d64: c3 ret

This is the piece of code in assembler, it should accept two integer digit %d %d. Initially i was thinking both digit were lower than 15, but it is not working. So far i can not figure out the solution. Any help will be really helpful.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.