linux 和 windows 结束输入流的控制字符不一样

DO IT YOURSELF !
程序代码:
.file "test.c"
.section .rodata
.LC0:
.string "%d %d %d\n"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
leal 4(%esp), %ecx
.cfi_def_cfa 1, 0
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
.cfi_escape 0x10,0x5,0x2,0x75,0
movl %esp, %ebp
pushl %ecx
.cfi_escape 0xf,0x3,0x75,0x7c,0x6
subl $20, %esp
movl $0, -12(%ebp)
movl $0, -16(%ebp)
movl $0, -20(%ebp)
jmp .L2
.L5:
cmpl $32, -24(%ebp)
jne .L3
addl $1, -12(%ebp)
.L3:
cmpl $9, -24(%ebp)
jne .L4
addl $1, -16(%ebp)
.L4:
cmpl $10, -24(%ebp)
jne .L2
addl $1, -20(%ebp)
.L2:
call getchar
movl %eax, -24(%ebp)
cmpl $-1, -24(%ebp)
jne .L5
pushl -20(%ebp)
pushl -16(%ebp)
pushl -12(%ebp)
pushl $.LC0
call printf
addl $16, %esp
movl -4(%ebp), %ecx
.cfi_def_cfa 1, 0
leave
.cfi_restore 5
leal -4(%ecx), %esp
.cfi_def_cfa 4, 4
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Debian 4.9.2-10) 4.9.2"
.section .note.GNU-stack,"",@progbits