Hi!
Currently I study and optimize the boot sector code. Results up to now:
______________O\_/_________________________________\_/O______________
boot.asm:
- value of sectors in root is not rounded up.
- bug: root search assumes that there present at least one unused entry
(with first zero byte).
- fix: after root directory search loop instead "jmp boot_error" was used
"jc" and there always CF=0; in case of missing kernel this forces trying
to read from random disk place.
- fix: clusters 0,1,0ff0-0ff7 for FAT12 and 0,1,fff0-fff7 for FAT16
now also accepted as chain end.
- fix: after read error block count in LBA_PACKET is changed, so now this
field initialized before INT 13h.
- stack top is now right under boot code (was 0x60 bytes below).
boot32.asm:
- directory sectors was searched from the end.
boot32lb.asm:
- next_cluster: top 4 bits now are not masked.
- fix: imul replaced by mul.
boot32.asm/boot32lb.asm:
- fix: convert_cluster (cluster2sec): clusters 0,1,0ffffff0-0ffffff7
now also accepted as chain end.
- code is now not selfmodifying.
- stack top is now right under boot code (was 0x20 bytes below).
- FAT and directory buffers are now in same segment, as boot code.
- FAT sector# and offset is now calculated in next_cluster by division.
_____________________________________________________________________
O/~\ /~\O
Also, I already free in each boot sector about 40 bytes more (optimization
of boot.asm is not finished yet). In fat32lba currently 77 bytes free.
Probably, this allows to join boot32 and boot32lb, I check this later.
Later I check (and adapt for new boot sectors) SYS.C.
PS: Who selects segment 1FE0h for boot code relocation? Why not 3000h? With
FAT buffer at 2000:0 kernel size is limited by 126k (2000:0-60:0) (in
boot32*.asm). In boot.asm this forces to use offset 2000h (instead 0) for
FAT chain buffer. Is there objections against segment 3000h?
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel