From: yhirsch Newsgroups: comp.os.msdos.djgpp Subject: Re: Assembler Date: Sat, 09 Oct 1999 23:26:26 +0200 Organization: Unspecified Organization Lines: 33 Message-ID: <37FFB302.5E58A52E@ibm.net> References: <000501bf1289$b2f0ac80$74ccd3c8 AT computer> NNTP-Posting-Host: slip139-92-184-63.tel.il.ibm.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.ibm.net.il!ibm.net 939504695 15508 (none) 139.92.184.63 X-Complaints-To: postmaster AT ibm DOT net X-Mailer: Mozilla 4.03 [en] (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi. It looks to me like you're using Intel assembler syntax. DJGPP uses At&t syntax for assembler. Try writing this instead: __asm__ ("in %%dx, %%ax" : :"d"(i) ); 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