Mail Archives: djgpp/1996/05/21/23:45:46
On 22/5/96 1:23 am, Bryanston School <MOLESWORTH DOT THOMAS AT bryanston DOT co DOT uk> did
thus say >>>
>
> Is there a way to access memory allocated through the __dpmi functions
> through pointers? I would prefer to access it directly, rather than
> using things like _farpeekb and so on. It's annoying to have to use
> _farpeek functions when dumping 1 Mb to a file, for example. I am
> trying to capture an area of memory which is mapped into linear memory
> off a physical device to disk. I mapped this memory using the instructions
> in the FAQ (map physical memory, allocate descriptor, set limits and base),
> but I don't seem to be able to access it without using the _farpeek / =
> _farpoke
> functions. Is there a quick way to do fwrite(memory, sizeof(memory), =
> sizeof(int), filehandle) without doing it in a loop and transferring 4 =
> bytes to the disk at once?
If you don't mind C++, I have a class template that provides far pointer
functionality (except for structures). If anyone is interrested, I can post it
to them. I also have some code for farread and farwrite.
> Also, I have found that declaring a lot of local variables in
> main() sometimes gives errors, such as variables changing between
> one printf() and another. Is this a known feature/bug, and if so what
> should I do about it? I am currently declaring them global, which seems
> to work. I'll post the code if this sounds strange.
Just remember, you only have 256k of stack (default).
> Thanks in advance,
>
> Thomas Molesworth
> mailto:MOLESWORTH DOT THOMAS AT bryanston DOT co DOT uk
Bill
- Raw text -