2023-06-29 04:09:31 +00:00
|
|
|
; File: kernel.s
|
2023-01-15 19:25:25 +00:00
|
|
|
[BITS 32]
|
|
|
|
|
2023-07-02 14:47:18 +00:00
|
|
|
%include "machdep.inc"
|
|
|
|
|
|
|
|
section .bss
|
|
|
|
align 16
|
|
|
|
stack_bottom:
|
|
|
|
resb 16384
|
|
|
|
global stack_top
|
|
|
|
stack_top:
|
|
|
|
|
|
|
|
section .text
|
2023-06-29 04:09:31 +00:00
|
|
|
; Function: kmain
|
2023-07-02 14:47:18 +00:00
|
|
|
global kmain
|
2023-06-29 04:09:31 +00:00
|
|
|
kmain:
|
|
|
|
push ebp
|
|
|
|
mov ebp, esp
|
|
|
|
|
|
|
|
leave
|
|
|
|
ret
|
2023-07-02 14:47:18 +00:00
|
|
|
|
|
|
|
section .data
|
|
|
|
global machdep
|
|
|
|
machdep:
|
|
|
|
istruc machinfo
|
|
|
|
at machinfo.has_cpuid, db 0
|
|
|
|
at machinfo.has_pse, db 0
|
|
|
|
at machinfo.has_pae, db 0
|
|
|
|
iend
|