[comp.os.msdos.programmer] Ms-Dos Source

resnicks@netcom.COM (Steve Resnick) (04/19/91)

In article <91107.143308IO92203@MAINE.BITNET> IO92203@MAINE.BITNET (Scott Maxell) writes:
>Ogden Dumas writes:
>>        Does anyone know where I can get a copy of the Ms-Dos source?  I
>>am trying to turn my PC into a multi task enviroment and need to rip apart
>>Ms-Dos.  Thanx
> 
>   You can't get the source code to DOS, it's copyrighted material. What
>type of computer are you trying to multitask? Anything below a '386
>doesn't allow multitasking anyway. It would be nearly impossible to make
>DOS capable of multitasking anyway.
> 

Please explain this. MS Windows multi-tasks. DESQview Multi-tasks, So does
double DOS. These environments all run on 8086 processors, although most
will take advantage of new chips. 

You don't need an 80386 to multi-task. In fact, you don't need a chip designed
for multi-tasking to multi-task. True preemptive tasking can be done
(slowly) on an 8086. Although MS DOS doesn't inherently support multi-tasking,
there are things which can be done to make it multi-task as well. 

Where do you get your information from?



- Steve

-- 
-------------------------------------------------------------------------------
	resnicks@netcom.com, steve@camphq, IFNA:	1:143/105.0, 
USNail: 530 Lawrence Expressway, Suite 374 
        Sunnyvale, Ca 94086
- In real life: Steve Resnick. Flames, grammar and spelling errors >/dev/null
0x2b |~ 0x2b, THAT is the question.
The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2
-------------------------------------------------------------------------------

dj@ctron.com (DJ Delorie) (04/20/91)

> >   What
> >type of computer are you trying to multitask? Anything below a '386
> >doesn't allow multitasking anyway. It would be nearly impossible to make
> >DOS capable of multitasking anyway.
> > 
 
> You don't need an 80386 to multi-task. In fact, you don't need a chip
> designed for multi-tasking to multi-task. True preemptive tasking can
> be done (slowly) on an 8086. Although MS DOS doesn't inherently
> support multi-tasking, there are things which can be done to make it
> multi-task as well.

Side note (ie: no flames, please):

The 80386 is the first chip to support "true" multitasking.  This
means that it actually has a task register, task management opcodes
and hardware, and each process thinks it's the only one.  When the CPU
needs to handle exceptions (interrupts, system calls, faults), the
hardware *automatically* saves the ENTIRE state of the CPU and current
task in that task's Task State Segment and loads the ENTIRE state of
the new task to run.  This is normally done with no software
interaction at all.  This is true multitasking.

On lesser processors, "simulated" multitasking is used.  There is only
one processor state, and when you want to run a different task, the
currently executing task must, in it's own context, manually reload
all of the registers, stack, etc, and become the new task.  Interrupts
and exceptions are always serviced in the context of the running
program.

One might argue that the same thing is happening in both cases.  It
is.  The difference is that for the 386, it happens automatically, and
for lesser processors it must be done in software.

DJ
dj@ctron.com

rontelta@fwi.uva.nl (Richard Ronteltap (I87)) (04/21/91)

IO92203@MAINE.BITNET (Scott Maxell) writes:

>Ogden Dumas writes:
>>        Does anyone know where I can get a copy of the Ms-Dos source?  I
>>am trying to turn my PC into a multi task enviroment and need to rip apart
>>Ms-Dos.  Thanx
> 
>   You can't get the source code to DOS, it's copyrighted material. What
>type of computer are you trying to multitask? Anything below a '386
>doesn't allow multitasking anyway. It would be nearly impossible to make
>DOS capable of multitasking anyway.
> 

Well, some have tried:

- The Software Link: MultiLink & PC-MOS (PC-MOS 386 only, I think)
- Quarterdeck: DesqView
- ??: DoubleDos

I've used all of these. For multi-tasking only, DesqView is the best. A bit
memory hungry though. MultiLink is (was?) small and multi-user on top of
that. DoubleDos is old.

If you're not too attached to DOS, you could look at real operatings systems
for PC's like Minix or Coherent, both cheap and UNIXy.

Richard
(rontelta@fwi.uva.nl)

resnicks@netcom.COM (Steve Resnick) (04/21/91)

In article <1434@balrog.ctron.com> dj@ctron.com writes:
[Stuff Deleted]

>Side note (ie: no flames, please):
>
>The 80386 is the first chip to support "true" multitasking.  This
>means that it actually has a task register, task management opcodes
>and hardware, and each process thinks it's the only one.  When the CPU
>needs to handle exceptions (interrupts, system calls, faults), the
>hardware *automatically* saves the ENTIRE state of the CPU and current
>task in that task's Task State Segment and loads the ENTIRE state of
>the new task to run.  This is normally done with no software
>interaction at all.  This is true multitasking.
>
>On lesser processors, "simulated" multitasking is used.  There is only
>one processor state, and when you want to run a different task, the
>currently executing task must, in it's own context, manually reload
>all of the registers, stack, etc, and become the new task.  Interrupts
>and exceptions are always serviced in the context of the running
>program.
>
>One might argue that the same thing is happening in both cases.  It
>is.  The difference is that for the 386, it happens automatically, and
>for lesser processors it must be done in software.

