X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6BEDB.6856D838" Subject: copy from physical memory X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Sun, 13 Aug 2006 15:21:28 +0200 Message-ID: <714817CA32ED3143B96B69D0D3574C5A311B64@server.oncotherm.oncotherm.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: copy from physical memory Thread-Index: Aca+22JzLt/pLapLS7accDzAEW2g8g== From: "Szasz Oliver \(OR\)" To: This is a multi-part message in MIME format. ------_=_NextPart_001_01C6BEDB.6856D838 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hello everyone, =20 I have a problem. I would like to get information from (and to) a fix physical address in the computer. For this I have tried first to copy a variable to an other one (Temp to Temp2), but for some reason at the end I do not get the same value. Can anybody tell where I am doing it wrong? =20 Thanks for helping. =20 Oliver Szasz =20 dword Phys; word Temp=3D1234, Temp2=3D0; if (__dpmi_get_segment_base_address(_my_ds(),&Phys)=3D=3D0) { Phys+=3D(dword)Temp; if (Phys<0x100000) movedata(_dos_ds,Phys,_my_ds(),(dword)&Temp2,sizeof(Temp)); else { __dpmi_meminfo mi; mi.address=3DPhys; mi.size=3Dsizeof(Temp); __dpmi_physical_address_mapping(&mi); word selector=3D__dpmi_allocate_ldt_descriptors(1); if (selector!=3D0) { if (__dpmi_set_segment_base_address(selector,mi.address)=3D=3D0) { dword Addr; if ((__dpmi_get_segment_base_address(selector,&Addr)=3D=3D0) && (Addr=3Dmi.address)) if (__dpmi_set_segment_limit(selector,mi.size-1)=3D=3D0) { if (__dpmi_get_segment_limit(selector)>=3Dmi.size-1) { =20 movedata(selector,0,_my_ds(),(dword)&Temp2,sizeof(Temp2)); printf("T:%d %d",(_d_)Temp,(_d_)Temp2); } } } __dpmi_free_ldt_descriptor(selector); } __dpmi_free_physical_address_mapping(&mi); } } =20 ------_=_NextPart_001_01C6BEDB.6856D838 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

Hello everyone,

 

  I have a problem. I would like to get = information from (and to) a fix physical address in the computer. For this I have tried = first to copy a variable to an other one (Temp to Temp2), but for some reason at = the end I do not get the same value. Can anybody tell where I am doing it = wrong?

 

  Thanks for = helping.

 

Oliver Szasz

 

   dword Phys;

   word Temp=3D1234, = Temp2=3D0;

   if (__dpmi_get_segment_base_address(_my_ds(),&Phys)=3D=3D0)

      = {

      = Phys+=3D(dword)Temp;

      if = (Phys<0x100000)

         movedata(_dos_ds,Phys,_my_ds(),(dword)&Temp2,sizeof(Temp));

       = else

         =     {

     =         __dpmi_meminfo = mi;

         =     mi.address=3DPhys;

         =     mi.size=3Dsizeof(Temp);

         =     = __dpmi_physical_address_mapping(&mi);

         =     word selector=3D__dpmi_allocate_ldt_descriptors(1);

         =     if (selector!=3D0)

         =        {

         =        if (__dpmi_set_segment_base_address(selector,mi.address)=3D=3D0)<= /span>

         =           = {

         =           dword = Addr;

         =           if ((__dpmi_get_segment_base_address(selector,&Addr)=3D=3D0) && (Addr=3Dmi.address))

         =              = if = (__dpmi_set_segment_limit(selector,mi.size-1)=3D=3D0)

         =             &= nbsp;   {

         =             &= nbsp;   if (__dpmi_get_segment_limit(selector)>=3Dmi.size-1)

         =             &= nbsp;      {

         =             &= nbsp;      movedata(selector,0,_my_ds(),(dword)&Temp2,sizeof(Temp2));=

printf("T:%d = %d",(_d_)Temp,(_d_)Temp2);

         =             &= nbsp;      }

         =             &= nbsp;   }

         =           = }

         =        = __dpmi_free_ldt_descriptor(selector);

         =        }

         =     = __dpmi_free_physical_address_mapping(&mi);

         =     }

      = }

 

------_=_NextPart_001_01C6BEDB.6856D838--