Home    Prev Next    
Contents
Programming For ISA Hardware
Overview
Programmers Guide
Scenario
I/O Ports control
Single read/write operations
Data array read/write operations
Accessing Physical Memory Addresses
Memory Mapping
Additional Functions
Hardware interrupts handling at user level
Common Functions
OpenRapidIsa
CloseRapidIsa
IsRapidIsaOpened
GetHardwareConfiguration
Direct Port I/O
GetPortByte
GetPortWord
GetPortLong
SetPortByte
SetPortWord
SetPortLong
ReadPortBuffer
WritePortBuffer
Memory Access
MapPhysToLinear
UnmapMemory
GetMem
GetMemW
GetMemL
SetMem
SetMemW
SetMemL
Hardware Interrupts
UnmaskIsaIrq
MaskIsaIrq
GetInterruptCounter
Additional Functions
Go to RapidDriver Main Page

As it was mentioned, the MapPhysToLinear function returns the pointer to the linear memory defined by it's physical address and size. You can work with a returned pointer directly or by means of additional functions set which provides physical memory access by bytes, by words or by double words. It's especially useful for Visual Basic programmers as Visual basic has some limitations on working with a pointers directly.

Below is the list of the above mentioned functions:

UCHAR  GetMem  (HANDLE hIsa, ULONG LinAddr, ULONG Offset);  
USHORT GetMemW (HANDLE hIsa, ULONG LinAddr, ULONG Offset);   
ULONG  GetMemL (HANDLE hIsa, ULONG LinAddr, ULONG Offset);   
void   SetMem  (HANDLE hIsa, ULONG LinAddr, ULONG Offset, UCHAR bValue);  
void   SetMemW (HANDLE hIsa, ULONG LinAddr, ULONG Offset, USHORT wValue);   
void   SetMemL (HANDLE hIsa, ULONG LinAddr, ULONG Offset, ULONG dValue);