2024-03-26 07:39:40 +00:00
|
|
|
;; File: kernel.asm
|
|
|
|
include 'const.inc'
|
2024-03-20 15:51:27 +00:00
|
|
|
|
2024-03-26 07:39:40 +00:00
|
|
|
org KBASE
|
|
|
|
use32
|
2024-03-20 15:51:27 +00:00
|
|
|
|
2024-05-28 04:54:10 +00:00
|
|
|
jmp short kmain
|
|
|
|
|
|
|
|
db 'STPDKRNL'
|
|
|
|
db 32 dup(0)
|
2024-03-20 15:51:27 +00:00
|
|
|
|
2024-05-02 11:34:27 +00:00
|
|
|
include 'klog.inc'
|
2024-03-26 07:39:40 +00:00
|
|
|
include 'mm/mm.inc'
|
2024-03-20 15:51:27 +00:00
|
|
|
|
2024-04-28 06:41:36 +00:00
|
|
|
;; Function: kmain
|
|
|
|
;;
|
|
|
|
;; Parameters:
|
|
|
|
;;
|
|
|
|
;; EAX - Boot Magic
|
|
|
|
;; EBX - Boot structure address
|
|
|
|
;;
|
2024-03-20 15:51:27 +00:00
|
|
|
kmain:
|
2024-04-28 06:41:36 +00:00
|
|
|
; TODO: interupt, vmm
|
2024-05-02 11:34:27 +00:00
|
|
|
cmp eax, STPDBOOT_MAGIC
|
|
|
|
jne .halt
|
|
|
|
|
|
|
|
KLOG_INIT
|
|
|
|
|
|
|
|
KLOG "kernel alive"
|
|
|
|
|
|
|
|
.halt:
|
|
|
|
hlt
|
|
|
|
jmp $
|
2024-03-20 15:51:27 +00:00
|
|
|
|
|
|
|
_edata:
|
|
|
|
|
|
|
|
; BSS
|
|
|
|
rb 0x4000
|
|
|
|
|
|
|
|
_end:
|