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,
|
util,
|
||||||
bios_data_area;
|
bios_data_area;
|
||||||
|
|
||||||
|
const DEBUG = FALSE;
|
||||||
|
|
||||||
type
|
type
|
||||||
TColor = ( Black = $0,
|
TColor = ( Black = $0,
|
||||||
Blue = $1,
|
Blue = $1,
|
||||||
@ -371,7 +373,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
Console_Cursor.X:= 0;
|
Console_Cursor.X:= 0;
|
||||||
console._update_cursor;
|
console._update_cursor;
|
||||||
psleep(500);
|
if DEBUG then psleep(500);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure _newline(); [public, alias: '_console_newline'];
|
procedure _newline(); [public, alias: '_console_newline'];
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Divide by Zero Exception.');
|
console.writestringln('Divide by Zero Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Debug Exception.');
|
console.writestringln('Debug Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Bad TSS Exception.');
|
console.writestringln('Bad TSS Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Segment Not Present Exception.');
|
console.writestringln('Segment Not Present Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Stack Fault Exception.');
|
console.writestringln('Stack Fault Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('General Protection Fault.');
|
console.writestringln('General Protection Fault.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Page Fault.');
|
console.writestringln('Page Fault.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Unknown Interrupt Exception.');
|
console.writestringln('Unknown Interrupt Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Coprocessor Fault Exception.');
|
console.writestringln('Coprocessor Fault Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Alignment Check Exception.');
|
console.writestringln('Alignment Check Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Machine Check Exception.');
|
console.writestringln('Machine Check Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('NMI Exception.');
|
console.writestringln('NMI Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Breakpoint Exception');
|
console.writestringln('Breakpoint Exception');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -28,12 +28,13 @@ implementation
|
|||||||
|
|
||||||
procedure Main; interrupt; //IRQ0, called every 55ms
|
procedure Main; interrupt; //IRQ0, called every 55ms
|
||||||
begin
|
begin
|
||||||
//CLI;
|
CLI;
|
||||||
console.writestringln('helo1');
|
console.writestringln('helo1');
|
||||||
if(procedure_ptr <> nil) then begin
|
if(procedure_ptr <> nil) then begin
|
||||||
procedure_ptr();
|
procedure_ptr();
|
||||||
end;
|
end;
|
||||||
outb($20, $20);
|
outb($20, $20);
|
||||||
|
STI;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure register();
|
procedure register();
|
||||||
|
@ -28,12 +28,13 @@ implementation
|
|||||||
|
|
||||||
procedure Main; interrupt; //IRQ1, Keyboard Interrupt
|
procedure Main; interrupt; //IRQ1, Keyboard Interrupt
|
||||||
begin
|
begin
|
||||||
//CLI;
|
CLI;
|
||||||
console.writestringln('helo2');
|
console.writestringln('helo2');
|
||||||
if(procedure_ptr <> nil) then begin
|
if(procedure_ptr <> nil) then begin
|
||||||
procedure_ptr(inb($60));
|
procedure_ptr(inb($60));
|
||||||
end;
|
end;
|
||||||
outb($20, $20);
|
outb($20, $20);
|
||||||
|
STI;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure register();
|
procedure register();
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('IDO Exception.');
|
console.writestringln('IDO Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -28,12 +28,13 @@ implementation
|
|||||||
|
|
||||||
procedure Main; interrupt; //IRQ0, called every 55ms
|
procedure Main; interrupt; //IRQ0, called every 55ms
|
||||||
begin
|
begin
|
||||||
//CLI;
|
CLI;
|
||||||
console.writestringln('helo3');
|
console.writestringln('helo3');
|
||||||
if(procedure_ptr <> nil) then begin
|
if(procedure_ptr <> nil) then begin
|
||||||
procedure_ptr();
|
procedure_ptr();
|
||||||
end;
|
end;
|
||||||
outb($20, $20);
|
outb($20, $20);
|
||||||
|
STI;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure register();
|
procedure register();
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('OOB Exception.');
|
console.writestringln('OOB Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,8 +23,8 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Invalid OPCode Exception.');
|
console.writestringln('Invalid OPCode Exception.');
|
||||||
|
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('No Coprocessor Exception.');
|
console.writestringln('No Coprocessor Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Double Fault.');
|
console.writestringln('Double Fault.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -23,6 +23,7 @@ implementation
|
|||||||
|
|
||||||
procedure Main(); interrupt;
|
procedure Main(); interrupt;
|
||||||
begin
|
begin
|
||||||
|
CLI;
|
||||||
console.writestringln('Coprocessor Seg Overrun Exception.');
|
console.writestringln('Coprocessor Seg Overrun Exception.');
|
||||||
util.halt_and_catch_fire;
|
util.halt_and_catch_fire;
|
||||||
end;
|
end;
|
||||||
|
@ -44,6 +44,8 @@ begin
|
|||||||
isr.init();
|
isr.init();
|
||||||
irq.init();
|
irq.init();
|
||||||
|
|
||||||
|
asm STI end;
|
||||||
|
|
||||||
asm
|
asm
|
||||||
MOV dds, CS
|
MOV dds, CS
|
||||||
end;
|
end;
|
||||||
|
@ -14,6 +14,7 @@ unit util;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
procedure CLI();
|
procedure CLI();
|
||||||
|
procedure STI();
|
||||||
function hi(b : uint8) : uint8;
|
function hi(b : uint8) : uint8;
|
||||||
function lo(b : uint8) : uint8;
|
function lo(b : uint8) : uint8;
|
||||||
function switchendian(b : uint8) : uint8;
|
function switchendian(b : uint8) : uint8;
|
||||||
@ -45,6 +46,11 @@ asm
|
|||||||
CLI
|
CLI
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure STI(); assembler; nostackframe;
|
||||||
|
asm
|
||||||
|
STI
|
||||||
|
end;
|
||||||
|
|
||||||
function switchendian(b : uint8) : uint8; [public, alias: 'util_switchendian'];
|
function switchendian(b : uint8) : uint8; [public, alias: 'util_switchendian'];
|
||||||
begin
|
begin
|
||||||
switchendian:= (lo(b) SHL 4) OR hi(b);
|
switchendian:= (lo(b) SHL 4) OR hi(b);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user