diff --git a/Asuro.iso b/Asuro.iso index 649c1a18..751d4f23 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index c56c4ebb..f3cf599f 100755 Binary files a/bin/kernel.bin and b/bin/kernel.bin differ diff --git a/compile.sh b/compile.sh index 15e696ee..c15a46df 100755 --- a/compile.sh +++ b/compile.sh @@ -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 ] diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index c56c4ebb..f3cf599f 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/console.ppu b/lib/console.ppu index 44a928b1..5e34d1c5 100644 Binary files a/lib/console.ppu and b/lib/console.ppu differ diff --git a/lib/idt.ppu b/lib/idt.ppu index 472cef73..c8e6b38e 100644 Binary files a/lib/idt.ppu and b/lib/idt.ppu differ diff --git a/lib/isr.ppu b/lib/isr.ppu index cf256f06..ca766455 100644 Binary files a/lib/isr.ppu and b/lib/isr.ppu differ diff --git a/lib/kernel.ppu b/lib/kernel.ppu index 5eef0893..2424aafc 100644 Binary files a/lib/kernel.ppu and b/lib/kernel.ppu differ diff --git a/lib/keyboard.ppu b/lib/keyboard.ppu index 84710943..ffb363c5 100644 Binary files a/lib/keyboard.ppu and b/lib/keyboard.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index 65d76276..5231f90e 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpkernel.a b/lib/libpkernel.a index 1d66c48c..98153d65 100644 Binary files a/lib/libpkernel.a and b/lib/libpkernel.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index 8f550519..82608108 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index 0b8389f5..9ab77527 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/system.ppu b/lib/system.ppu index 09358fca..43edd0ff 100644 Binary files a/lib/system.ppu and b/lib/system.ppu differ diff --git a/lib/util.ppu b/lib/util.ppu index 9cc785e9..d41acf8d 100644 Binary files a/lib/util.ppu and b/lib/util.ppu differ diff --git a/src/idt.pas b/src/idt.pas index 38ba916b..c09efc14 100644 --- a/src/idt.pas +++ b/src/idt.pas @@ -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; diff --git a/src/isr.pas b/src/isr.pas index 71af0a99..37a219bd 100644 --- a/src/isr.pas +++ b/src/isr.pas @@ -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. \ No newline at end of file diff --git a/src/system.pas b/src/system.pas index 2b77946b..f29fd1fa 100644 --- a/src/system.pas +++ b/src/system.pas @@ -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; diff --git a/src/util.pas b/src/util.pas index ce3eda55..e262944f 100644 --- a/src/util.pas +++ b/src/util.pas @@ -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);