ORCA-C/Tests/Spec.Conform/SPC4.6.3.5.CC
2017-10-01 17:47:47 -06:00

1 line
837 B
C++
Executable File

/* Special Conformance Test 4.6.3.5: Verification of pointer initialization: */
/* setting pointer to integer constant */
/* */
/* Tester needs to enter one character from the keyboard and then check that */
/* the key echoed is the same key. */
/* */
main ()
{
static char *keyBoard = (char *) 0xC000ul, *strobe = (char *) 0xC010ul, ch;
*keyBoard = 0;
printf ("Please type one character\n");
while (!(*keyBoard & 0x0080)) ;
*strobe = 1;
ch = *keyBoard;
printf ("The character typed is: %c\n", ch);
return;
Fail:
printf ("Failed Special Conformance Test 4.6.3.5\n");
}