2014-01-25 03:22:41 +01:00
|
|
|
/* radare - LGPL - Copyright 2010-2014 - pancake */
|
2010-03-19 00:51:16 +01:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <r_types.h>
|
|
|
|
#include <r_util.h>
|
|
|
|
#include <r_lib.h>
|
|
|
|
#include <r_asm.h>
|
|
|
|
|
|
|
|
#include "../arch/avr/disasm.c"
|
|
|
|
|
2013-04-09 22:54:04 +02:00
|
|
|
static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
2013-12-06 05:04:17 +01:00
|
|
|
return op->size = avrdis (op->buf_asm, a->pc, buf, len);
|
2010-03-19 00:51:16 +01:00
|
|
|
}
|
|
|
|
|
2010-05-26 01:42:22 +02:00
|
|
|
RAsmPlugin r_asm_plugin_avr = {
|
2010-03-19 00:51:16 +01:00
|
|
|
.name = "avr",
|
|
|
|
.arch = "avr",
|
2013-12-15 00:58:05 +01:00
|
|
|
.license = "GPL",
|
2013-12-05 18:41:13 +01:00
|
|
|
.bits = 16|32,
|
2014-02-25 17:03:12 +01:00
|
|
|
.desc = "AVR Atmel",
|
2010-03-19 00:51:16 +01:00
|
|
|
.init = NULL,
|
|
|
|
.fini = NULL,
|
|
|
|
.disassemble = &disassemble,
|
|
|
|
.assemble = NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifndef CORELIB
|
|
|
|
struct r_lib_struct_t radare_plugin = {
|
|
|
|
.type = R_LIB_TYPE_ASM,
|
|
|
|
.data = &r_asm_plugin_avr
|
|
|
|
};
|
|
|
|
#endif
|