mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2025-09-09 12:03:27 -04:00

When the extended primary loader for CD was introduced in 2008-2009 it used to load a relatively small secondary loader. Later the secondary loader was integrated into the kernel, hence the primary loader had to load the kernel which is 100kB+. The EDD BIOS specification allows to read less than 0x80 sectors at once using Int 0x13 0x42 service. For a 512-byte sector this is less than 0x10000 bytes which is a 64kB limit. The same limit of 64kB is reached on a CD with only 0x20 sectors, because the sector size is 2048 bytes here. This commit changes the maximum number of sectors that can be read by the loader at once from 0x7f to 0x20, i.e. reading is done in 64kB blocks now.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Загрузочный сектор для ОС Колибри (FAT12, дискета) - Описание Позволяет загружать KERNEL.MNT с дискет/образов объёмом 1.44M, 1.68M, 1.72M и 2.88M Для выбора объёма диска, для которого надо собрать загрузочный сектор, необходимо в файле boot_fat12.asm раскомментировать строку вида: include 'floppy????.inc' для необходимого объёма диска. Доступные варианты: floppy1440.inc, floppy1680.inc, floppy1743.inc и floppy2880.inc - Сборка fasm boot_fat12.asm - Для записи загрузочного сектора на диск/образ под Linux можно воспользоваться следующей командой: dd if=boot_fat12.bin of=288.img bs=512 count=1 conv=notrunc --------------------------------------------------------------------- Floppy FAT12 boot sector for KolibriOS. - Description Allows booting KERNEL.MNT floppies/images with volumes of 1.44M, 1.68M, 1.72M and 2.88M To select the volume of the disk, which should gather boot sector, it was necessary in file boot_fat12.asm uncomment line: include 'floppy????. inc' for the necessary disk volume. Available options is: floppy1440.inc, floppy1680.inc, floppy1743.inc and floppy2880.inc - Compile fasm boot_fat12.asm - To write boot sector to the floppy/image under Linux you can use the following command: dd if=boot_fat12.bin of=288.img bs=512 count=1 conv=notrunc