>I'm Interested to read data via memory mapped data aquisition card
>How can I access the card's phisical address (C800-C840) ( 16 bits
>IOPL code ,write a device drive , IOCLT calls?).
> C Static pointers like DOS turbo c++ ( char *p=(ADDRESS)) generate GFPs.
Your pointer is completely invalid. Your c800 address is a segment
address. You have to convert it to a 32-bit address. I think C Set
has a library routine to do this for you.
But that still won't work because the memory isn't in your address
space. I think you're going to need a device driver. Perhaps you can
set it up to create a piece of shared memory and map the card's
address space onto it. This way, an app can open the shared memory
and access it. (Perhaps an IOCtl can be used to request the shared
memory handle.)
But I'd want to review what the card does. Don't manipulate it like
you would in DOS. Let your device driver deal with the memory mapping
and stuff. Think up a useful high-level API for interfacing with the
card and let your driver provide that interface. From there, your
application can request access to the card with DosOpen, and can
connunicate with it using DosRead, DosWrite and DosDevIOCtl, releasing
it with DosClose.
---------------------+--------------------------------------------------------
David Charlap | The contents of this message are not the opinions of
Visix Software, Inc. +--------------------------------------------------------
Member of Team-OS/2 |
---------------------+