Message-Id: <199807191932.UAA12532@sable.ox.ac.uk> Comments: Authenticated sender is From: George Foot To: Jonathan Villani Date: Sun, 19 Jul 1998 20:32:09 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: DJGPP & asm Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk CC: djgpp AT delorie DOT com Precedence: bulk On 18 Jul 98 at 19:03, Jonathan Villani wrote: > Hi! I would like to know what is the parameter or switch to produce my code > (DJGPP) in an asm version? To tell the compiler to produce assembly language output, pass the `-S' switch (note that it's a capital letter): gcc -S foo.c produces a file `foo.s' containing the assembly language output of the compiler. To assemble and link assembly language code you just pass it as if it were C source code: gcc -c foo.s would assemble `foo.s' to produce `foo.o', while: gcc -o foo.exe foo.s would assemble `foo.s' and link it to produce an executabe file, `foo.exe'. You probably normally want to use a capital S in the extension of assembly language source code, i.e.: gcc -o foo.exe foo.S That causes it to be preprocessed before being passed to the assembler, which means you can use preprocessor directives like #include, #define, etc, and also comments (/*...*/ or //...eol) in your assembly language source code. -- george DOT foot AT merton DOT oxford DOT ac DOT uk