Alright i'm using Dev-C++ 4.9.8.0 (Just downloaded two nights ago) and am using Windows XP home.
I may have found a solution but Dev-C++ doesn't have much documentation on the topic, the solution is using inline assembly and using DOS interrupt 16h to catch the scan code as well as the ASCII code but I can't figure out how to get inline assembly to work in Dev-C++.
So far this is what I have:
Code:
#include <stdio.h>
#include <stdlib.h>
int getKey(void);
int main(int argc,char *argv[])
{
int x;
puts("Press a key\n");
x=getKey();
printf("You pressed: \"%04X\"",x);
system("PAUSE");
return 0;
}
int getKey()
{
int key;
__asm mov ah,10h
__asm int 16h
__asm mov key,ax
return(key);
}
That was basically the same as the code from the author of C for Dummies Code and Concept Here but that nor
Code:
__asm
{
mov ah,10h
int 16h
mov key,ax
}
that works, any ideas on Dev-C++ inline assembly would be GREATLY appriciated, thanks.