Re: system() function
- Posted by Kat <KSMiTH at PELL.NET> Dec 18, 1999
- 558 views
----- Original Message ----- From: Brian Broker <bkb at CNW.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Friday, December 17, 1999 8:52 PM Subject: system() function > I know this has been brought up before but couldn't find a solution. I'd > like to capture output of a DOS program without sending the output to a > file. > > Is there a way to do this? (a library with a system() function that > captures the output and lets you assign it to a sequence variable) DR-DOS does this between running programs, like windoze handles msgs between apps. Linux prolly does it better. In MS-dos, you can use the CommandTail in the running program's PSP to store under 128 bytes,, but it's destroyed when the program terminates. You could tie up a block of memory with EMS calls, store as much data as you have XMS RAM for, and access it from any running program or tsr. If you want the simple way tho, use an xms ramdrive of the smallest size you need, and store your temp data there,, ram drives are 1000x faster than a harddrive, not counting write cacheing by the hd or hd controller itself. If you are into fancy coding that most people hate, stuff the new data (under a few bytes) into the keybd buffer, if you launch the new app as a dos shelled app, the new app can use the buffer as keybd input. You could also launch a TSR, never call it, and use it's reserved code area as data storage for real programs. Note that most of these tricks work only in real mode, `cause you may not have the access to the memory locations in 32bit mode,, so your mileage may vary. I'd go with the xms ram drive myself, if you plan on staying with dos or windoze, cause it's generally fast enough, has tons of memory,, and it's 2am at the moment, and i can't think of more to say. Kat, zzzzzzzzzzz