🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: de.comp.lang.c++
1 messages
1 total messages Started by Andreas Weichert Thu, 29 Feb 1996 12:18
Warum klappt _fmemcpy nicht für >64kB
#1718
Author: Andreas Weichert
Date: Thu, 29 Feb 1996 12:18
30 lines
1011 bytes
Wie lassen sich unter Borland C++ 4.0 Speicherbereiche groesser als
64kB kopieren ?
 _fmemcpy will einfach nicht klappen. 
Es kopiert nur bis zm 3615. Element !?

Für Hilfe wäre ich dankbar.


int main(void)
{
long i;
const long Size=20000;
float huge *p1;
float huge *p2;
p1=(float* huge)farcalloc(Size,sizeof(float));
for(i=0;i<Size;i++)    p1[i]=1;
p2=(float* huge)farcalloc(Size,sizeof(float));
for(i=0;i<Size;i++)    p2[i]=2;
_fmemcpy((void* huge) p2,(void* huge) p1,Size*sizeof(float));
cout<<p2[Size-1];    // -> 1

cout<<endl;
for(i=0;i<Size;i++)
    if(p2[i]!=1) {cout<<i; break; }   // ->3616



return(0);
}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads