Xref: news2.mv.net comp.os.msdos.djgpp:7716 From: root AT ursa DOT smsu DOT edu (Tony O'Bryan) Newsgroups: comp.os.msdos.djgpp Subject: Re: How to plot points (in 320x200x256) Date: 21 Aug 1996 03:31:58 GMT Organization: Axiom Enterprises Lines: 40 Message-ID: <4vdvve$mbe@ursa.smsu.edu> References: <4v9dtt$397g AT news-s01 DOT ny DOT us DOT ibm DOT net> NNTP-Posting-Host: huwawa.smsu.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Dean (deanph AT ibm DOT net) wrote: > I've finally got DJGPP up and running. I can get in mode 13h > and all that, I can write text, but what I can't do is write > directly to memory to plot points, what with all the protected > mode and all. Is there some other way to plot points on the > screen, is there something I could read (not FAQ200b.zip, it was > no help:) I just got DJGPP installed and discovered, through this newsgroup, *one* way to access video memory directly: #include #include #include main() { unsigned char *Screen; union REGS Regs; unsigned long Count; if (__djgpp_nearptr_enable() == 0) { puts("Can't disable protection"); exit(1); } Regs.x.ax = 0x0013; int86(0x10,&Regs,&Regs); Screen = (unsigned char *)(__djgpp_conventional_base + 0xa0000); for (Count = 0;Count < 5000;Count++) memset(Screen,Count & 255,64000); Regs.x.ax = 0x0003; int86(0x10,&Regs,&Regs); } -- I support the fight against "Look and Feel" patents.