Git Product home page Git Product logo

comcom64's Introduction

dosemu2

dosemu2 is an emulator for running DOS programs under linux. It can also serve as a VM to boot various DOSes.

Binary packages for ubuntu are available here: https://code.launchpad.net/~dosemu2/+archive/ubuntu/ppa

Binary packages for fedora are here: https://copr.fedorainfracloud.org/coprs/stsp/dosemu2

Binary packages for OpenSUSE are here: https://download.opensuse.org/repositories/home:/stsp2/openSUSE_Tumbleweed

Please send bug reports to https://github.com/dosemu2/dosemu2/issues

Running

Just type

dosemu

to run an emulator.

Use

dosemu -E <dos_cmd>

to run <dos_cmd> and exit (add -T to not exit).

Use

dosemu -K <unix_dir> -E <dos_cmd>

or

dosemu <unix_full_path> -- <dos_prog_args>

to run DOS programs from unix directory.

If you want to run the DOS program from a DOS directory, use this syntax:

dosemu -K :C:\\games\\carma -E carma.exe

This will run carma.exe from c:\games\carma. Note the leading colon after -K: it means that the DOS path, rather than unix path, is specified. You can actually specify both paths:

dosemu -K ~/dosgames:carma -E carma.exe

This creates the DOS drive for ~/dosgames, then chdirs to carma and runs carma.exe.

Configuring

Per-user configuration file can be created as ~/.dosemu/.dosemurc. Add your custom settings there. Look into the global configuration file /etc/dosemu/dosemu.conf for existing settings, their descriptions and default values, and modify the local config accordingly. $_hdimage is probably the first setting to look into, as it configures the host fs access.

Create c:\userhook.sys and/or c:\userhook.bat files to customize your boot sequence. userhook.sys can contain the config.sys directives and userhook.bat can contain custom boot commands.

Drive C: is usually located at ~/.dosemu/drive_c. You can add DOS programs there. Or you can run dosemu -d <unix_dir> to mount the <unix_dir> as a new DOS drive.

comcom64's People

Contributors

andrewbird avatar ecm-pushbx avatar stsp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

comcom64's Issues

Environment variable contents are upcased

A batch file that sets the var CC and then echos it

set CC=tcc
echo %CC%
with Comcom32 it's upcased
G:\>echo TCC
TCC
with FreeCOM the case is preserved
G:\>echo tcc
tcc

Impact - prevents passing case sensitive switches via env vars.

implement /E:+size

Since the env vars are now kept in prot mode mem,
it would make sense to specify the env area size
increment rather than the absolute value.

can run bat file starting with internal command

Any bat file starting with a command name won't run.

C:\>echo > del$.bat
C:\>del$.bat
File(s) not found - $.bat
C:\>echo > foo$.bat
C:\>foo$.bat
 
C:\>ECHO is on
is on
C:\> 

Same with rename$.bat. Can't just require a space because there are characters after a command that are allowed together like dir/p.

Support slashes in environment variables

I cannot find a way to put a / in an environment variable. Everything starting with the / and after it, is cut off.

With FreeDOS FreeCom this works without problems.

implement MEM command

While mem is usually a stand-alone program,
it would be cool to have it built-in.
We can't implement the entire DOS suite, so
my idea is to put the essential commands into
command.com itself.
Also note that MEM is a bit special: in 16bit
command.com the internal commands are
executed w/o freeing extra memory, while the
external ones need a lot of free mem, so
command.com frees its mem before calling
an external cmd. MEM however needs to
always be executed with as much free mem
as possible, or it would be useless. But in
comcom32 there is no need to free any DOS
mem before executing anything. So the need
to have MEM as an external cmd doesn't apply
here.

"more" doesnt work

dir |more
gives the directory listing only for the first time.
The subsequent invocations produce nothing.
And even for the first time, it doesn't pause the
scrolling.

`dosemu -K` with long file name does not work with comcom32.exe

Hello @stsp,

I can now install dosemu2 + fdpp + comcom32 and run a "Hello world" program in "dumb terminal" mode, like so:

$ dosemu -dumb -K hello.com 2>/dev/null
...
Welcome to dosemu2!
    Build 2.0pre6.1-dev-20181117-1628-g9ca4d25
About to Execute : hello.com
Hello world!

However, if I rename hello.com to a long (non-8.3) file name such as hello-lfn.com, for some reason the program is not run any more:

$ dosemu -dumb -K hello-lfn.com 2>/dev/null
...
Welcome to dosemu2!
    Build 2.0pre6.1-dev-20181117-1628-g9ca4d25
About to Execute : hello-lfn.com

I can run programs with long file names if I use FreeDOS's FreeCOM instead of comcom32, which is why I suspect that this is a comcom32 issue.

Thank you!

implement /Y switch

Basic command.com switches should work.
/Y enables the trace mode (confirmation per
every executed command).

