Newsgroups: comp.sys.ibm.pc.misc
Path: utzoo!censor!geac!contact!yung
From: yung@contact.uucp
Subject: Re: Dumping Expanded Memory
Reply-To: yung@contact.uucp ()
Organization: Contact Public Unix BBS. Toronto, Canada.
Date: Wed, 5 Dec 90 03:04:55 GMT
Message-ID: <1990Dec5.030455.26604@contact.uucp>

 
Thanks James! Your response sure helped clearing up a lot of confusions!
 
 
In article <4303@amc-gw.amc.com> jwbirdsa@europa.amc.com (James Birdsall)
writes:
>In article <1990Nov26.164506.24237@contact.uucp> yung@contact.uucp () writes:
>>I am writing a TSR software which requires dumping the expanded memory to
>>the hard disk.
>
>   As a side issue, I assume you are taking appropriate precautions for
>writing to disk from within a TSR? Since you mention being able to look at
>the file, you probably are (or you're lucky).
 
Yes. They have all been taken care of.
 
 
 
>>5) Allocate one page and get a handle.
>
>   THIS is the problem. When you get a handle/allocate pages, you are
>getting pages not used by any other handle. Hence, you wind up dumping the
>contents of unused memory to disk, and of course these contents are random.
>   What you should be doing is:
> 5) Get information on all handles presently in use (there is a call
>    to do this) which tells you what the handles are and how many pages
>    are allocated for each.
> 6) For each of those handles, dump each logical page to the disk by
>    mapping it to the first physical page and doing a disk write.
>    This is possible because EMM handles are global; the EMM does not
>    care whether the program using the handle is the same program that
>    the handle was allocated to.
 
You are probably right. Almost all the response that I've got so far
points to this problem. I am trying to fix it and hopefully get it done
by the weekend.
 
 
>  If you need more information, feel free to contact me.
Don't mind if I do    :^)
Aside from saving the memory to disk, I would also like to restore in
at some latter point as well. Can you suggest a feasible strategy for
me? Before I get into this EMM mess, I really didn't expect it would
be so difficult. Afterall, all I wanted to do was simple memory
dump and restoration. Is there any good book out there about programming
expanded memory? I have been looking but there seems to be pitifully
little out there.
 
Thanks again for your response. Happy Computing.
 
-Amos Yung
 
 
