Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.msdos.programmer > #101

Re: DOS Stub in C/Final C--

From "Rod Pemberton" <do_not_have@noavailemail.cmm>
Newsgroups comp.os.msdos.programmer
Subject Re: DOS Stub in C/Final C--
Date 2011-06-03 17:30 -0400
Organization Aioe.org NNTP Server
Message-ID <isbjem$i8s$1@speranza.aioe.org> (permalink)
References <5d9cf024-6141-4a8e-ae21-67a30c48ece7@c26g2000vbq.googlegroups.com> <57b22a6a-0969-42e3-ab33-204aa99d542b@c1g2000yqe.googlegroups.com> <a48ddc9e-8303-4b40-afb8-38fea2958d4d@e26g2000vbz.googlegroups.com>

Show all headers | View raw


"Harry Potter" <rose.joseph12@yahoo.com> wrote in message
news:a48ddc9e-8303-4b40-afb8-38fea2958d4d@e26g2000vbz.googlegroups.com...
>
> Basically, I want a setup where the stub is loaded first.
> Then, the stub loads the main executable.  If the main executable
> wants to transfer control to an included utility without hogging
> memory, it would exit to the stub and tell the stub to execute the
> utility.  Once the utility is finished, it exits and the stub returns
> control to the main application.
>

C's stdlib.h has system() which is for spawning child processes.  It should
be available with every ANSI C compiler or POSIX environment.  With DJGPP,
I use it to execute other applications and DOS commands.  I'm not sure if
VBDOS Pro 1.0, Turbo C 2.01 and C++ 1.01, and C-- supports it, but you
could check.  Usually, there are also a couple of other similar, custom
functions for executing commands that aren't ANSI C or POSIX.

> If the main application wants to exit completely, the executable will exit
> to the DOS prompt or Windows.

More likely, it'll have to exit to the stub and the stub exits to DOS,
or Windows...  IIRC, that's how DPMI servers work, probably VCPI also.


Rod Pemberton


Back to comp.os.msdos.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

DOS Stub in C/Final C-- Harry Potter <rose.joseph12@yahoo.com> - 2011-06-01 10:11 -0700
  Re: DOS Stub in C/Final C-- Jim Leonard <mobygamer@gmail.com> - 2011-06-01 12:03 -0700
    Re: DOS Stub in C/Final C-- Harry Potter <rose.joseph12@yahoo.com> - 2011-06-03 05:44 -0700
      Re: DOS Stub in C/Final C-- Jim Leonard <mobygamer@gmail.com> - 2011-06-03 09:37 -0700
        Re: DOS Stub in C/Final C-- Harry Potter <rose.joseph12@yahoo.com> - 2011-06-03 10:15 -0700
          Re: DOS Stub in C/Final C-- Jim Leonard <mobygamer@gmail.com> - 2011-06-03 12:19 -0700
      Re: DOS Stub in C/Final C-- "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2011-06-03 17:30 -0400
        Re: DOS Stub in C/Final C-- Harry Potter <rose.joseph12@yahoo.com> - 2011-06-04 04:52 -0700

csiph-web