Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
boytacean
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
João Magalhães
boytacean
Commits
1d44d53a
Verified
Commit
1d44d53a
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: more instructions
parent
f7644d74
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/inst.rs
+10
-2
10 additions, 2 deletions
src/inst.rs
with
10 additions
and
2 deletions
src/inst.rs
+
10
−
2
View file @
1d44d53a
...
@@ -221,7 +221,7 @@ pub const INSTRUCTIONS: [(fn(&mut Cpu), u8, &'static str); 256] = [
...
@@ -221,7 +221,7 @@ pub const INSTRUCTIONS: [(fn(&mut Cpu), u8, &'static str); 256] = [
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
call_u16
,
24
,
"CALL u16"
),
(
call_u16
,
24
,
"CALL u16"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !
"
),
(
rst_08h
,
16
,
"RST 08h
"
),
// 0xd opcodes
// 0xd opcodes
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
...
@@ -262,7 +262,7 @@ pub const INSTRUCTIONS: [(fn(&mut Cpu), u8, &'static str); 256] = [
...
@@ -262,7 +262,7 @@ pub const INSTRUCTIONS: [(fn(&mut Cpu), u8, &'static str); 256] = [
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
di
,
4
,
"DI"
),
(
di
,
4
,
"DI"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !
"
),
(
push_af
,
16
,
"PUSH AF
"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
(
noimpl
,
4
,
"! UNIMP !"
),
...
@@ -884,6 +884,10 @@ fn call_u16(cpu: &mut Cpu) {
...
@@ -884,6 +884,10 @@ fn call_u16(cpu: &mut Cpu) {
cpu
.pc
=
word
;
cpu
.pc
=
word
;
}
}
fn
rst_08h
(
cpu
:
&
mut
Cpu
)
{
rst
(
cpu
,
0x0008
);
}
fn
ld_mff00u8_a
(
cpu
:
&
mut
Cpu
)
{
fn
ld_mff00u8_a
(
cpu
:
&
mut
Cpu
)
{
let
byte
=
cpu
.read_u8
();
let
byte
=
cpu
.read_u8
();
cpu
.mmu
.write
(
0xff00
+
byte
as
u16
,
cpu
.a
);
cpu
.mmu
.write
(
0xff00
+
byte
as
u16
,
cpu
.a
);
...
@@ -922,6 +926,10 @@ fn di(cpu: &mut Cpu) {
...
@@ -922,6 +926,10 @@ fn di(cpu: &mut Cpu) {
cpu
.disable_int
();
cpu
.disable_int
();
}
}
fn
push_af
(
cpu
:
&
mut
Cpu
)
{
cpu
.push_word
(
cpu
.af
());
}
fn
ei
(
cpu
:
&
mut
Cpu
)
{
fn
ei
(
cpu
:
&
mut
Cpu
)
{
cpu
.enable_int
();
cpu
.enable_int
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment