dap1@ihlpf.UUCP (darrell plank) (11/14/83)
#N:ihlpf:17100016:000:1313 ihlpf!dap1 Nov 13 21:23:00 1983 I have been trying to get the DOS 4bh interrupt (exec) to work from Lattice C. The return code said there was insufficient memory. I assumed this was due to not doing a 4ah interrupt first (SETBLOCK). Unfortunately, this interrupt is not explained very well. It talks about "blocks" which I assume are the blocks assigned by interrupt 48h (Allocate Memory). Does this mean that I have to "allocate" memory just so I can turn around and "free" it? If so, where is this memory allocated from? Lattice C sets up the data and stack segment just behind the code segment. How does DOS know that Lattice is using this 64K? If it doesn't know, does it wipe out my stack and data segment? Or does it allocate memory from the top of memory down, in which case I'll have to determine just the right size to ask for. Alternatively, could I ask for 256K and get the size of the "largest block of memory available" in BX, subtract 64K from it and request that size block? Of course this all seems rather silly, since I only WANT it so I can immediately DELETE it. Does anybody have a clue as to what these routines REALLY do?????? Thanks in advance, Darrell Plank BTL-IH
hersee@ihuxx.UUCP (11/15/83)
The DOS 2.0 COMMAND.COM has a bug in it that makes the exec call fail. There is a patch available but if you have a program that uses the patched COMMAND.COM and then it gets moved to a new disk it will no longer work. Most people write the name of the next program to the keyboard typeahead buffer and then exit to DOS. This has the advantage of working for both DOS 1.1 and 2.0.