delorie.com/djgpp/faq/converting/auto.html
|
search
|
Where can I find an automated conversion tool to convert my
Intel-style assembly code into a code acceptable by gas?
Unfortunately, such a tool that is known to work in all cases is
unknown to us; if you see one, hear about one, or write one yourself,
be sure to tell us. Here's one person's
try. In the meantime, here is what you can do to convert your
code:
- For a small number of relatively short files, consider converting
them with a smart editor (like emacs or its work-alikes).
- Obtain a copy of Microsoft MASM 6.11. It has -coff
option to generate object code in COFF format which can be submitted
to gcc, so you can compile your original source. You can
also use lib32 librarian from Microsoft C8 to convert object
files to COFF by putting them into a .lib library, then extracting
them as COFF files.
Keep in mind that syntax is only one of the aspects of converting code
written for DOS to djgpp. You should also make sure your code doesn't
violate any rules for protected-mode
programming.