Rizin
unix-like reverse engineering framework and cli tools
asm_spc700.c
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2012-2014 pancake <pancake@nopcode.org>
2
// SPDX-FileCopyrightText: 2014 condret <condr3t@protonmail.com>
3
// SPDX-License-Identifier: LGPL-3.0-only
4
5
#include <
rz_types.h
>
6
#include <
rz_util.h
>
7
#include <
rz_asm.h
>
8
#include <
rz_lib.h
>
9
#include "../arch/spc700/spc700dis.c"
10
11
static
int
disassemble
(
RzAsm
*
a
,
RzAsmOp
*rz_op,
const
ut8
*
buf
,
int
len
) {
12
size_t
dlen =
spc700_disas
(&rz_op->
buf_asm
,
a
->pc,
buf
,
len
);
13
rz_op->
size
= dlen;
14
return
(
int
)dlen;
15
}
16
17
RzAsmPlugin
rz_asm_plugin_spc700
= {
18
.
name
=
"spc700"
,
19
.desc =
"spc700, snes' sound-chip"
,
20
.arch =
"spc700"
,
21
.license =
"LGPL3"
,
22
.bits = 16,
23
.endian =
RZ_SYS_ENDIAN_LITTLE
,
24
.disassemble = &
disassemble
,
25
};
26
27
#ifndef RZ_PLUGIN_INCORE
28
RZ_API
RzLibStruct
rizin_plugin
= {
29
.
type
=
RZ_LIB_TYPE_ASM
,
30
.data = &
rz_asm_plugin_spc700
,
31
.
version
=
RZ_VERSION
32
};
33
#endif
len
size_t len
Definition:
6502dis.c:15
rizin_plugin
RZ_API RzLibStruct rizin_plugin
Definition:
asm_spc700.c:28
rz_asm_plugin_spc700
RzAsmPlugin rz_asm_plugin_spc700
Definition:
asm_spc700.c:17
disassemble
static int disassemble(RzAsm *a, RzAsmOp *rz_op, const ut8 *buf, int len)
Definition:
asm_spc700.c:11
RZ_API
#define RZ_API
Definition:
core_plugin_example.c:36
buf
voidpf void * buf
Definition:
ioapi.h:138
ut8
uint8_t ut8
Definition:
lh5801.h:11
rz_asm.h
rz_lib.h
RZ_LIB_TYPE_ASM
@ RZ_LIB_TYPE_ASM
Definition:
rz_lib.h:72
rz_types.h
RZ_SYS_ENDIAN_LITTLE
#define RZ_SYS_ENDIAN_LITTLE
Definition:
rz_types.h:526
rz_util.h
RZ_VERSION
#define RZ_VERSION
Definition:
rz_version.h:8
a
#define a(i)
Definition:
sha256.c:41
spc700_disas
static size_t spc700_disas(RzStrBuf *out, ut64 pc, const ut8 *buf, size_t bufsz)
Definition:
spc700dis.c:36
rz_asm_op_t
Definition:
rz_asm.h:66
rz_asm_op_t::buf_asm
RzStrBuf buf_asm
Definition:
rz_asm.h:72
rz_asm_op_t::size
int size
Definition:
rz_asm.h:67
rz_asm_plugin_t
Definition:
rz_asm.h:129
rz_asm_plugin_t::name
const char * name
Definition:
rz_asm.h:130
rz_asm_plugin_t::version
const char * version
Definition:
rz_asm.h:133
rz_asm_t
Definition:
rz_asm.h:98
rz_lib_struct_t
Definition:
rz_lib.h:57
rz_lib_struct_t::type
int type
Definition:
rz_lib.h:58
librz
asm
p
asm_spc700.c
Generated by
1.9.1