pyasm2
pyasm2 copied to clipboard
xchg
Seems there are several problems when I'm trying to assemble xchg instructions, here is an example :
>>> '%s' % xchg(esi, esp)
Traceback (most recent call last):
File "stdin", line 1, in module
File "D:\TODO\pyasm2.py", line 755, in __str__
ret += self.modrm(modrm_reg, modrm_rm)
File "D:\TODO\pyasm2.py", line 512, in modrm
reg = op1.index
AttributeError: 'NoneType' object has no attribute 'index'
The problem seems to be there only if I assemble xchg instruction with the opcode \x87 or \x86.