Mail Archives: djgpp/1999/10/10/03:10:43
On 9 Oct 99, at 16:08, Laurence Patrick <laurphug AT zaz DOT com DOT br> 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
<http://www.cryogen.com/Nasm>
Bye!
And Enjoy DJGPP!
Kalum <kalum AT myflat DOT com>
- Raw text -