summaryrefslogtreecommitdiff
path: root/ldlinux.asm
diff options
context:
space:
mode:
authorhpa <hpa>2001-03-28 05:11:21 +0000
committerhpa <hpa>2001-03-28 05:11:21 +0000
commit6a4ffe2abb885b7d39346d0ec3aa8346f3b5bfd3 (patch)
tree2dda1660d7f5ccc55bacdd3592ea74a6889aa5e2 /ldlinux.asm
parent25a6b8292c0cdb6a6bfbe70e3c774075828d87f5 (diff)
downloadsyslinux-6a4ffe2abb885b7d39346d0ec3aa8346f3b5bfd3.tar.gz
Add hack that hopefully will make -s mode less necessarysyslinux-1.54-pre2
Diffstat (limited to 'ldlinux.asm')
-rw-r--r--ldlinux.asm18
1 files changed, 9 insertions, 9 deletions
diff --git a/ldlinux.asm b/ldlinux.asm
index 9617e25b..39301e7f 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -588,10 +588,11 @@ wstr_1: lodsb
;
disk_error: dec si ; SI holds the disk retry counter
jz kaboom
- xchg ax,bx ; Shorter than MOV
pop bx ; <I>
pop cx ; <H>
pop dx ; <G>
+ pop ax ; <F> (AH = 0)
+ mov al,1 ; Once we fail, only transfer 1 sector
jmp short disk_try_again
return: ret
@@ -670,20 +671,19 @@ gls_lastchunk:
mov dl,[bsDriveNumber]
xchg ax,bp ; Sector to transfer count
; (xchg shorter than mov)
- push ax ; <F> Number of sectors we're transferring
- mov ah,02h ; Read it!
+ mov si,retry_count ; # of times to retry a disk access
;
; Do the disk transfer... save the registers in case we fail :(
;
- mov si,retry_count ; # of times to retry a disk access
-disk_try_again: push dx ; <G>
+disk_try_again:
+ push ax ; <F> Number of sectors we're transferring
+ mov ah,02h ; READ DISK
+ push dx ; <G>
push cx ; <H>
push bx ; <I>
- push ax ; <J>
- push si ; <K>
+ push si ; <J>
int 13h
- pop si ; <K>
- pop bx ; <J>
+ pop si ; <J>
jc disk_error
;
; Disk access successful