Have you ever read the Intel 80286 and 80287 Programmer's Reference Manual,
pub number 210498-004, 1987? This manual describes, amoung other things, that
an 80286 has inherent register support for multi-tasking. (Look at page
B-72 where it describes the LTR (load task register) instruction. 

If you had also read the sections on multi-tasking in the 80386 programmers
refference manual you would have noted references made to an 80286 style
TSS (16 bit vs 32 bit Task State Segment) 

It is simply NOT TRUE that the 80386 is the first intel chip to support
multi-tasking. Perhaps, the most signifigant difference between the 80286 and
the 80386, when dealing with real-mode operating systems, is the support
for virtual 8086 tasks with the added ability of being able to switch
back and forth between real and protected mode without hardware kludges
to reset the processor.

I run my system under OS2, an 80286 operating system which out performs the
80386 DOS/QEMM/DESQview/Windows combinations I run at work. 

I don't mean to flame anybody, but I have been hearing on the net and 
otherwise, that the 80286 doesn't support true multi-tasking, and grow
tired of the mis-information about it.

- Steve


-- 
-------------------------------------------------------------------------------
	resnicks@netcom.com, steve@camphq, IFNA:	1:143/105.0, 
USNail: 530 Lawrence Expressway, Suite 374 
        Sunnyvale, Ca 94086
- In real life: Steve Resnick. Flames, grammar and spelling errors >/dev/null
0x2b |~ 0x2b, THAT is the question.
The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2
-------------------------------------------------------------------------------

berggren@eecs.cs.pdx.edu (Eric Berggren) (04/22/91)

  Hmmm, I was on Simtel the other day, and most of what I saw were (what
appears to be) mostly disassemblers. Could I have the filename please? Our
network gets kinda busy at times and I can't download all of the files to
see which one it is. Thanx.

-e.b.

==============================================================================
  Eric Berggren             |         "Life is a Turing Test;
  Computer Science/Eng.     |           We're all automatons!"
  berggren@eecs.cs.pdx.edu  |              - (click, whir, buzz, chirp)

hartnegg@sun1.ruf.uni-freiburg.de (Klaus Hartnegg) (04/22/91)

resnicks@netcom.COM (Steve Resnick) writes:


>I don't mean to flame anybody, but I have been hearing on the net and 
>otherwise, that the 80286 doesn't support true multi-tasking, and grow
>tired of the mis-information about it.

What you are saying here is correct, but...

there are many programs (all that write directly to the screen)
that won't run in the background on a 286. On a 386 they all work
fine with DESQview 386. I can even run a graphics programs together
with a programs that writes to the screen in text mode and have
both of them on the screen at the same time. And both are running!

This is definitively impossible on a 286.
-- 
--------------------------------------------------------------------------
Klaus Hartnegg, Kleist-Str. 7, D-7835 Teningen, Germany | include standard
Bitnet : hartnegg@dfrruf1 or hartnegg@cernvm            | disclaimer here!
Internet : hartnegg@ibm.ruf.uni-freiburg.de             |  

resnicks@netcom.COM (Steve Resnick) (04/23/91)

In article <1991Apr22.114733.4641@sun1.ruf.uni-freiburg.de> hartnegg@sun1.ruf.uni-freiburg.de (Klaus Hartnegg) writes:
>resnicks@netcom.COM (Steve Resnick) writes:
>
>
>>I don't mean to flame anybody, but I have been hearing on the net and 
>>otherwise, that the 80286 doesn't support true multi-tasking, and grow
>>tired of the mis-information about it.
>
>What you are saying here is correct, but...
>
>there are many programs (all that write directly to the screen)
>that won't run in the background on a 286. On a 386 they all work
>fine with DESQview 386. I can even run a graphics programs together
>with a programs that writes to the screen in text mode and have
>both of them on the screen at the same time. And both are running!
>
>This is definitively impossible on a 286.

Although this is true in part, you cannot multi-task MS DOS out of the box
on an 80286. The 80286 hardware supports multi-tasking, but MS DOS, is, 
essentially, a non-rentrant interrupt handler. If you were able to run
MS DOS in protected mode, a protected mode kernel could simply set the
video addresses page table entry to not-present, and handle the
screen I/O as a page fault. My point was that the 80286 hardware does
inherently support multi-tasking. DOS is a different story.

Cheers!
Steve

-- 
-------------------------------------------------------------------------------
	resnicks@netcom.com, steve@camphq, IFNA:	1:143/105.0, 
USNail: 530 Lawrence Expressway, Suite 374 
        Sunnyvale, Ca 94086
- In real life: Steve Resnick. Flames, grammar and spelling errors >/dev/null
0x2b |~ 0x2b, THAT is the question.
The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2
-------------------------------------------------------------------------------