File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ global _boot ; Defines entrypoint
66; Code section
77section .text:
88 _boot:
9- xor ax , ax
9+ xor ax , ax ; Clear Data and Extra segments
1010 mov ds , ax
1111 mov es , ax
1212
@@ -108,8 +108,8 @@ GDT_start:
108108
109109 [ bits 32 ]
110110 _enter_protected_mode:
111- mov ax , DATA_SEG
112- mov ds , ax
111+ mov ax , DATA_SEG ; Write data segment to ax
112+ mov ds , ax ; Distribute data segment to segments
113113 mov ss , ax
114114 mov es , ax
115115 mov fs , ax
Original file line number Diff line number Diff line change 33nasm -f bin -o build/boot.bin boot.asm
44nasm -f bin -o build/zeroes.bin bootloader/zeroes.asm
55nasm -f elf -o build/kernel_entry.o bootloader/kernel_entry.asm
6- i386-elf-gcc -ffreestanding -m32 -g -c kernel/kernel.cpp -o build/kernel.o
6+ i386-elf-gcc -ffreestanding -m32 -g -c kernel/kernel.c -o build/kernel.o
77
88i386-elf-ld -o build/full_kernel.bin -Ttext 0x1000 build/kernel_entry.o build/kernel.o --oformat binary
99
You can’t perform that action at this time.
0 commit comments