Thanks you guys, but I am still trying to make a C program that makes the same as the asm code. Could you please help me a little? I know that it is not very difficult and I almost have it, but I am not completely sure about it. Thanks johncaponski wrote: > > Hi everyone! I've got an AT&T GNU assembler code produced by the > compilation of a C program that I don't know. I need to answer some > questions about it. The thing is that I want to know how could I get that > information using gcc compiler, I mean, I just want to know the options I > should use with gcc and "myfile.s" to get that info. > > The questions are: > > - What architecture was this code compiled for? > - 32 or 64 bits? > > In addition to that, I am asked to write the C program that generated that > code. Is there any automatic way to do that? > This is the code: > > .file "practica2_funcion.c" > .text > .p2align 4,,15 > .globl funcion > .type funcion, @function > funcion: > pushl %ebp > movl %esp, %ebp > pushl %esi > xorl %esi, %esi > pushl %ebx > .p2align 4,,7 > .p2align 3 > .L2: > leal matriz(,%esi,4), %eax > xorl %ecx, %ecx > .p2align 4,,7 > .p2align 3 > .L3: > movl (%eax), %ebx > addl $512, %ecx > leal 0(,%ebx,8), %edx > subl %ebx, %edx > movl %edx, (%eax) > addl $512, %eax > cmpl $65536, %ecx > jne .L3 > addl $1, %esi > cmpl $128, %esi > jne .L2 > popl %ebx > popl %esi > popl %ebp > ret > .size funcion, .-funcion > .comm matriz,65536,32 > .ident "GCC: (Debian 4.4.14) 4.4.1" > .section .note.GNUstack,"",@progbits > > > > Thank you in advance! > > -- View this message in context: http://old.nabble.com/How-to-know-some-info--tp26157754p26264687.html Sent from the gcc - Help mailing list archive at Nabble.com.