Code Cleanup

git-svn-id: https://spexeah.com:8443/svn/Asuro@180 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
kieron 2017-05-22 01:07:19 +00:00
parent 27ad1415c3
commit 77a41c94f7
10 changed files with 4 additions and 11 deletions

BIN
Asuro.iso

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -70,6 +70,7 @@ end;
procedure reload;
begin
console.writestringln('GDT: RELOAD.');
reload_gdt(uint32(@gdt_pointer));
end;
@ -80,8 +81,6 @@ var
begin
lLimit:= (Gate_Number + 1) * 8;
lLimit:= lLimit - 1;
writestring('lLimit: ');
writewordln(lLimit);
if lLimit > gdt_pointer.limit then begin
gdt_pointer.limit:= lLimit;
end;

View File

@ -66,8 +66,8 @@ begin
pmemorymanager.init();
vmemorymanager.init();
lmemorymanager.init();
scheduler.init();
tss.init();
scheduler.init();
STI;
isr32.hook(uint32(@bios_data_area.tick_update));

View File

@ -188,7 +188,7 @@ var
cCR3 : uint32;
begin
console.writehexln(uint32(ptrTaskStateSegment));
console.writestringln('TSS: INIT BEGIN.')
ptrTaskStateSegment^.ss0:= $08;
ptrTaskStateSegment^.iomap:= sizeof(TTaskStateSegment)-1;
asm
@ -199,19 +199,13 @@ begin
console.writewordln(sizeof(TTaskStateSegment));
ptrTaskStateSegment^.esp0:= cESP;
ptrTaskStateSegment^.CR3:= cCR3;
console.writestring('OLD LIMIT: ');
console.writewordln(gdt.gdt_pointer.limit);
gdt.set_gate($05, uint32(ptrTaskStateSegment)-KERNEL_VIRTUAL_BASE, sizeof(TTaskStateSegment)-1, $89, $40); //OFFSET: 40
console.writestring('NEW LIMIT: ');
console.writewordln(gdt.gdt_pointer.limit);
gdt.reload;
//while true do begin end;
console.writestringln('A');
asm
mov AX, 40
ltr AX
end;
console.writestringln('B');
console.writestringln('TSS: INIT END.')
end;
end.