update v2
This commit is contained in:
27
kernel/src/boot.s
Normal file
27
kernel/src/boot.s
Normal file
@ -0,0 +1,27 @@
|
||||
# Multiboot header
|
||||
.section .multiboot
|
||||
.align 8
|
||||
multiboot_header:
|
||||
.long 0x1BADB002 # magic
|
||||
.long 0x00 # flags
|
||||
.long -(0x1BADB002 + 0x00) # checksum
|
||||
|
||||
# Entry point
|
||||
.section .text
|
||||
.global _start
|
||||
.code64
|
||||
_start:
|
||||
# Disable interrupts
|
||||
cli
|
||||
|
||||
# Load null descriptor into data segment registers
|
||||
xor %ax, %ax
|
||||
mov %ax, %ds
|
||||
mov %ax, %es
|
||||
mov %ax, %ss
|
||||
mov %ax, %fs
|
||||
mov %ax, %gs
|
||||
|
||||
# Halt
|
||||
hlt
|
||||
1: jmp 1b
|
Reference in New Issue
Block a user