Trouble printing things through BIOS
Posted: Sat Dec 26, 2009 4:20 pm
I'm trying to make a simple bootloader and I'm not seeing how this code is failing...
It is supposed to print a 'H' on the screen but instead I just get weird characters.
I've look at my previous code that is working and sniffed over this code and I'm not seeing anything that would cause it do behave this way... Maybe someone here can point out my noobish error
Code: Select all
section .text
[org 7C00]
;jmp 0x0:start ;incase there is some weird BIOSes out there... (can be removed when short on space)
start:
mov bx,start ;for self modifying code references.
mov ax,0
mov ds,ax
mov es,ax
mov ss,ax
mov ah,0x70
mov sp,ax ;0x7000
mov ax,0x0003
int 0x10 ;set video mode to 3, 80x25x16(colors) (8x8 text)
mov ah,0x0E
mov al,[str_hello]
int 0x10
;mov si,str_hello
;call _PrintString
nop
cli
hlt
str_hello:
db "Hello there!!",0
I've look at my previous code that is working and sniffed over this code and I'm not seeing anything that would cause it do behave this way... Maybe someone here can point out my noobish error