www.delorie.com/djgpp/doc/libc/libc_191.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

dosmemgetb

Syntax

 
#include <sys/movedata.h>

void _dosmemgetb(unsigned long offset, size_t xfers, void *buffer);

Description

This function transfers data from MS-DOS's conventional memory space to the program's virtual address space, using only byte transfers. The offset is a physical address, which can be computed from a real-mode segment/offset pair as follows:

 
offset = segment * 16 + offset;

The xfers is the number of bytes to transfer, and buffer is a pointer to somewhere in your virtual address space (such as memory obtained from malloc) where the data will go.

Return Value

None.

Portability

ANSI/ISO C No
POSIX No

Example

 
unsigned short shift_state;
_dosmemgetb(0x417, 2, &shift_state);
if (shift_state & 0x0004)
  /* Ctrl key pressed */;


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004