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 
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
30  .data = &rz_asm_plugin_spc700,
32 };
33 #endif
size_t len
Definition: 6502dis.c:15
RZ_API RzLibStruct rizin_plugin
Definition: asm_spc700.c:28
RzAsmPlugin rz_asm_plugin_spc700
Definition: asm_spc700.c:17
static int disassemble(RzAsm *a, RzAsmOp *rz_op, const ut8 *buf, int len)
Definition: asm_spc700.c:11
#define RZ_API
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
@ RZ_LIB_TYPE_ASM
Definition: rz_lib.h:72
#define RZ_SYS_ENDIAN_LITTLE
Definition: rz_types.h:526
#define RZ_VERSION
Definition: rz_version.h:8
#define a(i)
Definition: sha256.c:41
static size_t spc700_disas(RzStrBuf *out, ut64 pc, const ut8 *buf, size_t bufsz)
Definition: spc700dis.c:36
RzStrBuf buf_asm
Definition: rz_asm.h:72
int size
Definition: rz_asm.h:67
const char * name
Definition: rz_asm.h:130
const char * version
Definition: rz_asm.h:133