Mail Archives: djgpp/2000/05/25/17:32:54
Just use DPMI stuff. Some simple and very useful functions are available in
the "sys/movedata.h" file.
Here goes the example:
---------------8<----------------
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <sys/movedata.h>
int main() {
char k;
clrscr();
printf ("hit Enter for NumLock switching...\n");
getch();
_dosmemgetb (0x417, 1, &k);
k ^= 1<<5;
_dosmemputb (&k, 1, 0x417);
printf ("hit Enter for NumLock switching...\n");
getch();
_dosmemgetb (0x417, 1, &k);
k ^= 1<<5;
_dosmemputb (&k, 1, 0x417);
return 0;
}
---------------8<----------------
Good Luck
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
Kai Dietrich wrote:
>
> Hi!
>
> > set/reset bit #5 at real mode segment 0x40 offset 0x17 byte.
> >
> > Good Luck
> > Alexei A. Frounze
>
> Hmm, I had no luck...
> How do I get acces to a real mode segment+offset in DJGPPs DPMI mode
> (example code would be a great help)?
>
> TIA
> Bye
> Kai
- Raw text -