delorie.com/archives/browse.cgi | search |
Xref: | news2.mv.net comp.os.msdos.djgpp:3309 |
From: | Charles Sandmann <sandmann AT clio DOT rice DOT edu> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Yet about MK_FP, pokeb, and peekb |
Date: | Tue, 30 Apr 1996 09:51:26 CDT |
Organization: | Rice University, Houston, Texas |
Lines: | 21 |
Message-ID: | <318628ee.sandmann@clio.rice.edu> |
References: | <Pine DOT A32 DOT 3 DOT 90 DOT 960429134020 DOT 72338B-100000 AT canudos DOT ufba DOT br> |
Reply-To: | sandmann AT clio DOT rice DOT edu |
NNTP-Posting-Host: | clio.rice.edu |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
> Guys, sorry if I seem to insist at the same point (about > MK_FP). What I'd like to have is the facility of refering to a memory > position using a pointer, instead of a function (like dosmemput/get). On > the Borland version of a program of mine I had: > char far *screen = MK_FP(0xb800,0); 1) write a function MK_FP 2) have it include sys/nearptr.h 3) enable near pointers 4) Compute the "near" address from __djgpp_conventional_base + arg1*16 + arg2 5) return this value This might actually be a somewhat useful porting function to others. I have one someplace that was written just for the above porting reasons, but I can't access it for several weeks. > but I got a SIGSEGV singal at the execution of the mprotect > function. Sorry about my ignorance but why didn't it work ?! Don't mess with mprotect. It's there really only for making regions of memory read only or no-access.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |