Solved

far pointer to vga memory

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

809 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