Fixed IRQs(ish)+
git-svn-id: https://spexeah.com:8443/svn/Asuro@69 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
d54e43cca9
commit
96dfb38124
BIN
bin/kernel.bin
BIN
bin/kernel.bin
Binary file not shown.
Binary file not shown.
BIN
lib/console.o
BIN
lib/console.o
Binary file not shown.
BIN
lib/console.ppu
BIN
lib/console.ppu
Binary file not shown.
BIN
lib/gdt.ppu
BIN
lib/gdt.ppu
Binary file not shown.
BIN
lib/idt.ppu
BIN
lib/idt.ppu
Binary file not shown.
BIN
lib/isr.ppu
BIN
lib/isr.ppu
Binary file not shown.
BIN
lib/isr0.ppu
BIN
lib/isr0.ppu
Binary file not shown.
BIN
lib/kernel.o
BIN
lib/kernel.o
Binary file not shown.
BIN
lib/kernel.ppu
BIN
lib/kernel.ppu
Binary file not shown.
BIN
lib/keyboard.ppu
BIN
lib/keyboard.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/libpkernel.a
BIN
lib/libpkernel.a
Binary file not shown.
BIN
lib/util.ppu
BIN
lib/util.ppu
Binary file not shown.
@ -15,6 +15,8 @@ uses
|
||||
util,
|
||||
bios_data_area;
|
||||
|
||||
const DEBUG = FALSE;
|
||||
|
||||
type
|
||||
TColor = ( Black = $0,
|
||||
Blue = $1,
|
||||
@ -371,7 +373,7 @@ begin
|
||||
end;
|
||||
Console_Cursor.X:= 0;
|
||||
console._update_cursor;
|
||||
psleep(500);
|
||||
if DEBUG then psleep(500);
|
||||
end;
|
||||
|
||||
procedure _newline(); [public, alias: '_console_newline'];
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Divide by Zero Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Debug Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Bad TSS Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Segment Not Present Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Stack Fault Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('General Protection Fault.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Page Fault.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Unknown Interrupt Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Coprocessor Fault Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Alignment Check Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Machine Check Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('NMI Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Breakpoint Exception');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -28,12 +28,13 @@ implementation
|
||||
|
||||
procedure Main; interrupt; //IRQ0, called every 55ms
|
||||
begin
|
||||
//CLI;
|
||||
CLI;
|
||||
console.writestringln('helo1');
|
||||
if(procedure_ptr <> nil) then begin
|
||||
procedure_ptr();
|
||||
end;
|
||||
outb($20, $20);
|
||||
STI;
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
@ -28,12 +28,13 @@ implementation
|
||||
|
||||
procedure Main; interrupt; //IRQ1, Keyboard Interrupt
|
||||
begin
|
||||
//CLI;
|
||||
CLI;
|
||||
console.writestringln('helo2');
|
||||
if(procedure_ptr <> nil) then begin
|
||||
procedure_ptr(inb($60));
|
||||
end;
|
||||
outb($20, $20);
|
||||
STI;
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('IDO Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -28,12 +28,13 @@ implementation
|
||||
|
||||
procedure Main; interrupt; //IRQ0, called every 55ms
|
||||
begin
|
||||
//CLI;
|
||||
CLI;
|
||||
console.writestringln('helo3');
|
||||
if(procedure_ptr <> nil) then begin
|
||||
procedure_ptr();
|
||||
end;
|
||||
outb($20, $20);
|
||||
STI;
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('OOB Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,8 +23,8 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
console.writestringln('Invalid OPCode Exception.');
|
||||
|
||||
CLI;
|
||||
console.writestringln('Invalid OPCode Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('No Coprocessor Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Double Fault.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -23,6 +23,7 @@ implementation
|
||||
|
||||
procedure Main(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Coprocessor Seg Overrun Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
@ -44,6 +44,8 @@ begin
|
||||
isr.init();
|
||||
irq.init();
|
||||
|
||||
asm STI end;
|
||||
|
||||
asm
|
||||
MOV dds, CS
|
||||
end;
|
||||
|
@ -14,6 +14,7 @@ unit util;
|
||||
interface
|
||||
|
||||
procedure CLI();
|
||||
procedure STI();
|
||||
function hi(b : uint8) : uint8;
|
||||
function lo(b : uint8) : uint8;
|
||||
function switchendian(b : uint8) : uint8;
|
||||
@ -45,6 +46,11 @@ asm
|
||||
CLI
|
||||
end;
|
||||
|
||||
procedure STI(); assembler; nostackframe;
|
||||
asm
|
||||
STI
|
||||
end;
|
||||
|
||||
function switchendian(b : uint8) : uint8; [public, alias: 'util_switchendian'];
|
||||
begin
|
||||
switchendian:= (lo(b) SHL 4) OR hi(b);
|
||||
|
Loading…
x
Reference in New Issue
Block a user