Red de conocimiento informático - Conocimiento sistemático - Ensamblar en código fuente

Ensamblar en código fuente

. def _ _ _ principal. SCL 2;. Tipo 32;. endef

. Texto

LC0:

. ascii "d\0"

LC1:

. ascii "Este no es un año real.\12\0"

LC2:

. ascii "Este es un año real.\12\0"

. Alineación 2

. global_main

. def_main. SCL 2;. Tipo 32;. endef

_main:

pushl ebp

Porcentaje de movimiento esp, ebp

Secundario $24, esp

y $1 -16, especialmente

movl $0, eax

movl eax, -8(ebp)

movl -8(ebp),eax

p>

Llamar a __alloca

Llamar a ___main

leal -4(ebp), eax

Mover eax, 4(esp)

movl $LC0, (esp)

llamar a _scanf

movl -4 (ebp), eax

y $3, eax

Prueba eax, eax

jne L4

movl -4(ebp), ecx

movl $1374389535, eax

ecx mín.

sarl $5,edx

movl ecx,eax

sarl $31,eax

sub eax,edx

movl edx,eax

todos $2,eax

addl edx,eax

leal 0(,eax,4),edx

addl edx,eax

todos $2,eax

sub eax,ecx

movl ecx,eax

Prueba eax, eax

jne L3

L4:

movl -4(ebp), ecx

movl $1374389535, eax

p>

Min ecx

sarl $7,edx

movl ecx,eax

sarl $31,eax

sub eax,edx

movl edx,eax

todos $2,eax

addl edx,eax

leal 0(,eax, 4), edx

addl edx,eax

todos $4,eax

sub eax,ecx

movl ecx,eax

Prueba eax, eax

jne L2

L3:

movl$LC 1, (esp)

call _printf

jmp L5

L2:

movl $LC2, (esp)

llamar a _printf

L5:

movl $0, eax

Dejar

Remojado en agua para que se ablande

. def_printf. SCL 2;. Tipo 32;. endef

.

def_scanf. SCL 2;. Tipo 32;. final