1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00

some stuff

This commit is contained in:
Adrien Bourmault 2019-03-05 00:15:08 +01:00
parent a24008e617
commit 991b34eea3

View File

@ -31,6 +31,7 @@
%include "boot/loader/multiboot.inc"
;; Normal entry point, but a little bit unused since we never use it because...
_start:
mov ax, cs ; correcting cs after the horrible far jump
mov ds, ax ; hm... And ds too
@ -39,6 +40,7 @@ _start:
xor dl, dl
jmp 0x0000:main ; pas sûr
;; Magnificent multiboot header for GRUB ------------------------------------ ;;
MB_header:
align 4
dd MB_HEADER_MAGIC
@ -50,6 +52,7 @@ MB_header:
dd 00 ; (bss) not necessary
dd MB_start ; entry address GRUB will start at
;; Multiboot entry point for Grub ------------------------------------------- ;;
MB_start:
mov esp, KERNEL_STACK ; Setup the stack
push 0 ; Reset EFLAGS
@ -57,16 +60,17 @@ MB_start:
push eax ; 2nd argument is magic number
push ebx ; 1st argument multiboot info pointer
call main
add esp, 8 ; Cleanup 8 bytes pushed as arguments
jmp Die
add esp, 8 ; Cleanup arguments "A la MIPS"
jmp Die ; Aufwiedersehen
;; BEGIN OF THE HOLE -------------------------------------------------------- ;;
;; THE HOLE ----------------------------------------------------------------- ;;
Die:
cli
hlt ; die nooooow
;jmp 0xF000:0xFFF0
jmp $
;; END OF THE HOLE ---------------------------------------------------------- ;;
;; THE CODE ------------------------------------------------------------------;;
main:
jmp Die