mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-04 02:23:10 +00:00
[ BIG CHANGE ] Properly Implemented IDT
- New include files: idt.h, pic.h, syscall.h and exceptions.h - Proper exception handling (still could be improved - PIC properly initiated and irqs all masked - BREAKS Keyboard - The keyboard IRQ is not handled anymore - convertColor() is kinda broken :/ (More in README.md)
This commit is contained in:
+3
-12
@@ -24,18 +24,9 @@ void outw(uint16_t port, uint16_t data) {
|
||||
asm volatile("outw %0, %1" :: "a"(data), "Nd"(port));
|
||||
}
|
||||
|
||||
|
||||
// Assembly stuff
|
||||
void cli() {
|
||||
asm volatile("cli");
|
||||
}
|
||||
|
||||
void sti() {
|
||||
asm volatile("sti");
|
||||
}
|
||||
|
||||
void hlt() {
|
||||
asm volatile("hlt");
|
||||
void ioWait() {
|
||||
// Waits ~1 I/O Cycle (Linux uses this so it should be good)
|
||||
asm volatile("outb %%al, $0x80" : : "a"(0));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user