Add draft for CPU registers and flags.
This commit is contained in:
parent
dad26e3f4b
commit
3c6dc24a65
26
src/cpu.ml
Normal file
26
src/cpu.ml
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue