diff --git a/Asuro.iso b/Asuro.iso index 6a943d2e..4bfadbc1 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin deleted file mode 100755 index a1816f6b..00000000 Binary files a/bin/kernel.bin and /dev/null differ diff --git a/compile.sh b/compile.sh index c15a46df..314e6fd6 100755 --- a/compile.sh +++ b/compile.sh @@ -7,6 +7,8 @@ echo "=======================" echo " " echo "Compiling ASM Stub..." echo " " +rm lib/* + nasm -f elf src/stub/stub.asm -o lib/stub.o if [ $? -ne 0 ] then diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index a1816f6b..eba019b4 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/kernel.o b/lib/kernel.o deleted file mode 100644 index fe1821e9..00000000 Binary files a/lib/kernel.o and /dev/null differ diff --git a/lib/kernel.ppu b/lib/kernel.ppu deleted file mode 100644 index f34f52fa..00000000 Binary files a/lib/kernel.ppu and /dev/null differ diff --git a/lib/keyboard.ppu b/lib/keyboard.ppu index 74a83799..b2c80de4 100644 Binary files a/lib/keyboard.ppu and b/lib/keyboard.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index 6f514617..a154a512 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpkernel.a b/lib/libpkernel.a deleted file mode 100644 index 316cfdf9..00000000 Binary files a/lib/libpkernel.a and /dev/null differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index 9b3febcb..e6d49279 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index 2bfc7b3f..3692d03f 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/system.ppu b/lib/system.ppu index d7f926b9..3bae1258 100644 Binary files a/lib/system.ppu and b/lib/system.ppu differ diff --git a/src/kernel.pas b/src/kernel.pas index f567a6cb..e8b46669 100644 --- a/src/kernel.pas +++ b/src/kernel.pas @@ -12,7 +12,8 @@ uses isr32, console, bios_data_area, - keyboard; + keyboard, + memorymanager; procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall; @@ -78,7 +79,6 @@ begin console.writeint(((mbinfo^.mem_upper + 1000) div 1024) + 1); console.writestringln('MB'); console.setdefaultattribute(console.combinecolors(lYellow, Black)); - console.writewordln(uint32(@util.endptr) - KERNEL_VIRTUAL_BASE); util.halt_and_dont_catch_fire; end; diff --git a/src/memorymanager.pas b/src/memorymanager.pas new file mode 100644 index 00000000..a4ae57c2 --- /dev/null +++ b/src/memorymanager.pas @@ -0,0 +1,37 @@ +unit memorymanager; + +interface + +uses + util; + +const + ALLOC_SPACE = 8; //64-Bit Allocations + MAX_ENTRIES = $FFFF; + +procedure init(); +function kalloc(size : uint32) : void; +procedure kfree(area : void); + +implementation + +var + Memory_Start : uint32; + Memory_Manager : bitpacked array[1..MAX_ENTRIES] of Boolean; + +procedure init(); +begin + Memory_Start:= uint32(@util.endptr); +end; + +function kalloc(size : uint32) : void; +begin + kalloc:= void(0); +end; + +function kfree(area : void); +begin + +end; + +end. \ No newline at end of file