delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/02/18/11:29:53

From: Sopola <furnata AT prodigy DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Newbie Question
Date: Sun, 18 Feb 2001 10:52:24 -0500
Organization: Prodigy http://www.prodigy.com
Lines: 29
Message-ID: <3A8FEFB7.C2603B36@prodigy.net>
NNTP-Posting-Host: a010-0044.knvl.splitrock.net
Mime-Version: 1.0
X-Trace: newssvr05-en0.news.prodigy.com 982511591 5861669 209.255.8.44 (18 Feb 2001 15:53:11 GMT)
X-Complaints-To: abuse AT prodigy DOT net
NNTP-Posting-Date: 18 Feb 2001 15:53:11 GMT
X-Accept-Language: en
X-Mailer: Mozilla 4.76 [en] (Win98; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello Group,
I hope you can help me. I have a question about inline assembly. I
usually use VC++, where you use it like this:
__asm {
    /* your code here*/
}
but I need it compiled under DJGPP.

When I do this

__asm {
mov ah, 00h
mov al, 02h
int 10h
}

I get     "parse error before {"    and     "nondigits in number and not
hexadecimal".
If I do it like this:
__asm ("mov ah, 00h");
__asm ("mov al, 02h");
__asm ("int 10h");

I get "error: too many memory references for mov".
Can someone help me? How do I use inline assembly? What I need is real
simple, a couple of instructions at most.
Thanks a lot,
George

- Raw text -


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