Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Enhanced DR-DOS kernel and command interpreter ported to JWasm and OpenWatcom C

License

NotificationsYou must be signed in to change notification settings

SvarDOS/edrdos

Repository files navigation

This project maintains the sources of the Enhanced DR-DOS (EDR) kerneland command interpreter ported to

  • theJWasm assembler,version 2.17 or later, and
  • theOpenWatcom toolchain,version 1.9 or later.

This kernel is used by theSvarDOS distribution as itsdefault kernel.

Kernel flavors

The EDR kernel may be built in different flavors. The historic oneconsists of two files,DRBIO.SYS andDRDOS.SYS. The new one consists ofa single fileKERNEL.SYS, which gets built by default.

The kernel is compatible with the FreeDOS load protocol. It can be usedas a drop in for the FreeDOS KERNEL.SYS by replacing it with the EDR KERNEL.SYS.

Notice that the EDR and FreeDOS kernels are not 100% compatible,especially regarding the drive letter ordering and the expected formatof the config.sys files.

Binary snapshots

Binaries and a 1.44M floppy image are built automatically through Githubactions. To download them, go to theactions page,and then click the last successful workflow build job. The files are providedunder the artifacts section.

Build instructions

I was able to successfully build the kernel and command interpreter underDOS, Win32, Linux and MacOS.

Requirements

The makefiles expect the following executables to be present:

  • jwasm, for DOS it isjwasmd
  • wmake
  • wlink
  • exe2bin
  • andwcl if building command.com.

Building under UNIX-like operating systems

If you build under a UNIX-like operating system, make sure to buildthe tools under theltools/unix directory first by invokingmake insidethe directory. The defaultcc (usually GCC or CLANG) should beable to successfully build the binaries.

Also make sure that$WATCOM/h is in your INCLUDE path prior building thecommand processor, as theowsetenv.sh provided by OpenWatcom v2 puts$WATCOM/lh into the INCLUDE path. However, when building DOS applicationsthis is the wrong include directory. You will encounter the following errormessage if the path is wrong:

wcc -q -os -s -dFINAL -dPASSWORD -dWATCOMC -i=. -Fobin/com.obj com.c/opt/watcom/lh/setjmp.h(51): Error! E1185: Invalid register name 'eax' in #pragma

Building single-file kernel

You may build the single-file version of the kernel and the command interpreterby calling the OpenWatcom wmake utility viawmake fromthe project root directory. The kernel file is namedKERNEL.SYS, and thecommand interpreter is namedCOMMAND.COM. Both files are placed under thebin directory.

Building dual-file kernel

You may build the historic dual-file version of the kernel consisting ofDRBIO.SYS and DRDOS.SYS by invokingwmake SINGLEFILE=0 from the project root directory.The generated kernel binaries and COMMAND.COM will be placed under thebindirectory.

Building an uncompressed kernel

You may generate uncompressed kernel binaries by givingCOMPRESSED=0 to the wmake calls above.

Version and Git revision

Version and revision information may be given to wmake viaVERSION=<YYYYMMDD> and / orGIT_REV=<8-digit commit hash>. This infois shown upon kernel boot. If this information is not provided,?is displayed instead.

The helper scriptbuild.sh can be used under Unix like operating systemsto call wmake with VERSION set to the current date and GIT_REV to thecurrent Git revision.

Cleaning the tree

Runwmake clean in the project root directory to remove the filescreated during build.

Installation

After building, make sure that thebin directory contains

  • DRBIO.SYS and DRDOS.SYS, or KERNEL.SYS
  • COMMAND.COM
  • SYS.COM

Using SYS under DOS

Under DOS, you may use the provided SYS command to make a bootable disk.To make a bootable floppy, insert a freshly formatted disk intodrive A: (you may have to substitute the drive letter).

Then invoke:

SYS A:

from within the directory containing the files mentioned above. TheSYS command then copies DRBIO.SYS, DRDOS.SYS and COMMAND.COM onto thefloppy and installs a boot loader to make the floppy bootable, orKERNEL.SYS and COMMAND.COM if the single-file kernel was built.

You may also manually copy the kernel and command interpreter over tothe drive to be booted, like so for the single-file version:

SYS A: /BOOTONLYCOPY KERNEL.SYS A:\COPY COMMAND.COM A:\

SYS is then only used to install a proper bootloader. If it is alreadyinstalled, you may skip the first step. But you then have to make surethat the boot loader already installed "speaks" the right protocol.This is the FreeDOS boot protocol for KERNEL.SYS, and the EDR bootprotocol for DRBIO.SYS and DRDOS.SYS.

Technically, you can also useDRBIO.SYS with the FreeDOS boot prococol, but then you have to renameit to KERNEL.SYS. Otherwise, the bootloader will not find its kernel.

Using mkimage.sh under UNIX-like operating systems

Under Linux and MacOS you may invokesh mkimage.sh from theimagedirectory. This generates a bootable 1.44M floppy imageedrdos.img includinga minimal fileset to get you running: the kernel, command interpreterand the SYS utility.

Make sure to build the binaries prior to running this script.

To build a dual-file image, runsh mkimage.sh dualfile instead.

The script depends onMtools andddbeing installed.

Components provided by the FreeDOS project

The provided SYS command is part of the FreeDOS kernel repositoryThe binary was built from this specificcommit.

FreeDOS SYS is distributed under theGNU General Public License,v2 or any later version.

Thecode for the installed bootsectorcomes from FreeDOS.


[8]ページ先頭

©2009-2025 Movatter.jp