diff --git a/Asuro.iso b/Asuro.iso index f4ff1af9..45e70ebc 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index f09b59da..5ba0bbcd 100755 Binary files a/bin/kernel.bin and b/bin/kernel.bin differ diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index f09b59da..5ba0bbcd 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/bios_data_area.ppu b/lib/bios_data_area.ppu index d5c874fb..5582649c 100644 Binary files a/lib/bios_data_area.ppu and b/lib/bios_data_area.ppu differ diff --git a/lib/kernel.ppu b/lib/kernel.ppu index ce3052d4..202e8008 100644 Binary files a/lib/kernel.ppu and b/lib/kernel.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index 4a1a1b92..1b1af49c 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index d9e8355d..d185bf48 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index ab0d910e..dfa2941d 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/memorymanager.ppu b/lib/memorymanager.ppu index 6dfa05f4..cd36fb2d 100644 Binary files a/lib/memorymanager.ppu and b/lib/memorymanager.ppu differ diff --git a/lib/scheduler.ppu b/lib/scheduler.ppu index 5e5c79eb..9c8e4896 100644 Binary files a/lib/scheduler.ppu and b/lib/scheduler.ppu differ diff --git a/src/kernel.pas b/src/kernel.pas index b241bae6..38cddc43 100644 --- a/src/kernel.pas +++ b/src/kernel.pas @@ -53,22 +53,11 @@ begin memorymanager.init(); scheduler.init(); - pint2:= kalloc(18); - pint:= kalloc(sizeof(uint32)); - if pint = nil then console.writestringln('!'); - pint^:= 1234; - kfree(pint2); - console.writeintln(pint^); - kfree(pint); - pint2:= kalloc(128); - STI; isr32.hook(uint32(@bios_data_area.tick_update)); //drivers keyboard.init(keyboard_layout); - scheduler.add_task(5); - scheduler.add_task(15); asm MOV dds, CS diff --git a/src/memorymanager.pas b/src/memorymanager.pas index a49c60f3..265a73d7 100644 --- a/src/memorymanager.pas +++ b/src/memorymanager.pas @@ -31,10 +31,12 @@ var i : uint32; begin + console.writestringln('MEM-MANAGER: INIT BEGIN.'); For i:=0 to MAX_ENTRIES-1 do begin Memory_Manager[i].Present:= False; end; Memory_Start:= uint32(@util.endptr); + console.writestringln('MEM-MANAGER: INIT END.'); end; function kalloc(size : uint32) : void; @@ -64,11 +66,11 @@ begin Memory_Manager[i+j].Length:= 0; if j = 0 then Memory_Manager[i+j].Length:= blocks; end; - console.writestring('Allocated '); - console.writeint(blocks); - console.writestring(' Block(s). [Block: '); - console.writeint(i); - console.writestringln(']'); + //console.writestring('Allocated '); + //console.writeint(blocks); + //console.writestring(' Block(s). [Block: '); + //console.writeint(i); + //console.writestringln(']'); break; end; end; @@ -93,11 +95,11 @@ begin for i:=0 to bLength-1 do begin Memory_Manager[Block+i].Present:= False; end; - console.writestring('Freed '); - console.writeint(bLength); - console.writestring(' Block(s). [Block: '); - console.writeint(Block); - console.writestringln(']'); + //console.writestring('Freed '); + //console.writeint(bLength); + //console.writestring(' Block(s). [Block: '); + //console.writeint(Block); + //console.writestringln(']'); end else begin asm INT 13 diff --git a/src/scheduler.pas b/src/scheduler.pas index 38558351..2c90c4a0 100644 --- a/src/scheduler.pas +++ b/src/scheduler.pas @@ -31,11 +31,7 @@ var procedure context_switch(); begin - // This will switch contexts eventually, - // For now just print upon context switch. Current_Task:= PScheduler_Entry(Current_Task^.Next); - console.writestring('Task: '); - console.writeintln(Current_Task^.ThreadID); end; procedure add_task(priority : uint8); @@ -62,11 +58,13 @@ end; procedure delta(data : void); begin Tick:= Tick + 1; + If Tick = 0 then context_switch(); If (Current_Task^.Delta + (Current_Task^.Priority * Quantum)) <= Tick then context_switch(); end; procedure init; begin + console.writestringln('SCHEDULER: INIT BEGIN.'); Root_Task:= PScheduler_Entry(kalloc(sizeof(TScheduler_Entry))); Root_Task^.ThreadID:= 0; Root_Task^.Priority:= 1; @@ -75,6 +73,7 @@ begin Current_Task:= Root_Task; Tick:= 0; isr32.hook(uint32(@delta)); + console.writestringln('SCHEDULER: INIT END.'); end; end. \ No newline at end of file