Added buffer to the console
Added hotkeys to switch between console buffers and to return to the home one Added clear screen command Added debug text outputs to the hello command and when loading sh
This commit is contained in:
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"new": "c",
|
||||
"*.tcc": "c"
|
||||
}
|
||||
}
|
4
Makefile
4
Makefile
@ -199,6 +199,7 @@ UPROGS=\
|
||||
_shutdown\
|
||||
_argtest\
|
||||
_screen\
|
||||
_cls\
|
||||
|
||||
fs.img: mkfs $(UPROGS)
|
||||
./mkfs fs.img $(UPROGS)
|
||||
@ -222,7 +223,8 @@ QEMUGDB = $(shell if $(QEMU) -help | grep -q '^-gdb'; \
|
||||
then echo "-gdb tcp::$(GDBPORT)"; \
|
||||
else echo "-s -p $(GDBPORT)"; fi)
|
||||
ifndef CPUS
|
||||
CPUS := 2
|
||||
#CPUS := 2
|
||||
CPUS := 1
|
||||
endif
|
||||
QEMUOPTS = -drive file=fs.img,index=1,media=disk,format=raw -drive file=xv6.img,index=0,media=disk,format=raw -smp $(CPUS) -m 512 $(QEMUEXTRA)
|
||||
|
||||
|
BIN
_usertests
BIN
_usertests
Binary file not shown.
1162
argtest.asm
1162
argtest.asm
File diff suppressed because it is too large
Load Diff
48
argtest.sym
48
argtest.sym
@ -1,48 +0,0 @@
|
||||
00000000 argtest.c
|
||||
00000000 ulib.c
|
||||
00000000 printf.c
|
||||
00000360 printint
|
||||
000007a4 digits.0
|
||||
00000000 umalloc.c
|
||||
00000a58 freep
|
||||
00000a5c base
|
||||
00000050 strcpy
|
||||
00000410 printf
|
||||
0000034b greeting
|
||||
00000270 memmove
|
||||
0000031b mknod
|
||||
00000170 gets
|
||||
000002eb getpid
|
||||
00000640 malloc
|
||||
000002fb sleep
|
||||
000002b3 pipe
|
||||
00000343 getch
|
||||
00000313 write
|
||||
000002d3 fstat
|
||||
000002c3 kill
|
||||
000002db chdir
|
||||
000002cb exec
|
||||
000002ab wait
|
||||
000002bb read
|
||||
00000323 unlink
|
||||
0000029b fork
|
||||
000002f3 sbrk
|
||||
00000303 uptime
|
||||
00000a58 __bss_start
|
||||
00000110 memset
|
||||
00000000 main
|
||||
00000080 strcmp
|
||||
00000353 shutdown
|
||||
000002e3 dup
|
||||
000001e0 stat
|
||||
00000a58 _edata
|
||||
00000a64 _end
|
||||
0000032b link
|
||||
000002a3 exit
|
||||
00000230 atoi
|
||||
000000e0 strlen
|
||||
0000030b open
|
||||
00000130 strchr
|
||||
00000333 mkdir
|
||||
0000033b close
|
||||
000005b0 free
|
2
bio.d
2
bio.d
@ -1,2 +0,0 @@
|
||||
bio.o: bio.c /usr/include/stdc-predef.h types.h defs.h param.h spinlock.h \
|
||||
sleeplock.h fs.h buf.h
|
341
bootblock.asm
341
bootblock.asm
@ -1,341 +0,0 @@
|
||||
|
||||
bootblock.o: file format elf32-i386
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00007c00 <start>:
|
||||
# with %cs=0 %ip=7c00.
|
||||
|
||||
.code16 # Assemble for 16-bit mode
|
||||
.globl start
|
||||
start:
|
||||
cli # BIOS enabled interrupts; disable
|
||||
7c00: fa cli
|
||||
|
||||
# Zero data segment registers DS, ES, and SS.
|
||||
xorw %ax,%ax # Set %ax to zero
|
||||
7c01: 31 c0 xor %eax,%eax
|
||||
movw %ax,%ds # -> Data Segment
|
||||
7c03: 8e d8 mov %eax,%ds
|
||||
movw %ax,%es # -> Extra Segment
|
||||
7c05: 8e c0 mov %eax,%es
|
||||
movw %ax,%ss # -> Stack Segment
|
||||
7c07: 8e d0 mov %eax,%ss
|
||||
|
||||
00007c09 <seta20.1>:
|
||||
|
||||
# Physical address line A20 is tied to zero so that the first PCs
|
||||
# with 2 MB would run software that assumed 1 MB. Undo that.
|
||||
seta20.1:
|
||||
inb $0x64,%al # Wait for not busy
|
||||
7c09: e4 64 in $0x64,%al
|
||||
testb $0x2,%al
|
||||
7c0b: a8 02 test $0x2,%al
|
||||
jnz seta20.1
|
||||
7c0d: 75 fa jne 7c09 <seta20.1>
|
||||
|
||||
movb $0xd1,%al # 0xd1 -> port 0x64
|
||||
7c0f: b0 d1 mov $0xd1,%al
|
||||
outb %al,$0x64
|
||||
7c11: e6 64 out %al,$0x64
|
||||
|
||||
00007c13 <seta20.2>:
|
||||
|
||||
seta20.2:
|
||||
inb $0x64,%al # Wait for not busy
|
||||
7c13: e4 64 in $0x64,%al
|
||||
testb $0x2,%al
|
||||
7c15: a8 02 test $0x2,%al
|
||||
jnz seta20.2
|
||||
7c17: 75 fa jne 7c13 <seta20.2>
|
||||
|
||||
movb $0xdf,%al # 0xdf -> port 0x60
|
||||
7c19: b0 df mov $0xdf,%al
|
||||
outb %al,$0x60
|
||||
7c1b: e6 60 out %al,$0x60
|
||||
|
||||
# Switch from real to protected mode. Use a bootstrap GDT that makes
|
||||
# virtual addresses map directly to physical addresses so that the
|
||||
# effective memory map doesn't change during the transition.
|
||||
lgdt gdtdesc
|
||||
7c1d: 0f 01 16 lgdtl (%esi)
|
||||
7c20: 68 7c 0f 20 c0 push $0xc0200f7c
|
||||
movl %cr0, %eax
|
||||
orl $CR0_PE, %eax
|
||||
7c25: 66 83 c8 01 or $0x1,%ax
|
||||
movl %eax, %cr0
|
||||
7c29: 0f 22 c0 mov %eax,%cr0
|
||||
|
||||
# Complete the transition to 32-bit protected mode by using a long jmp
|
||||
# to reload %cs and %eip. The segment descriptors are set up with no
|
||||
# translation, so that the mapping is still the identity mapping.
|
||||
ljmp $(SEG_KCODE<<3), $start32
|
||||
7c2c: ea .byte 0xea
|
||||
7c2d: 31 7c 08 00 xor %edi,0x0(%eax,%ecx,1)
|
||||
|
||||
00007c31 <start32>:
|
||||
|
||||
.code32 # Tell assembler to generate 32-bit code now.
|
||||
start32:
|
||||
# Set up the protected-mode data segment registers
|
||||
movw $(SEG_KDATA<<3), %ax # Our data segment selector
|
||||
7c31: 66 b8 10 00 mov $0x10,%ax
|
||||
movw %ax, %ds # -> DS: Data Segment
|
||||
7c35: 8e d8 mov %eax,%ds
|
||||
movw %ax, %es # -> ES: Extra Segment
|
||||
7c37: 8e c0 mov %eax,%es
|
||||
movw %ax, %ss # -> SS: Stack Segment
|
||||
7c39: 8e d0 mov %eax,%ss
|
||||
movw $0, %ax # Zero segments not ready for use
|
||||
7c3b: 66 b8 00 00 mov $0x0,%ax
|
||||
movw %ax, %fs # -> FS
|
||||
7c3f: 8e e0 mov %eax,%fs
|
||||
movw %ax, %gs # -> GS
|
||||
7c41: 8e e8 mov %eax,%gs
|
||||
|
||||
# Set up the stack pointer and call into C.
|
||||
movl $start, %esp
|
||||
7c43: bc 00 7c 00 00 mov $0x7c00,%esp
|
||||
call bootmain
|
||||
7c48: e8 e0 00 00 00 call 7d2d <bootmain>
|
||||
|
||||
00007c4d <spin>:
|
||||
|
||||
# If bootmain returns (it shouldn't), loop.
|
||||
spin:
|
||||
jmp spin
|
||||
7c4d: eb fe jmp 7c4d <spin>
|
||||
7c4f: 90 nop
|
||||
|
||||
00007c50 <gdt>:
|
||||
...
|
||||
7c58: ff (bad)
|
||||
7c59: ff 00 incl (%eax)
|
||||
7c5b: 00 00 add %al,(%eax)
|
||||
7c5d: 9a cf 00 ff ff 00 00 lcall $0x0,$0xffff00cf
|
||||
7c64: 00 .byte 0x0
|
||||
7c65: 92 xchg %eax,%edx
|
||||
7c66: cf iret
|
||||
...
|
||||
|
||||
00007c68 <gdtdesc>:
|
||||
7c68: 17 pop %ss
|
||||
7c69: 00 50 7c add %dl,0x7c(%eax)
|
||||
...
|
||||
|
||||
00007c6e <waitdisk>:
|
||||
// Routines to let C code use special x86 instructions.
|
||||
|
||||
static inline uchar inb(ushort port) {
|
||||
uchar data;
|
||||
|
||||
asm volatile ("in %1,%0" : "=a" (data) : "d" (port));
|
||||
7c6e: ba f7 01 00 00 mov $0x1f7,%edx
|
||||
7c73: ec in (%dx),%al
|
||||
entry();
|
||||
}
|
||||
|
||||
void waitdisk(void) {
|
||||
// Wait for disk ready.
|
||||
while ((inb(0x1F7) & 0xC0) != 0x40) {
|
||||
7c74: 83 e0 c0 and $0xffffffc0,%eax
|
||||
7c77: 3c 40 cmp $0x40,%al
|
||||
7c79: 75 f8 jne 7c73 <waitdisk+0x5>
|
||||
;
|
||||
}
|
||||
}
|
||||
7c7b: c3 ret
|
||||
|
||||
00007c7c <readsect>:
|
||||
|
||||
// Read a single sector at offset into dst.
|
||||
void readsect(void *dst, uint offset) {
|
||||
7c7c: 55 push %ebp
|
||||
7c7d: 89 e5 mov %esp,%ebp
|
||||
7c7f: 57 push %edi
|
||||
7c80: 53 push %ebx
|
||||
7c81: 8b 5d 0c mov 0xc(%ebp),%ebx
|
||||
// Issue command.
|
||||
waitdisk();
|
||||
7c84: e8 e5 ff ff ff call 7c6e <waitdisk>
|
||||
"d" (port), "0" (addr), "1" (cnt) :
|
||||
"memory", "cc");
|
||||
}
|
||||
|
||||
static inline void outb(ushort port, uchar data) {
|
||||
asm volatile ("out %0,%1" : : "a" (data), "d" (port));
|
||||
7c89: b8 01 00 00 00 mov $0x1,%eax
|
||||
7c8e: ba f2 01 00 00 mov $0x1f2,%edx
|
||||
7c93: ee out %al,(%dx)
|
||||
7c94: ba f3 01 00 00 mov $0x1f3,%edx
|
||||
7c99: 89 d8 mov %ebx,%eax
|
||||
7c9b: ee out %al,(%dx)
|
||||
outb(0x1F2, 1); // count = 1
|
||||
outb(0x1F3, offset);
|
||||
outb(0x1F4, offset >> 8);
|
||||
7c9c: 89 d8 mov %ebx,%eax
|
||||
7c9e: c1 e8 08 shr $0x8,%eax
|
||||
7ca1: ba f4 01 00 00 mov $0x1f4,%edx
|
||||
7ca6: ee out %al,(%dx)
|
||||
outb(0x1F5, offset >> 16);
|
||||
7ca7: 89 d8 mov %ebx,%eax
|
||||
7ca9: c1 e8 10 shr $0x10,%eax
|
||||
7cac: ba f5 01 00 00 mov $0x1f5,%edx
|
||||
7cb1: ee out %al,(%dx)
|
||||
outb(0x1F6, (offset >> 24) | 0xE0);
|
||||
7cb2: 89 d8 mov %ebx,%eax
|
||||
7cb4: c1 e8 18 shr $0x18,%eax
|
||||
7cb7: 83 c8 e0 or $0xffffffe0,%eax
|
||||
7cba: ba f6 01 00 00 mov $0x1f6,%edx
|
||||
7cbf: ee out %al,(%dx)
|
||||
7cc0: b8 20 00 00 00 mov $0x20,%eax
|
||||
7cc5: ba f7 01 00 00 mov $0x1f7,%edx
|
||||
7cca: ee out %al,(%dx)
|
||||
outb(0x1F7, 0x20); // cmd 0x20 - read sectors
|
||||
|
||||
// Read data.
|
||||
waitdisk();
|
||||
7ccb: e8 9e ff ff ff call 7c6e <waitdisk>
|
||||
asm volatile ("cld; rep insl" :
|
||||
7cd0: 8b 7d 08 mov 0x8(%ebp),%edi
|
||||
7cd3: b9 80 00 00 00 mov $0x80,%ecx
|
||||
7cd8: ba f0 01 00 00 mov $0x1f0,%edx
|
||||
7cdd: fc cld
|
||||
7cde: f3 6d rep insl (%dx),%es:(%edi)
|
||||
insl(0x1F0, dst, SECTSIZE / 4);
|
||||
}
|
||||
7ce0: 5b pop %ebx
|
||||
7ce1: 5f pop %edi
|
||||
7ce2: 5d pop %ebp
|
||||
7ce3: c3 ret
|
||||
|
||||
00007ce4 <readseg>:
|
||||
|
||||
// Read 'count' bytes at 'offset' from kernel into physical address 'pa'.
|
||||
// Might copy more than asked.
|
||||
|
||||
void readseg(uchar* pa, uint count, uint offset) {
|
||||
7ce4: 55 push %ebp
|
||||
7ce5: 89 e5 mov %esp,%ebp
|
||||
7ce7: 57 push %edi
|
||||
7ce8: 56 push %esi
|
||||
7ce9: 53 push %ebx
|
||||
7cea: 83 ec 0c sub $0xc,%esp
|
||||
7ced: 8b 5d 08 mov 0x8(%ebp),%ebx
|
||||
7cf0: 8b 75 10 mov 0x10(%ebp),%esi
|
||||
uchar* epa;
|
||||
|
||||
epa = pa + count;
|
||||
7cf3: 89 df mov %ebx,%edi
|
||||
7cf5: 03 7d 0c add 0xc(%ebp),%edi
|
||||
|
||||
// Round down to sector boundary.
|
||||
pa -= offset % SECTSIZE;
|
||||
7cf8: 89 f0 mov %esi,%eax
|
||||
7cfa: 25 ff 01 00 00 and $0x1ff,%eax
|
||||
7cff: 29 c3 sub %eax,%ebx
|
||||
|
||||
// Translate from bytes to sectors; kernel starts at sector 1.
|
||||
offset = (offset / SECTSIZE) + 1;
|
||||
7d01: c1 ee 09 shr $0x9,%esi
|
||||
7d04: 83 c6 01 add $0x1,%esi
|
||||
|
||||
// If this is too slow, we could read lots of sectors at a time.
|
||||
// We'd write more to memory than asked, but it doesn't matter --
|
||||
// we load in increasing order.
|
||||
for (; pa < epa; pa += SECTSIZE, offset++) {
|
||||
7d07: 39 df cmp %ebx,%edi
|
||||
7d09: 76 1a jbe 7d25 <readseg+0x41>
|
||||
readsect(pa, offset);
|
||||
7d0b: 83 ec 08 sub $0x8,%esp
|
||||
7d0e: 56 push %esi
|
||||
7d0f: 53 push %ebx
|
||||
7d10: e8 67 ff ff ff call 7c7c <readsect>
|
||||
for (; pa < epa; pa += SECTSIZE, offset++) {
|
||||
7d15: 81 c3 00 02 00 00 add $0x200,%ebx
|
||||
7d1b: 83 c6 01 add $0x1,%esi
|
||||
7d1e: 83 c4 10 add $0x10,%esp
|
||||
7d21: 39 df cmp %ebx,%edi
|
||||
7d23: 77 e6 ja 7d0b <readseg+0x27>
|
||||
}
|
||||
}
|
||||
7d25: 8d 65 f4 lea -0xc(%ebp),%esp
|
||||
7d28: 5b pop %ebx
|
||||
7d29: 5e pop %esi
|
||||
7d2a: 5f pop %edi
|
||||
7d2b: 5d pop %ebp
|
||||
7d2c: c3 ret
|
||||
|
||||
00007d2d <bootmain>:
|
||||
void bootmain(void) {
|
||||
7d2d: 55 push %ebp
|
||||
7d2e: 89 e5 mov %esp,%ebp
|
||||
7d30: 57 push %edi
|
||||
7d31: 56 push %esi
|
||||
7d32: 53 push %ebx
|
||||
7d33: 83 ec 10 sub $0x10,%esp
|
||||
readseg((uchar*)elf, 4096, 0);
|
||||
7d36: 6a 00 push $0x0
|
||||
7d38: 68 00 10 00 00 push $0x1000
|
||||
7d3d: 68 00 00 01 00 push $0x10000
|
||||
7d42: e8 9d ff ff ff call 7ce4 <readseg>
|
||||
if (elf->magic != ELF_MAGIC) {
|
||||
7d47: 83 c4 10 add $0x10,%esp
|
||||
7d4a: 81 3d 00 00 01 00 7f cmpl $0x464c457f,0x10000
|
||||
7d51: 45 4c 46
|
||||
7d54: 75 21 jne 7d77 <bootmain+0x4a>
|
||||
ph = (struct proghdr*)((uchar*)elf + elf->phoff);
|
||||
7d56: a1 1c 00 01 00 mov 0x1001c,%eax
|
||||
7d5b: 8d 98 00 00 01 00 lea 0x10000(%eax),%ebx
|
||||
eph = ph + elf->phnum;
|
||||
7d61: 0f b7 35 2c 00 01 00 movzwl 0x1002c,%esi
|
||||
7d68: c1 e6 05 shl $0x5,%esi
|
||||
7d6b: 01 de add %ebx,%esi
|
||||
for (; ph < eph; ph++) {
|
||||
7d6d: 39 f3 cmp %esi,%ebx
|
||||
7d6f: 72 15 jb 7d86 <bootmain+0x59>
|
||||
entry();
|
||||
7d71: ff 15 18 00 01 00 call *0x10018
|
||||
}
|
||||
7d77: 8d 65 f4 lea -0xc(%ebp),%esp
|
||||
7d7a: 5b pop %ebx
|
||||
7d7b: 5e pop %esi
|
||||
7d7c: 5f pop %edi
|
||||
7d7d: 5d pop %ebp
|
||||
7d7e: c3 ret
|
||||
for (; ph < eph; ph++) {
|
||||
7d7f: 83 c3 20 add $0x20,%ebx
|
||||
7d82: 39 de cmp %ebx,%esi
|
||||
7d84: 76 eb jbe 7d71 <bootmain+0x44>
|
||||
pa = (uchar*)ph->paddr;
|
||||
7d86: 8b 7b 0c mov 0xc(%ebx),%edi
|
||||
readseg(pa, ph->filesz, ph->off);
|
||||
7d89: 83 ec 04 sub $0x4,%esp
|
||||
7d8c: ff 73 04 push 0x4(%ebx)
|
||||
7d8f: ff 73 10 push 0x10(%ebx)
|
||||
7d92: 57 push %edi
|
||||
7d93: e8 4c ff ff ff call 7ce4 <readseg>
|
||||
if (ph->memsz > ph->filesz) {
|
||||
7d98: 8b 4b 14 mov 0x14(%ebx),%ecx
|
||||
7d9b: 8b 43 10 mov 0x10(%ebx),%eax
|
||||
7d9e: 83 c4 10 add $0x10,%esp
|
||||
7da1: 39 c1 cmp %eax,%ecx
|
||||
7da3: 76 da jbe 7d7f <bootmain+0x52>
|
||||
stosb(pa + ph->filesz, 0, ph->memsz - ph->filesz);
|
||||
7da5: 01 c7 add %eax,%edi
|
||||
7da7: 29 c1 sub %eax,%ecx
|
||||
"d" (port), "0" (addr), "1" (cnt) :
|
||||
"cc");
|
||||
}
|
||||
|
||||
static inline void stosb(void *addr, int data, int cnt) {
|
||||
asm volatile ("cld; rep stosb" :
|
||||
7da9: b8 00 00 00 00 mov $0x0,%eax
|
||||
7dae: fc cld
|
||||
7daf: f3 aa rep stos %al,%es:(%edi)
|
||||
"=D" (addr), "=c" (cnt) :
|
||||
"0" (addr), "1" (cnt), "a" (data) :
|
||||
"memory", "cc");
|
||||
}
|
||||
7db1: eb cc jmp 7d7f <bootmain+0x52>
|
BIN
bootblock.o
BIN
bootblock.o
Binary file not shown.
BIN
bootblockother.o
BIN
bootblockother.o
Binary file not shown.
@ -1 +0,0 @@
|
||||
bootmain.o: bootmain.c types.h elf.h x86.h memlayout.h
|
BIN
bootmain.o
BIN
bootmain.o
Binary file not shown.
50
cat.sym
50
cat.sym
@ -1,50 +0,0 @@
|
||||
00000000 cat.c
|
||||
00000000 ulib.c
|
||||
00000000 printf.c
|
||||
00000420 printint
|
||||
00000890 digits.0
|
||||
00000000 umalloc.c
|
||||
00000d80 freep
|
||||
00000d84 base
|
||||
00000110 strcpy
|
||||
000004d0 printf
|
||||
0000040b greeting
|
||||
00000330 memmove
|
||||
000003db mknod
|
||||
00000230 gets
|
||||
000003ab getpid
|
||||
00000090 cat
|
||||
00000700 malloc
|
||||
000003bb sleep
|
||||
00000373 pipe
|
||||
00000403 getch
|
||||
000003d3 write
|
||||
00000393 fstat
|
||||
00000383 kill
|
||||
0000039b chdir
|
||||
0000038b exec
|
||||
0000036b wait
|
||||
0000037b read
|
||||
000003e3 unlink
|
||||
0000035b fork
|
||||
000003b3 sbrk
|
||||
000003c3 uptime
|
||||
00000b74 __bss_start
|
||||
000001d0 memset
|
||||
00000000 main
|
||||
00000140 strcmp
|
||||
00000413 shutdown
|
||||
000003a3 dup
|
||||
00000b80 buf
|
||||
000002a0 stat
|
||||
00000b74 _edata
|
||||
00000d8c _end
|
||||
000003eb link
|
||||
00000363 exit
|
||||
000002f0 atoi
|
||||
000001a0 strlen
|
||||
000003cb open
|
||||
000001f0 strchr
|
||||
000003f3 mkdir
|
||||
000003fb close
|
||||
00000670 free
|
8
cls.c
Normal file
8
cls.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "types.h"
|
||||
#include "user.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
cls();
|
||||
//printf(1, "$ ");
|
||||
exit();
|
||||
}
|
217
console.c
217
console.c
@ -28,9 +28,21 @@ struct kbdbuffer inputBuffer;
|
||||
|
||||
struct kbdbuffer * input = 0;
|
||||
|
||||
struct vconsole {
|
||||
ushort screenbuffer[SCRWIDTH * SCRHEIGHT];
|
||||
struct kbdbuffer keybuffer;
|
||||
int pos;
|
||||
int active;
|
||||
};
|
||||
|
||||
struct vconsole consoles[MAXVCONSOLES];
|
||||
static uint currentconsoleindex = 0;
|
||||
|
||||
#define C(x) ((x) - '@') // Control-x
|
||||
|
||||
|
||||
void clearconsole(ushort *bufferin);
|
||||
void loadscreenbuffer(ushort *bufferin);
|
||||
void clearscreen(void);
|
||||
|
||||
static void consputc(int);
|
||||
|
||||
@ -148,44 +160,67 @@ void panic(char *s) {
|
||||
|
||||
#define BACKSPACE 0x100
|
||||
#define CRTPORT 0x3d4
|
||||
#define TITLEOFF (SCRWIDTH * 1) // Size of the offset we need for the title bar
|
||||
|
||||
static ushort *crt = (ushort*)P2V(0xb8000); // CGA memory
|
||||
|
||||
static void cgaputc(int c) {
|
||||
int pos;
|
||||
int consoleindex = 0;
|
||||
// Check if a process has actually been created otherwise use the base console
|
||||
if (myproc() != 0x0)
|
||||
{
|
||||
consoleindex = myproc()->consoleIndex;
|
||||
}
|
||||
ushort* currentbuffer = consoles[consoleindex].screenbuffer;
|
||||
|
||||
// Cursor position: col + 80*row.
|
||||
outb(CRTPORT, 14);
|
||||
pos = inb(CRTPORT + 1) << 8;
|
||||
outb(CRTPORT, 15);
|
||||
pos |= inb(CRTPORT + 1);
|
||||
if (consoleindex == currentconsoleindex)
|
||||
{
|
||||
// Cursor position: col + 80*row.
|
||||
outb(CRTPORT, 14);
|
||||
pos = inb(CRTPORT + 1) << 8;
|
||||
outb(CRTPORT, 15);
|
||||
pos |= inb(CRTPORT + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = consoles[consoleindex].pos;
|
||||
}
|
||||
|
||||
if (c == '\n') {
|
||||
pos += 80 - pos % 80;
|
||||
pos += SCRWIDTH - pos % SCRWIDTH;
|
||||
}
|
||||
else if (c == BACKSPACE) {
|
||||
if (pos > 0) {
|
||||
if (pos > (TITLEOFF)) {
|
||||
currentbuffer[pos] = 0; // Clear the character from the buffer
|
||||
--pos;
|
||||
}
|
||||
}
|
||||
else {
|
||||
crt[pos++] = (c & 0xff) | 0x0700; // black on white
|
||||
currentbuffer[pos++] = (c & 0xff) | 0x0700; // black on white
|
||||
|
||||
}
|
||||
if (pos < 0 || pos > 25 * 80) {
|
||||
if (pos < TITLEOFF || pos > SCRHEIGHT * SCRWIDTH) {
|
||||
panic("pos under/overflow");
|
||||
}
|
||||
|
||||
if ((pos / 80) >= 24) { // Scroll up.
|
||||
memmove(crt, crt + 80, sizeof(crt[0]) * 23 * 80);
|
||||
memmove(currentbuffer + TITLEOFF, currentbuffer + (SCRWIDTH + TITLEOFF), sizeof(crt[0]) * (SCRHEIGHT - 1) * SCRWIDTH);
|
||||
pos -= 80;
|
||||
memset(crt + pos, 0, sizeof(crt[0]) * (24 * 80 - pos));
|
||||
memset(currentbuffer + pos, 0, sizeof(crt[0]) * (SCRHEIGHT * SCRWIDTH - pos));
|
||||
}
|
||||
consoles[consoleindex].pos = pos;
|
||||
|
||||
outb(CRTPORT, 14);
|
||||
outb(CRTPORT + 1, pos >> 8);
|
||||
outb(CRTPORT, 15);
|
||||
outb(CRTPORT + 1, pos);
|
||||
crt[pos] = ' ' | 0x0700;
|
||||
if (consoleindex == currentconsoleindex)
|
||||
{
|
||||
loadscreenbuffer(currentbuffer);
|
||||
|
||||
outb(CRTPORT, 14);
|
||||
outb(CRTPORT + 1, pos >> 8);
|
||||
outb(CRTPORT, 15);
|
||||
outb(CRTPORT + 1, pos);
|
||||
crt[pos] = ' ' | 0x0700;
|
||||
}
|
||||
}
|
||||
|
||||
void consputc(int c) {
|
||||
@ -224,7 +259,7 @@ int consoleget(void) {
|
||||
}
|
||||
|
||||
void consoleintr(int (*getc)(void)) {
|
||||
int c, doprocdump = 0;
|
||||
int c, doprocdump = 0, doconsoleswitch = 0, doconsolehome = 0;
|
||||
|
||||
acquire(&cons.lock);
|
||||
while ((c = getc()) >= 0) {
|
||||
@ -247,6 +282,12 @@ void consoleintr(int (*getc)(void)) {
|
||||
consputc(BACKSPACE);
|
||||
}
|
||||
break;
|
||||
case C('T'):
|
||||
doconsoleswitch = 1;
|
||||
break;
|
||||
case C('K'):
|
||||
doconsolehome = 1;
|
||||
break;
|
||||
default:
|
||||
if (c != 0 && input->e - input->r < INPUT_BUF) {
|
||||
c = (c == '\r') ? '\n' : c;
|
||||
@ -264,6 +305,28 @@ void consoleintr(int (*getc)(void)) {
|
||||
if (doprocdump) {
|
||||
procdump(); // now call procdump() wo. cons.lock held
|
||||
}
|
||||
if (doconsolehome) {
|
||||
if (currentconsoleindex != 0)
|
||||
{
|
||||
switchtoconsole(0);
|
||||
}
|
||||
}
|
||||
if (doconsoleswitch)
|
||||
{
|
||||
int toconsole = 0;
|
||||
for (int i = (currentconsoleindex + 1); i < MAXVCONSOLES; i++)
|
||||
{
|
||||
if (consoles[i].active)
|
||||
{
|
||||
toconsole = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (toconsole != currentconsoleindex)
|
||||
{
|
||||
switchtoconsole(toconsole);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int consoleread(struct inode *ip, char *dst, int n) {
|
||||
@ -317,16 +380,132 @@ int consolewrite(struct inode *ip, char *buf, int n) {
|
||||
return n;
|
||||
}
|
||||
|
||||
void testfillbuffer(ushort *bufferin)
|
||||
{
|
||||
ushort firstchar = 65;
|
||||
ushort lastchar = 90;
|
||||
ushort currentchar = firstchar;
|
||||
|
||||
for (int i = 0; i < (SCRHEIGHT * SCRWIDTH); i++)
|
||||
{
|
||||
if (currentchar > lastchar)
|
||||
{
|
||||
currentchar = firstchar;
|
||||
}
|
||||
|
||||
bufferin[i] = (currentchar & 0xff) | 0x0700;
|
||||
|
||||
currentchar++;
|
||||
}
|
||||
}
|
||||
|
||||
void clearconsole(ushort *bufferin)
|
||||
{
|
||||
// Flood the screen buffer with blank spaces
|
||||
memset(bufferin, 0x0700, sizeof(bufferin[0]) * SCRHEIGHT * SCRWIDTH);
|
||||
}
|
||||
|
||||
void loadscreenbuffer(ushort *bufferin)
|
||||
{
|
||||
// Copy the memory from the console buffer to the crt buffer
|
||||
memmove(crt, bufferin, sizeof(bufferin[0]) * SCRHEIGHT * SCRWIDTH);
|
||||
}
|
||||
|
||||
void clearscreen(void)
|
||||
{
|
||||
//cprintf("process id: %d", myproc()->consoleIndex);
|
||||
//return;
|
||||
|
||||
//cprintf("size of buffer item: %d\n", sizeof(consoles[currentconsoleindex].screenbuffer[0]) * (SCRHEIGHT * SCRWIDTH));
|
||||
//cprintf("size of crt item: %d\n", sizeof(crt[0]) * (SCRHEIGHT * SCRWIDTH));
|
||||
|
||||
//return;
|
||||
int pos = TITLEOFF;
|
||||
|
||||
//testfillbuffer(consoles[currentconsoleindex].screenbuffer);
|
||||
clearconsole(consoles[currentconsoleindex].screenbuffer);
|
||||
loadscreenbuffer(consoles[currentconsoleindex].screenbuffer);
|
||||
|
||||
consoles[currentconsoleindex].pos = pos;
|
||||
|
||||
outb(CRTPORT, 14);
|
||||
outb(CRTPORT + 1, pos >> 8);
|
||||
outb(CRTPORT, 15);
|
||||
outb(CRTPORT + 1, pos);
|
||||
}
|
||||
|
||||
void consoleinit(void) {
|
||||
initlock(&cons.lock, "console");
|
||||
|
||||
consoles[currentconsoleindex].active = 1;
|
||||
|
||||
// Initialise pointer to point to our console input buffer
|
||||
input = &inputBuffer;
|
||||
input = &consoles[currentconsoleindex].keybuffer;
|
||||
|
||||
devsw[CONSOLE].write = consolewrite;
|
||||
devsw[CONSOLE].read = consoleread;
|
||||
cons.locking = 1;
|
||||
|
||||
clearscreen();
|
||||
cprintf("Welcome! you are currently in the base console\n");
|
||||
|
||||
ioapicenable(IRQ_KBD, 0);
|
||||
}
|
||||
|
||||
int newconsole(void)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
for (int i = 1; i < MAXVCONSOLES; i++)
|
||||
{
|
||||
if (!consoles[i].active)
|
||||
{
|
||||
result = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int switchtoconsole(int consoleindex)
|
||||
{
|
||||
acquire(&cons.lock);
|
||||
currentconsoleindex = consoleindex;
|
||||
input = &consoles[currentconsoleindex].keybuffer;
|
||||
//ioapicenable(IRQ_KBD, 0);
|
||||
release(&cons.lock);
|
||||
|
||||
loadscreenbuffer(consoles[currentconsoleindex].screenbuffer);
|
||||
|
||||
if (!consoles[currentconsoleindex].active)
|
||||
{
|
||||
clearscreen();
|
||||
cprintf("Welcome to Console: %d\n", currentconsoleindex);
|
||||
consoles[currentconsoleindex].active = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
int pos = consoles[currentconsoleindex].pos;
|
||||
|
||||
outb(CRTPORT, 14);
|
||||
outb(CRTPORT + 1, pos >> 8);
|
||||
outb(CRTPORT, 15);
|
||||
outb(CRTPORT + 1, pos);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int closeconsole(int consoleindex)
|
||||
{
|
||||
clearconsole(consoles[currentconsoleindex].screenbuffer);
|
||||
consoles[currentconsoleindex].active = 0;
|
||||
switchtoconsole(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int getcurrentconsoleindex(void)
|
||||
{
|
||||
return currentconsoleindex;
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
console.o: console.c /usr/include/stdc-predef.h types.h defs.h param.h \
|
||||
traps.h spinlock.h sleeplock.h fs.h file.h memlayout.h mmu.h proc.h \
|
||||
x86.h
|
5
defs.h
5
defs.h
@ -22,6 +22,11 @@ void cprintf(char*, ...);
|
||||
void consoleintr(int (*)(void));
|
||||
int consoleget(void);
|
||||
void panic(char*) __attribute__((noreturn));
|
||||
int newconsole(void);
|
||||
int switchtoconsole(int consoleindex);
|
||||
int closeconsole(int consoleindex);
|
||||
int getcurrentconsoleindex(void);
|
||||
void clearscreen(void);
|
||||
|
||||
// exec.c
|
||||
int exec(char*, char**);
|
||||
|
48
echo.sym
48
echo.sym
@ -1,48 +0,0 @@
|
||||
00000000 echo.c
|
||||
00000000 ulib.c
|
||||
00000000 printf.c
|
||||
00000380 printint
|
||||
000007c0 digits.0
|
||||
00000000 umalloc.c
|
||||
00000a74 freep
|
||||
00000a78 base
|
||||
00000070 strcpy
|
||||
00000430 printf
|
||||
0000036b greeting
|
||||
00000290 memmove
|
||||
0000033b mknod
|
||||
00000190 gets
|
||||
0000030b getpid
|
||||
00000660 malloc
|
||||
0000031b sleep
|
||||
000002d3 pipe
|
||||
00000363 getch
|
||||
00000333 write
|
||||
000002f3 fstat
|
||||
000002e3 kill
|
||||
000002fb chdir
|
||||
000002eb exec
|
||||
000002cb wait
|
||||
000002db read
|
||||
00000343 unlink
|
||||
000002bb fork
|
||||
00000313 sbrk
|
||||
00000323 uptime
|
||||
00000a74 __bss_start
|
||||
00000130 memset
|
||||
00000000 main
|
||||
000000a0 strcmp
|
||||
00000373 shutdown
|
||||
00000303 dup
|
||||
00000200 stat
|
||||
00000a74 _edata
|
||||
00000a80 _end
|
||||
0000034b link
|
||||
000002c3 exit
|
||||
00000250 atoi
|
||||
00000100 strlen
|
||||
0000032b open
|
||||
00000150 strchr
|
||||
00000353 mkdir
|
||||
0000035b close
|
||||
000005d0 free
|
BIN
entryother
BIN
entryother
Binary file not shown.
115
entryother.asm
115
entryother.asm
@ -1,115 +0,0 @@
|
||||
|
||||
bootblockother.o: file format elf32-i386
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00007000 <start>:
|
||||
# This code combines elements of bootasm.S and entry.S.
|
||||
|
||||
.code16
|
||||
.globl start
|
||||
start:
|
||||
cli
|
||||
7000: fa cli
|
||||
|
||||
# Zero data segment registers DS, ES, and SS.
|
||||
xorw %ax,%ax
|
||||
7001: 31 c0 xor %eax,%eax
|
||||
movw %ax,%ds
|
||||
7003: 8e d8 mov %eax,%ds
|
||||
movw %ax,%es
|
||||
7005: 8e c0 mov %eax,%es
|
||||
movw %ax,%ss
|
||||
7007: 8e d0 mov %eax,%ss
|
||||
|
||||
# Switch from real to protected mode. Use a bootstrap GDT that makes
|
||||
# virtual addresses map directly to physical addresses so that the
|
||||
# effective memory map doesn't change during the transition.
|
||||
lgdt gdtdesc
|
||||
7009: 0f 01 16 lgdtl (%esi)
|
||||
700c: 74 70 je 707e <_end+0x2>
|
||||
movl %cr0, %eax
|
||||
700e: 0f 20 c0 mov %cr0,%eax
|
||||
orl $CR0_PE, %eax
|
||||
7011: 66 83 c8 01 or $0x1,%ax
|
||||
movl %eax, %cr0
|
||||
7015: 0f 22 c0 mov %eax,%cr0
|
||||
|
||||
# Complete the transition to 32-bit protected mode by using a long jmp
|
||||
# to reload %cs and %eip. The segment descriptors are set up with no
|
||||
# translation, so that the mapping is still the identity mapping.
|
||||
ljmpl $(SEG_KCODE<<3), $(start32)
|
||||
7018: 66 ea 20 70 00 00 ljmpw $0x0,$0x7020
|
||||
701e: 08 00 or %al,(%eax)
|
||||
|
||||
00007020 <start32>:
|
||||
|
||||
|
||||
.code32 # Tell assembler to generate 32-bit code now.
|
||||
start32:
|
||||
# Set up the protected-mode data segment registers
|
||||
movw $(SEG_KDATA<<3), %ax # Our data segment selector
|
||||
7020: 66 b8 10 00 mov $0x10,%ax
|
||||
movw %ax, %ds # -> DS: Data Segment
|
||||
7024: 8e d8 mov %eax,%ds
|
||||
movw %ax, %es # -> ES: Extra Segment
|
||||
7026: 8e c0 mov %eax,%es
|
||||
movw %ax, %ss # -> SS: Stack Segment
|
||||
7028: 8e d0 mov %eax,%ss
|
||||
movw $0, %ax # Zero segments not ready for use
|
||||
702a: 66 b8 00 00 mov $0x0,%ax
|
||||
movw %ax, %fs # -> FS
|
||||
702e: 8e e0 mov %eax,%fs
|
||||
movw %ax, %gs # -> GS
|
||||
7030: 8e e8 mov %eax,%gs
|
||||
|
||||
# Turn on page size extension for 4Mbyte pages
|
||||
movl %cr4, %eax
|
||||
7032: 0f 20 e0 mov %cr4,%eax
|
||||
orl $(CR4_PSE), %eax
|
||||
7035: 83 c8 10 or $0x10,%eax
|
||||
movl %eax, %cr4
|
||||
7038: 0f 22 e0 mov %eax,%cr4
|
||||
# Use entrypgdir as our initial page table
|
||||
movl (start-12), %eax
|
||||
703b: a1 f4 6f 00 00 mov 0x6ff4,%eax
|
||||
movl %eax, %cr3
|
||||
7040: 0f 22 d8 mov %eax,%cr3
|
||||
# Turn on paging.
|
||||
movl %cr0, %eax
|
||||
7043: 0f 20 c0 mov %cr0,%eax
|
||||
orl $(CR0_PE|CR0_PG|CR0_WP), %eax
|
||||
7046: 0d 01 00 01 80 or $0x80010001,%eax
|
||||
movl %eax, %cr0
|
||||
704b: 0f 22 c0 mov %eax,%cr0
|
||||
|
||||
# Switch to the stack allocated by startothers()
|
||||
movl (start-4), %esp
|
||||
704e: 8b 25 fc 6f 00 00 mov 0x6ffc,%esp
|
||||
# Call mpenter()
|
||||
call *(start-8)
|
||||
7054: ff 15 f8 6f 00 00 call *0x6ff8
|
||||
|
||||
0000705a <spin>:
|
||||
|
||||
# We should never return.
|
||||
spin:
|
||||
jmp spin
|
||||
705a: eb fe jmp 705a <spin>
|
||||
|
||||
0000705c <gdt>:
|
||||
...
|
||||
7064: ff (bad)
|
||||
7065: ff 00 incl (%eax)
|
||||
7067: 00 00 add %al,(%eax)
|
||||
7069: 9a cf 00 ff ff 00 00 lcall $0x0,$0xffff00cf
|
||||
7070: 00 .byte 0x0
|
||||
7071: 92 xchg %eax,%edx
|
||||
7072: cf iret
|
||||
...
|
||||
|
||||
00007074 <gdtdesc>:
|
||||
7074: 17 pop %ss
|
||||
7075: 00 5c 70 00 add %bl,0x0(%eax,%esi,2)
|
||||
...
|
@ -1 +0,0 @@
|
||||
entryother.o: entryother.S asm.h memlayout.h mmu.h
|
BIN
entryother.o
BIN
entryother.o
Binary file not shown.
2
exec.d
2
exec.d
@ -1,2 +0,0 @@
|
||||
exec.o: exec.c /usr/include/stdc-predef.h types.h param.h memlayout.h \
|
||||
mmu.h proc.h defs.h x86.h elf.h
|
2
file.d
2
file.d
@ -1,2 +0,0 @@
|
||||
file.o: file.c /usr/include/stdc-predef.h types.h defs.h param.h fs.h \
|
||||
spinlock.h sleeplock.h file.h
|
673
forktest.asm
673
forktest.asm
@ -1,673 +0,0 @@
|
||||
|
||||
_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 63 03 00 00 call 373 <exit>
|
||||
|
||||
00000010 <printf>:
|
||||
void printf(int fd, const char *s, ...) {
|
||||
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 90 01 00 00 call 1b0 <strlen>
|
||||
20: 83 c4 0c add $0xc,%esp
|
||||
23: 50 push %eax
|
||||
24: 53 push %ebx
|
||||
25: ff 75 08 push 0x8(%ebp)
|
||||
28: e8 b6 03 00 00 call 3e3 <write>
|
||||
}
|
||||
2d: 8b 5d fc mov -0x4(%ebp),%ebx
|
||||
30: 83 c4 10 add $0x10,%esp
|
||||
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>:
|
||||
void forktest(void) {
|
||||
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
|
||||
void forktest(void) {
|
||||
46: 83 ec 10 sub $0x10,%esp
|
||||
write(fd, s, strlen(s));
|
||||
49: 68 2c 04 00 00 push $0x42c
|
||||
4e: e8 5d 01 00 00 call 1b0 <strlen>
|
||||
53: 83 c4 0c add $0xc,%esp
|
||||
56: 50 push %eax
|
||||
57: 68 2c 04 00 00 push $0x42c
|
||||
5c: 6a 01 push $0x1
|
||||
5e: e8 80 03 00 00 call 3e3 <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 83 00 00 00 je 104 <forktest+0xc4>
|
||||
pid = fork();
|
||||
81: e8 e5 02 00 00 call 36b <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 e6 02 00 00 call 37b <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 d8 02 00 00 call 37b <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 5e 04 00 00 push $0x45e
|
||||
b0: e8 fb 00 00 00 call 1b0 <strlen>
|
||||
b5: 83 c4 0c add $0xc,%esp
|
||||
b8: 50 push %eax
|
||||
b9: 68 5e 04 00 00 push $0x45e
|
||||
be: 6a 01 push $0x1
|
||||
c0: e8 1e 03 00 00 call 3e3 <write>
|
||||
}
|
||||
c5: 8b 5d fc mov -0x4(%ebp),%ebx
|
||||
c8: c9 leave
|
||||
c9: c3 ret
|
||||
exit();
|
||||
ca: e8 a4 02 00 00 call 373 <exit>
|
||||
write(fd, s, strlen(s));
|
||||
cf: 83 ec 0c sub $0xc,%esp
|
||||
d2: 68 37 04 00 00 push $0x437
|
||||
d7: e8 d4 00 00 00 call 1b0 <strlen>
|
||||
dc: 83 c4 0c add $0xc,%esp
|
||||
df: 50 push %eax
|
||||
e0: 68 37 04 00 00 push $0x437
|
||||
e5: 6a 01 push $0x1
|
||||
e7: e8 f7 02 00 00 call 3e3 <write>
|
||||
exit();
|
||||
ec: e8 82 02 00 00 call 373 <exit>
|
||||
printf(1, "wait got too many\n");
|
||||
f1: 52 push %edx
|
||||
f2: 52 push %edx
|
||||
f3: 68 4b 04 00 00 push $0x44b
|
||||
f8: 6a 01 push $0x1
|
||||
fa: e8 11 ff ff ff call 10 <printf>
|
||||
exit();
|
||||
ff: e8 6f 02 00 00 call 373 <exit>
|
||||
printf(1, "fork claimed to work N times!\n", N);
|
||||
104: 50 push %eax
|
||||
105: 68 e8 03 00 00 push $0x3e8
|
||||
10a: 68 6c 04 00 00 push $0x46c
|
||||
10f: 6a 01 push $0x1
|
||||
111: e8 fa fe ff ff call 10 <printf>
|
||||
exit();
|
||||
116: e8 58 02 00 00 call 373 <exit>
|
||||
11b: 66 90 xchg %ax,%ax
|
||||
11d: 66 90 xchg %ax,%ax
|
||||
11f: 90 nop
|
||||
|
||||
00000120 <strcpy>:
|
||||
#include "stat.h"
|
||||
#include "fcntl.h"
|
||||
#include "user.h"
|
||||
#include "x86.h"
|
||||
|
||||
char*strcpy(char *s, const char *t) {
|
||||
120: 55 push %ebp
|
||||
char *os;
|
||||
|
||||
os = s;
|
||||
while ((*s++ = *t++) != 0) {
|
||||
121: 31 c0 xor %eax,%eax
|
||||
char*strcpy(char *s, const char *t) {
|
||||
123: 89 e5 mov %esp,%ebp
|
||||
125: 53 push %ebx
|
||||
126: 8b 4d 08 mov 0x8(%ebp),%ecx
|
||||
129: 8b 5d 0c mov 0xc(%ebp),%ebx
|
||||
12c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
while ((*s++ = *t++) != 0) {
|
||||
130: 0f b6 14 03 movzbl (%ebx,%eax,1),%edx
|
||||
134: 88 14 01 mov %dl,(%ecx,%eax,1)
|
||||
137: 83 c0 01 add $0x1,%eax
|
||||
13a: 84 d2 test %dl,%dl
|
||||
13c: 75 f2 jne 130 <strcpy+0x10>
|
||||
;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
13e: 8b 5d fc mov -0x4(%ebp),%ebx
|
||||
141: 89 c8 mov %ecx,%eax
|
||||
143: c9 leave
|
||||
144: c3 ret
|
||||
145: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
14c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
|
||||
00000150 <strcmp>:
|
||||
|
||||
int strcmp(const char *p, const char *q) {
|
||||
150: 55 push %ebp
|
||||
151: 89 e5 mov %esp,%ebp
|
||||
153: 53 push %ebx
|
||||
154: 8b 55 08 mov 0x8(%ebp),%edx
|
||||
157: 8b 4d 0c mov 0xc(%ebp),%ecx
|
||||
while (*p && *p == *q) {
|
||||
15a: 0f b6 02 movzbl (%edx),%eax
|
||||
15d: 84 c0 test %al,%al
|
||||
15f: 75 17 jne 178 <strcmp+0x28>
|
||||
161: eb 3a jmp 19d <strcmp+0x4d>
|
||||
163: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
167: 90 nop
|
||||
168: 0f b6 42 01 movzbl 0x1(%edx),%eax
|
||||
p++, q++;
|
||||
16c: 83 c2 01 add $0x1,%edx
|
||||
16f: 8d 59 01 lea 0x1(%ecx),%ebx
|
||||
while (*p && *p == *q) {
|
||||
172: 84 c0 test %al,%al
|
||||
174: 74 1a je 190 <strcmp+0x40>
|
||||
p++, q++;
|
||||
176: 89 d9 mov %ebx,%ecx
|
||||
while (*p && *p == *q) {
|
||||
178: 0f b6 19 movzbl (%ecx),%ebx
|
||||
17b: 38 c3 cmp %al,%bl
|
||||
17d: 74 e9 je 168 <strcmp+0x18>
|
||||
}
|
||||
return (uchar) * p - (uchar) * q;
|
||||
17f: 29 d8 sub %ebx,%eax
|
||||
}
|
||||
181: 8b 5d fc mov -0x4(%ebp),%ebx
|
||||
184: c9 leave
|
||||
185: c3 ret
|
||||
186: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
18d: 8d 76 00 lea 0x0(%esi),%esi
|
||||
return (uchar) * p - (uchar) * q;
|
||||
190: 0f b6 59 01 movzbl 0x1(%ecx),%ebx
|
||||
194: 31 c0 xor %eax,%eax
|
||||
196: 29 d8 sub %ebx,%eax
|
||||
}
|
||||
198: 8b 5d fc mov -0x4(%ebp),%ebx
|
||||
19b: c9 leave
|
||||
19c: c3 ret
|
||||
return (uchar) * p - (uchar) * q;
|
||||
19d: 0f b6 19 movzbl (%ecx),%ebx
|
||||
1a0: 31 c0 xor %eax,%eax
|
||||
1a2: eb db jmp 17f <strcmp+0x2f>
|
||||
1a4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
1ab: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
1af: 90 nop
|
||||
|
||||
000001b0 <strlen>:
|
||||
|
||||
uint strlen(const char *s) {
|
||||
1b0: 55 push %ebp
|
||||
1b1: 89 e5 mov %esp,%ebp
|
||||
1b3: 8b 55 08 mov 0x8(%ebp),%edx
|
||||
int n;
|
||||
|
||||
for (n = 0; s[n]; n++) {
|
||||
1b6: 80 3a 00 cmpb $0x0,(%edx)
|
||||
1b9: 74 15 je 1d0 <strlen+0x20>
|
||||
1bb: 31 c0 xor %eax,%eax
|
||||
1bd: 8d 76 00 lea 0x0(%esi),%esi
|
||||
1c0: 83 c0 01 add $0x1,%eax
|
||||
1c3: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
|
||||
1c7: 89 c1 mov %eax,%ecx
|
||||
1c9: 75 f5 jne 1c0 <strlen+0x10>
|
||||
;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
1cb: 89 c8 mov %ecx,%eax
|
||||
1cd: 5d pop %ebp
|
||||
1ce: c3 ret
|
||||
1cf: 90 nop
|
||||
for (n = 0; s[n]; n++) {
|
||||
1d0: 31 c9 xor %ecx,%ecx
|
||||
}
|
||||
1d2: 5d pop %ebp
|
||||
1d3: 89 c8 mov %ecx,%eax
|
||||
1d5: c3 ret
|
||||
1d6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
1dd: 8d 76 00 lea 0x0(%esi),%esi
|
||||
|
||||
000001e0 <memset>:
|
||||
|
||||
void* memset(void *dst, int c, uint n) {
|
||||
1e0: 55 push %ebp
|
||||
1e1: 89 e5 mov %esp,%ebp
|
||||
1e3: 57 push %edi
|
||||
1e4: 8b 55 08 mov 0x8(%ebp),%edx
|
||||
"d" (port), "0" (addr), "1" (cnt) :
|
||||
"cc");
|
||||
}
|
||||
|
||||
static inline void stosb(void *addr, int data, int cnt) {
|
||||
asm volatile ("cld; rep stosb" :
|
||||
1e7: 8b 4d 10 mov 0x10(%ebp),%ecx
|
||||
1ea: 8b 45 0c mov 0xc(%ebp),%eax
|
||||
1ed: 89 d7 mov %edx,%edi
|
||||
1ef: fc cld
|
||||
1f0: f3 aa rep stos %al,%es:(%edi)
|
||||
stosb(dst, c, n);
|
||||
return dst;
|
||||
}
|
||||
1f2: 8b 7d fc mov -0x4(%ebp),%edi
|
||||
1f5: 89 d0 mov %edx,%eax
|
||||
1f7: c9 leave
|
||||
1f8: c3 ret
|
||||
1f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
|
||||
00000200 <strchr>:
|
||||
|
||||
char* strchr(const char *s, char c) {
|
||||
200: 55 push %ebp
|
||||
201: 89 e5 mov %esp,%ebp
|
||||
203: 8b 45 08 mov 0x8(%ebp),%eax
|
||||
206: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx
|
||||
for (; *s; s++) {
|
||||
20a: 0f b6 10 movzbl (%eax),%edx
|
||||
20d: 84 d2 test %dl,%dl
|
||||
20f: 75 12 jne 223 <strchr+0x23>
|
||||
211: eb 1d jmp 230 <strchr+0x30>
|
||||
213: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
217: 90 nop
|
||||
218: 0f b6 50 01 movzbl 0x1(%eax),%edx
|
||||
21c: 83 c0 01 add $0x1,%eax
|
||||
21f: 84 d2 test %dl,%dl
|
||||
221: 74 0d je 230 <strchr+0x30>
|
||||
if (*s == c) {
|
||||
223: 38 d1 cmp %dl,%cl
|
||||
225: 75 f1 jne 218 <strchr+0x18>
|
||||
return (char*)s;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
227: 5d pop %ebp
|
||||
228: c3 ret
|
||||
229: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
return 0;
|
||||
230: 31 c0 xor %eax,%eax
|
||||
}
|
||||
232: 5d pop %ebp
|
||||
233: c3 ret
|
||||
234: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
23b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
23f: 90 nop
|
||||
|
||||
00000240 <gets>:
|
||||
|
||||
char* gets(char *buf, int max) {
|
||||
240: 55 push %ebp
|
||||
241: 89 e5 mov %esp,%ebp
|
||||
243: 57 push %edi
|
||||
244: 56 push %esi
|
||||
int i, cc;
|
||||
char c;
|
||||
|
||||
for (i = 0; i + 1 < max;) {
|
||||
cc = read(0, &c, 1);
|
||||
245: 8d 7d e7 lea -0x19(%ebp),%edi
|
||||
char* gets(char *buf, int max) {
|
||||
248: 53 push %ebx
|
||||
for (i = 0; i + 1 < max;) {
|
||||
249: 31 db xor %ebx,%ebx
|
||||
char* gets(char *buf, int max) {
|
||||
24b: 83 ec 1c sub $0x1c,%esp
|
||||
for (i = 0; i + 1 < max;) {
|
||||
24e: eb 27 jmp 277 <gets+0x37>
|
||||
cc = read(0, &c, 1);
|
||||
250: 83 ec 04 sub $0x4,%esp
|
||||
253: 6a 01 push $0x1
|
||||
255: 57 push %edi
|
||||
256: 6a 00 push $0x0
|
||||
258: e8 2e 01 00 00 call 38b <read>
|
||||
if (cc < 1) {
|
||||
25d: 83 c4 10 add $0x10,%esp
|
||||
260: 85 c0 test %eax,%eax
|
||||
262: 7e 1d jle 281 <gets+0x41>
|
||||
break;
|
||||
}
|
||||
buf[i++] = c;
|
||||
264: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
|
||||
268: 8b 55 08 mov 0x8(%ebp),%edx
|
||||
26b: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
|
||||
if (c == '\n' || c == '\r') {
|
||||
26f: 3c 0a cmp $0xa,%al
|
||||
271: 74 1d je 290 <gets+0x50>
|
||||
273: 3c 0d cmp $0xd,%al
|
||||
275: 74 19 je 290 <gets+0x50>
|
||||
for (i = 0; i + 1 < max;) {
|
||||
277: 89 de mov %ebx,%esi
|
||||
279: 83 c3 01 add $0x1,%ebx
|
||||
27c: 3b 5d 0c cmp 0xc(%ebp),%ebx
|
||||
27f: 7c cf jl 250 <gets+0x10>
|
||||
break;
|
||||
}
|
||||
}
|
||||
buf[i] = '\0';
|
||||
281: 8b 45 08 mov 0x8(%ebp),%eax
|
||||
284: c6 04 30 00 movb $0x0,(%eax,%esi,1)
|
||||
return buf;
|
||||
}
|
||||
288: 8d 65 f4 lea -0xc(%ebp),%esp
|
||||
28b: 5b pop %ebx
|
||||
28c: 5e pop %esi
|
||||
28d: 5f pop %edi
|
||||
28e: 5d pop %ebp
|
||||
28f: c3 ret
|
||||
buf[i] = '\0';
|
||||
290: 8b 45 08 mov 0x8(%ebp),%eax
|
||||
293: 89 de mov %ebx,%esi
|
||||
295: c6 04 30 00 movb $0x0,(%eax,%esi,1)
|
||||
}
|
||||
299: 8d 65 f4 lea -0xc(%ebp),%esp
|
||||
29c: 5b pop %ebx
|
||||
29d: 5e pop %esi
|
||||
29e: 5f pop %edi
|
||||
29f: 5d pop %ebp
|
||||
2a0: c3 ret
|
||||
2a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
2a8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
2af: 90 nop
|
||||
|
||||
000002b0 <stat>:
|
||||
|
||||
int stat(const char *n, struct stat *st) {
|
||||
2b0: 55 push %ebp
|
||||
2b1: 89 e5 mov %esp,%ebp
|
||||
2b3: 56 push %esi
|
||||
2b4: 53 push %ebx
|
||||
int fd;
|
||||
int r;
|
||||
|
||||
fd = open(n, O_RDONLY);
|
||||
2b5: 83 ec 08 sub $0x8,%esp
|
||||
2b8: 6a 00 push $0x0
|
||||
2ba: ff 75 08 push 0x8(%ebp)
|
||||
2bd: e8 19 01 00 00 call 3db <open>
|
||||
if (fd < 0) {
|
||||
2c2: 83 c4 10 add $0x10,%esp
|
||||
2c5: 85 c0 test %eax,%eax
|
||||
2c7: 78 27 js 2f0 <stat+0x40>
|
||||
return -1;
|
||||
}
|
||||
r = fstat(fd, st);
|
||||
2c9: 83 ec 08 sub $0x8,%esp
|
||||
2cc: ff 75 0c push 0xc(%ebp)
|
||||
2cf: 89 c3 mov %eax,%ebx
|
||||
2d1: 50 push %eax
|
||||
2d2: e8 cc 00 00 00 call 3a3 <fstat>
|
||||
close(fd);
|
||||
2d7: 89 1c 24 mov %ebx,(%esp)
|
||||
r = fstat(fd, st);
|
||||
2da: 89 c6 mov %eax,%esi
|
||||
close(fd);
|
||||
2dc: e8 2a 01 00 00 call 40b <close>
|
||||
return r;
|
||||
2e1: 83 c4 10 add $0x10,%esp
|
||||
}
|
||||
2e4: 8d 65 f8 lea -0x8(%ebp),%esp
|
||||
2e7: 89 f0 mov %esi,%eax
|
||||
2e9: 5b pop %ebx
|
||||
2ea: 5e pop %esi
|
||||
2eb: 5d pop %ebp
|
||||
2ec: c3 ret
|
||||
2ed: 8d 76 00 lea 0x0(%esi),%esi
|
||||
return -1;
|
||||
2f0: be ff ff ff ff mov $0xffffffff,%esi
|
||||
2f5: eb ed jmp 2e4 <stat+0x34>
|
||||
2f7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
2fe: 66 90 xchg %ax,%ax
|
||||
|
||||
00000300 <atoi>:
|
||||
|
||||
int atoi(const char *s) {
|
||||
300: 55 push %ebp
|
||||
301: 89 e5 mov %esp,%ebp
|
||||
303: 53 push %ebx
|
||||
304: 8b 55 08 mov 0x8(%ebp),%edx
|
||||
int n;
|
||||
|
||||
n = 0;
|
||||
while ('0' <= *s && *s <= '9') {
|
||||
307: 0f be 02 movsbl (%edx),%eax
|
||||
30a: 8d 48 d0 lea -0x30(%eax),%ecx
|
||||
30d: 80 f9 09 cmp $0x9,%cl
|
||||
n = 0;
|
||||
310: b9 00 00 00 00 mov $0x0,%ecx
|
||||
while ('0' <= *s && *s <= '9') {
|
||||
315: 77 1e ja 335 <atoi+0x35>
|
||||
317: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
31e: 66 90 xchg %ax,%ax
|
||||
n = n * 10 + *s++ - '0';
|
||||
320: 83 c2 01 add $0x1,%edx
|
||||
323: 8d 0c 89 lea (%ecx,%ecx,4),%ecx
|
||||
326: 8d 4c 48 d0 lea -0x30(%eax,%ecx,2),%ecx
|
||||
while ('0' <= *s && *s <= '9') {
|
||||
32a: 0f be 02 movsbl (%edx),%eax
|
||||
32d: 8d 58 d0 lea -0x30(%eax),%ebx
|
||||
330: 80 fb 09 cmp $0x9,%bl
|
||||
333: 76 eb jbe 320 <atoi+0x20>
|
||||
}
|
||||
return n;
|
||||
}
|
||||
335: 8b 5d fc mov -0x4(%ebp),%ebx
|
||||
338: 89 c8 mov %ecx,%eax
|
||||
33a: c9 leave
|
||||
33b: c3 ret
|
||||
33c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
|
||||
00000340 <memmove>:
|
||||
|
||||
void* memmove(void *vdst, const void *vsrc, int n) {
|
||||
340: 55 push %ebp
|
||||
341: 89 e5 mov %esp,%ebp
|
||||
343: 57 push %edi
|
||||
344: 8b 45 10 mov 0x10(%ebp),%eax
|
||||
347: 8b 55 08 mov 0x8(%ebp),%edx
|
||||
34a: 56 push %esi
|
||||
34b: 8b 75 0c mov 0xc(%ebp),%esi
|
||||
char *dst;
|
||||
const char *src;
|
||||
|
||||
dst = vdst;
|
||||
src = vsrc;
|
||||
while (n-- > 0) {
|
||||
34e: 85 c0 test %eax,%eax
|
||||
350: 7e 13 jle 365 <memmove+0x25>
|
||||
352: 01 d0 add %edx,%eax
|
||||
dst = vdst;
|
||||
354: 89 d7 mov %edx,%edi
|
||||
356: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
|
||||
35d: 8d 76 00 lea 0x0(%esi),%esi
|
||||
*dst++ = *src++;
|
||||
360: a4 movsb %ds:(%esi),%es:(%edi)
|
||||
while (n-- > 0) {
|
||||
361: 39 f8 cmp %edi,%eax
|
||||
363: 75 fb jne 360 <memmove+0x20>
|
||||
}
|
||||
return vdst;
|
||||
}
|
||||
365: 5e pop %esi
|
||||
366: 89 d0 mov %edx,%eax
|
||||
368: 5f pop %edi
|
||||
369: 5d pop %ebp
|
||||
36a: c3 ret
|
||||
|
||||
0000036b <fork>:
|
||||
name: \
|
||||
movl $SYS_ ## name, %eax; \
|
||||
int $T_SYSCALL; \
|
||||
ret
|
||||
|
||||
SYSCALL(fork)
|
||||
36b: b8 01 00 00 00 mov $0x1,%eax
|
||||
370: cd 40 int $0x40
|
||||
372: c3 ret
|
||||
|
||||
00000373 <exit>:
|
||||
SYSCALL(exit)
|
||||
373: b8 02 00 00 00 mov $0x2,%eax
|
||||
378: cd 40 int $0x40
|
||||
37a: c3 ret
|
||||
|
||||
0000037b <wait>:
|
||||
SYSCALL(wait)
|
||||
37b: b8 03 00 00 00 mov $0x3,%eax
|
||||
380: cd 40 int $0x40
|
||||
382: c3 ret
|
||||
|
||||
00000383 <pipe>:
|
||||
SYSCALL(pipe)
|
||||
383: b8 04 00 00 00 mov $0x4,%eax
|
||||
388: cd 40 int $0x40
|
||||
38a: c3 ret
|
||||
|
||||
0000038b <read>:
|
||||
SYSCALL(read)
|
||||
38b: b8 05 00 00 00 mov $0x5,%eax
|
||||
390: cd 40 int $0x40
|
||||
392: c3 ret
|
||||
|
||||
00000393 <kill>:
|
||||
SYSCALL(kill)
|
||||
393: b8 06 00 00 00 mov $0x6,%eax
|
||||
398: cd 40 int $0x40
|
||||
39a: c3 ret
|
||||
|
||||
0000039b <exec>:
|
||||
SYSCALL(exec)
|
||||
39b: b8 07 00 00 00 mov $0x7,%eax
|
||||
3a0: cd 40 int $0x40
|
||||
3a2: c3 ret
|
||||
|
||||
000003a3 <fstat>:
|
||||
SYSCALL(fstat)
|
||||
3a3: b8 08 00 00 00 mov $0x8,%eax
|
||||
3a8: cd 40 int $0x40
|
||||
3aa: c3 ret
|
||||
|
||||
000003ab <chdir>:
|
||||
SYSCALL(chdir)
|
||||
3ab: b8 09 00 00 00 mov $0x9,%eax
|
||||
3b0: cd 40 int $0x40
|
||||
3b2: c3 ret
|
||||
|
||||
000003b3 <dup>:
|
||||
SYSCALL(dup)
|
||||
3b3: b8 0a 00 00 00 mov $0xa,%eax
|
||||
3b8: cd 40 int $0x40
|
||||
3ba: c3 ret
|
||||
|
||||
000003bb <getpid>:
|
||||
SYSCALL(getpid)
|
||||
3bb: b8 0b 00 00 00 mov $0xb,%eax
|
||||
3c0: cd 40 int $0x40
|
||||
3c2: c3 ret
|
||||
|
||||
000003c3 <sbrk>:
|
||||
SYSCALL(sbrk)
|
||||
3c3: b8 0c 00 00 00 mov $0xc,%eax
|
||||
3c8: cd 40 int $0x40
|
||||
3ca: c3 ret
|
||||
|
||||
000003cb <sleep>:
|
||||
SYSCALL(sleep)
|
||||
3cb: b8 0d 00 00 00 mov $0xd,%eax
|
||||
3d0: cd 40 int $0x40
|
||||
3d2: c3 ret
|
||||
|
||||
000003d3 <uptime>:
|
||||
SYSCALL(uptime)
|
||||
3d3: b8 0e 00 00 00 mov $0xe,%eax
|
||||
3d8: cd 40 int $0x40
|
||||
3da: c3 ret
|
||||
|
||||
000003db <open>:
|
||||
SYSCALL(open)
|
||||
3db: b8 0f 00 00 00 mov $0xf,%eax
|
||||
3e0: cd 40 int $0x40
|
||||
3e2: c3 ret
|
||||
|
||||
000003e3 <write>:
|
||||
SYSCALL(write)
|
||||
3e3: b8 10 00 00 00 mov $0x10,%eax
|
||||
3e8: cd 40 int $0x40
|
||||
3ea: c3 ret
|
||||
|
||||
000003eb <mknod>:
|
||||
SYSCALL(mknod)
|
||||
3eb: b8 11 00 00 00 mov $0x11,%eax
|
||||
3f0: cd 40 int $0x40
|
||||
3f2: c3 ret
|
||||
|
||||
000003f3 <unlink>:
|
||||
SYSCALL(unlink)
|
||||
3f3: b8 12 00 00 00 mov $0x12,%eax
|
||||
3f8: cd 40 int $0x40
|
||||
3fa: c3 ret
|
||||
|
||||
000003fb <link>:
|
||||
SYSCALL(link)
|
||||
3fb: b8 13 00 00 00 mov $0x13,%eax
|
||||
400: cd 40 int $0x40
|
||||
402: c3 ret
|
||||
|
||||
00000403 <mkdir>:
|
||||
SYSCALL(mkdir)
|
||||
403: b8 14 00 00 00 mov $0x14,%eax
|
||||
408: cd 40 int $0x40
|
||||
40a: c3 ret
|
||||
|
||||
0000040b <close>:
|
||||
SYSCALL(close)
|
||||
40b: b8 15 00 00 00 mov $0x15,%eax
|
||||
410: cd 40 int $0x40
|
||||
412: c3 ret
|
||||
|
||||
00000413 <getch>:
|
||||
SYSCALL(getch)
|
||||
413: b8 16 00 00 00 mov $0x16,%eax
|
||||
418: cd 40 int $0x40
|
||||
41a: c3 ret
|
||||
|
||||
0000041b <greeting>:
|
||||
SYSCALL(greeting)
|
||||
41b: b8 17 00 00 00 mov $0x17,%eax
|
||||
420: cd 40 int $0x40
|
||||
422: c3 ret
|
||||
|
||||
00000423 <shutdown>:
|
||||
SYSCALL(shutdown)
|
||||
423: b8 18 00 00 00 mov $0x18,%eax
|
||||
428: cd 40 int $0x40
|
||||
42a: c3 ret
|
@ -1 +0,0 @@
|
||||
forktest.o: forktest.c /usr/include/stdc-predef.h types.h stat.h user.h
|
BIN
forktest.o
BIN
forktest.o
Binary file not shown.
2
fs.d
2
fs.d
@ -1,2 +0,0 @@
|
||||
fs.o: fs.c /usr/include/stdc-predef.h types.h defs.h param.h stat.h mmu.h \
|
||||
proc.h spinlock.h sleeplock.h fs.h buf.h file.h
|
@ -37,7 +37,9 @@ my @syscalls = (
|
||||
"close",
|
||||
"getch",
|
||||
"greeting",
|
||||
"shutdown"
|
||||
"shutdown",
|
||||
"screen",
|
||||
"cls"
|
||||
);
|
||||
|
||||
my $i;
|
||||
|
53
grep.sym
53
grep.sym
@ -1,53 +0,0 @@
|
||||
00000000 grep.c
|
||||
00000000 ulib.c
|
||||
00000000 printf.c
|
||||
00000680 printint
|
||||
00000af0 digits.0
|
||||
00000000 umalloc.c
|
||||
000012a0 freep
|
||||
000012a4 base
|
||||
00000370 strcpy
|
||||
00000730 printf
|
||||
0000066b greeting
|
||||
00000590 memmove
|
||||
000000c0 matchhere
|
||||
0000063b mknod
|
||||
00000490 gets
|
||||
0000060b getpid
|
||||
000001d0 grep
|
||||
00000960 malloc
|
||||
0000061b sleep
|
||||
000005d3 pipe
|
||||
00000663 getch
|
||||
00000633 write
|
||||
000005f3 fstat
|
||||
000005e3 kill
|
||||
000005fb chdir
|
||||
000005eb exec
|
||||
000005cb wait
|
||||
000005db read
|
||||
00000643 unlink
|
||||
000005bb fork
|
||||
00000613 sbrk
|
||||
00000623 uptime
|
||||
00000e90 __bss_start
|
||||
00000430 memset
|
||||
00000000 main
|
||||
00000310 matchstar
|
||||
000003a0 strcmp
|
||||
00000673 shutdown
|
||||
00000603 dup
|
||||
00000ea0 buf
|
||||
00000500 stat
|
||||
00000e90 _edata
|
||||
000012ac _end
|
||||
00000170 match
|
||||
0000064b link
|
||||
000005c3 exit
|
||||
00000550 atoi
|
||||
00000400 strlen
|
||||
0000062b open
|
||||
00000450 strchr
|
||||
00000653 mkdir
|
||||
0000065b close
|
||||
000008d0 free
|
48
hello.sym
48
hello.sym
@ -1,48 +0,0 @@
|
||||
00000000 hello.c
|
||||
00000000 ulib.c
|
||||
00000000 printf.c
|
||||
00000320 printint
|
||||
00000758 digits.0
|
||||
00000000 umalloc.c
|
||||
000009f8 freep
|
||||
000009fc base
|
||||
00000010 strcpy
|
||||
000003d0 printf
|
||||
0000030b greeting
|
||||
00000230 memmove
|
||||
000002db mknod
|
||||
00000130 gets
|
||||
000002ab getpid
|
||||
00000600 malloc
|
||||
000002bb sleep
|
||||
00000273 pipe
|
||||
00000303 getch
|
||||
000002d3 write
|
||||
00000293 fstat
|
||||
00000283 kill
|
||||
0000029b chdir
|
||||
0000028b exec
|
||||
0000026b wait
|
||||
0000027b read
|
||||
000002e3 unlink
|
||||
0000025b fork
|
||||
000002b3 sbrk
|
||||
000002c3 uptime
|
||||
000009f8 __bss_start
|
||||
000000d0 memset
|
||||
00000000 main
|
||||
00000040 strcmp
|
||||
00000313 shutdown
|
||||
000002a3 dup
|
||||
000001a0 stat
|
||||
000009f8 _edata
|
||||
00000a04 _end
|
||||
000002eb link
|
||||
00000263 exit
|
||||
000001f0 atoi
|
||||
000000a0 strlen
|
||||
000002cb open
|
||||
000000f0 strchr
|
||||
000002f3 mkdir
|
||||
000002fb close
|
||||
00000570 free
|
2
ide.d
2
ide.d
@ -1,2 +0,0 @@
|
||||
ide.o: ide.c /usr/include/stdc-predef.h types.h defs.h param.h \
|
||||
memlayout.h mmu.h proc.h x86.h traps.h spinlock.h sleeplock.h fs.h buf.h
|
1
init.d
1
init.d
@ -1 +0,0 @@
|
||||
init.o: init.c /usr/include/stdc-predef.h types.h stat.h user.h fcntl.h
|
49
init.sym
49
init.sym
@ -1,49 +0,0 @@
|
||||
00000000 init.c
|
||||
00000000 ulib.c
|
||||
00000000 printf.c
|
||||
000003f0 printint
|
||||
00000870 digits.0
|
||||
00000000 umalloc.c
|
||||
00000b24 freep
|
||||
00000b28 base
|
||||
000000e0 strcpy
|
||||
000004a0 printf
|
||||
000003db greeting
|
||||
00000b1c argv
|
||||
00000300 memmove
|
||||
000003ab mknod
|
||||
00000200 gets
|
||||
0000037b getpid
|
||||
000006d0 malloc
|
||||
0000038b sleep
|
||||
00000343 pipe
|
||||
000003d3 getch
|
||||
000003a3 write
|
||||
00000363 fstat
|
||||
00000353 kill
|
||||
0000036b chdir
|
||||
0000035b exec
|
||||
0000033b wait
|
||||
0000034b read
|
||||
000003b3 unlink
|
||||
0000032b fork
|
||||
00000383 sbrk
|
||||
00000393 uptime
|
||||
00000b24 __bss_start
|
||||
000001a0 memset
|
||||
00000000 main
|
||||
00000110 strcmp
|
||||
000003e3 shutdown
|
||||
00000373 dup
|
||||
00000270 stat
|
||||
00000b24 _edata
|
||||
00000b30 _end
|
||||
000003bb link
|
||||
00000333 exit
|
||||
000002c0 atoi
|
||||
00000170 strlen
|
||||
0000039b open
|
||||
000001c0 strchr
|
||||
000003c3 mkdir
|
||||
000003cb close
|
||||
00000640 free
|
43
initcode.asm
43
initcode.asm
@ -1,43 +0,0 @@
|
||||
|
||||
initcode.o: file format elf32-i386
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <start>:
|
||||
|
||||
|
||||
# exec(init, argv)
|
||||
.globl start
|
||||
start:
|
||||
pushl $argv
|
||||
0: 68 24 00 00 00 push $0x24
|
||||
pushl $init
|
||||
5: 68 1c 00 00 00 push $0x1c
|
||||
pushl $0 // where caller pc would be
|
||||
a: 6a 00 push $0x0
|
||||
movl $SYS_exec, %eax
|
||||
c: b8 07 00 00 00 mov $0x7,%eax
|
||||
int $T_SYSCALL
|
||||
11: cd 40 int $0x40
|
||||
|
||||
00000013 <exit>:
|
||||
|
||||
# for(;;) exit();
|
||||
exit:
|
||||
movl $SYS_exit, %eax
|
||||
13: b8 02 00 00 00 mov $0x2,%eax
|
||||
int $T_SYSCALL
|
||||
18: cd 40 int $0x40
|
||||
jmp exit
|
||||
1a: eb f7 jmp 13 <exit>
|
||||
|
||||
0000001c <init>:
|
||||
1c: 2f das
|
||||
1d: 69 6e 69 74 00 00 90 imul $0x90000074,0x69(%esi),%ebp
|
||||
|
||||
00000024 <argv>:
|
||||
24: 1c 00 sbb $0x0,%al
|
||||
26: 00 00 add %al,(%eax)
|
||||
28: 00 00 add %al,(%eax)
|
||||
...
|
@ -1 +0,0 @@
|
||||
initcode.o: initcode.S syscall.h traps.h
|
BIN
initcode.o
BIN
initcode.o
Binary file not shown.
BIN
initcode.out
BIN
initcode.out
Binary file not shown.
1
ioapic.d
1
ioapic.d
@ -1 +0,0 @@
|
||||
ioapic.o: ioapic.c /usr/include/stdc-predef.h types.h defs.h traps.h
|
2
kalloc.d
2
kalloc.d
@ -1,2 +0,0 @@
|
||||
kalloc.o: kalloc.c /usr/include/stdc-predef.h types.h defs.h param.h \
|
||||
memlayout.h mmu.h spinlock.h
|
15968
kernel.asm
15968
kernel.asm
File diff suppressed because it is too large
Load Diff
511
kernel.sym
511
kernel.sym
@ -1,511 +0,0 @@
|
||||
00000000 bio.c
|
||||
00000000 console.c
|
||||
8010ef40 cons
|
||||
8010ef78 panicked
|
||||
80100410 consputc.part.0
|
||||
80100610 printint
|
||||
80107450 digits.0
|
||||
00000000 exec.c
|
||||
00000000 file.c
|
||||
00000000 fs.c
|
||||
801012e0 bfree
|
||||
80101360 balloc
|
||||
80101470 iget
|
||||
80101570 bmap
|
||||
80101eb0 namex
|
||||
00000000 ide.c
|
||||
80102200 idestart
|
||||
80111620 idelock
|
||||
80111600 havedisk1
|
||||
80111604 idequeue
|
||||
00000000 ioapic.c
|
||||
00000000 kalloc.c
|
||||
00000000 kbd.c
|
||||
8011169c shift.1
|
||||
80107780 shiftcode
|
||||
80107680 togglecode
|
||||
80107660 charcode.0
|
||||
80108200 normalmap
|
||||
80108100 shiftmap
|
||||
80108000 ctlmap
|
||||
00000000 lapic.c
|
||||
00000000 log.c
|
||||
80102ce0 install_trans
|
||||
80102d80 write_head
|
||||
00000000 main.c
|
||||
80103120 mpmain
|
||||
80103160 mpenter
|
||||
00000000 mp.c
|
||||
801032b0 mpsearch1
|
||||
00000000 picirq.c
|
||||
00000000 pipe.c
|
||||
00000000 proc.c
|
||||
80103910 allocproc
|
||||
8010a000 first.1
|
||||
80113c74 initproc
|
||||
80107a2c states.0
|
||||
00000000 sleeplock.c
|
||||
00000000 spinlock.c
|
||||
00000000 string.c
|
||||
00000000 syscall.c
|
||||
80107aa0 syscalls
|
||||
00000000 sysfile.c
|
||||
80104c30 create
|
||||
00000000 sysproc.c
|
||||
00000000 trap.c
|
||||
00000000 uart.c
|
||||
80105dc0 uartgetc
|
||||
801144e0 uart
|
||||
00000000 vm.c
|
||||
801069c0 deallocuvm.part.0
|
||||
80106a70 mappages
|
||||
8010a420 kmap
|
||||
801073ba uva2ka.cold
|
||||
801073c1 copyout.cold
|
||||
80100280 consoleread
|
||||
8010690f vector242
|
||||
80106366 vector119
|
||||
8010000c entry
|
||||
80106246 vector87
|
||||
8010623d vector86
|
||||
80104980 safestrcpy
|
||||
80104f50 sys_close
|
||||
8010697b vector251
|
||||
8010626a vector91
|
||||
80106060 vector33
|
||||
8010654f vector162
|
||||
80104150 yield
|
||||
801116c0 log
|
||||
80111660 kmem
|
||||
801067b3 vector213
|
||||
80106303 vector108
|
||||
80105df0 uartinit
|
||||
801060ba vector43
|
||||
80102a30 lapiceoi
|
||||
80106573 vector165
|
||||
80106663 vector185
|
||||
801024f0 ioapicinit
|
||||
80106342 vector115
|
||||
80101140 fileread
|
||||
80106381 vector122
|
||||
801058b0 sys_sbrk
|
||||
801117a0 ioapicid
|
||||
80106507 vector156
|
||||
80106933 vector245
|
||||
80111654 ioapic
|
||||
80106693 vector189
|
||||
80105f84 vector7
|
||||
8010615c vector61
|
||||
8010600f vector24
|
||||
8010631e vector111
|
||||
80106717 vector200
|
||||
80106192 vector67
|
||||
8010642f vector138
|
||||
801061d1 vector74
|
||||
80103e30 sched
|
||||
80104860 memmove
|
||||
80106138 vector57
|
||||
80104bc0 syscall
|
||||
801067bf vector214
|
||||
801062b2 vector99
|
||||
80103ab0 cpuid
|
||||
80101cb0 writei
|
||||
80106453 vector141
|
||||
80105830 sys_fork
|
||||
80100b20 cleanupexec
|
||||
8010a520 bcache
|
||||
801065c7 vector172
|
||||
80106903 vector241
|
||||
80104550 getcallerpcs
|
||||
801054c0 sys_mkdir
|
||||
80106993 vector253
|
||||
80105f60 vector3
|
||||
80105f57 vector2
|
||||
80101de0 namecmp
|
||||
8010685b vector227
|
||||
8010678f vector210
|
||||
80104b40 argstr
|
||||
80106837 vector224
|
||||
8010eea0 inputBuffer
|
||||
801060a8 vector41
|
||||
801006b0 cprintf
|
||||
80100fc0 filedup
|
||||
801021c0 namei
|
||||
80105ff4 vector21
|
||||
80100040 binit
|
||||
80106603 vector177
|
||||
8010635d vector118
|
||||
801061ad vector70
|
||||
801061a4 vector69
|
||||
801068d3 vector237
|
||||
80106177 vector64
|
||||
8010602a vector27
|
||||
801063e7 vector132
|
||||
8010666f vector186
|
||||
80104e50 sys_read
|
||||
801067e3 vector217
|
||||
801049f0 fetchint
|
||||
80107060 setupkvm
|
||||
801048c0 memcpy
|
||||
80106fe0 freevm
|
||||
80105f4e vector1
|
||||
8010660f vector178
|
||||
8010608d vector38
|
||||
801025e0 kfree
|
||||
801068df vector238
|
||||
801059e0 sys_greeting
|
||||
80103a50 mycpu
|
||||
801019d0 iput
|
||||
801063f3 vector133
|
||||
801061c8 vector73
|
||||
80106477 vector144
|
||||
8010699f vector254
|
||||
80101640 readsb
|
||||
8010a004 nextpid
|
||||
801062c4 vector101
|
||||
8010679b vector211
|
||||
80103330 mpinit
|
||||
801065df vector174
|
||||
8010691b vector243
|
||||
80100f30 fileinit
|
||||
80105020 cleanupsyslink
|
||||
80104530 initlock
|
||||
801063b7 vector128
|
||||
801072f0 copyout
|
||||
80106210 vector81
|
||||
801041a0 sleep
|
||||
80102a50 microdelay
|
||||
80105fb2 vector13
|
||||
80106102 vector51
|
||||
80105fc9 vector16
|
||||
8010ee80 input
|
||||
801068f7 vector240
|
||||
8010611d vector54
|
||||
80105fe2 vector19
|
||||
80106273 vector92
|
||||
80106927 vector244
|
||||
80101b80 stati
|
||||
80106447 vector140
|
||||
80105860 sys_kill
|
||||
801060cc vector45
|
||||
801061fe vector79
|
||||
80103690 pipeclose
|
||||
80106873 vector229
|
||||
8010651f vector158
|
||||
80104fb0 sys_fstat
|
||||
801005a0 consolewrite
|
||||
80106096 vector39
|
||||
80106597 vector168
|
||||
80102ef0 end_op
|
||||
80106072 vector35
|
||||
80106330 vector113
|
||||
80102680 freerange
|
||||
8010639c vector125
|
||||
80106e80 allocuvm
|
||||
80105a66 trapret
|
||||
801067d7 vector216
|
||||
8010616e vector63
|
||||
80106021 vector26
|
||||
801066c3 vector193
|
||||
80102910 lapicinit
|
||||
801066e7 vector196
|
||||
80106783 vector209
|
||||
80105f69 vector4
|
||||
801065af vector170
|
||||
801144f0 stack
|
||||
80106417 vector136
|
||||
80105f9d vector10
|
||||
8010675f vector206
|
||||
80101980 iunlock
|
||||
80105900 sys_sleep
|
||||
801069ab vector255
|
||||
80106633 vector181
|
||||
8010614a vector59
|
||||
80106234 vector85
|
||||
8010622b vector84
|
||||
8010664b vector183
|
||||
8010652b vector159
|
||||
801067a7 vector212
|
||||
80105060 sys_link
|
||||
801060de vector47
|
||||
80106867 vector228
|
||||
801060b1 vector42
|
||||
80106339 vector114
|
||||
801072a0 uva2ka
|
||||
801065eb vector175
|
||||
8010646b vector143
|
||||
80100f50 filealloc
|
||||
80104260 wakeup
|
||||
801063cf vector130
|
||||
8010693f vector246
|
||||
80105f94 vector9
|
||||
8010645f vector142
|
||||
801062bb vector100
|
||||
80106723 vector201
|
||||
80107100 clearpteu
|
||||
80103ad0 myproc
|
||||
80105a80 tvinit
|
||||
80106153 vector60
|
||||
80106006 vector23
|
||||
80101870 idup
|
||||
801068c7 vector236
|
||||
801028f0 kbdintr
|
||||
80105380 sys_open
|
||||
8010688b vector231
|
||||
80106189 vector66
|
||||
8010603c vector29
|
||||
80101bb0 readi
|
||||
8010640b vector135
|
||||
801008e0 consoleintr
|
||||
801042c0 kill
|
||||
801061ec vector77
|
||||
80101730 ialloc
|
||||
80106627 vector180
|
||||
801144e4 kpgdir
|
||||
80106777 vector208
|
||||
80102af0 cmostime
|
||||
80105f30 uartintr
|
||||
801062a9 vector98
|
||||
801062a0 vector97
|
||||
801065f7 vector176
|
||||
801066cf vector194
|
||||
80106057 vector32
|
||||
801154f0 end
|
||||
8010670b vector199
|
||||
80100890 consoleget
|
||||
801063db vector131
|
||||
80106987 vector252
|
||||
801011d0 filewrite
|
||||
80105f45 vector0
|
||||
80104a80 argint
|
||||
80103550 cleanuppipealloc
|
||||
80100b70 exec
|
||||
80106483 vector145
|
||||
80104ed0 sys_write
|
||||
801046a0 release
|
||||
80104a30 fetchstr
|
||||
801062fa vector107
|
||||
8010609f vector40
|
||||
80104020 wait
|
||||
801062cd vector102
|
||||
80109000 entrypgdir
|
||||
0010000c _start
|
||||
8010612f vector56
|
||||
8010619b vector68
|
||||
80105f7b vector6
|
||||
8010a48c _binary_initcode_end
|
||||
80100000 multiboot_header
|
||||
801063c3 vector129
|
||||
80103d90 scheduler
|
||||
80101e00 dirlookup
|
||||
801066f3 vector197
|
||||
80101010 fileclose
|
||||
80102e80 begin_op
|
||||
801064d7 vector152
|
||||
801070e0 kvmalloc
|
||||
8010687f vector230
|
||||
801048d0 strncmp
|
||||
80106084 vector37
|
||||
80106753 vector205
|
||||
80106543 vector161
|
||||
80113ca0 tickslock
|
||||
80103730 pipewrite
|
||||
80104920 strncpy
|
||||
801061b6 vector71
|
||||
80107150 copyuvm
|
||||
8010ef80 ftable
|
||||
80106537 vector160
|
||||
80104ad0 argptr
|
||||
801067cb vector215
|
||||
80106513 vector157
|
||||
80104dd0 sys_dup
|
||||
80106327 vector112
|
||||
80100390 panic
|
||||
801039e0 forkret
|
||||
8010663f vector182
|
||||
80105fab vector12
|
||||
80104810 memcmp
|
||||
80102810 kbdgetc
|
||||
8010630c vector109
|
||||
80105feb vector20
|
||||
80103c70 fork
|
||||
80106114 vector53
|
||||
80105fd9 vector18
|
||||
0000007a _binary_entryother_size
|
||||
801117c0 cpus
|
||||
801044a0 releasesleep
|
||||
8010628e vector95
|
||||
80105820 sys_getch
|
||||
80104660 holding
|
||||
801115d4 sb
|
||||
80104700 acquire
|
||||
8010684f vector226
|
||||
801021e0 nameiparent
|
||||
801060f0 vector49
|
||||
801060c3 vector44
|
||||
801116a0 lapic
|
||||
801061f5 vector78
|
||||
80105a4e alltraps
|
||||
801065d3 vector173
|
||||
80106354 vector117
|
||||
80106219 vector82
|
||||
8010681f vector222
|
||||
80105f8d vector8
|
||||
801064b3 vector149
|
||||
801017f0 iupdate
|
||||
80108000 data
|
||||
801047c0 memset
|
||||
80106897 vector232
|
||||
80103180 main
|
||||
80106bf0 switchkvm
|
||||
801062f1 vector106
|
||||
80106807 vector220
|
||||
80106261 vector90
|
||||
8010655b vector163
|
||||
801068af vector234
|
||||
80103060 log_write
|
||||
80104440 acquiresleep
|
||||
801051b0 sys_unlink
|
||||
80106165 vector62
|
||||
80106018 vector25
|
||||
801066ff vector198
|
||||
8010636f vector120
|
||||
8010a48c _binary_entryother_start
|
||||
80102730 kinit1
|
||||
801060f9 vector50
|
||||
80105fc0 vector15
|
||||
801064cb vector151
|
||||
80106222 vector83
|
||||
80106258 vector89
|
||||
8010624f vector88
|
||||
80105a00 sys_shutdown
|
||||
80105b30 trap
|
||||
801059b0 sys_uptime
|
||||
8010661b vector179
|
||||
80106069 vector34
|
||||
801060d5 vector46
|
||||
801063ff vector134
|
||||
8010682b vector223
|
||||
80113ce0 idt
|
||||
801067ef vector218
|
||||
80103a30 pinit
|
||||
80106fb0 deallocuvm
|
||||
80106843 vector225
|
||||
80102a10 lapicid
|
||||
8010667b vector187
|
||||
80103bf0 growproc
|
||||
801044e0 holdingsleep
|
||||
801117a4 ncpu
|
||||
80106045 vector30
|
||||
80103b00 userinit
|
||||
801000d0 bread
|
||||
801063ae vector127
|
||||
80103830 piperead
|
||||
80113c80 ticks
|
||||
801066b7 vector192
|
||||
8010657f vector166
|
||||
80100ad0 consoleinit
|
||||
801061e3 vector76
|
||||
801061da vector75
|
||||
80102360 ideintr
|
||||
801066db vector195
|
||||
801064bf vector150
|
||||
80106141 vector58
|
||||
80106957 vector248
|
||||
8010638a vector123
|
||||
80106297 vector96
|
||||
8010604e vector31
|
||||
8010673b vector203
|
||||
8010643b vector139
|
||||
801064e3 vector153
|
||||
80106567 vector164
|
||||
80104340 procdump
|
||||
80106378 vector121
|
||||
80105ed0 uartputc
|
||||
80105f72 vector5
|
||||
8010658b vector167
|
||||
801064fb vector155
|
||||
80106963 vector249
|
||||
801001f0 brelse
|
||||
8010696f vector250
|
||||
80106393 vector124
|
||||
80106315 vector110
|
||||
80106747 vector204
|
||||
801018a0 ilock
|
||||
80105660 sys_exec
|
||||
80106423 vector137
|
||||
8010a460 _binary_initcode_start
|
||||
801049db swtch
|
||||
8010694b vector247
|
||||
80105ffd vector22
|
||||
8010672f vector202
|
||||
80106b60 seginit
|
||||
80101b30 iunlockput
|
||||
801061bf vector72
|
||||
80106126 vector55
|
||||
801063a5 vector126
|
||||
80106180 vector65
|
||||
80106033 vector28
|
||||
8010a506 _binary_entryother_end
|
||||
801065a3 vector169
|
||||
801001b0 bwrite
|
||||
801068a3 vector233
|
||||
80105b00 idtinit
|
||||
80103ef0 exit
|
||||
80105850 sys_wait
|
||||
80105840 sys_exit
|
||||
80102100 dirlink
|
||||
0000002c _binary_initcode_size
|
||||
8010649b vector147
|
||||
80104400 initsleeplock
|
||||
801022e0 ideinit
|
||||
80106d90 loaduvm
|
||||
801062df vector104
|
||||
8010634b vector116
|
||||
80111d40 ptable
|
||||
801025a0 ioapicenable
|
||||
80104600 popcli
|
||||
8010a008 vectors
|
||||
8010610b vector52
|
||||
80105fd2 vector17
|
||||
80106657 vector184
|
||||
801049c0 strlen
|
||||
80105750 sys_pipe
|
||||
80101680 iinit
|
||||
80103530 picinit
|
||||
8010676b vector207
|
||||
80106d10 inituvm
|
||||
8010669f vector190
|
||||
801068eb vector239
|
||||
80106285 vector94
|
||||
8010627c vector93
|
||||
80102de0 initlog
|
||||
80106687 vector188
|
||||
801060e7 vector48
|
||||
80102400 iderw
|
||||
801067fb vector219
|
||||
801064a7 vector148
|
||||
80106813 vector221
|
||||
801027a0 kalloc
|
||||
8010f920 devsw
|
||||
801058a0 sys_getpid
|
||||
80106207 vector80
|
||||
801065bb vector171
|
||||
801064ef vector154
|
||||
8010607b vector36
|
||||
801035a0 pipealloc
|
||||
801068bb vector235
|
||||
801062e8 vector105
|
||||
801055b0 sys_chdir
|
||||
8010f980 icache
|
||||
8010648f vector146
|
||||
801066ab vector191
|
||||
801062d6 vector103
|
||||
80105520 sys_mknod
|
||||
80102a60 lapicstartap
|
||||
80106c00 switchuvm
|
||||
801045b0 pushcli
|
||||
801026d0 kinit2
|
||||
80105fa4 vector11
|
||||
80105fb9 vector14
|
||||
801010f0 filestat
|
48
kill.sym
48
kill.sym
@ -1,48 +0,0 @@
|
||||
00000000 kill.c
|
||||
00000000 ulib.c
|
||||
00000000 printf.c
|
||||
00000370 printint
|
||||
000007bc digits.0
|
||||
00000000 umalloc.c
|
||||
00000a74 freep
|
||||
00000a78 base
|
||||
00000060 strcpy
|
||||
00000420 printf
|
||||
0000035b greeting
|
||||
00000280 memmove
|
||||
0000032b mknod
|
||||
00000180 gets
|
||||
000002fb getpid
|
||||
00000650 malloc
|
||||
0000030b sleep
|
||||
000002c3 pipe
|
||||
00000353 getch
|
||||
00000323 write
|
||||
000002e3 fstat
|
||||
000002d3 kill
|
||||
000002eb chdir
|
||||
000002db exec
|
||||
000002bb wait
|
||||
000002cb read
|
||||
00000333 unlink
|
||||
000002ab fork
|
||||
00000303 sbrk
|
||||
00000313 uptime
|
||||
00000a74 __bss_start
|
||||
00000120 memset
|
||||
00000000 main
|
||||
00000090 strcmp
|
||||
00000363 shutdown
|
||||
000002f3 dup
|
||||
000001f0 stat
|
||||
00000a74 _edata
|
||||
00000a80 _end
|
||||
0000033b link
|
||||
000002b3 exit
|
||||
00000240 atoi
|
||||
000000f0 strlen
|
||||
0000031b open
|
||||
00000140 strchr
|
||||
00000343 mkdir
|
||||
0000034b close
|
||||
000005c0 free
|
2
lapic.d
2
lapic.d
@ -1,2 +0,0 @@
|
||||
lapic.o: lapic.c /usr/include/stdc-predef.h param.h types.h defs.h date.h \
|
||||
memlayout.h traps.h mmu.h x86.h
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user