diff --git a/Asuro.iso b/Asuro.iso index 6b95f5fa..e92755d4 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index 91610c2b..05ebfd7b 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 91610c2b..05ebfd7b 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 5931e98e..31508a1d 100644 Binary files a/lib/bios_data_area.ppu and b/lib/bios_data_area.ppu differ diff --git a/lib/console.o b/lib/console.o index 48a627fb..e60d5fe9 100644 Binary files a/lib/console.o and b/lib/console.o differ diff --git a/lib/console.ppu b/lib/console.ppu index bc5c92a2..b2e8b6f2 100644 Binary files a/lib/console.ppu and b/lib/console.ppu differ diff --git a/lib/kernel.o b/lib/kernel.o index 2facf145..64cc78a0 100644 Binary files a/lib/kernel.o and b/lib/kernel.o differ diff --git a/lib/kernel.ppu b/lib/kernel.ppu index 29ea8025..68014ba4 100644 Binary files a/lib/kernel.ppu and b/lib/kernel.ppu differ diff --git a/lib/keyboard.ppu b/lib/keyboard.ppu index e9d9534b..992e7956 100644 Binary files a/lib/keyboard.ppu and b/lib/keyboard.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index f28bb8b4..5b18de4d 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpkernel.a b/lib/libpkernel.a index 2f92bf91..4b78fe86 100644 Binary files a/lib/libpkernel.a and b/lib/libpkernel.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index 11773221..b9fcbfcf 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index aca90cb6..176bc62b 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/multiboot.o b/lib/multiboot.o index a635d12a..ffdfd06d 100644 Binary files a/lib/multiboot.o and b/lib/multiboot.o differ diff --git a/lib/multiboot.ppu b/lib/multiboot.ppu index 5927559a..64c62ab8 100644 Binary files a/lib/multiboot.ppu and b/lib/multiboot.ppu differ diff --git a/lib/system.o b/lib/system.o index 1353e573..736030d7 100644 Binary files a/lib/system.o and b/lib/system.o differ diff --git a/lib/system.ppu b/lib/system.ppu index 74c0967d..94b122af 100644 Binary files a/lib/system.ppu and b/lib/system.ppu differ diff --git a/lib/util.ppu b/lib/util.ppu index afbebfda..ea8386f3 100644 Binary files a/lib/util.ppu and b/lib/util.ppu differ diff --git a/src/gdt.pas b/src/gdt.pas index 2498b9c6..c8a53d12 100644 --- a/src/gdt.pas +++ b/src/gdt.pas @@ -13,10 +13,11 @@ type limit_n_flags : Byte; base_high : Byte; end; + PSegmentDescriptor = ^TSegmentDescriptor; var - GDTarr : array[0..3] of TSegementDescriptor; - GDTptr : ^TSegementDescriptor; + GDTarr : array of TSegementDescriptor; + GDTptr : PSegmentDescriptor; GDT_length : integer = 0; procedure init(); @@ -46,48 +47,52 @@ end; procedure create(base : dword; limit : dword; flags : byte); var - descriptor : array[0..8] of Byte; - descriptor_ptr : ^Byte = @descriptor[0]; - s_descriptor : TSegementDescriptor; + descriptor : array[0..8] of Byte; + descriptor_ptr : ^Byte = @descriptor[0]; + s_descriptor : TSegementDescriptor; s_descriptor_ptr : ^TSegementDescriptor = @s_descriptor; + begin - if limit <= 65536 then - descriptor[6] := $40 - else - if (limit and $FFF) <> $FFF then - limit := (limit >> 12) -1 - else - limit := limit >> 12; - descriptor[6] := $C0; + if limit <= 65536 then begin + descriptor[6] := $40 + end else begin + if (limit and $FFF) <> $FFF then begin + limit := (limit SHR 12) -1 + end else begin + limit := limit SHR 12; + end; + end; + + descriptor[6] := $C0; - descriptor[0] := limit and $FF; - descriptor[1] := (limit shr 8) and $FF; - descriptor[6] := limit or ((limit shr 16) and $F); + descriptor[0] := limit and $FF; + descriptor[1] := (limit shr 8) and $FF; + descriptor[6] := limit or ((limit shr 16) and $F); - descriptor[2] := base and $FF; - descriptor[3] := (base shr 8) and $FF; - descriptor[4] := (base shr 16) and $FF; - descriptor[7] := (base shr 24) and $FF; + descriptor[2] := base and $FF; + descriptor[3] := (base shr 8) and $FF; + descriptor[4] := (base shr 16) and $FF; + descriptor[7] := (base shr 24) and $FF; - descriptor[5] := flags; + descriptor[5] := flags; - asm - MOV EAX, descriptor_ptr - MOV s_descriptor_ptr, EAX - end; + asm + MOV EAX, descriptor_ptr + MOV s_descriptor_ptr, EAX + end; - descriptor_ptr = @descriptor[4]; + descriptor_ptr = @descriptor[4]; - asm + asm MOV EAX, descriptor_ptr MOV EBX, s_descriptor_ptr ADD EBX, 1 MOV (EBX), EAX - end; + end; - GDTarr[GDT_length] := s_descriptor; - GDT_length := GDT_length + 1; + GDTarr[GDT_length] := s_descriptor; + GDT_length := GDT_length + 1; end; -end. \ No newline at end of file +end.