Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multitasking

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Does any know how to write a programm that run another program and the come back to itself?

( Without using shell command...)
-----------------------------------------------------------

1st application ----run---> 2nd application
/\ |
| |
\____________come back---------/

-----------------------------------------------------------
ANY HELP WILL BE APPRECIATED !!!

-----------------------------------------------------------
 
CHAIN (data segment remain) or RUN (data segment clear) BASIC(we are talking about BASIC programs? All others can be run only thru system calls, or SHELL) programs you call must contain CHAIN or RUN main program at the end
 
I was talking about running exe files. Chain command may run bas files only...

EXAMPLE

1 user type tree in my command prompt
2 dirtree.exe is started...
3 user quits dirtree.exe
4 my command prompt is loaded...

PS. I do NOT want to use shell command...

Thank you anyway for trying to help!!!
 
Do not want? Not a problem!
1 alternative (fast) - Take assembly manual and write native code procedure to call DOS service (Int 21h).
2 alternative (slow) - Find description for EXE (MZ-format), Relocation tables, memory control blocks + DOS programming manual and write your own loader on BASIC
 
I know you said that you didn't want to use SHELL, but it is the best way to do this.
both of NOPIK's ways will work, but involve writing alot of code
 
If you want to access a non Qbasic application then you will have to use system() or learn ASM :p

If you want to display directory contents try:

sysmem ("dir > output.txt")

this will save all output from the dir command into output.txt
you can then load output.txt and display it :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top