📄 echo.lst
字号:
echo.x: file format coff-go32
Disassembly of section .text:
40000000 <_code>:
40000000: 0a 00 or (%eax),%al
40000002: 90 nop
40000003: 90 nop
40000004: 90 nop
40000005: 90 nop
40000006: 90 nop
40000007: 90 nop
40000008: 90 nop
40000009: 90 nop
4000000a: 90 nop
4000000b: 90 nop
4000000c: 90 nop
4000000d: 90 nop
4000000e: 90 nop
4000000f: 90 nop
40000010: 90 nop
40000011: 90 nop
40000012: 90 nop
40000013: 90 nop
40000014: 90 nop
40000015: 90 nop
40000016: 90 nop
40000017: 90 nop
40000018: 90 nop
40000019: 90 nop
4000001a: 90 nop
4000001b: 90 nop
4000001c: 90 nop
4000001d: 90 nop
4000001e: 90 nop
4000001f: 90 nop
40000020: 54 push %esp
40000021: 79 70 jns 40000093 <_main+0x27>
40000023: 65 20 73 6f and %dh,%gs:0x6f(%ebx)
40000027: 6d insl (%dx),%es:(%edi)
40000028: 65 20 74 65 78 and %dh,%gs:0x78(%ebp,2)
4000002d: 74 2c je 4000005b <_code+0x5b>
4000002f: 20 74 68 65 and %dh,0x65(%eax,%ebp,2)
40000033: 6e outsb %ds:(%esi),(%dx)
40000034: 20 70 72 and %dh,0x72(%eax)
40000037: 65 gs
40000038: 73 73 jae 400000ad <_main+0x41>
4000003a: 20 45 6e and %al,0x6e(%ebp)
4000003d: 74 65 je 400000a4 <_main+0x38>
4000003f: 72 0a jb 4000004b <_code+0x4b>
40000041: 00 2a add %ch,(%edx)
40000043: 2a 2a sub (%edx),%ch
40000045: 20 72 65 and %dh,0x65(%edx)
40000048: 61 popa
40000049: 64 28 29 sub %ch,%fs:(%ecx)
4000004c: 20 72 65 and %dh,0x65(%edx)
4000004f: 74 75 je 400000c6 <_main+0x5a>
40000051: 72 6e jb 400000c1 <_main+0x55>
40000053: 65 64 20 25 64 0a 00 and %ah,%fs:%gs:0x79000a64
4000005a: 79
4000005b: 6f outsl %ds:(%esi),(%dx)
4000005c: 75 20 jne 4000007e <_main+0x12>
4000005e: 74 79 je 400000d9 <_printf+0x9>
40000060: 70 65 jo 400000c7 <_main+0x5b>
40000062: 64 20 27 and %ah,%fs:(%edi)
40000065: 25 73 27 0a 00 and $0xa2773,%eax
4000006a: 89 f6 mov %esi,%esi
4000006c <_main>:
_main():
echo.c:18
{
unsigned char buf[SIZE];
int temp;
printf("\n");
4000006c: 55 push %ebp
4000006d: 89 e5 mov %esp,%ebp
4000006f: 83 ec 34 sub $0x34,%esp
40000072: 53 push %ebx
40000073: 83 c4 f4 add $0xfffffff4,%esp
40000076: 68 00 00 00 40 push $0x40000000
4000007b: e8 50 00 00 00 call 400000d0 <_printf>
echo.c:19
while(1)
40000080: 83 c4 10 add $0x10,%esp
40000083: 8d 5d e0 lea 0xffffffe0(%ebp),%ebx
echo.c:21
{
printf("Type some text, then press Enter\n");
40000086: 83 c4 f4 add $0xfffffff4,%esp
40000089: 68 20 00 00 40 push $0x40000020
4000008e: e8 3d 00 00 00 call 400000d0 <_printf>
echo.c:22
temp = read(0, buf, SIZE);
40000093: 83 c4 fc add $0xfffffffc,%esp
40000096: 6a 20 push $0x20
40000098: 53 push %ebx
40000099: 6a 00 push $0x0
4000009b: e8 50 00 00 00 call 400000f0 <_read>
echo.c:23
if(temp < 0)
400000a0: 83 c4 20 add $0x20,%esp
400000a3: 85 c0 test %eax,%eax
400000a5: 7d 11 jge 400000b8 <_main+0x4c>
echo.c:24
printf("*** read() returned %d\n", temp);
400000a7: 83 c4 f8 add $0xfffffff8,%esp
400000aa: 50 push %eax
400000ab: 68 42 00 00 40 push $0x40000042
400000b0: e8 1b 00 00 00 call 400000d0 <_printf>
400000b5: 83 c4 10 add $0x10,%esp
echo.c:25
printf("you typed '%s'\n", buf);
400000b8: 83 c4 f8 add $0xfffffff8,%esp
400000bb: 53 push %ebx
400000bc: 68 5a 00 00 40 push $0x4000005a
400000c1: e8 0a 00 00 00 call 400000d0 <_printf>
echo.c:26
}
400000c6: 83 c4 10 add $0x10,%esp
400000c9: eb bb jmp 40000086 <_main+0x1a>
400000cb <.ef>:
echo.c:28
return 0;
}
400000cb: 90 nop
400000cc: 8d 74 26 00 lea 0x0(%esi,1),%esi
400000d0 <_printf>:
_printf():
printf.c:9
400000d0: 55 push %ebp
400000d1: 89 e5 mov %esp,%ebp
400000d3: 83 ec 08 sub $0x8,%esp
400000d6: 8d 45 0c lea 0xc(%ebp),%eax
printf.c:10
400000d9: 83 c4 f8 add $0xfffffff8,%esp
400000dc: 50 push %eax
400000dd: 8b 45 08 mov 0x8(%ebp),%eax
400000e0: 50 push %eax
400000e1: e8 4a 00 00 00 call 40000130 <_vprintf>
printf.c:12
400000e6: 89 ec mov %ebp,%esp
400000e8: 5d pop %ebp
400000e9: c3 ret
400000ea <.ef>:
printf.c:13
400000ea: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
400000f0 <_read>:
_read():
read.c:5
400000f0: 55 push %ebp
400000f1: 89 e5 mov %esp,%ebp
400000f3: 53 push %ebx
read.c:8
400000f4: b8 03 00 00 00 mov $0x3,%eax
read.c:5
400000f9: 8b 55 08 mov 0x8(%ebp),%edx
400000fc: 8b 5d 0c mov 0xc(%ebp),%ebx
400000ff: 8b 4d 10 mov 0x10(%ebp),%ecx
read.c:8
40000102: cd 30 int $0x30
read.c:11
40000104: 5b pop %ebx
40000105: 89 ec mov %ebp,%esp
40000107: 5d pop %ebp
40000108: c3 ret
40000109 <.ef>:
read.c:12
40000109: 8d b4 26 00 00 00 00 lea 0x0(%esi,1),%esi
40000110 <_vprintf_help>:
_vprintf_help():
vprintf.c:8
40000110: 55 push %ebp
40000111: 89 e5 mov %esp,%ebp
40000113: 83 ec 08 sub $0x8,%esp
40000116: 83 c4 f8 add $0xfffffff8,%esp
40000119: 68 18 10 00 40 push $0x40001018
4000011e: 0f be 45 08 movsbl 0x8(%ebp),%eax
40000122: 50 push %eax
40000123: e8 28 00 00 00 call 40000150 <_fputc>
vprintf.c:9
40000128: 31 c0 xor %eax,%eax
4000012a: 89 ec mov %ebp,%esp
4000012c: 5d pop %ebp
4000012d: c3 ret
4000012e <.ef>:
4000012e: 89 f6 mov %esi,%esi
40000130 <_vprintf>:
_vprintf():
vprintf.c:14
40000130: 55 push %ebp
40000131: 89 e5 mov %esp,%ebp
40000133: 83 ec 08 sub $0x8,%esp
40000136: 8b 55 08 mov 0x8(%ebp),%edx
40000139: 8b 45 0c mov 0xc(%ebp),%eax
vprintf.c:15
4000013c: 6a 00 push $0x0
4000013e: 68 10 01 00 40 push $0x40000110
40000143: 50 push %eax
40000144: 52 push %edx
40000145: e8 a6 00 00 00 call 400001f0 <_do_printf>
4000014a: 89 ec mov %ebp,%esp
4000014c: 5d pop %ebp
4000014d: c3 ret
4000014e <.ef>:
4000014e: 89 f6 mov %esi,%esi
40000150 <_fputc>:
_fputc():
fputc.c:6
40000150: 55 push %ebp
40000151: 89 e5 mov %esp,%ebp
40000153: 83 ec 0c sub $0xc,%esp
40000156: 57 push %edi
40000157: 56 push %esi
40000158: 53 push %ebx
40000159: 8b 75 08 mov 0x8(%ebp),%esi
4000015c: 8b 5d 0c mov 0xc(%ebp),%ebx
fputc.c:10
4000015f: 89 f7 mov %esi,%edi
fputc.c:11
40000161: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
40000165: 74 06 je 4000016d <_fputc+0x1d>
40000167: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
4000016b: 75 23 jne 40000190 <_fputc+0x40>
fputc.c:13
4000016d: 89 f8 mov %edi,%eax
4000016f: 88 45 ff mov %al,0xffffffff(%ebp)
fputc.c:14
40000172: 83 c4 fc add $0xfffffffc,%esp
40000175: 6a 01 push $0x1
40000177: 8d 45 ff lea 0xffffffff(%ebp),%eax
4000017a: 50 push %eax
4000017b: 8b 43 14 mov 0x14(%ebx),%eax
4000017e: 50 push %eax
4000017f: e8 7c 04 00 00 call 40000600 <_write>
40000184: 83 f8 01 cmp $0x1,%eax
40000187: 74 51 je 400001da <_fputc+0x8a>
fputc.c:16
40000189: eb 4a jmp 400001d5 <_fputc+0x85>
4000018b: 90 nop
4000018c: 8d 74 26 00 lea 0x0(%esi,1),%esi
fputc.c:19
40000190: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
40000194: 75 1a jne 400001b0 <_fputc+0x60>
fputc.c:21
40000196: 83 c4 f4 add $0xfffffff4,%esp
40000199: 53 push %ebx
4000019a: e8 81 04 00 00 call 40000620 <_fflush>
4000019f: 83 c4 10 add $0x10,%esp
400001a2: 85 c0 test %eax,%eax
400001a4: 74 0a je 400001b0 <_fputc+0x60>
fputc.c:22
400001a6: b8 ff ff ff ff mov $0xffffffff,%eax
400001ab: eb 2f jmp 400001dc <_fputc+0x8c>
400001ad: 8d 76 00 lea 0x0(%esi),%esi
fputc.c:24
400001b0: 8b 43 04 mov 0x4(%ebx),%eax
400001b3: 89 f2 mov %esi,%edx
400001b5: 88 10 mov %dl,(%eax)
400001b7: ff 43 04 incl 0x4(%ebx)
fputc.c:25
400001ba: ff 4b 0c decl 0xc(%ebx)
fputc.c:26
400001bd: f6 43 10 02 testb $0x2,0x10(%ebx)
400001c1: 74 17 je 400001da <_fputc+0x8a>
400001c3: 83 fe 0a cmp $0xa,%esi
400001c6: 75 12 jne 400001da <_fputc+0x8a>
fputc.c:28
400001c8: 83 c4 f4 add $0xfffffff4,%esp
400001cb: 53 push %ebx
400001cc: e8 4f 04 00 00 call 40000620 <_fflush>
400001d1: 85 c0 test %eax,%eax
400001d3: 74 05 je 400001da <_fputc+0x8a>
fputc.c:29
400001d5: bf ff ff ff ff mov $0xffffffff,%edi
fputc.c:32
400001da: 89 f8 mov %edi,%eax
400001dc: 8d 65 e8 lea 0xffffffe8(%ebp),%esp
400001df: 5b pop %ebx
400001e0: 5e pop %esi
400001e1: 5f pop %edi
400001e2: 89 ec mov %ebp,%esp
400001e4: 5d pop %ebp
400001e5: c3 ret
400001e6 <.ef>:
fputc.c:33
400001e6: 8d 76 00 lea 0x0(%esi),%esi
400001e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,1),%edi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -