Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!julius.cs.uiuc.edu!apple!vsi1!octopus!stever From: stever@Octopus.COM (Steve Resnick ) Newsgroups: comp.os.msdos.programmer Subject: Re: point to an address above 1M ? Message-ID: <1990Sep24.204400.26052@Octopus.COM> Date: 24 Sep 90 20:44:00 GMT References: <14016@hydra.gatech.EDU> Reply-To: steve.resnick@f105.n143.z1.FIDONET.ORG Distribution: usa Organization: Octopus Enterprises, Cupertino CA Lines: 31 In article <14016@hydra.gatech.EDU> gb7@prism.gatech.EDU (Joe Bradley) writes: > >Can someone tell me how to set a pointer (in MS C) to an address above >1M? I have a video card which maps its video RAM into the PC address >space from 8M - 10M. I want to access video RAM directly, but I can't >initialize a pointer to this address range presumably because I only >have 16 bits of addressability with the segment portion of a huge pointer. >I don't see how you can point to a physical address above FFFF:FFFF ?! >I tried the following, but the compiler gives the error: "Constant too big." > >#define VIDEO_BASE 0x800000000 > >main() { > unsigned char huge *ram_p; > > ram_p = ( unsigned char huge * )VIDEO_BASE; >} You can't do that without entering protected mode, or by some "hidden" paging hardware on the video card. The FFFF:FFFF address is the top limit on a far pointer. That address cannot be reached, normally, unless the A20 line is activated. Hope this helps.... Steve -- ---------------------------------------------------------------------------- steve.resnick@f105.n143.z1@FIDONET.ORG #include Flames, grammar errors, spelling errrors >/dev/nul ----------------------------------------------------------------------------