mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
Fix for disk error while Loading FreeLoader... discovered by Dave Albert
In ReadSectorsCHS it was pop'ing values off the stack that hadn't been push'ed svn path=/trunk/; revision=3417
This commit is contained in:
parent
7a32bdf315
commit
0f2ad47bfb
1 changed files with 4 additions and 3 deletions
|
@ -338,6 +338,7 @@ ReadSectorsLBA:
|
|||
; CarryFlag set on error
|
||||
ReadSectorsCHS:
|
||||
popa
|
||||
ReadSectorsCHSLoop:
|
||||
pusha
|
||||
xchg ax,cx
|
||||
xchg ax,dx
|
||||
|
@ -351,8 +352,8 @@ ReadSectorsCHS:
|
|||
mov dh,dl ; Head to DH, drive to DL
|
||||
mov dl,[BYTE bp+BootDrive] ; Drive number
|
||||
mov ch,al ; Cylinder in CX
|
||||
ror ah,1 ; Low 8 bits of cylinder in CH, high 2 bits
|
||||
ror ah,1 ; in CL shifted to bits 6 & 7
|
||||
ror ah,2 ; Low 8 bits of cylinder in CH, high 2 bits
|
||||
; in CL shifted to bits 6 & 7
|
||||
or cl,ah ; Or with sector number
|
||||
mov ax,0201h
|
||||
int 13h ; DISK - READ SECTORS INTO MEMORY
|
||||
|
@ -375,7 +376,7 @@ NoCarryCHS:
|
|||
mov es,bx
|
||||
pop bx
|
||||
; Increment read buffer for next sector
|
||||
loop ReadSectorsCHS ; Read next sector
|
||||
loop ReadSectorsCHSLoop ; Read next sector
|
||||
|
||||
ret
|
||||
|
||||
|
|
Loading…
Reference in a new issue