Purpose: Discuss Tcl running on the Operating System sold by Microsoft BEFORE Windows. ... Several people, including [Stephen Trier], have ported (a version of) Tcl to MS-DOS. [[list others--some appear in "[Small Tcl]"]] [[ [CL] believes he remembers it being quite easy to do this with 7.4.]] ---- [David Gravereaux] worked on the DJGPP port that can compile for 8.4a5. Either do a CVS checkout and ask for the 'contrib' module, or send Dave an email. Edevaldo Pereira did the initial work on this about September 2000 and I added in some stuff from Tom Poindexter's 7.3 port @ http://www.nyx.net/~tpoindex/tcl.html#mstcl [Victor Wagner] take David's work and more or less completed it. This port based on relatively recent CVS HEAD, support dynamic loading using DXE3 (DJGPP 2.04 required) and includes [Ck] text mode interface toolkit. See [http://www.45.free.net/tcl/tcl_dos.html] Or better yet, grab the 8.4a4 release @ http://prdownloads.sourceforge.net/tcl/tcl8.4a4_dos.zip [[exec]] isn't useful (DOS doesn't support multi-tasking, exactly), and there's no way of dynmically loading extensions, yet. [Victor Wagner] Really, [[exec]] can be made useful on MS-DOS. It doesn't support simultaneous execution of program, but many uses of exec suspends calling script until called program exit and return its output. This behavoir can be implemented on MS-DOS, but I cannot yet find time to do it. It is quite easy to write "poor man" exec, which just calls C system function, but better job can be done, which can use all infrastructure in Tcl generic directory, and just reimplement Tclp_CreateProcess and friends. Main idea is to create "processes" as just information structures in memory, which hold argc, argv and IO redirection info, and execute them in order (due to single-tasking nature of DOS). Process can be executed not before writing to its stdin is compleded, but not after read from its output is requested. Thus we can support almost all functionality of [[exec]] except trailing & and unidirectional [[open]]. Pipes can be done using temporary files (as they are always done in MS-DOS), << can be implemented using temporary file too. ---- [Category Acronym] | [Category Operating System]