TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: PABLO BARRON
from: JAN WAGEMAKERS
date: 1997-02-23 08:52:00
subject: 4bh doubt

Hello Pablo,
Pablo Barron wrote to All :
 PB> I have a doubt about the function 4bh of the int21h, execute
 PB> program. When it's done by Dos, does it check if there's enough room to
 PB> load the program before or after making the int21h ( 4bh ) ? I mean,
 PB> does Dos ensure that there is enough unallocated memory available before
 PB> executing ?
Before you call this int 21h/4bh, you have to be sure that there is enough
memory available for the program that you want to load. If you have not
enough memory free, int 21h/4bh will end with an error (CF = 1 , AX = 8 if
I'm right)
This is what I have found in Ralf Brown's INT-list about this subject :
INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
---8<---
Return: CF clear if successful
            BX,DX destroyed
            if subfunction 01h, process ID set to new program's PSP; get with
                INT 21/AH=62h
        CF set on error
            AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see #0980 at AH=59h)
---8<---
        for functions 00h and 01h, the calling process must ensure that there
          is enough unallocated memory available; if necessary, by releasing
          memory with AH=49h or AH=4Ah
Have a nice day, Pablo.       - Jan Wagemakers -
.!. A good phrase is worth a thousand pictures....
--- Terminate 4.00/Pro
(2:292/8133.23)
---------------
* Origin: - Belgi‰/Belgium - Internet : JanW@dma.be

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.