mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 21:46:05 +00:00
[NTVDM]
Save and restore the general purpose and segment registers around Int32Call calls in the BIOS. Also, make sure CF doesn't get set by the called interrupt procedure. svn path=/trunk/; revision=69297
This commit is contained in:
parent
2ea155305a
commit
d9a6ce4f12
2 changed files with 40 additions and 2 deletions
|
@ -721,7 +721,30 @@ static VOID WINAPI BiosTimerIrq(LPWORD Stack)
|
||||||
* because some programs may hook only BIOS_SYS_TIMER_INTERRUPT
|
* because some programs may hook only BIOS_SYS_TIMER_INTERRUPT
|
||||||
* for their purpose...
|
* for their purpose...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
WORD AX = getAX();
|
||||||
|
WORD CX = getCX();
|
||||||
|
WORD DX = getDX();
|
||||||
|
WORD BX = getBX();
|
||||||
|
WORD BP = getBP();
|
||||||
|
WORD SI = getSI();
|
||||||
|
WORD DI = getDI();
|
||||||
|
WORD DS = getDS();
|
||||||
|
WORD ES = getES();
|
||||||
|
|
||||||
Int32Call(&BiosContext, BIOS_SYS_TIMER_INTERRUPT);
|
Int32Call(&BiosContext, BIOS_SYS_TIMER_INTERRUPT);
|
||||||
|
|
||||||
|
setAX(AX);
|
||||||
|
setCX(CX);
|
||||||
|
setDX(DX);
|
||||||
|
setBX(BX);
|
||||||
|
setBP(BP);
|
||||||
|
setSI(SI);
|
||||||
|
setDI(DI);
|
||||||
|
setDS(DS);
|
||||||
|
setES(ES);
|
||||||
|
setCF(0);
|
||||||
|
|
||||||
// BiosSystemTimerInterrupt(Stack);
|
// BiosSystemTimerInterrupt(Stack);
|
||||||
PicIRQComplete(LOBYTE(Stack[STACK_INT_NUM]));
|
PicIRQComplete(LOBYTE(Stack[STACK_INT_NUM]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,8 +209,15 @@ VOID WINAPI BiosKeyboardIrq(LPWORD Stack)
|
||||||
* In return, if CF is set we continue processing the scan code
|
* In return, if CF is set we continue processing the scan code
|
||||||
* stored in AL, and if not, we skip it.
|
* stored in AL, and if not, we skip it.
|
||||||
*/
|
*/
|
||||||
BYTE CF = getCF();
|
|
||||||
WORD AX = getAX();
|
WORD AX = getAX();
|
||||||
|
WORD CX = getCX();
|
||||||
|
WORD DX = getDX();
|
||||||
|
WORD BX = getBX();
|
||||||
|
WORD BP = getBP();
|
||||||
|
WORD SI = getSI();
|
||||||
|
WORD DI = getDI();
|
||||||
|
WORD DS = getDS();
|
||||||
|
WORD ES = getES();
|
||||||
|
|
||||||
setCF(1);
|
setCF(1);
|
||||||
setAL(IOReadB(PS2_DATA_PORT));
|
setAL(IOReadB(PS2_DATA_PORT));
|
||||||
|
@ -222,7 +229,15 @@ VOID WINAPI BiosKeyboardIrq(LPWORD Stack)
|
||||||
ScanCode = getAL();
|
ScanCode = getAL();
|
||||||
|
|
||||||
setAX(AX);
|
setAX(AX);
|
||||||
setCF(CF);
|
setCX(CX);
|
||||||
|
setDX(DX);
|
||||||
|
setBX(BX);
|
||||||
|
setBP(BP);
|
||||||
|
setSI(SI);
|
||||||
|
setDI(DI);
|
||||||
|
setDS(DS);
|
||||||
|
setES(ES);
|
||||||
|
setCF(0);
|
||||||
|
|
||||||
if (ScanCode == 0xE0)
|
if (ScanCode == 0xE0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue