{"action":"closed","issue":{"url":"https://api.github.com/repos/aquynh/capstone/issues/285","labels_url":"https://api.github.com/repos/aquynh/capstone/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/aquynh/capstone/issues/285/comments","events_url":"https://api.github.com/repos/aquynh/capstone/issues/285/events","html_url":"https://github.com/aquynh/capstone/issues/285","id":61203618,"number":285,"title":"cmp al, XX : bad operand size for XX","user":{"login":"joelpx","id":4718852,"avatar_url":"https://avatars.githubusercontent.com/u/4718852?v=3","gravatar_id":"","url":"https://api.github.com/users/joelpx","html_url":"https://github.com/joelpx","followers_url":"https://api.github.com/users/joelpx/followers","following_url":"https://api.github.com/users/joelpx/following{/other_user}","gists_url":"https://api.github.com/users/joelpx/gists{/gist_id}","starred_url":"https://api.github.com/users/joelpx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelpx/subscriptions","organizations_url":"https://api.github.com/users/joelpx/orgs","repos_url":"https://api.github.com/users/joelpx/repos","events_url":"https://api.github.com/users/joelpx/events{/privacy}","received_events_url":"https://api.github.com/users/joelpx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-13T19:43:29Z","updated_at":"2015-03-14T10:14:18Z","closed_at":"2015-03-14T10:14:18Z","body":"binary = b\"\\x3c\\x12\\x80\\xfc\\x12\\x80\\xfb\\x12\\x80\\xff\\x12\"\r\nmd = Cs(CS_ARCH_X86, CS_MODE_64)\r\nmd.detail = True\r\nfor i in md.disasm(binary, len(binary)):\r\n    print(\"%s %s\" % (i.mnemonic, i.op_str))\r\n    j = 0\r\n    for op in i.operands:\r\n        print(\"  %d: size=%d\" % (j, op.size))\r\n        j += 1\r\n\r\nResult : \r\n\r\ncmp al, 0x12\r\n  0: size=1\r\n  1: size=8\r\ncmp ah, 0x12\r\n  0: size=1\r\n  1: size=1\r\ncmp bl, 0x12\r\n  0: size=1\r\n  1: size=1\r\ncmp bh, 0x12\r\n  0: size=1\r\n  1: size=1\r\n\r\nOnly for \"cmp al, 0x12\" the size of the second operand is 8."}}