Re: Question about UMBs
Paul Case <[email protected]>
| Newsgroups | gmane.os.freedos.devel |
|---|---|
| Message-ID | <[email protected]> |
Arkady V.Belousov wrote:
>PC> Hmmmm... problem is, I want this program to get out of memory as soon as
>PC> it's finished making the UMBs available.
>
> It can't. MS-DOS not supports exiting drivers _if they installed_. But,
>probably, your code may be implemented not as driver (i.e. you code will be
>installed by driver, which will be not remained in memory itself) - in this
>case you may exit resident code later (in autoexec.bat).
>
Okay, I've got a pretty good idea about how to do that in NASM. Although
if I can sneak the resident code into some unused shadow RAM, exiting
the code won't be a concern, since it won't take away from free memory.
>PC> Failing that, I'd like the memory footprint to be as small as possible
>PC> (if it detected ROM shadowing was in use, and there was enough memory free
>PC> in one of the UMB blocks used for shadowing, I could possibly relocate the
>PC> resident code in there... but that's just speculation).
>
> Why not? If upper memory block will too small for your code, then this
>mean that your code too big to be useful or that upper memory too small.
>
The speculation was about finding a free block of memory in an area used
for ROM shadowing. The resident code should be easily small enough even
if there's only a single 512-byte page left in a 16K block. And if
there's no block, I'll just take a small part out of the normal UMBs.
Thanks again for the help,
Paul Case