ghuffman@digi.lonestar.org (Gregory Huffman) (03/01/91)
Hello DOS Programmers: Here is the promised summary of my int 21h func 48h dynamic memory allocation problem. First of all, I want to thank everyone that replied to my question. I tried to personally respond to each person, but I have been having some difficulty sending out going mail. Most of it bounced back. In my code I was trying to dynamically allocate memory using a DOS service call. One person sugested that my *.exe program was claiming all the available memory and that I should issue a call to resize the available memory. This is a very good suggestion that I will explore. Another person actually compiled and linked the code on their system and it performed as I wanted it to (dynamic memory was allocated as a result of the DOS service call). This may indicate that I have a problem in another area of my system that needs exploring. Many people thought I was creating a *.com file. I was not. Three things are being done that indicates this is a *.exe program. The first sign is I'm creating stack space in this module. The second sign is their is no ORG 100H statement. All *.com programs must have cs:100h as the entry point. And finally, I'm loading segment registers ds and es at runtime. This can not be done in *.com programs. Your comments have been appreciated. I thank all that spent time on this. **************************************************************** Greg Huffman Internet ghuffman@.digi.lonestar.org * ****************************************************************
valley@uchicago (Doug Dougherty) (03/01/91)
ghuffman@digi.lonestar.org (Gregory Huffman) writes: (stuff deleted) >Many people thought I was creating a *.com file. I was not. >Three things are being done that indicates this is a *.exe program. >The first sign is I'm creating stack space in this module. The second sign >is their is no ORG 100H statement. All *.com programs must have >cs:100h as the entry point. And finally, I'm loading segment registers ds >and es at runtime. This can not be done in *.com programs. Nitpicks: 1) None of my .COM programs start with ORG 100H. My assembler (A86) assumes it unless told otherwise. 2) I've seen lots of .COM programs that start with: mov ax,cs ; Set up the segment registers mov ds,ax mov es,ax mov ss,ax (even though doing so is completely unnecessary, at least under DOS 2.x+)