|
|
— |
blog:pushbx:2023:0821_late_mid_august_work [2023-08-21 20:20:36 +0200 Aug Mon] (current) ecm created |
| ====== Late mid August work ====== |
| |
| **2023-08-20** |
| |
| The main developments this work occurred on the Enhanced DR-DOS codebase, which I [[https://hg.pushbx.org/ecm/edrdos|collected into a repo]] before patching it. Some of the patches [[https://www.bttr-software.de/forum/board_entry.php?id=20457|were contributed by a user of the BTTR forum]]. |
| |
| |
| ===== seekext ===== |
| |
| The seekext TSR [[https://hg.pushbx.org/ecm/seekext/rev/4b5ba69359dc|gained support for passing the file handle information service on int 21h function 71A6h to the redirector]]. This uses a dosemu2 extension service on int 2Fh function 11A6h, if available. This is particularly important for the 2011 revision of EDR-DOS as that will crash when given a redirector file handle. (The crash sometimes was somewhat benign, but that was purely by chance.) |
| |
| Running the original FreeDOS kernel (as opposed to fdpp) on dosemu2 it seems that seekext is actually not needed for passing functions 7142h or 71A6h to dosemu2's MFS redirector, as it will detect the error returned by the DOS kernel and then handle the service if an MFS file handle was specified. (It is an open question what happens if doslfn is loaded within dosemu2. Perhaps seekext still has a use for the function 71h subfunctions then.) |
| |
| (Running seekext is still useful for its Short hook, which handles function 42h (old-style) seeking in terms of new-style seeking.) |
| |
| |
| ===== callver ===== |
| |
| Minor version numbers below 10 [[https://hg.pushbx.org/ecm/callver/rev/89f20e312a8e|are padded to two digits now]]. |
| |
| |
| ===== WarpLink ===== |
| |
| The mak script [[https://hg.pushbx.org/ecm/warplink/rev/f0e3f581b918|now allows to override the dosemu2 executable]] to use. |
| |
| |
| ===== d2fcbfix ===== |
| |
| [[https://github.com/dosemu2/dosemu2/commit/9cf2b7560|The older, 2019 revision of dosemu2]] that is used on our server by default has a bug in returning an opened FCB handle from the MFS redirector to DOS. The Zero Flag is incorrectly set when the redirector open function calls into DOS's int 2Fh function 120Ch. This causes dosemu2 to return an error to the DOS. |
| |
| [[https://hg.pushbx.org/ecm/d2fcbfix/rev/85ada858f2f8|The d2fcbfix TSR fixes the error]] by patching the helper used by dosemu. Instead of calling the function 120Ch then returning with an ''iret'', the patched helper will force the flags on the stack to NC, NZ before returning. This appears to fix the bug. |
| |
| Side effects are unlikely, as the function 120Ch helper is only called when the open has succeeded, so we never want to set the flags differently. |
| |
| In the dosemu2 repo, this bug has been fixed long since. In fact, it appears that the bug was fixed soon after the revision that we're using on the server. However, I preferred to prepare this fix rather than try to upgrade the old dosemu2 revision on the server. |
| |
| |
| ===== Website scripts ===== |
| |
| The automatic build script [[https://hg.pushbx.org/ecm/wwwecm.scr/rev/c76f3fb10441|now includes WarpLink and EDR-DOS]]. |
| |
| The build script [[https://hg.pushbx.org/ecm/wwwecm.scr/rev/61075c0a230a|now hardlinks the created zip files]] into the ''/ecm/download/old/'' subdirectories at the time of the build. This replaces the prior choice of moving the files there once a subsequent build runs and wants to create its zip file anew. To switch to the new style, [[https://hg.pushbx.org/ecm/wwwecm.scr/file/61075c0a230a/one-time-create-old|a one-time script]] hardlinked all current builds into the old subdirectories once. |
| |
| |
| ===== Enhanced DR-DOS ===== |
| |
| Starting one week ago, I collected all prior releases of the DR-DOS/OpenDOS Enhancement project (not including obsolete WIP patches) [[https://hg.pushbx.org/ecm/edrdos/|into a repo]]. I [[https://hg.pushbx.org/ecm/edrdos/rev/55d7ba64b5ff|updated the build scripts]] to use only the tools that shipped with the OpenDOS MRS release (which unfortunately lack sources) or open source tools. (JWasm and OpenWatcom are considered open source by OSI but not free software by the FSF. ([[https://github.com/Baron-von-Riedesel/JWasm/issues/20|This may be about to change]] if [[https://github.com/open-watcom/open-watcom-v2/wiki/Relicensing-effort|the relicensing efforts]] succeed.)) |
| |
| DR-DOS became free to distribute, modify, and use more than one year ago, with [[https://pushbx.org/ecm/download/edrdos/license.htm|the new license agreement by DRDOS, Inc. on 2022-07-07]] which refers to "CP/M and its derivatives". While some have argued that DR-DOS is not a derivative of CP/M, I do think it is. During the last week I happened to notice that EDR-DOS [[https://hg.pushbx.org/ecm/edrdos/file/version-7.01/command/message.asm#l204|carries copyright statements]] that reach back to the year 1976. But of course, in 1976 there was neither 86-DOS nor any of its compatible systems yet. So I take this as an additional hint that DR-DOS is considered a derivative of CP/M. |
| |
| Apart from updating the build scripts to run on an entirely redistributable toolchain, I also changed the sources some. Most of these changes are bugfixes. Some of them [[https://www.bttr-software.de/forum/board_entry.php?id=20457|were contributed on the BTTR forum]], DOS Ain't Dead. Here's an overview of all the bugfixes: |
| |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/89e7ba090418|Fix a bug]] to allow command.com COLOUR command source to compile with OpenWatcom 1.9 |
| * Fix most uses of hardcoded offsets in segment 70h, including [[https://hg.pushbx.org/ecm/edrdos/rev/b9a44c6cdaec|the interrupt vector save area at 70h:100h]] (needed for JEMM's fast boot) |
| * Make warning message from hardcoded offsets [[https://hg.pushbx.org/ecm/edrdos/rev/f97ae3473bd5|show up at all]], and extend them with [[https://hg.pushbx.org/ecm/edrdos/rev/4a75e47f5288|a name parameter]] to make them more useful |
| * Fix functions [[https://hg.pushbx.org/ecm/edrdos/rev/3e028ba2f389|7142h]] and [[https://hg.pushbx.org/ecm/edrdos/rev/c2717a36dfb3|71A6h]] on redirector handles, and additionally pass these to the corresponding dosemu2 extension services |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/573788744efd|Handle seek on device handles]] as if the device was [[https://hg.pushbx.org/ecm/edrdos/rev/125f5089838a|an empty file]] |
| * Fix an instance of [[https://hg.pushbx.org/ecm/edrdos/rev/ec8058f76aea|a double segment prefix]] rejected by JWasm |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/09995bec7806|Fix command help]] assuming that C write function won't change ''es'' |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/f5d12d31477b|Preserve some data]] in segment 50h which reportedly was used otherwise |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/18f345fe99d5|Do not try to call int 13h function 48h]] on diskettes, to avoid problems reported with GRUB4DOS |
| * Make function 7305h [[https://hg.pushbx.org/ecm/edrdos/rev/7eb6972a83da|return an error status]] in the Carry Flag and ''ax'' register ([[https://hg.pushbx.org/ecm/ldebug/file/0ace864f1d54/source/ww.asm#l115|expected by lDebug]]) |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/e1f57eef325f|Support concurrent LFN file searches]], storing their DTAs in a heap and returning the LFN find handle from function 714Eh (freed by function 71A1h or during non-TSR non-self-parented process termination) |
| * Allow an LFN file search [[https://hg.pushbx.org/ecm/edrdos/rev/da8bc90cc7f0|to match all directory entries]] when the pattern is specified as ''*'' (in addition to the pattern ''*.*'' which also matches all entries) |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/24c12c1fb618|Change some unsupported function 71h subfunctions]] to return error 7100h instead of error 0001h, which is reported to be more compatible |
| |
| |
| Some extensions also were added, including: |
| |
| * Calling the dosemu2 extension services on int 2Fh functions 1142h, 11A6h, and 11C2h |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/baaecb5920c9|Supporting int 21h function 33FFh]] to report a version string (like FreeDOS and RxDOS), as suggested on the forum |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/8d01d7fe3cc1|Remove outdated line]] indicating "NON-COMMERCIAL USE ONLY" |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/08149a0368bf|Share the common tails]] of several DCONFIG commands and parameters, contributed on the forum |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/2657badc1c91|Move version strings into a single file]], copied into the three module subdirectories during the build |
| * (The RASM86 assembler does not support pathnames with directory specifications, as it appears to open include files using FCB functions. Further, it does not support nested include files. And it doesn't allow double quotes for initialising data.) |
| * [[https://hg.pushbx.org/ecm/edrdos/rev/e31e5bd7e514|Add debugger detection]], running an ''int3'' instruction with NC and expecting the flags to change to CY to indicate debugger presence. When this occurs, interrupts 0, 1, and 3 are not hooked by the DOS. |
| * Minor optimisations |
| * An updated [[https://hg.pushbx.org/ecm/edrdos/rev/85c323f0def3|build description document]], listing what is needed and how to build within dosemu2 |
| |
| |
| |
| {{tag>seekext callver warplink dosemu2 d2fcbfix wwwecm edrdos}} |
| |
| |
| ~~DISCUSSION~~ |
| |