.file "simple.c"
.def ___main; .scl 2; .type 32; .endef
.text
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
pushl %ebp
movl %esp, %ebp
subl $24, %esp
andl $-16, %esp
movl $0, %eax
addl $15, %eax
addl $15, %eax
shrl $4, %eax
sall $4, %eax
movl %eax, -24(%ebp)
movl -24(%ebp), %eax
call __alloca
call ___main
movl $1, -4(%ebp)
movl $2, -8(%ebp)
movl $3, -12(%ebp)
movl $4, -16(%ebp)
movl -4(%ebp), %eax
movl %eax, %edx
imull -8(%ebp), %edx
movl -16(%ebp), %eax
addl -12(%ebp), %eax
imull %edx, %eax
movl %eax, -20(%ebp)
movl $0, %eax
leave
ret
|
TITLE simple.c
.386P
include listing.inc
if @Version gt 510
.model FLAT
else
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
_DATA SEGMENT DWORD USE32 PUBLIC 'DATA'
_DATA ENDS
CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
CONST ENDS
_BSS SEGMENT DWORD USE32 PUBLIC 'BSS'
_BSS ENDS
_TLS SEGMENT DWORD USE32 PUBLIC 'TLS'
_TLS ENDS
FLAT GROUP _DATA, CONST, _BSS
ASSUME CS: FLAT, DS: FLAT, SS: FLAT
endif
PUBLIC _main
_TEXT SEGMENT
_a$ = -4
_b$ = -8
_c$ = -12
_d$ = -16
_e$ = -20
_main PROC NEAR
push ebp
mov ebp, esp
sub esp, 20 ; 00000014H
mov DWORD PTR _a$[ebp], 1
mov DWORD PTR _b$[ebp], 2
mov DWORD PTR _c$[ebp], 3
mov DWORD PTR _d$[ebp], 4
mov eax, DWORD PTR _a$[ebp]
imul eax, DWORD PTR _b$[ebp]
mov ecx, DWORD PTR _c$[ebp]
add ecx, DWORD PTR _d$[ebp]
imul eax, ecx
mov DWORD PTR _e$[ebp], eax
xor eax, eax
mov esp, ebp
pop ebp
ret 0
_main ENDP
_TEXT ENDS
END
|