32bit TSR

DOS specific questions.
Gablea
Posts: 1017
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

32bit TSR

Postby Gablea » Jul 11, 2018 11:18

Hi all,
Is it possible to create a TSR with FreeBASIC?

What I would like to do is create a program that runs in the background of dos to copy files from the local pc to a shared folder on the server.

Is this possible?

Andy
dasyar
Posts: 336
Joined: Dec 04, 2008 15:31

Re: 32bit TSR

Postby dasyar » Jul 11, 2018 11:42

For those of you who have not played with DOS recently, TSR - Terminate and Stay Resident. In order to have something running in the background, you would need a multitasking program.

There is an earlier thread, in this forum, where the person was trying to make a functional multitasking program, but that thread has gone quiet. For the last 15 or 20 years I was hoping somebody would create a functional 32/64 bit multitasking DOS, but that has gone quiet.
marcov
Posts: 2650
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: 32bit TSR

Postby marcov » Jul 11, 2018 11:53

Yeah, even the "dos ain't dead" forum (http://www.bttr-software.de/forum/) seems to be dead nowadays.
Gablea
Posts: 1017
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: 32bit TSR

Postby Gablea » Jul 11, 2018 11:59

FreeDOS is still alive But that does not have multitasking support yet.

So in the older dos how did a TSR function?
marcov
Posts: 2650
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: 32bit TSR

Postby marcov » Jul 11, 2018 12:57

Gablea wrote:FreeDOS is still alive But that does not have multitasking support yet.

So in the older dos how did a TSR function?


IIRC you had to hook some vectors and then call some int 21 call. But in 32-bit you don't work directly with dos, but with the dos extender. The dos extender documentation and searching for go32v2+tsr might give some places to start.
srvaldez
Posts: 1762
Joined: Sep 25, 2005 21:54

Re: 32bit TSR

Postby srvaldez » Jul 11, 2018 13:25

perhaps HX DOS-Extender might be of interest https://sourceforge.net/projects/hx-dos/files/
the development is discontinued but it should still be a viable product to use.
HX DOS-Extender is a free DOS extender with built-in Win32 PE file format support. Usually the purpose of a DOS extender is to make protected-mode features available for DOS applications. HX fully supports this goal, but goes some steps further. A Win32 API emulation layer is part of HX which allows many Win32 console applications to run in DOS. This emulation goes far beyond similiar approaches in other extenders (Borland's PowerPack, WDOSX or Phar Lab TNT). Furthermore HX implements - limited - support for windows, DirectDraw, GDI and even OpenGL graphics. This allows to run "simple" Win32 GUI apps in DOS as well.

although it supports multithreading it does not support multitasking, so I doubt that it would work for what you want.
Gablea
Posts: 1017
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: 32bit TSR

Postby Gablea » Jul 11, 2018 14:49

I’m open to ideas all I’m trying to do is find a way of moving files from a local machine to server with out locking up the main program while the files copy.

I would need to move the files when ever they show up (say 30 seconds after they are created) as the files are stored on a RAM drive (for speed)

If someone know the best way In dos to copy 20 files extramly quickly (size ranged from 2kb upto 1mb) then I’m all ears (as we say in the UK)

What I am doing is creating a DOS PoS system (as I like dos)
srvaldez
Posts: 1762
Joined: Sep 25, 2005 21:54

Re: 32bit TSR

Postby srvaldez » Jul 11, 2018 15:35

this is just an idea, I don't have the knowledge or expertise to implement it, using HX DOS extender use a thread inside your PoS to copy the files.
marcov
Posts: 2650
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: 32bit TSR

Postby marcov » Jul 11, 2018 16:12

Or run desqview or some other multitasker.
Gablea
Posts: 1017
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: 32bit TSR

Postby Gablea » Jul 11, 2018 16:14

I’ve never heard of that desqview. Is it a comercial program? I suppose to find more info out I’ll google it
caseih
Posts: 1302
Joined: Feb 26, 2007 5:32

Re: 32bit TSR

Postby caseih » Jul 11, 2018 16:49

Yup it is/was a commercial program for running multiple DOS programs. https://en.wikipedia.org/wiki/DESQview

Note that you cannot copy file safely in the background while your POS app is running. DOS simply has no multi-user or file locking capabilities that I know of. You might be able to close your database file, copy it locally, then re-open the database file and continue. Then another process/thread could copy this other local copy to the server for safe keeping. I suspect the local copy could be done fast enough that your POS program wouldn't even blink.
marcov
Posts: 2650
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: 32bit TSR

Postby marcov » Jul 11, 2018 18:02

(it does have locking, it is called share.exe )
Gablea
Posts: 1017
Joined: Apr 06, 2010 0:05
Location: Northampton, United Kingdom
Contact:

Re: 32bit TSR

Postby Gablea » Jul 12, 2018 9:53

I was thinking about having a trigger file so if it shows up the PoS would display a message to the user just saying updating files... and then perform the database updates

Would that be a better option? I would love to have
Mysql support in dos but I’m not the clever to work out the mysql library and I’m sure it would take me years to port it over to dos

But hey we can dream.
angros47
Posts: 1424
Joined: Jun 21, 2005 19:04

Re: 32bit TSR

Postby angros47 » Jul 14, 2018 10:38

Two things: HX DOS extender provides support for multithreading, not for multitasking. To use it, you have to compile using the Win32 version of FreeBasic. By the way, version 1.06 of FreeBasic for DOS supports native multithreading (based on a old, buggy library, but it works). So, if you want to use multiple threads in a single FB programs, you don't need anything else.

Second thing: DESQView was a very interesting program, but nowaday it is completely useless: its last version featured a desktop environment that was better that Windows (https://www.youtube.com/watch?v=V_lfpdK7bQM), but it was basically a port of X Windows for DOS (there was also a GCC port for it). Hardware requirements to run it were the same needed to run Windows 3.1, or a small Linux distro, so, today, it is possible to have exactly the same using some old version of Linux (damnsmalllinux, puppy linux, muLinux, and many others): you can have more features, with the same resources, and you will have a 100% legal and free operating system.
marcov
Posts: 2650
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: 32bit TSR

Postby marcov » Jul 14, 2018 11:26

angros47 wrote:
Second thing: DESQView was a very interesting program.....


The suggestion took into account that the user had some reason to stay with dos in the first place, and I assumed they were software rather than hardware related (I don't think they are because they still have a 486/DX)

DV/X does run many authentic dos programs fine and at the same time. This includes things that are attached to I/O.

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 2 guests