home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!usenet-feed.cc.umr.edu!gsanchez
- From: gsanchez@cs.umr.edu (Guadalupe Sanchez)
- Subject: Re: Stuffing DOS command line
- References: <34933@adm.brl.mil>
- Date: Mon, 11 Jan 1993 01:59:55 GMT
- Nntp-Posting-Host: next5.cs.umr.edu
- Organization: University of Missouri - Rolla, Rolla, MO
- Sender: cnews@umr.edu (UMR Usenet News Post)
- Message-ID: <1993Jan11.015955.4322@umr.edu>
- Lines: 30
-
- In article <34933@adm.brl.mil> CHARPER%COLGATEU.bitnet@cunyvm.cuny.edu writes:
- >Hi y'all. I haven't yet received any mail from this list, so I don't know if
- >this is the right kind of question to address here, but I joined in order to
- >ask this question:
- >
- >Some years ago I worked with MS-Pascal, and used a method to load a desired
- >string into the DOS command line, so that that command was executed when the
- >application completed. This was the best way I know of to chain from one
- >program to another. I'm now working with Turbo Pascal 5.0, and would like to
- >know if someone has code which will do this in Turbo Pascal. (I don't have the
- >MS-Pascal code that did this any longer). Basically I need something that will
- >set the next command to execute WITHOUT using EXEC (I can't afford the memory
- >to shell the command).
- >
- >Thanks,
- >**************************************************************************
- >Cindy Harper, Systems Librarian Case Library
- >charper@colgateu Colgate University
- >charper@center.colgate.edu 13 Oak Drive
- >(315) 824-7363 Hamilton NY 13346
- >**************************************************************************
-
-
- The function the Pascal compiler was using was INT 2E - pass command to
- command interpreter for execution, which does exactly what you said.
- To call it using assembler:
- have DS:SI point to an ASCIIZ string which is the command line you want
- to pass to COMMAND.COM. (There must be a CR character at the end right
- before the binary zero) Then call INT 2E. As you said, the program
- will execute after the program which calls it exits.
-