@node movedata, memory @subheading Syntax @example #include void movedata(unsigned source_selector, unsigned source_offset, unsigned dest_selector, unsigned dest_offset, size_t length); @end example @subheading Description This function allows the caller to directly transfer information between conventional and linear memory, and among each as well. The selectors passed are @emph{not} segment values like in DOS. They are protected mode selectors that can be obtained by the @code{_my_ds} and @code{_go32_info_block.selector_for_linear_memory} (or just @code{_dos_ds}) functions (@ref{_my_ds}, @ref{_go32_info_block}). The offsets are linear offsets. If the selector is for the program's data area, this offset corresponds to the address of a buffer (like @code{(unsigned)&something}). If the selector is for the conventional memory area, the offset is the physical address of the memory, which can be computed from a traditional segment/offset pair as @code{segment}*16+@code{offset}. For example, the color text screen buffer is at offset 0xb8000. @subheading Return Value None. @subheading Portability @portability !ansi, !posix @subheading Example @example short blank_row_buf[ScreenCols()]; /* scroll screen */ movedata(_dos_ds, 0xb8000 + ScreenCols()*2, _dos_ds, 0xb8000, ScreenCols() * (ScreenRows()-1) * 2); /* fill last row */ movedata(_my_ds(), (unsigned)blank_row_buf, _dos_ds, 0xb8000 + ScreenCols()*(ScreenRows()-1)*2, ScreenCols() * 2); @end example