CPU testing
This commit is contained in:
@ -11,7 +11,7 @@ typedef uint32_t u32;
|
||||
typedef uint64_t u64;
|
||||
|
||||
#define BIT(a, n) ((a & (1 << n)) ? 1 : 0)
|
||||
#define BIT_SET(a, n, on) {if(on) a |= (1 << n); else a &= !(1 << n);}
|
||||
#define BIT_SET(a, n, on) {if(on) a |= (1 << n); else a &= ~(1 << n);}
|
||||
#define BETWEEN(a, b, c) ((a >= b) && (a <= c))
|
||||
|
||||
void delay(u32 ms);
|
||||
|
@ -63,4 +63,6 @@ void cpu_set_ie_register(u8 ie);
|
||||
cpu_registers *cpu_get_regs();
|
||||
|
||||
u8 cpu_get_int_flags();
|
||||
void cpu_set_int_flags(u8 value);
|
||||
void cpu_set_int_flags(u8 value);
|
||||
|
||||
void inst_to_str(cpu_context *ctx, char *str);
|
6
include/dbg.h
Normal file
6
include/dbg.h
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <common.h>
|
||||
|
||||
void dbg_update();
|
||||
void dbg_print();
|
6
include/io.h
Normal file
6
include/io.h
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <common.h>
|
||||
|
||||
u8 io_read(u16 address);
|
||||
void io_write(u16 address, u8 value);
|
Reference in New Issue
Block a user