Hello again. This just gets more confusing...
I set the video mode to 80x25 in my boot sector. Additionaly, to make sure it wasn't the vidio hardware, I created a boot cd of the "brans tutorial kernel" that worked fine. it uses the same "pointer to video memory" method of printing to the screen.
whats even stranger is that my screen clearing code seems to work:
Code: Select all
cls:
pusha
mov ebx, 0b8000h
mov ecx, 2000 ;80*25, the dimensions of the screen
clear_loop:
mov byte [ds:ebx], 0 ;null character
inc ebx
mov byte [ds:ebx], 03bh ;blue (01h) on white (0fh)
inc ebx
loop clear_loop
mov word [cursor_pos], 0 ; set cursor to top left corner.
call update_cursor
popa
ret
scince changing the attribute witten to video memory changes the colour on the screen but I still don't see why my character output code doesn't work; considering it uses the same method a cls.
I think today i'm just going to load my code with debuging statements like:
and hope that with 80x25 mode set by my boot sector they work.
EDIT:
i think i want to cry :'(
i've pused the system just after it jumps to my boot sector. so i can read what the bios boot message is. its just general abuot emmulating 1.44 meg floppy.
when i press a key my code continuse to execute and it switches to 80x25 mode using int 10h (still in real mode).
but then the screen goes aqua blue with a cursor in the corner and i cant see any of my boot messages which are writen directly into video memory as shown above. Do you think i should give up using my own boot loader and use GRUB inted? bran's tutorial kernel uses GRUB and that works fine.
I'm just not sure what to do. i might stom using asm and go back to c. try following some of the tutorials on osdever to retore my self confidence.
please. if you've got any ideas whats going on and if i should try GRUB please reply.
Thankyou
Ed Tait