8080-Emulator  0.1
An Intel 8080 emulator for Space Invaders
memory_8080.h
Go to the documentation of this file.
1 
9 #ifndef MEMORY_8080_H
10 #define MEMORY_8080_H
11 
12 #include <inttypes.h>
13 
18 typedef struct {
19  void* base;
20 } v_memory;
21 
29 void* mem_ref(v_memory* mem, uint16_t offset);
30 
39 uint8_t mem_read(v_memory* mem, uint16_t offset);
40 
49 uint16_t short_mem_read(v_memory* mem, uint16_t offset);
50 
60 void mem_write(v_memory* mem, uint16_t offset, uint8_t val);
61 
71 void short_mem_write(v_memory* mem, uint16_t offset, uint16_t val);
72 
73 #endif
void mem_write(v_memory *mem, uint16_t offset, uint8_t val)
Lowest level memory write access abstraction. Typecasts the offset to void* + base to get the actual ...
Definition: memory_8080.c:26
uint16_t short_mem_read(v_memory *mem, uint16_t offset)
Wrapper over memory access primitives to read a byte off the base offset void* + base....
Definition: memory_8080.c:21
void * mem_ref(v_memory *mem, uint16_t offset)
plain reference to the memory location
Definition: memory_8080.c:12
uint8_t mem_read(v_memory *mem, uint16_t offset)
Lowest level memory read access abstraction. Typecasts the offset to void* + base to get the actual p...
Definition: memory_8080.c:16
void short_mem_write(v_memory *mem, uint16_t offset, uint16_t val)
Wrapper over memory access primitives to read a byte off the base offset void* + base....
Definition: memory_8080.c:31
Memory wrapper.
Definition: memory_8080.h:18
void * base
Definition: memory_8080.h:19