syntaxe intel

syntaxe intel - ASM - Programmation

Marsh Posté le 13-10-2010 à 14:04:40    

bonjour,
j'ai un code écrit en langage assembleur syntaxe at&t et je veux le rendre en syntaxe intel.si vous pouvez bien m'aider!!  :??:  
voici le code
 
 
004012F0 push   %ebp
004012F1 mov    %esp,%ebp
004012F3 sub    $0x48,%esp
004012F6 and    $0xfffffff0,%esp
004012F9 mov    $0x0,%eax
004012FE add    $0xf,%eax
00401301 add    $0xf,%eax
00401304 shr    $0x4,%eax
00401307 shl    $0x4,%eax
0040130A mov    %eax,-0x24(%ebp)
0040130D mov    -0x24(%ebp),%eax
00401310 call   0x4019e0 <_alloca>
00401315 call   0x401560 <__main>
0040131A movl   $0x0,-0x4(%ebp)
00401321 movl   $0x0,-0x10(%ebp)
00401328 movl   $0x0,-0xc(%ebp)
0040132F movl   $0x14,-0x18(%ebp)
00401336 movl   $0x403000,(%esp)
0040133D call   0x401a58 <printf>
00401342 mov    -0x18(%ebp),%eax
00401345 shl    $0x2,%eax
00401348 mov    %eax,(%esp)
0040134B call   0x401a50 <malloc>
00401350 mov    %eax,-0x4(%ebp)
00401353 movl   $0x0,-0x1c(%ebp)
0040135A mov    -0x1c(%ebp),%eax
0040135D cmp    -0x18(%ebp),%eax
00401360 jge    0x4013b5 <main+197>
00401362 mov    -0x1c(%ebp),%eax
00401365 inc    %eax
00401366 mov    %eax,0x4(%esp)
0040136A movl   $0x40303b,(%esp)
00401371 call   0x401a58 <printf>
00401376 mov    -0x1c(%ebp),%eax
00401379 shl    $0x2,%eax
0040137C add    -0x4(%ebp),%eax
0040137F mov    %eax,0x4(%esp)
00401383 movl   $0x403055,(%esp)
0040138A call   0x401a48 <scanf>
0040138F mov    -0x1c(%ebp),%eax
00401392 lea    0x0(,%eax,4),%edx
00401399 mov    -0x4(%ebp),%eax
0040139C flds   (%edx,%eax,1)
0040139F flds   0x4030b8
004013A5 fxch   %st(1)
004013A7 fucompp
004013A9 fnstsw %ax
004013AB sahf
004013AC jae    0x401362 <main+114>
004013AE lea    -0x1c(%ebp),%eax
004013B1 incl   (%eax)
004013B3 jmp    0x40135a <main+106>
004013B5 lea    -0x10(%ebp),%eax
004013B8 mov    %eax,0x8(%esp)
004013BC mov    -0x18(%ebp),%eax
004013BF mov    %eax,0x4(%esp)
004013C3 mov    -0x4(%ebp),%eax
004013C6 mov    %eax,(%esp)
004013C9 call   0x401405 <biggest_value>
004013CE fstps  -0x14(%ebp)
004013D1 flds   -0x14(%ebp)
004013D4 fstpl  0x14(%esp)
004013D8 flds   -0xc(%ebp)
004013DB fstpl  0xc(%esp)
004013DF flds   -0x10(%ebp)
004013E2 fstpl  0x4(%esp)
004013E6 movl   $0x403058,(%esp)
004013ED call   0x401a58 <printf>
004013F2 movl   $0x4030b1,(%esp)
004013F9 call   0x401a40 <system>
004013FE mov    $0x0,%eax
00401403 leave
00401404 ret
merci d'avans

Reply

Marsh Posté le 13-10-2010 à 14:04:40   

Reply

Marsh Posté le 14-10-2010 à 12:37:01    

Voili (si je me souviens bien)

push   %ebp  
push   ebp  
 
mov    %esp,%ebp  
mov    ebp, esp
 
sub    $0x48,%esp  
sub    esp, 48h
 
and    $0xfffffff0,%esp  
and    esp, 0fffffff0h
 
...
 
mov    %eax,-0x24(%ebp)  
mov    [ebp - 24h], eax
 
call   0x4019e0 <_alloca>  
call   4019e0h
 
etc.

Reply

Marsh Posté le 14-10-2010 à 13:51:49    

Je le crois bien que tu as écrit ça à la main.

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed