I got to set up the lDebug development environment on a new Debian 12 installation on the amd64 machine. (The SSD seems to have caused crashes recently, and it had the root file system of the prior Debian installation.) Here's how I installed dosemu2 (from source), FreeDOS (from packages plus my recent kernel and FreeCOM builds), and lDebug (from assembly source).
Install the following packages using synaptic: (many based on dosemu2's current INSTALL file)
Install these packages too:
Clone the following from the directory ~/proj:
hg clone https://hg.pushbx.org/ecm/ldebughg clone https://hg.pushbx.org/ecm/lmacroshg clone https://hg.pushbx.org/ecm/ldosboothg clone https://hg.pushbx.org/ecm/inicomphg clone https://hg.pushbx.org/ecm/bootimghg clone https://hg.pushbx.org/ecm/crc16-thg clone https://hg.pushbx.org/ecm/symsniphg clone https://hg.pushbx.org/ecm/mktmpinchg clone https://hg.pushbx.org/ecm/tellsizehg clone https://hg.pushbx.org/ecm/tractesthg clone https://hg.pushbx.org/ecm/instsecthg clone https://hg.pushbx.org/ecm/scanptabgit clone https://github.com/emmanuel-marty/lzsagit clone https://github.com/dosemu2/dosemu2
Enter directory ~/proj/dosemu2 and run:
./autogen.sh ./default-configure --disable-fdpp make sudo make install
Make directory ~/.dosemu/drive_c and download:
unzip freecom.zip command.comunzip -j fdkernel.zip bin/kernel.sysunzip -j fdkernel.zip bin/sys.com
Enter directory ~/proj/install-freedos/ and enter commands: (Probably not all needed, this is just what worked for me.)
cd src ./dosemu-downloaddos -o freedos13 ./dosemu-downloaddos -o freedos13userspace ./dosemu-setupfreedos ./dosemu-installfreedosuserspace
In directory ~/.dosemu/drive_c create symlinks:
ln -s ../command.com bin/command.com ln -s ../sys.com bin/sys.com
Enter directory /usr/local/share/dosemu/dosemu2-cmds-0.3/ and run:
cp -ia fdppconf.sys ~/.dosemu/drive_c/fdconfig.sys cp -ia fdautoem.bat ~/.dosemu/drive_c nano ~/.dosemu/drive_c/fdconfig.sys nano ~/.dosemu/drive_c/fdautoem.bat
Contents of file fdconfig.sys edited to read:
device=d:\dosemu\umb.sys devicehigh=d:\dosemu\ems.sys SWITCHES=/F DOS=UMB dosdata=umb fileshigh=128 lastdrive=Z rem emufs.sys /all replaces emufs.com devicehigh=d:\dosemu\emufs.sys /all devicehigh=d:\dosemu\cdrom.sys set SHELL_ALLOW_EXIT=1 shellhigh=c:\command.com /p:fdautoem.bat
Contents of file fdautoem.bat (not edited):
@echo off rem autoexec.bat for DOSEMU + FreeDOS path d:\dosemu rem this is needed when booting from dosemu-freedos-bin if exist f:\gnu\nul path %PATH%;f:\bin;f:\gnu if exist c:\bin\nul path %PATH%;c:\bin set HELPPATH=f:\help if exist c:\help\nul set HELPPATH=c:\help if exist e:\tmp\nul call swapdrv.bat c: e: set TEMP=c:\tmp if not exist %TEMP%\nul mkdir %TEMP% emusound -e emumouse c 1 prompt $P$G rem uncomment to load another bitmap font rem lh display con=(vga,437,2) rem mode con codepage prepare=((850) f:\cpi\ega.cpx) rem mode con codepage select 850 rem chcp 850 echo Welcome to dosemu2! system -s DOSEMU_VERSION echo Build %DOSEMU_VERSION% call exechlp.bat -ep
Setup ~/.hgrc
In ~/proj/lzsa run make and symlink lzsa executable into path.
In ~/proj/tellsize compile program and place executable tellsize in path.
In ~/proj/ldebug/source copy cfg.sh to ovr.sh
and edit line setting INICOMP_METHOD to set it to only lzsa2.
Build several lDebug builds:
./mak.sh ./makerd build_name=cdebugx build_options="-D_DEBUG -D_DEBUG_COND -D_PM" ./mak.sh build_name=cdebug build_options="-D_DEBUG -D_DEBUG_COND -D_PM=0" ./mak.sh
Enter directory ~/.dosemu/drive_c/bin and create symlinks:
ln -s ../../../proj/ldebug/bin/ldebug.com ln -s ../../../proj/ldebug/bin/ldebugu.com ln -s ../../../proj/ldebug/bin/lddebugu.com ln -s ../../../proj/ldebug/bin/lddebug.com ln -s ../../../proj/ldebug/bin/lcdebug.com ln -s ../../../proj/ldebug/bin/lcdebugu.com ln -s ../../../proj/ldebug/bin/lcdebugx.com
Create a configuration with the following contents (also in ~/.dosemu/drive_c/bin):
@:applicationstartup @:devicestartup @install getinput @?version
Using these commands:
nano ldebug.sld ln -s ldebug.sld lcdebug.sld ln -s ldebug.sld lddebug.sld
In DOS run sys config c:\kernel.sys checkdebugger=1
Symlink ~/.dosemu/drive_c/rxdos.com to an lDebug executable in order to bootload the debugger.
This is the output of booting (dosemu -t):
dosemu2 2.0pre9-dev-20230704-1320-g3b250d8d0 Configured: 2023-07-06 10:08:54 +0000
Get the latest code at http://dosemu2.github.io/dosemu2
Submit Bugs via https://github.com/dosemu2/dosemu2/issues
Ask for help in mail list: linux-msdos@vger.kernel.org
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, GPL v2 (or any later version) distribution conditions.
FreeDOS kernel - GIT (build 2043 OEM:0xfd) [compiled Jul 3 2023]
Kernel compatibility 7.10 - GNUC - FAT32 support
(C) Copyright 1995-2022 Pasquale J. Villani and The FreeDOS Project.
All Rights Reserved. This is free software and comes with ABSOLUTELY NO
WARRANTY; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation;
either version 2, or (at your option) any later version.
C: HD1, Pri[ 1], CHS= 0-1-1, start= 0 MB, size= 2000 MB
D: HD2, Pri[ 1], CHS= 0-1-1, start= 0 MB, size= 2000 MB
dosemu XMS 3.0 & UMB support enabled
UMBs unavailable!
dosemu EMS driver rev 0.9 installed.
UMBs unavailable!
EMUFS host file and print access available
dosemu CDROM driver installed (V0.2)
FreeCom version 0.85a - GNUC - XMS_Swap [Mar 31 2023 23:40:37]
BLASTER=A220 I5 D1 H5 P300 T6
MIDI=SYNTH:2 MAP:E MODE:0
Welcome to dosemu2!
Build 2.0pre9-dev-20230704-1320-g3b250d8d0
C:\>
I don't know what exactly displays the two "UMBs unavailable!" lines and why. If I boot into the debugger then enter boot protocol freedos then q, these lines do not appear. Regardless whether they appear, DOS UMBs are set up and used properly.
Discussion
Reported a bug in https://github.com/dosemu2/dosemu2/issues/2038
Had to edit
ovr.shsome more:Or run
./makqimg.shmanually. Required in order to build the QEMU boot diskette image used bytest.py.Had to copy over the
~/.sshdirectory from old home file system, and add a line to the[paths]section of~/proj/ldebug/.hg/hgrc:The
shellhighline infdconfig.sysneeds to set a higher environment size like/e:2048otherwise long-ish-Ecommand lines to dosemu2 will fail.Components for building lDebug are listed in https://pushbx.org/ecm/doc/ldebug.htm#buildingcomponents
Cloned https://github.com/atomicobject/heatshrink and ran
makeand symlinked theheatshrinkexecutable into the path, too.Cloned https://hg.pushbx.org/ecm/bdiff.jh and compiled both files and symlinked.
Cloned https://github.com/mookid/diffr.git and installed
rustcpackage, then in~/proj/diffrrancargo install --path .(This fetches some more crates as they are apparently called.) Thenln -s "$PWD/target/release/diffr" ~/mods/bin/According to https://linuxize.com/post/how-to-add-user-to-group-in-linux/ use:
Needed for TracList.
Installed openssh-server package.
Cloned https://github.com/mentalisttraceur/cdexec.git and built using
make, then linked into path.Installed GNU time for new feature of lDebug build script.
cat ~/.gitconfig [user] email = pushbx@ulukai.org name = C. MaslochNeeded for the EDR-DOS build.
Changed fdconfig.sys line
DOS=UMBto readDOS=UMB,highInstall
libb64-devnow needed by dosemu2: https://github.com/dosemu2/dosemu2/pull/2088#issuecomment-1712921416Install
cmakefor building Halibut. Then rungit clone https://github.com/ecm-pushbx/halibut, change directory into this, runcmake .then runcmake –build .git clone https://github.com/lz4/lz4and thenmakethen symlinklz4. This needs the update in https://hg.pushbx.org/ecm/ldebug/rev/156a4890666eDownload exomizer 3.0.2 from https://bitbucket.org/magli143/exomizer/wiki/Home then unzip it into an empty directory.
cd srcthenmakethen symlinkexomizergit clone https://github.com/emmanuel-marty/apultra.gitthencd apultrathenmakethen symlinkapultracpan install enumfor TracList's convlist.pl