delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/10/18:26:07

Date: Sat, 10 Jan 1998 15:25:51 -0800 (PST)
Message-Id: <199801102325.PAA29616@adit.ap.net>
Mime-Version: 1.0
To: hackeroc3 AT aol DOT com (HackerOC3), djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Mode 13h

At 08:53  1/10/1998 GMT, HackerOC3 wrote:
>I am using mode 13h, and the book I am using has examples to access the video
>buffer.  This is what it says to do to fill the screen:
>
>#define SCREEN_WIDTH unsigned int
>#define SCREEN_HEIGHT
>
>unsigned char far *video_buffer =(char far *)0xA0000000L;
>
>void Fill_Screen(int value)
>{
>
>_fmemset(video_buffer,(char)value,SCREEN_WIDTH*SCREEN_HEIGHT+1);
>
>}
>
>dos.h, conio.h, stdio.h, are #included
>
>
>I always get parse errors.  I don't know what to do, and I need to get this
>done fast.  Please help!
This code was written for some other compiler, probably Borland. Also, as
someone else said, SCREEN_HEIGHT and SCREEN_WIDTH are misdefined. `far' does
not work for DJGPP; you will have to use farptr functions or the Fat DS hack
instead. Read FAQ sections 18.4 and 18.6, and the libc docs for `_far*' and
`movedata'.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019