2016-02-04 10:29:08 +00:00
|
|
|
//00 addb mem,reg
|
|
|
|
//01 addw mem,reg
|
|
|
|
auto V30MZ::opAddMemReg(Size size) {
|
|
|
|
modRM();
|
|
|
|
setMem(size, alAdd(size, getMem(size), getReg(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
//02 addb reg,mem
|
|
|
|
//03 addw reg,mem
|
|
|
|
auto V30MZ::opAddRegMem(Size size) {
|
|
|
|
modRM();
|
|
|
|
setReg(size, alAdd(size, getReg(size), getMem(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
//04 add al,#imm
|
|
|
|
//05 add ax,#imm
|
|
|
|
auto V30MZ::opAddAccImm(Size size) {
|
|
|
|
setAcc(size, alAdd(size, getAcc(size), fetch(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
//08 orb mem,reg
|
|
|
|
//09 orb mem,reg
|
|
|
|
auto V30MZ::opOrMemReg(Size size) {
|
|
|
|
modRM();
|
|
|
|
setMem(size, alOr(size, getMem(size), getReg(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
//0a orb reg,mem
|
|
|
|
//0b orb reg,mem
|
|
|
|
auto V30MZ::opOrRegMem(Size size) {
|
|
|
|
modRM();
|
|
|
|
setReg(size, alOr(size, getReg(size), getMem(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
//0c or al,#imm
|
|
|
|
//0d or ax,#imm
|
|
|
|
auto V30MZ::opOrAccImm(Size size) {
|
|
|
|
setAcc(size, alOr(size, getAcc(size), fetch(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opAdcMemReg(Size size) {
|
|
|
|
modRM();
|
|
|
|
setMem(size, alAdc(size, getMem(size), getReg(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opAdcRegMem(Size size) {
|
|
|
|
modRM();
|
|
|
|
setReg(size, alAdc(size, getReg(size), getMem(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opAdcAccImm(Size size) {
|
|
|
|
setAcc(size, alAdc(size, getAcc(size), fetch(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opSbbMemReg(Size size) {
|
|
|
|
modRM();
|
|
|
|
setMem(size, alSbb(size, getMem(size), getReg(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opSbbRegMem(Size size) {
|
|
|
|
modRM();
|
|
|
|
setReg(size, alSbb(size, getReg(size), getMem(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opSbbAccImm(Size size) {
|
|
|
|
setAcc(size, alSbb(size, getAcc(size), fetch(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opAndMemReg(Size size) {
|
|
|
|
modRM();
|
|
|
|
setMem(size, alAnd(size, getMem(size), getReg(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opAndRegMem(Size size) {
|
|
|
|
modRM();
|
|
|
|
setReg(size, alAnd(size, getReg(size), getMem(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opAndAccImm(Size size) {
|
|
|
|
setAcc(size, alAnd(size, getAcc(size), fetch(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opSubMemReg(Size size) {
|
|
|
|
modRM();
|
|
|
|
setMem(size, alSub(size, getMem(size), getReg(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opSubRegMem(Size size) {
|
|
|
|
modRM();
|
|
|
|
setReg(size, alSub(size, getReg(size), getMem(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opSubAccImm(Size size) {
|
|
|
|
setAcc(size, alSub(size, getAcc(size), fetch(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opXorMemReg(Size size) {
|
|
|
|
modRM();
|
|
|
|
setMem(size, alXor(size, getMem(size), getReg(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opXorRegMem(Size size) {
|
|
|
|
modRM();
|
|
|
|
setReg(size, alXor(size, getReg(size), getMem(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opXorAccImm(Size size) {
|
|
|
|
setAcc(size, alXor(size, getAcc(size), fetch(size)));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opCmpMemReg(Size size) {
|
|
|
|
modRM();
|
|
|
|
alSub(size, getMem(size), getReg(size));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opCmpRegMem(Size size) {
|
|
|
|
modRM();
|
|
|
|
alSub(size, getReg(size), getMem(size));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opCmpAccImm(Size size) {
|
|
|
|
alSub(size, getAcc(size), fetch(size));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opTestAcc(Size size) {
|
|
|
|
alAnd(size, getAcc(size), fetch(size));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opTestMemReg(Size size) {
|
|
|
|
modRM();
|
|
|
|
alAnd(size, getMem(size), getReg(size));
|
|
|
|
}
|
|
|
|
|
|
|
|
auto V30MZ::opMultiplySignedRegMemImm(Size size) {
|
|
|
|
wait(2);
|
|
|
|
modRM();
|
Update to v097r14 release.
byuu says:
This is a few days old, but oh well.
This WIP changes nall,hiro,ruby,icarus back to (u)int(8,16,32,64)_t.
I'm slowly pushing for (u)int(8,16,32,64) to use my custom
Integer<Size>/Natural<Size> classes instead. But it's going to be one
hell of a struggle to get that into higan.
2016-02-16 09:11:58 +00:00
|
|
|
setReg(size, alMuli(size, getMem(size), size == Word ? (int16_t)fetch(Word) : (int8_t)fetch(Byte)));
|
2016-02-04 10:29:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//40 inc ax
|
|
|
|
//41 inc cx
|
|
|
|
//42 inc dx
|
|
|
|
//43 inc bx
|
|
|
|
//44 inc sp
|
|
|
|
//45 inc bp
|
|
|
|
//46 inc si
|
|
|
|
//47 inc di
|
2016-02-16 09:27:55 +00:00
|
|
|
auto V30MZ::opIncReg(uint16_t& reg) {
|
2016-02-04 10:29:08 +00:00
|
|
|
reg++;
|
|
|
|
}
|
|
|
|
|
|
|
|
//48 dec ax
|
|
|
|
//49 dec cx
|
|
|
|
//4a dec dx
|
|
|
|
//4b dec bx
|
|
|
|
//4c dec sp
|
|
|
|
//4d dec bp
|
|
|
|
//4e dec si
|
|
|
|
//4f dec di
|
2016-02-16 09:27:55 +00:00
|
|
|
auto V30MZ::opDecReg(uint16_t& reg) {
|
2016-02-04 10:29:08 +00:00
|
|
|
reg--;
|
|
|
|
}
|
|
|
|
|
|
|
|
//98 cbw
|
|
|
|
auto V30MZ::opSignExtendByte() {
|
|
|
|
setAcc(Word, (int8)getAcc(Byte));
|
|
|
|
}
|
|
|
|
|
|
|
|
//99 cwd
|
|
|
|
auto V30MZ::opSignExtendWord() {
|
|
|
|
setAcc(Long, (int16)getAcc(Word));
|
|
|
|
}
|