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
This commit is contained in:
Doczom 2024-05-09 14:47:16 +00:00
parent d8b8010bbd
commit 6fbd7cd2f9
2 changed files with 6 additions and 3 deletions

View File

@ -448,8 +448,10 @@ file_system_lfn:
jz @f jz @f
mov eax, dword[ebp+DISK.MediaInfo.Capacity] mov eax, dword[ebp+DISK.MediaInfo.Capacity]
mov edx, dword[ebp+DISK.MediaInfo.Capacity+4] mov edx, dword[ebp+DISK.MediaInfo.Capacity+4]
shld edx, eax, 9 mov ecx, [ebp + DISK.MediaInfo.SectorSize]
shl eax, 9 bsf ecx, ecx
shld edx, eax, cl
shl eax, cl
mov [edi+36], edx mov [edi+36], edx
mov [edi+32], eax mov [edi+32], eax
@@: @@:

View File

@ -71,7 +71,6 @@ else
jne .next_cd jne .next_cd
@@: @@:
ret ret
end if
.hard_disk: .hard_disk:
sub al, '1' sub al, '1'
@ -82,6 +81,8 @@ end if
mov [ecx+9], dword 'IBRI' mov [ecx+9], dword 'IBRI'
mov [ecx+13], byte 0 mov [ecx+13], byte 0
ret ret
end if
endp endp
cp866toUpper: cp866toUpper: