Make basic kernel
This commit is contained in:
parent
37e7a5d80b
commit
af0fdb77e3
2 changed files with 29 additions and 0 deletions
24
kernel/entry.asm
Normal file
24
kernel/entry.asm
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[BITS 32]
|
||||||
|
|
||||||
|
;Define extern symbole
|
||||||
|
extern main
|
||||||
|
|
||||||
|
;Define global symbole
|
||||||
|
global _start
|
||||||
|
|
||||||
|
;Define kernel entry point
|
||||||
|
_start:
|
||||||
|
jmp begin ;Go to begin and run main kernel function
|
||||||
|
|
||||||
|
|
||||||
|
;----- Multiboot Specification Header -----
|
||||||
|
align 4 ;Align data for 32 bits
|
||||||
|
dd 0x1BADB002
|
||||||
|
dd 0x0
|
||||||
|
dd 0x1BADB002
|
||||||
|
;----- End -----
|
||||||
|
|
||||||
|
|
||||||
|
begin:
|
||||||
|
call main ;Run main function
|
||||||
|
|
5
kernel/main.c
Normal file
5
kernel/main.c
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
void main(){
|
||||||
|
|
||||||
|
while(1);
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue