Gnu as problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Ray So.

Gnu as problem

Post 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"
drizzt

Re:Gnu as problem

Post by drizzt »

try:

leaw msg1, %bp
movb $0x0e, %ah
movb (%bp), %al
movw $0x0007, %bx ; set current active page 0, attribute 7.
int 0x10
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Gnu as problem

Post by Pype.Clicker »

possibly missing an affectation to %ds ...
Post Reply