Wrapper round x86 Assembler

Fuzzyman michael at foord.net
Sat Apr 10 06:04:16 EDT 2004


Peter Hansen <peter at engcorp.com> wrote in message news:<4dKdnQlIXMIXIevdRVn-gg at powergate.ca>...
> Fuzzyman wrote:
> 
> > There might be a really good reason why this hasn't been done *or*
> > someone might have done it and I just can't find it..... *but*
> > 
> > what about a wrapper to an assembler (presumably for x86 assembly !)
> > !!
> > I just wrote some code doing binary operations which would have been
> > about a zillion times faster in a few lines of assembly code.
> 
> I refer you to "Pyrex"...
> 
> -Peter

If I understand correctly (which is probably not likely) - Pyrex is a
compiled language with some C syntax and some Python syntax.

Because the result is compiled, and  a step in the compile chain is
assembly, you could include inline assembly in the same way that you
could with C ??

Never having done any C programming that stretches the limit of my
knowledge.

*However* it's not quite what I had in mind. What I'd like to be able
to do is to access machine code subroutines from within normal python.

Not that exploring pyrex is a bad idea - I probably should.
I don't think my 'idea' would be hard to achieve, since effectively
all that would be needed is a wrapper to an existing freeware
assembler *and* an interface to the assembled 'objects'. Ho hum - a
bit beyond me at the moment and until I have a real burning need for
it will have to remain an idea......


Regards,


Fuzzy

http://www.voidspace.org.uk/atlantibots/pythonutils.html



More information about the Python-list mailing list