mirror of
https://github.com/reactos/reactos.git
synced 2024-11-02 21:09:15 +00:00
[SOFT386]
Implement the short unconditional jump instruction (JMP imm8). svn path=/branches/ntvdm/; revision=59932
This commit is contained in:
parent
c6c282fd70
commit
50e90be14b
|
@ -259,7 +259,7 @@ Soft386OpcodeHandlers[SOFT386_NUM_OPCODE_HANDLERS] =
|
||||||
NULL, // TODO: OPCODE 0xE8 NOT SUPPORTED
|
NULL, // TODO: OPCODE 0xE8 NOT SUPPORTED
|
||||||
NULL, // TODO: OPCODE 0xE9 NOT SUPPORTED
|
NULL, // TODO: OPCODE 0xE9 NOT SUPPORTED
|
||||||
NULL, // TODO: OPCODE 0xEA NOT SUPPORTED
|
NULL, // TODO: OPCODE 0xEA NOT SUPPORTED
|
||||||
NULL, // TODO: OPCODE 0xEB NOT SUPPORTED
|
Soft386OpcodeShortJump,
|
||||||
Soft386OpcodeInByte,
|
Soft386OpcodeInByte,
|
||||||
Soft386OpcodeIn,
|
Soft386OpcodeIn,
|
||||||
Soft386OpcodeOutByte,
|
Soft386OpcodeOutByte,
|
||||||
|
@ -1146,3 +1146,25 @@ Soft386OpcodeOut(PSOFT386_STATE State, UCHAR Opcode)
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOLEAN
|
||||||
|
FASTCALL
|
||||||
|
Soft386OpcodeShortJump(PSOFT386_STATE State, UCHAR Opcode)
|
||||||
|
{
|
||||||
|
CHAR Offset = 0;
|
||||||
|
|
||||||
|
/* Make sure this is the right instruction */
|
||||||
|
ASSERT(Opcode == 0xEB);
|
||||||
|
|
||||||
|
/* Fetch the offset */
|
||||||
|
if (!Soft386FetchByte(State, (PUCHAR)&Offset))
|
||||||
|
{
|
||||||
|
/* An exception occurred */
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Move the instruction pointer */
|
||||||
|
State->InstPtr.Long += Offset;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
|
@ -183,4 +183,12 @@ Soft386OpcodeOut
|
||||||
UCHAR Opcode
|
UCHAR Opcode
|
||||||
);
|
);
|
||||||
|
|
||||||
|
BOOLEAN
|
||||||
|
FASTCALL
|
||||||
|
Soft386OpcodeShortJump
|
||||||
|
(
|
||||||
|
PSOFT386_STATE State,
|
||||||
|
UCHAR Opcode
|
||||||
|
);
|
||||||
|
|
||||||
#endif // _OPCODES_H_
|
#endif // _OPCODES_H_
|
||||||
|
|
Loading…
Reference in a new issue