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.
jmp main
main:
mov ah, 0 ; Set new video mode
mov al, 10h ; Video mode = 10h (80x25 with 16 colors)
int 10h
mov si,Kernel_Load
call printstr
printstr:
mov ah,0Eh ; Set to video teletype mode
mov bh,00h ; Page Number
mov bl,0Eh ; Font colour
printnextchar:
lodsb
or al,al
jz return
int 10h
jmp printnextchar
return:
ret
Kernel_Load db 13,10,'Loading Kernel...',0
If you really are entering into graphics mode, you will need much, much more than only copying bytes to video memory and hope it actually shows up its proper ASCII representations, and neither just using BIOS functions since you'll have to abandon them soon if you plan to enter intro protected mode.
Also, it will be incredibly difficult for you to keep up with graphics mode your kernel development, unless you are really skilled at that.
Anyway, try to copy the data to B800:0000 or A000:0000 RAM video locations, maybe they show up something, at least so you know where is your display memory.
~ wrote:
Anyway, try to copy the data to B800:0000 or A000:0000 RAM video locations, maybe they show up something, at least so you know where is your display memory.
Mmm.. that is not very helpful.
What is needed is a font, from which you then draw (in case of bitmap fonts, copy) the characters to the graphics mode screen. As long as you are in a text mode the VGA compatible adapter does this for you, but when you enter graphics mode, it's your problem to deal with such things.
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
he is using the BIOS to do the text drawing for him. The idea is good, but i cant see from here why it does not work...
The difference with my own teletype function is that i'm reloading all of AX each iteration, so you can try that.
Some other things you might want to check are that BITS 16 is present, the ORG is set correctly and that the data registers are set to the appropriate values.
Also, some specification of hardware/VM could be helpful in diagnosing your problem.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]