flat assembler
Message board for the users of flat assembler.
Index
> High Level Languages > Python binding to fasm.dll |
Author |
|
Abyx 28 Oct 2010, 10:55
Code: Help on module pyfasm: NAME pyfasm - Python binding for FASM.dll FILE c:\python25\lib\site-packages\pyfasm.py DESCRIPTION Requirements: The FASM.dll, can be obtained at http://board.flatassembler.net/topic.php?t=6239 Python 2.5-2.7 or Python 3.x Installation: Copy this file to \PythonXX\Lib\site-packages\ directory Notes: To load FASM.dll, PyFASM tries to call LoadLibrary('fasm'), LoadLibrary('%FASMPATH%\fasm') and LoadLibrary('%FASM%\fasm'). Display pipe isn't implemented yet. fasm_AssembleFile isn't implemented yet, use the following code instead: assemble(open('file.asm').read()) Changelog: [2010.10.28] First version FUNCTIONS assemble(src, memorySize=65536, passesLimit=100) Assembles string and returns assembled bytes >>> src = ''' ... jmp @f ... db "123", 10, 0 ... @@: ... ''' >>> binary = assemble(src) >>> import sys >>> if sys.version_info[0] == 2: ... ' '.join('%02X' % ord(b) for b in binary) ... else: ... ' '.join('%02X' % b for b in binary) ... 'EB 05 31 32 33 0A 00' get_version() Returns tuple (major version, minor version) >>> majorVer, minorVer = get_version()
|
|||||||||||
28 Oct 2010, 10:55 |
|
masonswanson 24 Dec 2010, 08:02
This is great thank you so much!
|
|||
24 Dec 2010, 08:02 |
|
abc 07 Mar 2012, 14:45
thanks Abyx!
good work! what about make Python to FASM helper converter? |
|||
07 Mar 2012, 14:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.