poke
raw OCR
Stores an integer value at a memory location given by segment-.offset.
Defined in header <dos.h>
Syntax
#include <dos.h>
void poke(unsigned segment, unsigned offset, int value);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
poke stores the integer value at the memory location segment-.offset.
If this routine is called when dos.h has been included, it will be treated as a macro that expands to inline code. If you don't include dos.h, or if you do include it and #undef poke, you'll get the function rather than the macro.
Return value
None.
See also
Example
#include <dos.h>
#include <conio.h>
int main(void)
{
clrscr0 ;
cprintf("Make sure the scroll lock key is off and press any key\r\n"
getchO ;
poke(OxOOOO,0x0417, 16);
cprintfC'The scroll lock is now on\r\n");
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/dos.h/poke/
· short form /3.1/poke/