pyasm2 icon indicating copy to clipboard operation
pyasm2 copied to clipboard

xchg

Open 0vercl0k opened this issue 13 years ago • 0 comments

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.

0vercl0k avatar Sep 04 '12 17:09 0vercl0k