Page 1 of 1

bootloader somehow switches into a weird text mode

Posted: Mon Jan 23, 2023 12:23 pm
by MESYETI
i made a bootloader and i made it boot into a hello world program, and it switches to some weird text mode
Image
i want it to be in the 80x25 text mode but even if i switch to it in the kernel code it does not change, this is the kernel code:

Code: Select all

bits 16
org 0x1000

jmp kernel

bootMsg:
	db "Welcome to NightlightOS", 0

kernel:
	; switch to text mode
	mov ah, 0x00
	mov al, 0x00
	int 0x10

	mov ah, 0x00
	mov al, 0x00
	int 0x10
	mov ah, 0x0E
	mov si, bootMsg
	.loop:
		lodsb
		cmp al, 0
		je $
		int 0x10
		jmp .loop
and this is the bootloader https://pastebin.com/SJEH7Y1v

Re: bootloader somehow switches into a weird text mode

Posted: Tue Jan 24, 2023 3:10 pm
by Octocontrabass

Code: Select all

	mov ah, 0x00
	mov al, 0x00
	int 0x10
You're selecting a 40x25 text mode, not 80x25.