Commit Graph

5 Commits

Author SHA1 Message Date
C. Masloch
858934f152 boot, oemboot: fix to abort properly on file not found
Prior to this commit the first cluster specified from the last
compared directory entry would be used if the file is not found.
Fix the wrong (boot.asm) or missing (oemboot.asm) jump to the
error handler so that on file not found an error is displayed.

Reference: https://sourceforge.net/p/freedos/bugs/97/
"Bugs in FAT12/16 boot sector loaders if file not found"
This commit fixes the most crucial bug of this 2012-09-27 report.
2021-07-29 17:19:45 -04:00
C. Masloch
f267341281 oemboot: optimise FAT12 entry loading (picked from lDOS boot)
This way of clearing the upper 4 bits of even FAT entries
saves a byte compared to the prior way. (The next commit
needs one more byte than was previously left over.)

Reference: https://hg.pushbx.org/ecm/ldosboot/file/410b870c0222/boot.asm#l1629
2021-07-29 17:19:45 -04:00
C. Masloch
92ae538f1d boot: allow instsect to match the filesystem ID string
Reference: https://hg.ulukai.org/ecm/instsect/file/33218c729b43/instsect.asm#l1257

lDOS's instsect recently started to default to checking
the filesystem ID string in order to validate that the
boot sector loader to write matches the detected FS.
Using the /S=filename option or building instsect to
include the FreeDOS kernel's loaders would require use
of the /SN switch without this commit.

In addition, boot.asm and oemboot.asm are made to check
that exactly one of the ISFAT12 and ISFAT16 defs is
defined so as to select the FS. Prior to this commit
using both or neither def would silently result in a
broken loader.
2020-11-28 12:11:16 -05:00
C. Masloch
977023f85c boot: fix Int10.0E expected not to alter al (SBC188)
Reference: https://www.bttr-software.de/forum/forum_entry.php?id=16934

The SBC188 video ROM-BIOS handling returns with al=0Ah (LF)
upon interrupt 10h function 0Eh calls that scroll the screen.
This made the FAT12 boot loader crash when booting FreeDOS
off a 1440 KiB diskette. While a fix is expected from their
side too, hardening the loader too is the right thing to do.

With the way this fix is implemented by this commit, it only
needs one additional byte for the loader. The error message
changes from "Error!." to just "Error!", other than
that the behaviour is the same.

The FAT32 loaders already used zero-terminated strings and
thus were not affected by the dependence.
2020-09-18 13:37:49 -04:00
KJD
c431157156 FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00