• Please review our updated Terms and Rules here

Using DOSEMU on 64-bit Linux issues

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
44,526
Location
Pacific Northwest, USA
For some time now, my DPMI-using DOS applications running under DOSEMU on AMD64 Linux terminate with the following message:

DPMI: Unhandled Exception 0e - Terminating Client
It is likely that dosemu is unstable now and should be rebooted

This includes PKZIP as well as Microsoft MASM 6.13 and 16-bit C 8.00c. The same applications run fine under XP loaded in a Virtual Box session, but both VB and DOSEMU integrate poorly with the existing Linux environment.

Does anyone know of a fix for this?

(I believe that this qualifies as "vintage software", since there hasn't been a new version of 16-bit MS C in 20 years).
 
Chuck, I don't have an answer for your question, however I suggest you to check here, if you already haven't:

http://www.dosemu.org/docs/HOWTO/x503.html

However, I find "recent" versions of Dosemu a nightmare with respect to (quite) old ones. For example I'm running a few vintage EPROM programmers from the '80s, including a HI-LO one that has a custom ISA board and a few DATA I/O connected via RS-232. I've found no way to make a simple serial port (real hardware one, not USB) under modern Dosemu versions work. I'm keeping an old 486DX PC running a 2002-ish version of Linux and Dosemu just for these programmers (and no, the HI-LO software would not run on real MS-DOS on a 486DX, it's failing to adapt to the actual clock speed).
I whish at least the normal serial ports would be functioning on recent Dosemu versions so I could move the programmers on more modern PCs.
I'm starting to think we should keep some old hardware running for the old software now..

Frank
 
I'm using Dosemu 1.4.0.8, so the version hasn't changed much (1.4.0.8 dates from 2103). It seems that later "security" mods to the Linux kernel have gotten in the way of this, however and I'd like to know how to overcome them. Some switches in "/proc" perhaps?

Note that Dosemu isn't like DOSBOX; it runs code natively and provides a more-or-less seamless mapping to Linux files--one can even run Linux commands in a Dosemu session, so my D: drive corresponds to my Linux /home directory.

Here's my Dosemu logon:

Code:
DOSEMU 1.4.0.8 (2013-01-05), configured: 2018-04-03 20:42:17 +0000
Please test against a recent version before reporting bugs and problems.
Submit Bugs & Patches to linux-msdos@vger.kernel.org or via http://dosemu.org.
FreeDOS kernel 2040 (build 2040 OEM:0xfd) [compiled Jun 21 2011]
Kernel compatibility 7.10 - WATCOMC - FAT32 support

(C) Copyright 1995-2011 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=   392 MB
dosemu XMS 3.0 driver installed.
dosemu EMS driver rev 0.5 installed.
[dosemu cdrom driver installed (V0.2)]
Kernel: allocated 46 Diskbuffers = 24472 Bytes in HMA

FreeCom version 0.84-pre2 XMS_Swap [Aug 28 2006 00:29:00]
HXLdr32 V1.12 installed. Win32 console apps may possibly run now in DOS
Sound on: SB at 0x220-0x22f, IRQ=5, DMA8=1, DMA16=5. MPU-401 at 0x330-0x331.
D: = LINUX\FS/HOME/CHUCK attrib = READ/WRITE
E: = LINUX\FS\CDROM attrib = READ/WRITE
"Welcome to dosemu 1.4.0.8!"
C:\>
 
Did you try:
Code:
echo 1 > /proc/sys/abi/ldt16

That tip should probably be part of the dosemu documentation.

from the bug report?
 
Not possible any longer; seems that it's been removed from the kernel:

Code:
root@Columbia:/proc/sys/abi# echo 1 >/proc/sys/abi/ldt16
bash: /proc/sys/abi/ldt16: No such file or directory

Are there any switches in /boot/config* that I should be looking at?
 
Last edited:
So I dragged out my 64 bit linux laptop and installed DOSEMU. No dice running WATCOM tools. I then decided to try running under Wine and it came back with "unable to allocate DOS memory. Install DOSBox".

Ouch.
 
The integration of Wine using DOSBox leaves--er, something to be desired. At that point, I go to VirtualBox and boot XP. I'll confess that I've not tried running ML or CL using DOSBOX under Wine.

The problem for me using XP under VBox is an executable file on a shared Linux filesystem isn't executable--you have to copy it over to the local XP drive. Bit of a bother, there.

Under the old DOSEMU, you used to be able to run PKZIP without any special switches, now you have to disable 32-bit mode (-3 option) explicitly.
 
Last edited:
How well does it support Linux (long, special characters) file names? It's been a long time since I looked at it--how well does it support 32-bit DPMI?
 
People may wish to look at https://github.com/stsp/dosemu2 as it's where all current Dosemu development is going on. As others have stated, some Linux kernel security tightening has made the 1.4.0.x version in most repos less straightforward to use, Dosemu2 has been rewritten to avoid those issues where possible on 32bit kernels, and on 64bit platforms it uses the kernel's kvm module for near native speed. For Ubuntu there's a PPA https://launchpad.net/~dosemu2/+archive/ubuntu/ppa

Hope it helps.
 
Well, DOSEMU2 installs, but is going to take a heckua lot of reading as it doesn't work quite the same way. I've already discovered the -dumb flag.
 
I installed and tried DOSBOX. Maybe someone can solve this problem:

I want to run it in an xterm window, complete with editing (via mouse). I can do this in VirtualBox and DOSEMU, but the window that DOSBOX runs in has no editing menu, nor does it allow me to change the displayed font (I'm using a WQHD monitor, so the DOSBOX window is very small).

I installed DOSEMU2. It's close, but how does one get a delete or backspace key that works? Not even Ctrl-H works.
 
Dosemu2 has several display modes:
-X X-windows
-S SDL
-t terminal (slang)
-td terminal (dumb)

It sounds like you are using -td mode, that's mainly used for running a DOS command and capturing its output back in Linux which is useful for using old DOS compilers etc. If for some reason you need to run in an xterm, then -t is probably a better option, certainly the backspace key works there for me. Other than that both SDL and X-Windows modes allow cut and paste both within the window and to the host, although somewhat unintuitively you need to hold the left shift key down whilst doing this.
 
I installed and tried DOSBOX. Maybe someone can solve this problem:

I want to run it in an xterm window, complete with editing (via mouse). I can do this in VirtualBox and DOSEMU, but the window that DOSBOX runs in has no editing menu, nor does it allow me to change the displayed font (I'm using a WQHD monitor, so the DOSBOX window is very small).

I installed DOSEMU2. It's close, but how does one get a delete or backspace key that works? Not even Ctrl-H works.

If you absolutely need that, then no, DOSBOX won't work for you. It provides an emulation of the PC's video over SDL, so it's strictly a graphical window, no cut and paste.
 
Back
Top