Mail Archives: djgpp/1995/07/10/12:04:17
On Fri, 7 Jul 1995, daemon wrote:
> guest AT dstn02 DOT dct DOT ac DOT uk (Guest) wrote:
>
> >m.c
> >---
> > main() {
> >
> > _AX = 0;
> > }
>
> First you need to read up on AT&T assembly as opposed to Intel assembly. This
> is found by typing 'info as' at the DOS prompt. Then you need to call the
> function asm() to use inline assembly. How exactly you do this i don't know.
> But if you figure it out, share!
DJGPP indeed does not support Turbo C-style pseudo-register variables, so
you will have to replace it by inline assembly. Some of the differences
between Intel ASM syntax and AT&T syntax are explained in the DJGPP FAQ
list (available as faq102.zip from the same place you get DJGPP), Chapter
17. To learn about the GCC inline assembly facilities, read the relevant
chapters of the GCC Info pages. You can also look into the DJGPP library
sources for examples of inline assembly.
- Raw text -