emu: modrm displacement, LEA instruction
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use emu::byteorder::{ByteOrder, LittleEndian};
|
||||
use emu::dos;
|
||||
use emu::i8088::i8088;
|
||||
use emu::operands::{Address, LValue, Reg, RValue};
|
||||
use emu::operands::{Addr, Address, LValue, Reg, RValue};
|
||||
use emu::pc::Bus;
|
||||
use emu::util::segoff_to_addr;
|
||||
|
||||
@@ -26,6 +26,10 @@ pub fn int(cpu: &mut i8088, bus: &mut Bus, num: &u8) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn lea(dst: &mut Reg, addr: &Addr) {
|
||||
dst.write(addr.offset)
|
||||
}
|
||||
|
||||
pub fn mov<T>(dst: &mut impl LValue<T>, src: &impl RValue<T>) {
|
||||
dst.write(src.read());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user