CLS doesn't clear the screen in some video modes

Describe the bug
The CLS command correctly clears the screen in the default video mode (3 = co80). It doesn't clear the screen in many (maybe all) other video modes.

To Reproduce
Steps to reproduce the behaviour:

xmode -mode 7
dir
cls

The dosemu prompt appears at the top of the screen, but the directory listing produced by the dir command isn't cleared.

dir /P does not pause

When typing dir /P in a somewhat crowded directory, counter to my expectations, there are no pauses, so the entire thing just scrolls past.
dir | more does the exact same thing on the first run.
On subsequent runs, interestingly, dir | more produces no output!
Context:
This is happening when logged in via putty (on Windows) to my Linux server.
Ubuntu 18.04
dosemu2-2.0pre8

NWClient VLM.EXE causes FDPP crash

I'm attempting to get the Netware Client running over IPX so that I can observe its interaction with the redirector, but I'm having a problem. Firstly this is my first ever experience with IPX so I could be doing it all wrong of course, but I doubt that FDPP crashing should be the result of that. Here's what I have:

  • Tap interface
root@polly:~# ip tuntap list
virbr0-nic: tap UNKNOWN_FLAGS:800
tap0: tap UNKNOWN_FLAGS:800 user 500
  • Virtual Ethernet bridge with tap interface added
root@polly:~# brctl show
bridge name	bridge id		STP enabled	interfaces
virbr0		8000.525400e83d3c	yes		tap0
							virbr0-nic
  • Dosemu configured to use tap
$_pktdriver=(on)                                                                
$_vnet = "tap"                                                                  
$_tapdev = "tap0"                                                               
  • NWClient's STARTNET.BAT file using Packet Driver to ODI shim and the following NET.CFG
NET.CFG
Link Driver NE2000                                                              
        PORT 300                                                                
        IRQ 3                                                                   
        FRAME Ethernet_802.2                                                    
                                                                                
Link Driver PDEther                                                             
        INT 60                                                                  
                                                                                
Link Support                                                                    
        Buffers 4 1514                                                          
                                                                                
NetWare DOS Requester                                                           
        FIRST NETWORK DRIVE = H                                                 
        NETWARE PROTOCOL = NDS BIND                                             
STARTNET.BAT
SET NWLANGUAGE=ENGLISH                                                          
C:\NWCLIENT\LSL.COM                                                             
                                                                                
rem C:\NWCLIENT\NE2000.COM                                                      
C:\pdether\pdether                                                              
                                                                                
C:\NWCLIENT\IPXODI.COM                                                          
C:\NWCLIENT\VLM.EXE                                                             

vlm-crash

The terminal that started dosemu shows this

ajb@polly:/clients/common/dosemu2.git$ ./runstandalonetest.sh
ERROR: fdpp booting, this is very experimental!
MCB corruption
ERROR: fdpp: abort at memmgr.cc:328

And the log file with debug 'f' is here
vlm-crash.zip

WPDOS cannot find command.com

Describe the bug
In WordPerfect for DOS (5.1 or 6.2), the Go to DOS and DOS Command features cannot find COMMAND.COM and therefore don't function. This is with default settings; COMSPEC is defined in the environment as G:\COMMAND.COM (which exists).

To Reproduce
Run any version of WPDOS. Use Ctrl-F1, Go to DOS. The window goes blank for a moment, then returns. To see exactly what the problem is, use Ctrl-F1, DOS Command, and enter "pause" or "dir" or any other command; WP 6.2 returns a message "Can't find COMMAND.COM"; WP 5.1 displays the "Press any key to continue" message but doesn't run the command.

Crash under FreeDOS

I just compiled comcom32 from git using djgpp

ajb@polly:/clients/common/comcom32.git$ /opt/djgpp/bin/i586-pc-msdosdjgpp-gcc --version
i586-pc-msdosdjgpp-gcc (GCC) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I then copied it over the stock FreeDOS 1.20 command.com and tried to boot Dosemu2, but I see this crash

comcom32-freedos1 20

Using comcom32 breaks custom setup with 'drive_c'

When I have activated comcom32 (together with fdpp), I cannot start anymore my custom setup, which has the files too in a folder named drive_c, as the default under ~/.dosemu.

Error message:
ERROR: Bootable drive not found, exiting

Renaming either ~/.dosemu/drive_c or ~/<CUSTOM>/drive_c to another name makes it work again.

The custom setup use this to start DOSEMU2:
/usr/local/bin/dosemu.bin --Fimagedir $G_DOSEMU_HOME -f $G_DOSEMU_HOME/dosemurc $@

Would it be better to check for boot files in the provided paths first and then if not found check in the default paths ?

"system" and "unix" commands don't work when I shell to DOS from WordPerfect

