On Sun, Feb 8, 2015 at 1:13 PM, Frantisek Hanzlik <fra...@hanzlici.cz> wrote:
> I'm trying to write a small program that will distinguish whether
> running under dosemu/FreeDOS or not, and accordingly do other things.

I'm not under Linux right now, so I can't double check, but just FYI,
here's (roughly) how I'd do it:

@echo off
if "%_CWD%"=="" goto end
REM ... "set /e" requires FreeCOM 0.84 ...
ver | find /i "0.84" >NUL
if errorlevel 1 goto okay
goto end
set /e BLAH=unix uname
if "%BLAH%"=="" goto realdos
echo ... running DOSEMU ...
goto end
echo ... running native FreeDOS ...
set BLAH=

> I perform Dosemu detection according to instruction and example in this
> old FreeDOS maillist thread:
> http://marc.info/?l=freedos-dev&m=88425176918117&w=2

I know you sent similar e-mail about mixed environments in the past.
Normally you wouldn't want to split hairs unless forced. In other
words, pretending that all things are created equal is the best path
unless hit by some kind of bug or (lack of) feature. In particular,
there are too many environments (and tools and setups) to test.


> (and curiously, in referenced thread deprecated method Int 0xE6 AH=0
> still /after ~17 years/ is supported and seems be working well)

IIRC, only AX=0 [sic] worked for me.

But again, DOSEMU isn't widely deployed, so lots of people don't use
it. It still works fairly well, just not popular. I'm not sure if that
will ever improve. I don't want to discourage you, but I'm not sure
what you want to get working there.

Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
Freedos-user mailing list

Reply via email to