no c library functions please, just how to do it?
thanks
no c library functions please, just how to do it?
thanks
#include <conio.h>
#include <stdio.h>
int main(void)
{
int a;
a = getch();
printf("%d",a);
return 0;
}
it shows you what the ascii code for the input letter is is.
No ****, thats not what I mean. I want to convert a scan code into an ascii code, Im wondering if there is any straight forward way and no C library functions please.
No problem
whoa ! stupid_mutt - i dont think that was called for - brian was only trying to help!
Monday - what a way to spend a seventh of your life
Sorrt, but doesnt anybody know how?
I don't know. But why don't you want to use C library functions? Why create something like getch() by yourself?
Writing some os indepedent code and it would be nice to know how, I can read scan codes, I just dont know how to convert em to ascii so I can display them.
Acos is good
>Writing some os indepedent code
As far as I know C and it's standard libraries are OS independant.
>and it would be nice to know how, I can read scan codes, I just >dont know how to convert em to ascii so I can display them.
I see. Can you tell me what scan codes are? I guess it is the codes which are send by the keyboard when pressing a key, in that case you should do some port reading. They aren't just the numbers of the ASCII characters?
You are correct about what scan codes are but no they are not ascii codes. No, the C standard library is not os independent and even if it were getch is part of conio which is not part of the standard C library standard. Please only reply if you can help me.
Relax. I was just gaining some information in order to be able to answer your question. Since English isn't my first language, I sometimes need some more explanation of terms.
http://www.c-for-dummies.com/lessons/bonus/07/
Sorry, I forgot too mention I dont really want to use bios stuff, I just want to know an algorithm for converting it.