Skip to content

Instantly share code, notes, and snippets.

@aarroyoc
Created September 16, 2014 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarroyoc/2d4f13e0b1a281c66884 to your computer and use it in GitHub Desktop.
Save aarroyoc/2d4f13e0b1a281c66884 to your computer and use it in GitHub Desktop.
ND_Keyboard - String manipulation
nsigned char ND::Keyboard::GetChar()
{
unsigned char scancode;
scancode=(unsigned char)ND::Ports::InputB(0x60);
if(scancode & ND_KEYBOARD_KEY_RELEASE)
{
return 255;
}else{
return en_US[scancode];
}
}
char* ND::Keyboard::GetString()
{
while(stringBuffer[stringPos-1]!='\n')
{
}
stringPos=0;
return stringBuffer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment