summaryrefslogtreecommitdiff
path: root/loadhigh.inc
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-16 06:17:23 +0000
committerhpa <hpa>2004-12-16 06:17:23 +0000
commit55d3481671736d0944115e55be5e4506cf496161 (patch)
tree70f1dcb69516eb776250c7693b06968b68221010 /loadhigh.inc
parent0a75748e975dc05a1c264d0005b84bd1f19ae8da (diff)
downloadsyslinux-55d3481671736d0944115e55be5e4506cf496161.tar.gz
More cleanups; try to get rid of the now-obsolete definition of
"cluster" as the minimum block
Diffstat (limited to 'loadhigh.inc')
-rw-r--r--loadhigh.inc9
1 files changed, 3 insertions, 6 deletions
diff --git a/loadhigh.inc b/loadhigh.inc
index a8e8603f..b7caec47 100644
--- a/loadhigh.inc
+++ b/loadhigh.inc
@@ -54,14 +54,11 @@ load_high:
jna .size_ok
mov eax,(1 << 16)
.size_ok:
- xor edx,edx
push eax ; <B> Bytes transferred this chunk
- div dword [ClustSize] ; Convert to clusters
- ; Round up...
- add edx,byte -1 ; Sets CF if EDX >= 1
- adc eax,byte 0 ; Add 1 to EAX if CF set
+ add eax,SECTOR_SIZE-1
+ shr eax,SECTOR_SHIFT ; Convert to sectors
- ; Now (e)ax contains the number of clusters to get
+ ; Now (e)ax contains the number of sectors to get
push edi ; <C> Target buffer
mov cx,ax
xor bx,bx ; ES:0