Solved

far pointer to vga memory

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now