www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/14/13:45:40

From: "A. Sinan Unur" <sinan DOT unur AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Accessing video memory directly.
Date: Sat, 14 Mar 1998 07:48:47 -0500
Organization: Cornell University (http://www.cornell.edu/)
Lines: 40
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <350A7CAE.56C66744@cornell.edu>
References: <350a4783 DOT 8500878 AT news DOT manawatu DOT gen DOT nz>
NNTP-Posting-Host: cu-dialup-1006.cit.cornell.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Michael Langton wrote:

> This program is intended to put a smiley character in the top left of
> the text mode screen)

> #include <conio.h>
> 
> main() {
>         char *p = (char) 0xb8000;
>         p = 1;
>         getch();
> }

how do you intend to achieve that with p=1?

#include <sys/farptr.h>
#include <go32.h>

#include <conio.h>

#define SMILEY 1

int main(void)
{
  clrscr();
  _farpokeb(_dos_ds, 0xb8000, SMILEY);

  getch();
  return 0;
}

info libc alpha _far has more info.
-- 
----------------------------------------------------------------------
A. Sinan Unur
Department of Policy Analysis and Management, College of Human Ecology,
Cornell University, Ithaca, NY 14853, USA

mailto:sinan DOT unur AT cornell DOT edu
http://www.people.cornell.edu/pages/asu1/

- Raw text -


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