Solved

far pointer to vga memory

Posted on 2000-04-15
4
282 Views
Last Modified: 2006-11-17
i used to have a borland compiler and a far pointer to vga memory worked just fine to put stuff on the screen, but now I have DJGPP, and it wont let me make a far pointer! What can I do?
0
Comment
Question by:napalm20001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 2719504
Is this a 32 bit compiler.  (one for win32).  If so win32 uses a flat model so there are no near and far pointers.  Also it uses virtual memory so an application cannot diretcly access the video memory.   However win32 has many alternatives, so you don't have to.

I goess the first thing to do is to determine if this is a 16  or 32 bit complier.  check the docs and let us know.
0
 

Author Comment

by:napalm20001
ID: 2719826
its 32 bit
0
 
LVL 22

Expert Comment

by:nietod
ID: 2720266
You have two choices.  Don't use the compiler and stay in the 16 bit world.  Or switch to 32 bits and all the changes that may entail.

If you switch to 32 bits you will have far far more memory available to you.  you will also have available to you the entire windows API.  This includes features for creating windows, menus, consoles, allocating virtual memory, COM, etc.    but you will not be able to directly access hardware.  You cannot, for example, write directly to the video memory.  There are almost always alternate ways to reach the same ends though.

Obviously I can't tell you much more than that.  I don't know anythoung about yoru program so I can't say how hard it woudl be to convert to win32 or what would need to be changed.
0
 
LVL 32

Accepted Solution

by:
jhance earned 100 total points
ID: 2720847
DJGPP has built in access to the VGA display memory.  It sometimes (though not always) helps to read the documentation.

See:

http://www.delorie.com/djgpp/v2faq/faq10_2.html
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question