grpc
third_party
bloaty
third_party
capstone
bindings
python
capstone
mos65xx.py
Go to the documentation of this file.
1
# Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com>
2
3
import
ctypes
4
from
.
import
copy_ctypes_list
5
from
.mos65xx_const
import
*
6
7
# define the API
8
class
MOS65xxOpValue
(ctypes.Union):
9
_fields_ = (
10
(
'reg'
, ctypes.c_uint),
11
(
'imm'
, ctypes.c_uint8),
12
(
'mem'
, ctypes.c_uint16),
13
)
14
15
class
MOS65xxOp
(ctypes.Structure):
16
_fields_ = (
17
(
'type'
, ctypes.c_uint),
18
(
'value'
, MOS65xxOpValue),
19
)
20
21
@property
22
def
imm
(self):
23
return
self.value.imm
24
25
@property
26
def
reg
(self):
27
return
self.value.reg
28
29
@property
30
def
mem
(self):
31
return
self.value.mem
32
33
34
class
CsMOS65xx
(ctypes.Structure):
35
_fields_ = (
36
(
'am'
, ctypes.c_uint),
37
(
'modifies_flags'
, ctypes.c_uint8),
38
(
'op_count'
, ctypes.c_uint8),
39
(
'operands'
, MOS65xxOp * 3),
40
)
41
42
def
get_arch_info
(a):
43
return
(a.am, a.modifies_flags,
copy_ctypes_list
(a.operands[:a.op_count]))
44
45
capstone.mos65xx.CsMOS65xx
Definition:
mos65xx.py:34
capstone.mos65xx.MOS65xxOpValue
Definition:
mos65xx.py:8
capstone.mos65xx.MOS65xxOp.mem
def mem(self)
Definition:
mos65xx.py:30
capstone.mos65xx.MOS65xxOp
Definition:
mos65xx.py:15
capstone.mos65xx.MOS65xxOp.reg
def reg(self)
Definition:
mos65xx.py:26
capstone.mos65xx.MOS65xxOp.imm
def imm(self)
Definition:
mos65xx.py:22
capstone.mos65xx.get_arch_info
def get_arch_info(a)
Definition:
mos65xx.py:42
capstone.copy_ctypes_list
def copy_ctypes_list(src)
Definition:
third_party/bloaty/third_party/capstone/bindings/python/capstone/__init__.py:328
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:30