diff options
author | hpa <hpa> | 1999-05-28 00:23:16 +0000 |
---|---|---|
committer | hpa <hpa> | 1999-05-28 00:23:16 +0000 |
commit | 0be5bea79598c33d91f54ee33d7cc451ed10eeb4 (patch) | |
tree | 85847479f5fab921a433ae4d89a49a1711ad6686 | |
parent | 58bd36d2d780123e8f1b72348a7b44c5298b1dbe (diff) | |
download | syslinux.git-0be5bea79598c33d91f54ee33d7cc451ed10eeb4.tar.gz syslinux.git-0be5bea79598c33d91f54ee33d7cc451ed10eeb4.tar.xz syslinux.git-0be5bea79598c33d91f54ee33d7cc451ed10eeb4.zip |
Slight optimization it seems...
-rw-r--r-- | ldlinux.asm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ldlinux.asm b/ldlinux.asm index e3bede42..aa1658c6 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -701,14 +701,13 @@ __END_STUPID_PATCH_AREA: gls_lastchunk: push ax ; <C> Cylinder # push dx ; <D> Head # - push bp ; <E> Number of sectors we're transferring - push cx ; <F> Sector # + push cx ; <E> Sector # mov cl,6 ; Because IBM was STOOPID shl ah,cl ; and thought 8 bits were enough ; then thought 10 bits were enough... - pop cx ; <F> Sector # - push cx + pop cx ; <E> Sector # + push cx ; <E> Sector # inc cx ; Sector numbers are 1-based or cl,ah mov ch,al @@ -716,6 +715,7 @@ 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! ; ; Do the disk transfer... save the registers in case we fail :( @@ -736,8 +736,8 @@ disk_try_again: push dx ; <G> pop bx ; <I> Buffer location pop ax ; <H> No longer needed pop ax ; <G> No longer needed - pop cx ; <F> Sector # - pop di ; <E> Sector transferred count + pop di ; <F> Sector transferred count + pop cx ; <E> Sector # mov ax,di ; Reduce sector left count mul word [bsBytesPerSec] ; Figure out how much to advance ptr add bx,ax ; Update buffer location |