What the hell is wrong with my os?
I have a problem: In my bootloader, i have a "mov ax, 0xB800
mov es, ax
mov byte [es:0], 'C'
mov byte [es:1], 0x07" block, and works with him in the code. But, if I delete him, the Kernel won't start, and idk for what. Can someone help me?
The full code is:
bits 16
org 0x7C00
jmp short code
nop
boot_drive db 0
code:
cli
xor ax, ax
mov ds, ax
mov es, ax
mov ss, ax
mov sp, 0x7C00
sti
mov [boot_drive], dl
mov ax, 0xB800
mov es, ax
mov byte [es:0], 'C'
mov byte [es:1], 0x07
xor ax, ax
mov ds, ax
mov si, dap
mov ah, 0x42
mov dl, [boot_drive]
int 0x13
jc .disk_error
jmp 0x0800:0x0000
.disk_error:
mov ax, 0xB800
mov es, ax
mov byte [es:0], 'K'
mov byte [es:1], 0x07
.idle:
cli
hlt
jmp .idle
dap:
db 0x10
db 0x00
dw 0x0005
dw 0x0000
dw 0x0800
dq 0x0000000000000001
times 510-($-$$) db 0
dw 0xAA55
Edit: I’m just going to leave that there and not touch it. Idk what's does, but, since it work, I never touch it again.