add CPU and memory modules with associated header files; update README and .gitignore

This commit is contained in:
2025-12-21 18:45:56 +03:00
parent 7d607ec86d
commit 45b96c4390
7 changed files with 39 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
#ifndef MEMORY_H
#define MEMORY_H
#include <stdint.h>
#define MEM_SIZE 65536 // 64KB memory size
typedef struct
{
uint8_t data[MEM_SIZE];
} Memory;
uint8_t mem_read(Memory *mem, uint16_t addr);
void mem_write(Memory *mem, uint16_t addr, uint8_t value);
void mem_reset(Memory *mem);
#endif