delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/28/21:38:06

Message-ID: <002501c117c1$b2e0f9e0$64c8c8c8@raf256>
From: "Raf256" <raf256 AT go2 DOT pl>
To: <djgpp AT delorie DOT com>
References: <9jthc4$l24$2 AT info DOT cyf-kr DOT edu DOT pl> <3405-Sat28Jul2001095144+0300-eliz AT is DOT elta DOT co DOT il>
Subject: Odp: Dos program with multitasking
Date: Sun, 29 Jul 2001 02:00:02 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Reply-To: djgpp AT delorie DOT com

Soory for writting to priv...

> > Is there some possibility in DJGPP to run Dos program (16-bit, or 32-bit
> > make by DJGPP) and to continue in some way execution of main program in
> > background while spawned program is still running ?
> Not easily.  The problem is that the DPMI spec explicitly prohibits
> switching stacks inside a hardware interrupt handler, so you cannot
> write a scheduler which switches tasks inside the timer tick interrupt
> handler.
 > This issue was discussed several times, and the available paths to
> pull that trick are:

#1)
>   - work around the DPMI limitation by writing code that exploits fine

#2)
>   - multi-task not on timer ticks, but on system calls, like input or

#3)
> It might be easier to write the multitasking shell as a real-mode
> program, which _can_ switch stacks inside the timer tick handler, and
> then run both programs from there.

Yes I am serious about writting shell basing on DJGPP.. but to honest I
don't have ANY experience with writtin shells\OSs... so why I'm writting UPT
? Because I think that I'm realy quite good in writting GUI, I know how to
make own files .hdd contaning files\directiories, etc,etc... so I think that
I can at least try to write shell, but I'll have big problems with all
low-level functions, memory manager etc...

My question is - can You spare litle of Yours time to help me with writting
UPT ? I know that probaly You don't belive that I can write it, but maybe
YOu will give me a chance ? (I was asking meany silly questions on news
group, because I ask about this what I don't understand... I have 6 year
experience in C++, 10 in Pascal)

If You have some time, that here comes my question, if You can answare it
then I'll be very greatfull :

How can I exacly (maybe small example) write programs using method #2 to
make multitasking ? I don't realy need so much to run in background DOS
16-bit programs from my shell, but  need to run my applications written in
DJGPP. I think that it can work like this :
UPT.EXE hooks some unused interrupt numer INT and spawns APPL.EXE
APPL.EXE hooks timer interupt. Each i.e. 0.1 s it's using interrupt INT to
return controll to main program UPT.EXE. It's alsow uses INT with special
values of AX,BX... to cal UPT API, for example in timer interrupt - mov ax,1
int INT - returns controll to UPT each 0.1s, and in main program  - mov ax,2
int INT  - draws new window etc...

PLEASE help :)

I will send You soon .cc\.h of current very early version of UPT... BTW. You
are in credits :)

--
Raf256   C++ TP JAVA 3DMax POV HTML  <== Email me if U need developer
,--, _  ,-   _  _  _  ,---------------------------------------------,
|,-'`_|_|_  `_||_'|_' | raf256 AT go2 DOT pl http://strony.wp.pl/wp/raf256 |
| `\(_) |   |_,,_||_| | upt256 AT wp DOT pl SMS 504-727-464                |



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019