0

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.

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by sDJh
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.