aboutsummaryrefslogtreecommitdiff
path: root/memory.h
blob: 72ba37babdc43d00bed2968e2243ff26207f8d32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// synacor challenge ([email protected])
#include "util.h"

typedef struct {
  u8 *mem;
  u16 size;
} Memory;

void mem_init(Memory *m);
void mem_free(Memory *m);
void mem_set(Memory *m, u16 addr, u16 value);
u16 mem_get(Memory *m, u16 addr);
u8 *get_next_pair(u8 *buffer, u16 *pair);