Page 1 of 1

Gnu as problem

Posted: Sun Feb 02, 2003 8:04 am
by Ray So.
Can anyone figure out why the following code doesn't print the letter 's' at the screen? I'm using GNU as to compile it, I raw write the output of ld at the floppy, magic numbers are ok etc. The problem seems to be at the instruction movb (%bp), %al, as it doesn' t put the ascii of 's' at %al. What have I understood wrong? Thank you in advance.


.code16
.text

leaw msg1, %bp
movb $0x0e, %ah
movb (%bp), %al
int 0x10

msg1: .ascii "sample"

Re:Gnu as problem

Posted: Sun Feb 02, 2003 10:26 am
by drizzt
try:

leaw msg1, %bp
movb $0x0e, %ah
movb (%bp), %al
movw $0x0007, %bx ; set current active page 0, attribute 7.
int 0x10

Re:Gnu as problem

Posted: Mon Feb 03, 2003 1:01 am
by Pype.Clicker
possibly missing an affectation to %ds ...