forked from PoliEcho-holding-org/kern
- 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)
23 lines
318 B
NASM
23 lines
318 B
NASM
[bits 32]
|
|
[global _start]
|
|
[global driveNum]
|
|
|
|
[extern main]
|
|
|
|
;; Calls the main function in 'main.c'
|
|
_start:
|
|
pop ax
|
|
mov [driveNum], al
|
|
|
|
call main
|
|
|
|
; Exit QEMU
|
|
mov ax, 0x2000
|
|
mov dx, 0x0604
|
|
out dx, ax
|
|
|
|
jmp $ ;; If we used cli, hlt we wouldn't have interrupts :/
|
|
|
|
driveNum: db 0
|
|
|