User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 397,337 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,905 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser:
Views: 693 | Replies: 2
Reply
Join Date: Jun 2008
Location: India
Posts: 4
Reputation: citizenjawahar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
citizenjawahar citizenjawahar is offline Offline
Newbie Poster

Writing BootLoader

  #1  
Jun 24th, 2008
Hi,
Could someone please share your idea on how to write a simple Hello World Boot Loader. I have been using OpenSuse Linux and and x86. I was able to write a single letter using the corresponding Ascii key. What about a string?

Thanks,
Citizen.
Citizen
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: Cologne, Germany
Posts: 104
Reputation: sDJh is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 8
sDJh sDJh is offline Offline
Junior Poster

Re: Writing BootLoader

  #2  
Jun 26th, 2008
Did you already write your bootloader? If yes, than most work is already done. You just place all the following stuff at the end of the loader, load that stuff into mem and execute it by setting CS to that point.

Displaying a string is the same as displaying a single char just in a loop. If you use C-strings with 0-termination the you loop through the string until a 0 occurs. Eg

mystring DB 'Hello world!',0
XOR BX,BX
print:
MOV AL,[mystring+BX]
JZ end
;output AL (don't know the code itm)
LOOP print
end:
Reply With Quote  
Join Date: Jun 2008
Location: India
Posts: 4
Reputation: citizenjawahar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
citizenjawahar citizenjawahar is offline Offline
Newbie Poster

Re: Writing BootLoader

  #3  
Jun 27th, 2008
thanks a lot for your reply and code snippet. I have a doubt here. the processor understands hexadecimal value and displays the corresponding ascii values. for eg. when use #0x41 as the value it will displays character 'A' (well, this is what I tried). How would the processor understands a string. When I tried a code similar to yours it only displayed some ascii characters. the code i tried is in http://linuxgazette.net/issue79/krishnakumar.html. Please let me know regarding this. I am getting really interested in OS and boot loader concepts, but only getting minimal guidance in this area.

Thanks a lot.
Citizen
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Assembly Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Assembly Forum

All times are GMT -4. The time now is 8:55 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC