2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionAddMemReg(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setMem(size, ADD(size, getMem(size), getReg(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionAddRegMem(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setReg(size, ADD(size, getReg(size), getMem(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionAddAccImm(Size size) -> void {
|
|
|
|
setAcc(size, ADD(size, getAcc(size), fetch(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionOrMemReg(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setMem(size, OR(size, getMem(size), getReg(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionOrRegMem(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setReg(size, OR(size, getReg(size), getMem(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionOrAccImm(Size size) -> void {
|
|
|
|
setAcc(size, OR(size, getAcc(size), fetch(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionAdcMemReg(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setMem(size, ADC(size, getMem(size), getReg(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionAdcRegMem(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setReg(size, ADC(size, getReg(size), getMem(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionAdcAccImm(Size size) -> void {
|
|
|
|
setAcc(size, ADC(size, getAcc(size), fetch(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionSbbMemReg(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setMem(size, SBB(size, getMem(size), getReg(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionSbbRegMem(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setReg(size, SBB(size, getReg(size), getMem(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionSbbAccImm(Size size) -> void {
|
|
|
|
setAcc(size, SBB(size, getAcc(size), fetch(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionAndMemReg(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setMem(size, AND(size, getMem(size), getReg(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionAndRegMem(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setReg(size, AND(size, getReg(size), getMem(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionAndAccImm(Size size) -> void {
|
|
|
|
setAcc(size, AND(size, getAcc(size), fetch(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionSubMemReg(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setMem(size, SUB(size, getMem(size), getReg(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionSubRegMem(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setReg(size, SUB(size, getReg(size), getMem(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionSubAccImm(Size size) -> void {
|
|
|
|
setAcc(size, SUB(size, getAcc(size), fetch(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionXorMemReg(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setMem(size, XOR(size, getMem(size), getReg(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionXorRegMem(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setReg(size, XOR(size, getReg(size), getMem(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionXorAccImm(Size size) -> void {
|
|
|
|
setAcc(size, XOR(size, getAcc(size), fetch(size)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionCmpMemReg(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
SUB(size, getMem(size), getReg(size));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionCmpRegMem(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
SUB(size, getReg(size), getMem(size));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionCmpAccImm(Size size) -> void {
|
|
|
|
SUB(size, getAcc(size), fetch(size));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionTestAcc(Size size) -> void {
|
|
|
|
AND(size, getAcc(size), fetch(size));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionTestMemReg(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
AND(size, getMem(size), getReg(size));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionMultiplySignedRegMemImm(Size size) -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
wait(2);
|
|
|
|
modRM();
|
2017-08-10 11:26:02 +00:00
|
|
|
setReg(Word, MULI(Word, getMem(Word), size == Word ? (int16_t)fetch(Word) : (int8_t)fetch(Byte)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionIncReg(uint16_t& reg) -> void {
|
|
|
|
reg = INC(Word, reg);
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionDecReg(uint16_t& reg) -> void {
|
|
|
|
reg = DEC(Word, reg);
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionSignExtendByte() -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
setAcc(Word, (int8)getAcc(Byte));
|
|
|
|
}
|
|
|
|
|
2017-08-10 11:26:02 +00:00
|
|
|
auto V30MZ::instructionSignExtendWord() -> void {
|
2016-02-04 10:29:08 +00:00
|
|
|
setAcc(Long, (int16)getAcc(Word));
|
|
|
|
}
|