Describe the bug
For the old dosemu, I wrote WordPerfect macros that shelled to DOS and ran the system command to run a shell script. Under dosemu2, the system command works perfectly from the dosemu2 prompt, but it produces "bad command or filename" when I shell to DOS from WP.

To Reproduce
Steps to reproduce the behaviour:
Run WPDOS, Ctrl-F1, Go to DOS, enter "system" or "unix".

I don't know if this is related to the (fixed) problem with shelling to DOS from WP. I don't have another DOS app to test that shells to DOS. If I run command from the dosemu2 prompt, the commands work correctly, but not when I shell to DOS from WP.

Makefile not suitable for building from DOS

The included Makefile does not really work well in DOS. To quickly install DJGPP inside DOSEMU2 (this script right now requires the latest commit to run inside comcom32):
https://github.com/jschwartzenberg/dos-download-scripts/blob/master/dosemu/insdjgpp.bat

Issues I see now:

  1. cmp is not available, this seems to be a shell built-in on other platforms. This should be replaced to let comcom32 be able to be used to build itself.
  2. i586-pc-msdosdjgpp-gcc is just gcc

A batch file build.bat as follows allows me to build comcom32 within a default DOSEMU2 after I installed DJGPP with the above script:

gcc -Wall -O2 -finline-functions -Wmissing-declarations -c command.c
gcc -Wall -O2 -finline-functions -Wmissing-declarations -c cmdbuf.c
gcc -Wall -O2 -finline-functions -Wmissing-declarations -c cmdbuf.c
gcc -Wall -O2 -finline-functions -Wmissing-declarations -c version.c
gcc command.o cmdbuf.o version.o -o comcom32.exe

deltree is unreliable

There is rmfdusr.bat now,
and it uses deltree.
It fails most of the time, but
can succeed after a few retries.

fdnpkg reset PATH?

i have a userhook.bat in drive_c with a custom PATH
after the first launch of fdnpkg, for some reason it is reset back to D:\DOSEMU;F:\

if i put 4dos or freecom in the drive_c root, is works fine

drive_c.tar.gz

Microsoft C 5.10 odd error when run from Gnu Make

Describe the bug
When running Microsoft C 5.10 from gmake it fails

compiler with loadfix
C:\MYTEST>
C:\MYTEST>rem compiler with loadfix
C:\MYTEST>gmake test2
loadfix cl /c import.c
gmake.exe: *** [Makefile:7: test2] Error -1
loadfixed compiler without gmake
C:\MYTEST>
C:\MYTEST>rem loadfixed compiler without gmake
C:\MYTEST>loadfix cl /c import.c
Microsoft (R) C Optimizing Compiler Version 5.10
Copyright (c) Microsoft Corp 1984, 1985, 1986, 1987, 1988. All rights reserved.
 
import.c

To Reproduce
1/ use FDPP, comcom32 and dosemu2
2/ unpack the tar file supplied into the c: drive
3/ change directory to mytest
4/ edit the path in testit.bat to suit your DOS environment
5/ run the testit batch file.

Attach program/game binaries or provide an URL
msctest02.tar.gz

Attach the log
boot.log

A regression?
No idea, I'm afraid.

Additional info
I also note that return code shown from gmake is -1, that doesn't get caught by if errorlevel 1 then exit 1 etc, but not sure if that's a comcom32, or gmake problem?

unclear origins and author RIP

This comcom32 seems to have unclear origins:
https://sourceforge.net/p/freedos-32/mailman/message/3995213/

From what I remember, the source for this program has been sent to the
freedos mailing list by the original author

Contrary to what is said here, I can't find this post by an author.
And very unfortunately we can't contact an author, as he died.
https://www.legacy.com/obituaries/centredaily/obituary.aspx?n=Allen-S.Cheung&pid=181402633

So the only hope is if someone who googles better than
me, can find the original source code dump.

can't be started with SHELL= under PC-DOS

... and likely MS-DOS too.
The reason is that the empty environment is
not properly handled in a djlibc start-up code.
The work-around is to set COMSPEC or any
other var in config.sys.
djlibc patch should be prepared.

fix ^C handling

Currently it just terminates comcom32.
Should instead abort the current command.

Command line tail in PSP is not same as MSDOS or DRDOS

Printing the PSP from MSDOS 6.22 or DRDOS 7.01 shows the command line tail is prefixed with a space, whereas on FDPP with comcom32 it is not. Changing to use Freecom under FDPP gives a similar result to MS/DR DOS.

MS-DOS 6.22

122f:0080 05 20 54 45 53 54 0D 53 45 4D 55 5F 56 45 52 53  . TEST.SEMU_VERS

FDPP/Freecom from FreeDOS 1.20

1cc1:0080 05 20 54 45 53 54 0D 00 32 35 36 0D 0A 00 00 00  . TEST..256.....

FDPP/comcom32

