<--- Turn the page
   
(contents page)
   
Turn the page ---> DOSData Transfer Between Programs |
<--- Turn the page
   
(contents page)
   
Turn the page ---> Page 8
Have you ever wanted to transfer data from one program to the next? Well, DOS left a small amount of lower memory for this. Back when DOS was it, this area was big stuff. Now that programs are much bigger and more hi-tech, this little area is pretty much a waste of space.
Anyway, I will talk about the small chunk of memory at 0040:00F0h consisting of 16 bytes. That's right, only one paragraph of memory.
This area is called the intra-application communications area, or the ICA. You can use this area to hold data for the next program that you plan to load, and know that it will stay in the same place and not get free'd by DOS.
However, there are a few drawbacks. The largest is that it is only 16 bytes. Another is that you can not be sure that some other program has written over your data. So to make sure, you would need to include a ID byte as the first byte and a checksum byte as the second byte. Well, now you only have 14 bytes left.
This makes for a small data transfer. However, 14 bytes is plenty enough room to store a far address to another allocated block of memory. Then in your second program, grab this memory and free the block.
¥