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)
- fix issue by renaming header file and symbols which consolidate with standard C time.h
- rename also date.h for consistency
- remove all hacks from make files and from sys.c
now can share new dtime.h with standard C time.h without any collision that any order of internal and standard C header path is possible
Running on DR-DOS v7.03, the int 25h call zeroes di leading to a crash
here when di is expected to preserve the stack pointer. So push di twice
and pop it twice. The second pop always gets the saved sp, regardless of
whether int 21h or int 25h/26h are used.
Refer to https://github.com/SvarDOS/edrdos/issues/57#issuecomment-2119360035
Also checks that the total amount of clusters is possible
for the detected file system, erroring out otherwise.
Small FAT32 is displayed in the verbose output specifically.
This should be Enhanced DR-DOS compatible.
oemboot.asm contains an optimisation to save 2 bytes,
by using mov instead of a lea with bp evaluating to
a constant value. This was needed to fit the addition
for 256 spc support. It is otherwise unrelated.
The LBA detection patch offsets in SYS have also been
updated to match the changed boot.asm offsets.
The int86 function is used to call interrupt 21h
service 32h in the reset_drive function. This
function returns a pointer using the ds register.
ds will usually point into the DOS data segment
then (for our kernel). However, the compiler
assumed ds to be unchanged.
cast array using pointer to first element [newboot] instead of pointer to whole array [&newboot] to avoid OW error W115 "&array may not produce intended result" since the address of operator "&" is not required for getting the address of an array.
Also adds a CheckDebugger byte to the CONFIG block and
support for reading and writing this setting in the
SYS CONFIG program. Default is 0 (no check assume absent).