Skip to content
Snippets Groups Projects
Verified Commit 2711beb2 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

feat: one more instruction

parent 3c794914
No related branches found
No related tags found
No related merge requests found
...@@ -228,7 +228,7 @@ pub const INSTRUCTIONS: [(fn(&mut Cpu), u8, &'static str); 256] = [ ...@@ -228,7 +228,7 @@ pub const INSTRUCTIONS: [(fn(&mut Cpu), u8, &'static str); 256] = [
(noimpl, 4, "! UNIMP !"), (noimpl, 4, "! UNIMP !"),
(noimpl, 4, "! UNIMP !"), (noimpl, 4, "! UNIMP !"),
(noimpl, 4, "! UNIMP !"), (noimpl, 4, "! UNIMP !"),
(noimpl, 4, "! UNIMP !"), (push_de, 16, "PUSH DE"),
(sub_a_u8, 8, "SUB A, u8"), (sub_a_u8, 8, "SUB A, u8"),
(noimpl, 4, "! UNIMP !"), (noimpl, 4, "! UNIMP !"),
(noimpl, 4, "! UNIMP !"), (noimpl, 4, "! UNIMP !"),
...@@ -936,6 +936,10 @@ fn rst_08h(cpu: &mut Cpu) { ...@@ -936,6 +936,10 @@ fn rst_08h(cpu: &mut Cpu) {
rst(cpu, 0x0008); rst(cpu, 0x0008);
} }
fn push_de(cpu: &mut Cpu) {
cpu.push_word(cpu.de());
}
fn sub_a_u8(cpu: &mut Cpu) { fn sub_a_u8(cpu: &mut Cpu) {
let byte = cpu.read_u8(); let byte = cpu.read_u8();
cpu.a = sub_set_flags(cpu, cpu.a, byte); cpu.a = sub_set_flags(cpu, cpu.a, byte);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment