Mail Archives: djgpp/1993/08/09/10:28:29
> So, how do I 'transloate' this into a form which gcc/as will recognize>>??
> Is the proper suffix for my filename a .s or .asm?? And, how do I compile it
> into an object (and therefore linkable) file??
The proper suffix is .S. To compile it, use gcc, just as for a C program.
(Gcc looks at the extension and calls the appropriate compiler or assembler.)
There are examples of .S files in the djgpp source library, or you can let
the compiler generate examples by using the -S option. In fact, a trick I
have used with gcc and other compilers is to write a C version first, then
get assembly language output from the compiler and tweak it by hand. In
particular, this was how I converted routines which access the video memory
to run under dpmi.
Full documentation for gas is available from prep.ai.mit.edu in the same file
as the source coe. The file name was something like gas-1.23.tar.gz (I don't
remember the version number, but only a few files in the gnu directory match
gas*). Docs are in tex and dvi formats. I was able to view the dvi file
using a Windows DVI viewer under win-os/2. It's about 100 pages, but only
a few pages relate to differences between Intel and gas syntax.
- Raw text -