-
Notifications
You must be signed in to change notification settings - Fork 0
/
forktest.asm
692 lines (634 loc) · 21.6 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
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
_forktest: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
printf(1, "fork test OK\n");
}
int
main(void)
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 83 ec 04 sub $0x4,%esp
forktest();
11: e8 3a 00 00 00 call 50 <forktest>
exit();
16: e8 87 03 00 00 call 3a2 <exit>
1b: 66 90 xchg %ax,%ax
1d: 66 90 xchg %ax,%ax
1f: 90 nop
00000020 <printf>:
{
20: 55 push %ebp
21: 89 e5 mov %esp,%ebp
23: 53 push %ebx
24: 83 ec 10 sub $0x10,%esp
27: 8b 5d 0c mov 0xc(%ebp),%ebx
write(fd, s, strlen(s));
2a: 53 push %ebx
2b: e8 a0 01 00 00 call 1d0 <strlen>
30: 83 c4 0c add $0xc,%esp
33: 50 push %eax
34: 53 push %ebx
35: ff 75 08 pushl 0x8(%ebp)
38: e8 85 03 00 00 call 3c2 <write>
}
3d: 83 c4 10 add $0x10,%esp
40: 8b 5d fc mov -0x4(%ebp),%ebx
43: c9 leave
44: c3 ret
45: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000050 <forktest>:
{
50: 55 push %ebp
51: 89 e5 mov %esp,%ebp
53: 53 push %ebx
for(n=0; n<N; n++){
54: 31 db xor %ebx,%ebx
{
56: 83 ec 10 sub $0x10,%esp
write(fd, s, strlen(s));
59: 68 64 04 00 00 push $0x464
5e: e8 6d 01 00 00 call 1d0 <strlen>
63: 83 c4 0c add $0xc,%esp
66: 50 push %eax
67: 68 64 04 00 00 push $0x464
6c: 6a 01 push $0x1
6e: e8 4f 03 00 00 call 3c2 <write>
73: 83 c4 10 add $0x10,%esp
76: eb 19 jmp 91 <forktest+0x41>
78: 90 nop
79: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(pid == 0)
80: 0f 84 7c 00 00 00 je 102 <forktest+0xb2>
for(n=0; n<N; n++){
86: 83 c3 01 add $0x1,%ebx
89: 81 fb e8 03 00 00 cmp $0x3e8,%ebx
8f: 74 4f je e0 <forktest+0x90>
pid = fork();
91: e8 04 03 00 00 call 39a <fork>
if(pid < 0)
96: 85 c0 test %eax,%eax
98: 79 e6 jns 80 <forktest+0x30>
for(; n > 0; n--){
9a: 85 db test %ebx,%ebx
9c: 74 10 je ae <forktest+0x5e>
9e: 66 90 xchg %ax,%ax
if(wait() < 0){
a0: e8 05 03 00 00 call 3aa <wait>
a5: 85 c0 test %eax,%eax
a7: 78 5e js 107 <forktest+0xb7>
for(; n > 0; n--){
a9: 83 eb 01 sub $0x1,%ebx
ac: 75 f2 jne a0 <forktest+0x50>
if(wait() != -1){
ae: e8 f7 02 00 00 call 3aa <wait>
b3: 83 f8 ff cmp $0xffffffff,%eax
b6: 75 71 jne 129 <forktest+0xd9>
write(fd, s, strlen(s));
b8: 83 ec 0c sub $0xc,%esp
bb: 68 96 04 00 00 push $0x496
c0: e8 0b 01 00 00 call 1d0 <strlen>
c5: 83 c4 0c add $0xc,%esp
c8: 50 push %eax
c9: 68 96 04 00 00 push $0x496
ce: 6a 01 push $0x1
d0: e8 ed 02 00 00 call 3c2 <write>
}
d5: 8b 5d fc mov -0x4(%ebp),%ebx
d8: c9 leave
d9: c3 ret
da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
write(fd, s, strlen(s));
e0: 83 ec 0c sub $0xc,%esp
e3: 68 a4 04 00 00 push $0x4a4
e8: e8 e3 00 00 00 call 1d0 <strlen>
ed: 83 c4 0c add $0xc,%esp
f0: 50 push %eax
f1: 68 a4 04 00 00 push $0x4a4
f6: 6a 01 push $0x1
f8: e8 c5 02 00 00 call 3c2 <write>
exit();
fd: e8 a0 02 00 00 call 3a2 <exit>
exit();
102: e8 9b 02 00 00 call 3a2 <exit>
write(fd, s, strlen(s));
107: 83 ec 0c sub $0xc,%esp
10a: 68 6f 04 00 00 push $0x46f
10f: e8 bc 00 00 00 call 1d0 <strlen>
114: 83 c4 0c add $0xc,%esp
117: 50 push %eax
118: 68 6f 04 00 00 push $0x46f
11d: 6a 01 push $0x1
11f: e8 9e 02 00 00 call 3c2 <write>
exit();
124: e8 79 02 00 00 call 3a2 <exit>
write(fd, s, strlen(s));
129: 83 ec 0c sub $0xc,%esp
12c: 68 83 04 00 00 push $0x483
131: e8 9a 00 00 00 call 1d0 <strlen>
136: 83 c4 0c add $0xc,%esp
139: 50 push %eax
13a: 68 83 04 00 00 push $0x483
13f: 6a 01 push $0x1
141: e8 7c 02 00 00 call 3c2 <write>
exit();
146: e8 57 02 00 00 call 3a2 <exit>
14b: 66 90 xchg %ax,%ax
14d: 66 90 xchg %ax,%ax
14f: 90 nop
00000150 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
150: 55 push %ebp
151: 89 e5 mov %esp,%ebp
153: 53 push %ebx
154: 8b 45 08 mov 0x8(%ebp),%eax
157: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
15a: 89 c2 mov %eax,%edx
15c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
160: 83 c1 01 add $0x1,%ecx
163: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
167: 83 c2 01 add $0x1,%edx
16a: 84 db test %bl,%bl
16c: 88 5a ff mov %bl,-0x1(%edx)
16f: 75 ef jne 160 <strcpy+0x10>
;
return os;
}
171: 5b pop %ebx
172: 5d pop %ebp
173: c3 ret
174: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
17a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000180 <strcmp>:
int
strcmp(const char *p, const char *q)
{
180: 55 push %ebp
181: 89 e5 mov %esp,%ebp
183: 53 push %ebx
184: 8b 55 08 mov 0x8(%ebp),%edx
187: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
18a: 0f b6 02 movzbl (%edx),%eax
18d: 0f b6 19 movzbl (%ecx),%ebx
190: 84 c0 test %al,%al
192: 75 1c jne 1b0 <strcmp+0x30>
194: eb 2a jmp 1c0 <strcmp+0x40>
196: 8d 76 00 lea 0x0(%esi),%esi
199: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
1a0: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
1a3: 0f b6 02 movzbl (%edx),%eax
p++, q++;
1a6: 83 c1 01 add $0x1,%ecx
1a9: 0f b6 19 movzbl (%ecx),%ebx
while(*p && *p == *q)
1ac: 84 c0 test %al,%al
1ae: 74 10 je 1c0 <strcmp+0x40>
1b0: 38 d8 cmp %bl,%al
1b2: 74 ec je 1a0 <strcmp+0x20>
return (uchar)*p - (uchar)*q;
1b4: 29 d8 sub %ebx,%eax
}
1b6: 5b pop %ebx
1b7: 5d pop %ebp
1b8: c3 ret
1b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1c0: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
1c2: 29 d8 sub %ebx,%eax
}
1c4: 5b pop %ebx
1c5: 5d pop %ebp
1c6: c3 ret
1c7: 89 f6 mov %esi,%esi
1c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000001d0 <strlen>:
uint
strlen(const char *s)
{
1d0: 55 push %ebp
1d1: 89 e5 mov %esp,%ebp
1d3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
1d6: 80 39 00 cmpb $0x0,(%ecx)
1d9: 74 15 je 1f0 <strlen+0x20>
1db: 31 d2 xor %edx,%edx
1dd: 8d 76 00 lea 0x0(%esi),%esi
1e0: 83 c2 01 add $0x1,%edx
1e3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
1e7: 89 d0 mov %edx,%eax
1e9: 75 f5 jne 1e0 <strlen+0x10>
;
return n;
}
1eb: 5d pop %ebp
1ec: c3 ret
1ed: 8d 76 00 lea 0x0(%esi),%esi
for(n = 0; s[n]; n++)
1f0: 31 c0 xor %eax,%eax
}
1f2: 5d pop %ebp
1f3: c3 ret
1f4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1fa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000200 <memset>:
void*
memset(void *dst, int c, uint n)
{
200: 55 push %ebp
201: 89 e5 mov %esp,%ebp
203: 57 push %edi
204: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
207: 8b 4d 10 mov 0x10(%ebp),%ecx
20a: 8b 45 0c mov 0xc(%ebp),%eax
20d: 89 d7 mov %edx,%edi
20f: fc cld
210: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
212: 89 d0 mov %edx,%eax
214: 5f pop %edi
215: 5d pop %ebp
216: c3 ret
217: 89 f6 mov %esi,%esi
219: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000220 <strchr>:
char*
strchr(const char *s, char c)
{
220: 55 push %ebp
221: 89 e5 mov %esp,%ebp
223: 53 push %ebx
224: 8b 45 08 mov 0x8(%ebp),%eax
227: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
22a: 0f b6 10 movzbl (%eax),%edx
22d: 84 d2 test %dl,%dl
22f: 74 1d je 24e <strchr+0x2e>
if(*s == c)
231: 38 d3 cmp %dl,%bl
233: 89 d9 mov %ebx,%ecx
235: 75 0d jne 244 <strchr+0x24>
237: eb 17 jmp 250 <strchr+0x30>
239: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
240: 38 ca cmp %cl,%dl
242: 74 0c je 250 <strchr+0x30>
for(; *s; s++)
244: 83 c0 01 add $0x1,%eax
247: 0f b6 10 movzbl (%eax),%edx
24a: 84 d2 test %dl,%dl
24c: 75 f2 jne 240 <strchr+0x20>
return (char*)s;
return 0;
24e: 31 c0 xor %eax,%eax
}
250: 5b pop %ebx
251: 5d pop %ebp
252: c3 ret
253: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000260 <gets>:
char*
gets(char *buf, int max)
{
260: 55 push %ebp
261: 89 e5 mov %esp,%ebp
263: 57 push %edi
264: 56 push %esi
265: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
266: 31 f6 xor %esi,%esi
268: 89 f3 mov %esi,%ebx
{
26a: 83 ec 1c sub $0x1c,%esp
26d: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
270: eb 2f jmp 2a1 <gets+0x41>
272: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
278: 8d 45 e7 lea -0x19(%ebp),%eax
27b: 83 ec 04 sub $0x4,%esp
27e: 6a 01 push $0x1
280: 50 push %eax
281: 6a 00 push $0x0
283: e8 32 01 00 00 call 3ba <read>
if(cc < 1)
288: 83 c4 10 add $0x10,%esp
28b: 85 c0 test %eax,%eax
28d: 7e 1c jle 2ab <gets+0x4b>
break;
buf[i++] = c;
28f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
293: 83 c7 01 add $0x1,%edi
296: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
299: 3c 0a cmp $0xa,%al
29b: 74 23 je 2c0 <gets+0x60>
29d: 3c 0d cmp $0xd,%al
29f: 74 1f je 2c0 <gets+0x60>
for(i=0; i+1 < max; ){
2a1: 83 c3 01 add $0x1,%ebx
2a4: 3b 5d 0c cmp 0xc(%ebp),%ebx
2a7: 89 fe mov %edi,%esi
2a9: 7c cd jl 278 <gets+0x18>
2ab: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
2ad: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
2b0: c6 03 00 movb $0x0,(%ebx)
}
2b3: 8d 65 f4 lea -0xc(%ebp),%esp
2b6: 5b pop %ebx
2b7: 5e pop %esi
2b8: 5f pop %edi
2b9: 5d pop %ebp
2ba: c3 ret
2bb: 90 nop
2bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
2c0: 8b 75 08 mov 0x8(%ebp),%esi
2c3: 8b 45 08 mov 0x8(%ebp),%eax
2c6: 01 de add %ebx,%esi
2c8: 89 f3 mov %esi,%ebx
buf[i] = '\0';
2ca: c6 03 00 movb $0x0,(%ebx)
}
2cd: 8d 65 f4 lea -0xc(%ebp),%esp
2d0: 5b pop %ebx
2d1: 5e pop %esi
2d2: 5f pop %edi
2d3: 5d pop %ebp
2d4: c3 ret
2d5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
2d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000002e0 <stat>:
int
stat(const char *n, struct stat *st)
{
2e0: 55 push %ebp
2e1: 89 e5 mov %esp,%ebp
2e3: 56 push %esi
2e4: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
2e5: 83 ec 08 sub $0x8,%esp
2e8: 6a 00 push $0x0
2ea: ff 75 08 pushl 0x8(%ebp)
2ed: e8 f0 00 00 00 call 3e2 <open>
if(fd < 0)
2f2: 83 c4 10 add $0x10,%esp
2f5: 85 c0 test %eax,%eax
2f7: 78 27 js 320 <stat+0x40>
return -1;
r = fstat(fd, st);
2f9: 83 ec 08 sub $0x8,%esp
2fc: ff 75 0c pushl 0xc(%ebp)
2ff: 89 c3 mov %eax,%ebx
301: 50 push %eax
302: e8 f3 00 00 00 call 3fa <fstat>
close(fd);
307: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
30a: 89 c6 mov %eax,%esi
close(fd);
30c: e8 b9 00 00 00 call 3ca <close>
return r;
311: 83 c4 10 add $0x10,%esp
}
314: 8d 65 f8 lea -0x8(%ebp),%esp
317: 89 f0 mov %esi,%eax
319: 5b pop %ebx
31a: 5e pop %esi
31b: 5d pop %ebp
31c: c3 ret
31d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
320: be ff ff ff ff mov $0xffffffff,%esi
325: eb ed jmp 314 <stat+0x34>
327: 89 f6 mov %esi,%esi
329: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000330 <atoi>:
int
atoi(const char *s)
{
330: 55 push %ebp
331: 89 e5 mov %esp,%ebp
333: 53 push %ebx
334: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
337: 0f be 11 movsbl (%ecx),%edx
33a: 8d 42 d0 lea -0x30(%edx),%eax
33d: 3c 09 cmp $0x9,%al
n = 0;
33f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
344: 77 1f ja 365 <atoi+0x35>
346: 8d 76 00 lea 0x0(%esi),%esi
349: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
350: 8d 04 80 lea (%eax,%eax,4),%eax
353: 83 c1 01 add $0x1,%ecx
356: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
35a: 0f be 11 movsbl (%ecx),%edx
35d: 8d 5a d0 lea -0x30(%edx),%ebx
360: 80 fb 09 cmp $0x9,%bl
363: 76 eb jbe 350 <atoi+0x20>
return n;
}
365: 5b pop %ebx
366: 5d pop %ebp
367: c3 ret
368: 90 nop
369: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000370 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
370: 55 push %ebp
371: 89 e5 mov %esp,%ebp
373: 56 push %esi
374: 53 push %ebx
375: 8b 5d 10 mov 0x10(%ebp),%ebx
378: 8b 45 08 mov 0x8(%ebp),%eax
37b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
37e: 85 db test %ebx,%ebx
380: 7e 14 jle 396 <memmove+0x26>
382: 31 d2 xor %edx,%edx
384: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
388: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
38c: 88 0c 10 mov %cl,(%eax,%edx,1)
38f: 83 c2 01 add $0x1,%edx
while(n-- > 0)
392: 39 d3 cmp %edx,%ebx
394: 75 f2 jne 388 <memmove+0x18>
return vdst;
}
396: 5b pop %ebx
397: 5e pop %esi
398: 5d pop %ebp
399: c3 ret
0000039a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
39a: b8 01 00 00 00 mov $0x1,%eax
39f: cd 40 int $0x40
3a1: c3 ret
000003a2 <exit>:
SYSCALL(exit)
3a2: b8 02 00 00 00 mov $0x2,%eax
3a7: cd 40 int $0x40
3a9: c3 ret
000003aa <wait>:
SYSCALL(wait)
3aa: b8 03 00 00 00 mov $0x3,%eax
3af: cd 40 int $0x40
3b1: c3 ret
000003b2 <pipe>:
SYSCALL(pipe)
3b2: b8 04 00 00 00 mov $0x4,%eax
3b7: cd 40 int $0x40
3b9: c3 ret
000003ba <read>:
SYSCALL(read)
3ba: b8 05 00 00 00 mov $0x5,%eax
3bf: cd 40 int $0x40
3c1: c3 ret
000003c2 <write>:
SYSCALL(write)
3c2: b8 10 00 00 00 mov $0x10,%eax
3c7: cd 40 int $0x40
3c9: c3 ret
000003ca <close>:
SYSCALL(close)
3ca: b8 15 00 00 00 mov $0x15,%eax
3cf: cd 40 int $0x40
3d1: c3 ret
000003d2 <kill>:
SYSCALL(kill)
3d2: b8 06 00 00 00 mov $0x6,%eax
3d7: cd 40 int $0x40
3d9: c3 ret
000003da <exec>:
SYSCALL(exec)
3da: b8 07 00 00 00 mov $0x7,%eax
3df: cd 40 int $0x40
3e1: c3 ret
000003e2 <open>:
SYSCALL(open)
3e2: b8 0f 00 00 00 mov $0xf,%eax
3e7: cd 40 int $0x40
3e9: c3 ret
000003ea <mknod>:
SYSCALL(mknod)
3ea: b8 11 00 00 00 mov $0x11,%eax
3ef: cd 40 int $0x40
3f1: c3 ret
000003f2 <unlink>:
SYSCALL(unlink)
3f2: b8 12 00 00 00 mov $0x12,%eax
3f7: cd 40 int $0x40
3f9: c3 ret
000003fa <fstat>:
SYSCALL(fstat)
3fa: b8 08 00 00 00 mov $0x8,%eax
3ff: cd 40 int $0x40
401: c3 ret
00000402 <link>:
SYSCALL(link)
402: b8 13 00 00 00 mov $0x13,%eax
407: cd 40 int $0x40
409: c3 ret
0000040a <mkdir>:
SYSCALL(mkdir)
40a: b8 14 00 00 00 mov $0x14,%eax
40f: cd 40 int $0x40
411: c3 ret
00000412 <chdir>:
SYSCALL(chdir)
412: b8 09 00 00 00 mov $0x9,%eax
417: cd 40 int $0x40
419: c3 ret
0000041a <dup>:
SYSCALL(dup)
41a: b8 0a 00 00 00 mov $0xa,%eax
41f: cd 40 int $0x40
421: c3 ret
00000422 <getpid>:
SYSCALL(getpid)
422: b8 0b 00 00 00 mov $0xb,%eax
427: cd 40 int $0x40
429: c3 ret
0000042a <sbrk>:
SYSCALL(sbrk)
42a: b8 0c 00 00 00 mov $0xc,%eax
42f: cd 40 int $0x40
431: c3 ret
00000432 <sleep>:
SYSCALL(sleep)
432: b8 0d 00 00 00 mov $0xd,%eax
437: cd 40 int $0x40
439: c3 ret
0000043a <uptime>:
SYSCALL(uptime)
43a: b8 0e 00 00 00 mov $0xe,%eax
43f: cd 40 int $0x40
441: c3 ret
00000442 <cps>:
SYSCALL(cps)
442: b8 16 00 00 00 mov $0x16,%eax
447: cd 40 int $0x40
449: c3 ret
0000044a <chpr>:
SYSCALL(chpr)
44a: b8 17 00 00 00 mov $0x17,%eax
44f: cd 40 int $0x40
451: c3 ret
00000452 <waitx>:
SYSCALL(waitx)
452: b8 18 00 00 00 mov $0x18,%eax
457: cd 40 int $0x40
459: c3 ret
0000045a <getpinfo>:
SYSCALL(getpinfo)
45a: b8 19 00 00 00 mov $0x19,%eax
45f: cd 40 int $0x40
461: c3 ret