home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / pc_hw / mem / dmpb.txh < prev    next >
Encoding:
Text File  |  1996-01-30  |  899 b   |  36 lines

  1. @node dosmemputb, memory
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <sys/movedata.h>
  6.  
  7. void _dosmemputb(const void *buffer, size_t xfers, unsigned long offset);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function transfers data from the program's virtual address space
  13. to MS-DOS's conventional memory space, using only byte (8-bit)
  14. transfers.  The @var{offset} is a physical address, which can be
  15. computed from a real-mode segment/offset pair as follows:
  16.  
  17. @example
  18. offset = segment * 16 + offset;
  19. @end example
  20.  
  21. The @var{xfers} is the number of bytes to transfer, and @var{buffer}
  22. is a pointer to somewhere in your virtual address space (such as
  23. memory obtained from @code{malloc}) where the data will come from.
  24.  
  25. @subheading Return Value
  26.  
  27. None.
  28.  
  29. @subheading Example
  30.  
  31. @example
  32. unsigned short save_screen[25][80];
  33. dosmemputb(save_screen, 0xb8000, 80*2*25);
  34. @end example
  35.  
  36.