Rizin
unix-like reverse engineering framework and cli tools
bfvm.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2008-2011 pancake <pancake@nopcode.org>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef _R_BFVM_INCLUDE_
5 #define _R_BFVM_INCLUDE_
6 
7 #include <rz_io.h>
8 #include <rz_util.h>
9 
10 #define BFVM_SCREEN_ADDR 0x50000
11 #define BFVM_SCREEN_SIZE 4096
12 #define BFVM_INPUT_ADDR 0x10000
13 #define BFVM_INPUT_SIZE 4096
14 #define BFVM_DATA_ADDR 0xd00000
15 #define BFVM_DATA_SIZE 4096
16 #define BFVM_CODE_ADDR 0
17 #define BFVM_CODE_SIZE 4096 /* XXX */
18 
19 typedef struct bfvm_cpu_t {
22  int ptr;
23  int trace;
24  int breaked;
26  ut8 *mem;
33  int input_idx;
36  int circular; /* circular memory */
39 
40 #ifdef RZ_API
43 RZ_API int bfvm_step(BfvmCPU *c, int over);
44 #endif
45 
46 #endif
RZ_API BfvmCPU * bfvm_new(RzIOBind *iob)
Definition: bfvm.c:67
RZ_API BfvmCPU * bfvm_free(BfvmCPU *c)
Definition: bfvm.c:74
RZ_API int bfvm_step(BfvmCPU *c, int over)
Definition: bfvm.c:180
struct bfvm_cpu_t BfvmCPU
#define RZ_API
uint32_t ut32
uint8_t ut8
Definition: lh5801.h:11
#define c(i)
Definition: sha256.c:43
ut64 esp
Definition: bfvm.h:21
int input_idx
Definition: bfvm.h:33
ut32 size
Definition: bfvm.h:27
int circular
Definition: bfvm.h:36
int input_size
Definition: bfvm.h:34
int screen_size
Definition: bfvm.h:30
RzIOBind iob
Definition: bfvm.h:37
int trace
Definition: bfvm.h:23
ut64 base
Definition: bfvm.h:25
ut64 input
Definition: bfvm.h:32
ut64 eip
Definition: bfvm.h:20
ut8 * mem
Definition: bfvm.h:26
ut64 screen
Definition: bfvm.h:28
int breaked
Definition: bfvm.h:24
int screen_idx
Definition: bfvm.h:29
ut8 * screen_buf
Definition: bfvm.h:31
int ptr
Definition: bfvm.h:22
ut8 * input_buf
Definition: bfvm.h:35
ut64(WINAPI *w32_GetEnabledXStateFeatures)()