Krolyxon
Auto
Light
Dark
Summary
Tree
Log
Refs
Find
Commit
4809d71
Branches
master
Tags
v0.3.0
v0.2.0
Refs →
bench51
/
src
/
cpu.rs
22 lines · 287 B · Rust
Raw
Blame
History
Download
1
#[
derive
(
Default
)]
2
#[
derive
(
Debug
)]
3
pub
struct
CPU
{
4
pub
a
:
u8
,
5
pub
b
:
u8
,
6
pub
c
:
u8
,
7
pub
d
:
u8
,
8
9
pub
pc
:
u16
,
10
pub
sp
:
u16
,
11
12
pub
zero
:
bool
,
13
pub
carry
:
bool
,
14
15
pub
halted
:
bool
,
16
}
17
18
impl
CPU
{
19
pub
fn
inc_cp
(&
mut
self
)
{
20
self
.
pc
+=
1
;
21
}
22
}