Subject: Acessing DPMI memory without farptr From: Bryanston School Date: Tue, 21 May 1996 14:23:47 +0100 Message-Id: <000000199912915529827@bryanston.co.uk> Organization: Bryanston School To: DJGPP mailing list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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? 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. Thanks in advance, Thomas Molesworth mailto:MOLESWORTH DOT THOMAS AT bryanston DOT co DOT uk