bits 32
section .text
    global _start
_start:
    ;socket
    mov eax, 0x66
    mov ebx, 0x1
    push 0x0
    push 0x1
    push 0x2
    mov ecx, esp
    int 0x80
    ;bind
    mov edx, eax
    xor eax, eax
    mov eax, 0x66
    mov ebx, 0x2
    push word 0x0
    push word 0x5c11
    push word 0x2
    mov ecx, esp
    push 0x16
    push ecx
    push edx
    int 0x80
    ;listen
    push eax
    mov eax, 0x66
    mov ebx, 0x4
    push edx
    mov ecx, esp
    int 0x80
    ;accept
    push eax
    push eax
    push edx
    mov ecx, esp
    int 0x80
$ nasm -f elf32 socket.asm ; ld -m elf_i386 -o socket socket.o
$ ./socket 
Segmentation fault (core dumped)
I have compiled the binary on Ubuntu 16.04 Desktop x86_64.
Any idea?
 
    