0f09:0080 04 54 45 53 54 0D 50 05 08 00 00 01 08 05 00 02  .TEST.P.........

package djgpp for ubuntu

Currently I upload pre-built comcom32 binary
to git, which is not very good. Needs to integrate
djgpp build with launchpad. The best candidate looks
this one:
https://github.com/jwt27/build-gcc
Just needs to test whether DESTDIR works here
and write debuild boiler-plate.

Implement TAB completion in the console/shell

subj

It's almost reflectory - so when the user hits TAB and instead of DOSBOX-like (or shell-like or cmd-like) completion gets tab char or something inserted and has to backspace over a bunch (BIG BUNCH) of spaces it's VERY ANNOYING.

Sorry for the caps.

mouse integration

It would be very interesting to have a mouse
integration. You can move the cursor in a cmd
line by the mouse left-click. You can scroll the
history buffer with the wheel. You can do the
tab-like completion with the right-click.

copy doesn't support concatenation

Some of the PC-MOS build files use concatenation to create a single larger file, but comcom32 doesn't seem to support this yet. I'm sure I can work around this, so there's no panic on my side to get this in, but I thought I'd open an issue so it doesn't get lost.

C:\>copy userhook.bat + emm386.exe bob.bin
Too many parameters - emm386.exe bob.bin
C:\>echo %errorlevel%
0

This doesn't stop the build process either, because as an internal command it doesn't seem to set ERRORLEVEL. I'm not sure if that's normal behaviour though as only recently I saw a similar report for FreeCOM FDOS/freecom#28

SET command with /P option produce Syntax error

I am migration from DOSEMU to DOSEMU2 and the following bat is not working

echo Elegir impresora:
echo 1) Laser Arriba
echo 2) Laser Abajo
echo 3) Impresora local deskjet (lpt1)
echo 4) Salida a archivo s:\pat\impre.prn
set /p mvar=Ingrese 1, 2, 3 o 4? This is the line causing Sintax error
If %mvar%==1 goto arriba
If %mvar%==2 goto abajo
If %mvar%==3 goto local
If %mvar%==4 goto archivo

This is the output:

Welcome to dosemu2!
Build 2.0pre8
Elegir impresora:

  1. Laser Arriba
  2. Laser Abajo
  3. Impresora local deskjet (lpt1)
  4. Salida a archivo s:\pat\impre.prn
    Syntax error
    Batch file aborted - C:\USERHOOK.BAT, line 20

Then I execute the SET command to find out what happened with mvar variable, please see last line with the weird result.

Apparently not recognizing /P as option, and setting a variable named "/P MVAR"

USERDRV=C
SHELLDRV=E
DOSEMUDRV=D
FDPP_AUTOEXEC=D:\FDPPAUTO.BAT
XBATDRV=F
SHELL_ALLOW_EXIT=1
COMSPEC=E:\COMMAND.COM
PATH=D:\dosemu;E:;F:;C:\bin
TEMP=C:\tmp
ERRORLEVEL=0
BLASTER=A220 I5 D1 H5 P330 T6
MIDI=SYNTH:2 MAP:E MODE:0
DOSEMU_VERSION=2.0pre8
BASES=g:\sistema\dbftele
INDICES=g:\sistema\teleprin
CLIPPER=//f:150
/P MVAR=Ingrese 1, 2, 3 o 4?

Is there any known solution to this?

Exitemu

Describe the bug
I updated to the latest version and ran a dos accounting program from a desktop icon. When I exited the program I noticed that dosemu didn't close and a message that said Bad command or filename - exitemu

It used to happen that when I exited the program I also exited dosemu automatically.

I also checked with a game and the same thing happened.

To Reproduce
Steps to reproduce the behaviour:

Run dosemu and a program with the -E parameter

Attach the binaries
No binaries needed

Attach the log
Attached
boot.log.gz

environment variable editing

First: I did install comcom32 "manually", that is, I extracted comcom32.exe from:

https://code.launchpad.net/~dosemu2/+archive/ubuntu/ppa/+files/comcom32_0.1~alpha2-130-dd29ffa+202011211542~ubuntu21.04.1_amd64.deb

and copied it to .dosemu/drive_c, renaming it to COMMAND.COM. I simply don't want to add any repositories to my debian installation.

The problem with comcom32:

  1. when I enter "set DPMILDR=" I expect the environment variable to disappear. It doesn't, it's still there, with no "contents"
  2. when I enter "set path=c:\hx\bin;%path%", then the PATH variable isn't changed, but a new variable created, so the environment contains both "PATH" and "path" variables ( the latter not being used for executable searches ).

It might be that this is "expected behavior", but in my eyes it's incompatible and needs to be fixed.

too small size for environment

While you can add any env vars with
"set" command, if you run some external
prog that adds the env var (like sound.com),
there is too few space.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.