Message-Id: <199910101523.JAA12673@lakdiva.slt.lk> From: "Kalum Somaratna" To: djgpp AT delorie DOT com Date: Sun, 10 Oct 1999 09:23:28 +0600 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Assembler In-reply-to: <000501bf1289$b2f0ac80$74ccd3c8@computer> X-mailer: Pegasus Mail for Win32 (v3.12) Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 9 Oct 99, at 16:08, Laurence Patrick wrote: > Hi, I'm learning C and I'm using djgpp to compile my programs. I was > reading a book and I copy a program that was in there but when I tried to > compile there was an error : > > In function 'ipb': > Error: parse error before 'mov' > > here is the function where the error happened > > ipb(int i) > { > asm mov dx,i /* <--- The rhide pointer the error to this line */ > asm in ax,dx > } > > > I compiled the program in other compiler and it worked. I would > like to know if someone could help me to compile this program in the rhide > (djgpp). > > Thanks, > Sean Nicholas Dear Sean, In DJGPP you have to use the AT&T syntax for assembly wich is a bit hard for newcomers to learn. The FAQ has more details wich would be very useful for you in Section 17.1. If you want to use the Intel syntax (the normal one you are used to ) you can use NASM as your assembler. you can get it at < ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/ > or the home page Bye! And Enjoy DJGPP! Kalum