Bona Fide OS Development

Hello world, need some help
Page 1 of 1

Author:  Payn3 [ Sat Jan 16, 2010 11:46 am ]
Post subject:  Hello world, need some help

Hi, i'm new in this of OS Dev and I need some help with my bootloader.

[BITS 16]
[ORG 0x7C00]

mov si,msg
call printf
jmp $

  mov ah,0x0E ;bios function to write a char on the screen
  mov bh,0x00 ;page number,0
  mov bl,0x07 ;white text on black background
  mov al,[si] ;writing the char from the si register
  int 0x10 ; calling video

  or si,si
  jz exitf
  call putc
  inc si
  jmp nextc

;Data here
msg db "Hello World",10,0

times 510-($-$$) db 0   ; Fill the rest with zeros
dw 0xAA55      ; Boot loader signature

The problem is that the bootloader writes something(that i can't see) and next what I see is the cursor in the lower right corner.

Author:  smeezekitty [ Thu Feb 04, 2010 9:47 pm ]
Post subject:  Re: Hello world, need some help

  or si,si
  jz exitf

no good
mov dh,[si]
test dh,dh
jz exitf

should be fine.

Page 1 of 1 All times are UTC - 6 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group