VOGONS


First post, by ratco

User metadata
Rank Newbie
Rank
Newbie

If I use (for example) Links, I can use the "Shell" option and Links remains in memory, while allowing me to use the command line. If in that command line I open another program (let's say WordPerfect) I can once again go to the dos command line. Typing exit will put me back on Wordperfect, allright, but is there a way to, instead, go to Links, without closing Wordperfect?
I am not asking for these particular programs, I am try to learn if there is a way to switch between Dos applications that stay in memory, but not in the same order as they were opened. These programs (LInks and Wordperfect) are simply good examples of what I want to do.

Thanks!

Reply 1 of 8, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Some form of task-switching is also supported by DOS Shell.
What you did was essencially running a new instance of command.com each time.
Other programs you can try are Windows/386, OS/2 and DESQview. Or, if you're brave - DoubleDOS.
And there where also real multi-tasking DOSes, like PC-MOS/386 and Concurrent DOS.

Edit: I assume you're asking about the possibility to "pick" an already running program from memory,
after it was launched in the command line offered in the File->Shell menu item each time. Now, that's tricky to answer. In theory, yes.
But I think there are a few things to take care of, like environment variables, vectors, contiguous memory, etc..

And since every time you drop to the shell you'll invoke a new instance of command.com, that's also kept in memory.
That's not to be confused by the shell "line", without the c:\> prompt. This one simply passes the command to DOS,
which executes it on the existing, underlying command.com, I think.

But I'm speaking under correction, this matter isn't my special subject. I'm already happy understanding the basic mechanics inside of DOS.
A book about TSR programming is a good start to learn about such details.
Anyway, out of curiousity, why do you ask about this matter ?

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 2 of 8, by ratco

User metadata
Rank Newbie
Rank
Newbie

I apologize my explanation wasn't clear.

In pure DOS: I open Program1, use the "go to DOS" option, and it puts Program1 "on hold" while I can use the DOS command line, type EXIT and be back at the program with the same state it was in when I left it.
I open Program1, use the "go to DOS" option, it puts the Program1 "on hold" while I go to DOS command line, there I open Program2, and again use that program "go to DOS" option. If I type EXIT I go back to Program2, where I can exit that program and finally go back once again to Program1. But is there a way to go back directly to Program1?
I assume with Windows or DesqView or OS/2 it is possible, but I am asking if DOS (FreeDOS or MSDOS) byt itself can do it.

Thanks.

Reply 3 of 8, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
ratco wrote:

I assume with Windows or DesqView or OS/2 it is possible, but I am asking if DOS (FreeDOS or MSDOS) byt itself can do it.

How would you expect that to be possible?

Reply 4 of 8, by brostenen

User metadata
Rank l33t++
Rank
l33t++
ratco wrote:
I apologize my explanation wasn't clear. […]
Show full quote

I apologize my explanation wasn't clear.

In pure DOS: I open Program1, use the "go to DOS" option, and it puts Program1 "on hold" while I can use the DOS command line, type EXIT and be back at the program with the same state it was in when I left it.
I open Program1, use the "go to DOS" option, it puts the Program1 "on hold" while I go to DOS command line, there I open Program2, and again use that program "go to DOS" option. If I type EXIT I go back to Program2, where I can exit that program and finally go back once again to Program1. But is there a way to go back directly to Program1?
I assume with Windows or DesqView or OS/2 it is possible, but I am asking if DOS (FreeDOS or MSDOS) byt itself can do it.

Thanks.

MS Dos 6.22, as an example. Are a single task, single user OS.
The only way to get multitasking going (or more correct, task managing), are to install some sort of shell.
A pure MS Dos 1.00 to 6.22 can not do what you are asking for.

Don't eat stuff off a 15 year old never cleaned cpu cooler.
Those cakes make you sick....

My blog: http://to9xct.blogspot.dk
My YouTube: https://www.youtube.com/user/brostenen

001100 010010 011110 100001 101101 110011

Reply 5 of 8, by Anonymous Freak

User metadata
Rank Member
Rank
Member

No.

As others have said, DOS by itself is single-task, single-application.

Individual applications can implement a "call out to DOS" functionality, (including DOS Shell, included with MS-DOS 5.0 or higher.) But the DOS kernel / Command.com itself has no such functionality. When using the "call out to DOS" functionality, you are at the mercy of that application's implementation of swapping itself out and running Command.com in the remaining memory.

So in your example, when you boot to MS-DOS, you are running the single task "command.com"

Then when you run Links, command.com removes most of itself from memory, and loads links.exe with the instruction "when you exit, reload this memory address" which contains the bit of command.com that stayed in memory.

When you invoke Links' "drop to DOS" function, Links removes most of itself from memory, and loads ANOTHER command.com in to memory, with the instruction that "when you exit, reload this memory address" which contains the bit of Links that stayed in memory. Note that because the bit of memory the first copy of command.com left behind is in use, Links instructs to use a different memory address.

From that DOS, you load Word Perfect. The little bit of Links is still in memory, the little bit of the original command.com is still in memory, and this time around, the "new" command.com leaves a little bit of ITSELF in memory, too, telling Word Perfect "when you quit, reload this memory address"...

Each time, you are launching a new process, and the old "reload this memory address" pointers are not *ACTIVE* at all. They are simply instructions left alone in memory, waiting to be called. If you never quit Word Perfect, those addresses are never called, neither copy of command.com is ever actively doing anything, and Links never actively does anything.

Again, if you drop to DOS from Word Perfect, you're just repeating the cycle. Word Perfect unloads most of itself, leaving behind only a little bit, with the instruction to the new (THIRD!) command.com to call that address when it quits. That new third command.com only knows about Word Perfect's "callback address", it is completely unaware of the bits of the other two command.coms, or Links. Oh, it knows that those bits of memory are unavailable for its use, but it has no directions to call them for any reason.

When you type "exit" at a command.com prompt, it really just tells command.com "hey, call back to that address you were told about when you loaded and run that." The DOS from Word Perfect only knows about the address to reactive Word Perfect. Word Perfect (when you quit) only knows about the address to reactivate the command.com that Links launched. The command.com that Links launched only knows about the address to reactivate Links. Links only knows about the address to reactivate the initially-booted command.com. The initially-booted command.com knows that there is no "callback address," so typing exit there does nothing.

Note that if you look at the autoexec.bat created by Windows 95/98's "Boot to DOS" mode, it actually "calls" command.com, with the exit command of "win.com" - so that this DOS mode understands "when you exit, run win.com". (Which then loads enough to realize it had been launched that way, and reboots in to "normal Windows 95/98".)

Reply 6 of 8, by yawetaG

User metadata
Rank Oldbie
Rank
Oldbie
brostenen wrote:

A pure MS Dos 1.00 to 6.22 can not do what you are asking for.

According to this, there is a rare version of MS-DOS with the unfortunate name of MS-DOS 4.0 that can do preemptive multitasking.

Reply 7 of 8, by brostenen

User metadata
Rank l33t++
Rank
l33t++

That I did not know... Thinking hard, I might have had this told years and years ago.
I am just not shure if it ever was 4.0 that I was told about. Thanks for the link 😀

Don't eat stuff off a 15 year old never cleaned cpu cooler.
Those cakes make you sick....

My blog: http://to9xct.blogspot.dk
My YouTube: https://www.youtube.com/user/brostenen

001100 010010 011110 100001 101101 110011