mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
Added checksum calculation to PnPBiosSupported().
Patch by Petr Matousek. svn path=/trunk/; revision=4964
This commit is contained in:
parent
676160308e
commit
a547aaf0c5
1 changed files with 21 additions and 0 deletions
|
@ -40,6 +40,8 @@ EXTERN(_PnpBiosSupported)
|
|||
|
||||
pushl %edi
|
||||
pushl %esi
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
|
||||
xorl %edi,%edi
|
||||
|
||||
|
@ -54,10 +56,27 @@ pnp_again:
|
|||
cmp $0xFFFF0,%esi
|
||||
je pnp_not_found
|
||||
|
||||
pnp_add:
|
||||
addl $0x10,%esi
|
||||
jmp pnp_again
|
||||
|
||||
pnp_found:
|
||||
/* first calculate the checksum */
|
||||
pushl %esi
|
||||
|
||||
pushl $0x21
|
||||
popl %ecx
|
||||
xorl %edx, %edx
|
||||
|
||||
pnp_loop:
|
||||
lodsb
|
||||
addb %al,%dl
|
||||
loopl pnp_loop
|
||||
|
||||
testb %dl, %dl
|
||||
popl %esi
|
||||
jnz pnp_add
|
||||
|
||||
movl %esi,%edi
|
||||
|
||||
/* Calculate the bios entry point (far pointer) */
|
||||
|
@ -74,6 +93,8 @@ pnp_found:
|
|||
pnp_not_found:
|
||||
movl %edi,%eax
|
||||
|
||||
popl %edx
|
||||
popl %ecx
|
||||
popl %esi
|
||||
popl %edi
|
||||
|
||||
|
|
Loading…
Reference in a new issue