From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: video buffer problem Date: Thu, 04 Jun 1998 19:20:16 -0400 Organization: Two pounds of chaos and a pinch of salt. Lines: 46 Message-ID: <35772BB0.984F7A68@cs.com> References: <1998060402035100 DOT WAA17138 AT ladder03 DOT news DOT aol DOT com> NNTP-Posting-Host: ppp142.cs.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk IPityTheFo wrote: > > This is the code I use to create a pointer to the video buffer: > char far *video_buffer = (char far)0xA0000000L; > The compiler tells me that you can't convert a pointer to a char far. > Can someone help me out with that? > > Also I use this to fill the screen with a certain color: > #define SCREEN_WIDTH unsigned int > #define SCREEN_HEIGHT > void fill_screen(int value) { > _fmemset(video_buffer,(char)value,SCREEN_WIDTH*SCREEN_HEIGHT+1); > } > The compiler tells me that the _fmemset line is so badly of a formed statement > that it is impossible to compile. Can someone help me out with that? > > It may help to know that I'm using a DOS Pacific C compiler. We can't give technical support for compilers other than DJGPP. If you were using DJGPP, I'd tell you that DJGPP programs run in protected mode; therefore, there is no such thing as a 'far' pointer, you can't directly address conventional memory, and there is no _fmemset() function (yet). For your "new" compiler, I have no clue. BTW, I think we've managed to isolate several cases where gcc 2.8.1 for DJGPP appears to lock up when run under a Windows 95 DOS box. In some of these cases, the DJGPP environment variable was not set (a bugfix for this is in the works). There were other cases where DJGPP programs would lock up after a child DJGPP program returned if they called __dpmi_yield(). There is no solution for this as yet but it's being worked on. I really wish you'd tried to answer the questions I asked you instead of complaining and running away, because I might have been able to solve your problem. I guess we can't win them all... -- --------------------------------------------------------------------- | John M. Aldrich | "Always listen to experts. They'll | | aka Fighteer I | tell you what can't be done, and why.| | mailto:fighteer AT cs DOT com | Then do it." | | http://www.cs.com/fighteer/| - Lazarus Long | ---------------------------------------------------------------------