Commit Graph

183 Commits

Author SHA1 Message Date
Jiri Malak
db43a4b343 far-fix: symbols BIOSInt13, UserInt13 and BIOSInt19 are far (in LGROUP)
these symbols are in LGROUP and generaly cannot be addressed by DGROUP:offset
for Turbo C DGROUP offset overflow because symbols are too far to be addressed by DGROUP offset
2024-07-15 15:21:36 -04:00
Jiri Malak
c0009ebaaf echoto.bat: correct batch file for all parameters blank 2024-07-14 17:09:14 -04:00
Jiri Malak
a5b516dd7b exeflat: add support for response file to exeflat utility
the command line can overflow DOS max length that it fixes this issue
2024-07-14 15:19:48 -04:00
Jiri Malak
2fb0956513 tc2-build: correct various build breaks for Turbo C 2.0 build 2024-07-13 19:37:21 -04:00
Jiri Malak
58573d69d9 tc2-build: correct various build breaks for Turbo C 2.0 build 2024-07-13 19:37:21 -04:00
Jiri Malak
f9beab6d61 headers: resolve headers minor issues
correct header name in comments
use algnbyte.h and algndflt.h as "user" header instead of "system" header
2024-07-11 06:37:00 -04:00
Jiri Malak
2985b3386c ow: use safer form of #pragma aux
using ISO standard reserved word form of #pragma aux
2024-07-11 06:35:41 -04:00
Jiri Malak
5304e657fd time.t: resolve issue with internal and standard C time.h files and remove all hacks
- 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
2024-07-10 11:32:10 -04:00
Jiri Malak
4ca28252da code-mismatch: fix various kernel code discrepancies which break TURBO C build
main issue is missing ASM attributes that C and asm code uses different names
correct long constant by standard suffix 'L' or 'UL'
2024-07-10 11:30:20 -04:00
Bernd Wilhelm Böckmann
1ce349ef26 fixes #148 2024-05-16 18:01:06 -04:00
Bernd Boeckmann
c08313ab62 fix issue #144 by correcting getbpb return code
getbpb now returns 0 instead of S_DONE in case of an uninitialized
partition, copying the default BPB into the BPB.

The previous return of S_DONE in case of uninitialized partitions
resulted in rp->r_bpptr not getting set in bldbpb. This in
combination with indicating success resulted in garbage returned
via rp->r_bpptr.

The DPB values are now being set to the default BPB ones in media_check
ea951d8136/kernel/fatfs.c (L1728)
via call to bpb_to_dpb in case of an uninitialized partition.
This may have side effects. But because DF_NOACCESS is still set, I
think it is the right way to do it.

The commit also masks high bit of AL for INT25/26 containing the drive
number. Some programs may set the bit according to RBIL:

"examination of CPWIN386.CPL indicates that if this call fails with
error 0408h on an old-style (<32M) call, one should retry the
call with the high bit of the drive number in AL set"

Leaving the bit set may render the given drive number unusable.
It should do no harm to mask it to increase the chance of the operation
to succeed. Also, the AH should be set to zero, because drive is given
only in AL.
2024-03-05 16:35:31 -05:00
Andrew Bird
6092afc74d Build: Country submodule now has production target
When country was converted to a submodule (by me) the production
installation target was hacked onto the kernel subdirectory Makefile
which wasn't ideal. Introduce a production target into the country
Makefile that does the installation. Since we want the submodule to be
buildable standalone, we can't include the variable definitions from the
upper level, such as $(DIRSEP) and $(CP), so the caller has to pass those
in at build time if using the production target.

Tested on Linux (GCC + Watcom) and DOS (Watcom)
2024-02-24 17:38:14 +00:00
Kenneth J Davis
edd0732433
move FAR item to own line 2024-02-11 08:59:32 -05:00
Kenneth J Davis
a593799eb0
add some comments regarding relocation of kernel during configuration 2024-02-10 17:38:19 -05:00
Kenneth J Davis
114236da17
allow selection of COM port for debug prints easily overridden during compile, e.g. build.bat /D DEBUG_PRINT_COMPORT /V 2 2024-02-10 17:36:33 -05:00
Kenneth J Davis
716f732e3a
rework to make handling flags simpler, from ecm 2024-02-10 17:34:00 -05:00
Kenneth J Davis
7a73120228
copy over debug print to COM ports from UNSTABLE branch 2024-02-10 17:27:23 -05:00
Kenneth J Davis
795c1df742
prevent possible hang on loading device driver, from ecm 2024-02-08 19:24:55 -05:00
Kenneth J Davis
6a94489230
handle wmake and gmake differences
wmake requires changing into directory as ignores -C option, gmake ignores cd into directory so requires -C subdir option
2024-02-06 18:26:26 -05:00
Kenneth J Davis
19c35ee574
use tab not spaces for Makefile 2024-02-06 16:36:15 -05:00
Bocke
9b6a8579d1 Make build work on DOS
Double ampersands are not supported by DOS command line interpreters. The previous would work only on (modern-ish) Windows.
2024-02-05 10:47:59 -05:00
Bernd Boeckmann
093dea9a7b initdisk.c: format specifier fixes 2 2024-02-04 20:44:19 -05:00
Kenneth J Davis
4ffc5c10a5 fix bug#121 don't look for 123? unless still looking for verb at start of line
allows correctly parsing lines like SHELL=4DOS.COM which otherwise strips 4 leading to looking for shell of "DOS.COM"
2024-02-04 20:37:43 -05:00
Kenneth J Davis
f7bf549544 correct xor to test not clear value, invert test so 808x is 0 and NEC is 1 matching returned value 2024-02-04 19:43:09 -05:00
Kenneth J Davis
07155e6184 fix bug#123, detect NEC V20/V30 as 186 instead of only 8086/8088, based on ecm-pushbx ldebug
see https://hg.pushbx.org/ecm/ldebug/file/7f3440d5824d/source/init.asm#l3071

(cherry picked from commit 5fdcc1d214b821fde33a5bd92ea7d7c0134a2056)
2024-02-04 19:43:09 -05:00
Kenneth J Davis
431be02b0a rework update_dcb() to avoid potential access uninitialized memory 2024-02-03 22:00:17 -05:00
C. Masloch
1c2f541689 intr: avoid random trace in (init_)call_intr 2024-02-03 21:04:11 -05:00
C. Masloch
3ef6d61609 main: fix, only init env once in PSPInit, do not set cmdline tail 2024-02-03 21:01:17 -05:00
C. Masloch
ab3cac6d0c allow gcc build to succeed with -DWIN31SUPPORT 2024-02-03 20:59:11 -05:00
Bernd Boeckmann
9a7d22701d initdisk.c: fix wrong printf format specifiers, fixes #122 2024-02-03 20:52:42 -05:00
Kenneth J Davis
db71b1a783
don't normally show InitDisk while booting 2023-12-20 17:17:08 -05:00
Kenneth J Davis
de96d00402
additional comments about LBA detection 2023-12-20 00:35:01 -05:00
Bernd Boeckmann
cab32344bb only use AH for EDD version detection, as AL is reserved...
...according to the spec
2023-12-19 23:50:02 -05:00
Bernd Boeckmann
a5431d9245 remove BIOS assisted LBA translation, not sure its worth including it 2023-12-19 23:50:02 -05:00
Bernd Boeckmann
b33afdbfad change handling of head count < 2, was a no-op since last commit...
... because heads was always at least 1.
2023-12-19 23:50:02 -05:00
Bernd Boeckmann
c20a97e844 initdisk: actually restrict disk size to 2TB, fix ExtLBAForce usage 2023-12-19 23:50:02 -05:00
Kenneth J Davis
569337a7ef
fix bug# 98 (correct bad CONFIG value 19 with bad value 14, should be 6) and add support for additional CONFIG options Verbose and PartitionMode to sys CONFIG processing 2023-12-19 19:50:22 -05:00
Kenneth J Davis
2e849b36c1
update copyright string to 2023 2023-12-18 20:23:04 -05:00
Kenneth J Davis
7b0633b26b
only print messages once, not each time processing partitions; use LBA if forceLBA enabled in additional cases where LBA support not detected 2023-12-18 18:37:19 -05:00
Kenneth J Davis
4b0162c2a6
default to normal not quiet for initial messages 2023-12-18 18:31:20 -05:00
Kenneth J Davis
cfdd09963f
fix from boeckmann (Bernd Böckmann) for Format GitHub issue #1 - format divide by 0 due to kernel function 440D, subfunction 60 returning a zero for logical_sectors_per_fat as initdisk overflows and calculates incorrect value 2023-12-17 21:01:37 -05:00
Kenneth J Davis
f1249dcd6f
From bzt, initialize drive parameter head & sector values to avoid potential divisions by 0 2023-12-08 21:20:46 -05:00
Kenneth J Davis
5880d36ba9
add ability to adjust verboseness of messages during booting 2023-12-08 18:08:11 -05:00
C. Masloch
95694f7e34 config: delete variable only if it makes enough space to write new 2023-08-30 06:59:41 -04:00
C. Masloch
6101fb2aed config: pass searchvar result to deletevar 2023-08-30 06:59:41 -04:00
C. Masloch
24d19cd05c config: allow to delete variable with empty SET command 2023-08-30 06:59:41 -04:00
C. Masloch
3dafa54e8b config: delete existing variable before writing new contents 2023-08-30 06:59:41 -04:00
C. Masloch
132a0a9f94 truename: fix array overrun (pick from fdpp)
Picked from the commit at fe1c4dc7fe

The referenced issue is at https://github.com/dosemu2/fdpp/issues/212

The patch was applied using unix2dos on the patch file
then `patch -p1 --binary` with the patch file as stdin.
The original used a new define for the maximum path length.
As there is no difference to our current SFTMAX define I
changed this hunk to retain the SFTMAX use.

This fixes a bug when eg function 3Dh receives a buffer
that starts with ".\" but the byte in memory before this
buffer happens to be also a dot. I ran into this problem
semi-randomly during building EDR-DOS with the most recent
WarpLink build. If WarpLink was placed somewhat low in the
Low Memory Area then one of its function 3Dh calls would
happen to have a dot before the pathname buffer. (I had to
load lCDebug using the last fit strategy then enter TSR mode,
to catch the bug without the presence of the debugger working
around the occurrence of the bug.)

Original commit Metadata:

From: Stas Sergeev <stsp@users.sourceforge.net>
Date: Wed, 1 Feb 2023 13:01:55 +0500
Subject: [PATCH] truename: fix array overrun [fixes #212]

src[-2] was peeking into a random memory location.
It seems entire truename() is written by some morons... :(
Its completely unreadable and full of bugs.
2023-08-26 21:32:19 -04:00
C. Masloch
29ccb6e454 main: insure master environment starts out empty 2023-07-03 07:37:00 -04:00
C. Masloch
a0549a395e config: make sure word marker trailing in environment is zero 2023-07-03 07:37:00 -04:00