HP3000-L Archives

October 1995, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Steve Cooper <[log in to unmask]>
Reply To:
Steve Cooper <[log in to unmask]>
Date:
Thu, 26 Oct 1995 17:28:48 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
Dan Hollis <[log in to unmask]> wrote:
 
>Is it possible to use mapped files in CM mode? HPFOpen is NM callable only,
>but if someone were to write a switch for it, would the pointer work in CM
mode?
>
 
No.  Mapped files are either short-mapped, which means that they are
accessible with a 32-bit short pointer, or long-mapped, which means
that they can only be accessed with a 64-bit long pointer.  CM code
only knows about 16-bit,  DB or Q relative, byte or word pointers;
i.e., pointers to things in your CM stack.  Mapped files are located
outside of your CM stack, so are not really accessible in CM code.
 
Of course, if you know what you are doing, you could store these 32 or
64 bit pointers in appropriate-sized CM variables, and then pass them
to NM routines written in SPLash! or C or Pascal or some other
pointer-knowledgeable language, and things should work just fine.
 
Incidentally, there is an intrinsic that you can call to get the file
pointer, even if the file had been opened with FOPEN, but I seem to
remember some nasty problems if you use the file "mapped" without the
file system knowing that you are doing that.
 
/Steve Cooper

ATOM RSS1 RSS2