delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/09/21:49:12

From: krizz <krizz AT mailto DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Pointer to 0xA000
Date: Wed, 10 Dec 1997 00:10:19 +0100
Organization: LF.net GmbH, Internet Services, Stuttgart, Germany
Lines: 28
Message-ID: <348DCFDB.6BED2450@mailto.de>
References: <01bd0337$01ac5e00$390760c3 AT benjamir>
NNTP-Posting-Host: p2-01.stuttgart.netsurf.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

hi
a simple and good method is to copy a buffer
which is 0xffff size great to 0xa0000. you simply
write all the stuff (putpixel,...) into the buffer
and copy it via 32bit(0xffff/4=0x3fff) to the
vga addr.

here an example:

short video=__dpmi_segment_to_descriptor(0xa000);
unsigned char buffer=malloc(0xffff);
_movedatal(_my_ds(), (unsigned int)buffer, video, 0, 0x3fff);

krizz

Olmeca wrote:

> I wanna have a pointer to the address 0xA000, but in Djgpp it's a problem.
> e.g.: unsigned char *vga=0xA000 (this doesn't work, cause of protected
> mode)
> in the FAQ's is something about the macro: _dos_ds, but I don't know how to
> use it...
> Anybody help?
>
> chromes AT hotmail DOT com



- Raw text -


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