mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-09-28 10:54:30 +00:00
ab975b611c
These are the samples from ORCA/C 2.1.0, converted to LF line endings.
44 lines
986 B
Plaintext
44 lines
986 B
Plaintext
/*****************************************************************
|
|
*
|
|
* This file contains the functions for KEY2.CC. See that file
|
|
* for detailed comments.
|
|
*
|
|
*******************************************************************/
|
|
|
|
#pragma keep "Funcs"
|
|
|
|
/****************************************************************
|
|
*
|
|
* KeyPress - Check if a key has been pressed
|
|
*
|
|
****************************************************************/
|
|
|
|
int KeyPress(void)
|
|
|
|
{
|
|
char *keyboard;
|
|
|
|
keyboard = (char *) 0x00C000;
|
|
return ((*keyboard) & 0x80) != 0;
|
|
}
|
|
|
|
|
|
/****************************************************************
|
|
*
|
|
* ReadChar - Returns the last character typed on the keyboard.
|
|
* Note: Returns a character whether or not one has
|
|
* been typed!
|
|
*
|
|
****************************************************************/
|
|
|
|
char ReadChar(void)
|
|
|
|
{
|
|
char *keyboard, *strobe;
|
|
|
|
keyboard = (char *) 0x00C000;
|
|
strobe = (char *) 0x00C010;
|
|
*strobe = 0;
|
|
return *keyboard & 0x7F;
|
|
}
|