delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/17/10:10:59

Message-Id: <3.0.1.32.19990717221010.00698cd8@apiitkl.edu.my>
X-Sender: df990244 AT apiitkl DOT edu DOT my
X-Mailer: Windows Eudora Light Version 3.0.1 (32)
Date: Sat, 17 Jul 1999 22:10:10 +0800
To: djgpp AT delorie DOT com
From: Mark <rhosts AT bigfoot DOT com>
Subject: 0xA000 plot pixels questions in 13h mode
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

Hello all,

I am just a beginner, so bear with me.

I am reading several tutorials on game programming using DJGPP to gain some
basic game programming skills in 13h mode. After hours of trying out
snippets and reading the DJGPP FAQ and browsing the info.exe, I found out
that I couldn't access 0xA000 directly. "use the so-called "farptr"
functions like _farpeekb and _farpokew" is stated in the FAQ. I tried a lot
and I finally got a pixel plotted on the screen using the <go32.h> and its
functions:

   _farsetsel(_dos_ds);
   _farnspokeb(0xA0000 + y*320 + x, color);


- What is the "farptr" for ? And what is a poke and a peek ?
- I noticed that there are lots of functions that look so much like the above:
	_farpokeb
	_farpokew
	_farnspokew
	etc.
  which is now the best or easiest way for me to use for this plotting
pixel stuff.

- Why are there so many functions that look like they are far or near types
? The compiler is 32bit and in the FAQ stated that DJGPP doesn't even
recognise the far and near types ?!?!

- Also a tutorial mentioned that I could disable/enable the protected mode
using __djgpp_nearptr_enable();
 and __djgpp_nearptr_disable() for pixel plotting. But it also stated that
it could damage the DOS area and block the system ?! How much damage can it
do? Would it be permanent ?

Regards
Mark.



- Raw text -


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