From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Using ASM with DJGPP Date: Sun, 27 Jul 1997 16:12:02 +0000 Organization: Two pounds of chaos and a pinch of salt Lines: 29 Message-ID: <33DB7352.68BB@cs.com> References: <01bc9a3f.97b88240$8453f7c7 AT humbug> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp106.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk James T'seleie wrote: > > I can't seem to figure out why a program that uses ASM won't compile with > DJGPP. The errorsI seem to be getting say "parse error before 'mov', and > nondigits in number and not hexadecimal" for the line that has "10h" in > it. > the following is the code 'm trying to compile: > > asm mov ah,0 > asm mov al,0x13 > asm int 10h You are using the wrong syntax. DJGPP uses the AT&T assembly format, which is structured somewhat differently from Intel and is slightly more powerful (IMO). The DJGPP Frequently Asked Questions list includes some information on inline assembly, and there's more information in the gas docs. But the best guide of all is Brennan's Guide to Inline Assembly, available from http://www.rt66.com/~brennan/djgpp/, which is designed to help people used to Intel syntax convert to AT&T. Good luck! -- --------------------------------------------------------------------- | John M. Aldrich | "Animals can be driven crazy by pla- | | aka Fighteer I | cing too many in too small a pen. | | mailto:fighteer AT cs DOT com | Homo sapiens is the only animal that | | http://www.cs.com/fighteer | voluntarily does this to himself." | ---------------------------------------------------------------------