.globl _start
_start:
        #socket(AF_INET,SOCK_STREAM,IPPROTO_IP);

        movl %esp,%ebp
        xorl %edx,%edx
        movb $102,%edx
        movl %edx,%eax          # 102 = socketcall
        xorl %ecx,%ecx
        movl %ecx,%ebx
        incl %ebx               # socket()
        movl %ebx, -8(%ebp)     # 1 = SOCK_STREAM
        incl %ebx
        movl %ebx, -12(%ebp)    # 2 = AF_INET
        decl %ebx               # 1 = SYS_socket
        movl %ecx, -4(%ebp)     # 0 = IPPROTO_IP
        leal -12(%ebp),%ecx     # put args in correct place
        int  $0x80              # switch to kernel-mode
        xorl %ecx,%ecx
        movl %eax,-12(%ebp)     # save the fd


        movb $0x1,%al       # exitS
        int $0x80

