[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] ASM code in pygame



Lenard Lindstrom wrote:
Deciding how to handle assembly code in future Pygame releases will probably take up its own mailing list thread. But when I do a Google search on the topic of Intel assembly code and gcc I get this, http://www.acm.uiuc.edu/sigmil/RevEng/ch02.html , which claims the GNU assembler 'as' "takes input as an AT&T or Intel syntax asm file". Pygame's assembly routines will likely end up in there own libraries and be linked in, possibly dynamically, as needed. So gcc C will no longer be a factor for assembly language compatibility.

GUN 'as' may take intel-style code, but I'm pretty sure that the compiler (GCC) will only accept the AT&T style. The back end of the compiler needs to know the input/output registers, and if that information is not explicitly given in the extended-asm syntax, then the compiler must parse the ASM and extract the information by itself. This is what VC does, but I think GCC probably doesn't have support for this.

If you're considering keeping separate libraries for the ASM code then I think breaking the code out into .asm files and assembling it with NASM/YASM is the right way to go.

Richard