www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/09/01/16:16:32

Xref: news-dnh.mv.net comp.os.msdos.djgpp:1868
Path: news-dnh.mv.net!mv!news.sprintlink.net!nwfocus1.wa.com!nwfocus.wa.com!krel.iea.com!usenet
From: unlisted AT email DOT adress (Brainfried)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Graphics in v2.0
Date: 1 Sep 1995 17:32:35 GMT
Organization: CompuTech
Lines: 46
Distribution: na
References: <DE242E DOT CII AT jade DOT mv DOT net> <420l92$f04 AT bug DOT rahul DOT net>
Nntp-Posting-Host: school.iea.com
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

>
>I don't do any of that, for both 1.6 and 2.0 I've used:
>char * screen
>
>screen=(char*)0xa0000;
>
>screen[x+y*320]=somecolor;
>
>As long as I set stuff up with a INT 10 call it works fine, no need
>to muck with this near/far pointer crapola. *bleh* This is GCC after all, 
>not DOS. :)

How do you get this to work? Every time I try to do this I get a GPF!

Here is the code for the simple test program I use (It doesn't work), am I 
doing something wrong?

BEGIN------------------------------------------------------------------------

#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include <conio.h>

char *vram = (char *) 0xa0000;

void main(void) {
 unsigned int index,dummy;
 char clrfld[64000];
 for (index=0;index<64000;index++)
       clrfld[index] = 1;
 dummy = getch();
 __asm(" movl $0x0013, %ax
         int  $0x10 ");
 strcpy(vram,clrfld); 
 dummy = getch();
}

END-------------------------------------------------------------------------

Should I use INT86() rather than __asm()?

 
 

- Raw text -


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