Solved

far pointer to vga memory

Posted on 2000-04-15
4
279 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
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

777 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