mirror of
https://github.com/transistorfet/moa.git
synced 2024-11-24 23:32:46 +00:00
Started implementing INI instruction for Z80
This commit is contained in:
parent
6390a207a6
commit
7e62a2691c
@ -322,8 +322,17 @@ impl Z80 {
|
||||
//},
|
||||
//Instruction::INDR => {
|
||||
//},
|
||||
//Instruction::INI => {
|
||||
//},
|
||||
Instruction::INI => {
|
||||
let b = self.get_register_value(Register::B);
|
||||
let c = self.get_register_value(Register::C);
|
||||
let value = self.get_ioport_value(b, c)?;
|
||||
|
||||
self.set_load_target_value(LoadTarget::IndirectRegByte(RegisterPair::HL), value as u16)?;
|
||||
let hl = self.get_register_pair_value(RegisterPair::HL).wrapping_add(1);
|
||||
self.set_register_pair_value(RegisterPair::HL, hl);
|
||||
let b = self.get_register_value(Register::B).wrapping_sub(1);
|
||||
self.set_register_value(Register::B, b);
|
||||
},
|
||||
//Instruction::INIR => {
|
||||
//},
|
||||
Instruction::INic(reg) => {
|
||||
|
Loading…
Reference in New Issue
Block a user