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 422,408 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 4,922 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: Programming Forums
Views: 680 | Replies: 1
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

Boot Loader using Assembly Language

  #1  
Jun 18th, 2008
Hi,

I have been trying to write a simple Hello World boot loader using assembly language.
I tried my first program to print a character 'A' on the screen by writing to the VDU memory. The code is as shouwn below :

entry start
start:
mov ax,#0xb800
mov es,ax
seg es
mov [0],#0x41
seg es
mov [1],#0x1f
loop1: jmp loop1

reference : http://linuxgazette.net/issue77/krishnakumar.html

It worked fine.

But when i tried the below code using bios interrupt, It is not displaying the string but the ascii representation only.

entry start
start:
mov ah,#0x03
xor bh,bh
int 0x10

mov cx,#26
mov bx,#0x0007
mov bp,#mymsg
mov ax,#0x1301
int 0x10

loop1: jmp loop1

mymsg:
.byte 13,10
.ascii "Hello World"


reference : http://linuxgazette.net/issue79/krishnakumar.html

Could anyone please help in finding out how to display a string just as it is.

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

Re: Boot Loader using Assembly Language

  #2  
Jun 27th, 2008
Very simple reason: When you use mov bp,#mymsg you load the pointer to that string into bp. Use MOV BP,[#mymsg] instead. For the looping see PM.
Reply With Quote  
Reply

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

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

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Assembly Forum

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