bootloader somehow switches into a weird text mode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
MESYETI
Posts: 1
Joined: Wed Jan 19, 2022 1:41 pm

bootloader somehow switches into a weird text mode

Post 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
Octocontrabass
Member
Member
Posts: 5562
Joined: Mon Mar 25, 2013 7:01 pm

Re: bootloader somehow switches into a weird text mode

Post by Octocontrabass »

Code: Select all

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