I'm trying to compile the following using gcc -c main.s
.intel_syntax noprefix
.global main
main:
push ebp
mov ebp,esp
sub esp,0x10
mov DWORD PTR [ebp-0xc],0x0
mov eax,DWORD PTR [ebp+0xc]
mov eax,DWORD PTR [eax+0x4]
mov DWORD PTR [ebp-0x4],eax
leave
ret
And I get an error:
main.s:6: Error: operand type mismatch for `push'
What's the reason this isn't working?