delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/01/18:44:12

Sender: nate AT cartsys DOT com
Message-ID: <363CF03A.BACA062E@cartsys.com>
Date: Sun, 01 Nov 1998 15:35:22 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: asm
References: <363A8C7D DOT B79 AT teleport DOT com>
Reply-To: djgpp AT delorie DOT com

Aron Faegre wrote:
> 
> I was wondering why it gives the errors: parse error before 'int' and
> nondigits in number and not hexadecimal when I have the code: asm int
> 19h whereas with a different compiler it works fine

The inline assembly syntax in DJGPP is significantly different from most
other DOSish compilers.  See FAQ section 18.13.

Your example should probably look something like this:

asm("int $0x19");

The $ indicates an immediate operand, and it uses C-ish hex format. 
Many other things are different, though-- do read the FAQ!

Also, a tutorial may be found here:

http://www.rt66.com/~brennan/djgpp/djgpp_asm.html

HTH
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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