Hi !!!
I programming in MASM, but i must have a small programm for dos, where run other programm. What I write this programm ???
Posted on 2002-03-16 08:36:09 by jelcyn

sorry, i dont understand your question. if you run dos program in another program :

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

for execute another dos program


lea dx, filename
mov ax,4b00h
int 21h

have nice days,
Posted on 2002-03-16 19:50:48 by CYDONIA
I think I understood what you mean by your question, You need to make windows console application.
that's under windows
but if you are taking about it under dos as discripped by CYDONIA
that's all
Posted on 2002-04-15 07:25:57 by amr
You also need to make sure you have memory to load into. Default DOS linker options will create a program that uses up the largest block of available memory--leaving nowhere to load your second program. There is an INT that releases memory, but I don't have the docs for it.
Posted on 2002-04-15 14:16:40 by tenkey
do you know it's number? ie (INT number)
Posted on 2002-04-16 08:22:32 by amr
to resize a memory block in DOS api use:

mov ax,<memory block>
mov es,ax
mov bx,<new size in paragraphs>
mov ah,4ah
int 21h
Posted on 2002-04-17 01:34:47 by japheth
That's cool
Than it's number is 21 ,ah=4ah
Posted on 2002-04-23 00:19:45 by amr
What I used to do was put a /CPARMAXALLOC:1 so that LINK would not request the biggest darn piece of memory in the first place. The problem with using the DOS realloc call was when working with exe files with lots of segments: which segment can DOS realloc? Having a program that depended on segment order was to my thinking dangerous. It was fine with com files with a single segment, you could realloc it easy.

Sorry.... I think I pushed the wrong button, this should have been in reply to the ' Running another program' thread.
Posted on 2002-04-23 06:13:48 by AmkG