From 6fbd7cd2f9663ff906076fe92cb3cee130dc1f72 Mon Sep 17 00:00:00 2001 From: Doczom Date: Thu, 9 May 2024 14:47:16 +0000 Subject: [PATCH] Krn: Fixed the disk size output function and fixed the "end if" position when compiling extended_primary_loader git-svn-id: svn://kolibrios.org@10016 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/fs/fs_lfn.inc | 6 ++++-- kernel/trunk/fs/parse_fn.inc | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel/trunk/fs/fs_lfn.inc b/kernel/trunk/fs/fs_lfn.inc index f0ffec1b73..d28f20cf41 100644 --- a/kernel/trunk/fs/fs_lfn.inc +++ b/kernel/trunk/fs/fs_lfn.inc @@ -448,8 +448,10 @@ file_system_lfn: jz @f mov eax, dword[ebp+DISK.MediaInfo.Capacity] mov edx, dword[ebp+DISK.MediaInfo.Capacity+4] - shld edx, eax, 9 - shl eax, 9 + mov ecx, [ebp + DISK.MediaInfo.SectorSize] + bsf ecx, ecx + shld edx, eax, cl + shl eax, cl mov [edi+36], edx mov [edi+32], eax @@: diff --git a/kernel/trunk/fs/parse_fn.inc b/kernel/trunk/fs/parse_fn.inc index cc2dfe5a44..32b9ab4179 100644 --- a/kernel/trunk/fs/parse_fn.inc +++ b/kernel/trunk/fs/parse_fn.inc @@ -71,7 +71,6 @@ else jne .next_cd @@: ret -end if .hard_disk: sub al, '1' @@ -82,6 +81,8 @@ end if mov [ecx+9], dword 'IBRI' mov [ecx+13], byte 0 ret +end if + endp cp866toUpper: