Commit Graph

379 Commits

Author SHA1 Message Date
E. C. Masloch
8e8fcd1628 sys: fix, work on DOS versions that clobber di in int 25h/26h
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
2024-05-19 17:39:15 -04:00
Bernd Wilhelm Böckmann
1ce349ef26 fixes #148 2024-05-16 18:01:06 -04:00
Andrew Bird
1b6de0fda6
Merge pull request #155 from andrewbird/ow-01
CI: Switch back to openwatcom current build
2024-04-29 01:05:56 +01:00
Andrew Bird
875d12dc56 CI: Switch back to openwatcom current build
The latest build got some compatibilty fixes so we can now start using
it again [fixes #138]
2024-04-29 00:56:11 +01: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
ea951d8136
Merge pull request #137 from andrewbird/ci-dos
CI add Watcom and optionally Turbo C 2.01 builds
2024-03-05 10:11:25 +00:00
Andrew Bird
d8ecb409a9 CI: Use FreeDOS kernel and FreeCOM 2024-02-24 19:38:56 +00:00
Andrew Bird
5b87617f66 CI: No need to rerun the workflow if PR is edited 2024-02-24 17:38:16 +00:00
Andrew Bird
92f9a5125e CI: Test DOS built kernels for existence and boot 2024-02-24 17:38:15 +00: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
Andrew Bird
3c97674cbf Country: Update submodule 2024-02-24 17:38:13 +00:00
Andrew Bird
4c58d4c7e2 CI: Add DOS builds
1/ Watcom 1.9
   a) Kernel and other directories building fine
   b) Share doesn't support Watcom for TSR.

2/ Turbo C 2.01
   a) Kernel build needs some functions that are missing.
   b) Sys not building for the same reason,
   c) Share building nicely.
   d) Need to figure out how to get tc201 compiler to Github Actions

3/ IA16-GCC
   a) not currently supported by build.bat so commented out
2024-02-24 17:37:41 +00:00
Andrew Bird
be11b50252 Share: Update submodule 2024-02-23 15:00:48 +00:00
E. C. Masloch
8552d833bb boot: fix boot loader assembly listing files [fixes #97] 2024-02-18 14:20:56 -05:00
E. C. Masloch
1cd4a75e98 sys: fix, allow odd magic offsets to work as expected
Created using this scriptlet:

sed -i -re 's/\(\(int \*\)newboot\)\[([0-9A-Fa-fxX]+)\/sizeof\(int\)\]/\*\(int \*\)\(\&newboot\[\1\]\)/g' sys/sys.c
2024-02-18 14:20:56 -05:00
E. C. Masloch
fc3032deb7 oemboot: use magic offsets macro 2024-02-18 14:20:56 -05:00
E. C. Masloch
19058ff1bf sys: correct a magic offset (problem: odd offsets won't work) 2024-02-18 14:20:56 -05:00
E. C. Masloch
9783ac97e0 boot32, boot32lb: mark magic offsets with macro 2024-02-18 14:20:56 -05:00
E. C. Masloch
d9b0615ad5 magic: prepare for FAT32 use 2024-02-18 14:20:56 -05:00
E. C. Masloch
5a6d3a449f makefile: list magic.mac for boot 2024-02-18 14:20:56 -05:00
E. C. Masloch
bcf3c1701a magic.mac: extract from boot.asm 2024-02-18 14:20:56 -05:00
E. C. Masloch
4ae6f22249 sys, boot: mark additional magic offsets 2024-02-18 14:20:56 -05:00
E. C. Masloch
eb75bea6c1 boot: display new magic offset in hexadecimal 2024-02-18 14:20:56 -05:00
E. C. Masloch
4d30378bb6 boot: extract magicoffset macro 2024-02-18 14:20:56 -05:00
E. C. Masloch
b5414153c6 boot: display new magic offset (but in decimal) 2024-02-18 14:20:56 -05:00
E. C. Masloch
f036741b6b sys: update magic offset of OEM FAT12 jmp offset 2024-02-18 14:20:56 -05:00
E. C. Masloch
55f2a81406 sys: check default content of all magic offset patchsites 2024-02-18 14:20:56 -05:00
E. C. Masloch
0776645017 boot: move READBUF and READADDR_OFF/SEG to allow 8 KiB sector size 2024-02-18 14:20:56 -05:00
E. C. Masloch
5cbe1ffcf0 boot: fix and update memory layout map 2024-02-18 14:20:56 -05:00
E. C. Masloch
ef10fa11e3 boot32, boot32lb: fix and update memory layout maps 2024-02-18 14:20:56 -05:00
E. C. Masloch
2aa51a1992 boot: move cluster list to 1FE0h:2200h (128 KiB file, up to /L 0x200)
1FE0h:2200h happens to be linear 22000h. Like the memory map
update to the FAT32 loaders for #127 this allows to load a
file of up to 128 KiB (rounded to cluster size) with an /L
parameter for SYS of up to 0x200.
2024-02-18 14:20:56 -05:00
E. C. Masloch
4682e23b57 boot: rename FATBUF to CLUSTLIST to better reflect use (oemboot pick) 2024-02-18 14:20:56 -05:00
E. C. Masloch
9ac407ae63 boot32, boot32lb: avoid big file overlap with FAT sector [fixes #127] 2024-02-18 14:20:56 -05: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
Andrew Bird
db949bf0b2
Merge pull request #136 from andrewbird/ci-update
CI: Update github actions and runner versions
2024-02-07 12:46:05 +00:00
Andrew Bird
c0467ef7e3 CI: Update github actions and runner versions 2024-02-07 12:35:27 +00: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