Add draft for CPU registers and flags.

This commit is contained in:
Fabien Freling 2015-02-24 17:30:14 +01:00
parent dad26e3f4b
commit 3c6dc24a65

26
src/cpu.ml Normal file
View file

@ -0,0 +1,26 @@
(** http://bgb.bircd.org/pandocs.htm#cpuregistersandflags *)
type registers = {
a : char;
b : char;
c : char;
d : char;
e : char;
h : char;
l : char;
sp : int;
pc : int;
}
type flags = {
zf : bool;
n : bool;
h : bool;
cy : bool;
}
type t = {
reg : registers;
flags : flags;
}