Re: [Freedos-user] DOS program for DOSEMU/FreeDOS enhancement in heterogenous Lin/Win environment

2014-04-21 Thread dos386
> DOS programs, which are still maintained, are mostly supposed to be run
> under windows and their authors often complement them with windows programs

True :-(

> which did some in DOS problematic tasks (e.g. print to windows printer

Indeed a problem

> sent e-mail, find free disk space, download something from internet etc

NOT a problem.

--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


[Freedos-user] DOS program for DOSEMU/FreeDOS enhancement in heterogenous Lin/Win environment

2014-04-21 Thread Frantisek Hanzlik
Hello DOSEMU and FreeDOS gurus,

I'm some time dealing with the idea of ​​writing a program, which should
simplify porting DOS programs which are using some windows supplements
to run on Linux under DOSEMU/FreeDOS. DOS programs, which are still
maintained, are mostly supposed to be run under windows and their
authors often complement them with windows programs, which did some
in DOS problematic tasks (e.g. print to windows printer, sent e-mail,
find free disk space, download something from internet etc.), and
there usually is no support for running these programs under Dosemu+
DOS. On other hand, many of these supplemental tasks should be simple
solve under Linux too (e.g. print to Linux printer via pcl->ghostscript
filter, send mail via mailx/TB, obtain disk space with shell+df script,
download something with wget etc.).
One such program I'm using and I wonder how to do it, to I can also
use these additional features. My idea is that:

1) small DOS program functioning as OS switcher, which I copied as many
 times as there are windows programs, under their names. This switcher
 will be executed by DOS program instead of the original windows program
 - supplement.

2) this switcher program will be driven by simple text configuration
 file, one line will represent one windows program, and each line will
 have three columns:
- program name under which will be this 'switcher' run.
- path to corresponding windows supplement program.
- path to corresponding Linux supplement program/script. When this
  path will begin with drive letter, then it will be started as DOS
  program, otherwise as Linux program/script.

3) this small switcher finds out what name is running, accordingly
  looks in the configuration file, and on the basis of whether it
  run under DOSEMU or not select proper column - program which should
  be started - and run it. Eventual parameters will be simply reused
  from those which switcher receive.

This arrangement (when original DOS program + this switcher will be
on same filesystem, which can be accessed from both Linux and windows)
should allow same functionality when user will work either on Linux or
windows.

And what I would like like to ask a experts there in lists
- this concept is correct and feasible?

- In what language should the switch should be programmed? Will be
  appropriate to use C and Watcom C for DOS compiler?

- This switcher should be perhaps as small as possible? But maybe
  no - whether it will start Linux or windows program, there will
  not be DOS 640 kB memory limitations?

I'm not programmer and it will be tedious job for me, thus I'm asking
there, to avoid to do something stupid.
Maybe, could someone point to some dos C programming examples?
Also, know someone give some example how detect when program is run
under DOSEMU or not? Dosemu has isemu.S/detect.h program for it, but
it is written in assembler and I can't make head or tail of it :(
And I do not understand how the 6+kB resources created 421 B binary,
this is some weird magic.

Thanks for Your recommendations, excuse my English.
Franta Hanzlik



--
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user