poke(),pokeb()
poke stores an integer value at the memory location segment:offset
pokeb stores a byte value at the memory location segment:offset
Declaration:
void poke(unsigned segment, unsigned offset, int value);
void pokeb(unsigned segment, unsigned offset, char value);
Remarks:
poke stores the integer value at the memory location segment:offset.
pokeb stores the byte value at the memory location segment:offset.
If you call either of these routines when DOS.H has been included, the routine 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 (or pokeb), you'll get the function rather than the macro.
Return Value:
None
Example:
#include<stdio.h> int main(void) { clrscr(); cprintf("Make sure the scroll lock key is off and press any key\r\n"); getch(); poke(0x0000,0x0417,16); cprintf("The scroll lock is now on\r\n"); return 0; } |
0 comments:
Post a Comment