Rizin
unix-like reverse engineering framework and cli tools
asm_i8080.c File Reference
#include <rz_types.h>
#include <rz_util.h>
#include <rz_lib.h>
#include <rz_asm.h>
#include "../arch/i8080/i8080dis.c"

Go to the source code of this file.

Functions

static int do_disassemble (RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
 

Variables

RzAsmPlugin rz_asm_plugin_i8080
 
RZ_API RzLibStruct rizin_plugin
 

Function Documentation

◆ do_disassemble()

static int do_disassemble ( RzAsm a,
RzAsmOp op,
const ut8 buf,
int  len 
)
static

Definition at line 10 of file asm_i8080.c.

10  {
11  int dlen = i8080_disasm(buf, rz_strbuf_get(&op->buf_asm), len);
12  return op->size = RZ_MAX(0, dlen);
13 }
size_t len
Definition: 6502dis.c:15
int i8080_disasm(unsigned char const *const code, char *text, int text_sz)
voidpf void * buf
Definition: ioapi.h:138
RZ_API char * rz_strbuf_get(RzStrBuf *sb)
Definition: strbuf.c:321
#define RZ_MAX(x, y)
Definition: dis.c:32

References i8080_disasm(), len, RZ_MAX, and rz_strbuf_get().

Variable Documentation

◆ rizin_plugin

RZ_API RzLibStruct rizin_plugin
Initial value:
= {
.type = RZ_LIB_TYPE_ASM,
}
RzAsmPlugin rz_asm_plugin_i8080
Definition: asm_i8080.c:15
@ RZ_LIB_TYPE_ASM
Definition: rz_lib.h:72
#define RZ_VERSION
Definition: rz_version.h:8
const char * version
Definition: rz_asm.h:133

Definition at line 26 of file asm_i8080.c.

◆ rz_asm_plugin_i8080

RzAsmPlugin rz_asm_plugin_i8080
Initial value:
= {
.name = "i8080",
.desc = "Intel 8080 CPU",
.arch = "i8080",
.license = "BSD",
.bits = 8,
.endian = RZ_SYS_ENDIAN_NONE,
.disassemble = &do_disassemble
}
static int do_disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
Definition: asm_i8080.c:10
#define RZ_SYS_ENDIAN_NONE
Definition: rz_types.h:525

Definition at line 15 of file asm_i8080.c.