dna@dsd.UUCP (11/28/83)
I would like to respond to: BTL-IH (fortune!hpda!hplabs!sri-unix!cca!decvax!harpo!floyd!clyde!ihnp4! ihlpf!dap1) In your question about allocating blocks of memory, DOS 2.0 allocates ALL of user memory when a program is run. This is true for .EXE files as well as .COM files. I had the same problem when running under AZTEC C86. What I had to do is patch the startup assembly code. If you do not have this code, you can figure out the top of your block quite easily. It is DS:FFFF. Depending on what your startup code did, the ES:0 points to the beginning of your block (It should also point to the program prefix unless changed). I have no idea how you would attempt to do this in a higher level language. I did all my changes in assembly after using DEBUG on a program and Unassembling the startup code to make sure it matched the distributed run-time package. I'll say this much for Aztec-c. It may have bugs in the run-time package (I have found four or five and fixed them all), but at least they give you the source so you *CAN* fix it. If you have any questions, feel free to try to get ahold of me some how. I don't even know if this message will even get to you. If it does, the nice person who sends it to you should be able to get a response to me. Anyway, if you do not have access to the ES register, then if I may be so bold to ask, what do you want with the ALLOCATE-BLOCK call? The only way you could access at chunk of memory is to place the paragraph address returned in the AX register into the ES register then reference your offset from there. This is how 32 bit pointers work in PLM-86.. ---------------- Mike Spann