spence@utcsstat.UUCP (I. Spence) (09/04/84)
Question 1.
I would like to emulate the action of the BASIC 'RUN <file.ext>' command
using assembly language, but do this from a FORTRAN program. The object
is to be able to chain from one EXE file to another. I have attempted to do
this using DOS Function 4Bh and everything works fine except that a child
process is created without destroying the invoking process, thus reducing
available memory. This is cumulative if more calls are made. How do I
avoid this?
Question 2.
When a DOS disk I/O call is made and a critical error is encountered,
control is transferred with an interrupt 24h. If the transient portion of
COMMAND.COM has been overlaid (e.g. when an EXE file has been loaded),
this interrupt will point to a meaningless location causing the system to
hang up. What is a simple way to handle the interrupt in this case?
I have tried to redirect the interrupt 24h using DOS call 25h to an area in
my own program. A trace using DEBUG shows this to be successful up to the
point where control is returned from my interrupt handler (using IRET) with
AL set to 2 (which should terminate the program). At this point the program
hangs. (N.B. I haven't changed any registers!) Any ideas?
Ian Spence
Department of Psychology
University of Toronto
Toronto, Ontario M5S 1A1
!utcsstat!spence