www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/29/12:33:17

Date: Tue, 30 Apr 1996 00:23:22 -0800 (GMT)
From: "Rafael R. Sevilla" <rsevilla AT upd DOT edu DOT ph>
To: brunokc AT ufba DOT br, DJGPP Mail Server <djgpp AT delorie DOT com>
Subject: Re: MK_FP, pokeb, and peekb
Message-ID: <Pine.SOL.3.91.960430000142.5929C-100000@sauron>
MIME-Version: 1.0

For MK_FP, remember that you live in protected mode now, and there's no
such thing as a far pointer. You can't use peek and poke commands to
access low DOS memory areas, the interrupt vectors, and everything else
you're so used to seeing in real mode DOS. It is possible however, and to
access real-mode data areas you can use the farptr simulation functions 
whic require you to include these files:

#include <sys/farptr.h>
#include <go32.h>

There are functions here like _farpokeb, _farpokew, and _farpokel which 
write bytes, words, and doublewords respectively, and _farpeekb, 
_farpeekw, and _farpeekl which work similarly. But be careful when using 
these functions--you could mess things up bad if you don't use them 
properly, and take note that what might be legal in real mode DOS might 
cause GP faults in protected mode DOS.

And about online help--the closest thing djgpp has for this is the INFO 
utility, and you should've gotten the TexInfo program from the djgpp 
distribution in order to take advantage of this. And note that it's 
nowhere near as comprehensive as Borland's, and probably will never be. 
Oh, and read the FAQ for more details!

-------------------------------------------------------------------------
University of the Philippines                           Rafael R. Sevilla
PABX/OVCA: Diliman Networking Project          rsevilla AT sauron DOT upd DOT edu DOT ph
-------------------------------------------------------------------------





- Raw text -


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