mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +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
|
; CarryFlag set on error
|
||||||
ReadSectorsCHS:
|
ReadSectorsCHS:
|
||||||
popa
|
popa
|
||||||
|
ReadSectorsCHSLoop:
|
||||||
pusha
|
pusha
|
||||||
xchg ax,cx
|
xchg ax,cx
|
||||||
xchg ax,dx
|
xchg ax,dx
|
||||||
|
@ -351,8 +352,8 @@ ReadSectorsCHS:
|
||||||
mov dh,dl ; Head to DH, drive to DL
|
mov dh,dl ; Head to DH, drive to DL
|
||||||
mov dl,[BYTE bp+BootDrive] ; Drive number
|
mov dl,[BYTE bp+BootDrive] ; Drive number
|
||||||
mov ch,al ; Cylinder in CX
|
mov ch,al ; Cylinder in CX
|
||||||
ror ah,1 ; Low 8 bits of cylinder in CH, high 2 bits
|
ror ah,2 ; Low 8 bits of cylinder in CH, high 2 bits
|
||||||
ror ah,1 ; in CL shifted to bits 6 & 7
|
; in CL shifted to bits 6 & 7
|
||||||
or cl,ah ; Or with sector number
|
or cl,ah ; Or with sector number
|
||||||
mov ax,0201h
|
mov ax,0201h
|
||||||
int 13h ; DISK - READ SECTORS INTO MEMORY
|
int 13h ; DISK - READ SECTORS INTO MEMORY
|
||||||
|
@ -375,7 +376,7 @@ NoCarryCHS:
|
||||||
mov es,bx
|
mov es,bx
|
||||||
pop bx
|
pop bx
|
||||||
; Increment read buffer for next sector
|
; Increment read buffer for next sector
|
||||||
loop ReadSectorsCHS ; Read next sector
|
loop ReadSectorsCHSLoop ; Read next sector
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue