www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/26/16:32:20

From: eggbrains AT aol DOT com (Egg brains)
Newsgroups: comp.os.msdos.djgpp
Subject: [Q] using int 0x21 to print text with inline asm
Date: 25 Aug 1997 18:06:54 GMT
Lines: 27
Message-ID: <19970825180600.OAA29264@ladder02.news.aol.com>
NNTP-Posting-Host: ladder02.news.aol.com
Organization: AOL http://www.aol.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

i can't print text to the string using asm. it prints, but not the stuff i
want (just a bunch of garbled ascii characters with beeps and stuff.) 
here is the code i am/was using...

<-----start----->

char *myHappy;      /* i have also tried using a character */

void main()
{

myHappy = "Hello, world!";

asm("movw _myHappy, %dx");
asm("movb $9, %ah");
asm("int $0x21");       

}

<-----end----->

Thanx...
    Paul

P.S. is this because of the p-mode & passing data to the conventional
memory etc...?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019