Date: Tue, 7 Mar 2000 05:35:33 +0600 (LKT) From: Kalum Somaratna aka Grendel X-Sender: root AT darkstar DOT grendel DOT net To: "Martin F. Johansen" cc: djgpp AT delorie DOT com Subject: Re: Inline asm In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 6 Mar 2000, Martin F. Johansen wrote: > Does Inline asm work in djgpp? I tried: > > asm MOV AX,0013h > asm INT 10h > > asm{ > MOV AX,0003h > INT 10h > } > > The only thing i got was an error message: > > Error: parse error before `MOV' This is because gcc accepts a different syntax rather than the Intel syntax you are used to, which is called the AT/T syntax. There is a very good tutorial about inline assembly written by Brennan Underwood on DJ's server . I forget the URL but you can easily get it by visiting and then using the search facility to search for "Brenan Underwood". IMHO this tutorial is really good and helps to make the transition from intel assembly to AT/T much more easier than the pain in the rear end that it sometimes could be. Another good way of learning is to have a look at already written code that implements inline assembly, the allegro library has a lot of C source with inline assembly. HTH, Grendel Hi, I'm a signature virus. plz set me as your signature and help me spread :)