MS-DOS TSR MEMORY MAP




Ifa TSR is created in assembly langauge, the programmer has exact control overthe use of memory and can omit the heap area and place the initialization codeat the end of the segment (where it can be released after initialization).
   
 Ifa TSR is created in C, the small-memorymodel must be used. Because of the severe memory limitations, the programmershould not use C allocation functions (such as malloc and calloc),as these add to the heap. A small heap must be assigned because some C libraryroutines (such as fprintf) allocate memory from the heap.
   
 Variablesrequired by MS-DOS interrupt handlers must be placed at the beginning of thecode segment.