www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/21/23:45:46

Message-Id: <s1a2ecbe.003@MAIL.TAIT.CO.NZ>
Date: Wed, 22 May 1996 10:28:31 +1200
From: Bill Currie <bill_currie AT MAIL DOT TAIT DOT CO DOT NZ>
To: djgpp AT delorie DOT com
Subject: Re: Acessing DPMI memory without farptr

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019