Mail Archives: djgpp/1997/12/02/23:01:14
You can definitely use external assembler with DJGPP. Often times
inline assembler is quicker and easier, but it is certainly not the only
way to go.
I would recommend learning the AT&T assembly syntax - it is less
ambiguous than Intel syntax. Brennan's Guide to Inline Assembly is an
excellent way to get started.
As for external assembly, I'd recommend looking at some examples that
are already written. The Allegro graphics library source would probably
be the type of thing you want to take a peek at. Several of its
routines are written in external assembler (notably, the interrupt
handler). Files of this sort use the .s or .S extension (not .asm, as
you are probably used to).
I believe there are programs out there which will convert object file
formats, so you can compile your Intel format assembly, and then convert
and link with your DJGPP executable. I don't use them personally,
because of several differences between real-mode and pmode programming.
Finally, try compiling a simple C program with the -S switch to generate
assembly output which you can study from.
Hope that helps.
- Mark
Newbie wrote:
>
> Is there a way to use assembler routines for DJGPP
> via external method? like using little Tasm program to draw lines
> for example, if so how would one set it up and compile it. Or is
> inline assembly only way to go? Any help will be greatly appreciated
> thx.
- Raw text -