ISR0 added

git-svn-id: https://spexeah.com:8443/svn/Asuro@39 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
kieron 2017-05-17 11:59:47 +00:00
parent 4eb5012a8d
commit cbb1ec6f88
19 changed files with 16 additions and 24 deletions

BIN
Asuro.iso

Binary file not shown.

Binary file not shown.

View File

@ -24,11 +24,11 @@ if [ "$1" = "-d" ]
then then
echo "Compiling Debug FPC Sources..." echo "Compiling Debug FPC Sources..."
echo " " 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 else
echo "Compiling FPC Sources..." echo "Compiling FPC Sources..."
echo " " 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 fi
if [ $? -ne 0 ] if [ $? -ne 0 ]

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -5,6 +5,12 @@ interface
uses uses
util; util;
const
ISR_RING_0 = $8E;
ISR_RING_1 = $AE;
ISR_RING_2 = $CE;
ISR_RING_3 = $EE;
type type
TIDT_Entry = bitpacked record TIDT_Entry = bitpacked record
base_low : uint16; base_low : uint16;

View File

@ -3,29 +3,15 @@ unit isr;
interface interface
uses uses
idt, ISR0;
console,
util;
procedure init(); procedure init();
implementation 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(); procedure init();
begin begin
idt.set_gate(0, uint32(@isr0), $08, ISR_RING_0); ISR0.register();
end; end;
end. end.

View File

@ -2,12 +2,6 @@ unit system;
interface interface
const
ISR_RING_0 = $8E;
ISR_RING_1 = $AE;
ISR_RING_2 = $CE;
ISR_RING_3 = $EE;
type type
//internal types //internal types
cardinal = 0..$FFFFFFFF; cardinal = 0..$FFFFFFFF;

View File

@ -4,6 +4,7 @@ unit util;
interface interface
procedure CLI();
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;
@ -28,6 +29,11 @@ begin
lo:= b AND $0F; lo:= b AND $0F;
end; end;
procedure CLI(); assembler; nostackframe;
asm
CLI
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);