?
Solved

far pointer to vga memory

Posted on 2000-04-15
4
Medium Priority
?
283 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 400 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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 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.
Suggested Courses

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