E. C. Masloch 86db573347 sys.c: in _dos_findfirst set DTA rather than copying from PSP:80h
Running prior to this commit, a /K switch with a name at a certain
position will write all-blanks into the boot sector loader. If that
happens, lDOS instsect will not detect a valid load file name:

C:\>sys a: /bootonly /k ldos.com
System transferred.

C:\>instsect /bo a:
Detected FAT12 FS.
Keeping original sector loader.
Sector valid, FS ID match and proper jump.
Type heuristic: "FreeDOS (FreeDOS)"
No name detected.
Unit selection code not found in sector. Keeping as is.
Part info code not found in sector. Keeping as is.
Query geometry code not found in sector. Keeping as is.
Auto LBA detection (HDD only) found in sector. Keeping as is.
Previous geometry: 2 CHS Heads, 18 CHS Sectors, 0 Hidden
Writing boot sector to sector.
C:\>

Running after this commit sets the name as desired:

C:\>sys a: /bootonly /k ldos.com
System transferred.

C:\>instsect /bo a:
Detected FAT12 FS.
Keeping original sector loader.
Sector valid, FS ID match and proper jump.
Type heuristic: "FreeDOS (FreeDOS)"
1st name: "LDOS.COM"
Unit selection code not found in sector. Keeping as is.
Part info code not found in sector. Keeping as is.
Query geometry code not found in sector. Keeping as is.
Auto LBA detection (HDD only) found in sector. Keeping as is.
Previous geometry: 2 CHS Heads, 18 CHS Sectors, 0 Hidden
Writing boot sector to sector.
C:\>

For reference, the libi86 implementation of _dos_findfirst also
sets the DTA to the user buffer rather than copying around the
resulting search record. So it is likely that Turbo C or Watcom
do it similarly to this:

3ecc416499/host-gcc/dos/dos-findfirst.c (L43)
2025-11-11 12:37:19 -05:00
2017-12-22 09:37:31 -05:00
2024-02-24 17:38:13 +00:00
2012-10-14 20:08:06 -04:00
2021-10-17 06:37:05 -04:00
2024-02-23 15:00:48 +00:00
2021-12-30 11:55:17 -05:00
2025-10-31 08:39:17 -04:00
2017-12-06 23:13:47 -05:00
2024-12-31 15:44:14 -05:00

fd kernel

FreeDOS kernel - current 0xFD version is 2.44 (2044)

http://www.fdos.org/kernel/

The FreeDOS kernel implements the core MS/PC-DOS (R) compatible functions. It is derived from Pat Villani's DOS-C kernel and released under the GPL v2. Please see http://www.freedos.org/ for more details about the FreeDOS (TM) Project. This was originally a branch based on 2042 SVN 0xFD kernel; the full svn history has since been added to git (see other branches) and current development of release kernels are available here. Please fork and submit a Pull Request!

Compiled kernels ready to use (just copy kernel.sys over an existing install) are available at http://www.fdos.org/kernel/testing/git/ - also available are the source archive and fdpkg compatible packages. *** TODO update links/upload archives

This version of the kernel is intended only for 8086+ or 80386+ IBM compatible computers in continuation of the goals of the FreeDOS Project. Please see http://www.fdos.org/kernel for my 0xDC kernel that is work on merging back in some of the original portability aspects and other supported features at the cost of some compatibility with older hardware/software.

Please feel free to email me - PerditionC@gmail.com

Now with automatic builds and soon tests Build

Description
FreeDOS kernel - implements the core MS-DOS/PC-DOS (R) compatible operating system. It is derived from Pat Villani's DOS-C kernel and released under the GPL v2 or later. Please see http://www.freedos.org/ for more details about the FreeDOS (TM) Project.
Readme 13 MiB
Languages
C 56.8%
Assembly 35.7%
Makefile 1.8%
C++ 1.8%
Shell 1.7%
Other 2.2%