mirror of
https://github.com/pnx/m16vm
synced 2026-06-17 03:50:03 +02:00
src/cpu: add the define "CPU_NUM_REGS"
This commit is contained in:
parent
900e1d87c4
commit
dca453457d
2 changed files with 3 additions and 1 deletions
|
|
@ -32,7 +32,7 @@
|
||||||
#include "instr.h"
|
#include "instr.h"
|
||||||
|
|
||||||
// Registers r0, r15
|
// Registers r0, r15
|
||||||
int16_t reg[16] = { 0 };
|
int16_t reg[CPU_NUM_REGS] = { 0 };
|
||||||
|
|
||||||
/* Program */
|
/* Program */
|
||||||
unsigned char *instr_mem = NULL;
|
unsigned char *instr_mem = NULL;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "instr.h"
|
#include "instr.h"
|
||||||
|
|
||||||
|
#define CPU_NUM_REGS 16
|
||||||
|
|
||||||
int cpu_instr_load(void *ptr, unsigned len);
|
int cpu_instr_load(void *ptr, unsigned len);
|
||||||
|
|
||||||
void cpu_instr_unload();
|
void cpu_instr_unload();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue