Minecon724
7c03865b77
All checks were successful
/ deploy (push) Successful in 1m18s
For how long it took see Actions tab
23 lines
No EOL
425 B
C
23 lines
No EOL
425 B
C
#ifndef CPU_H
|
|
#define CPU_H
|
|
|
|
#include "address_space.h"
|
|
#include <stdint.h>
|
|
|
|
struct CPU_s {
|
|
// [32] of 32bit (uint32_t) registers
|
|
uint32_t registers[32];
|
|
|
|
// Points to the byte of current instruction. Also known as pc
|
|
uint32_t programCounter;
|
|
|
|
// The address space
|
|
AddressSpace *addressSpace;
|
|
};
|
|
|
|
typedef struct CPU_s CPU;
|
|
|
|
CPU create_cpu(AddressSpace *addressSpace);
|
|
int cpu_cycle(CPU *cpu);
|
|
|
|
#endif |