Bona Fide OS Developer
View unanswered posts | View active topics It is currently Mon Aug 03, 2020 12:52 pm

Post new topic Reply to topic  [ 2 posts ] 
 Hello world, need some help 
Author Message

Joined: Sat Jan 16, 2010 11:38 am
Posts: 2
Post 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.

Sat Jan 16, 2010 11:46 am
Post Re: Hello world, need some help
  or si,si
  jz exitf

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

should be fine.

Thu Feb 04, 2010 9:47 pm
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin and tweaked by the BF Team.