Re: use of FAR pointers with gcc
From: Richard Tobin (richard_at_cogsci.ed.ac.uk)
Date: 05/31/04
- Next message: Emmanuel Delahaye: "Re: use of FAR pointers with gcc"
- Previous message: Arthur J. O'Dwyer: "[OT] indentation, was re: [OT] Chinese Syntax"
- In reply to: tanuki: "Re: use of FAR pointers with gcc"
- Next in thread: Emmanuel Delahaye: "Re: use of FAR pointers with gcc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 May 2004 16:50:36 GMT
In article <c9floa$e60$1@ctb-nnrp2.saix.net>,
tanuki <phake@sadomain.co.za> wrote:
>if i just try something like long *ptr 0xb8000000
>and write to it linux gives me a segfault and windows gives me a
>"read/write" error
You seem to be expecting the video memory to exist at a specific place
in your program's memory. I don't know about Windows, but normal
operating systems like Linux provide virtual memory, and will not map
memory corresponding to devices into your address space unless you
specifically request it.
So your problem is how to map the video memory into your process, and
that will be done by some library function, most likely in conjunction
with opening some device. It's not a problem with your C pointers as
such.
-- Richard
- Next message: Emmanuel Delahaye: "Re: use of FAR pointers with gcc"
- Previous message: Arthur J. O'Dwyer: "[OT] indentation, was re: [OT] Chinese Syntax"
- In reply to: tanuki: "Re: use of FAR pointers with gcc"
- Next in thread: Emmanuel Delahaye: "Re: use of FAR pointers with gcc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|