ISR0 added
git-svn-id: https://spexeah.com:8443/svn/Asuro@39 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
Binary file not shown.
+2
-2
@@ -24,11 +24,11 @@ if [ "$1" = "-d" ]
|
||||
then
|
||||
echo "Compiling Debug FPC Sources..."
|
||||
echo " "
|
||||
fpc -Aelf -gw -n -va -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Pi386 -Tlinux -FElib/ src/kernel.pas
|
||||
fpc -Aelf -gw -n -va -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* src/kernel.pas
|
||||
else
|
||||
echo "Compiling FPC Sources..."
|
||||
echo " "
|
||||
fpc -Aelf -gw -n -va -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Pi386 -Tlinux -FElib/ src/kernel.pas
|
||||
fpc -Aelf -gw -n -va -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Pi386 -Tlinux -FElib/ -Fusrc/* src/kernel.pas
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
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.
Binary file not shown.
Binary file not shown.
@@ -5,6 +5,12 @@ interface
|
||||
uses
|
||||
util;
|
||||
|
||||
const
|
||||
ISR_RING_0 = $8E;
|
||||
ISR_RING_1 = $AE;
|
||||
ISR_RING_2 = $CE;
|
||||
ISR_RING_3 = $EE;
|
||||
|
||||
type
|
||||
TIDT_Entry = bitpacked record
|
||||
base_low : uint16;
|
||||
|
||||
+2
-16
@@ -3,29 +3,15 @@ unit isr;
|
||||
interface
|
||||
|
||||
uses
|
||||
idt,
|
||||
console,
|
||||
util;
|
||||
ISR0;
|
||||
|
||||
procedure init();
|
||||
|
||||
implementation
|
||||
|
||||
procedure CLI(); assembler; nostackframe;
|
||||
asm
|
||||
CLI
|
||||
end;
|
||||
|
||||
procedure isr0(); interrupt;
|
||||
begin
|
||||
CLI;
|
||||
console.writestringln('Divide by Zero Exception.');
|
||||
util.halt_and_catch_fire;
|
||||
end;
|
||||
|
||||
procedure init();
|
||||
begin
|
||||
idt.set_gate(0, uint32(@isr0), $08, ISR_RING_0);
|
||||
ISR0.register();
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -2,12 +2,6 @@ unit system;
|
||||
|
||||
interface
|
||||
|
||||
const
|
||||
ISR_RING_0 = $8E;
|
||||
ISR_RING_1 = $AE;
|
||||
ISR_RING_2 = $CE;
|
||||
ISR_RING_3 = $EE;
|
||||
|
||||
type
|
||||
//internal types
|
||||
cardinal = 0..$FFFFFFFF;
|
||||
|
||||
@@ -4,6 +4,7 @@ unit util;
|
||||
|
||||
interface
|
||||
|
||||
procedure CLI();
|
||||
function hi(b : uint8) : uint8;
|
||||
function lo(b : uint8) : uint8;
|
||||
function switchendian(b : uint8) : uint8;
|
||||
@@ -28,6 +29,11 @@ begin
|
||||
lo:= b AND $0F;
|
||||
end;
|
||||
|
||||
procedure CLI(); assembler; nostackframe;
|
||||
asm
|
||||
CLI
|
||||
end;
|
||||
|
||||
function switchendian(b : uint8) : uint8; [public, alias: 'util_switchendian'];
|
||||
begin
|
||||
switchendian:= (lo(b) SHL 4) OR hi(b);
|
||||
|
||||
Reference in New Issue
Block a user