mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[FREELDR] Save used register when calling PNPBIOS
This commit is contained in:
parent
2bf116359b
commit
d55276aad9
1 changed files with 7 additions and 3 deletions
|
@ -104,7 +104,8 @@ pnp_not_found:
|
||||||
PUBLIC PnpBiosGetDeviceNodeCount
|
PUBLIC PnpBiosGetDeviceNodeCount
|
||||||
PnpBiosGetDeviceNodeCount:
|
PnpBiosGetDeviceNodeCount:
|
||||||
|
|
||||||
/* Save param-regs */
|
/* Save registers */
|
||||||
|
push rbx
|
||||||
push rcx
|
push rcx
|
||||||
push rdx
|
push rdx
|
||||||
|
|
||||||
|
@ -115,6 +116,7 @@ PnpBiosGetDeviceNodeCount:
|
||||||
/* Restore param-regs */
|
/* Restore param-regs */
|
||||||
pop rdx
|
pop rdx
|
||||||
pop rcx
|
pop rcx
|
||||||
|
pop rbx
|
||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov ax, [BSS_PnpNodeSize]
|
mov ax, [BSS_PnpNodeSize]
|
||||||
|
@ -148,14 +150,16 @@ PnpBiosGetDeviceNode:
|
||||||
and eax, HEX(0f)
|
and eax, HEX(0f)
|
||||||
mov word ptr [BSS_PnpBiosBufferOffset], ax
|
mov word ptr [BSS_PnpBiosBufferOffset], ax
|
||||||
|
|
||||||
/* Save rcx */
|
/* Save registers */
|
||||||
push rcx
|
push rcx
|
||||||
|
push rbx
|
||||||
|
|
||||||
/* Call the real mode function */
|
/* Call the real mode function */
|
||||||
mov bx, FNID_PnpBiosGetDeviceNode
|
mov bx, FNID_PnpBiosGetDeviceNode
|
||||||
call CallRealMode
|
call CallRealMode
|
||||||
|
|
||||||
/* Restore rcx */
|
/* Restore registers */
|
||||||
|
pop rbx
|
||||||
pop rcx
|
pop rcx
|
||||||
|
|
||||||
/* update node number */
|
/* update node number */
|
||||||
|
|
Loading…
Reference in a new issue