basic os stuff
This commit is contained in:
28
entry.asm
Normal file
28
entry.asm
Normal file
@@ -0,0 +1,28 @@
|
||||
[BITS 16]
|
||||
|
||||
|
||||
|
||||
extern _kmain
|
||||
|
||||
global kernel_entry
|
||||
global _small_code_ ; Watcom small model expects this
|
||||
|
||||
segment _TEXT class=CODE
|
||||
|
||||
_small_code_: ; Must be at start of CODE segment
|
||||
kernel_entry:
|
||||
cli
|
||||
mov ax, 0x1000
|
||||
mov ds, ax
|
||||
mov es, ax
|
||||
mov ss, ax
|
||||
mov sp, 0x7000 ; Just use a fixed address for stack
|
||||
xor bp, bp
|
||||
sti
|
||||
call _kmain
|
||||
.halt:
|
||||
cli
|
||||
hlt
|
||||
jmp .halt
|
||||
segment _BSS class=BSS
|
||||
resb 4096
|
||||
Reference in New Issue
Block a user