This commit is contained in:
2024-05-12 14:26:38 +02:00
parent 49b3928813
commit 822fd8616c
4 changed files with 210 additions and 20 deletions

View File

@ -1,16 +1,19 @@
#pragma once
#include <stdint.h>
#include <stdbool.h>
struct Hart
{
uint32_t pc;
uint32_t regs[32];
char* mem;
uint32_t mem_size;
bool halted;
};
typedef struct Hart Hart;
void execute(Hart* hart, uint32_t instruction);
void execute_from(Hart* hart, uint32_t start_address);