Physical Memory Proprties And ethods
Previous  Top  Next


You can access physical memory by using of ReadPhysicalMemory/WritePhysicalMemory methods, or, by using of Mem[] / MemW[] / MemL[] properties.
The following is an example of how to read a ROM BIOS area with the help of Mem[] property:

var  
  BiosArea: array[0..255] of Byte;  
  i       : Integer;  
 
const   
  RomAddress = $F8000;  
 
HW32.OpenDriver;  // open TVicHW32 driver  
 
if HW32.ActiveHW then  
begin  
 
  //... Copy BIOS area to our array  
 
  for i:=0 to 255 do  
    BiosArea[i] := HW32.Mem[RomAddress,i];  
 
  HW32.CloseDriver;   //  close TVicHW32 driver  
 
end  
else   // failed    
 
or, you can do the same work with ReadPhysicalMemory method:

var  
  BiosArea: array[0..255] of Byte;  
 
const   
  RomAddress = $F8000;  
 
HW32.OpenDriver;  // open TVicHW32 driver  
 
if HW32.ActiveHW then  
begin  
 
  //... Copy BIOS area to our array  
 
  ReadPhysicalMemory(RomAddress,0,256,@BiosArea);  
 
  HW32.CloseDriver;   //  close TVicHW32 driver  
 
end  
else   // failed