Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!ucbvax!agate!violet.berkeley.edu!izumi From: izumi@violet.berkeley.edu (Izumi Ohzawa) Newsgroups: comp.sys.ibm.pc Subject: Re: How do I point to the frame buffer? Keywords: C, far pointers, frame buffer,ibm pc Message-ID: <11544@agate.BERKELEY.EDU> Date: 1 Jul 88 02:36:19 GMT References: <2784@juniper.UUCP> <222@pigs.UUCP> Sender: usenet@agate.BERKELEY.EDU Organization: University of California, Berkeley Lines: 22 In article <222@pigs.UUCP> haugj@pigs.UUCP (Joe Bob Willie) writes: >In article <2784@juniper.UUCP>, dan@juniper.UUCP (Dan Galewsky) writes: >> Could someone please tell me how to set up a pointer to the frame buffer >> on my PC's CGA from Microsoft C? I know that the frame buffer starts at >> 0xb800. So I tried the following : >> far char *Screen; >> Screen = (char *)0Xb800; >> Puzzled... >Dear Puzzled, >far char *Screen = 0xb8000; That doesn't work. At least with Microsoft C, far pointer has to be specified in the Segment:Offset format with an unsigned long number. So try; far char *Screen = 0xb8000000; or far char *Screen = 0xb8000000L; izumi ohzawa izumi@violet.berkeley.edu