delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/12/22:54:41

From: Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Graphics
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <3obafssca2av93g09doket8qs8ncvnosjc@4ax.com>
References: <tB8J4.1635$O2 DOT 25478 AT harpo>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 42
X-Trace: +r9wQ3Vv7Ri5yxhaTM5Ow6YrXepKjKNBZt36MUymJHsM/0q5OQaLUFsOwfAUWYjUZ35lRF36fXgs!zHjxGsyV6+KSit7yjRMj6Wx+Ug6nCxe+Udy/4mFK54bWEvLIHA49kE+nE30CG8XZ6okUmh8/4KEK!LQXgqRg=
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Thu, 13 Apr 2000 02:49:47 GMT
Distribution: world
Date: Thu, 13 Apr 2000 02:49:47 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Wed, 12 Apr 2000 20:30:18 -0400, "Chewbaklava" <kalit AT ctel DOT net>
wrote:

>I was starting work on my own graphics library, not to compete with anything
>like Allegro, because it surely can't hold up, but just to see how it all
>works.  My question is this, I see people set mode 13h 2 ways, both work
>fine.  is there any differance between saying (and I'm doing this from
>memory, so if the syntax is a little wrong...)
>
>union REGS regs;
>regs.x.ax = 0x13;
>int86(0x10, &reg, &regs);
>
>and
>
>__dpmi_regs r;
>r.x.ax = 0x13;
>__dpmi_int(0x10, &r);
>
>Both of these methods work, and as far as I can see do absolutly the same
>thing.

In general, when calling DOS or BIOS services, use __dpmi_int().

>Also, plotting a pixel.  I've seen a method with a char * that
>points to the video memory (0xA0000 right?) and I've seen it done
>with farpokew, farpokel and farpokeb (the w, l and b stand for word,
>long and byte, right??).  This is speed sensitive, so I would like
>to know, what does farpokeb do exactly???

It expands to inline instructions that set the 386 register FS
(commonly called the "farptr segment") and store a byte there.  I
don't know exactly what GCC's optimizer does to _farpoke*(); other
regulars in this NG may be able to help you there.

-- 
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html

This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/

- Raw text -


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