HelpPC 2.10 Quick Reference Utility Copyright 1991 David Jurgens

                  INT 21,4B - EXEC/Load and Execute Program

       AH = 4B
       AL = 00  to load and execute program
          = 01  (Undocumented)  create program segment prefix and load
                program, but don't execute.  The CS:IP and SS:SP of the
                program is placed in parameter block.  Used by debuggers
          = 03  load program only
          = 04  called by MSC spawn() when P_NOWAIT is specified
       DS:DX = pointer to an ASCIIZ filename
       ES:BX = pointer to a parameter block


       on return:
       AX = error code if CF set  (see DOS ERROR CODES)
       ES:BX = when AL=1, pointer to parameter block similar to:

       Offset Size            Description

         00   word   when AL=1, segment of env. or zero if using parents env.
              word   when AL=3, segment of load point for overlay
         02   dword  when AL=1, pointer to cmd line at PSP 80h
              word   when AL=3, relocation factor for EXE overlay
         06   dword  pointer to default FCB passed at PSP 5Ch
         0A   dword  pointer to default FCB passes at PSP 6Ch
         0E   dword  value of program SS:SP
         12   dword  value of program CS:IP


       - allows execution of an external program as well as overlay
         management from within an application
       - all registers except CS and IP are destroyed
       - SS and SP should be preserved in code segment before call
         since a bug in DOS version 2.x destroys these
       - return code can be retrieved if child process exits via INT 21,4C
       - calling process must assure presence of enough unallocated memory
       - subfunction 4 returns with an error under DOS 4.x+
       - calls INT 21,55

       - see also  INT 21,26

Esc or Alt-X to exit int 21,4b Home/PgUp/PgDn/End ←↑↓→
Converted to HTML in 2006 by Timo Bingmann