TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: All
from: Greg Boyles
date: 1995-10-04 23:01:20
subject: Why wont memmove or movmem work?

I am writing a library which allow me to save the screen out to the heap and
then restore the screen later. I have a pointer to an array of 4000 words i.e.
video_array *video_ptr, which is initialized to b800 via
video_ptr=(video_array *)b800; and this works since I get b800 when I
printf
video_ptr as a pointer. 

I also have the heap pointer of type void * i.e. buffer.ptr. The save
procedure has the statement ptr=memmove(buffer.ptr,video_ptr,size) while
the restore procedure has the statement
ptr=memmove(video_ptr,buffer.ptr,size);
In both cases ptr aquires the value of the destination pointer, proven by
printf'ing the destination pointer and ptr. But after I call the restore
procedure the screen, which I saved, is not placed in video RAM and I do
not see the original screen.

Why wont the memmove, or movmem, function work?

--- Maximus/2 2.01wb
* Origin: Melbourne PC User Group BBS (3:632/309)
SEEN-BY: 50/99 620/243 623/630 632/0 107 271 304 309 328 348 393 503 515 530
SEEN-BY: 632/552 998 999 1000 633/262 371 634/384 635/301 502 503 544 637/103
SEEN-BY: 639/100 670/301 711/401 409 410 413 430 510 807 808 809 932 934
SEEN-BY: 712/515 713/888 714/906 800/1 7877/2809
@PATH: 632/309 998 635/503 50/99 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.