-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforktest.asm
676 lines (621 loc) · 21.2 KB
/
forktest.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
_forktest: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
printf(1, "fork test OK\n");
}
int
main(void)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 e4 f0 and $0xfffffff0,%esp
forktest();
6: e8 35 00 00 00 call 40 <forktest>
exit();
b: e8 81 03 00 00 call 391 <exit>
00000010 <printf>:
{
10: 55 push %ebp
11: 89 e5 mov %esp,%ebp
13: 53 push %ebx
14: 83 ec 10 sub $0x10,%esp
17: 8b 5d 0c mov 0xc(%ebp),%ebx
write(fd, s, strlen(s));
1a: 53 push %ebx
1b: e8 a0 01 00 00 call 1c0 <strlen>
20: 83 c4 0c add $0xc,%esp
23: 50 push %eax
24: 53 push %ebx
25: ff 75 08 pushl 0x8(%ebp)
28: e8 84 03 00 00 call 3b1 <write>
}
2d: 83 c4 10 add $0x10,%esp
30: 8b 5d fc mov -0x4(%ebp),%ebx
33: c9 leave
34: c3 ret
35: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000040 <forktest>:
{
40: 55 push %ebp
41: 89 e5 mov %esp,%ebp
43: 53 push %ebx
for(n=0; n<N; n++){
44: 31 db xor %ebx,%ebx
{
46: 83 ec 10 sub $0x10,%esp
write(fd, s, strlen(s));
49: 68 3c 04 00 00 push $0x43c
4e: e8 6d 01 00 00 call 1c0 <strlen>
53: 83 c4 0c add $0xc,%esp
56: 50 push %eax
57: 68 3c 04 00 00 push $0x43c
5c: 6a 01 push $0x1
5e: e8 4e 03 00 00 call 3b1 <write>
63: 83 c4 10 add $0x10,%esp
66: eb 19 jmp 81 <forktest+0x41>
68: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
6f: 90 nop
if(pid == 0)
70: 74 58 je ca <forktest+0x8a>
for(n=0; n<N; n++){
72: 83 c3 01 add $0x1,%ebx
75: 81 fb e8 03 00 00 cmp $0x3e8,%ebx
7b: 0f 84 92 00 00 00 je 113 <forktest+0xd3>
pid = fork();
81: e8 03 03 00 00 call 389 <fork>
if(pid < 0)
86: 85 c0 test %eax,%eax
88: 79 e6 jns 70 <forktest+0x30>
for(; n > 0; n--){
8a: 85 db test %ebx,%ebx
8c: 74 10 je 9e <forktest+0x5e>
8e: 66 90 xchg %ax,%ax
if(wait() < 0){
90: e8 04 03 00 00 call 399 <wait>
95: 85 c0 test %eax,%eax
97: 78 36 js cf <forktest+0x8f>
for(; n > 0; n--){
99: 83 eb 01 sub $0x1,%ebx
9c: 75 f2 jne 90 <forktest+0x50>
if(wait() != -1){
9e: e8 f6 02 00 00 call 399 <wait>
a3: 83 f8 ff cmp $0xffffffff,%eax
a6: 75 49 jne f1 <forktest+0xb1>
write(fd, s, strlen(s));
a8: 83 ec 0c sub $0xc,%esp
ab: 68 6e 04 00 00 push $0x46e
b0: e8 0b 01 00 00 call 1c0 <strlen>
b5: 83 c4 0c add $0xc,%esp
b8: 50 push %eax
b9: 68 6e 04 00 00 push $0x46e
be: 6a 01 push $0x1
c0: e8 ec 02 00 00 call 3b1 <write>
}
c5: 8b 5d fc mov -0x4(%ebp),%ebx
c8: c9 leave
c9: c3 ret
exit();
ca: e8 c2 02 00 00 call 391 <exit>
write(fd, s, strlen(s));
cf: 83 ec 0c sub $0xc,%esp
d2: 68 47 04 00 00 push $0x447
d7: e8 e4 00 00 00 call 1c0 <strlen>
dc: 83 c4 0c add $0xc,%esp
df: 50 push %eax
e0: 68 47 04 00 00 push $0x447
e5: 6a 01 push $0x1
e7: e8 c5 02 00 00 call 3b1 <write>
exit();
ec: e8 a0 02 00 00 call 391 <exit>
write(fd, s, strlen(s));
f1: 83 ec 0c sub $0xc,%esp
f4: 68 5b 04 00 00 push $0x45b
f9: e8 c2 00 00 00 call 1c0 <strlen>
fe: 83 c4 0c add $0xc,%esp
101: 50 push %eax
102: 68 5b 04 00 00 push $0x45b
107: 6a 01 push $0x1
109: e8 a3 02 00 00 call 3b1 <write>
exit();
10e: e8 7e 02 00 00 call 391 <exit>
write(fd, s, strlen(s));
113: 83 ec 0c sub $0xc,%esp
116: 68 7c 04 00 00 push $0x47c
11b: e8 a0 00 00 00 call 1c0 <strlen>
120: 83 c4 0c add $0xc,%esp
123: 50 push %eax
124: 68 7c 04 00 00 push $0x47c
129: 6a 01 push $0x1
12b: e8 81 02 00 00 call 3b1 <write>
exit();
130: e8 5c 02 00 00 call 391 <exit>
135: 66 90 xchg %ax,%ax
137: 66 90 xchg %ax,%ax
139: 66 90 xchg %ax,%ax
13b: 66 90 xchg %ax,%ax
13d: 66 90 xchg %ax,%ax
13f: 90 nop
00000140 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
140: 55 push %ebp
char *os;
os = s;
while((*s++ = *t++) != 0)
141: 31 d2 xor %edx,%edx
{
143: 89 e5 mov %esp,%ebp
145: 53 push %ebx
146: 8b 45 08 mov 0x8(%ebp),%eax
149: 8b 5d 0c mov 0xc(%ebp),%ebx
14c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while((*s++ = *t++) != 0)
150: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
154: 88 0c 10 mov %cl,(%eax,%edx,1)
157: 83 c2 01 add $0x1,%edx
15a: 84 c9 test %cl,%cl
15c: 75 f2 jne 150 <strcpy+0x10>
;
return os;
}
15e: 5b pop %ebx
15f: 5d pop %ebp
160: c3 ret
161: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
168: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
16f: 90 nop
00000170 <strcmp>:
int
strcmp(const char *p, const char *q)
{
170: 55 push %ebp
171: 89 e5 mov %esp,%ebp
173: 56 push %esi
174: 53 push %ebx
175: 8b 5d 08 mov 0x8(%ebp),%ebx
178: 8b 75 0c mov 0xc(%ebp),%esi
while(*p && *p == *q)
17b: 0f b6 13 movzbl (%ebx),%edx
17e: 0f b6 0e movzbl (%esi),%ecx
181: 84 d2 test %dl,%dl
183: 74 1e je 1a3 <strcmp+0x33>
185: b8 01 00 00 00 mov $0x1,%eax
18a: 38 ca cmp %cl,%dl
18c: 74 09 je 197 <strcmp+0x27>
18e: eb 20 jmp 1b0 <strcmp+0x40>
190: 83 c0 01 add $0x1,%eax
193: 38 ca cmp %cl,%dl
195: 75 19 jne 1b0 <strcmp+0x40>
197: 0f b6 14 03 movzbl (%ebx,%eax,1),%edx
19b: 0f b6 0c 06 movzbl (%esi,%eax,1),%ecx
19f: 84 d2 test %dl,%dl
1a1: 75 ed jne 190 <strcmp+0x20>
1a3: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
}
1a5: 5b pop %ebx
1a6: 5e pop %esi
return (uchar)*p - (uchar)*q;
1a7: 29 c8 sub %ecx,%eax
}
1a9: 5d pop %ebp
1aa: c3 ret
1ab: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1af: 90 nop
1b0: 0f b6 c2 movzbl %dl,%eax
1b3: 5b pop %ebx
1b4: 5e pop %esi
return (uchar)*p - (uchar)*q;
1b5: 29 c8 sub %ecx,%eax
}
1b7: 5d pop %ebp
1b8: c3 ret
1b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000001c0 <strlen>:
uint
strlen(const char *s)
{
1c0: 55 push %ebp
1c1: 89 e5 mov %esp,%ebp
1c3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
1c6: 80 39 00 cmpb $0x0,(%ecx)
1c9: 74 15 je 1e0 <strlen+0x20>
1cb: 31 d2 xor %edx,%edx
1cd: 8d 76 00 lea 0x0(%esi),%esi
1d0: 83 c2 01 add $0x1,%edx
1d3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
1d7: 89 d0 mov %edx,%eax
1d9: 75 f5 jne 1d0 <strlen+0x10>
;
return n;
}
1db: 5d pop %ebp
1dc: c3 ret
1dd: 8d 76 00 lea 0x0(%esi),%esi
for(n = 0; s[n]; n++)
1e0: 31 c0 xor %eax,%eax
}
1e2: 5d pop %ebp
1e3: c3 ret
1e4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1eb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1ef: 90 nop
000001f0 <memset>:
void*
memset(void *dst, int c, uint n)
{
1f0: 55 push %ebp
1f1: 89 e5 mov %esp,%ebp
1f3: 57 push %edi
1f4: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
1f7: 8b 4d 10 mov 0x10(%ebp),%ecx
1fa: 8b 45 0c mov 0xc(%ebp),%eax
1fd: 89 d7 mov %edx,%edi
1ff: fc cld
200: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
202: 89 d0 mov %edx,%eax
204: 5f pop %edi
205: 5d pop %ebp
206: c3 ret
207: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
20e: 66 90 xchg %ax,%ax
00000210 <strchr>:
char*
strchr(const char *s, char c)
{
210: 55 push %ebp
211: 89 e5 mov %esp,%ebp
213: 53 push %ebx
214: 8b 45 08 mov 0x8(%ebp),%eax
217: 8b 55 0c mov 0xc(%ebp),%edx
for(; *s; s++)
21a: 0f b6 18 movzbl (%eax),%ebx
21d: 84 db test %bl,%bl
21f: 74 1d je 23e <strchr+0x2e>
221: 89 d1 mov %edx,%ecx
if(*s == c)
223: 38 d3 cmp %dl,%bl
225: 75 0d jne 234 <strchr+0x24>
227: eb 17 jmp 240 <strchr+0x30>
229: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
230: 38 ca cmp %cl,%dl
232: 74 0c je 240 <strchr+0x30>
for(; *s; s++)
234: 83 c0 01 add $0x1,%eax
237: 0f b6 10 movzbl (%eax),%edx
23a: 84 d2 test %dl,%dl
23c: 75 f2 jne 230 <strchr+0x20>
return (char*)s;
return 0;
23e: 31 c0 xor %eax,%eax
}
240: 5b pop %ebx
241: 5d pop %ebp
242: c3 ret
243: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
24a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000250 <gets>:
char*
gets(char *buf, int max)
{
250: 55 push %ebp
251: 89 e5 mov %esp,%ebp
253: 57 push %edi
254: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
255: 31 f6 xor %esi,%esi
{
257: 53 push %ebx
258: 89 f3 mov %esi,%ebx
25a: 83 ec 1c sub $0x1c,%esp
25d: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
260: eb 2f jmp 291 <gets+0x41>
262: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
268: 83 ec 04 sub $0x4,%esp
26b: 8d 45 e7 lea -0x19(%ebp),%eax
26e: 6a 01 push $0x1
270: 50 push %eax
271: 6a 00 push $0x0
273: e8 31 01 00 00 call 3a9 <read>
if(cc < 1)
278: 83 c4 10 add $0x10,%esp
27b: 85 c0 test %eax,%eax
27d: 7e 1c jle 29b <gets+0x4b>
break;
buf[i++] = c;
27f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
283: 83 c7 01 add $0x1,%edi
286: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
289: 3c 0a cmp $0xa,%al
28b: 74 23 je 2b0 <gets+0x60>
28d: 3c 0d cmp $0xd,%al
28f: 74 1f je 2b0 <gets+0x60>
for(i=0; i+1 < max; ){
291: 83 c3 01 add $0x1,%ebx
294: 89 fe mov %edi,%esi
296: 3b 5d 0c cmp 0xc(%ebp),%ebx
299: 7c cd jl 268 <gets+0x18>
29b: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
29d: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
2a0: c6 03 00 movb $0x0,(%ebx)
}
2a3: 8d 65 f4 lea -0xc(%ebp),%esp
2a6: 5b pop %ebx
2a7: 5e pop %esi
2a8: 5f pop %edi
2a9: 5d pop %ebp
2aa: c3 ret
2ab: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
2af: 90 nop
2b0: 8b 75 08 mov 0x8(%ebp),%esi
2b3: 8b 45 08 mov 0x8(%ebp),%eax
2b6: 01 de add %ebx,%esi
2b8: 89 f3 mov %esi,%ebx
buf[i] = '\0';
2ba: c6 03 00 movb $0x0,(%ebx)
}
2bd: 8d 65 f4 lea -0xc(%ebp),%esp
2c0: 5b pop %ebx
2c1: 5e pop %esi
2c2: 5f pop %edi
2c3: 5d pop %ebp
2c4: c3 ret
2c5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
2cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
000002d0 <stat>:
int
stat(const char *n, struct stat *st)
{
2d0: 55 push %ebp
2d1: 89 e5 mov %esp,%ebp
2d3: 56 push %esi
2d4: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
2d5: 83 ec 08 sub $0x8,%esp
2d8: 6a 00 push $0x0
2da: ff 75 08 pushl 0x8(%ebp)
2dd: e8 ef 00 00 00 call 3d1 <open>
if(fd < 0)
2e2: 83 c4 10 add $0x10,%esp
2e5: 85 c0 test %eax,%eax
2e7: 78 27 js 310 <stat+0x40>
return -1;
r = fstat(fd, st);
2e9: 83 ec 08 sub $0x8,%esp
2ec: ff 75 0c pushl 0xc(%ebp)
2ef: 89 c3 mov %eax,%ebx
2f1: 50 push %eax
2f2: e8 f2 00 00 00 call 3e9 <fstat>
close(fd);
2f7: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
2fa: 89 c6 mov %eax,%esi
close(fd);
2fc: e8 b8 00 00 00 call 3b9 <close>
return r;
301: 83 c4 10 add $0x10,%esp
}
304: 8d 65 f8 lea -0x8(%ebp),%esp
307: 89 f0 mov %esi,%eax
309: 5b pop %ebx
30a: 5e pop %esi
30b: 5d pop %ebp
30c: c3 ret
30d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
310: be ff ff ff ff mov $0xffffffff,%esi
315: eb ed jmp 304 <stat+0x34>
317: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
31e: 66 90 xchg %ax,%ax
00000320 <atoi>:
int
atoi(const char *s)
{
320: 55 push %ebp
321: 89 e5 mov %esp,%ebp
323: 53 push %ebx
324: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
327: 0f be 11 movsbl (%ecx),%edx
32a: 8d 42 d0 lea -0x30(%edx),%eax
32d: 3c 09 cmp $0x9,%al
n = 0;
32f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
334: 77 1f ja 355 <atoi+0x35>
336: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
33d: 8d 76 00 lea 0x0(%esi),%esi
n = n*10 + *s++ - '0';
340: 83 c1 01 add $0x1,%ecx
343: 8d 04 80 lea (%eax,%eax,4),%eax
346: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
34a: 0f be 11 movsbl (%ecx),%edx
34d: 8d 5a d0 lea -0x30(%edx),%ebx
350: 80 fb 09 cmp $0x9,%bl
353: 76 eb jbe 340 <atoi+0x20>
return n;
}
355: 5b pop %ebx
356: 5d pop %ebp
357: c3 ret
358: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
35f: 90 nop
00000360 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
360: 55 push %ebp
361: 89 e5 mov %esp,%ebp
363: 57 push %edi
364: 8b 55 10 mov 0x10(%ebp),%edx
367: 8b 45 08 mov 0x8(%ebp),%eax
36a: 56 push %esi
36b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
36e: 85 d2 test %edx,%edx
370: 7e 13 jle 385 <memmove+0x25>
372: 01 c2 add %eax,%edx
dst = vdst;
374: 89 c7 mov %eax,%edi
376: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
37d: 8d 76 00 lea 0x0(%esi),%esi
*dst++ = *src++;
380: a4 movsb %ds:(%esi),%es:(%edi)
while(n-- > 0)
381: 39 fa cmp %edi,%edx
383: 75 fb jne 380 <memmove+0x20>
return vdst;
}
385: 5e pop %esi
386: 5f pop %edi
387: 5d pop %ebp
388: c3 ret
00000389 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
389: b8 01 00 00 00 mov $0x1,%eax
38e: cd 40 int $0x40
390: c3 ret
00000391 <exit>:
SYSCALL(exit)
391: b8 02 00 00 00 mov $0x2,%eax
396: cd 40 int $0x40
398: c3 ret
00000399 <wait>:
SYSCALL(wait)
399: b8 03 00 00 00 mov $0x3,%eax
39e: cd 40 int $0x40
3a0: c3 ret
000003a1 <pipe>:
SYSCALL(pipe)
3a1: b8 04 00 00 00 mov $0x4,%eax
3a6: cd 40 int $0x40
3a8: c3 ret
000003a9 <read>:
SYSCALL(read)
3a9: b8 05 00 00 00 mov $0x5,%eax
3ae: cd 40 int $0x40
3b0: c3 ret
000003b1 <write>:
SYSCALL(write)
3b1: b8 10 00 00 00 mov $0x10,%eax
3b6: cd 40 int $0x40
3b8: c3 ret
000003b9 <close>:
SYSCALL(close)
3b9: b8 15 00 00 00 mov $0x15,%eax
3be: cd 40 int $0x40
3c0: c3 ret
000003c1 <kill>:
SYSCALL(kill)
3c1: b8 06 00 00 00 mov $0x6,%eax
3c6: cd 40 int $0x40
3c8: c3 ret
000003c9 <exec>:
SYSCALL(exec)
3c9: b8 07 00 00 00 mov $0x7,%eax
3ce: cd 40 int $0x40
3d0: c3 ret
000003d1 <open>:
SYSCALL(open)
3d1: b8 0f 00 00 00 mov $0xf,%eax
3d6: cd 40 int $0x40
3d8: c3 ret
000003d9 <mknod>:
SYSCALL(mknod)
3d9: b8 11 00 00 00 mov $0x11,%eax
3de: cd 40 int $0x40
3e0: c3 ret
000003e1 <unlink>:
SYSCALL(unlink)
3e1: b8 12 00 00 00 mov $0x12,%eax
3e6: cd 40 int $0x40
3e8: c3 ret
000003e9 <fstat>:
SYSCALL(fstat)
3e9: b8 08 00 00 00 mov $0x8,%eax
3ee: cd 40 int $0x40
3f0: c3 ret
000003f1 <link>:
SYSCALL(link)
3f1: b8 13 00 00 00 mov $0x13,%eax
3f6: cd 40 int $0x40
3f8: c3 ret
000003f9 <mkdir>:
SYSCALL(mkdir)
3f9: b8 14 00 00 00 mov $0x14,%eax
3fe: cd 40 int $0x40
400: c3 ret
00000401 <chdir>:
SYSCALL(chdir)
401: b8 09 00 00 00 mov $0x9,%eax
406: cd 40 int $0x40
408: c3 ret
00000409 <dup>:
SYSCALL(dup)
409: b8 0a 00 00 00 mov $0xa,%eax
40e: cd 40 int $0x40
410: c3 ret
00000411 <getpid>:
SYSCALL(getpid)
411: b8 0b 00 00 00 mov $0xb,%eax
416: cd 40 int $0x40
418: c3 ret
00000419 <sbrk>:
SYSCALL(sbrk)
419: b8 0c 00 00 00 mov $0xc,%eax
41e: cd 40 int $0x40
420: c3 ret
00000421 <sleep>:
SYSCALL(sleep)
421: b8 0d 00 00 00 mov $0xd,%eax
426: cd 40 int $0x40
428: c3 ret
00000429 <uptime>:
SYSCALL(uptime)
429: b8 0e 00 00 00 mov $0xe,%eax
42e: cd 40 int $0x40
430: c3 ret
00000431 <waitpid>:
SYSCALL(waitpid)
431: b8 16 00 00 00 mov $0x16,%eax
436: cd 40 int $0x40
438: c3 ret