Rizin
unix-like reverse engineering framework and cli tools
asm_h8300.c File Reference
#include <stdio.h>
#include <string.h>
#include <rz_types.h>
#include <rz_lib.h>
#include <rz_asm.h>
#include <h8300_disas.h>

Go to the source code of this file.

Functions

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

Variables

RzAsmPlugin rz_asm_plugin_h8300
 
RZ_API RzLibStruct rizin_plugin
 

Function Documentation

◆ disassemble()

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

Definition at line 11 of file asm_h8300.c.

11  {
12  struct h8300_cmd cmd;
13  int ret = h8300_decode_command(buf, &cmd);
14  rz_strbuf_set(&op->buf_asm, sdb_fmt("%s %s", cmd.instr, cmd.operands));
15  return op->size = ret;
16 }
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags cmd
Definition: sflib.h:79
RZ_API char * sdb_fmt(const char *fmt,...)
Definition: fmt.c:26
int h8300_decode_command(const ut8 *instr, struct h8300_cmd *cmd)
Definition: h8300_disas.c:779
voidpf void * buf
Definition: ioapi.h:138
RZ_API const char * rz_strbuf_set(RzStrBuf *sb, const char *s)
Definition: strbuf.c:153
Definition: dis.c:32

References cmd, h8300_decode_command(), rz_strbuf_set(), and sdb_fmt().

Variable Documentation

◆ rizin_plugin

RZ_API RzLibStruct rizin_plugin
Initial value:
= {
.type = RZ_LIB_TYPE_ASM,
}
RzAsmPlugin rz_asm_plugin_h8300
Definition: asm_h8300.c:18
@ 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 29 of file asm_h8300.c.

◆ rz_asm_plugin_h8300

RzAsmPlugin rz_asm_plugin_h8300
Initial value:
= {
.name = "h8300",
.license = "LGPL3",
.desc = "H8/300 disassembly plugin",
.arch = "h8300",
.bits = 16,
.endian = RZ_SYS_ENDIAN_BIG,
.disassemble = &disassemble
}
static int disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
Definition: asm_h8300.c:11
#define RZ_SYS_ENDIAN_BIG
Definition: rz_types.h:527

Definition at line 18 of file asm_h8300.c.